Inertial navigation communication data processing method, device, electronic device and computer-readable storage medium

By screening and reorganizing the multi-packet data of the inertial navigation system, the problems of data integrity loss and difficulty in identifying dynamic starting points caused by packet loss are solved, achieving efficient data analysis and improving system reliability.

CN120378058BActive Publication Date: 2025-09-19HUNAN 208 ADVANCED TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510845682.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-09-19
Estimated Expiration
2045-06-24

AI Technical Summary

Technical Problem

Existing inertial navigation systems suffer from data integrity loss in packet loss scenarios, difficulty in dynamic starting point identification and data alignment, and insufficient parsing efficiency and fault tolerance, making it difficult to meet the real-time and robustness requirements in highly dynamic environments.

Method used

By receiving multiple packets of data to form a packet sequence number array and a status byte array, the incoherent packet sequence numbers are filtered out, the packet sequence numbers and status bytes in the incoherent data blocks are deleted, and the complete data blocks are added in their place to achieve dynamic compensation for packet loss and data reorganization.

Benefits of technology

It realizes real-time data analysis of each packet in complex communication scenarios, improving system performance and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378058B_ABST
    Figure CN120378058B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, electronic device, and computer-readable storage medium for processing inertial navigation communication data. The method comprises: receiving packet data, intercepting the minimum and maximum packet sequence numbers, and all packet sequence numbers and corresponding status bytes between the minimum and maximum packet sequence numbers, and filtering out incoherent packet sequence numbers; sequentially treating the numbers 0-N as a data block, with each L number representing N being the number of valid bytes in the packet sequence number and L being the length of the complete parsed byte; and for each data item in the incoherent packet sequence number array, determining which data block the data item is located in, determining and deleting the packet sequence number subarray and status byte subarray corresponding to the data block, replacing the deleted packet sequence number subarray with the data block, and replacing the deleted status byte subarray with L zeros in the status byte array. The present invention can achieve dynamic compensation for packet loss and data reassembly, improving system performance and reliability in complex communication scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of inertial technology, and in particular to an inertial navigation communication data processing method, device, electronic device and computer-readable storage medium. Background Art

[0002] In inertial navigation and motion parameter measurement systems, efficient parsing and synchronous display of multi-source sensor data are key technologies for improving system real-time performance and accuracy. Existing communication protocols typically directly include pulse data from the gyroscope (gyro) and accelerometer (accelerometer), as well as information such as the gyroscope's difference frequency, sum frequency, light intensity voltage, and frequency stabilization voltage. Generally, once the check digit is verified to be correct, the data can be directly parsed according to the protocol. Even if the check digit is incorrect and data is lost, simply discarding the packet will not affect the actual display. However, in some special cases where high-speed data transmission is required, hardware limitations necessitate a limited byte length per packet to achieve the target rate. Therefore, some data is byte-split into multiple packets for parsing. Accordingly, data parsing also requires verifying the integrity of all bytes. For example, double data must be parsed into double data using eight consecutive packets (e.g., sequence numbers 0-7 correspond to difference frequency X, sequence numbers 8-15 correspond to difference frequency Y, and so on) to enable dynamic analysis. However, such systems face the following technical challenges in practical applications:

[0003] 1) Loss of data integrity in packet loss scenarios: Traditional parsing methods rely on strict packet continuity. When packet loss occurs due to unstable communication links, the system typically adopts a simple discard strategy or waits for retransmission. However, this approach is not suitable for scenarios requiring combined parsing of multiple packets. Direct discarding can lead to parsing errors for critical data. For example, if packets with sequence numbers 3-5 are lost, the data corresponding to sequence numbers 0-7 will be parsed incorrectly and cannot be recovered through dynamic compensation, seriously affecting real-time performance and computational accuracy.

[0004] 2) Difficulty in dynamic starting point identification and data alignment: The system needs to display gyro and meter pulse data on the same screen as multi-packet combined parsed data. This requires that the data must be aligned based on a fixed sequence number segment (e.g., 0-999). However, in actual communications, data may be transmitted starting from any sequence number (e.g., starting sequence number 500). Traditional methods rely on global cache and traverse all data to locate the starting point, resulting in processing delays and being unable to adapt to high-real-time scenarios (e.g., 1ms sampling period). In addition, if the starting sequence number (e.g., 0 or the ending sequence number 999) is lost, existing technologies lack an effective boundary compensation mechanism, resulting in data splicing failure or display misalignment.

[0005] 3) Inadequate parsing efficiency and fault tolerance: Parsing parameters for multi-packet combinations requires parsing the status bytes of eight consecutive packets. However, existing methods often use batch processing, making real-time packet-by-packet parsing impossible. Furthermore, in the event of packet loss or out-of-order data, traditional technologies struggle to dynamically reconstruct valid data segments (for example, if sequence number 4 is missing from a sequence of 0-7, interpolation or prediction using adjacent sequence numbers is impossible), resulting in delayed or distorted data calculation results.

[0006] To address these issues, existing technologies have significant shortcomings in real-time parsing, dynamic splicing, and fault-tolerance mechanisms for multi-source data, making it difficult to meet the stringent requirements for data integrity, real-time performance, and robustness in highly dynamic environments. Therefore, an innovative approach is urgently needed that can achieve rapid positioning of dynamic starting points, packet loss compensation and data reassembly, and real-time packet-by-packet data parsing, thereby improving system performance and reliability in complex communication scenarios. Summary of the Invention

