Segment-level drone track anomaly detection method and system based on prediction results

By fragmenting the drone trajectory and using neural network prediction, error features are extracted to construct a scoring model, solving the problem of identifying slow drift anomalies in complex environments and achieving high-precision and early identification of slow drift anomalies.

CN122634426APending Publication Date: 2026-08-25SOUTHWEST JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610650647.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-12
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing methods for detecting drone trajectory anomalies struggle to identify slow drift anomalies, especially in environments with dense high-rise buildings or severe obstruction. When slow drift deviations occur in navigation and positioning results, existing methods lack the ability to comprehensively model the cumulative degree of error and the error growth trend within continuous segments, leading to false alarms and missed detections.

Method used

By performing sliding window sampling and neural network prediction on the UAV position sequence, the residual between the predicted trajectory and the reference trajectory is formed. Segment error features are extracted and an anomaly scoring model is constructed, taking into account the error growth trend and persistence state, and distinguishing between short-term noise and slow drift anomalies.

Benefits of technology

It improves the accuracy and early detection sensitivity of slow drift anomalies, accurately depicts the error accumulation process, and reduces false alarms and missed detections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122634426A_ABST
    Figure CN122634426A_ABST
Patent Text Reader

Abstract

The application provides a segment-level unmanned aerial vehicle track anomaly detection method based on a prediction result, which comprises the following steps: acquiring an unmanned aerial vehicle position sequence as an observation track, and sampling the unmanned aerial vehicle position sequence by using a sliding window with a length of L to form an Lxd-dimensional track window matrix; performing transpose processing on the Lxd-dimensional track window matrix to form a dL-dimensional transposed matrix, and inputting the transposed matrix into a neural network prediction model to obtain an unmanned aerial vehicle predicted track; forming a track residual error sequence by subtracting the predicted track from the observation track, and pre-processing the track residual error sequence; sampling the pre-processed track residual error sequence by using a sliding window to obtain a plurality of residual error sequence segments, extracting error features of each residual error segment, and performing normalization processing on the error features; constructing an anomaly score model, substituting values of the error features into the anomaly score model to determine anomaly scores; and comparing the anomaly scores with a score threshold value, and when the anomaly scores are greater than the score threshold value, it is determined that the observation track corresponding to the current track residual error is abnormal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of unmanned aerial vehicles (UAVs), and more particularly to a method and system for detecting anomalies in UAV tracks at the fragment level based on prediction results. Background Technology

[0002] As the application of drones in urban logistics, inspection, surveying, emergency response, and security monitoring continues to deepen, their flight safety in complex urban scenarios is receiving increasing attention. In actual operation, drones typically rely on GNSS, RTK, or integrated navigation systems to obtain location information. However, in environments with dense high-rise buildings, narrow streets and valleys, or severe obstruction, satellite signals are easily affected by factors such as multipath reflection, reduced line-of-sight satellites, non-line-of-sight propagation, and localized electromagnetic interference, leading to deviations in navigation and positioning results. Unlike sudden, large anomalies, these deviations often appear in a weaker form and gradually accumulate over a continuous timeframe, eventually forming slow drift anomalies.

[0003] Existing methods for detecting UAV trajectory anomalies typically involve setting a threshold based on the instantaneous value of a single-moment position error, filtering innovation, or prediction residual. When this error exceeds the preset threshold, the current position is considered an anomaly. While these methods are simple to implement, they are essentially point-level detection mechanisms. For slow-drift positioning anomalies, the early error amplitude is usually small and may even be masked by normal maneuvering changes or measurement noise. Therefore, single-point judgment methods struggle to identify the gradual and continuous nature of the anomaly.

[0004] In addition, existing methods also obtain future UAV position estimates through time-series prediction models, then calculate the deviation between the observed and predicted values, and use this deviation as a basis for anomalies. Compared with traditional static thresholding methods, these methods can introduce some temporal context information. However, many existing methods still only treat the prediction error as a detection quantity at a single moment, lacking the comprehensive modeling ability for the cumulative degree of error within continuous segments, the error growth trend, and the duration of abnormal events. Therefore, in practical applications, they are often prone to problems such as being overly sensitive to short-term random fluctuations leading to false alarms, lacking the ability to distinguish between static deviations and continuous drift, and missing early slow drift anomalies.

