Abstract:In the communication process of various types of instrumentation bus networks, the system often needs to process the received high-speed data stream in real time on the application layer. And how to extract data frame data from continuous data stream is the main problem discussed. In this regard, analyzes the protocol processing methods of common instrument buses, and designs a set of frame extraction algorithms, including frame extraction state machine, improved Sunday frame header matching algorithm and intra-frame subdomain search algorithm. Then this paper tests the algorithm in two environments: direct sending and sending via TCP network. Experiments show that the performance of the algorithm is better than the frame length domain decoding under the Netty framework. Finally, in order to actually test and apply the algorithm, this paper uses the algorithm to extract and store the data frame in real time for the 64-channel, 100 kS/s analog acquisition card, and display the waveform of the acquired analog quantity. This algorithm can be used for data separation, frame header identification and frame data extraction at the application layer of the instrument bus.