[0007] In response to the problems in the background technology, the present invention proposes an inertial navigation communication data processing method to achieve dynamic compensation for packet loss and data reorganization, so that the host computer can analyze data in real time and accurately packet by packet, thereby improving system performance and reliability in complex communication scenarios.

[0008] The present invention adopts the following technical solutions:

[0009] A method for processing inertial navigation communication data, comprising the following steps:

[0010] 1) Receive multiple packets of data transmitted by the lower computer, obtain the packet sequence number and the corresponding status byte of each packet in the multiple packets in the order of reception, and form the first packet sequence number array and the corresponding first status byte array;

[0011] 2) Find the minimum valid data packet sequence number and the maximum valid data packet sequence number in the first packet sequence number array, intercept the minimum valid data packet sequence number and all packet sequence numbers between the minimum valid data packet sequence number and the maximum valid data packet sequence number to form a second packet sequence number array, intercept the status bytes corresponding to each sequence number in the second packet sequence number array in the first status byte array to form a second status byte array corresponding to the second packet sequence number array;

[0012] 3) Filter out the incoherent packet sequence numbers in the second packet sequence number array to form an incoherent array;

[0013] 4) Sequentially treat the numbers 0-N as a data block, with each L number representing a data block, where N is the number of valid bytes in the packet sequence number and L is the complete parsed byte length; for each data item in the incoherent array, determine in which data block the data item is located, determine and delete the packet sequence number subarray corresponding to the data block in the second packet sequence number array, and determine and delete the status byte subarray corresponding to the packet sequence number subarray in the second status byte array, then replace the deleted packet sequence number subarray position with the data block, and replace the deleted status byte subarray position in the second status byte array with L zeros.

[0014] Optionally, in step 4), the process of determining the packet sequence number subarray corresponding to the data block in the second packet sequence number array is as follows:

[0015] According to the first data of the data block, search the second packet sequence number array for data that is equal to the first data, or greater than the first data and closest to the first data in value, and determine it as the first data of the packet sequence number subarray corresponding to the data block.

[0016] According to the tail data of the data block, searching the second packet sequence number array for data that is equal to the tail data, or smaller than the tail data and closest in value to the tail data, and determining it as the tail data of the packet sequence number subarray corresponding to the data block,

[0017] An array consisting of the first data, the last data, and the data therebetween of the packet sequence number subarray corresponding to the data block in the second packet sequence number array is determined as the packet sequence number subarray corresponding to the data block in the second packet sequence number array.

[0018] Optionally, in step 4), the process of determining the status byte subarray corresponding to the packet sequence number subarray in the second status byte array is as follows:

[0019] According to the index of the first data of the packet sequence number subarray in the second packet sequence number array, search the data corresponding to the index in the second status byte array and determine it as the first data of the status byte subarray,

[0020] According to the index of the tail data of the packet sequence number subarray in the second packet sequence number array, search the data corresponding to the index in the second status byte array to determine it as the tail data of the status byte subarray,

[0021] An array consisting of the first data, the last data, and the data therebetween of the status byte subarray in the second status byte array is determined as the status byte subarray in the second status byte array corresponding to the packet sequence number subarray.

[0022] Optionally, step 4) further includes:

[0023] Assign a false variable to each data block. After executing step 4) for a certain data in the incoherent array, set the false variable of the data block corresponding to the data to true. After determining which data block the next data in the incoherent array is located in, determine whether the false variable of the data block where the next data is located is true. If so, jump to the next data in the incoherent array.

[0024] Optionally, step 3) specifically includes:

[0025] For each packet sequence number in the second packet sequence number array, subtract the packet sequence number sorted before it from the packet sequence number, and determine whether the resulting value is equal to 1. If so, jump to the next packet sequence number. If not, subtract the packet sequence number sorted before it from the packet sequence number, subtract 1 from the resulting value, and obtain the number M of packet sequence numbers between the packet sequence number and the previous packet sequence number. The packet sequence number is incremented by 1 M times in a cycle, and the value obtained by incrementing by 1 each time is the packet sequence number between the packet sequence number and the previous packet sequence number. The packet sequence numbers between the packet sequence number and the previous packet sequence number are determined as incoherent packet sequence numbers in the second packet sequence number array.

[0026] Optionally, the step 2) specifically includes:

[0027] If the packet sequence number wrap-up number is greater than or equal to the sampling frequency, then:

[0028] According to the index order, for the packet number in the first packet number array, determine whether its value is equal to 0 or less than the previous packet number value. If so, jump to step 2.1). If not, jump to step 2.2).

[0029] Step 2.1): Determine that the packet sequence number is the minimum packet sequence number of valid data in the first packet sequence number array, intercept the minimum packet sequence number of valid data in the first packet sequence number array and all data thereafter to form an intermediate packet sequence number array, and intercept the data corresponding to the minimum packet sequence number of valid data in the first packet sequence number array and all data thereafter in the first initial state byte array according to the index to form an intermediate state byte array;

