An air traffic control data playback method and system based on message timing

By employing a four-stage pipeline parallel architecture and multi-level timestamp processing technology, the problems of out-of-order air traffic control data and resource consumption were solved, enabling high-precision, real-time air traffic control data playback and meeting the high-efficiency requirements of air traffic control simulation and training.

CN122332464APending Publication Date: 2026-07-03CHENGDU CIVIL AVIATION AIR TRAFFIC CONTROL SCI & TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610341685.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-19
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing air traffic control data playback technology suffers from problems such as timing distortion caused by out-of-order messages, difficulty in guaranteeing real-time performance, and high resource consumption, which cannot meet the high precision and high efficiency requirements of air traffic control simulation, training, and algorithm verification.

Method used

A four-stage pipeline parallel architecture based on message timing is adopted. Through a two-level timestamp extraction strategy, a sliding time window double threshold sorting algorithm, and a dynamic scheduling algorithm based on the reference time, high-precision sorting and real-time playback of ASTERIX CAT021 monitoring data are achieved. Resource utilization is optimized by combining bounded queues and batch processing mechanisms.

Benefits of technology

It achieves strict control of time error within 1/128 of a second, improves simulation credibility, reduces resource consumption, meets the requirements of high-concurrency tasks, improves processing throughput and startup speed, and adapts to high-density airspace simulation scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122332464A_ABST
    Figure CN122332464A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for playing back air traffic control data based on message timing. The method includes: a reading thread extracting the timestamp and hexadecimal message data of each line of the message based on a two-level timestamp extraction strategy; a decoding thread extracting the message and sorting it using a sliding time window double threshold sorting algorithm before sending it to the decoding queue; a sorting thread transmitting the message data; and a sending thread and a dynamic scheduling algorithm based on a reference time calculating the precise sending time of each message and sending it to the target system for playback. The advantages of this invention are as follows: (1) The playback timing accuracy is naturally matched with the protocol accuracy, and the time error is strictly controlled within 1 / 128 seconds; (2) It effectively solves the trajectory distortion caused by the disorder of the original data; (3) The system resource occupancy rate is low, supporting high-concurrency playback tasks; (4) The startup delay is short, meeting the fast response requirements of the playback system; (5) The processing throughput is high, adapting to high-density air traffic control data playback application scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of air traffic control data management technology, specifically to a method and system for playing back air traffic control data based on message timing. Background Technology

[0002] With the deepening of low-altitude airspace reform and the accelerated digital transformation of the civil aviation air traffic control system in my country, there is an urgent need for high-precision playback of historical data in air traffic control equipment simulation testing, controller training, and algorithm verification. The ASTERIX messages (full name "Full-Purpose Structured European Air Traffic Control Radar Information Exchange Format") generated by the air traffic control surveillance system exhibit significant out-of-order characteristics in historical data files due to factors such as network transmission jitter, time synchronization deviations of multi-source devices, and write delays in the storage system. Actual measurement data shows that the timestamp deviation between adjacent messages can reach hundreds of milliseconds or even several seconds, severely disrupting the spatiotemporal continuity of target trajectories.

[0003] ASTERIX defines two key timestamp fields in its various data types, primarily including: ADS-B (CAT021), used to identify the precise time of location information.

[0004] • I071 data item (Time Applicable to Position): The precise effective time for which the aircraft reports its position information, expressed as elapsed time since midnight in Coordinated Universal Time (UTC), in units of 1 / 128 of a second;

[0005] • I073 data item (location reception time): The time when the ground station received the location message, also expressed as the elapsed time since midnight UTC, in units of 1 / 128 seconds.

[0006] I071 and I073 complement each other: when the aircraft has a high-precision time source (such as GPS synchronization), I071 is provided first; otherwise, I073 is recorded by the ground station. The 1 / 128 second (≈7.8125ms) time precision unit of the two types of timestamps provides a theoretical basis for time synchronization in air traffic control simulation playback.

[0007] Existing air traffic control data playback technology mainly adopts the following two schemes:

[0008] Option 1: Single-threaded sequential playback

[0009] Historical data files are read and decoded sequentially according to storage order and then sent directly to the target system via UDP protocol. This approach is simple to implement but has serious drawbacks: due to the disordered order of the original data, the playback process cannot reproduce the spatiotemporal evolution of the real airspace traffic situation, causing the simulation system's trajectory prediction, collision detection, and other algorithms to fail; at the same time, single-threaded processing is difficult to meet real-time requirements, especially in high-density airspace scenarios (message rate > 5000 messages / second), where the cumulative playback delay can reach several seconds to tens of seconds, failing to meet the stringent time synchronization requirements of air traffic control simulation.