[0005] In view of this, in order to solve the above-mentioned technical problems, it is urgent to propose a new technical approach. Summary of the Invention

[0006] In view of this, the purpose of this invention is to provide a fragment-level UAV trajectory anomaly detection method and system based on prediction results. By fragmenting the observed trajectory to form a predicted trajectory, and further fragmenting the residual between the predicted trajectory and the reference trajectory, the cumulative development process of slow drift error can be accurately characterized. Furthermore, by fully considering factors such as error growth trend and persistence, it can accurately distinguish between short-term noise, static deviation and slow drift anomaly, effectively improving the recognition accuracy of slow drift anomaly and the sensitivity of early anomaly recognition.

[0007] This invention provides a fragment-level UAV trajectory anomaly detection method based on prediction results, comprising the following steps:

[0008] The position sequence of the UAV is obtained as the observation trajectory, and the UAV position sequence is sampled by a sliding window of length L to form an L×d-dimensional trajectory window matrix;

[0009] The L×d-dimensional trajectory window matrix is ​​transposed to form a d×L-dimensional transpose matrix, and the transpose matrix is ​​input into the neural network prediction model to obtain the UAV predicted trajectory.

[0010] The trajectory residual sequence is generated by subtracting the observed trajectory from the predicted trajectory, and then the trajectory residual sequence is preprocessed.

[0011] A sliding window is used to sample the preprocessed trajectory residual sequence to obtain several residual sequence segments. The error features of each residual segment are extracted and normalized.

[0012] Construct an anomaly scoring model and substitute the values ​​of error features into the anomaly scoring model to determine the anomaly score;

[0013] The anomaly score is compared with the score threshold. If the anomaly score is greater than the score threshold, the observed trajectory corresponding to the current trajectory residual is anomaly.

[0014] Furthermore, the error features extracted for each residual segment specifically include the segment error mean, segment error root mean square, trend slope value, and duration feature;

[0015] Wherein: the mean segment error is the average of the data within each trajectory residual segment;

[0016] The root mean square error of a segment is the square root of the average of the squared values ​​of the data within each trajectory residual segment.

[0017] The trend slope value is obtained by least-squares linear fitting of the data within each trajectory residual segment according to the time index.

[0018] The duration feature is the longest duration within each trajectory residual segment where the data is above the baseline level.

[0019] Furthermore, the anomaly scoring model is constructed as follows:

[0020] ;

[0021] in: to These are the weights of the corresponding items. This represents the mean judgment error of the m-th trajectory residual segment. This represents the root mean square error of the m-th trajectory residual segment. This represents the trend slope value of the m-th trajectory residual segment. The characteristic value representing the duration of the m-th trajectory residual segment is... The nonlinear cross term represents the trend slope and duration characteristics of the m-th trajectory residual segment. This represents the difference between the mean of the second half and the mean of the first half in the m-th trajectory residual segment.

[0022] Furthermore, the nonlinear cross term is determined using the following method. :

[0023] .

[0024] Furthermore, the neural network prediction model includes a Transformer prediction network and an adaptive robust unscented Kalman filter correction module;

[0025] The Transformer prediction network takes a d×L dimensional transpose matrix as input and outputs a prediction mean vector and a diagonal covariance matrix, where the prediction mean vector represents the center estimate of the location and the covariance matrix represents the prediction uncertainty.

[0026] The output features of the Transformer prediction network are input into the adaptive robust unscented Kalman filter correction module, which outputs the predicted trajectory.

[0027] Accordingly, the present invention also provides an anomaly detection system for UAV tracks, including a data input module, a window construction module, a variable token module, a trajectory prediction module, a residual construction module, a segmentation module, a feature extraction module, a scoring module, and an anomaly judgment module;

[0028] The data input module is used to acquire the UAV position sequence as the observation trajectory;

[0029] The window construction module, whose input end is connected to the data input module, is used to sample the UAV position sequence using a sliding window of length L to form an L×d-dimensional trajectory window matrix;

[0030] The variable token module is used to transpose an L×d-dimensional trajectory window matrix into a d×L-dimensional transpose matrix;

[0031] The trajectory prediction module is used to receive the output features of the variable token module and output the predicted trajectory.