[0030] Determine the packet sequence number in the intermediate packet sequence number array in index order, and determine whether its value is greater than or equal to the number of valid bytes of the packet sequence number. If so, determine that the packet sequence number is the maximum packet sequence number with valid data in the first packet sequence number array. If so, determine that the previous packet sequence number is the maximum packet sequence number with valid data in the first packet sequence number array. Intercept the maximum packet sequence number with valid data and all data before it in the intermediate packet sequence number to obtain a second packet sequence number array. Intercept the status bytes corresponding to each sequence number in the second packet sequence number array in the intermediate status byte array to form a second status byte array corresponding to the second packet sequence number array. If not, use the intermediate packet sequence number array and the intermediate status byte array for splicing with multiple packet data at the next moment.

[0031] Step 2.2): Determine whether the first packet sequence number in the first packet sequence number array is the smallest value in the first packet sequence number array. If so, determine the packet sequence number in the first packet sequence number array in index order, and determine whether its value is greater than or equal to the number of valid bytes of the packet sequence number. If so, determine that the packet sequence number is the maximum packet sequence number of valid data in the first packet sequence number array. If so, determine that the previous packet sequence number is the maximum packet sequence number of valid data in the first packet sequence number array. Intercept the maximum packet sequence number of valid data and all data before it in the first packet sequence number array to obtain a second packet sequence number array. Intercept the status bytes corresponding to each sequence number in the second packet sequence number array in the first status byte array to form a second status byte array corresponding to the second packet sequence number array. If not, use the first packet sequence number array and the first status byte array for splicing with multiple packet data at the next moment.

[0032] If the packet sequence number wrap-up number is less than the sampling frequency, then:

[0033] Reverse the first packet sequence number array and the first status byte array to obtain an initial packet sequence number inverse array and an initial status byte inverse array, determine the packet sequence number in the initial packet sequence number inverse array in index order, and if its value is equal to the number of valid bytes of the packet sequence number or greater than the value of the previous packet sequence number, determine it as the maximum packet sequence number in the first packet sequence number array, intercept the maximum packet sequence number in the initial packet sequence number inverse array and all data after it to form an intermediate packet sequence number inverse array, and intercept the data corresponding to the maximum packet sequence number in the initial packet sequence number inverse array and all data after it in the initial status byte inverse array according to the index to form an intermediate status byte inverse array;

[0034] Determine the packet sequence number in the intermediate packet sequence number inverse array in index order. If the packet sequence number is greater than the previous packet sequence number, determine that the previous packet sequence number is the minimum packet sequence number in the first packet sequence number array. Execute the data corresponding to the minimum packet sequence number in the intermediate packet sequence number inverse array and all preceding data to form a final packet sequence number inverse array. Execute the data corresponding to the minimum packet sequence number in the intermediate packet sequence number inverse array and all preceding data to form a final status byte inverse array according to the index.

[0035] The final packet sequence number inverse array and the final status byte inverse array are inverted respectively to obtain a second packet sequence number array and its corresponding second status byte array.

[0036] Optionally, in step 1), receiving multi-packet data transmitted by the lower computer specifically includes:

[0037] Receive the multi-packet data transmitted by the lower computer at the current moment, and splice it with the multi-packet data remaining after receiving and processing at the previous moment.

[0038] As a general inventive concept, the present invention also provides a device for implementing the above-mentioned inertial navigation communication data processing method, comprising:

[0039] A receiving module is used to receive multiple packets of data transmitted by the lower computer, obtain the packet sequence number and the corresponding status byte of each packet of data in the multiple packets of data in the order of reception, and form a first packet sequence number array and a first status byte array corresponding thereto;

[0040] an interception module, configured to find the minimum valid data packet sequence number and the maximum valid data packet sequence number in the first packet sequence number array, intercept the minimum valid data packet sequence number and all packet sequence numbers between the minimum valid data packet sequence number and the maximum valid data packet sequence number to form a second packet sequence number array, and intercept the status bytes corresponding to the respective sequence numbers in the second packet sequence number array in the first status byte array to form a second status byte array corresponding to the second packet sequence number array;

[0041] a screening module, configured to screen out incoherent packet sequence numbers in the second packet sequence number array to form an incoherent array;

[0042] The reassembly module sequentially treats numbers 0-N as a data block, with each L number being a data block, where N is the number of valid bytes in the packet sequence number and L is the length of the complete parsed byte. For each data item in the incoherent array, the module determines in which data block the data item is located, determines and deletes the packet sequence number subarray corresponding to the data block in the second packet sequence number array, determines and deletes the status byte subarray corresponding to the packet sequence number subarray in the second status byte array, replaces the deleted packet sequence number subarray position in the second packet sequence number array with the data block, and replaces the deleted status byte subarray position in the second status byte array with L zeros.

[0043] As a general inventive concept, the present invention further provides an electronic device, comprising:

[0044] memory for storing computer programs;

[0045] A processor is configured to implement the steps of the above-mentioned inertial navigation communication data processing method when executing the computer program.

[0046] As a general inventive concept, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-mentioned inertial navigation communication data processing method when executed by a processor.

[0047] Compared with the prior art, the advantages of the present invention are:

[0048] The inertial navigation communication data processing method of the present invention divides the valid packet sequence number range into data blocks according to the complete parsing byte length, screens incoherent packet sequence numbers in multi-packet data transmitted by a lower computer, deletes all packet sequence numbers and status bytes contained in the data blocks where the incoherent packet sequence numbers are located in the transmitted data, and fills in the corresponding complete data blocks at the deleted packet sequence number positions, and fills in the deleted status byte positions with multiple zeros equal to the complete parsing byte length, thereby realizing dynamic compensation for packet loss and data reorganization, enabling the upper computer to parse data packet by packet in real time and accurately, thereby improving system performance and reliability in complex communication scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to make the present invention more easily understood, the present invention will be described in more detail with reference to the specific embodiments shown in the accompanying drawings. These drawings only depict typical embodiments of the present invention and should not be considered as limiting the scope of protection of the present invention.