[0010] Option 2: Full preloading, sorting, and replay

[0011] The entire historical data file (usually GB in size) is first loaded into memory. The precise timestamp of each message is extracted and globally sorted. Then, the messages are played back one by one according to the sorting results. This approach can guarantee the accuracy of the time sequence, but it has the problems of high resource consumption and long startup delay: for 1 hour of air traffic control monitoring data (about 2 million messages), the preloading and sorting process takes more than 30 seconds and requires several GB of memory, which cannot meet the actual needs of the training system for "second-level startup and multi-task concurrency".

[0012] In summary, the two traditional air traffic control data playback technologies mentioned above have the following significant drawbacks:

[0013] (1) Timing distortion leads to low simulation credibility: Single-threaded sequential playback does not reorder out-of-order messages, causing "spatiotemporal jumps" in the target trajectory during playback (such as sudden changes in aircraft position or abnormal speed), which seriously affects the training effect of controllers and the accuracy of algorithm verification. The root cause is that the precise timestamps I071 / I073 inside the message are not used for timing correction, but only the file storage order is relied upon, and the inherent relationship between the 1 / 128 second protocol precision unit and the playback precision requirements is not considered.

[0014] (2) Real-time performance is difficult to guarantee: The single-threaded solution has limited processing capacity, and the playback rate is lower than the original data generation rate under high load scenarios, resulting in accumulated playback delays; although the full preloading solution can guarantee the timing, the preprocessing stage takes too long and cannot meet the business requirements of "second-level startup and real-time playback". The root cause is that the serial processing architecture is adopted and the pipeline optimization is not performed for the characteristics of each stage of "reading-decoding-sorting-sending", resulting in unbalanced utilization of I / O waiting, CPU calculation and network transmission resources.

[0015] (3) High resource consumption: Full preloading requires loading GB-level data into memory at once for sorting, which places stringent demands on server memory resources and makes it difficult to support multi-channel concurrent playback tasks. The root cause is the lack of a sliding time window mechanism adapted to the characteristics of empty management data, resulting in either timing distortion (too small window) or excessive resource consumption (too large window). Summary of the Invention

[0016] The purpose of this invention is to provide a method and system for air traffic control data playback based on message timing, in order to solve the following technical problems: the problem of accurate timing restoration of out-of-order messages, the problem of real-time playback in high-throughput scenarios, and the problem of balancing resource consumption and playback quality.

[0017] To achieve the above objectives, in a first aspect, embodiments of the present invention provide a method for replaying air traffic control data based on message timing, comprising:

[0018] For ASTERIX CAT021 monitoring data packets, a read thread uses a two-level timestamp extraction strategy to extract the timestamp and hexadecimal packet data of each line, encapsulates it into triplet data, and sends it into the original packet queue; the triplet data includes the line number, file timestamp, and packet.

[0019] The decoding thread extracts the packets to be sorted from the original packet queue, and sorts the packets to be sorted using a sliding time window double threshold sorting algorithm before sending them into the decoding queue.

[0020] A sorting thread is used to pass the message data in the decoding queue;

[0021] The precise transmission time of each message is calculated using a sending thread and a dynamic scheduling algorithm based on a reference time, and the messages are sent to the target system for playback via UDP non-blocking sockets.

[0022] As a specific implementation of this application, the two-level timestamp extraction strategy is as follows:

[0023] Extract data item I071 first;

[0024] If data item I071 is missing, then data item I073 is extracted;

[0025] The extracted I071 and I073 data items are subjected to time value normalization.

[0026] As a specific implementation of this application, the sliding time window dual threshold sorting algorithm includes: using 4 seconds as the basic window size, and setting a threshold of 500 messages; if either condition is met, sorting within the window is triggered.

[0027] As one specific implementation of this application

[0028] The dynamic scheduling algorithm based on the reference time adopts a two-level timing control strategy of pre-sleep + busy wait, specifically as follows:

[0029] (1) Record the sorting time of the first valid messaget 0 is used as the playback reference time;

[0030] (2) Record the current system time T 0 is used as the start time of playback;

[0031] (3) For the i-th message to be sent, its sorting time is: t i Calculate the expected transmission time:

