Unmanned aerial vehicle state recognition and tracking system based on distributed stream computing framework
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA TELECOM DIGITAL INTELLIGENCE TECH CO LTD
- Filing Date
- 2026-05-21
- Publication Date
- 2026-06-19
Smart Images

Figure CN122241130A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) monitoring technology, and specifically to a UAV status recognition and tracking system based on a distributed streaming computing framework. Background Technology
[0002] With the rapid development of drone technology, drones are increasingly widely used in both military and civilian fields. This widespread use has raised significant security concerns on multiple levels. In the public safety sector, incidents of uncontrolled drone crashes and interference with flight takeoffs and landings are frequent. In particular, drones, due to their small size, high maneuverability, and stealth capabilities, pose a potential threat to public safety. For example, drones, by virtue of their low-altitude flight characteristics, can evade routine surveillance, easily approach private areas, and conduct high-precision photography, leading to the leakage of confidential information. These issues highlight the profound threat that the widespread use of drones poses to public order.
[0003] Comprehensive management and control of drone flight safety has become a technological challenge. Currently, drone status identification and tracking mainly employ the following technical solutions:
[0004] Existing technical solutions (A. Hamdi, F. Salim and DY Kim, "DroTrack: High-speed Drone-based Object Tracking Under Uncertainty," 2020 IEEE International Conference on Fuzzy Systems (FUZZ-IEEE), Glasgow, UK, 2020, pp. 1-8) are mainly based on single-machine vision tracking systems, such as the DroTrack framework, which uses fuzzy C-means segmentation and convolutional neural networks for target recognition. Although they can achieve high processing speeds (1000 frames / second), they are limited by the processing power of a single machine and cannot support large-scale simultaneous tracking of multiple targets. Furthermore, they lack fault tolerance when facing complex flight environments.
[0005] Existing technical solutions (Z. Cao, Z. Huang, L. Pan, S. Zhang, Z. Liu and C. Fu, "TCTrack: Temporal Contexts for Aerial Tracking," 2022 IEEE / CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 2022, pp. 14778-14788) propose tracking methods based on temporal context, such as the TCTrack system. It improves tracking accuracy through online temporal adaptive convolution and temporal Transformer, with a processing speed of approximately 27 frames per second. However, its centralized architecture has performance bottlenecks when processing large amounts of UAV data, and cannot meet real-time requirements.
[0006] Chinese patent application CN113741506A, published on December 3, 2021, discloses a method and apparatus for a drone to follow a vehicle. It proposes a tracking system based on communication cooperation, such as a drone following scheme using V2X communication. The tracking is achieved by relying on information interaction between the vehicle terminal and the drone. However, this scheme is only applicable to specific cooperative scenarios and has limited monitoring capabilities for autonomously flying drones.
[0007] The Chinese patent application with publication number CN103237195A and publication date of August 7, 2013 discloses a real-time transmission and tracking system for target images, which includes a target image processing module, an image encoding and compression module, etc. It can realize the capture and real-time transmission of moving targets, but its architecture is relatively centralized, and there are data processing bottlenecks and single-point failure risks when facing large-scale, multi-target monitoring scenarios.
[0008] The above-mentioned existing technical solutions all have the following shortcomings: (1) The system architecture is mostly centralized or small-scale cluster, which is difficult to support simultaneous monitoring of large-scale UAVs; (2) The data processing method mostly adopts batch processing or frame-level processing, which is obviously insufficient in terms of real-time performance; (3) The system has limited expansion capabilities and cannot flexibly adjust computing resources according to the monitoring scale requirements; (4) The fault tolerance capability is insufficient, and there is a risk of single point of failure, which affects the stability of the system.
[0009] Therefore, there is an urgent need for a drone status recognition and tracking system based on a distributed architecture, supporting real-time streaming data processing, and possessing good scalability and fault tolerance, in order to meet the actual needs of modern large-scale drone monitoring and management. Summary of the Invention
[0010] This invention addresses the shortcomings of existing technologies by solving technical problems such as insufficient real-time performance, limited scalability, and poor fault tolerance in existing UAV status recognition and tracking systems. It provides a UAV status recognition and tracking system based on a distributed streaming computing framework, enabling efficient, reliable, and scalable UAV monitoring.
[0011] To achieve the above objectives, the present invention adopts the following technical solution: A UAV state recognition and tracking system based on a distributed streaming computing framework includes: The data access module is used to collect and preprocess drone detection data; The time window feature extraction module is used to extract features from preprocessed UAV detection data using a sliding window mechanism; The automatic state transition module is used to identify and transition the flight state of the UAV based on the extracted features; The trajectory tracking module is used to calculate and predict the drone's trajectory in real time based on the extracted features; The results output module is used to standardize and distribute the drone's flight status and drone motion trajectory tracking results in real time.
[0012] To optimize the above technical solution, the specific measures also include: Furthermore, the data access module constructs a scalable data acquisition architecture through distributed message queue technology. The data sources include radar detection data, radio protocol parsing data, and TDOA time difference positioning data, supporting parallel access from multiple data sources. The radio protocol parsing data includes communication information between the UAV and the remote controller, as well as device identification. The TDOA time difference positioning data specifically includes the UAV's three-dimensional coordinate information. A topic-based message queue distribution mechanism is adopted, which assigns an independent message topic to each type of data source. The message queue configuration includes offset management strategy and fault recovery mechanism. During data transmission, a partitioned routing strategy is adopted, which partitions the data source according to the data source type and device identifier. The preprocessing specifically includes: The system utilizes a JSON data parsing mechanism to handle diverse data formats from different data sources. The parser first performs data format validation and exception handling, and then calls the corresponding preprocessing functions based on the data source type. Radar detection data preprocessing includes coordinate system transformation and timestamp standardization; radio protocol parsing data preprocessing includes equipment association information extraction, frequency parameter parsing, and communication quality assessment; and TDOA time difference positioning data preprocessing includes positioning accuracy correction, multipath effect compensation, and coordinate unification. The system fuses the position information provided by radar detection data and the UAV's three-dimensional coordinate information provided by TDOA time difference positioning data to obtain a unified format position data stream. Each position data stream contains a timestamp, latitude and longitude coordinates, UTM coordinates, altitude information, and a fusion identifier. Preprocessing also includes a data standardization process, which includes timestamp alignment, coordinate system unification, data type conversion, and missing value imputation. At the same time, a globally unique identifier and batch number are generated for each data record.
[0013] Furthermore, the feature extraction specifically includes: A sliding window mechanism is used to calculate the motion parameters of the current UAV, which are then used to identify the UAV's state and predict its trajectory. The specific steps for calculating the motion parameters of the current UAV using the sliding window mechanism are as follows: The window size is 5 seconds, the sliding step is 1 second, the data out-of-order tolerance time is 500 milliseconds, and the window triggering mechanism is based on event time and water level advancement strategy. When the water level exceeds the window boundary or new data is received in the window, the trajectory calculation process is automatically triggered. First, all data records in the window are sorted by timestamp, and motion parameters are calculated based on the UAV's UTM coordinates. Motion parameters include speed and heading. Speed is calculated by dividing the Euclidean distance by the time difference, using the following formula: ,in, For the speed of the drone, express UTM coordinates of the drone yes The UTM coordinates of the UAV are recorded at all times; the heading is calculated using the arctangent function, which calculates the heading angle by the ratio of the difference between the Y and X coordinates, and then converts it into a standard heading representation from 0 to 360 degrees. The formula is as follows: In the formula, It is the heading angle of the drone.
[0014] Furthermore, the automatic state transition module includes a first record state memory, a last record state memory, and a timer state memory; The first record state memory stores basic information from the first signal detection, including starting coordinates, timestamp, and device identifier, used to calculate cumulative flight distance and duration; the last record state memory stores motion information from the previous data point, including timestamp, UTM coordinates, speed, and heading, used for continuous monitoring; the timer state memory is used for landing detection. The specific steps for identifying and converting the drone's flight state based on the extracted features are as follows: Maintain the status of the first record, the status of the last record, and the timer status. First, check the contents of the first record state memory. If the first record state memory returns null, it means there is no first record, and the current drone state is determined to be takeoff state. Update the first record state and the last record state. If the first record state memory contains the first record state, the drone state is determined to be in flight. Update the last record state and obtain the event timestamp of the current data. Check if there is an old timer record in the timer state memory. If there is, cancel the old timer and register a new timer. Calculate the new timer trigger time, which is the event timestamp of the current data plus 45000 milliseconds. Store this time in the timer state memory and register an event time-based timer with the Flink runtime for automatic detection of landing state. When no new data arrives within 45000 milliseconds, the landing state transition is automatically triggered, and the current drone state is determined to be landing state.
[0015] Furthermore, the real-time calculation and prediction of the UAV's trajectory based on the extracted features specifically involves: Based on the current motion parameters of the UAV and the Kalman filter algorithm, the UAV trajectory is predicted as follows: The four-dimensional state vector is composed of the X-axis coordinates, Y-axis coordinates, the drone's velocity, and the drone's heading angle in the UTM coordinate system. The state vector is updated over time using a state prediction equation, which is as follows:
[0016] In the formula, It is the predicted state vector at time k. It is the state transition matrix, which contains a time interval parameter to accommodate different data sampling frequencies. It is the optimal state estimate at time k-1; The state covariance matrix is predicted by adding the process noise covariance to the quadratic transformation of the state transition matrix, as shown in the following formula:
[0017] in, Let k be the state covariance matrix predicted at time k. This is the estimated state covariance matrix from the previous time step. It is the state transition matrix, where the superscript T denotes transpose. The process noise covariance matrix; The observation residual, which is the difference between the actual observed value and the predicted observed value, is calculated using the following formula:
[0018] In the formula, It is the observation residual. These are the actual state vector observations. The observation matrix is used to predict the state vector at time k. Mapped to the observation space; Calculate the Kalman gain:
[0019] In the formula, R is the Kalman gain matrix, and R is the observation noise covariance matrix. The value of the observation noise covariance matrix is dynamically adjusted according to the statistical characteristics of the observation residuals. Then, the optimal update of the state estimate is achieved through the Kalman gain matrix, as shown in the following formula:
[0020] In the formula, It is the optimal state estimate at time k; State covariance update is achieved through the following formula:
[0021] In the formula, It is the estimated state covariance matrix at time k. It is the Kalman gain matrix. For the observation matrix, It is the state covariance matrix predicted at time k; The reasonableness of the observation data is judged by Mahalanobis distance. When the Mahalanobis distance exceeds the preset threshold, the observation weight is reduced or abnormal observations are rejected. Mahalanobis distance The calculation formula is as follows:
[0022] In the formula, S is the observation residual, and S is the residual covariance matrix; When numerical anomalies occur during the filtering calculation, the original observation data is directly output as the filtering result, and the state covariance update formula in Joseph form is used:
[0023] In the formula, It is the estimated state covariance matrix at time k. It is the Kalman gain matrix. For the observation matrix, R is the state covariance matrix predicted at time k; R is the observation noise covariance matrix. Otherwise, determine whether the trace of the state covariance matrix exceeds a preset threshold. If it does, the state covariance matrix is automatically reset to the standard initial value; if it does not exceed the threshold, the current state covariance matrix is maintained. Estimating the optimal state at time k Extract the UTM coordinates, speed, and heading angle of the drone for real-time visualization.
[0024] Furthermore, the system also includes a device association module, which employs an intelligent association and recognition algorithm based on multi-dimensional feature fusion to match UAV data with remote controller data in order to provide the pilot's location; The time window feature extraction module is also used to extract composite features within the time window, including monitoring site identifier, batch number, device identifier, detection distance, intrusion start time, duration, data packet sequence number, and drone speed; and to generate composite feature UUIDs through string concatenation and hashing algorithms of composite features. The specific steps for matching drone data with remote controller data are as follows: When remote control data is received, it is simultaneously stored in both the timestamp index state memory and the UUID index state memory. The timestamp index state memory stores the complete remote control data record with the current timestamp as the key, while the UUID index state memory stores identical record copies with the generated composite feature UUID as the key. The timestamp index state memory is used to support general matching queries, while the UUID index state memory is used to support exact matching queries. A cleanup timer based on event time is registered, with the cleanup time set to the current timestamp plus 5000 milliseconds, to automatically clean up expired associated data. When drone data is received, a general matching is first performed based on the batch number and device identifier. The specific process of general matching is as follows: all remote controller data records in the timestamp index state memory are traversed, and the remote controller data record with the latest timestamp and matching batch number and device identifier is selected as the candidate association result. The actual coordinate position of the remote controller is obtained and added to the drone data record. Then, the system performs a precise matching query in the UUID index state memory, using the composite feature UUID as the query key value to find the remote controller data record that matches perfectly. The actual coordinate position of the remote controller is obtained and added to the drone data record. The precise matching result is used first. When the precise matching is successful, the general matching result is automatically overwritten. When the precise matching fails, the system falls back to the general matching result. If both matching strategies fail, the system uses the drone coordinates as the default value of the remote controller's coordinate position.
[0025] Furthermore, the standardized output and real-time distribution of the drone's flight status and trajectory tracking results specifically involves: Convert the takeoff status to a status code of value 1, the in-flight status to a status code of value 2, and the landing status to a status code of value 3. A unified timestamp standard is adopted to convert internal timestamps into a standard date and time format, while retaining the original timestamps for time series analysis; Convert the Kalman-filtered UTM planar coordinates to the standard WGS84 geographic coordinate format; Add complete traceability information to each output record, including batch number, unique device identifier, processing timestamp, and data source identifier; After the flight status and trajectory tracking results of the UAV are standardized, they are output using a single-channel or multi-channel parallel output mechanism, supporting multiple output methods such as message queue, HTTP interface and local storage. The message queue adopts distributed message queue technology, and achieves reliable data transmission through producer connection pool and message acknowledgment mechanism. It is configured with multiple message queue cluster addresses as backup connections, and automatically switches to the backup cluster when the main message queue is unavailable. The HTTP interface implements real-time status push through a RESTful API, sending POST requests to a pre-configured target URL. The POST request carries JSON-formatted status recognition and trajectory tracking results. The HTTP interface output mechanism integrates retry strategies and exception handling. When there is a network error or the target service is unavailable, retry operations are automatically performed. The number of retries and the interval time are configured according to application requirements. JSON serialization is used during data transmission, and floating-point precision is controlled. The local storage output method serves as a backup data protection mechanism, storing critical status identification results and trajectory data in the local file system. Local storage employs file rotation and compression mechanisms to prevent unlimited growth of storage space, while retaining historical data for fault recovery and data analysis. The selection and configuration of output channels are controlled by system parameters, supporting multiple operating modes such as single-channel output, multi-channel parallel output, and fault switching.
[0026] Furthermore, the trajectory tracking module also includes a trajectory continuity verification subunit and a trajectory quality control subunit; The trajectory continuity verification subunit is used to perform temporal continuity verification and spatial continuity verification during the prediction of UAV trajectory. The time continuity verification specifically involves limiting the time interval for calculating the trajectory to a preset range. When the time interval exceeds the preset range, the default time interval is used for trajectory calculation. The verification of spatial continuity is specifically as follows: The instantaneous velocity of the UAV is calculated by measuring the displacement distance and time interval between preceding and following data points, and then compared with historical velocity records. When the velocity change exceeds the physical acceleration limit, the historical velocity value is used as the current velocity estimate. When the time interval Δt exceeds a preset threshold, trajectory breakage is triggered. Spatial continuity verification is based on physical motion constraints, calculating the maximum possible displacement between adjacent data points. , This indicates the upper limit of speed; when the actual displacement exceeds the maximum possible displacement, it is marked as an abnormal trajectory. The trajectory quality control subunit is used for trajectory quality assessment and automatic marking and correction of trajectory anomalies; The trajectory quality assessment specifically includes: The confidence score is calculated based on three evaluation metrics: prediction residual, trajectory smoothness, and observation frequency, using the following formula:
[0027] In the formula, It's the confidence level. It is the weight of the observation frequency score. It is the observation frequency score. These are the weights for predicting the residual scores. It predicts the residual score. It is the weight of the trajectory smoothness score. It is the trajectory smoothness score; The automatic marking and correction of trajectory anomalies are as follows: Anomalies deviating from the normal trajectory pattern are identified by statistical analysis methods, and trajectory correction is performed using interpolation algorithms. Moving average filtering is used to eliminate high-frequency noise in the trajectory. Missing segments of the trajectory are filled in by linear interpolation or polynomial interpolation, with the interpolation method adaptively selected based on the length of the missing segment and the characteristics of the surrounding trajectory.
[0028] Furthermore, the system also includes: a monitoring system interface, a data analysis platform interface, an emergency response system interface, and an interface management module; The monitoring system interface is used for real-time status change notifications and alarm triggering. When a drone status change or abnormal trajectory is detected, the system automatically generates a status change event and pushes it to the monitoring platform through the monitoring system interface. The data analysis platform interface is used to output historical trajectory data and status statistics in batches. The system regularly summarizes and statistically analyzes the drone's flight mode, status transition frequency, and trajectory characteristics, and transmits them to the big data analysis platform in batches through the data analysis platform interface. The data format adopts standard CSV or JSON format and supports data compression and fragmented transmission. The emergency response system interface is used to handle the real-time distribution of abnormal status and threat warnings. When the system detects abnormal behavior of the drone or its entry into a sensitive area, it triggers the emergency response process. The emergency interface adopts a high-priority message transmission mechanism. The interface management module is used for monitoring the connection status of interfaces, statistics on transmission performance, and automatic fault recovery. By monitoring the health status of each interface in real time, it can promptly detect and handle interface anomalies.
[0029] The beneficial effects of this invention are: (1) Excellent real-time performance and predictive ability This invention utilizes a real-time processing architecture built upon a distributed streaming computing framework, achieving millisecond-level state transition response capabilities. The average processing latency of the state identification module and the end-to-end response time for state transition events are both controlled within milliseconds, meeting the stringent timeliness requirements of real-time monitoring and emergency response. Compared to traditional batch processing or near-real-time systems, the response speed is improved by more than an order of magnitude.
[0030] The trajectory prediction capability is significantly enhanced through an improved Kalman filter algorithm. A dynamic noise adjustment mechanism adaptively adjusts the filter parameters based on the UAV's real-time flight speed, enabling the filter to maintain optimal performance under different flight conditions. In standard test scenarios, trajectory prediction accuracy is significantly improved compared to traditional Kalman filtering, position prediction error is reduced, and velocity estimation accuracy is enhanced.
[0031] The sliding window mechanism, with its configured window size and sliding step parameters, achieves low-latency processing while ensuring trajectory continuity. The single-pass optimization strategy for motion parameter calculation avoids the performance overhead of repeated sorting and multiple loops, significantly improving processing efficiency. The system can support real-time calculation and processing of multiple trajectory points per second, meeting the performance requirements of large-scale monitoring scenarios.
[0032] (2) The robustness of the system is comprehensively enhanced. This invention achieves a comprehensive improvement in system robustness through multi-layered anomaly handling and fault tolerance mechanisms. The covariance constraint mechanism integrated into the Kalman filter module effectively prevents numerical divergence. When an anomaly occurs in the filtering calculation, the system automatically switches to a degraded processing mode, using the original observation data as the output, ensuring the continuity of the processing flow and significantly shortening the anomaly recovery time.
[0033] The automatic cleanup function of the state management mechanism uses timers to promptly clean up expired data, preventing memory leaks during long-term operation. During stress testing lasting several days, system memory usage remained stable, with no performance degradation observed. The multi-state verification mechanism effectively identifies and handles abnormal data through time consistency and spatial continuity checks, improving the detection rate of data quality anomalies.
[0034] The distributed streaming processing architecture is built on a framework, offering high availability and scalability. The system supports multi-node deployment and automatic failover, significantly reducing recovery time for single-node failures. Data processing capacity can be linearly scaled according to load demand. Under peak load conditions, the system can simultaneously handle concurrent monitoring of multiple drones, resulting in a significant increase in throughput compared to traditional centralized architectures.
[0035] Through the above-mentioned technological innovations and system optimizations, this invention has achieved a comprehensive improvement in accuracy, real-time performance, and reliability in the field of real-time status recognition and trajectory tracking of unmanned aerial vehicles (UAVs), providing an advanced technical solution for low-altitude safety supervision and intelligent UAV management. Attached Figure Description
[0036] Figure 1 This is a framework diagram of the UAV state recognition and tracking system based on a distributed streaming computing framework proposed in this invention.
[0037] Figure 2 This is a flight state transition timing diagram.
[0038] Figure 3 This is the processing flowchart of the automatic state transition module. Detailed Implementation
[0039] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0040] Example 1 This invention proposes a UAV state recognition and tracking system based on a distributed streaming computing framework. The structure of the system is as follows: Figure 1 As shown, it includes: The data access module is used to collect and preprocess drone detection data; The time window feature extraction module is used to extract features from preprocessed UAV detection data using a sliding window mechanism; The automatic state transition module is used to identify and transition the flight state of the UAV based on the extracted features; The trajectory tracking module is used to calculate and predict the drone's trajectory in real time based on the extracted features; The results output module is used to standardize and distribute the drone's flight status and drone motion trajectory tracking results in real time.
[0041] The data access module constructs a scalable data acquisition architecture through distributed message queue technology. The data sources include radar detection data, radio protocol parsing data, and TDOA time difference positioning data, supporting parallel access from multiple data sources. The radio protocol parsing data includes communication information between the UAV and the remote controller, as well as device identification. The TDOA time difference positioning data specifically includes the UAV's three-dimensional coordinate information. A topic-based message queue distribution mechanism is adopted, assigning independent message topics to each type of data source, and achieving high-throughput data access through multiple concurrent consumer connections. The message queue configuration includes offset management strategies and fault recovery mechanisms to ensure data integrity in the event of network anomalies or system restarts. During data transmission, a partitioned routing strategy is employed, partitioning data sources based on data source type and device identifier, providing data locality guarantees for subsequent status identification and trajectory tracking.
[0042] The specific process for preprocessing UAV detection data is as follows: The system utilizes a JSON data parsing mechanism to handle diverse data formats from different data sources. The parser first performs data format validation and exception handling, and then calls the corresponding preprocessing functions based on the data source type. Radar detection data preprocessing includes coordinate system transformation and timestamp standardization; radio protocol parsing data preprocessing includes equipment association information extraction, frequency parameter parsing, and communication quality assessment; and TDOA time difference positioning data preprocessing includes positioning accuracy correction, multipath effect compensation, and coordinate unification. The system fuses the position information provided by radar detection data and the UAV's three-dimensional coordinate information provided by TDOA time difference positioning data to obtain a unified format position data stream. Each position data stream contains a timestamp, latitude and longitude coordinates, UTM coordinates, altitude information, and a fusion identifier. Preprocessing also includes data standardization, which involves timestamp alignment, coordinate system unification, data type conversion, and missing value imputation. A globally unique identifier and batch number are generated for each data record. The data access module also integrates a data quality monitoring mechanism, providing real-time statistics on key indicators such as access rate, data integrity, and processing latency for each data source, offering decision support for system operation and performance optimization.
[0043] The specific process of feature extraction from preprocessed UAV detection data using a sliding window mechanism includes: A sliding window mechanism is used to calculate the motion parameters of the current UAV, which are then used to identify the UAV's state and predict its trajectory. The specific steps for calculating the motion parameters of the current UAV using the sliding window mechanism are as follows: The window size is 5 seconds, the sliding step is 1 second, the data out-of-order tolerance time is 500 milliseconds, and the window triggering mechanism is based on event time and water level advancement strategy. When the water level exceeds the window boundary or new data is received in the window, the trajectory calculation process is automatically triggered. First, all data records in the window are sorted by timestamp, and motion parameters are calculated based on the UAV's UTM coordinates. Motion parameters include speed and heading. Speed is calculated by dividing the Euclidean distance by the time difference, using the following formula: ,in, For the speed of the drone, express UTM coordinates of the drone yes The UTM coordinates of the UAV are recorded at all times; the heading is calculated using the arctangent function, which calculates the heading angle by the ratio of the difference between the Y and X coordinates, and then converts it into a standard heading representation from 0 to 360 degrees. The formula is as follows: In the formula, It is the heading angle of the drone.
[0044] The automatic state transition module includes a first record state memory, a last record state memory, and a timer state memory; The first record state memory stores basic information from the first signal detection, including starting coordinates, timestamp, and device identifier, used to calculate cumulative flight distance and duration; the last record state memory stores motion information from the previous data point, including timestamp, UTM coordinates, speed, and heading, used for continuous monitoring; the timer state memory is used for landing detection.
[0045] The timing sequence of drone flight state transitions is as follows: Figure 2 As shown, the processing flow of the automatic state transition module is as follows: Figure 3 As shown, the specific process of identifying and converting the flight state of a drone based on the extracted features is as follows: Maintain the status of the first record, the status of the last record, and the timer status. First, check the contents of the first record state memory. If the first record state memory returns null, it means there is no first record, and the current drone state is determined to be takeoff state. Update the first record state and the last record state. If the first record state memory contains the first record state, the drone state is determined to be in flight. Update the last record state and obtain the event timestamp of the current data. Check if there is an old timer record in the timer state memory. If there is, cancel the old timer and register a new timer. Calculate the new timer trigger time, which is the event timestamp of the current data plus 45000 milliseconds. Store this time in the timer state memory and register an event time-based timer with the Flink runtime for automatic detection of landing state. When no new data arrives within 45000 milliseconds, the landing state transition is automatically triggered, and the current drone state is determined to be landing state.
[0046] The specific process of calculating and predicting the drone's trajectory in real time based on the extracted features is as follows: Based on the current motion parameters of the UAV and the Kalman filter algorithm, the UAV trajectory is predicted as follows: The four-dimensional state vector is composed of the X-axis coordinates, Y-axis coordinates, the drone's velocity, and the drone's heading angle in the UTM coordinate system. The state vector is updated over time using a state prediction equation, which is as follows:
[0047] In the formula, It is the predicted state vector at time k. It is the state transition matrix, which contains a time interval parameter to accommodate different data sampling frequencies. It is the optimal state estimate at time k-1; The state covariance matrix is predicted by adding the process noise covariance to the quadratic transformation of the state transition matrix, as shown in the following formula:
[0048] in, Let k be the state covariance matrix predicted at time k. This is the estimated state covariance matrix from the previous time step. It is the state transition matrix, where the superscript T denotes transpose. The process noise covariance matrix; The observation residual, which is the difference between the actual observed value and the predicted observed value, is calculated using the following formula:
[0049] In the formula, It is the observation residual. These are the actual state vector observations. The observation matrix is used to predict the state vector at time k. Mapped to the observation space; Calculate the Kalman gain:
[0050] In the formula, R is the Kalman gain matrix, and R is the observation noise covariance matrix. The value of the observation noise covariance matrix is dynamically adjusted according to the statistical characteristics of the observation residuals. Then, the optimal update of the state estimate is achieved through the Kalman gain matrix, as shown in the following formula:
[0051] In the formula, It is the optimal state estimate at time k; State covariance update is achieved through the following formula:
[0052] In the formula, It is the estimated state covariance matrix at time k. It is the Kalman gain matrix. For the observation matrix, It is the state covariance matrix predicted at time k; The reasonableness of the observation data is judged by Mahalanobis distance. When the Mahalanobis distance exceeds the preset threshold, the observation weight is reduced or abnormal observations are rejected. Mahalanobis distance The calculation formula is as follows:
[0053] In the formula, S is the observation residual, and S is the residual covariance matrix; When numerical anomalies occur during the filtering calculation, the original observation data is directly output as the filtering result, and the state covariance update formula in Joseph form is used:
[0054] In the formula, It is the estimated state covariance matrix at time k. It is the Kalman gain matrix. For the observation matrix, R is the state covariance matrix predicted at time k; R is the observation noise covariance matrix; using the Joseph form of the state covariance update formula can avoid the problem of non-positive definite covariance matrix caused by numerical rounding errors.
[0055] Otherwise, determine whether the trace of the state covariance matrix exceeds a preset threshold. If it does, the state covariance matrix is automatically reset to the standard initial value; if it does not exceed the threshold, the current state covariance matrix is maintained. Estimating the optimal state at time k Extract the UTM coordinates, speed, and heading angle of the drone for real-time visualization.
[0056] As a preferred option, the system also includes a device association module, which uses an intelligent association recognition algorithm based on multi-dimensional feature fusion to match UAV data with remote controller data to provide the pilot's location. The time window feature extraction module is also used to extract composite features within a time window, including monitoring station identifier, batch number, device identifier, detection distance, intrusion start time, duration, data packet sequence number, and UAV speed. The composite feature UUID is generated by string concatenation and hashing algorithms of the composite features.
[0057] The purpose of matching drone data with remote controller data is to identify the drone operator, providing support for attribution of responsibility and control decisions. It should be noted that drone status recognition and trajectory prediction are unrelated to whether matching is completed; the system can still perform status recognition and trajectory prediction even without remote controller matching. Matching primarily provides extended information such as the operator's location for downstream control applications.
[0058] The specific process for matching drone data with remote controller data is as follows: When remote control data is received, it is simultaneously stored in both the timestamp index state memory and the UUID index state memory. The timestamp index state memory stores the complete remote control data record with the current timestamp as the key, while the UUID index state memory stores identical record copies with the generated composite feature UUID as the key. The timestamp index state memory is used to support general matching queries, while the UUID index state memory is used to support exact matching queries. A cleanup timer based on event time is registered, with the cleanup time set to the current timestamp plus 5000 milliseconds, to automatically clean up expired associated data. When drone data is received, a general matching is first performed based on the batch number and device identifier. The specific process of general matching is as follows: all remote controller data records in the timestamp index state memory are traversed, and the remote controller data record with the latest timestamp and matching batch number and device identifier is selected as the candidate association result. The actual coordinate position of the remote controller is obtained and added to the drone data record. Then, the system performs a precise matching query in the UUID index state memory, using the composite feature UUID as the query key value to find the remote controller data record that matches perfectly. The actual coordinate position of the remote controller is obtained and added to the drone data record. The precise matching result is used first. When the precise matching is successful, the general matching result is automatically overwritten. When the precise matching fails, the system falls back to the general matching result. If both matching strategies fail, the system uses the drone coordinates as the default value of the remote controller's coordinate position.
[0059] This invention integrates an automatic state cleanup mechanism to prevent memory leaks and performance degradation during long-term operation. The technical implementation includes: Timer Registration: For each remote control data record, the system automatically registers a cleanup timer based on event time, with a cleanup period set to 5000 milliseconds. The timer is based on the data's event timestamp rather than the system processing time, ensuring the accuracy and consistency of the cleanup logic.
[0060] Expired data detection: When the cleanup timer is triggered, the system iterates through all records in the timestamp index state and UUID index state, checking the interval between the timestamp of each record and the current time. For related records that have not been updated for more than 5 seconds, the system marks them as expired data and adds them to the cleanup queue.
[0061] Batch cleanup execution: The system adopts a batch cleanup strategy, which cleans up all expired associated records at the same time in a single timer callback, including deleting the corresponding key-value pairs from recent_controller_state and uuid_controller_state, releasing the occupied memory space and ensuring the long-term stable operation of the system.
[0062] The specific process of standardizing and distributing the flight status and trajectory tracking results of the UAV in real time is as follows: Convert the takeoff status to a status code of value 1, the in-flight status to a status code of value 2, and the landing status to a status code of value 3. A unified timestamp standard is adopted to convert internal timestamps into a standard date and time format, while retaining the original timestamps for time series analysis; Convert the Kalman-filtered UTM planar coordinates to the standard WGS84 geographic coordinate format; Add complete traceability information to each output record, including batch number, unique device identifier, processing timestamp, and data source identifier; After the flight status and trajectory tracking results of the UAV are standardized, they are output using a single-channel or multi-channel parallel output mechanism, supporting multiple output methods such as message queue, HTTP interface and local storage. The message queue adopts distributed message queue technology, and achieves reliable data transmission through producer connection pool and message acknowledgment mechanism. It is configured with multiple message queue cluster addresses as backup connections, and automatically switches to the backup cluster when the main message queue is unavailable. The HTTP interface implements real-time status push through a RESTful API, sending POST requests to a pre-configured target URL. The POST request carries JSON-formatted status recognition and trajectory tracking results. The HTTP interface output mechanism integrates retry strategies and exception handling. When there is a network error or the target service is unavailable, retry operations are automatically performed. The number of retries and the interval time are configured according to application requirements. JSON serialization is used during data transmission, and floating-point precision is controlled. The local storage output method serves as a backup data protection mechanism, storing critical status identification results and trajectory data in the local file system. Local storage employs file rotation and compression mechanisms to prevent unlimited growth of storage space, while retaining historical data for fault recovery and data analysis. The selection and configuration of output channels are controlled by system parameters, supporting multiple operating modes such as single-channel output, multi-channel parallel output, and fault switching.
[0063] As a preferred embodiment, the trajectory tracking module also includes a trajectory continuity verification subunit and a trajectory quality control subunit.
[0064] The trajectory continuity verification subunit is used to perform temporal continuity verification and spatial continuity verification during the prediction of UAV trajectory. The time continuity verification specifically involves limiting the time interval for calculating the trajectory to a preset range. When the time interval exceeds the preset range, the default time interval is used for trajectory calculation. The verification of spatial continuity is specifically as follows: The instantaneous velocity of the UAV is calculated by measuring the displacement distance and time interval between preceding and following data points, and then compared with historical velocity records. When the velocity change exceeds the physical acceleration limit, the historical velocity value is used as the current velocity estimate. When the time interval Δt exceeds a preset threshold, trajectory breakage is triggered. Spatial continuity verification is based on physical motion constraints, calculating the maximum possible displacement between adjacent data points. , This indicates the upper limit of speed; when the actual displacement exceeds the maximum possible displacement, it is marked as an abnormal trajectory. The trajectory quality control subunit is used for trajectory quality assessment and automatic marking and correction of trajectory anomalies; The trajectory quality assessment specifically includes: The confidence score is calculated based on three evaluation metrics: prediction residual, trajectory smoothness, and observation frequency, using the following formula:
[0065] In the formula, It's the confidence level. It is the weight of the observation frequency score. It is the observation frequency score. These are the weights for predicting the residual scores. It predicts the residual score. It is the weight of the trajectory smoothness score. It is the trajectory smoothness score; The automatic marking and correction of trajectory anomalies are as follows: Anomalies deviating from the normal trajectory pattern are identified by statistical analysis methods, and trajectory correction is performed using interpolation algorithms. Moving average filtering is used to eliminate high-frequency noise in the trajectory. Missing segments of the trajectory are filled in by linear interpolation or polynomial interpolation, with the interpolation method adaptively selected based on the length of the missing segment and the characteristics of the surrounding trajectory.
[0066] As a preferred option, the system also includes: a monitoring system interface, a data analysis platform interface, an emergency response system interface, and an interface management module; The monitoring system interface is used for real-time status change notifications and alarm triggering. When a drone status change or abnormal trajectory is detected, the system automatically generates a status change event and pushes it to the monitoring platform through the monitoring system interface. The data analysis platform interface is used to output historical trajectory data and status statistics in batches. The system regularly summarizes and statistically analyzes the drone's flight mode, status transition frequency, and trajectory characteristics, and transmits them to the big data analysis platform in batches through the data analysis platform interface. The data format adopts standard CSV or JSON format and supports data compression and fragmented transmission. The emergency response system interface is used to handle the real-time distribution of abnormal status and threat warnings. When the system detects abnormal behavior of the drone or its entry into a sensitive area, it triggers the emergency response process. The emergency interface adopts a high-priority message transmission mechanism. The interface management module is used for monitoring the connection status of interfaces, statistics on transmission performance, and automatic fault recovery. By monitoring the health status of each interface in real time, it can promptly detect and handle interface anomalies.
[0067] Example 2 Based on Embodiment 1, this embodiment describes in detail how the system can accurately identify the takeoff status of the drone and how to establish the association between the drone and the remote control device.
[0068] Example scenario setup: Assume a radio protocol parsing device is deployed within a monitoring area, capable of simultaneously detecting signal data from both a drone and a remote controller. The drone is identified as "DJI_001," and the remote controller as "RC_001," both belonging to the same flight batch "BATCH_20241201_001." The monitoring station is identified as "SITE_100," and the system receives a data stream from the JM topic when the drone begins takeoff.
[0069] Data access and preprocessing process: The system receives raw data streams from the JM topic of the Kafka message queue through the data access layer. The data format is JSON, containing nested drone array fields. The data preprocessing module calls the `data_process_jm` function to parse and standardize the raw data. First, it extracts remote controller data records with a `type` field of 0 from the `drone` array to obtain key information such as latitude and longitude coordinates, timestamps, and device identifiers. Then, it extracts drone data records with a `type` field of 1 to obtain flight parameters such as flight coordinates, speed, altitude, and frequency.
[0070] During preprocessing, the system generates a composite feature string for each data record, specifically including the site identifier SITE_100, batch number BATCH_20241201_001, device unique identifier DJI_001, detection distance 500 meters, intrusion start time 20241201120000000, duration 0 seconds, data packet sequence number 1001, and movement speed 0.0 meters per second. These strings are concatenated to form the composite feature identifier "SITE_100_BATCH_20241201_001_DJI_001_500_20241201120000000_0_1001_0.0", and a globally unique associated identifier is generated using the UUID version 3 hash algorithm.
[0071] Intelligent association recognition process: When remote control data records enter the DroneStateProcessFunction, the system first checks if the data type identifier is 0, confirming it as remote control device data. The processing function stores the record simultaneously in two state memories: a timestamp-indexed state memory storing the complete remote control record using the current timestamp as the key, and a UUID-indexed state memory storing a copy of the same record using the generated composite UUID as the key. The system then registers a cleanup timer based on the event time, with the cleanup interval set to the current timestamp plus 5000 milliseconds, to automatically clean up expired associated data.
[0072] When drone data records enter the processing function, the system determines that the data type identifier is 1, confirming it as drone equipment data. The processing function first performs a generic matching query in the timestamp index state storage, traversing all stored remote controller records to find a record whose batch number and device unique identifier match. Since the batch number is BATCH_20241201_001 and a corresponding remote controller record exists within the time window, the generic matching successfully obtains the remote controller's latitude and longitude coordinates as the pilot's location information.
[0073] The system then performs an exact match query in the UUID index state storage, using the same composite feature UUID as the query key. Since the drone and remote controller belong to the same device combination and their feature parameters match perfectly, the exact match successfully retrieves a deterministic associated record. According to the matching strategy, the system uses the exact match result to override the general match result, ensuring the highest accuracy in association identification. Finally, the drone record is updated with the pilot's latitude and longitude field, the value of which represents the actual coordinates of the remote controller.
[0074] Takeoff status identification and transition process: Once the associated drone data record is entered into the StatusUpdater state transition processing function, the system first checks the contents of the first record's state memory, first_record_state. Since this is the drone's first data record, the state memory returns an empty value. Based on this, the system determines that the current state is takeoff and sets the drone_flying_status field to status code 1. The system then stores the current complete record in the first record's state memory as baseline data for subsequent state determinations.
[0075] Simultaneously, the system stores the current record in the last record state memory `last_record_state` and retrieves the event timestamp of the current data. The system checks the timer state memory `timer_state` for any old timer records; since this is the first processing iteration, no old timers exist. The system calculates the new timer trigger time, which is the current timestamp plus 45000 milliseconds, stores this time in the timer state memory, and registers an event-time-based timer with the Flink runtime for automatic landing status detection.
[0076] Output generation and distribution: The processed UAV takeoff status data is output to the downstream processing module via the `yield` keyword. The data record contains complete flight parameters, pilot position information, and takeoff status identifiers. The data format converter converts the internal processing results into a standard output format, including key fields such as device identifier DJI_001, batch number BATCH_20241201_001, takeoff status code 1, takeoff coordinates, timestamp, and pilot coordinates.
[0077] The multi-channel output manager simultaneously sends standardized takeoff status data to both a message queue and an HTTP interface. The message queue output sends data to the `test-fusion` topic for real-time consumption by downstream monitoring systems. The HTTP interface output POSTs data in JSON format to the target URL, enabling real-time integration with external monitoring platforms. The output takeoff status data provides an accurate initial state baseline for subsequent flight trajectory tracking and state transitions, ensuring the continuity and integrity of monitoring throughout the entire flight process.
[0078] Through the complete takeoff status recognition process described above, the system successfully achieved intelligent association between the UAV and the remote controller, automatic recognition of takeoff status, and multi-channel output of standardized results, providing a reliable technical foundation for real-time monitoring of UAVs.
[0079] Example 3 Based on Embodiments 1 and 2, this embodiment describes in detail how the system realizes the real-time calculation, smoothing and prediction functions of UAV flight trajectory, and demonstrates the application effect of the improved Kalman filter algorithm in actual flight scenarios.
[0080] Example scenario setup: Continuing with the monitoring scenario in Example 2, the UAV DJI_001 has completed takeoff status identification and entered flight mode. The system continuously receives location information from multiple data sources, including UTM coordinates provided by radar data sources, GPS coordinates provided by radio protocol parsing data sources, and three-dimensional coordinates provided by TDOA positioning data sources. After data fusion processing, the system obtains a unified format location data stream, with each record containing key fields such as timestamp, latitude and longitude coordinates, UTM coordinates, altitude information, and fusion identifier.
[0081] Assuming the drone receives 150 location data points during a 5-minute flight, with an average sampling frequency of 0.5 times per second, the raw location data exhibits some noise and discontinuity due to factors such as network latency, equipment accuracy, and environmental interference. Therefore, it requires smoothing and predictive optimization through trajectory tracking algorithms.
[0082] Kalman filter initialization process: When the fused position data enters the RobustKalmanFilter trajectory tracking processing function, the system first checks the filter state corresponding to the current UAV identifier DJI_001. Since this is the device's first trajectory processing, the system calls the state initialization function to create a new filter instance. The initial state vector uses a four-dimensional model, including the X and Y coordinates in the UTM coordinate system and the UAV's velocity. and the drone's heading angle The initial values are set to the UTM coordinates of the current position and the zero velocity, respectively.
[0083] The initial covariance matrix is set to a 6×6 identity matrix multiplied by 1000 to represent the uncertainty of the initial state. The process noise covariance matrix is set to an identity matrix multiplied by 100 of the basic noise parameters to model random disturbances during UAV movement. The system simultaneously initializes the coordinate transformer, establishing a bidirectional transformation relationship between the UTM coordinate system and the WGS84 geographic coordinate system to ensure the consistency and accuracy of input and output coordinates.
[0084] Dynamic filtering process: For subsequent received location data, the system performs a dynamic Kalman filter update process. First, the time interval between the current data and the previous processed data is calculated and limited to a reasonable range of 0.1 seconds to 300 seconds to prevent time jumps from affecting filtering performance. The system extracts velocity information from the previous filtering state, calculates the velocity modulus, and determines the dynamic noise adjustment factor based on this. The calculation formula is 1.0 plus a coefficient of velocity multiplied by 0.3.
[0085] The state transition matrix is dynamically constructed based on actual time intervals, employing a constant-velocity linear motion model. The position transition coefficient is the time interval value, and the velocity transition coefficient is 1. The observation matrix is set as a 2×4 matrix to map the four-dimensional state vector to the two-dimensional position observation space. The observation noise covariance is set to a 3000-fold 2×2 identity matrix to reflect the uncertainty of position measurement. The process noise covariance is obtained by multiplying the basic noise parameters by a dynamic adjustment factor, achieving adaptive adjustment of the noise parameters.
[0086] The system calls the `filter_update` method of the PyKalman library to perform a standard Kalman filter update, including a prediction step and a correction step. The prediction step calculates the prior state estimate and covariance based on the state transition model and process noise. The correction step calculates the posterior state estimate and covariance based on the new location observation data and the observation model to obtain the optimal state estimate for the current time step.
[0087] Robustness guarantees and exception handling: After the filter update is complete, the system performs covariance matrix constraint processing, limiting all elements of the covariance matrix to a value range of -1,000,000 to +1,000,000 to prevent numerical divergence. The system calculates the trace of the covariance matrix, which is the sum of the diagonal elements. When the trace value exceeds half of the maximum covariance parameter, the system resets the covariance matrix to a 1000-fold identity matrix to ensure the numerical stability of the filter.
[0088] When numerical anomalies or linear algebra calculation errors occur during the filtering process, the system's anomaly handling mechanism automatically detects the anomalies and switches to a degraded processing mode. In degraded processing mode, the system directly uses the currently observed UTM coordinates as the filter output coordinates and sets the filter status flag to bypass, indicating that the filtering process is bypassed. Regardless of whether normal processing or degraded processing is performed, the system updates the state storage and timestamp records to ensure the continuity of the processing flow.
[0089] Trajectory prediction and coordinate transformation output: After successful filtering, the system extracts location information from the updated state vector, specifically the UTM coordinates corresponding to the first two elements. The system then uses a coordinate converter to transform the UTM planar coordinates into WGS84 geographic coordinates, obtaining the fused latitude and longitude information. The transformation process employs a high-precision geographic projection algorithm to ensure the accuracy and consistency of the coordinate transformation.
[0090] The system constructs output data records containing all fields of the original input data, plus four key trajectory tracking result fields. The fused X-coordinate and fused Y-coordinate fields store the filtered UTM coordinates, the fused longitude and fused latitude fields store the transformed geographic coordinates, and the filtering status field indicates the processing mode as normal or bypass. The output records are passed to downstream processing modules via a yield mechanism, providing high-quality trajectory data for status recognition, track display, and early warning analysis.
[0091] Analysis of continuous trajectory tracking performance: During a 5-minute continuous flight, the system successfully processed 150 position data points with a filtering success rate exceeding 98%. Only a few data points triggered degradation processing due to numerical anomalies. The filtered trajectory exhibited a significantly smoother effect compared to the original data, eliminating trajectory jitter caused by measurement noise and data transmission delays. The dynamic noise adjustment mechanism effectively adapted to the motion characteristics of the UAV in different flight phases, providing greater noise tolerance during acceleration and turning phases, and higher filtering accuracy during stable flight phases.
[0092] Comparative analysis with the original trajectory data shows that the filtered trajectory improves position accuracy by an average of over 30% and significantly enhances the stability of velocity estimation, providing a more reliable data foundation for subsequent state recognition and behavior analysis. The system's output predicted trajectory not only possesses excellent real-time performance but also exhibits a certain degree of forward-looking prediction capability, providing crucial decision support information for flight safety monitoring and airspace control.
[0093] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. 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 implementation should not be considered beyond the scope of this application.
[0094] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should be considered within the scope of protection of the present invention.
Claims
1. A UAV state recognition and tracking system based on a distributed streaming computing framework, characterized in that, include: The data access module is used to collect and preprocess drone detection data; The time window feature extraction module is used to extract features from preprocessed UAV detection data using a sliding window mechanism; The automatic state transition module is used to identify and transition the flight state of the UAV based on the extracted features; The trajectory tracking module is used to calculate and predict the drone's trajectory in real time based on the extracted features; The results output module is used to standardize and distribute the drone's flight status and drone motion trajectory tracking results in real time.
2. The UAV state recognition and tracking system based on a distributed streaming computing framework as described in claim 1, characterized in that, The data access module constructs a scalable data acquisition architecture through distributed message queue technology. The data sources include radar detection data, radio protocol parsing data, and TDOA time difference positioning data, supporting parallel access from multiple data sources. The radio protocol parsing data includes communication information between the UAV and the remote controller, as well as device identification. The TDOA time difference positioning data specifically includes the UAV's three-dimensional coordinate information. A topic-based message queue distribution mechanism is adopted, which assigns an independent message topic to each type of data source. The message queue configuration includes offset management strategy and fault recovery mechanism. During data transmission, a partitioned routing strategy is adopted, which partitions the data source according to the data source type and device identifier. The preprocessing specifically includes: The system utilizes a JSON data parsing mechanism to handle diverse data formats from different data sources. The parser first performs data format validation and exception handling, and then calls the corresponding preprocessing functions based on the data source type. Radar detection data preprocessing includes coordinate system transformation and timestamp standardization; radio protocol parsing data preprocessing includes equipment association information extraction, frequency parameter parsing, and communication quality assessment; and TDOA time difference positioning data preprocessing includes positioning accuracy correction, multipath effect compensation, and coordinate unification. The system fuses the position information provided by radar detection data and the UAV's three-dimensional coordinate information provided by TDOA time difference positioning data to obtain a unified format position data stream. Each position data stream contains a timestamp, latitude and longitude coordinates, UTM coordinates, altitude information, and a fusion identifier. Preprocessing also includes a data standardization process, which includes timestamp alignment, coordinate system unification, data type conversion, and missing value imputation. At the same time, a globally unique identifier and batch number are generated for each data record.
3. The UAV state recognition and tracking system based on a distributed streaming computing framework as described in claim 1, characterized in that, The feature extraction specifically includes: A sliding window mechanism is used to calculate the motion parameters of the current UAV, which are then used to identify the UAV's state and predict its trajectory. The specific steps for calculating the motion parameters of the current UAV using the sliding window mechanism are as follows: The window triggering mechanism is based on event time and water level advancement strategy. When the water level exceeds the window boundary or new data is received within the window, the trajectory calculation process is automatically triggered. First, all data records within the window are sorted by timestamp, and motion parameters are calculated based on the UAV's UTM coordinates. Motion parameters include speed and heading. Speed is calculated by dividing the Euclidean distance by the time difference, using the following formula: ,in, For the speed of the drone, express UTM coordinates of the drone yes The UTM coordinates of the UAV are recorded at all times; the heading is calculated using the arctangent function, which calculates the heading angle by the ratio of the difference between the Y and X coordinates, and then converts it into a standard heading representation from 0 to 360 degrees. The formula is as follows: In the formula, It is the heading angle of the drone.
4. The UAV state recognition and tracking system based on a distributed streaming computing framework as described in claim 3, characterized in that, The automatic state transition module includes a first record state memory, a last record state memory, and a timer state memory; The first record state memory stores basic information when the signal is first detected, including the starting coordinates, timestamp, and device identifier, which is used to calculate the cumulative flight distance and duration; The last record state memory stores the motion information of the previous data point, including timestamp, UTM coordinates, speed, and heading, for continuous monitoring; the timer state memory is used for landing detection. The specific steps for identifying and converting the drone's flight state based on the extracted features are as follows: Maintain the status of the first record, the status of the last record, and the timer status. First, check the contents of the first record state memory. If the first record state memory returns an empty value, it means there is no first record, and the current drone state is determined to be takeoff state. Update the first record state and the last record state. If the first record state memory contains the first record state, the drone state is determined to be in flight. Update the last record state and obtain the event timestamp of the current data. Check if there is an old timer record in the timer state memory. If there is, cancel the old timer and register a new timer. The event timestamp of the current data plus a preset time value is used as the new timer trigger time. Store this time in the timer state memory and register an event time-based timer with the Flink runtime for automatic detection of landing state. When no new data arrives within the preset time value, the landing state transition is automatically triggered, and the current drone state is determined to be landing state.
5. The UAV state recognition and tracking system based on a distributed streaming computing framework as described in claim 3, characterized in that, The real-time calculation and prediction of the UAV trajectory based on the extracted features specifically involves: Based on the current motion parameters of the UAV and the Kalman filter algorithm, the UAV trajectory is predicted as follows: The four-dimensional state vector is composed of the X-axis coordinates, Y-axis coordinates, the drone's velocity, and the drone's heading angle in the UTM coordinate system. The state vector is updated over time using a state prediction equation, which is as follows: In the formula, It is the predicted state vector at time k. It is the state transition matrix, which includes a time interval parameter to accommodate different data sampling frequencies. It is the optimal state estimate at time k-1; The state covariance matrix is predicted by adding the process noise covariance to the quadratic transformation of the state transition matrix, as shown in the following formula: in, Let k be the state covariance matrix predicted at time k. This is the estimated state covariance matrix from the previous time step. It is the state transition matrix, where the superscript T denotes transpose. The process noise covariance matrix; The observation residual, which is the difference between the actual observed value and the predicted observed value, is calculated using the following formula: In the formula, It is the observation residual. These are the actual state vector observations. The observation matrix is used to predict the state vector at time k. Mapped to the observation space; Calculate the Kalman gain: In the formula, R is the Kalman gain matrix, and R is the observation noise covariance matrix. The value of the observation noise covariance matrix is dynamically adjusted according to the statistical characteristics of the observation residuals. Then, the optimal update of the state estimate is achieved through the Kalman gain matrix, as shown in the following formula: In the formula, It is the optimal state estimate at time k; State covariance update is achieved through the following formula: In the formula, It is the estimated state covariance matrix at time k. It is the Kalman gain matrix. For the observation matrix, It is the state covariance matrix predicted at time k; The reasonableness of the observation data is judged by Mahalanobis distance. When the Mahalanobis distance exceeds the preset threshold, the observation weight is reduced or abnormal observations are rejected. Mahalanobis distance The calculation formula is as follows: In the formula, S is the observation residual, and S is the residual covariance matrix; When numerical anomalies occur during the filtering calculation, the original observation data is directly output as the filtering result, and the state covariance update formula in Joseph form is used: In the formula, It is the estimated state covariance matrix at time k. It is the Kalman gain matrix. For the observation matrix, R is the state covariance matrix predicted at time k; R is the observation noise covariance matrix. Otherwise, determine whether the trace of the state covariance matrix exceeds a preset threshold. If it does, the state covariance matrix is automatically reset to the standard initial value; if it does not exceed the threshold, the current state covariance matrix is maintained. Estimating the optimal state at time k Extract the UTM coordinates, speed, and heading angle of the drone for real-time visualization.
6. The UAV state recognition and tracking system based on a distributed streaming computing framework as described in claim 1, characterized in that, The system also includes a device association module, which uses an intelligent association and recognition algorithm based on multi-dimensional feature fusion to match UAV data with remote controller data in order to provide the pilot's location. The time window feature extraction module is also used to extract composite features within the time window, including monitoring site identifier, batch number, device identifier, detection distance, intrusion start time, duration, data packet sequence number, and drone speed; and to generate composite feature UUIDs through string concatenation and hashing algorithms of composite features. The specific steps for matching drone data with remote controller data are as follows: When remote control data is received, it is stored simultaneously in the timestamp index state memory and the UUID index state memory. The timestamp index state memory stores the complete remote control data record with the current timestamp as the key value, and the UUID index state memory stores the same record copy with the generated composite feature UUID as the key value. The timestamp index state storage is used to support general matching queries, while the UUID index state storage is used to support exact matching queries; register an event-time-based cleanup timer, with the cleanup time set to the current timestamp plus a preset time value, to automatically clean up expired associated data; When drone data is received, a general matching is first performed based on the batch number and device identifier. The specific process of general matching is as follows: traverse all remote control data records in the timestamp index state memory, select the remote control data record with the latest timestamp and matching batch number and device identifier as the candidate association result, obtain the actual coordinate position of the remote control and add it to the drone data record; The system then performs a precise match query in the UUID index state storage, using the composite feature UUID as the query key to find a perfectly matching remote controller data record, obtain the actual coordinate position of the remote controller, and add it to the drone data record. The precise match result is used first. When the precise match is successful, the general match result is automatically overwritten. When the precise match fails, the system falls back to the general match result. If both matching strategies fail, the system uses the drone coordinates as the default value for the remote controller's coordinate position.
7. The UAV state recognition and tracking system based on a distributed streaming computing framework as described in claim 1, characterized in that, The process of standardizing and distributing the flight status and trajectory tracking results of the UAV in real time specifically involves: Convert the takeoff status to a status code of value 1, the in-flight status to a status code of value 2, and the landing status to a status code of value 3. A unified timestamp standard is adopted to convert internal timestamps into a standard date and time format, while retaining the original timestamps for time series analysis; Convert the Kalman-filtered UTM planar coordinates to the standard WGS84 geographic coordinate format; Add complete traceability information to each output record, including batch number, unique device identifier, processing timestamp, and data source identifier; After the flight status and trajectory tracking results of the UAV are standardized, they are output using a single-channel or multi-channel parallel output mechanism, supporting multiple output methods such as message queue, HTTP interface and local storage. The message queue adopts distributed message queue technology, and achieves reliable data transmission through producer connection pool and message acknowledgment mechanism. It is configured with multiple message queue cluster addresses as backup connections, and automatically switches to the backup cluster when the main message queue is unavailable. The HTTP interface implements real-time status push through a RESTful API, sending POST requests to a pre-configured target URL. The POST request carries JSON-formatted status recognition and trajectory tracking results. The HTTP interface output mechanism integrates retry strategies and exception handling. When there is a network error or the target service is unavailable, retry operations are automatically performed. The number of retries and the interval time are configured according to application requirements. JSON serialization is used during data transmission, and floating-point precision is controlled. The local storage output method serves as a backup data protection mechanism, storing critical status identification results and trajectory data in the local file system. Local storage employs file rotation and compression mechanisms to prevent unlimited growth of storage space, while retaining historical data for fault recovery and data analysis. The selection and configuration of output channels are controlled by system parameters, supporting multiple operating modes such as single-channel output, multi-channel parallel output, and fault switching.
8. The UAV state recognition and tracking system based on a distributed streaming computing framework as described in claim 1, characterized in that, The trajectory tracking module also includes a trajectory continuity verification subunit and a trajectory quality control subunit; The trajectory continuity verification subunit is used to perform temporal continuity verification and spatial continuity verification during the prediction of UAV trajectory. The time continuity verification specifically involves limiting the time interval for calculating the trajectory to a preset range. When the time interval exceeds the preset range, the default time interval is used for trajectory calculation. The verification of spatial continuity is specifically as follows: The instantaneous velocity of the UAV is calculated by measuring the displacement distance and time interval between preceding and following data points, and then compared with historical velocity records. When the velocity change exceeds the physical acceleration limit, the historical velocity value is used as the current velocity estimate. When the time interval Δt exceeds a preset threshold, trajectory breakage is triggered. Spatial continuity verification is based on physical motion constraints, calculating the maximum possible displacement between adjacent data points. , This indicates the upper limit of speed; when the actual displacement exceeds the maximum possible displacement, it is marked as an abnormal trajectory. The trajectory quality control subunit is used for trajectory quality assessment and automatic marking and correction of trajectory anomalies; The trajectory quality assessment specifically includes: The confidence score is calculated based on three evaluation metrics: prediction residual, trajectory smoothness, and observation frequency, using the following formula: In the formula, It's the confidence level. It is the weight of the observation frequency score. It is the observation frequency score. These are the weights for predicting the residual scores. It predicts the residual score. It is the weight of the trajectory smoothness score. It is the trajectory smoothness score; The automatic marking and correction of trajectory anomalies are as follows: Anomalies deviating from the normal trajectory pattern are identified by statistical analysis methods, and trajectory correction is performed using interpolation algorithms. Moving average filtering is used to eliminate high-frequency noise in the trajectory. Missing segments of the trajectory are filled in by linear interpolation or polynomial interpolation, with the interpolation method adaptively selected based on the length of the missing segment and the characteristics of the surrounding trajectory.
9. The UAV state recognition and tracking system based on a distributed streaming computing framework as described in claim 1, characterized in that, The system also includes: a monitoring system interface, a data analysis platform interface, an emergency response system interface, and an interface management module; The monitoring system interface is used for real-time status change notifications and alarm triggering. When a drone status change or abnormal trajectory is detected, the system automatically generates a status change event and pushes it to the monitoring platform through the monitoring system interface. The data analysis platform interface is used to output historical trajectory data and status statistics in batches. The system regularly summarizes and statistically analyzes the drone's flight mode, status transition frequency, and trajectory characteristics, and transmits them to the big data analysis platform in batches through the data analysis platform interface. The data format adopts standard CSV or JSON format and supports data compression and fragmented transmission. The emergency response system interface is used to handle the real-time distribution of abnormal status and threat warnings. When the system detects abnormal behavior of the drone or its entry into a sensitive area, it triggers the emergency response process. The emergency interface adopts a high-priority message transmission mechanism. The interface management module is used for monitoring the connection status of interfaces, statistics on transmission performance, and automatic fault recovery. By monitoring the health status of each interface in real time, it can promptly detect and handle interface anomalies.