[0050] Figure 1 This is a flow chart of the inertial navigation communication data processing method of the present invention.

[0051] Figure 2 This is a schematic diagram of finding the head sequence number according to embodiment 1 of the present invention.

[0052] Figure 3 This is a schematic diagram of finding the tail sequence number according to embodiment 1 of the present invention.

[0053] Figure 4 A schematic diagram of finding discontinuous sequence numbers according to embodiment 1 of the present invention.

[0054] Figure 5 This is a schematic diagram of replacing all status bytes of data blocks with incoherent sequence numbers with 0s in embodiment 1 of the present invention.

[0055] Figure 6 This is a schematic diagram of obtaining completely processed status byte data according to Example 1 of the present invention. DETAILED DESCRIPTION

[0056] The following describes the embodiments of the present invention with reference to the accompanying drawings so that those skilled in the art can better understand the present invention and implement it. However, the enumerated embodiments are not intended to limit the present invention. Unless there is a conflict, the following embodiments and the technical features in the embodiments can be combined with each other, wherein the same components are represented by the same figure marks.

[0057] Example 1:

[0058] A method for processing inertial navigation communication data, comprising the following steps:

[0059] 1) Receive the multi-packet data transmitted by the lower computer at the current moment, and splice it with the multi-packet data remaining after receiving and processing at the previous moment, obtain the packet sequence number and its corresponding status byte of each packet in the multi-packet data in the order of reception, and form the first packet sequence number array and its corresponding first status byte array.

[0060] 2) Find the minimum valid data packet sequence number and the maximum valid data packet sequence number in the first packet sequence number array, intercept the two and all packet sequence numbers between them to form a second packet sequence number array, intercept the status bytes corresponding to each sequence number in the second packet sequence number array in the first status byte array, and form a second status byte array corresponding to the second packet sequence number array; the specific process is as follows:

[0061] If the packet sequence number wrap-up number is greater than or equal to the sampling frequency, then:

[0062] According to the index order, for the packet number in the first packet number array, determine whether its value is equal to 0 or less than the previous packet number value. If so, jump to step 2.1). If not, jump to step 2.2).

[0063] Step 2.1): Determine that the packet sequence number is the minimum packet sequence number of valid data in the first packet sequence number array, intercept the minimum packet sequence number of valid data in the first packet sequence number array and all data thereafter to form an intermediate packet sequence number array, and intercept the data corresponding to the minimum packet sequence number of valid data in the first packet sequence number array and all data thereafter in the first initial state byte array according to the index to form an intermediate state byte array;

[0064] Determine the packet sequence number in the intermediate packet sequence number array in index order, and determine whether its value is greater than or equal to the number of valid bytes of the packet sequence number. If so, determine that the packet sequence number is the maximum packet sequence number with valid data in the first packet sequence number array. If so, determine that the previous packet sequence number is the maximum packet sequence number with valid data in the first packet sequence number array. Intercept the maximum packet sequence number with valid data and all data before it in the intermediate packet sequence number to obtain a second packet sequence number array. Intercept the status bytes corresponding to each sequence number in the second packet sequence number array in the intermediate status byte array to form a second status byte array corresponding to the second packet sequence number array. If not, use the intermediate packet sequence number array and the intermediate status byte array for splicing with multiple packet data at the next moment.

[0065] Step 2.2): Determine whether the first packet sequence number in the first packet sequence number array is the smallest value in the first packet sequence number array. If so, determine the packet sequence number in the first packet sequence number array in index order, and determine whether its value is greater than or equal to the number of valid bytes of the packet sequence number. If so, determine that the packet sequence number is the maximum packet sequence number of valid data in the first packet sequence number array. If so, determine that the previous packet sequence number is the maximum packet sequence number of valid data in the first packet sequence number array. Intercept the maximum packet sequence number of valid data and all data before it in the first packet sequence number array to obtain a second packet sequence number array, intercept the status bytes corresponding to each sequence number in the second packet sequence number array in the first status byte array, and form a second status byte array corresponding to the second packet sequence number array; if not, use the first packet sequence number array and the first status byte array for splicing with multiple packet data at the next moment.

[0066] If the packet sequence number wrap-up number is less than the sampling frequency, then:

[0067] Reverse the first packet sequence number array and the first status byte array to obtain an initial packet sequence number inverse array and an initial status byte inverse array, determine the packet sequence number in the initial packet sequence number inverse array in index order, and if its value is equal to the number of valid bytes of the packet sequence number or greater than the value of the previous packet sequence number, determine it as the maximum packet sequence number in the first packet sequence number array, intercept the maximum packet sequence number in the initial packet sequence number inverse array and all data after it to form an intermediate packet sequence number inverse array, and intercept the data corresponding to the maximum packet sequence number in the initial packet sequence number inverse array and all data after it in the initial status byte inverse array according to the index to form an intermediate status byte inverse array;