[0032]

[0033] (4) Real-time detection of the current system time T now Calculate the waiting time

[0034] If Δ T >0.001, execute high-precision sleep: sleep(ΔT - 0.001) and then enter busy wait;

[0035] If 0 < Δ T If the value is ≤0.001, immediately enter busy waiting mode;

[0036] If Δ T ≤0, send immediately and record the time deviation. ;

[0037] 5) Verify playback accuracy, requiring the following:

[0038] .

[0039] As a specific implementation of this application, the air traffic control data playback method adopts a four-stage pipeline parallel architecture; wherein, the four-stage pipeline includes reading, decoding, sorting and sending.

[0040] As a specific implementation of this application, the air traffic control data playback method adopts a pipeline resource optimization mechanism, including: a blocking queue buffer mechanism with a capacity of 2000 between threads, a batch processing mechanism in which the sending thread processes 50 messages in batches, and an abnormal data filtering mechanism for filtering abnormal messages with a time value > 10 seconds.

[0041] Secondly, embodiments of the present invention also provide an air traffic control data playback system based on message timing, comprising:

[0042] The data reading unit is used to extract the timestamp and hexadecimal message data of each line from the ASTERIX CAT021 monitoring data messages using a two-level timestamp extraction strategy. The data is then encapsulated into triplet data and sent to the original message queue. The triplet data includes the line number, file timestamp, and message.

[0043] The data decoding unit is used to extract the unsorted messages from the original message queue using a decoding thread, and to sort the unsorted messages using a sliding time window double threshold sorting algorithm before sending them into the decoding queue.

[0044] A data sorting unit is used to transmit message data in the decoding queue using a sorting thread;

[0045] The data sending unit is used to calculate the precise sending time of each message using a sending thread and a dynamic scheduling algorithm based on a reference time, and to send the messages to the target system for playback via a UDP non-blocking socket.

[0046] Thirdly, embodiments of the present invention also provide another air traffic control data playback system based on message timing, including a processor, an input device, an output device, and a memory, wherein the processor, input device, output device, and memory are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method described in the first aspect.

[0047] The advantages of implementing the embodiments of the present invention are as follows:

[0048] (1) The playback timing accuracy is naturally matched with the protocol accuracy, and the time error is strictly controlled within 1 / 128 second.

[0049] A two-level timestamp extraction strategy (I071 priority / I073 supplement) is adopted, making full use of the 1 / 128-second time precision unit of the timestamp in the ASTERIX protocol. Combined with a two-level timing control strategy of "pre-sleep (ΔT-1ms) + busy wait", a technical closed loop of protocol accuracy and playback accuracy is formed. Actual measurements show that under a high load scenario of 10,000 messages / second, the time deviation of 99.9% of messages is <5ms, and the maximum deviation is ≤7.63ms (<7.8125ms), meeting the mandatory requirement of ICAO Doc 9689 for air traffic control simulation time synchronization error <10ms.

[0050] (2) Effectively solves the problem of trajectory distortion caused by disordered original data and improves the credibility of simulation.

[0051] By employing a dual-trigger mechanism of a 4-second sliding time window and a threshold of 500 messages, packets within the window are locally sorted according to their precise I071 / I073 time. Test data shows that for a dataset with an original out-of-order degree δ > 200ms (containing 1,842,356 messages in this example), the continuity of target trajectory curvature is improved by 83% and the smoothness of roll angle changes is improved by 76% after playback, significantly improving the visual continuity of the flight trajectory and the algorithm's processing performance.

[0052] (3) The system has low resource utilization and supports high-concurrency replay tasks.

[0053] The four-stage pipeline architecture distributes the processing load evenly across multi-core CPUs, coupled with a bounded queue of 2000 capacity and a batch sending mechanism of 50 messages per batch. Real-world testing shows that single-channel playback memory usage remains stable at 45±5MB, with an average CPU utilization of 12.3%. A single server can concurrently run 12 playback tasks without performance degradation, reducing resource consumption by 87% compared to the full preloading solution.

[0054] (4) Short startup delay to meet the rapid response requirements of the training system.

[0055] The streaming processing architecture avoids preloading all data, and the first message can be sent within 200ms after system startup. In a real-world test, a 1-hour air traffic control data (2 million messages) playback task took only 180ms from startup to the output of the first message, which is 166 times faster than the full preloading solution (30 seconds+), meeting the business needs of "second-level switching scenarios" in controller training.

