Unmanned aerial vehicle computer software data recording method, equipment and medium

Through dual FIFO design and Sector-sized byte cache, FIFO data is written alternately, which solves the problem of not having both data recording rate and test flight cost for drone flight data acquisition, and realizes high-speed and high real-time data recording, reducing test flight cost.

CN119847441APending Publication Date: 2025-04-18YITONG UAV SYST CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411965276.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

In the prior art, when collecting drone flight data, it is difficult to take into account the data recording rate and test flight costs, resulting in flight tuning difficulties and increased costs.

Method used

It adopts a dual FIFO design and Sector-sized byte cache to write FIFO data to the file system alternately, meeting the high speed and high real-time requirements of drone aircraft for data recording.

Benefits of technology

It realizes high speed and high real-time performance of drone flight data recording, reduces test flight costs, and solves the problem of inseparable data recording rate and test flight costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847441A_ABST
    Figure CN119847441A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data storage, and discloses an unmanned aerial vehicle computer software data recording method and device and a medium, and the method comprises the steps: applying for opening up two FIFO units with the same size from a system memory; creating three tasks, namely a first timed task, a second timed task and a real-time task; after the first timed task passes a timed time T1, writing data into one of the FIFO units; after the second timed task passes the timed time T2, sending a write-in instruction to the real-time task; the real-time task writes data of one FIFO unit into an external storage device; at the moment, the first timed task is switched to another FIFO unit to write data, and the second timed task is triggered; according to the invention, the requirements of high speed and high real-time performance of data recording when the unmanned aerial vehicle drives the aircraft are met, and the technical problem that the reduction of the data recording speed and the reduction of the test flight cost cannot be achieved at the same time when the flight data of the flying aircraft is collected is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data storage, and in particular to a method, device and medium for recording computer software data of an unmanned aerial vehicle. Background Art

[0002] The main function of the flight control computer of an unmanned aerial vehicle (hereinafter referred to as aircraft) is to collect and integrate aircraft status data, control the aircraft's flight altitude, flight speed, flight attitude, etc., make the aircraft fly according to the preset track, and record the aircraft status, control and other data at the same time.

[0003] In order to collect and process aircraft data in real time, ensure the accuracy of software system timing, complete control solutions, and meet aircraft track error requirements, the flight control computer software needs to reduce the data recording word length or lower the recording rate.

[0004] However, after the test flight is completed, the single recorded data cannot provide sufficient data support for aircraft vibration, filter algorithm improvement, control law algorithm improvement, and peripheral operation status evaluation, and it is necessary to adjust the data for multiple test flights. Multiple test flights will make it difficult to optimize the flight of the UAV aircraft and increase the test flight cost. Summary of the invention

[0005] The purpose of the present invention is to propose a method, device and medium for recording computer software data of an unmanned aerial vehicle, so as to solve the technical problem that the prior art cannot achieve both the reduction of data recording rate and the reduction of test flight cost when collecting flight data of an unmanned aerial vehicle.

[0006] The present invention provides a method for recording computer software data of an unmanned aerial vehicle, comprising the following steps: S1: Apply to the system memory to open two FIFO units of the same size; S2: Create three tasks, namely the first scheduled task, the second scheduled task and the real-time task; S3: After the first scheduled task has elapsed the scheduled time T1, data is written into one of the FIFO units; S4: After the second scheduled task has reached the scheduled time T2, the second scheduled task sends a write instruction to the real-time task; S5: The real-time task writes the data of one of the FIFO units to the external storage device; at this time, the first scheduled task switches to another FIFO unit to write data, and waits for the second scheduled task to be triggered.

[0007] A storage medium stores instructions and data for implementing a computer software data recording method for an unmanned aerial vehicle.

[0008] A computer software data recording device for an unmanned aerial vehicle comprises: a processor and the storage medium; the processor loads and executes instructions and data in the storage medium to implement a computer software data recording method for an unmanned aerial vehicle.

[0009] The beneficial effects provided by the present invention are: data is recorded in text form, and the text form is improved, and the storage characteristics of the storage chip of the flight control computer of the unmanned aerial vehicle are utilized - when the read and write operations are performed in integer multiples of the Sector, the read and write time of the storage chip is short, and the timing is relatively stable, and the bytes of the Sector size of the storage chip are used to cache data to the memory, and a dual FIFO design is performed on the cache area, and the high-speed and high-real-time requirements of the unmanned aerial vehicle for data recording are met by alternately writing FIFOs to the file system, and the technical problem of reducing the data recording rate and reducing the test flight cost when collecting flight data of the flying aircraft is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 It is a simplified flow chart of the method of the present invention; Figure 2 It is a schematic diagram of the hardware connection method of this application; Figure 3 is a schematic diagram of the scheduling logic of the present invention; Figure 4 It is a schematic diagram of the alternating cache of the present invention; Figure 5 It is a working schematic diagram of the hardware device of the present invention. DETAILED DESCRIPTION