[0068] Determine the packet sequence number in the intermediate packet sequence number inverse array in index order. If the packet sequence number is greater than the previous packet sequence number, determine that the previous packet sequence number is the minimum packet sequence number in the first packet sequence number array. Execute the data corresponding to the minimum packet sequence number in the intermediate packet sequence number inverse array and all preceding data to form a final packet sequence number inverse array. Execute the data corresponding to the minimum packet sequence number in the intermediate packet sequence number inverse array and all preceding data to form a final status byte inverse array according to the index.

[0069] The final packet sequence number inverse array and the final status byte inverse array are inverted respectively to obtain a second packet sequence number array and its corresponding second status byte array.

[0070] 3) Filter out the incoherent packet sequence numbers in the second packet sequence number array to form an incoherent array; the specific process is as follows:

[0071] For each packet sequence number in the second packet sequence number array, subtract the packet sequence number sorted before it from the packet sequence number, and determine whether the resulting value is equal to 1. If so, jump to the next packet sequence number. If not, subtract the packet sequence number sorted before it from the packet sequence number, subtract 1 from the resulting value, and obtain the number M of packet sequence numbers between the packet sequence number and the previous packet sequence number. The packet sequence number is incremented by 1 M times in a cycle, and the value obtained by incrementing by 1 each time is the packet sequence number between the packet sequence number and the previous packet sequence number. The packet sequence numbers between the packet sequence number and the previous packet sequence number are determined as incoherent packet sequence numbers in the second packet sequence number array.

[0072] 4) Sequentially treat the numbers 0-N, with each L number representing a data block, where N is the number of valid bytes in the packet sequence number and L is the length of the fully parsed bytes. For each data item in the incoherent array, determine which data block the data item is located in. Determine and delete the packet sequence number subarray corresponding to the data item in the second packet sequence number array. Determine and delete the status byte subarray corresponding to the packet sequence number subarray in the second status byte array. Replace the deleted packet sequence number subarray position in the second packet sequence number array with the data item, and replace the deleted status byte subarray position in the second status byte array with L zeros. Furthermore, assign a dummy variable to each data block. After executing step 4) for a data item in the incoherent array, set the dummy variable for the data block corresponding to the data item to true. After determining which data block the next data item in the incoherent array is located in, determine whether the dummy variable for the data block in which the next data item is located is true. If so, jump to the next data item in the incoherent array.

[0073] The process of determining the packet sequence number subarray corresponding to the data block in the second packet sequence number array is as follows:

[0074] According to the first data of the data block, search the second packet sequence number array for data that is equal to the first data, or greater than the first data and closest to the first data in value, and determine it as the first data of the packet sequence number subarray corresponding to the data block.

[0075] According to the tail data of the data block, searching the second packet sequence number array for data that is equal to the tail data, or smaller than the tail data and closest in value to the tail data, and determining it as the tail data of the packet sequence number subarray corresponding to the data block,

[0076] An array consisting of the first data, the last data, and the data therebetween of the packet sequence number subarray corresponding to the data block in the second packet sequence number array is determined as the packet sequence number subarray corresponding to the data block in the second packet sequence number array.

[0077] The process of determining the status byte subarray corresponding to the packet sequence number subarray in the second status byte array is as follows:

[0078] According to the index of the first data of the packet sequence number subarray in the second packet sequence number array, search the data corresponding to the index in the second status byte array and determine it as the first data of the status byte subarray,

[0079] According to the index of the tail data of the packet sequence number subarray in the second packet sequence number array, search the data corresponding to the index in the second status byte array to determine it as the tail data of the status byte subarray,

[0080] An array consisting of the first data, the last data, and the data therebetween of the status byte subarray in the second status byte array is determined as the status byte subarray in the second status byte array corresponding to the packet sequence number subarray.

[0081] The following is a process of processing a company's inertial navigation communication data using the present invention:

[0082] The communication protocol of a company's inertial navigation lower computer is shown in Table 1 and Table 2:

[0083] Table 1 Gyro plus table 1KHz sampling data frame

[0084]

[0085] Table 2 Definition of time stamp remainder and status data

[0086]

[0087] The data shown in Table 1 needs to be parsed. The data represented by bytes 3-20 can be parsed one packet at a time. 1000 packets of data can be parsed in 1 second. The processing of status byte 21 in Table 1 is shown in Table 2. The status byte is only one byte, and the data listed in Table 2 are all double types, so 8 bytes (i.e., 8 packets of data) are required to parse one data. Since the sampling time is 1ms, it can be directly determined that when the packet sequence number is 0-7, the status bytes of these 8 packets of data can be parsed to obtain the data of difference frequency X. When the sequence number is 8-15, these 8 packets of data can be parsed to obtain the data of difference frequency Y, and so on.

[0088] However, when parsing the data, we must consider three issues:

[0089] Question 1: If packet loss occurs during data transmission, how should the data be handled?

[0090] Question 2: The pulse data of the gyro and addition table in Table 1 must be displayed on the same screen as the difference frequency and other data in Table 2. This means that the analysis must start from sequence number 0. However, the data is not necessarily transmitted from 0 during the communication process, so data splicing is required to find the number of valid bytes from sequence number 0 to the packet sequence number.

[0091] Question 3: Based on the situation in Question 2, we need to consider how to handle the data if packet loss occurs during the process of finding 0-valid byte number of packet sequence number, or if 0 or valid byte number of packet sequence number is lost.

[0092] like Figure 1 As shown, the inertial navigation communication data processing process of this embodiment is as follows (as shown in Table 2, the number of valid bytes of the packet sequence number in this embodiment is 269):