[0056] (5) High processing throughput, suitable for high-density airspace simulation scenarios

[0057] The pipeline stages are executed in parallel, and the decoding thread employs a 4-second window preloading and a batch output strategy of 100 messages per second to eliminate I / O wait bottlenecks. In OpenEuler testing on an Intel i7-10700 platform, a sustained throughput of 12,500 messages per second was achieved. It can stably replay all monitoring data from peak periods in the Chengdu terminal area (message rate 9,800 messages per second) without packet loss or cumulative latency. Attached Figure Description

[0058] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below.

[0059] Figure 1 This is a diagram of a four-stage pipeline parallel processing architecture;

[0060] Figure 2 This is a flowchart of the air traffic control data playback method based on message timing provided in an embodiment of the present invention;

[0061] Figure 3 This is a flowchart of the sliding time window double threshold sorting process;

[0062] Figure 4 This is a time-series scheduling process diagram;

[0063] Figure 5 This is a structural diagram of the air traffic control data playback system based on message timing provided in an embodiment of the present invention;

[0064] Figure 6 yes Figure 5 Another structural diagram of the system shown. Detailed Implementation

[0065] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0066] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0067] The present invention is based on the concept of providing different solutions to the aforementioned technical problems, as detailed below:

[0068] 1. Solving the problem of high-precision timing restoration of out-of-order messages: By first extracting the position applicable time (time_applicability_position) from the I071 data item of the ASTERIX message, and then using the position reception time (time_reception_position) from the I073 data item as a supplement, combined with the sliding time window mechanism, the local optimal sorting of the original out-of-order data is achieved, ensuring the spatiotemporal continuity of the target motion trajectory during playback. The timing error is strictly controlled within 1 / 128 second (≈7.8125ms), forming a technical closed loop with the time precision unit of the ASTERIX protocol timestamp, and meeting the mandatory requirements of ICAO Doc9689 for air traffic control simulation time synchronization.

[0069] 2. Solving the real-time playback problem in high-throughput scenarios: A four-stage pipeline parallel architecture is adopted, which decomposes the data processing flow into four independent threads: reading, decoding, sorting, and sending. A bounded queue with a capacity of 2000 is used to decouple the threads, thereby increasing the system throughput to more than 10,000 messages / second, which meets the simulation needs of high-density airspace such as the Beijing terminal area.

[0070] 3. Solve the problem of balancing resource consumption and playback quality: Design an adaptive time window mechanism (4-second time window + 500 message count dual thresholds) to control memory consumption within 50MB while ensuring timing accuracy, support more than 10 playback tasks to run concurrently on a single server, and significantly improve system resource utilization efficiency.

[0071] The air traffic control data playback method provided in this embodiment of the invention employs, as follows: Figure 1 The diagram illustrates a four-stage pipelined parallel processing architecture. The four stages primarily include reading, decoding, sorting, and sending. Furthermore, to reduce resource consumption, this method incorporates three optimization measures:

[0072] 1. Bounded queue buffer: A blocking queue with a capacity of 2000 is used between threads. When the queue is full, the producer thread sleeps briefly (10ms) to avoid unlimited memory growth;

[0073] 2. Batch processing mechanism: The sending thread processes messages in batches of 50, reducing the number of thread context switches and lowering CPU utilization by 35%.

[0074] 3. Abnormal data filtering: filtering by time value t sort Filter out abnormal messages that are longer than 1000 seconds to prevent erroneous data from interfering with timing scheduling.

[0075] Please refer to Figure 2 The air traffic control data playback method based on message timing provided in this embodiment of the invention includes:

[0076] S1, Reading Phase: The reading thread stream parses the .dat file, extracts the timestamp and hexadecimal message of each line, encapsulates them into a triplet, and sends them into the raw message queue.

[0077] In specific implementation, this embodiment designs a two-level timestamp extraction strategy for monitoring data packets such as ASTERIX CAT021:

[0078] 1. Prioritize retrieving data item I071: Obtain the value of the time_applicability_position field. t 071 This indicates the precise valid time for the aircraft to report its position;

[0079] 2. Supplement and extract data item I073: When I071 is missing, retrieve the value of the time_reception_position field. t 073 This indicates the time when the ground station receives the location message;

[0080] 3. Time value normalization: Perform a modulo operation of 86400 seconds (24 hours) on the extracted time values ​​to eliminate numerical jumps caused by crossing the UTC midnight cycle.