[0032] The residual construction module is used to receive the observed trajectory output by the data input module and the predicted trajectory output by the trajectory prediction module, and output the trajectory residual sequence.

[0033] The segmentation module is used to receive the trajectory residual sequence and form several trajectory residual segments according to a sliding window of length W and step size S.

[0034] The feature extraction module is used to perform feature extraction on each trajectory residual segment and then perform normalization processing;

[0035] The scoring module receives the normalized features from the feature extraction module and generates anomaly scores.

[0036] The anomaly detection module receives an anomaly score and compares the anomaly score with a scoring threshold. If the anomaly score is greater than the scoring threshold, then the observed trajectory corresponding to the current trajectory residual is anomaly.

[0037] Furthermore, the scoring module determines the anomaly score for the m-th trajectory residual segment using the following method:

[0038] ;

[0039] in: to These are the weights of the corresponding items. This represents the mean judgment error of the m-th trajectory residual segment. This represents the root mean square error of the m-th trajectory residual segment. This represents the trend slope value of the m-th trajectory residual segment. The characteristic value representing the duration of the m-th trajectory residual segment is... The nonlinear cross term represents the trend slope and duration characteristics of the m-th trajectory residual segment. This represents the difference between the mean of the second half and the mean of the first half in the m-th trajectory residual segment.

[0040] Furthermore, the nonlinear cross term is determined using the following method. :

[0041] .

[0042] Furthermore, the features extracted by the feature extraction module include:

[0043] Segment error mean, segment error root mean square, trend slope, and duration characteristics;

[0044] Wherein: the mean segment error is the average of the data within each trajectory residual segment;

[0045] The root mean square error of a segment is the square root of the average of the squared values ​​of the data within each trajectory residual segment.

[0046] The trend slope value is obtained by least-squares linear fitting of the data within each trajectory residual segment according to the time index.

[0047] The duration feature is the longest duration within each trajectory residual segment where the data is above the baseline level.

[0048] Furthermore, the trajectory prediction module includes a Transformer prediction network and an adaptive robust unscented Kalman filter correction module;

[0049] The Transformer prediction network takes a d×L dimensional transpose matrix as input and outputs a prediction mean vector and a diagonal covariance matrix, where the prediction mean vector represents the center estimate of the location and the covariance matrix represents the prediction uncertainty.

[0050] The output features of the Transformer prediction network are input into the adaptive robust unscented Kalman filter correction module, and the adaptive robust unscented Kalman filter correction module outputs the predicted trajectory.

[0051] Wherein: the loss function of the Transformer prediction network is the Gaussian negative log-likelihood loss function.

[0052] The beneficial effects of this invention are as follows: By fragmenting the observed trajectory to form a predicted trajectory, and further fragmenting the residual between the predicted trajectory and the reference trajectory, the cumulative development process of slow drift error can be accurately characterized. Furthermore, by fully considering factors such as error growth trend and persistence, it is possible to accurately distinguish between short-term noise, static bias, and slow drift anomalies, thereby effectively improving the accuracy of slow drift anomaly identification and the sensitivity of early anomaly identification. Attached Figure Description

[0053] The present invention will be further described below with reference to the accompanying drawings and embodiments:

[0054] Figure 1This is a schematic diagram of the process of the present invention.

[0055] Figure 2 This is a schematic diagram of the system structure of the present invention. Detailed Implementation

[0056] The present invention will be further described in detail below:

[0057] This invention provides a fragment-level UAV trajectory anomaly detection method based on prediction results, comprising the following steps:

[0058] The position sequence of the UAV is obtained as the observation trajectory, and the UAV position sequence is sampled by a sliding window of length L to form an L×d-dimensional trajectory window matrix;

[0059] Wherein: the position sequence of the UAV is represented as P_t, where t=1,2,....T, P_t is a d-dimensional position vector, where d equals 3, corresponding to the position components in the three directions of x-axis (East direction), y-axis (North direction) and z-axis respectively; in the above process, the continuous UAV position sequence is converted into time window samples with a certain degree of overlap (i.e. the length of the window is greater than the sliding step size), and each sample retains the motion context information of the most recent L time moments;