[0093] 1. If the data sequence number is from 0 to 9999, it will wrap to 0 if it exceeds 9999;

[0094] 2. Get 1000 (sampling frequency) packets of data per second;

[0095] 3. Get the sequence number and corresponding status byte in each packet of data;

[0096] 4. Splice with the remaining data of the previous group of 1000 packets;

[0097] 5. Poll the spliced ​​sequence number, determine if the sequence number is equal to 0 or the current value is less than the previous value, and take its index 1 (this step is to find the head of the sequence number 0-269 and exclude the case of data transmission packet loss sequence number 0), such as Figure 2 As shown, record whether any of the above conditions are met, which is marked as satisfied 1;

[0098] 6. If "Satisfy 1" = True, then intercept the data from index 1 and after that, and then poll the data after index 1. When the sequence number is greater than 269, the polling stops and the index 2 at the time of stopping is obtained, such as Figure 3 As shown, the data before index 2 is intercepted, and the status byte data group corresponding to the sequence number is also intercepted according to the position of index 1 and index 2, and subsequent operations are performed;

[0099] 7. As described in step 6, if "Satisfy 1" = True, but there is no sequence number greater than 269, then no subsequent calculation is performed, and all data after index 1 are used for splicing calculation with the next packet of data;

[0100] 8. If "Satisfy 1" = False, determine whether the minimum value in the concatenated sequence number is the first element. If so, then "Satisfy 2" = True. Since 1000 packets of data are processed each time, if the first element is greater than 0, then there must be a value greater than 269 in these 1000 packets of data, and index 2 can be obtained. Then, intercept from the first element of the concatenated sequence number data to the index 2 position, and then perform subsequent operations;

[0101] 9. If "Satisfy 1" = False and "Satisfy 2" = False, then directly transfer all the spliced ​​sequence number arrays and splice them with the next group of 1000 packets of data until step 7 occurs. After step 7 is executed and then spliced ​​with the next group of 1000 packets of data, the situation in step 6 will occur;

[0102] 10. So far, the sequence number has intercepted the data segment 0-999, a total of 1000 packets of data. If packet loss occurs, there will be less than 1000 packets of data. At the same time, the corresponding status byte data is intercepted with the above index, and the sequence number and the status byte correspond one to one;

[0103] 11. According to the intercepted 0-999 data segment, if the current value minus the previous value is not 1, it means that the data is incoherent and packet loss has occurred, and the sequence numbers of all incoherent data are obtained, such as Figure 4 As shown;

[0104] 12. Take every 8 numbers of the sequence number as a data block, and detect which data blocks the incoherent data sequence numbers are in. If an incoherent data sequence number appears in a data block, replace all the status byte data corresponding to the sequence number data block with 0. Figure 4 Take the lost sequence numbers 52 and 53 as an example, they are in the data block 48-55. Figure 5 After completing this step, the data block 48..55 is padded and the status byte corresponding to the data block is replaced with 0.

[0105] 13. Since a total of 36 data need to be parsed (the complete parsed byte length of the first 33 data is 8, and the complete parsed byte length of the last 3 data is 2), an array is initialized, which contains 36 false variables. Taking the serial number data block 0-7 as an example, if the serial numbers are 1, 2, 3, 5, 7, and 0, 4, and 6 are lost, then you must first find the head and tail of this segment, which are 1 and 7 (first start searching descendingly from 7 and find that the index corresponding to 7 is 4, then search ascending from 0. Since 0 does not exist, search for 1, and the index corresponding to 1 is 0. Using 4-0+1=5, you can get a total of 5 data in this data block, with the head being 1 and the tail being 5). Then use the array deletion function to delete a total of 5 data starting from serial number 1, and then initialize 8 0s to fill in this position, and the serial numbers are filled in to 0-7. Since 0-7 is the 0th data block, the 0th false variable is set to true after processing it once in this data block. If the next incoherent data is still in this data block, the above operation will not be performed because the variable is true;

[0106] 14. Finally, we can get a complete set of 270 serial numbers from 0 to 269 and their corresponding status bytes, and the status bytes of the data blocks where the data is lost are all set to 0, such as Figure 6As shown, it can be seen that the sequence number corresponding to the sequence number index 260 after processing is also 260;

[0107] 15. Then, according to Table 2, intercept the first 264 bytes and convert every 8 bytes into double data for parsing and display, thus obtaining 33 double data.

[0108] 16. Since the serial number is 0-10000, the data in Table 2 will be refreshed every 10 seconds.

[0109] Example 2:

[0110] This embodiment provides a device for implementing the inertial navigation communication data processing method of embodiment 1, including:

[0111] A receiving module is used to receive multiple packets of data transmitted by the lower computer, obtain the packet sequence number and the corresponding status byte of each packet of data in the multiple packets of data in the order of reception, and form a first packet sequence number array and a first status byte array corresponding thereto;

[0112] an interception module, configured to find the minimum valid data packet sequence number and the maximum valid data packet sequence number in the first packet sequence number array, intercept the minimum valid data packet sequence number and all packet sequence numbers between the minimum valid data packet sequence number and the maximum valid data packet sequence number to form a second packet sequence number array, and intercept the status bytes corresponding to the respective sequence numbers in the second packet sequence number array in the first status byte array to form a second status byte array corresponding to the second packet sequence number array;