[0081]

[0082] in, t file This is the converted second value for the file record time. Define the message out-of-order metric:

[0083]

[0084] when If the message is determined to be significantly out of order, timing correction is required. Let k be the time deviation value of the k-th flight. This represents the actual running time (in milliseconds) of the k-th flight. The baseline time for scheduling (in milliseconds).

[0085] It should be noted that the encapsulated triple includes the line number, file timestamp, and message.

[0086] S2, Decoding Stage: The decoding thread retrieves the raw message from the queue, calls the ASTERIX parsing library to convert it into structured data, extracts the precise time according to the I071 priority / I073 supplement strategy, performs local sorting according to the sliding window mechanism, and sends it into the decoding queue.

[0087] In practical implementation, to avoid the high resource consumption of full sorting, this embodiment designs a sliding time window dual-threshold sorting algorithm: a basic window size of 4 seconds (based on the typical scanning cycle of air traffic control radar of 2-5 seconds), and a threshold of 500 messages (based on the peak message density of 125 messages / second × 4 seconds in the Chengdu terminal area). Local sorting within the window is triggered when either condition is met. Please refer to the detailed algorithm flowchart. Figure 3 It should be noted that the sorting within the window uses the quicksort algorithm, with a time complexity of O(nlogn). For a typical window of 500 messages, the sorting time is less than 5ms, which meets the real-time requirements.

[0088] S3, Sorting stage: The sorting thread directly transmits the sorted data (the decoding thread has already completed the sorting), and only performs queue forwarding and statistics, reducing processing latency.

[0089] S4, Sending Phase: The sending thread dynamically calculates the precise sending time of each message based on the reference time, and sends it to the target system via UDP non-blocking socket, with real-time monitoring of time deviation to ensure ≤1 / 128s.

[0090] In specific implementation, to achieve accurate playback with a time error ≤ 1 / 128s, this embodiment designs a dynamic scheduling algorithm based on the reference time. Its core lies in forming a technical closed loop by utilizing the 1 / 128-second time precision unit of the I071 / I073 timestamps and the playback accuracy requirements:

[0091] (1) Record the sorting time of the first valid message t 0 is used as the playback reference time;

[0092] (2) Record the current system time T 0 is used as the start time of playback;

[0093] (3) For the i-th message to be sent, its sorting time is: t i Calculate the expected transmission time:

[0094]

[0095] (4) Real-time detection of the current system time T now Calculate the waiting time

[0096] If Δ T >0.001, execute high-precision sleep: sleep(ΔT - 0.001) and then enter busy wait;

[0097] If 0 < Δ T If the value is ≤0.001, immediately enter busy waiting mode;

[0098] If Δ T ≤0, send immediately and record the time deviation. .

[0099] (5) Verify playback accuracy, requiring the following:

[0100]

[0101] The timing scheduling process is as follows: Figure 4 As shown.

[0102] As described above, implementing this embodiment of the invention involves a reading thread extracting the timestamp and hexadecimal message data for each line of the message based on a two-level timestamp extraction strategy; a decoding thread extracting the message and sorting it using a sliding time window double threshold sorting algorithm before sending it to the decoding queue; a sorting thread transmitting the message data; and a sending thread and a dynamic scheduling algorithm based on a reference time calculating the precise sending time of each message and sending it to the target system for playback. In other words, the read messages are first reordered based on their timing, and the target system plays back the reordered messages. Furthermore, since the original timestamps of the messages are unreliable, the solution provided by this invention cannot rely on the original timestamps during playback. Therefore, the main advantages of this invention are as follows:

[0103] (1) The playback timing accuracy is naturally matched with the protocol accuracy, and the time error is strictly controlled within 1 / 128 second.

[0104] A two-level timestamp extraction strategy (I071 priority / I073 supplement) is adopted, making full use of the 1 / 128-second time precision unit of the timestamp in the ASTERIX protocol. Combined with a two-level timing control strategy of "pre-sleep (ΔT-1ms) + busy wait", a technical closed loop of protocol accuracy and playback accuracy is formed, breaking through the accuracy limitation of the operating system's sleep function. Actual measurements show that under a high load scenario of 10,000 messages / second, the time deviation of 99.9% of messages is <5ms, and the maximum deviation is ≤7.63ms (<7.8125ms), meeting the mandatory requirement of ICAO Doc 9689 for air traffic control simulation time synchronization error <10ms.

