Redundant backup and loss prevention method for unmanned aerial vehicle flight parameter cycle recording
By generating time-divided window data packets and constructing an associated verification structure, the problems of redundant backup and data loss in UAV flight parameter recording are solved, achieving data redundancy backup and reliable recording under abnormal conditions with limited resources.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING TIANQING AEROSPACE TECH CO LTD
- Filing Date
- 2026-04-20
- Publication Date
- 2026-07-03
Smart Images

Figure CN122044960B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data backup technology, specifically a method for redundant backup and loss prevention of cyclic recording of UAV flight parameters. Background Technology
[0002] With the widespread application of drones in aerial surveying, inspection, logistics, and emergency rescue, the flight parameter data generated by drones during flight has become an important basis for flight control analysis, fault tracing, accident determination, and compliance auditing. Existing drone systems typically collect flight parameters such as attitude parameters, navigation parameters, power parameters, and control commands periodically during flight, and record the collected data in the onboard storage unit to form flight logs or flight record files.
[0003] In existing technologies, to adapt to application scenarios with limited airborne storage resources, a cyclic recording method is commonly used to store flight parameters. However, this lacks a description of the continuous relationship between data from different time periods, i.e., overwriting earlier recorded data after the storage space reaches its limit. Some existing solutions reduce the risk of data loss by increasing the number of storage media or performing data mirroring. These technologies fail to provide a unified design for the generation, segmentation, association, and registration process of flight parameter data at the recording method level. As a result, the correspondence between redundant data is unclear when abnormal conditions occur, and it is difficult to effectively coordinate with the cyclic recording mechanism. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention proposes a redundant backup and anti-loss method for cyclic recording of UAV flight parameters. Under limited onboard resources, this method provides redundant backup capabilities for the cyclic recording process of UAV flight parameters and reduces the risk of data loss.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] Redundant backup and loss prevention methods for cyclic recording of UAV flight parameters include:
[0007] The flight parameter set during the flight of the UAV is obtained with a preset sampling period, the flight parameter set is divided into time windows, and a corresponding window data packet is generated for each time window. The window data packet includes a window time range identifier, a flight parameter sequence, and a window order identifier.
[0008] Window summary information is generated based on each window data packet, and the current window summary information is associated with the previous window summary information to form a window association verification structure.
[0009] The window data packet and its window association verification structure are written into two types of storage units, namely a first storage unit and a second storage unit.
[0010] During flight, when an abnormal state is detected, the abnormality is handled based on the write rules of the first and second storage units.
[0011] Specifically, the step of acquiring a set of flight parameters during the UAV's flight process at a preset sampling period, dividing the flight parameter set into time windows, and generating a corresponding window data packet for each time window includes:
[0012] During the flight of the UAV, a time reference for collecting flight parameters is set, a set of flight parameters is obtained according to the preset sampling period, and a collection timestamp is bound to the corresponding set of flight parameters each time a collection is performed, forming a parameter unit with a time identifier.
[0013] Based on the acquisition timestamp, the continuously acquired parameter units are arranged in chronological order, and the time window to which the current parameter unit belongs or the start of a new time window is triggered according to the preset window duration.
[0014] Parameter units that are determined to belong to the same time window are aggregated according to the acquisition order, and the aggregation process of parameter units in the current time window is terminated when a new time window is triggered.
[0015] After terminating the parameter aggregation process for the current time window, the aggregated parameter units within the time window and their corresponding window time range identifiers are encapsulated together into a window data packet.
[0016] Specifically, the step of generating window summary information based on each window data packet and associating the current window summary information with the previous window summary information to form a window association verification structure includes:
[0017] Consistency processing is performed on the flight parameter sequence in each window data packet to generate a normalized window sequence. The consistency processing includes confirming the time order of parameter units and marking missing sampling positions as placeholders.
[0018] Based on the window sequence identifier and window time range identifier of the window data packet, a perturbation identifier is generated, and the perturbation identifier is combined with the normalized window sequence to form a window input sequence;
[0019] Based on the window input sequence, generate corresponding window summary information, and bind and store the window summary information with the window sequence identifier;
[0020] Obtain the window summary information of the current window and the window summary information of the previous window, and perform association calculation based on the disturbance identifier to generate the association verification entry corresponding to the current window;
[0021] The associated verification entries are registered sequentially according to the window sequence identifier to form a window associated verification structure.
[0022] Specifically, generating corresponding window summary information based on the window input sequence, and binding and storing the window summary information with the window sequence identifier, including:
[0023] The window input sequence is divided into multiple sequence segments according to a preset segmentation rule, and a segment number is assigned to each sequence segment.
[0024] Fragment summary information is generated for each sequence fragment, and the fragment summary information is associated with the corresponding fragment number and recorded.
[0025] The fragment summary information is aggregated according to the fragment number order to generate the window summary information, and a submission identifier is generated for the window summary information.
[0026] The window summary information, submission identifier, and window sequence identifier are encapsulated into a binding entry, and the binding entry is written into a preset summary storage area to complete the binding storage.
[0027] Specifically, the step of obtaining the window summary information of the current window and the window summary information of the previous window, and performing association calculation based on the perturbation identifier to generate an association verification entry corresponding to the current window includes:
[0028] Obtain the window summary information corresponding to the current window and the window summary information corresponding to the previous window, and align the two based on the window order identifier to generate adjacent summary pairs;
[0029] A perturbation sequence is generated based on the perturbation identifier corresponding to the current window, and the perturbation sequence is combined with the adjacent summary pair to form the association calculation input;
[0030] A first association calculation is performed on the association calculation input to obtain a first association result, and a second association calculation is performed on the association calculation input based on the perturbation sequence to obtain a second association result;
[0031] The first association result, the second association result, and the window sequence identifier are encapsulated into an association verification entry.
[0032] Specifically, the step of sequentially registering the associated verification entries according to the window sequence identifier to form a window association verification structure includes:
[0033] The target slot identifier is determined based on the window sequence identifier corresponding to the associated verification entry;
[0034] Write the associated verification entry into the registration position corresponding to the target slot identifier, and bind the target slot identifier with the associated verification entry;
[0035] Based on the continuity relationship of adjacent target slot identifiers, it is determined whether there are unregistered slots. If there are unregistered slots, a gap identifier entry is generated and written to the registration position corresponding to the unregistered slot.
[0036] A freeze identifier is generated for the written associated verification entries and gap identifier entries, and the freeze identifier is associated with the corresponding registration position to form a window associated verification structure.
[0037] Specifically, among the two types of storage units, the first storage unit writes window data packets according to a preset cyclic overwrite rule, which includes overwriting the earliest chronological window data packet when the storage space reaches a threshold; the second storage unit writes window data packets according to a preset non-overwrite rule, which includes prohibiting overwriting operations on the already written window data packets after writing, and the cyclic overwrite rule and the non-overwrite rule are different from each other in terms of writing trigger conditions and overwrite behavior.
[0038] Specifically, the step of writing the window data packet and its window association verification structure into two types of storage units respectively includes:
[0039] The window data packet corresponding to the current window and the associated verification entries in the window association verification structure corresponding to the current window are determined as the set of objects to be written, and an object identifier is assigned to the set of objects to be written.
[0040] A write plan is generated based on the object identifier, and the write plan includes the write order identifier of the set of objects to be written in the first storage unit and the write order identifier in the second storage unit;
[0041] According to the writing plan, the set of objects to be written is written to the first writing area of the first storage unit, and a first position identifier is recorded during writing to characterize the writing position of the set of objects to be written in the first storage unit.
[0042] According to the write plan, the set of objects to be written is written to the second write area of the second storage unit, and a second position identifier is recorded during writing to characterize the write position of the set of objects to be written in the second storage unit.
[0043] The object identifier, the first position identifier, the second position identifier, and the window sequence identifier are encapsulated into a write binding entry, and the write binding entry is registered as the write record corresponding to the current window.
[0044] Specifically, generating a write plan based on the object identifier includes:
[0045] Based on the object identifier, the set of objects to be written is grouped, and within each object group, an internal order identifier is generated according to a preset object sorting rule.
[0046] A first write order sequence for the first storage unit is generated based on the group order identifier, and a first write order identifier is assigned to the first write order sequence.
[0047] A second write order sequence for the second storage unit is generated based on the intra-group sequence identifier, and a second write order identifier is assigned to the second write order sequence, wherein the second write order sequence differs from the first write order sequence in the write order of one or more object groups;
[0048] The object identifier, the first write order identifier, and the second write order identifier are encapsulated into a write plan entry, and the write plan entry is associated with the window order identifier to form a write plan.
[0049] Specifically, during flight, when an abnormal state is detected, the abnormality is processed based on the write rules of the first and second storage units, including:
[0050] When a loss risk event is detected, the currently incomplete window data packet is solidified and the solidification result is synchronized to the second storage unit. During subsequent reading or evidence collection, the integrity of the read window data packet is verified based on the window evidence chain. If a window is found to be missing, the missing window is completed using the non-overwriteable backup in the second storage unit or the missing location identifier is output.
[0051] Compared with the prior art, the beneficial effects of the present invention are:
[0052] This invention proposes a redundant backup and anti-loss method for cyclic recording of UAV flight parameters. By constructing a window summary and window association verification structure based on the window data packet, a traceable association relationship is formed between adjacent time windows. Simultaneously, a write plan is generated based on object identifiers, and the window data packet and its corresponding association verification entries are written to two types of storage units according to different write orders. When an abnormal state is triggered, the write rules are switched and registered for verification, thus forming a method flow for coordinated operation of overwrite and non-overwrite under the cyclic recording mechanism. Through this method, flight parameter data has clear time boundaries and association identifiers during continuous recording, abnormal interruption, and subsequent reading. This not only reduces the risk of flight parameter data loss due to cyclic overwrite or abnormal interruption but also enables verification and location of the continuity of recorded data even when data is incomplete, improving the reliability and manageability of the UAV flight parameter recording process. Attached Figure Description
[0053] Figure 1 Flowchart of the redundant backup and anti-loss method for cyclic recording of UAV flight parameters provided by the present invention;
[0054] Figure 2 This is a schematic diagram illustrating the generation of associated verification entries provided by the present invention;
[0055] Figure 3 A schematic diagram illustrating the binding relationship provided by this invention;
[0056] Figure 4 This is a schematic diagram of anomaly verification provided by the present invention. Detailed Implementation
[0057] The present application will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application. These all fall within the protection scope of the present application.
[0058] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0059] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. In addition, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.
[0060] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items.
[0061] Please see Figures 1-4 The present invention provides an embodiment of a method for redundant backup and loss prevention of UAV flight parameter cyclic recording, comprising the following specific steps:
[0062] Step S1: Obtain the set of flight parameters during the flight of the UAV at a preset sampling period, divide the set of flight parameters into time windows, and generate a corresponding window data packet for each time window. The window data packet includes a window time range identifier, a flight parameter sequence, and a window order identifier.
[0063] like Figure 2 As shown, the specific steps of step S1 are as follows:
[0064] Step S101: During the flight of the UAV, a time reference for flight parameter collection is set, a flight parameter set is obtained according to the preset sampling period, and a collection timestamp is bound to the corresponding flight parameter set each time a collection is performed to form a parameter unit with a time identifier.
[0065] In this embodiment, after the UAV enters flight mode, it first sets a time reference for flight parameter acquisition based on a unified time source within the flight control system. This time reference is used to constrain the time allocation and order of flight parameter acquisition. Based on this, flight parameters are periodically acquired during flight according to a preset sampling period. The set of flight parameters acquired within each sampling period is considered a single acquisition result. Upon completion of acquisition, the time value corresponding to the current time reference is bound to the flight parameter set, forming a parameter unit containing flight parameter content and an acquisition timestamp. To address potential short-term drift of the time source during flight, when generating the acquisition timestamp, the current time value is continuously compared with the time identifier corresponding to the previous parameter unit. When it is detected that the time interval between two adjacent acquisitions deviates from the preset sampling period by more than the allowable range, the current time value is not directly used. Instead, a corrected time value is derived based on the time identifier of the previous parameter unit and the preset sampling period, and this corrected time value is used as the acquisition timestamp of the current parameter unit.
[0066] Step S102: Based on the acquisition timestamp, the continuously acquired parameter units are arranged in chronological order, and the time window to which the current parameter unit belongs or the start of a new time window is triggered according to the preset window duration.
[0067] In this embodiment, after the parameter units are generated, the continuously acquired parameter units are temporarily stored in a time sorting queue according to their acquisition timestamps, and the parameter units are arranged sequentially based on their acquisition timestamps. When parameter units with the same or similar acquisition timestamps exist, their relative positions are determined according to their order of entry into the sorting queue, forming a stable time sequence. Based on this, the start time identifier of the current time window is selected as the window reference point, and the acquisition timestamp of newly entered parameter units is compared with the window reference point to determine the time span: if the time span does not reach the preset window duration, the parameter unit is determined to belong to the current time window and included in the parameter aggregation range of the current time window; if the time span reaches or exceeds the preset window duration, the parameter aggregation process of the current time window is terminated, and the acquisition timestamp of the parameter unit is used as the new window reference point, thereby triggering the start of a new time window. Through the above unified processing flow, flight parameters can be continuously divided into interconnected time windows according to consistent time determination rules in both normal timing and abnormal time drift scenarios, forming a windowed parameter sequence with clear time boundaries.
[0068] Step S103: Aggregate the parameter units that are determined to belong to the same time window according to the acquisition order, and terminate the aggregation process of the parameter units in the current time window when a new time window is triggered.
[0069] In this embodiment, after the parameter units are arranged in chronological order and the time window is determined, the parameter units determined to belong to the same time window are sequentially introduced into the window aggregation sequence according to the order determined by their acquisition timestamps, and the original acquisition order of the parameter units is maintained during the introduction process. Specifically, when a new parameter unit is determined to still belong to the current time window, the parameter unit is appended to the aggregation buffer corresponding to the current window time slot, and the order identifier of the parameter units in the aggregation buffer is updated; when a new parameter unit is detected to trigger the start of a new time window, the parameter introduction operation of the current time window aggregation buffer is immediately stopped, and the aggregation buffer is marked as terminated, so that it no longer accepts subsequent parameter units. In response to abnormal situations such as acquisition jitter, short-term disorder, or timestamp correction that may occur during flight, the corrected acquisition timestamp is always used as the order determination basis during the aggregation process. When the acquisition timestamp of an abnormal parameter unit is determined to still fall within the time range of the current time window, it is still included in the aggregation sequence of the current time window in chronological order; when the acquisition timestamp of an abnormal parameter unit crosses the boundary of the current time window, it is used as the basis for triggering the termination of the current window aggregation and the opening of a new window. Through the above processing, the parameter units within each time window can form aggregated results with clear boundaries and consistent order under both normal and abnormal time conditions.
[0070] Step S104: After terminating the parameter aggregation process of the current time window, the aggregated parameter units within the time window and the corresponding window time range identifier are encapsulated together into a window data packet.
[0071] In this embodiment, after the parameter aggregation process of the current time window is detected to be terminated, the window time range identifier corresponding to the time window is first determined based on the acquisition timestamp range of the aggregated parameter units within the time window. The window time range identifier includes at least the acquisition timestamp of the first parameter unit and the acquisition timestamp of the last parameter unit within the time window. Based on this, the aggregated parameter units within the time window are sequentially arranged according to their predetermined acquisition order and introduced into the encapsulation process along with the window time range identifier to generate the corresponding window data packet. To address potential anomalies during flight, such as timestamp correction, acquisition jitter, or parameter unit insertion delays, the final confirmed acquisition timestamp is always used as the basis for determining the time boundary when determining the window time range identifier. Even if the original acquisition time of some parameter units undergoes a correction process, the corrected timestamp is still used in determining the window time range, thereby ensuring that the time range reflected in the window data packet remains consistent with the time order of its internal parameter units.
[0072] Step S2: Generate window summary information based on each window data packet, and perform association calculation between the current window summary information and the previous window summary information to form a window association verification structure.
[0073] The specific steps of step S2 are as follows:
[0074] Step S201: Perform consistency processing on the flight parameter sequence in each window data packet to generate a normalized window sequence. The consistency processing includes confirming the time order of parameter units and marking missing sampling positions as placeholders.
[0075] In this embodiment, after obtaining a single window data packet, the flight parameter sequence contained in the window data packet is first extracted. Based on the acquisition timestamp bound to each parameter unit, the flight parameter sequence is processed for time sequence confirmation. That is, the parameter units are checked sequentially from earliest to latest according to the acquisition timestamp. When the arrangement order of the parameter units is found to be inconsistent with the timestamp order, the positions of the parameter units are adjusted to restore the correct time sequence. After the time sequence confirmation is completed, the sampling position check is performed on the flight parameter sequence using the window time range identifier corresponding to the window data packet as a time reference. That is, each theoretical sampling position is derived sequentially within the window time range according to a preset sampling period, and the actual parameter units are compared with the corresponding theoretical sampling positions. When it is found that a theoretical sampling position does not correspond to an actual parameter unit, a placeholder identifier is generated at that position to indicate the missing sampling position, and the placeholder identifier is included in the flight parameter sequence. Through the above consistency processing, the original flight parameter sequence is unified and standardized in both time sequence and sampling position dimensions, forming a standardized window sequence containing actual parameter units and placeholder identifiers.
[0076] Step S202: Based on the window sequence identifier and window time range identifier of the window data packet, generate a perturbation identifier, and combine the perturbation identifier with the normalized window sequence to form a window input sequence for summary generation.
[0077] In this embodiment, after obtaining the normalized window sequence, the window sequence identifier and window time range identifier corresponding to the window data packet are first read. The window sequence identifier is used as the sequence-level order reference, and the window time range identifier is used as the time span reference. These two identifiers are then jointly processed to generate a perturbation identifier. Specifically, the window sequence identifier is combined with the start and end time identifiers in the window time range identifier to form a perturbation identifier that characterizes the window's positional relationship and time span characteristics within the overall recording sequence. Subsequently, the perturbation identifier is introduced into the normalized window sequence according to a preset combination rule. This combination rule includes placing the perturbation identifier at a predetermined position in the normalized window sequence or using it as a pre-sequence element in subsequent processing, thereby forming a unified representation of the perturbation identifier and the parameter units within the window within the same sequence structure. Through this method, the normalized window sequence, which originally only reflected the internal parameter content of the window, is further enhanced by introducing a perturbation identifier reflecting the overall identity and time characteristics of the window while maintaining its parameter order, thus forming a window input sequence for subsequent window summary generation.
[0078] Step S203: Generate corresponding window summary information based on the window input sequence, and bind and store the window summary information with the window sequence identifier.
[0079] The specific steps of step S203 are as follows:
[0080] Step S2031: Divide the window input sequence into multiple sequence segments according to a preset segmentation rule, and assign a segment number to each sequence segment.
[0081] In this invention, the preset segmentation rule is used to determine how to divide the window input sequence into multiple sequence segments.
[0082] In one embodiment, a preset segmentation rule is used to limit the upper limit of the number of input elements contained in a single sequence segment. Specifically, a target element count threshold is preset. When the number of input elements read sequentially along the window input sequence reaches the target element count threshold, it is determined that the currently accumulated input elements constitute a complete sequence segment, and the construction process of that sequence segment is terminated. Subsequently, starting from the subsequent input elements that have not yet been segmented, the next sequence segment is constructed according to the same target element count threshold until the segmentation of the entire window input sequence is completed.
[0083] In another embodiment, a preset segmentation rule is used to limit the time span covered by a single sequence segment. Specifically, when reading the input sequence in the reading window, the time identifier corresponding to the first input element in the sequence is used as the segment start time point, and subsequent input elements are continuously read. When the time span between the time identifier corresponding to the currently read input element and the segment start time point reaches or exceeds a preset time span threshold, it is determined that the currently accumulated input elements constitute a complete sequence segment, and the construction process of the sequence segment is terminated. Subsequently, a new segment start time point is determined based on the subsequent input elements that have not yet been segmented, and the above process is repeated until segmentation is completed.
[0084] In another embodiment, the preset segmentation rule can be set by combining the input element quantity condition and the time span condition. Specifically, during the segmentation process, as long as the currently accumulated number of input elements reaches a preset target element quantity threshold, or the time span covered by the currently accumulated input elements reaches a preset time span threshold, the current sequence segment is terminated, and a corresponding sequence segment is generated. Subsequently, the same combination rule is applied to the remaining input elements for segmentation.
[0085] After segmenting the window input sequence, each sequence segment is assigned a segment number according to the order in which the sequence segments are constructed in the window input sequence.
[0086] Step S2032: Generate fragment summary information based on each sequence fragment, and associate the fragment summary information with the corresponding fragment number.
[0087] In this embodiment, after segmenting the window input sequence and obtaining multiple sequence segments and their corresponding segment numbers, segment summary generation processing is performed on each sequence segment sequentially. Specifically, for each sequence segment, the summary generation process is introduced sequentially according to the predetermined order of the elements in the sequence segment, so that all input elements in the sequence segment participate in the generation of segment summary information. While generating segment summary information, the segment summary information is bound to the corresponding segment number to form a segment-level association record. This association record is used at least to characterize the positional relationship of the segment summary information in the window input sequence segmentation structure, so that the segment summary information generated from different sequence segments can be distinguished according to the segment number and maintain the original order relationship.
[0088] Step S2033: Aggregate the segment summary information according to the segment number order to generate the window summary information, and generate a submission identifier for the window summary information.
[0089] In this embodiment, after obtaining multiple fragment summary information corresponding one-to-one with fragment numbers, the fragment summary information is first read sequentially according to the fragment number in ascending order to ensure that the order in which the fragment summary information is introduced during the aggregation process remains consistent with its original position in the window input sequence. During the sequential reading process, the read fragment summary information is introduced into the aggregation process in turn, so that each fragment summary information participates in the generation of the window-level summary in a predetermined order; after all fragment summary information has been introduced, window summary information corresponding to the current window is formed. Subsequently, to indicate that the window summary information has been generated and can participate in subsequent association calculations or storage registration as an independent processing object, a submission identifier is assigned to the window summary information. The submission identifier is used at least to distinguish the window summary information corresponding to different windows and to identify the submission order of the window summary information in the overall processing flow.
[0090] Step S2034: Encapsulate the window summary information, submission identifier, and window sequence identifier into a binding entry, and write the binding entry into a preset summary storage area to complete the binding storage.
[0091] In one embodiment, the summary storage area is constructed using a sequential storage structure. Specifically, the summary storage area is pre-divided into multiple contiguous storage units, each of which stores one binding entry. When a binding entry is written to the summary storage area, it is sequentially written to the next available storage unit according to the order reflected by its corresponding window sequence identifier. In this embodiment, the binding entries in the summary storage area are arranged sequentially in physical or logical address space, so that the window summary information corresponding to each window can be directly located or sequentially traversed through the window sequence identifier.
[0092] In another embodiment, the summary storage area is constructed using an index mapping structure. Specifically, the summary storage area includes a storage region for storing bound entries and an index table structure for recording the correspondence between window sequence identifiers, submission identifiers, and the storage locations of bound entries. When a new bound entry is generated, it is first written to an empty space in the storage region, and a corresponding registration location identifier is generated. Subsequently, a mapping relationship between window sequence identifiers and registration location identifiers is established in the index table, enabling subsequent steps to quickly locate the corresponding bound entry based on the window sequence identifier or submission identifier.
[0093] In another embodiment, the summary storage area can be configured using a circular storage management method. Specifically, a fixed-size storage space is allocated to the summary storage area, and the bound entries are written sequentially according to preset summary storage rules. When the storage space reaches a preset space threshold, the earliest bound entry in time sequence that has completed association verification is overwritten or migrated according to the circular management strategy.
[0094] Step S204: Obtain the window summary information of the current window and the window summary information of the previous window, and perform association calculation based on the disturbance identifier to generate the association verification entry corresponding to the current window.
[0095] The specific steps of step S204 are as follows:
[0096] Step S2041: Obtain the window summary information corresponding to the current window and the window summary information corresponding to the previous window, and align the two based on the window order identifier to generate adjacent summary pairs.
[0097] In this embodiment, when it is necessary to construct the association relationship between adjacent windows, the position of the current window in the overall window sequence is first determined based on the window sequence identifier, and the window summary information corresponding to the window sequence identifier is read from the summary storage area. Then, according to the order relationship indicated by the window sequence identifier, the window sequence identifier corresponding to the previous window is located, and the window summary information corresponding to the previous window sequence identifier is read from the summary storage area accordingly. After obtaining the current window summary information and the previous window summary information, the order reflected by the window sequence identifier is used as the alignment basis to pair them up, so that the current window summary information and the window summary information of its immediate predecessor window form a one-to-one correspondence, thereby generating adjacent summary pairs containing the current window summary information and the previous window summary information.
[0098] Step S2042: Generate a perturbation sequence based on the perturbation identifier corresponding to the current window, and combine the perturbation sequence with the adjacent summary pair to form an association calculation input.
[0099] In this embodiment, after obtaining adjacent summary pairs, the perturbation identifier corresponding to the current window is first read. Based on the window order information and window time range information contained in the perturbation identifier, the perturbation identifier is serialized according to a preset expansion rule to generate a perturbation sequence that corresponds one-to-one with the current window. The perturbation sequence is used to characterize the positional features and time span features of the current window in the overall window sequence. After generating the perturbation sequence, the perturbation sequence is introduced into the combination process and uniformly organized with the current window summary information and the previous window summary information in the adjacent summary pairs, so that the three together constitute the associated calculation input according to a predetermined arrangement relationship.
[0100] Step S2043: Perform a first association calculation on the association calculation input to obtain a first association result, and perform a second association calculation on the association calculation input based on the perturbation sequence to obtain a second association result.
[0101] In this embodiment, after forming the association calculation input, the first association calculation process is first performed on the association calculation input. Specifically, adjacent summary pairs are treated as a whole input object and introduced into the association calculation process in a predetermined order, so that the current window summary information and the previous window summary information participate in the calculation together without introducing additional perturbation, thereby obtaining a first association result that represents the basic association relationship between adjacent windows. After completing the first association calculation, the second association calculation process is further performed on the same association calculation input based on the perturbation sequence. That is, while keeping the input order of adjacent summary pairs unchanged, the perturbation sequence is introduced into the calculation process, so that the perturbation sequence participates in the joint processing of adjacent summary pairs, thereby generating a second association result containing window identity features.
[0102] Step S2044: Encapsulate the first association result, the second association result, and the window sequence identifier into an association verification entry, and establish an index association between the association verification entry and the current window.
[0103] In this embodiment, after obtaining the first and second association results, the two types of association results are first uniformly organized based on the window sequence identifier corresponding to the current window to clarify the belonging relationship of each association result in the overall window sequence. Then, the first and second association results are used as the output of the association calculation, and together with the window sequence identifier, are introduced into the encapsulation process. By combining and organizing these three, an association verification entry corresponding to the current window is generated. After generating the association verification entry, an index association relationship is established between the association verification entry and the current window. This index association at least characterizes the correspondence between the association verification entry and the current window data packet and its window summary information, enabling the association verification entry to be accurately located based on the window sequence identifier and correspond one-to-one with the current window.
[0104] Step S205: Register the associated verification entries in sequence according to the window sequence identifier to form a window associated verification structure, and establish an index association between the window associated verification structure and the corresponding window data packet.
[0105] The specific steps of step S205 are as follows:
[0106] Step S2051: Based on the window sequence identifier corresponding to the associated verification entry, determine the target slot identifier for registration.
[0107] In this embodiment, when sequential registration of associated verification entries is required, the window sequence identifier corresponding to the associated verification entry is first read, and the window sequence identifier is used as the basic input for determining the registration order. Subsequently, according to a pre-agreed slot mapping rule, the window sequence identifier is mapped to its corresponding target slot identifier. The slot mapping rule is at least used to define the correspondence between the window sequence identifier and the registration slot. During the mapping process, when the window sequence identifier falls within the allocated sequence range, the corresponding registration slot is directly determined as the target slot identifier. When the window sequence identifier is within the unallocated sequence range, a new registration slot is derived according to the slot mapping rule, and this registration slot is determined as the target slot identifier.
[0108] Step S2052: Write the associated verification entry into the registration position corresponding to the target slot identifier, and bind the target slot identifier with the associated verification entry.
[0109] In this embodiment, after determining the target slot identifier corresponding to the associated verification entry, the registration position corresponding to it is located based on the target slot identifier, and the associated verification entry is written into the registration position. The writing operation is performed on a complete entry basis to ensure the integrity of the associated verification entry in the registration position. After the writing is completed, the target slot identifier and the associated verification entry are bound together. The binding record is used to at least characterize the correspondence between the registration position of the associated verification entry in the window associated verification structure and its logical order.
[0110] Step S2053: Determine whether there are unregistered slots based on the continuity relationship of adjacent target slot identifiers, and generate a gap identifier entry when there are unregistered slots, and write it into the registration position corresponding to the unregistered slot.
[0111] In this embodiment, after writing the slot for the associated verification entry and obtaining the corresponding target slot identifier, the continuity of slots in the window associated verification structure is checked based on the order relationship between the target slot identifier and its adjacent slot identifiers. Specifically, the registered target slot identifiers are read along the slot order direction and compared with the adjacent slot identifiers that should theoretically appear consecutively. When an unoccupied slot interval is found between adjacent slot identifiers, the slot corresponding to that interval is determined to be an unregistered slot. After determining that there are unregistered slots, a corresponding gap identifier entry is generated for each unregistered slot. The gap identifier entry is at least used to indicate that the slot is in a state of not being properly registered in the order structure. Subsequently, the gap identifier entry is written into the registration position corresponding to the unregistered slot.
[0112] Step S2054: Generate a freeze identifier for the written associated verification entries and gap identifier entries, and associate the freeze identifier with the corresponding registration position to form a window associated verification structure.
[0113] In this embodiment, after writing the associated verification entries and gap identifier entries into the slots, a structure confirmation process is performed on the occupied registration positions. Specifically, the associated verification entries or gap identifier entries already written in each registration position are read sequentially, and a corresponding freeze identifier is generated for each registration position. The freeze identifier is used to indicate that the registration status of the registration position in the current window's associated verification structure has been confirmed. After generating the freeze identifier, the freeze identifier is associated with the corresponding registration position, establishing a one-to-one correspondence between the freeze identifier and the registration position, thereby restricting subsequent processing from changing the registration position again.
[0114] Step S3: Write the window data packet and its window association verification structure into two types of storage units, namely a first storage unit and a second storage unit. The first storage unit writes the window data packet according to a preset cyclic overwrite writing rule, which includes overwriting the earliest window data packet in time order when the storage space reaches a threshold. The second storage unit writes the window data packet according to a preset non-overwrite writing rule, which includes prohibiting the overwrite operation on the written window data packet after writing. The cyclic overwrite writing rule and the non-overwrite writing rule are different from each other in terms of writing trigger conditions and overwrite behavior.
[0115] The first storage unit employs a write pointer rotation method to perform cyclic overwrite writes. Specifically: multiple contiguous storage blocks are pre-divided within the first storage unit, with each block used to store a window data packet; a write pointer is set to indicate the currently writable target storage block; when a new window data packet is generated, a write operation is performed based on the storage block pointed to by the write pointer; after each write operation is completed, the write pointer is sequentially moved to the next storage block; when the write pointer moves to the last storage block, if a new window data packet continues to be written, the write pointer wraps back to the first storage block, overwriting the existing window data packet in that storage block.
[0116] After writing a window data packet, the second storage unit sets a one-time write flag for that window data packet. Specifically: when a window data packet is first written to the second storage unit, it is stored in an unoccupied storage location; after the write is completed, a write completion flag is set for that storage location; during subsequent write processes, if a write completion flag is detected for the target storage location, overwriting or rewriting operations on that storage location are prohibited; for new window data packets, writing is only allowed to free storage locations that have not yet been marked as write completion.
[0117] like Figure 3 As shown, the specific steps of step S3 are as follows:
[0118] Step S301: Determine the window data packet corresponding to the current window and the associated verification entries in the window association verification structure corresponding to the current window as the set of objects to be written, and assign an object identifier to the set of objects to be written.
[0119] In this embodiment, after completing the data generation and association verification structure construction for the current window, the association verification entry corresponding to the window sequence identifier is first located from the generated window association verification structure based on the window sequence identifier of the current window. This association verification entry, along with the window data packet corresponding to the current window, is selected as a writing candidate. Subsequently, the writing candidate objects are uniformly organized to form a set of objects to be written, so that the window data packet and its corresponding association verification entry logically participate in the subsequent writing process as a whole. After forming the set of objects to be written, an object identifier is assigned to the set of objects to be written according to a preset object identifier generation rule. The object identifier is at least used to characterize the uniqueness of the set in the overall writing process and its correspondence with the window sequence identifier.
[0120] Step S302: Generate a write plan based on the object identifier, the write plan including the write order identifier of the set of objects to be written in the first storage unit and the write order identifier in the second storage unit.
[0121] The specific steps of step S302 are as follows:
[0122] Step S3021: Group the objects to be written in the set of objects based on the object identifier, and generate an internal sequence identifier in each object group according to a preset object sorting rule.
[0123] In this embodiment, after obtaining the set of objects to be written and their corresponding object identifiers, the object identifiers are first used as the basic input for grouping determination. Grouping processing is then performed on each object in the set of objects to be written. This grouping processing is at least used to distinguish objects of different types or different writing attributes, so that objects with the same grouping determination conditions are grouped into the same object group. After completing the object grouping, for each object group, the objects within that group are arranged sequentially according to a preset object sorting rule. The object sorting rule is based at least on the logical order of the objects in the set of objects to be written or their corresponding window order identifiers. After sorting, each object within a group is assigned an intra-group order identifier to characterize the writing order of the objects in that group.
[0124] It should be noted that the preset object sorting rules include setting them based on the object type priority of the objects to be written, setting them based on the window order identifier corresponding to the objects, setting them based on the order in which the objects are generated or added in the set of objects to be written, and setting them by combination.
[0125] Step S3022: Generate a first write order sequence for the first storage unit based on the group sequence identifier, and assign a first write order identifier to the first write order sequence.
[0126] In this embodiment, after grouping the objects in the set to be written and generating intra-group sequence identifiers for each object, for the writing process of the first storage unit, each object is first read sequentially according to the intra-group sequence identifier, so that the objects are introduced into the sequence generation process in sequence according to their predetermined order in their respective object groups; during the sequential reading process, each object is arranged in the reading order to form a first write order sequence for the first storage unit. After the generation of the first write order sequence is completed, a first write order identifier is assigned to the first write order sequence. The first write order identifier is used to characterize the uniqueness of the write order sequence in the overall write plan and its corresponding write order.
[0127] Step S3023: Generate a second write order sequence for the second storage unit based on the group sequence identifier, and assign a second write order identifier to the second write order sequence, wherein the second write order sequence is different from the first write order sequence in the write order of one or more object groups.
[0128] In this embodiment, after obtaining the intra-group sequence identifiers for each object, an order generation process independent of the first storage unit is performed on the set of objects to be written, based on the write requirements of the second storage unit. Specifically, firstly, each object is read based on the intra-group sequence identifiers, and a preset order adjustment rule is introduced during the reading process to rearrange the reading order of objects within at least one object group, so that the reading order of objects within that object group is different from the corresponding order in the first write order sequence. After the order adjustment is completed, the adjusted objects are arranged sequentially according to their reading order to form a second write order sequence for the second storage unit. Subsequently, a second write order identifier is assigned to the second write order sequence to characterize the uniqueness of the sequence in the overall write plan and its corresponding write order.
[0129] Step S3024: Encapsulate the object identifier, the first write order identifier, and the second write order identifier into a write plan entry, and establish an association registration between the write plan entry and the window order identifier to form a write plan.
[0130] In this embodiment, after obtaining the object identifier corresponding to the set of objects to be written, the first write order identifier corresponding to the first write order sequence, and the second write order identifier corresponding to the second write order sequence, the above identifier information is first uniformly organized to clarify the subordinate relationship among the three in the same write task. Then, the object identifier is used as the unique identifier of the written object, and the first and second write order identifiers are used as write order descriptions corresponding to different storage units. These three are combined and encapsulated to generate a write plan entry. After the write plan entry is generated, it is associated with the window order identifier corresponding to the current window, so that the write plan entry logically forms a clear correspondence with its respective time window.
[0131] Step S303: According to the write plan, write the set of objects to be written into the first write area of the first storage unit, and record the first position identifier during writing to characterize the write position of the set of objects to be written in the first storage unit.
[0132] In this embodiment, after obtaining the write plan corresponding to the current window, the write order of the set of objects to be written in the first storage unit is first determined according to the first write order identifier recorded in the write plan. Then, the corresponding objects are retrieved from the set of objects to be written in sequence according to the write order, and the objects are written to the first write area of the first storage unit. During the writing process, for each object write operation, the actual write position of the object in the first write area is determined in real time, and the actual write position is recorded as the first position identifier. After all objects in the set of objects to be written have been written, the recorded first position identifiers are uniformly organized to represent the overall write position range of the set of objects to be written in the first storage unit.
[0133] Step S304: According to the write plan, write the set of objects to be written into the second write area of the second storage unit, and record the second position identifier during writing to characterize the write position of the set of objects to be written in the second storage unit.
[0134] In this embodiment, after the write operation of the first storage unit is completed, the write order of the set of objects to be written in the second storage unit is determined according to the second write order identifier recorded in the same write plan. Then, the corresponding objects are retrieved from the set of objects to be written in this order and written to the second write area of the second storage unit. During the writing process, for each object's write operation, the actual write position of the object in the second write area is simultaneously determined, and the determined position is recorded as the second position identifier. After all objects in the set of objects to be written have been written, the recorded second position identifiers are organized to characterize the write position distribution of the set of objects to be written in the second storage unit.
[0135] Step S305: Encapsulate the object identifier, the first position identifier, the second position identifier, and the window sequence identifier into a write binding entry, and register the write binding entry as the write record corresponding to the current window.
[0136] In this embodiment, after writing the set of objects to be written to the first storage unit and the second storage unit respectively and obtaining the corresponding first and second position identifiers, the object identifier, the first position identifier, the second position identifier, and the window sequence identifier corresponding to the current window are first uniformly organized to clarify the logical correspondence between each identifier. Then, the object identifier is used as the unique identifier of the set of objects to be written, the first and second position identifiers are used as descriptions of the position of the set of objects in different storage units, and the window sequence identifier is used as the position identifier of the write operation in the overall window sequence. These identifiers are combined and encapsulated to generate a write binding entry. After generating the write binding entry, the write binding entry is registered as the write record corresponding to the current window, so that the write record is logically associated with the window sequence identifier, the object identifier, and the dual storage position identifier simultaneously.
[0137] Step S4: During flight, when an abnormal state is detected, the abnormality is processed based on the write rules of the first storage unit and the second storage unit, including: when a loss risk event is detected, the currently incomplete window data packet is solidified and the solidification result is synchronized to the second storage unit; during subsequent reading or evidence collection, the integrity of the read window data packet is verified based on the window evidence chain. If a window is found to be missing, the missing window is completed using the non-overwriteable backup in the second storage unit or the missing position identifier is output.
[0138] like Figure 4As shown, in this embodiment, during the drone's flight, the flight status and data writing status are continuously monitored. When an abnormal state that meets preset judgment conditions is detected, an abnormal handling process is initiated according to the writing rules corresponding to the first storage unit and the second storage unit. Specifically, when the abnormal state is determined to be a loss risk event, the window data packet currently in the generation or aggregation process is immediately solidified, that is, the continued updating of the window data packet is terminated, and the generated parameter content and corresponding time identifier are organized into a complete data object. Subsequently, according to the writing rules of the second storage unit, the solidified window data packet is synchronously written to the second storage unit, so that the window data packet is recorded in an overwriteable manner. After the flight ends or when entering the data reading and evidence collection stage, the read window data packets are sequentially and correlated based on the window evidence chain. By comparing the correlation between adjacent windows, it is determined whether there is a missing window data packet. When a missing window is detected, the overwriteable backup corresponding to the missing window is retrieved from the second storage unit first for completion. If completion cannot be completed, the corresponding missing position identifier is output. Through the above processing, the data content of the incomplete window under abnormal conditions can be solidified and preserved in a timely manner. At the same time, the integrity of the data can be verified and located based on the window evidence chain during subsequent reading, thereby completing the data processing closed loop under abnormal scenarios.
[0139] For example, the following numerical example is provided to illustrate the calculation process of redundant backup and loss prevention of UAV flight parameter cyclic recording. This example is only used to explain the calculation link and dimensional relationship. The selected parameters and values are illustrative values and do not represent the actual calibration results or engineering recommended values.
[0140] Set the sampling period Ts=0.02s, i.e., the sampling frequency fs=50Hz, the window duration Lw=2s, and the theoretical number of sampling points per window: Nw=Lw / Ts=2 / 0.02=100. The capacity of the first storage unit M1=1MB=1,048,576 bytes, using a cyclic overwrite writing rule. The capacity of the second storage unit M2=8MB=8,388,608 bytes, using a non-overwrite writing rule. Assume that the size of each parameter unit, including the parameter set and timestamp encoded for one sampling, is bp=64 bytes, and the size of each window packet header field, including the window time range identifier and window sequence identifier, is bh=32 bytes. Then, the size of the data packet of the kth window is Bk=bh+Nw×bp=32+100×64=6,432 bytes.
[0141] The timestamp for the i-th sampling is ti = t0 + i × Ts. Taking t0 = 0s, then t1 = 0.02s, t2 = 0.04s, and t99 = 1.98s. Each sampling yields a parameter vector pi, including attitude angle, angular velocity, position, velocity, voltage, current, and control quantities, forming a parameter unit (ti, pi). Then, window partitioning and window sequence identification are performed. The k-th window covers the following time: ,in, Let be the start time of the k-th window. Let be the end time of the k-th window. When window k=0, the window coverage time is [0,2), containing i=0, 1, ..., 99, a total of 100 points. When window k=1, the window coverage time is [2,4), containing i=100, 101, ..., 199, a total of 100 points.
[0142] If the window should theoretically have 100 sampling points, but actually has 2 missing (e.g., the sampling points corresponding to t=0.60 s and t=1.24 s are lost), the normalized window sequence length remains 100. Placeholders are used to fill the gaps. These placeholders are dimensionless structured markers used for alignment. The perturbation marker δk is obtained by combining the window identity and the time range. A common practice is to quantize / encode the dimensionless field, the corresponding window sequence identifier, and the time field into a bit string and then concatenate them. The window input sequence Xk is segmented; for example, each segment has 25 elements, so the number of segments ns = 100 / 4 = 25. A segment digest is generated for each segment: Hk,j = Hash(Xk,j), where the unit of the segment digest is bits. Let Xk,j represent the segment digest of the j-th segment, where Xk,j represents the j-th segment of the window input sequence Xk, and Hash(·) represents the hash function. A total of 4 segment digests are generated, namely Hk,1, Hk,2, Hk,3, and Hk,4, which are then aggregated into a window digest Sk: Sk=Hash(Hk,1||Hk,2||Hk,3||Hk,4), where || is the concatenation operator used for byte-level concatenation. Adjacent digest pairs (Sk-1,Sk) are taken, and a perturbation sequence is introduced. Association calculation is performed to generate an association verification entry Ck=Hash(Sk-1||Sk||δk), with the unit being bits.
[0143] Dual storage write: The first storage unit (circular overwrite) can hold 163 window data packets (K1=M1 / Bk=163) with a corresponding retention time of T1=K1×Lw=326s. The second storage unit (non-overwrite) can hold 1304 window data packets (K2=M2 / Bk=1304) with a corresponding retention time of T2=K2×Lw=2608s.
[0144] Suppose a loss risk event occurs during flight when window k=120, such as a power outage or storage anomaly. What is the window-level anomaly / loss risk trigger flag α? 120 =1 (dimensionless), the current window is not yet full. N120 = 37 points have been sampled, meaning an anomaly occurred when only 37 sampling points were collected in the 120th window. The window is solidified, and the incomplete window is also encapsulated into a verifiable object with a size of B120 = bh + N120 × bp = 32 + 37 × 64 = 2400 bytes. The solidified result is synchronously written to the second storage unit to ensure that the window can still be retrieved during subsequent evidence collection. During subsequent readings, the continuity of the associated verification entry Ck is checked according to the window order. If a missing window is found (e.g., k=85 should exist but it jumps to k=86), a missing position identifier is output, and an attempt is made to retrieve an overwriteable backup from the second storage unit to complete the window. This missing position identifier is essentially dimensionless index information, i.e., the window number or slot number, consistent with the evidence chain verification structure.
[0145] In addition, the parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the prior art have not been described in detail, so as to avoid excessive elaboration.
[0146] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements 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 method for redundant backup and loss prevention of UAV flight parameter cyclic recording, characterized in that, include: The flight parameter set during the flight of the UAV is obtained with a preset sampling period, the flight parameter set is divided into time windows, and a corresponding window data packet is generated for each time window. The window data packet includes a window time range identifier, a flight parameter sequence, and a window order identifier. Window summary information is generated based on each window data packet, and the current window summary information is associated with the previous window summary information to form a window association verification structure. The window data packet and its window association verification structure are written into two types of storage units, namely a first storage unit and a second storage unit. During flight, when an abnormal state is detected, the abnormality is handled based on the write rules of the first and second storage units; The step of generating window summary information based on each window data packet and associating the current window summary information with the previous window summary information to form a window association verification structure includes: Consistency processing is performed on the flight parameter sequence in each window data packet to generate a normalized window sequence. The consistency processing includes confirming the time order of parameter units and marking missing sampling positions as placeholders. Based on the window sequence identifier and window time range identifier of the window data packet, a perturbation identifier is generated, and the perturbation identifier is combined with the normalized window sequence to form a window input sequence; Based on the window input sequence, generate corresponding window summary information, and bind and store the window summary information with the window sequence identifier; Obtain the window summary information of the current window and the window summary information of the previous window, and perform association calculation based on the disturbance identifier to generate the association verification entry corresponding to the current window; The associated verification entries are registered sequentially according to the window sequence identifier to form a window associated verification structure; Generate corresponding window summary information based on the window input sequence, and bind and store the window summary information with the window sequence identifier, including: The window input sequence is divided into multiple sequence segments according to a preset segmentation rule, and a segment number is assigned to each sequence segment. Fragment summary information is generated for each sequence fragment, and the fragment summary information is associated with the corresponding fragment number and recorded. The fragment summary information is aggregated according to the fragment number order to generate the window summary information, and a submission identifier is generated for the window summary information. The window summary information, submission identifier, and window sequence identifier are encapsulated into a binding entry, and the binding entry is written into a preset summary storage area to complete the binding storage; The step of obtaining the window summary information of the current window and the window summary information of the previous window, and performing association calculation based on the perturbation identifier to generate an association verification entry corresponding to the current window includes: Obtain the window summary information corresponding to the current window and the window summary information corresponding to the previous window, and align them based on the window order identifier to generate adjacent summary pairs; A perturbation sequence is generated based on the perturbation identifier corresponding to the current window, and the perturbation sequence is combined with the adjacent summary pair to form the association calculation input; A first association calculation is performed on the association calculation input to obtain a first association result, and a second association calculation is performed on the association calculation input based on the perturbation sequence to obtain a second association result; The first association result, the second association result, and the window sequence identifier are encapsulated into an association verification entry; The step of sequentially registering the associated verification entries according to the window sequence identifier to form a window associated verification structure includes: The target slot identifier is determined based on the window sequence identifier corresponding to the associated verification entry; Write the associated verification entry into the registration position corresponding to the target slot identifier, and bind the target slot identifier with the associated verification entry; Based on the continuity relationship of adjacent target slot identifiers, it is determined whether there are unregistered slots. If there are unregistered slots, a gap identifier entry is generated and written to the registration position corresponding to the unregistered slot. A freeze identifier is generated for the written associated verification entries and gap identifier entries, and the freeze identifier is associated with the corresponding registration position to form a window associated verification structure.
2. The method for redundant backup and loss prevention of UAV flight parameter cyclic recording as described in claim 1, characterized in that, The process of acquiring a set of flight parameters during the UAV's flight at a preset sampling period, dividing the flight parameter set into time windows, and generating a corresponding window data packet for each time window includes: During the flight of the UAV, a time reference for collecting flight parameters is set, a set of flight parameters is obtained according to the preset sampling period, and a collection timestamp is bound to the corresponding set of flight parameters each time a collection is performed, forming a parameter unit with a time identifier. Based on the acquisition timestamp, the continuously acquired parameter units are arranged in chronological order, and the time window to which the current parameter unit belongs or the start of a new time window is triggered according to the preset window duration. Parameter units that are determined to belong to the same time window are aggregated according to the acquisition order, and the aggregation process of parameter units in the current time window is terminated when a new time window is triggered. After terminating the parameter aggregation process for the current time window, the aggregated parameter units within the time window and their corresponding window time range identifiers are encapsulated together into a window data packet.
3. The method for redundant backup and loss prevention of UAV flight parameter cyclic recording as described in claim 1, characterized in that, The two types of storage units are as follows: the first storage unit writes window data packets according to a preset cyclic overwrite rule, which includes overwriting the earliest window data packet in time order when the storage space reaches a threshold; the second storage unit writes window data packets according to a preset non-overwrite rule, which includes prohibiting the overwrite operation on the already written window data packets after writing, and the cyclic overwrite rule and the non-overwrite rule are different from each other in terms of writing trigger conditions and overwrite behavior.
4. The method for redundant backup and loss prevention of UAV flight parameter cyclic recording as described in claim 1, characterized in that, The step of writing the window data packet and its window association verification structure into two types of storage units respectively includes: The window data packet corresponding to the current window and the associated verification entries in the window association verification structure corresponding to the current window are determined as the set of objects to be written, and an object identifier is assigned to the set of objects to be written. A write plan is generated based on the object identifier, and the write plan includes the write order identifier of the set of objects to be written in the first storage unit and the write order identifier in the second storage unit; According to the writing plan, the set of objects to be written is written to the first writing area of the first storage unit, and a first position identifier is recorded during writing to characterize the writing position of the set of objects to be written in the first storage unit. According to the write plan, the set of objects to be written is written to the second write area of the second storage unit, and a second position identifier is recorded during writing to characterize the write position of the set of objects to be written in the second storage unit. The object identifier, the first position identifier, the second position identifier, and the window sequence identifier are encapsulated into a write binding entry, and the write binding entry is registered as the write record corresponding to the current window.
5. The redundant backup and anti-loss method for cyclic recording of UAV flight parameters as described in claim 4, characterized in that, Generate a write plan based on the object identifier, including: Based on the object identifier, the set of objects to be written is grouped, and within each object group, an internal order identifier is generated according to a preset object sorting rule. A first write order sequence for the first storage unit is generated based on the group order identifier, and a first write order identifier is assigned to the first write order sequence. A second write order sequence for the second storage unit is generated based on the intra-group sequence identifier, and a second write order identifier is assigned to the second write order sequence, wherein the second write order sequence differs from the first write order sequence in the write order of one or more object groups; The object identifier, the first write order identifier, and the second write order identifier are encapsulated into a write plan entry, and the write plan entry is associated with the window order identifier to form a write plan.
6. The method for redundant backup and loss prevention of UAV flight parameter cyclic recording as described in claim 1, characterized in that, During flight, when an abnormal state is detected, the abnormality is processed based on the write rules of the first and second storage units, including: When a loss risk event is detected, the currently incomplete window data packet is solidified and the solidification result is synchronized to the second storage unit. During subsequent reading or evidence collection, the integrity of the read window data packet is verified based on the window evidence chain. If a window is found to be missing, the missing window is completed using the non-overwriteable backup in the second storage unit or the missing location identifier is output.