[0113] a screening module, configured to screen out incoherent packet sequence numbers in the second packet sequence number array to form an incoherent array;

[0114] The reassembly module sequentially treats numbers 0-N as a data block, with each L number being a data block, where N is the number of valid bytes in the packet sequence number and L is the length of the complete parsed byte. For each data item in the incoherent array, the module determines in which data block the data item is located, determines and deletes the packet sequence number subarray corresponding to the data block in the second packet sequence number array, determines and deletes the status byte subarray corresponding to the packet sequence number subarray in the second status byte array, replaces the deleted packet sequence number subarray position in the second packet sequence number array with the data block, and replaces the deleted status byte subarray position in the second status byte array with L zeros.

[0115] Example 3:

[0116] This embodiment provides an electronic device, including:

[0117] memory for storing computer programs;

[0118] The processor is configured to implement the steps of the inertial navigation communication data processing method of embodiment 1 when executing the computer program.

[0119] Example 4:

[0120] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the inertial navigation communication data processing method of embodiment 1 are implemented.

Claims

1. A method for processing inertial navigation communication data, characterized in that: The following steps are involved: 1) Receive multiple packets of data transmitted by the lower computer, obtain the packet sequence number and the corresponding status byte of each packet in the multiple packets in the order of reception, and form the first packet sequence number array and the corresponding first status byte array; 2) Find the minimum valid data packet sequence number and the maximum valid data packet sequence number in the first packet sequence number array, intercept the minimum valid data packet sequence number and all packet sequence numbers between the minimum valid data packet sequence number and the maximum valid data packet sequence number to form a second packet sequence number array, intercept the status bytes corresponding to each sequence number in the second packet sequence number array in the first status byte array to form a second status byte array corresponding to the second packet sequence number array; 3) Filter out the incoherent packet sequence numbers in the second packet sequence number array to form an incoherent array; 4) Sequentially treat the numbers 0-N as a data block, with each L number representing a data block, where N is the number of valid bytes in the packet sequence number and L is the complete parsed byte length; for each data item in the incoherent array, determine in which data block the data item is located, determine and delete the packet sequence number subarray corresponding to the data block in the second packet sequence number array, and determine and delete the status byte subarray corresponding to the packet sequence number subarray in the second status byte array, then replace the deleted packet sequence number subarray position in the second packet sequence number array with the data block, and replace the deleted status byte subarray position in the second status byte array with L zeros; In step 4), the process of determining the packet sequence number subarray corresponding to the data block in the second packet sequence number array is as follows: According to the first data of the data block, search the second packet sequence number array for data that is equal to the first data, or greater than the first data and closest to the first data in value, and determine it as the first data of the packet sequence number subarray corresponding to the data block. According to the tail data of the data block, searching the second packet sequence number array for data that is equal to the tail data, or smaller than the tail data and closest in value to the tail data, and determining it as the tail data of the packet sequence number subarray corresponding to the data block, An array consisting of the first data, the last data, and the data therebetween of the packet sequence number subarray corresponding to the data block in the second packet sequence number array is determined as the packet sequence number subarray corresponding to the data block in the second packet sequence number array.

2. The inertial navigation communication data processing method according to claim 1, characterized in that: In step 4), the process of determining the status byte subarray corresponding to the packet sequence number subarray in the second status byte array is as follows: According to the index of the first data of the packet sequence number subarray in the second packet sequence number array, search the data corresponding to the index in the second status byte array and determine it as the first data of the status byte subarray, According to the index of the tail data of the packet sequence number subarray in the second packet sequence number array, search the data corresponding to the index in the second status byte array to determine it as the tail data of the status byte subarray, An array consisting of the first data, the last data, and the data therebetween of the status byte subarray in the second status byte array is determined as the status byte subarray in the second status byte array corresponding to the packet sequence number subarray.

3. The inertial navigation communication data processing method according to claim 1 or 2, characterized in that: The step 4) further includes: Assign a false variable to each data block. After executing step 4) for a certain data in the incoherent array, set the false variable of the data block corresponding to the data to true. After determining which data block the next data in the incoherent array is located in, determine whether the false variable of the data block where the next data is located is true. If so, jump to the next data in the incoherent array.

4. The inertial navigation communication data processing method according to claim 1 or 2, characterized in that: The step 3) specifically includes: For each packet sequence number in the second packet sequence number array, subtract the packet sequence number sorted before it from the packet sequence number, and determine whether the resulting value is equal to 1. If so, jump to the next packet sequence number. If not, subtract the packet sequence number sorted before it from the packet sequence number, subtract 1 from the resulting value, and obtain the number M of packet sequence numbers between the packet sequence number and the previous packet sequence number. The packet sequence number is incremented by 1 M times in a cycle, and the value obtained by incrementing by 1 each time is the packet sequence number between the packet sequence number and the previous packet sequence number. The packet sequence numbers between the packet sequence number and the previous packet sequence number are determined as incoherent packet sequence numbers in the second packet sequence number array.