[0105] (2) Effectively solves the problem of trajectory distortion caused by disordered original data and improves the credibility of simulation.

[0106] By employing a dual-trigger mechanism of a 4-second sliding time window and a 500-message threshold, messages within the window are locally sorted according to their precise I071 / I073 time. Test data shows that for a dataset with an original out-of-order degree δ > 200ms (containing 1,842,356 messages), the continuity of the target trajectory curvature is improved by 83% and the smoothness of the roll angle change is improved by 76% after playback, significantly improving the visual continuity of the flight trajectory and the algorithm's processing performance.

[0107] (3) The system has low resource utilization and supports high-concurrency replay tasks.

[0108] The four-stage pipeline architecture distributes the processing load evenly across multi-core CPUs, coupled with a bounded queue of 2000 capacity and a batch sending mechanism of 50 messages per batch. Real-world testing shows that single-channel playback memory usage remains stable at 45±5MB, with an average CPU utilization of 12.3%. A single server can concurrently run 12 playback tasks without performance degradation, reducing resource consumption by 87% compared to the full preloading solution.

[0109] (4) Short startup delay to meet the rapid response requirements of the training system.

[0110] The streaming processing architecture avoids preloading all data, and the first message can be sent within 200ms after system startup. In a real-world test, a 1-hour air traffic control data (2 million messages) playback task took only 180ms from startup to the output of the first message, which is 166 times faster than the full preloading solution (30 seconds+), meeting the business needs of "second-level switching scenarios" in controller training.

[0111] (5) High processing throughput, suitable for high-density airspace simulation scenarios

[0112] The pipeline stages are executed in parallel, and the decoding thread adopts a 4-second window preloading and 100-message-per-batch output strategy to eliminate I / O wait bottlenecks. Tested on an Intel i7-10700 platform, the sustained throughput reached 12,500 messages / second, and it can stably replay full monitoring data from peak periods in the Beijing terminal area (message rate 9,800 messages / second) without packet loss or cumulative latency.

[0113] Furthermore, the technical solution of this invention has been verified through a Python prototype system. The system runs in a WSL2+Openeuler24.04 environment, with the target receiver being an air traffic control simulation platform on a Windows host (IP: 172.24.96.1). Actual test data shows that for the CH1.dat file containing 20,259,263 messages, the maximum playback time error is 0.245ms (<1 / 4000s), the average CPU utilization is 0.28%, and the peak memory usage is 12.06M.

[0114] Based on the same inventive concept, embodiments of the present invention also provide an air traffic control data playback system based on message timing, such as... Figure 5 As shown, it includes:

[0115] The data reading unit is used to extract the timestamp and hexadecimal message data of each line from the ASTERIX CAT062 / 065 monitoring data messages using a two-level timestamp extraction strategy. The data is then encapsulated into triplet data and sent to the original message queue. The triplet data includes the line number, file timestamp, and message.

[0116] The data decoding unit is used to extract the unsorted messages from the original message queue using a decoding thread, and to sort the unsorted messages using a sliding time window double threshold sorting algorithm before sending them into the decoding queue.

[0117] A data sorting unit is used to transmit message data in the decoding queue using a sorting thread;

[0118] The data sending unit is used to calculate the precise sending time of each message using a sending thread and a dynamic scheduling algorithm based on a reference time, and to send the messages to the target system for playback via a UDP non-blocking socket.

[0119] It should be noted that the specific workflow of this embodiment is described in the foregoing method embodiment section, and will not be repeated here.

[0120] Furthermore, another embodiment of the present invention provides another air traffic control data playback system based on message timing, such as... Figure 6 As shown, the system may include one or more processors 101, one or more input devices 102, one or more output devices 103, and a memory 104. The processors 101, input devices 102, output devices 103, and memory 104 are interconnected via a bus 105. The memory 104 stores a computer program, which includes program instructions. The processor 101 is configured to invoke the program instructions to execute the method described in the above-described method embodiment.

[0121] It should be understood that, in this embodiment of the invention, the processor 101 may be a central processing unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0122] Input device 102 may include a keyboard, etc., and output device 103 may include a display (LCD, etc.), a speaker, etc.

[0123] The memory 104 may include read-only memory and random access memory, and provides instructions and data to the processor 101. A portion of the memory 104 may also include non-volatile random access memory. For example, the memory 104 may also store device type information.