[0060] The L×d-dimensional trajectory window matrix is ​​transposed to form a d×L-dimensional transpose matrix, and the transpose matrix is ​​input into the neural network prediction model to obtain the UAV predicted trajectory.

[0061] In this process, by transposing the L×d-dimensional trajectory window matrix, the sequence of each coordinate dimension at L historical moments is formed into an independent token. That is to say, the East sequence, North sequence, and Up sequence are used as three variable tokens to input the model. Each token completely preserves the time evolution pattern of a certain coordinate dimension. On the other hand, the self-attention in the subsequent prediction model can directly establish a connection between dimensions, which is more suitable for modeling the dynamic coupling relationship between the coordinate components of the UAV.

[0062] The residual sequence is formed by subtracting the observed trajectory from the predicted trajectory, and the residual sequence is preprocessed. Under normal flight conditions or with good measurement quality, the residual usually fluctuates around a small range. However, in the slow drift anomaly scenario, although the residual may not be significant at the beginning, it will show a gradual upward trend and continue to rise over a continuous period of time. Therefore, the residual sequence can clearly characterize the slow drift anomaly, thus ensuring the accuracy of UAV trajectory anomaly detection.

[0063] The preprocessing of the trajectory residual sequence includes outlier extraction, time alignment, and light smoothing. Light smoothing refers to applying a weak smoothing process to the data, which preserves the trend information within the segments, helps improve the stability and reliability of the scoring, and reduces the contamination of subsequent trend features by extreme local noise.

[0064] A sliding window is used to sample the preprocessed trajectory residual sequence, obtaining several residual sequence segments. Error features are extracted from each residual segment and then normalized. The sliding window length is W, the compensation is S, and the start time of the m-th segment is... m=1,2,...,N; Through the above processing, each detection unit is no longer the instantaneous error at a certain moment, but the error evolution pattern in a certain continuous local interval, so that the anomaly judgment can be based on the overall structure inside the local interval rather than a single point peak, thus making it more suitable for detecting smooth cumulative slow drift anomalies.

[0065] Construct an anomaly scoring model and substitute the values ​​of error features into the anomaly scoring model to determine the anomaly score;

[0066] The anomaly score is compared with a scoring threshold. If the anomaly score is greater than the scoring threshold, the observed trajectory corresponding to the current trajectory residual is considered to have an anomaly. This method, by fragmenting the observed trajectory to form a predicted trajectory, and further fragmenting the residual between the predicted trajectory and the reference trajectory, accurately depicts the cumulative development process of slow drift error. It fully considers factors such as error growth trends and persistence, thus accurately distinguishing between short-term noise, static bias, and slow drift anomalies, effectively improving the accuracy of slow drift anomaly identification and the sensitivity of early anomaly identification.

[0067] In this embodiment, the error features extracted for each residual segment specifically include the segment error mean, segment error root mean square, trend slope value, and duration feature;

[0068] Wherein: the mean segment error is the average of the data within each trajectory residual segment; this feature reflects the overall deviation level of the segment;

[0069] The root mean square error of a segment is the square root of the average of the squared values ​​of the data within each trajectory residual segment; this feature reflects the energy and intensity of the error and is more sensitive to larger deviations.

[0070] The trend slope value is obtained by least squares linear fitting of the data in each trajectory residual segment according to the time index; where least squares linear fitting is an existing algorithm, which will not be described in detail here. This feature describes whether the error has a tendency to continue to grow and is a key feature for identifying early drift anomalies.

[0071] The duration feature is the longest duration by which the data within each trajectory residual segment exceeds the baseline level. This baseline level is a set value that is set according to the actual operating conditions. This feature reflects whether the abnormal deviation has a persistent characteristic. Through the above, the accuracy of the scoring can be effectively ensured.

[0072] In this embodiment, the anomaly scoring model is constructed as follows:

[0073] ;

[0074] in: to These are the weights for the corresponding items, used to control the degree of influence of different features on the total score. to The sum of these values ​​is 1, and this weight can be set according to the actual working conditions.