5. The inertial navigation communication data processing method according to claim 1 or 2, characterized in that: The step 2) specifically includes: If the packet sequence number wrap-up number is greater than or equal to the sampling frequency, then: According to the index order, for the packet number in the first packet number array, determine whether its value is equal to 0 or less than the previous packet number value. If so, jump to step 2.1). If not, jump to step 2.2). Step 2.1): Determine that the packet sequence number is the minimum packet sequence number of valid data in the first packet sequence number array, intercept the minimum packet sequence number of valid data in the first packet sequence number array and all data thereafter to form an intermediate packet sequence number array, and intercept the data corresponding to the minimum packet sequence number of valid data in the first packet sequence number array and all data thereafter in the first initial state byte array according to the index to form an intermediate state byte array; Determine the packet sequence number in the intermediate packet sequence number array in index order, and determine whether its value is greater than or equal to the number of valid bytes of the packet sequence number. If so, determine that the packet sequence number is the maximum packet sequence number with valid data in the first packet sequence number array. If so, determine that the previous packet sequence number is the maximum packet sequence number with valid data in the first packet sequence number array. Intercept the maximum packet sequence number with valid data and all data before it in the intermediate packet sequence number to obtain a second packet sequence number array. Intercept the status bytes corresponding to each sequence number in the second packet sequence number array in the intermediate status byte array to form a second status byte array corresponding to the second packet sequence number array. If not, use the intermediate packet sequence number array and the intermediate status byte array for splicing with multiple packet data at the next moment. Step 2.2): Determine whether the first packet sequence number in the first packet sequence number array is the smallest value in the first packet sequence number array. If so, determine the packet sequence number in the first packet sequence number array in index order, and determine whether its value is greater than or equal to the number of valid bytes of the packet sequence number. If so, determine that the packet sequence number is the maximum packet sequence number of valid data in the first packet sequence number array. If so, determine that the previous packet sequence number is the maximum packet sequence number of valid data in the first packet sequence number array. Intercept the maximum packet sequence number of valid data and all data before it in the first packet sequence number array to obtain a second packet sequence number array. Intercept the status bytes corresponding to each sequence number in the second packet sequence number array in the first status byte array to form a second status byte array corresponding to the second packet sequence number array. If not, use the first packet sequence number array and the first status byte array for splicing with multiple packet data at the next moment. If the packet sequence number wrap-up number is less than the sampling frequency, then: Reverse the first packet sequence number array and the first status byte array to obtain an initial packet sequence number inverse array and an initial status byte inverse array, determine the packet sequence number in the initial packet sequence number inverse array in index order, and if its value is equal to the number of valid bytes of the packet sequence number or greater than the value of the previous packet sequence number, determine it as the maximum packet sequence number in the first packet sequence number array, intercept the maximum packet sequence number in the initial packet sequence number inverse array and all data after it to form an intermediate packet sequence number inverse array, and intercept the data corresponding to the maximum packet sequence number in the initial packet sequence number inverse array and all data after it in the initial status byte inverse array according to the index to form an intermediate status byte inverse array; Determine the packet sequence number in the intermediate packet sequence number inverse array in index order. If the packet sequence number is greater than the previous packet sequence number, determine that the previous packet sequence number is the minimum packet sequence number in the first packet sequence number array. Execute the data corresponding to the minimum packet sequence number in the intermediate packet sequence number inverse array and all preceding data to form a final packet sequence number inverse array. Execute the data corresponding to the minimum packet sequence number in the intermediate packet sequence number inverse array and all preceding data to form a final status byte inverse array according to the index. The final packet sequence number inverse array and the final status byte inverse array are inverted respectively to obtain a second packet sequence number array and its corresponding second status byte array.

6. The inertial navigation communication data processing method according to claim 1 or 2, characterized in that: In step 1), receiving the multi-packet data transmitted by the lower computer specifically includes: Receive the multi-packet data transmitted by the lower computer at the current moment, and splice it with the multi-packet data remaining after receiving and processing at the previous moment.

7. A device for implementing the inertial navigation communication data processing method according to any one of claims 1 to 6, characterized in that: include: A receiving module is used to receive multiple packets of data transmitted by the lower computer, obtain the packet sequence number and the corresponding status byte of each packet of data in the multiple packets of data in the order of reception, and form a first packet sequence number array and a first status byte array corresponding thereto; an interception module, configured to find the minimum valid data packet sequence number and the maximum valid data packet sequence number in the first packet sequence number array, intercept the minimum valid data packet sequence number and all packet sequence numbers between the minimum valid data packet sequence number and the maximum valid data packet sequence number to form a second packet sequence number array, and intercept the status bytes corresponding to the respective sequence numbers in the second packet sequence number array in the first status byte array to form a second status byte array corresponding to the second packet sequence number array; a screening module, configured to screen out incoherent packet sequence numbers in the second packet sequence number array to form an incoherent array; The reassembly module sequentially treats numbers 0-N as a data block, with each L number being a data block, where N is the number of valid bytes in the packet sequence number and L is the length of the complete parsed byte. For each data item in the incoherent array, the module determines in which data block the data item is located, determines and deletes the packet sequence number subarray corresponding to the data block in the second packet sequence number array, determines and deletes the status byte subarray corresponding to the packet sequence number subarray in the second status byte array, replaces the deleted packet sequence number subarray position in the second packet sequence number array with the data block, and replaces the deleted status byte subarray position in the second status byte array with L zeros.

8. An electronic device, characterized in that: The electronic device comprises: memory for storing computer programs; A processor, configured to implement the steps of the inertial navigation communication data processing method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the inertial navigation communication data processing method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Fragmented frame recombination method and device

    CN114584560A

  • Device and method for sending a sequence of data packets and decoder and device for decoding a sequence of data packets

    WO2008113455A1