A data playback method for a reconnaissance and attack integrated unmanned aerial vehicle based on a data cache slice
Patent Information
- Application Number
- CN202511681561.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2045-11-17
AI Technical Summary
[0004]本发明旨在提供一种基于数据缓存片的察打一体无人机数据回放方法,以解决上述传统无人机的数据回放系统采用分散式存储存在的问题
1、实时数据记录和回放:本发明基于数据缓存片的数据回放能够通过数据实时接收的先后顺序对无人机的各项数据进行实时回放。由此,用户可以在任何时间点捕获到无人机的实时数据,并在需要时进行快速、准确的回放。
Smart Images

Figure CN121681482B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of UAV data playback technology, and more specifically, to a data playback method for reconnaissance and strike UAVs based on data buffers. Background Technology
[0002] Large unmanned aerial vehicles (UAVs) generate massive amounts of data during actual flights, including flight status, payload information, and other data. These large UAVs possess advantages such as long endurance, high payload capacity, and wide flight range, and are widely used in both military and civilian fields. The data includes information generated by remote sensing, remote control, data links, and ground control station software, and is crucial for flight status monitoring, flight control, mission planning, and fault analysis.
[0003] Traditional drone data playback systems employ a distributed storage approach, storing data on different devices and then playing it back using specific playback software. This approach has the following drawbacks: 1. The data record file format is complex and requires specialized software for parsing; 2. Data playback does not support real-time synchronization or the synchronization process is extremely cumbersome; 3. Data management is difficult and query efficiency is low. Summary of the Invention
[0004] The present invention aims to provide a data playback method for reconnaissance and strike UAVs based on data cache slices, so as to solve the problems of the distributed storage in the traditional UAV data playback system.
[0005] This invention provides a data playback method for reconnaissance and strike unmanned aerial vehicles (UAVs) based on data cache slices, comprising: The configuration file parsing module reads and parses the configuration file; the configuration information in the configuration file includes the unique number of the UAV data and the corresponding communication method and communication parameters; as well as the file extension of the data record file based on the data cache; the UAV data is stored in the data cache. The file scanning module scans and records files based on the parsed file extensions. The file parsing module parses the data cache fragments from the scanned data record files; The data playback module parses the drone data from the data cache. The communication module transmits the parsed UAV data through the communication link according to the communication method and communication parameters corresponding to its unique number.
[0006] In a preferred embodiment, the data record file based on the data cache slice consists of one or more data cache slices, and the file format is binary.
[0007] In a preferred embodiment, each data cache slice consists of three fields: timestamp, cache data length, and data area; The timestamp is the arrival time of the first frame of data in the data buffer. The cached data length indicates the length of the data area; The data area identifier contains the size of the data frames, which consist of one or more frames of UAV data. Each frame of UAV data in the data area must provide a unique data frame number, the data frame source code length, and the data frame source code.
[0008] In a preferred embodiment, the configuration file stores one or more configuration information, and each type of UAV data is configured with one or more communication methods.
[0009] In a preferred embodiment, when the file parsing module parses the data cache fragments from the scanned data record files, it reads all data record files at once and then parses the data record files.
[0010] In a preferred embodiment, the file parsing module parses a data buffer from the scanned data record file, including: The data is parsed in units of data cache slices. After the data in the current data cache slice is parsed, the data in the next data cache slice is parsed, until the parsing of the current data record file is completed. After the data cache slices in the current data record file are parsed, the next data record file is parsed, until all scanned data record files are parsed.
[0011] In a preferred embodiment, the data playback module parses UAV data from the data cache, including: The timestamp of the first data buffer in each data record file is used as the base timestamp in each data playback file. The timestamps in the remaining data buffers in the current data record file are compared with the base timestamps to obtain the data time difference. If the data time difference is greater than 0, the current data playback module pauses for the duration corresponding to the data time difference until the data time difference is 0. Then, the data in the data area of the current data buffer is parsed frame by frame.
[0012] In a preferred embodiment, the step of parsing the data in the current data buffer frame by frame includes: First, read the first unique number of the data area in the data buffer, then read the data frame source code length field immediately following the unique number, then read the data frame source code, and finally send the parsed unique number and data frame source code to the communication module; parse the next unique number after the data frame source code, then parse the data frame length field and data frame source code... until all the UAV data in the current data buffer area has been parsed.
[0013] In a preferred embodiment, the data playback module plays back the UAV data parsed in the order in which the data was received.
[0014] In a preferred embodiment, the communication link provides functions for creating, initializing, receiving, sending, and releasing the communication link.
[0015] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: 1. Real-time data recording and playback: This invention, based on data buffers, enables real-time playback of various data from the drone according to the order in which the data is received. Therefore, users can capture real-time drone data at any point in time and perform fast and accurate playback when needed.
[0016] 2. Flexibility and Customization: This invention supports multiple communication methods (serial communication, TCP communication, UDP communication) and parameter configurations. Users can customize the data playback method as needed to adapt to different application scenarios and requirements, thereby meeting diverse data playback needs.
[0017] 3. Timeliness and Real-time Performance Guarantee: This invention can replay data in the order it is received, ensuring the timeliness and real-time performance of the data during playback. By controlling the data transmission rate, it can accurately simulate the real-time flight status of the drone, making the replayed data highly reliable and authentic.
[0018] 4. High Efficiency and Accuracy: The data playback process of this invention employs a binary format and a data buffer structure, enabling efficient storage and transmission of large amounts of data while ensuring data accuracy and integrity. This high efficiency and accuracy meet the high requirements of data playback, improving work efficiency and the accuracy of data analysis.
[0019] 5. Wide Applicability: This invention covers the entire process of UAV data playback and has high flexibility and customization capabilities, thus making it widely applicable. Various application scenarios in the UAV field, such as data monitoring, flight simulation, and training, can benefit from the technical advantages of this invention. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of a data playback method for reconnaissance and strike UAVs based on data buffers, provided by an embodiment of the present invention.
[0021] Figure 2 This is a flowchart illustrating a specific example of a data playback method for a reconnaissance and strike UAV based on a data cache chip, as provided in this embodiment of the invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0023] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0024] See Figure 1 This invention provides a data playback method for reconnaissance and strike unmanned aerial vehicles (UAVs) based on data cache slices. By replaying the UAV data after the fact using the data log files of the data cache slices, the method aims to restore the real-time data scene of the UAV. Specifically, it includes: S100, the configuration file parsing module reads and parses the configuration file; the configuration information in the configuration file includes the unique number of the UAV data and the corresponding communication method and communication parameters; and the file extension of the data record file based on the data cache; the UAV data is stored in the data cache; S200, the file scanning module scans and records files based on the parsed file extensions; S300, the file parsing module parses the data buffer from the scanned data record file; The S400 data playback module parses drone data from the data cache. The S500 communication module transmits the parsed UAV data through the communication link according to the communication method and parameters corresponding to its unique number.
[0025] The method of this invention can effectively enable flexible and efficient playback of real-time data from drones, and has significant application value.
[0026] The following details the specific implementation method of the above-mentioned data playback method for reconnaissance and strike UAVs based on data cache slices.
[0027] S100, the configuration file parsing module reads and parses the configuration file; the configuration information in the configuration file includes the unique number of the UAV data and the corresponding communication method and communication parameters; and the file extension of the data record file based on the data cache; the UAV data is stored in the data cache.
[0028] The structure of the data record file based on the data cache is as follows: A data log file based on a data cache consists of one or more data caches in binary format. Each data cache consists of three fields: timestamp, cached data length, and data area. One data cache can hold one or more frames of UAV data.
[0029] Timestamp: The timestamp of the arrival of the first frame of data in the data buffer, representing the timestamp of the arrival of drone data in the current data buffer. The timestamp consists of 7 fields: year, month, day, hour, minute, second, and millisecond. Cache data length: Identifies the length of the data area, in bytes.
[0030] Data Area: Identifies the size of the data frames to be contained, consisting of one or more frames of UAV data. Each frame of UAV data in the data area needs to provide a unique data frame number, data frame source code length, and data frame source code. Specifically, when the previous data frame is pushed into the data area of the data buffer, the unique data frame number is pushed first, followed by the data frame length, and finally the data frame source code.
[0031] In UAV data log files based on data caches, each UAV data item has a unique identifier. During UAV data playback, the parsed UAV data needs to be transmitted using the communication method corresponding to the unique identifier. Common communication methods include serial communication and network communication, with network communication further subdivided into TCP (Transmission Control Protocol) communication and UDP (User Datagram Protocol) communication.
[0032] When playing back drone data, each type of drone data and its corresponding communication method and communication parameters are written into the configuration file in advance. This provides the necessary communication parameters for creating each communication method. The drone data parsed from the data log file is then sent out using the configured communication method.
[0033] The configuration file can store one or more configuration information, and each type of UAV data can be configured with one or more communication methods. The configuration information includes: Unique ID: Must be the same as the unique ID in the data record file.
[0034] Data Name: A name used to identify the current drone data. This configuration item is optional.
[0035] Communication method: Indicates the communication method used for the current drone data.
[0036] Communication parameters: These are the communication parameters used to create the communication method. The parameters required for TCP communication include: destination address, port number, local address, and TCP type (client, server). The parameters required for UDP communication include: destination address, port number, local address, and UDP type (multicast, unicast, broadcast). The parameters required for serial communication include: serial port number, baud rate, data bits, parity bits, and stop bits. One or more local addresses can be used for communication.
[0037] The configuration file also stores the file extensions of the data log files, adapting to the file extensions of data logs from various drone models.
[0038] S200, the file scanning module scans data record files based on the parsed file extensions. According to the file extensions of the data record files in the configuration file, it scans for data record files with the target file extension, achieving efficient searching of data record files.
[0039] S300, the file parsing module parses data buffers from the scanned data record files. Preferably, all data record files are read at once before parsing, to speed up the file parsing process and avoid repeated reads from the disk. Since the structure of a data record file consists of one or more data buffers, data is parsed in units of data buffers, one buffer at a time. After the data in the current buffer is parsed, the data in the next buffer is parsed, until the parsing of the current data record file is completed; after the parsing of the data buffers in the current data record file is completed, the parsing of the next data record file is completed, until all scanned data record files have been parsed.
[0040] The S400's data playback module parses drone data from the data cache.
[0041] Based on the structure of the data buffer, the data in the data buffer transmitted by the file parsing module is parsed. To reconstruct the real-time flight status data of the UAV, the data playback module plays back the UAV data parsed in the order it was received.
[0042] The timestamp of the first data buffer in each data record file is used as the base timestamp in each data playback file. The timestamps in the remaining data buffers in the current data record file are compared with the base timestamps to obtain the data time difference. If the data time difference is greater than 0, the current data playback module pauses for the duration corresponding to the data time difference until the data time difference is 0. Then, the data in the data area of the current data buffer is parsed frame by frame.
[0043] First, read the first unique number of the data area in the data buffer, then read the data frame source code length field immediately following the unique number, then read the data frame source code, and finally send the parsed unique number and data frame source code to the communication module; parse the next unique number after the data frame source code, then parse the data frame length field and data frame source code... until all the UAV data in the current data buffer area has been parsed.
[0044] The S500 communication module transmits the parsed UAV data through the communication link according to the communication method and parameters corresponding to its unique number.
[0045] Based on the mapping relationship between the unique number and the communication method and parameters in the configuration file, upon receiving UAV data from the data playback module, the corresponding communication link is obtained according to the unique number of the UAV data, and the UAV data is sent out from the corresponding communication link. The communication link provides five functions: creation, initialization, receiving, sending, and release.
[0046] The method provided by this invention will bring about the following technical effects: 1. Real-time data recording and playback: This invention, based on data buffers, enables real-time playback of various data from the drone according to the order in which the data is received. Therefore, users can capture real-time drone data at any point in time and perform fast and accurate playback when needed.
[0047] 2. Flexibility and Customization: This invention supports multiple communication methods (serial communication, TCP communication, UDP communication) and parameter configurations. Users can customize the data playback method as needed to adapt to different application scenarios and requirements, thereby meeting diverse data playback needs.
[0048] 3. Timeliness and Real-time Performance Guarantee: This invention can replay data in the order it is received, ensuring the timeliness and real-time performance of the data during playback. By controlling the data transmission rate, it can accurately simulate the real-time flight status of the drone, making the replayed data highly reliable and authentic.
[0049] 4. High Efficiency and Accuracy: The data playback process of this invention employs a binary format and a data buffer structure, enabling efficient storage and transmission of large amounts of data while ensuring data accuracy and integrity. This high efficiency and accuracy meet the high requirements of data playback, improving work efficiency and the accuracy of data analysis.
[0050] 5. Wide Applicability: This invention covers the entire process of UAV data playback and has high flexibility and customization capabilities, thus making it widely applicable. Various application scenarios in the UAV field, such as data monitoring, flight simulation, and training, can benefit from the technical advantages of this invention.
[0051] The following is a specific example of the data playback method for reconnaissance and strike UAVs based on data cache slices: First, design the configuration file in advance. The TOML (Tom's Obvious, Minimal Language) syntax is used to configure the configuration file required for data playback. The configuration file content is shown in Table 3. The local machine address can be configured with one or more options; multiple file extensions can be configured for the data log files. Table 3 shows two file extensions for the data log files, separated by spaces. Numerical values are used in the configuration file to represent specific communication methods, as shown in Table 1. Serial communication parameter definitions are shown in Table 2. Table 3 demonstrates the configuration of parameters for four data communication methods.
[0052] Table 1, Specific Codes for Communication Method Types
[0053] Table 2, Serial Communication Parameter Codes
[0054] Table 3, Configuration Items in Configuration File
[0055] Then refer to Figure 2 The drone data is replayed through various functional modules.
[0056] Step 1: Create a configuration file parsing module.
[0057] Step 2: Use the configuration file parsing module to read the configuration file. If reading fails, proceed to step 20; otherwise, proceed to step 3.
[0058] Step 3: Create a file scanning module, and based on the file extensions of the data record files set in the current configuration file, parse and save the data record files that match the file extensions, then proceed to Step 4.
[0059] Step 4: Create a communication module. Based on the configuration of each communication method in the configuration file, create and initialize the communication link, and establish and save the mapping relationship between the unique number and the communication link. Then, proceed to Step 5.
[0060] Step 5: Create and initialize the file parsing module and the data playback module, then proceed to step 6.
[0061] Step 6: Determine the relationship between the total number of data record files parsed in Step 3 and the current parsed file index. If the current parsed file index (counting from zero) is greater than or equal to the total number of data record files, proceed to Step 18; otherwise, proceed to Step 7.
[0062] Step 7: After the file parsing module reads all the contents of the currently parsed data record file, it closes the data record file, increments the index of the currently parsed file by one, and then proceeds to step 8.
[0063] Step 8: The file parsing module begins parsing the data record file content, sets the initial value of the file content length counter to 0, and then proceeds to step 9.
[0064] Step 9: The file parsing module determines the relationship between the file content length counter and the file content length. If the file content length counter is greater than or equal to the file content length, proceed to step 7; otherwise, proceed to step 10.
[0065] Step 11: The file parsing module reads the timestamp field of the current data cache slice, then reads and parses the cache data length field immediately following the timestamp field. Next, based on the value of the cache data length field, it reads the content of the data area immediately following the cache data length field. Finally, the current file content length counter is incremented by the number of bytes in the timestamp field of the current data cache slice, the number of bytes in the cache data length field, and the number of bytes in the data area content. Proceed to step 12.
[0066] Step 12: The file parsing module determines whether the timestamp being parsed is the first timestamp of the current data record file. If so, the timestamp is saved to the base timestamp and then step 13 is executed; otherwise, step 13 is executed.
[0067] Step 13: The file parsing module passes the basic timestamp, current timestamp, and data area content to the data playback module, and then executes step 14.
[0068] Step 14: The data playback module subtracts the base timestamp from the current timestamp to obtain the data difference. If the data difference is greater than zero, the current data playback is paused for a period equal to the data time difference. The pause time ends when step 15 is executed. If the data time difference is equal to 0, step 15 is executed.
[0069] Step 15: The data playback module creates a data area length counter, sets the initial value to 0, and then executes step 16.
[0070] Step 16: Determine the difference between the data area length counter and the data area content length. If the data area length counter is greater than or equal to the data area content length, proceed to step 11; otherwise, proceed to step 17.
[0071] Step 17: The data playback module reads the unique identifier field of the data area, reads and parses the data frame length field, then reads the data frame source code content corresponding to the data frame length field. Next, it increments the data area length counter by the number of bytes in the unique identifier field, the number of bytes in the data frame length field, and the length of the data frame source code. Finally, it passes the read unique identifier and data frame source code to the communication module, executing step 18.
[0072] Step 18: The communication module obtains the communication link to which the current data needs to be sent based on the correspondence between the received unique number and the communication link. Finally, based on the communication link, the data frame source code is sent out from the communication link, and step 16 is executed.
[0073] Step 19: Release the data playback module, file scanning module, communication module, and file parsing module.
[0074] Step 20: Release the configuration file parsing module.
[0075] By following the steps above, real-time data from drones can be played back flexibly and efficiently.
[0076] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A data playback method for a data cache tile-based reconnaissance and attack integrated unmanned aerial vehicle, characterized in that, include: The configuration file parsing module reads and parses the configuration file; the configuration information in the configuration file includes the unique number of the UAV data and the corresponding communication method and communication parameters; as well as the file extension of the data record file based on the data cache; the UAV data is stored in the data cache. The file scanning module scans and records files based on the parsed file extensions. The file parsing module parses the data cache fragments from the scanned data record files; The data playback module parses the drone data from the data cache. The communication module transmits the parsed UAV data through the communication link according to the communication method and communication parameters corresponding to its unique number; Each data cache slice consists of three fields: timestamp, cached data length, and data area. The timestamp is the arrival time of the first frame of data in the data buffer. The cached data length indicates the length of the data area; The data area identifier contains the size of the data frame, which consists of one or more frames of UAV data; each frame of UAV data in the data area must provide a unique data frame number, data frame source code length, and data frame source code. The data playback module parses drone data from the data cache, including: The timestamp of the first data buffer in each data record file is used as the base timestamp in each data playback file. The timestamps in the remaining data buffers in the current data record file are compared with the base timestamps to obtain the data time difference. If the data time difference is greater than 0, the current data playback module pauses for the duration corresponding to the data time difference until the data time difference is 0. Then, the data in the data area of the current data buffer is parsed frame by frame.
2. The data playback method for reconnaissance and strike UAVs based on data buffers according to claim 1, characterized in that, A data record file based on a data cache consists of one or more data caches and is in binary format.
3. The data playback method for reconnaissance and strike UAVs based on data buffers according to claim 1, characterized in that, The configuration file stores one or more configuration information, and each type of drone data is configured with one or more communication methods.
4. The data playback method for reconnaissance and strike UAVs based on data buffer slices according to claim 1, characterized in that, When the file parsing module parses the data cache fragments from the scanned data record files, it reads all data record files at once and then parses the data record files.
5. The data playback method for reconnaissance and strike UAVs based on data buffers according to claim 1, characterized in that, The file parsing module parses data cache fragments from the scanned data record file, including: The data is parsed in units of data cache slices. After the data in the current data cache slice is parsed, the data in the next data cache slice is parsed, until the parsing of the current data record file is completed. After the data cache slices in the current data record file are parsed, the next data record file is parsed, until all scanned data record files are parsed.
6. The data playback method for reconnaissance and strike UAVs based on data buffers according to claim 1, characterized in that, The step of parsing the data in the current data buffer frame by frame includes: First, read the first unique number of the data area in the data buffer, then read the data frame source code length field immediately following the unique number, then read the data frame source code, and finally send the parsed unique number and data frame source code to the communication module; parse the next unique number after the data frame source code, then parse the data frame length field and data frame source code, until all the UAV data in the current data buffer area has been parsed.
7. The data playback method for reconnaissance and strike UAVs based on data buffers according to claim 1, characterized in that, The data playback module parses and plays back the UAV data in the order it was received.
8. The data playback method for reconnaissance and strike UAVs based on data buffer slices according to claim 1, characterized in that, The communication link provides functions for creating, initializing, receiving, sending, and releasing the communication link.
Citation Information
Patent Citations
Multi-sensor data file playback method, electronic equipment and storage medium
CN112988669A
Data playback method and device, vehicle and storage medium
CN114064750A