[0075] This represents the mean judgment error of the m-th trajectory residual segment. This represents the root mean square error of the m-th trajectory residual segment. This represents the trend slope value of the m-th trajectory residual segment. The larger the value, the more significant the increase in error over time. The characteristic value representing the duration of the m-th trajectory residual segment is... This describes whether an anomaly persists, rather than appearing only momentarily at a single sampling point. If a segment is merely a short-lived spike, then... Not significantly; however, if it remains within a high error range for an extended period, then... It will increase significantly; The nonlinear cross term represents the trend slope and duration characteristics of the m-th trajectory residual segment, where: the nonlinear cross term is determined by the following method. :

[0076] The nonlinear cross term It doesn't simply reflect whether the error is large or small, but emphasizes that "the error is both continuously increasing and continuously existing." and When it is large at the same time Only then will it increase significantly. If the trend is large but short-lived, or long-lived but the trend is not obvious, then the item will not be too high, thus enabling the score to capture the "continuous rise" pattern feature in the slow drift anomaly.

[0077] This represents the difference between the mean of the second half and the mean of the first half in the m-th trajectory residual segment. This feature directly measures whether the latter half of the segment is higher than the former. If the error of a segment is indeed gradually increasing, then the mean error of its second half will usually be higher than that of the first half, thus... If the value is positive and relatively large, this item can effectively supplement the trend slope information and ensure the accuracy of the score.

[0078] In this embodiment, the neural network prediction model includes a Transformer prediction network and an adaptive robust unscented Kalman filter correction module;

[0079] The Transformer prediction network takes a d×L dimensional transpose matrix as input and outputs a prediction mean vector and a diagonal covariance matrix, where the prediction mean vector represents the center estimate of the location and the covariance matrix represents the prediction uncertainty.

[0080] By providing two outputs, richer prediction information can be offered, and directly usable prior parameters can be provided for the subsequent adaptive robust unscented Kalman filter correction module. Furthermore, the Transformer prediction network's ability to provide confidence constraints for the adaptive robust unscented Kalman filter correction module's filtering recursion is enhanced, thus strengthening the coupling between prediction and filtering. The Transformer prediction network is a prior art technique, consisting of multiple stacked encoding modules. Each encoding module includes a multi-head self-attention layer, a feedforward network layer, and a normalization layer.

[0081] The multi-head self-attention sublayer is used to capture the interaction relationship between tokens with different coordinates, the feedforward network sublayer is used to further enhance the non-linear representation ability of each token, and the normalization sublayer is used to improve training stability.

[0082] The loss function of the Transformer prediction network is the Gaussian negative log-likelihood loss function. This loss function comprehensively considers the deviation between the predicted mean and the true position, as well as the fitting of the prediction covariance to the error distribution. It can simultaneously constrain the "accuracy of the predicted value" and the "reasonableness of the uncertainty estimation", making the diagonal covariance matrix output by the Transformer prediction network more physically meaningful and directly serving as the confidence basis for subsequent filtering priors, thereby enhancing the effect of integrated prediction and filtering modeling.

[0083] The output features of the Transformer prediction network are input into the adaptive robust unscented Kalman filter correction module, which outputs the predicted trajectory. After filtering by the adaptive robust unscented Kalman filter correction module, a predicted trajectory that is aligned with the observations but is smoother, more stable, and more resistant to anomalies is obtained. This predicted trajectory provides a basic reference for subsequent residual detection. The adaptive robust unscented Kalman filter correction module uses an existing adaptive robust unscented Kalman filter algorithm to process the data and generate the predicted trajectory; its specific details are not elaborated here.

[0084] Accordingly, the present invention also provides an anomaly detection system for UAV tracks, including a data input module, a window construction module, a variable token module, a trajectory prediction module, a residual construction module, a segmentation module, a feature extraction module, a scoring module, and an anomaly judgment module;

[0085] The data input module is used to acquire the UAV position sequence as the observation trajectory;

[0086] The window construction module, whose input end is connected to the data input module, is used to sample the UAV position sequence using a sliding window of length L to form an L×d-dimensional trajectory window matrix;

[0087] The variable token module is used to transpose an L×d-dimensional trajectory window matrix into a d×L-dimensional transpose matrix;

[0088] The trajectory prediction module is used to receive the output features of the variable token module and output the predicted trajectory; the trajectory prediction module includes a Transformer prediction network and an adaptive robust unscented Kalman filter correction module.