[0011] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0012] Before formally describing the present invention, the scheme of the present invention is first generally described for easy understanding.

[0013] First, some basic concepts are explained.

[0014] 1. FIFO: First In First Out, which is an important data structure widely used in computer science and various information processing systems. Its basic principle is that the data that enters the queue first will be taken out first. In hardware and software design, FIFO is often used for data caching and transmission, especially in scenarios where large amounts of data or data streams need to be processed.

[0015] 2. Sector: Sector is the basic unit of data storage. It is the smallest addressable data block on a storage device.

[0016] Please refer to Figure 1 The present invention provides a method for recording computer software data of an unmanned aerial vehicle, comprising the following steps: S1: Apply to the system memory to open two FIFO units of the same size; It should be noted that the queue depth of the FIFO in the present invention is n, and the length of a single queue of the FIFO is an integer multiple of the Sector of the external storage device.

[0017] Please refer to Figure 2 , Figure 2 It is a schematic diagram of the hardware connection method of this application.

[0018] like Figure 2 As shown, the control computer MCU is connected to the external storage device SDMMC card through the SDMMC bus, and the Sector size of the SDMMC card is 512 bytes.

[0019] For the operation of the software, the present invention adds a FATFS file system, that is, the control computer MCU writes data to the SDMMC card through the file system. The system memory described in step S1 is the internal memory of the control computer.

[0020] As an embodiment, the queue depth of the FIFO in the present invention is 25, the length of a single queue is 512 bytes, the buffer area is initialized to all 0s, and when the length of a single queue entry does not meet 512 bytes, 0 is used to fill 512 bytes, and the 511th byte and the 512th byte are fixed as "carriage return" and "line feed". In some other embodiments, different parameters can also be set according to different sectors of the SDMMC card.

[0021] S2: Create three tasks, namely the first scheduled task, the second scheduled task and the real-time task; It should be noted that the priority of the first scheduled task and the second scheduled task is higher than that of the real-time task.

[0022] As an embodiment, in the present invention, the priority of the two scheduled tasks is 1, the priority of the real-time task is 5, and the priority of the scheduled task is higher than that of the real-time task.

[0023] As an example, in the present invention, the timing time T1 is set to 10ms and the timing time T2 is set to 200ms. S3: After the first scheduled task has elapsed the scheduled time T1, data is written into one of the FIFO units; It should be noted that the timing time T1<timing time T2.

[0024] When the 10ms timer task is started, write data to one of the FIFOs, for example, write data to FIFO1; S4: After the second scheduled task has reached the scheduled time T2, the second scheduled task sends a write instruction to the real-time task; At this time, when the 200 millisecond task time arrives, the 200 millisecond task sends a write instruction to the real-time task. Figure 3 , Figure 3 is a schematic diagram of the scheduling logic of the present invention; S5: The real-time task writes the data of one of the FIFO units to the external storage device; at this time, the first scheduled task switches to another FIFO unit to write data, and waits for the second scheduled task to be triggered.

[0025] The real-time task writes the data of FIFO1 to the external storage device SDMMC card through the file system, and the 10-ms task switches to another FIFO for data cache. Because the queue depth of the FIFO is 25, when the 200-ms task arrives, the queue cached by the 10-ms task is normally 20, leaving 5 queues for fault tolerance.

[0026] From the above, we can see that when the scheduled task is executed, the real-time task starts to operate the file system to write FIFO data to the SDMMC card, which does not affect the real-time performance of the scheduled task.

[0027] In addition, the 10 millisecond task does not affect the change of the FIFO content of the current real-time task to the SDMMC card through the file system because it is writing data to another FIFO. And the queue length of 512 bytes is the Sector size of the SDMMC card and meets the byte length of the flight control single write data.

[0028] It should be noted that data is written into the FIFO unit by alternate caching, which is specifically performed by four logic switches.

[0029] Please refer to Figure 4 , Figure 4 It is a schematic diagram of the alternating cache of the present invention.

[0030] Two FIFOs of the same size are opened in the flight control computer memory. The queue depth of the FIFO is n. The single queue length of the FIFO is an integer multiple of the storage device SECTOR. The flight control computer operates four switches to realize the writing of storage data into the storage device.

[0031] Logic switch 1 and logic switch 3 are used to control the connection and disconnection between the system memory FIFO1 and the storage device; logic switch 2 and logic switch 4 are used to control the connection and disconnection between the system memory FIFO1 and the storage device.