[0124] In specific implementations, the processor 101, input device 102, and output device 103 described in the embodiments of the present invention can execute the implementation methods described in the embodiments of the air traffic control data playback method based on message timing provided in the present invention, which will not be repeated here.

[0125] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0126] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, or may be electrical, mechanical or other forms of connection.

[0127] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.

[0128] Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units. When using each module, user information is collected and stored only with the user's full authorization and in compliance with relevant laws and regulations, protecting the security and privacy of user data, and strictly prohibiting unauthorized access; data processing will be conducted within the scope stipulated by law and will not exceed the purpose and scope authorized by the user; at the same time, users have the rights to access, correct, delete, restrict processing, and refuse their personal data; and must strictly comply with applicable laws and regulations and conduct compliance reviews.

[0129] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0130] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for air traffic control data playback based on message timing, characterized in that, include: For ASTERIX CAT021 monitoring data packets, a read thread uses a two-level timestamp extraction strategy to extract the timestamp and hexadecimal packet data of each line, encapsulates it into triplet data, and sends it into the original packet queue; the triplet data includes the line number, file timestamp, and packet. The decoding thread extracts the packets to be sorted from the original packet queue, and sorts the packets to be sorted using a sliding time window double threshold sorting algorithm before sending them into the decoding queue. A sorting thread is used to pass the message data in the decoding queue; The precise transmission time of each message is calculated using a sending thread and a dynamic scheduling algorithm based on a reference time, and the messages are sent to the target system for playback via UDP non-blocking sockets.

2. The air traffic control data playback method of claim 1, wherein, The two-level timestamp extraction strategy is as follows: Extract data item I071 first; If data item I071 is missing, then data item I073 is extracted; The extracted I071 and I073 data items are subjected to time value normalization.

3. The air traffic control data playback method of claim 1, wherein, The sliding time window dual threshold sorting algorithm includes: using a basic window size of 4 seconds, and setting a threshold of 500 messages. If either condition is met, sorting within the window is triggered.

4. The air traffic control data playback method as described in claim 1, characterized in that, The dynamic scheduling algorithm based on the reference time adopts a two-level timing control strategy of pre-sleep + busy wait, specifically as follows: 1) Record the sorting time of the first valid message. t 0 is used as the playback reference time; 2) Record the current system time T 0 is used as the start time of playback; 3) For the i-th message to be sent, its sorting time is: t i Calculate the expected transmission time: 4) Real-time detection of the current system time T now Calculate the waiting time If ΔT > 0.001, execute high-precision sleep: sleep(ΔT - 0.001) and then enter busy wait; If 0 < ΔT ≤ 0.001, proceed directly to busy waiting; If ΔT≤0, send immediately and record the time deviation. ; 5) Verify playback accuracy, requiring the following: 。 5. The air traffic control data playback method as described in claim 1, characterized in that, The air traffic control data playback method adopts a four-stage pipeline parallel architecture; the four-stage pipeline includes reading, decoding, sorting and sending.

6. The air traffic control data playback method as described in claim 5, characterized in that, The air traffic control data playback method adopts a pipeline resource optimization mechanism, including: a blocking queue buffer mechanism with a capacity of 2000 between threads, a batch processing mechanism in which the sending thread processes 50 messages in batches, and an abnormal data filtering mechanism that filters abnormal messages with a time value > 10 seconds.

7. An air traffic control data playback system based on message timing, characterized in that, include: The data reading unit is used to extract the timestamp and hexadecimal message data of each line from the ASTERIX CAT021 monitoring data messages using a two-level timestamp extraction strategy. The data is then encapsulated into triplet data and sent to the original message queue. The triplet data includes the line number, file timestamp, and message. The data decoding unit is used to extract the unsorted messages from the original message queue using a decoding thread, and to sort the unsorted messages using a sliding time window double threshold sorting algorithm before sending them into the decoding queue. A data sorting unit is used to transmit message data in the decoding queue using a sorting thread; The data sending unit is used to calculate the precise sending time of each message using a sending thread and a dynamic scheduling algorithm based on a reference time, and to send the messages to the target system for playback via a UDP non-blocking socket.

8. An air traffic control data playback system based on message timing, characterized in that, The system includes a processor, an input device, an output device, and a memory, which are interconnected. The memory is used to store a computer program, which includes program instructions. The processor is configured to invoke the program instructions to execute the method as described in claim 6.