[0089] The Transformer prediction network takes a d×L dimensional transpose matrix as input and outputs a prediction mean vector and a diagonal covariance matrix, where the prediction mean vector represents the center estimate of the location and the covariance matrix represents the prediction uncertainty.

[0090] The output features of the Transformer prediction network are input into the adaptive robust unscented Kalman filter correction module, and the adaptive robust unscented Kalman filter correction module outputs the predicted trajectory.

[0091] Wherein: the loss function of the Transformer prediction network is the Gaussian negative log-likelihood loss function.

[0092] The residual construction module is used to receive the observed trajectory output by the data input module and the predicted trajectory output by the trajectory prediction module, and output the trajectory residual sequence.

[0093] The segmentation module is used to receive the trajectory residual sequence and form several trajectory residual segments according to a sliding window of length W and step size S.

[0094] The feature extraction module is used to perform feature extraction on each trajectory residual segment, and then perform normalization processing; the features extracted by the feature extraction module include:

[0095] Segment error mean, segment error root mean square, trend slope, and duration characteristics;

[0096] Wherein: the mean segment error is the average of the data within each trajectory residual segment;

[0097] The root mean square error of a segment is the square root of the average of the squared values ​​of the data within each trajectory residual segment.

[0098] The trend slope value is obtained by least-squares linear fitting of the data within each trajectory residual segment according to the time index.

[0099] The duration feature is the longest duration within each trajectory residual segment where the data is above the baseline level.

[0100] The scoring module receives the normalized features from the feature extraction module and generates anomaly scores. The scoring module determines the anomaly score for the m-th trajectory residual segment using the following method:

[0101] ;

[0102] in: to These are the weights of the corresponding items. This represents the mean judgment error of the m-th trajectory residual segment. This represents the root mean square error of the m-th trajectory residual segment. This represents the trend slope value of the m-th trajectory residual segment. The characteristic value representing the duration of the m-th trajectory residual segment is... The nonlinear cross term represents the trend slope and duration characteristics of the m-th trajectory residual segment. This represents the difference between the mean of the second half and the mean of the first half in the m-th trajectory residual segment.

[0103] The nonlinear cross term is determined using the following method. :

[0104] .

[0105] The anomaly detection module receives an anomaly score and compares the anomaly score with a scoring threshold. If the anomaly score is greater than the scoring threshold, then the observed trajectory corresponding to the current trajectory residual is anomaly.