[0032] The specific operations are as follows: 1. When the flight control computer software turns on logic switch 1, it turns off logic switch 2, and the stored data enters the memory FIFO1 in sequence. At the same time, it turns on logic switch 4, turns off logic switch 3, and writes the entire FIFO2 data into the storage device; 2. When the flight control computer software turns on logic switch 2, it turns off logic switch 1, and the stored data enters the memory FIFO2 in sequence. At the same time, it turns on logic switch 3 and turns off logic switch 4, and writes the entire FIFO1 data into the storage device; The flight control computer records the status data into the storage device by alternating steps 1 and 2 above.

[0033] See also Figure 5 , Figure 5 40 is a schematic diagram of the working of the hardware device of an embodiment of the present invention, wherein the hardware device specifically comprises: an unmanned aerial vehicle computer software data recording device 401, a processor 402 and a storage medium 403.

[0034] An unmanned aerial vehicle computer software data recording device 401: The unmanned aerial vehicle computer software data recording device 401 implements the unmanned aerial vehicle computer software data recording method.

[0035] Processor 402: The processor 402 loads and executes the instructions and data in the storage medium 403 to implement the unmanned aerial vehicle computer software data recording method.

[0036] Storage medium 403: The storage medium 403 stores instructions and data; the storage medium 403 is used to implement the unmanned aerial vehicle computer software data recording method.

[0037] The beneficial effects of the present invention are as follows: data is recorded in text form, and the text form is improved, and the storage characteristics of the storage chip of the flight control computer of the unmanned aerial vehicle are utilized - when the read and write operations are performed in integer multiples of the Sector, the read and write time of the storage chip is short, and the timing is relatively stable, and the bytes of the Sector size of the storage chip are used to cache data to the memory, and a dual FIFO design is performed on the cache area, and the high-speed and high-real-time requirements of the unmanned aerial vehicle for data recording are met by alternately writing FIFOs to the file system, and the technical problem of reducing the data recording rate and reducing the test flight cost, which cannot be achieved at the same time, is solved when collecting flight data of the flying aircraft.

[0038] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for recording computer software data of an unmanned aerial vehicle, characterized in that: The method comprises the following steps: S1: Apply to the system memory to open two FIFO units of the same size; S2: Create three tasks, namely the first scheduled task, the second scheduled task and the real-time task; S3: After the first scheduled task has elapsed the scheduled time T1, data is written into one of the FIFO units; S4: After the second scheduled task has reached the scheduled time T2, the second scheduled task sends a write instruction to the real-time task; S5: The real-time task writes the data of one of the FIFO units to the external storage device; at this time, the first scheduled task switches to another FIFO unit to write data, and waits for the second scheduled task to be triggered.

2. The method for recording computer software data of an unmanned aerial vehicle according to claim 1, characterized in that: The length of a single queue of the FIFO unit is an integer multiple of the Sector of the storage device.

3. The method for recording computer software data of an unmanned aerial vehicle according to claim 1, characterized in that: Timing time T1<timing time T2.

4. The method for recording computer software data of an unmanned aerial vehicle according to claim 1, characterized in that: The priority of the first scheduled task and the second scheduled task is higher than that of the real-time task.

5. The method for recording computer software data of an unmanned aerial vehicle according to claim 1, characterized in that: Writing data into the FIFO unit uses alternating buffering, which is specifically carried out using four logic switches.

6. A method for recording computer software data of an unmanned aerial vehicle as claimed in claim 5, characterized in that: Logic switch 1 and logic switch 3 are used to control the connection and disconnection between the system memory FIFO1 and the storage device; logic switch 2 and logic switch 4 are used to control the connection and disconnection between the system memory FIFO1 and the storage device.

7. A method for recording computer software data of an unmanned aerial vehicle as claimed in claim 6, characterized in that: When logic switch 1 is turned on, logic switch 2 is turned off, and the stored data enters the memory FIFO1 in sequence. At the same time, logic switch 4 is turned on, logic switch 3 is turned off, and the entire FIFO2 data is written into the storage device; When logic switch 2 is turned on, logic switch 1 is turned off, and the stored data enters memory FIFO2 in sequence. At the same time, logic switch 3 is turned on, logic switch 4 is turned off, and the entire FIFO1 data is written to the storage device.

8. A storage medium, characterized in that: The storage medium stores instructions and data for implementing a method for recording computer software data for an unmanned aerial vehicle as described in any one of claims 1 to 7.

9. An unmanned aerial vehicle computer software data recording device, characterized in that: include: Processor and storage medium; the processor loads and executes instructions and data in the storage medium to implement the unmanned aerial vehicle computer software data recording method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Caching and displaying device and method based on double-way camera video stitching

    CN104717470A

  • Data transmission method and device of peripheral interface, equipment and storage medium

    CN117785761A

  • Non-volatile storage device, host device, non-volatile storage system, data recording method, and program

    US20100191901A1