[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A fragment-level UAV trajectory anomaly detection method based on prediction results, characterized in that: Includes the following steps: The position sequence of the UAV is obtained as the observation trajectory, and the UAV position sequence is sampled by a sliding window of length L to form an L×d-dimensional trajectory window matrix; The L×d-dimensional trajectory window matrix is ​​transposed to form a d×L-dimensional transpose matrix, and the transpose matrix is ​​input into the neural network prediction model to obtain the UAV predicted trajectory. The trajectory residual sequence is generated by subtracting the observed trajectory from the predicted trajectory, and then the trajectory residual sequence is preprocessed. A sliding window is used to sample the preprocessed trajectory residual sequence to obtain several residual sequence segments. The error features of each residual segment are extracted and normalized. Construct an anomaly scoring model and substitute the values ​​of error features into the anomaly scoring model to determine the anomaly score; The anomaly score is compared with the score threshold. If the anomaly score is greater than the score threshold, the observed trajectory corresponding to the current trajectory residual is anomaly.

2. The fragment-level UAV trajectory anomaly detection method based on prediction results according to claim 1, characterized in that: The error features extracted for each residual segment specifically include the segment error mean, segment error root mean square, trend slope value, and duration feature; Wherein: the mean segment error is the average of the data within each trajectory residual segment; The root mean square error of a segment is the square root of the average of the squared values ​​of the data within each trajectory residual segment. The trend slope value is obtained by least-squares linear fitting of the data within each trajectory residual segment according to the time index. The duration feature is the longest duration within each trajectory residual segment where the data is above the baseline level.

3. The fragment-level UAV trajectory anomaly detection method based on prediction results according to claim 2, characterized in that: The specific steps for constructing the anomaly scoring model are as follows: ; in: to These are the weights of the corresponding items. This represents the mean judgment error of the m-th trajectory residual segment. This represents the root mean square error of the m-th trajectory residual segment. This represents the trend slope value of the m-th trajectory residual segment. The characteristic value representing the duration of the m-th trajectory residual segment is... The nonlinear cross term represents the trend slope and duration characteristics of the m-th trajectory residual segment. This represents the difference between the mean of the second half and the mean of the first half in the m-th trajectory residual segment.

4. The fragment-level UAV trajectory anomaly detection method based on prediction results according to claim 3, characterized in that: The nonlinear cross term is determined using the following method. : 。 5. The fragment-level UAV trajectory anomaly detection method based on prediction results according to claim 1, characterized in that: The neural network prediction model includes a Transformer prediction network and an adaptive robust unscented Kalman filter correction module; The Transformer prediction network takes a d×L dimensional transpose matrix as input and outputs a prediction mean vector and a diagonal covariance matrix, where the prediction mean vector represents the center estimate of the location and the covariance matrix represents the prediction uncertainty. The output features of the Transformer prediction network are input into the adaptive robust unscented Kalman filter correction module, which outputs the predicted trajectory.

6. A UAV trajectory anomaly detection system, characterized in that: It includes a data input module, a window construction module, a variable token module, a trajectory prediction module, a residual construction module, a segmentation module, a feature extraction module, a scoring module, and an anomaly detection module; The data input module is used to acquire the UAV position sequence as the observation trajectory; The window construction module, whose input end is connected to the data input module, is used to sample the UAV position sequence using a sliding window of length L to form an L×d-dimensional trajectory window matrix; The variable token module is used to transpose an L×d-dimensional trajectory window matrix into a d×L-dimensional transpose matrix; The trajectory prediction module is used to receive the output features of the variable token module and output the predicted trajectory. The residual construction module is used to receive the observed trajectory output by the data input module and the predicted trajectory output by the trajectory prediction module, and output the trajectory residual sequence. The segmentation module is used to receive the trajectory residual sequence and form several trajectory residual segments according to a sliding window of length W and step size S. The feature extraction module is used to perform feature extraction on each trajectory residual segment and then perform normalization processing; The scoring module receives the normalized features from the feature extraction module and generates anomaly scores. The anomaly detection module receives an anomaly score and compares the anomaly score with a scoring threshold. If the anomaly score is greater than the scoring threshold, then the observed trajectory corresponding to the current trajectory residual is anomaly.

7. The UAV trajectory anomaly detection system according to claim 6, characterized in that: The scoring module determines the anomaly score for the m-th trajectory residual segment using the following method: ; in: to These are the weights of the corresponding items. This represents the mean judgment error of the m-th trajectory residual segment. This represents the root mean square error of the m-th trajectory residual segment. This represents the trend slope value of the m-th trajectory residual segment. The characteristic value representing the duration of the m-th trajectory residual segment is... The nonlinear cross term represents the trend slope and duration characteristics of the m-th trajectory residual segment. This represents the difference between the mean of the second half and the mean of the first half in the m-th trajectory residual segment.

8. The UAV trajectory anomaly detection system according to claim 7, characterized in that: The nonlinear cross term is determined using the following method. : 。 9. The UAV trajectory anomaly detection system according to claim 6, characterized in that: The features extracted by the feature extraction module include: Segment error mean, segment error root mean square, trend slope, and duration characteristics; Wherein: the mean segment error is the average of the data within each trajectory residual segment; The root mean square error of a segment is the square root of the average of the squared values ​​of the data within each trajectory residual segment. The trend slope value is obtained by least-squares linear fitting of the data within each trajectory residual segment according to the time index. The duration feature is the longest duration within each trajectory residual segment where the data is above the baseline level.

10. The UAV trajectory anomaly detection system according to claim 6, characterized in that: The trajectory prediction module includes a Transformer prediction network and an adaptive robust unscented Kalman filter correction module; The Transformer prediction network takes a d×L dimensional transpose matrix as input and outputs a prediction mean vector and a diagonal covariance matrix, where the prediction mean vector represents the center estimate of the location and the covariance matrix represents the prediction uncertainty. The output features of the Transformer prediction network are input into the adaptive robust unscented Kalman filter correction module, and the adaptive robust unscented Kalman filter correction module outputs the predicted trajectory. Wherein: the loss function of the Transformer prediction network is the Gaussian negative log-likelihood loss function.