Abnormal diagnosis method and system for flight data of unmanned aerial vehicle
By employing dynamic time-frequency perception and causal constraint contrastive learning, the problems of data feature capture and causal relationship analysis in the diagnosis of UAV flight data anomalies are solved, achieving efficient and accurate anomaly detection and fault location, reducing the missed detection rate and computational resource consumption, and adapting to complex scenarios and multi-model requirements.
Patent Information
- Application Number
- CN202511225818.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2025-12-12
AI Technical Summary
Existing UAV flight data anomaly diagnosis technologies have bottlenecks in data feature capture, causal relationship analysis, and adaptability to complex scenarios, making it difficult to meet the requirements of real-time performance, accuracy, and robustness. In particular, they suffer from low computational efficiency and weak model generalization ability when processing high-dimensional, non-stationary, and multi-source heterogeneous data.
We employ dynamic time-frequency sensing preprocessing, multi-scale adaptive feature extraction, and causal constraint contrastive learning. We detect temporal abrupt changes using the gradient threshold method, and construct spatiotemporal joint feature vectors by combining frequency domain decomposition and sliding window sampling. We then use multi-head self-attention mechanism and causal topology graph for feature fusion and sparsification to achieve in-depth mining of causal relationships and anomaly decision-making.
It significantly improves the ability to capture time-varying features and the accuracy of anomaly detection, reduces the rate of missed detections and false alarms, enhances the causal interpretability of features and the ability to analyze multi-parameter anomalies, optimizes computational efficiency, adapts to complex scenarios and cross-model universality, builds a closed-loop diagnostic system, and provides full-process safety decision support.
Smart Images

Figure CN121117879A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of unmanned aerial vehicle safety monitoring, and particularly relates to an abnormal diagnosis method and system for unmanned aerial vehicle flight data by fusing dynamic time-frequency perception and causal constraint mechanism. BACKGROUND
[0002] With the wide application of unmanned aerial vehicles in surveying and mapping, logistics transportation, emergency rescue and other fields, its flight safety guarantee has become a key link for the development of the industry. Unmanned aerial vehicle flight data contains core operation information such as flight attitude, power system and navigation positioning. Precise abnormal diagnosis of these data can effectively prevent faults and reduce accident risks. However, the existing abnormal diagnosis technology for unmanned aerial vehicle flight data still has significant bottlenecks in data feature capture, causal relationship analysis and adaptability to complex scenarios, and urgent technical breakthroughs are needed.
[0003] Currently, unmanned aerial vehicle flight scenes are increasingly complex and variable, covering various environments such as urban buildings, mountainous terrain and severe weather, which puts higher requirements on the real-time, accuracy and robustness of the abnormal diagnosis system. Although some research has proposed detection methods based on machine learning or deep learning, it is still difficult to meet the actual application requirements. Some research uses a fixed architecture neural network model combined with a noise reduction autoencoder and a long short-term memory neural network. Due to the lack of dynamic adjustment capability of the model structure, it cannot adapt to the time-varying characteristics of flight data changing over time and environment, and is prone to miss detection or false positives in complex working conditions. In terms of data feature processing, existing technologies mostly rely on single-dimensional or static feature extraction. In addition, there are complex causal relationships between unmanned aerial vehicle flight parameters, such as physical constraint relationships between attitude angle changes, rudder operations and power system outputs. However, most existing solutions only focus on the statistical correlation between data and fail to deeply explore the causal logic between parameters. When multiple parameters jointly exhibit abnormalities, it is difficult to accurately trace the root cause of the abnormality and achieve rapid positioning and repair of faults.
[0004] At the same time, with the development trend of unmanned aerial vehicle intelligence and clustering, the data size and complexity generated by unmanned aerial vehicles are growing exponentially. Existing abnormal diagnosis methods generally have low computational efficiency and weak model generalization ability when dealing with high-dimensional, non-stationary and multi-source heterogeneous data, making it difficult to meet the needs of real-time monitoring and rapid response.
[0005] How to break through the limitations of traditional technology and design an abnormal diagnosis scheme that can dynamically perceive data time-frequency features, mine parameter causal relationships and adapt to complex flight scenarios has become a key technical bottleneck for ensuring the safe operation of unmanned aerial vehicles. SUMMARY
[0006] The present application relates to the technical field of unmanned aerial vehicle safety monitoring, and particularly relates to an abnormal diagnosis method and system for unmanned aerial vehicle flight data by fusing dynamic time-frequency perception and causal constraint mechanism.
[0007] To achieve the above objectives, on the one hand, this invention proposes a method for anomaly diagnosis of UAV flight data, comprising:
[0008] S1, Dynamic Time-Frequency Awareness Preprocessing, including:
[0009] S11, Obtain the preprocessed raw data;
[0010] S12, Based on the gradient threshold method, detect time-domain outliers in the original data to obtain time-domain abrupt change point features;
[0011] S13, perform frequency domain decomposition on the original data to obtain the frequency domain decomposition result;
[0012] S14, the time-domain abrupt change features, frequency-domain decomposition results and original data are fused to construct a spatiotemporal joint feature vector, and a sliding window is used to sample the spatiotemporal joint feature vector to generate a sliding window sample;
[0013] S2, multi-scale adaptive feature extraction, including:
[0014] S21, Construct a set of several expert networks, each expert network corresponding to a different feature extraction scale;
[0015] S22, for the sliding window samples, each expert network calculates intra-patch attention features and inter-patch attention features respectively through a multi-head self-attention mechanism;
[0016] S23, the intra-patch attention features and inter-patch attention features are fused to obtain fused features;
[0017] S24, Based on gradient importance, the fused features are sparsified and lightweighted, and a lightweight feature representation is output;
[0018] S3, Causal Constraint Comparative Learning, includes:
[0019] S31, converts the causal topology graph pre-constructed based on flight dynamics into a causal weight topology matrix;
[0020] S32, the lightweight feature representation is transformed by the causal weight topology matrix to generate topology-enhanced features;
[0021] S33, the lightweight feature representation and the topology enhancement feature are fused through residual connection to generate the enhanced feature;
[0022] S34, randomly select features from the window of the time-domain mutation point features as abnormal samples, and randomly select features from the window without mutation points as normal samples, and perform time alignment and feature alignment between the normal samples and abnormal samples.
[0023] S35, calculate the contrast loss and consistency loss of the lightweight feature representation and the topology enhancement feature, and fuse the contrast loss and consistency loss to form the overall optimization objective;
[0024] S36, The enhanced features are normalized to generate causal enhanced features;
[0025] S4, Adaptive Anomaly Decision Making, includes:
[0026] S41, the causal enhancement features are mapped back to the original feature space through the reconstruction network, and the reconstruction error is calculated;
[0027] S42, calculate the similarity matrix of the causal enhancement feature and compare it with the causal weight topology matrix to obtain the causal loss;
[0028] S43, the reconstruction error and the causal loss are fused according to weights to obtain the basic hybrid loss;
[0029] S44, Calculate the time-series statistics for the causal enhancement features;
[0030] S45, input the time series statistics into the constructed fully connected network and calculate the confidence level, and trigger different anomaly decisions based on the confidence level;
[0031] S5, Root Cause Tracing, Output Root Cause Analysis Report; The Root Cause Analysis Report includes the ranking of the importance of root cause nodes, a visualization map of abnormal propagation paths, and counterfactual reasoning verification results.
[0032] In a preferred embodiment, S11 includes: collecting flight data in real time through a data acquisition device mounted on the UAV to form raw data, and then preprocessing the raw data to obtain preprocessed raw data.
[0033] In a preferred embodiment, S12 includes:
[0034] S121, calculate the temporal gradient for each parameter sequence based on the gradient thresholding method;
[0035] S122, set dynamic thresholds based on historical data standard deviation, mean and confidence coefficient;
[0036] S123, compare the time gradient with the dynamic threshold. When the absolute value of the time gradient is greater than the dynamic threshold, it is determined that there is a time domain outlier at that moment and it is marked, thus obtaining the time domain abrupt change point feature.
[0037] In a preferred embodiment, S13 includes:
[0038] S131, Perform a discrete Fourier transform on each parameter sequence to convert the time-domain signal into a frequency-domain representation;
[0039] S132, the low-frequency and high-frequency components are reconstructed by inverse Fourier transform, and the periodic features and sudden high-frequency features are separated to obtain the frequency domain decomposition result.
[0040] In a preferred embodiment, in step S11, the data acquisition device includes an inertial measurement unit, a global positioning system, and a power system sensor; the flight data includes three-axis angular velocity, flight altitude, airspeed, and motor speed; the preprocessing process of the raw data includes median filtering to remove impulse noise from the raw data, and resampling the data to a uniform frequency using linear interpolation to obtain preprocessed raw data.
[0041] In a preferred embodiment, before step S21, the feature entropy value of the sliding window sample output by step S1 is calculated.
[0042] In a preferred embodiment, in S22, the intra-patch local attention divides the sliding window sample into several local patches and calculates the attention weights of features within each patch; the inter-patch global dependency treats all local patches as a whole, captures global feature associations through a cross-patch attention mechanism, and outputs features; and / or, in S23, the intra-patch attention features and inter-patch attention features are fused to obtain the output of each expert network, and then the results of multiple expert networks are integrated using a weighted summation method to obtain fused features.
[0043] In a preferred embodiment, in step S45, the process of obtaining the confidence score includes: calculating an initial threshold based on the normal sample distribution; adjusting the initial threshold according to the real-time noise level to obtain a dynamic threshold; obtaining the output of expert networks at different scales and calculating the cosine similarity matrix between features; taking the average of the diagonals of the cosine similarity matrix as the consistency score; incorporating the consistency score into the final anomaly score; and normalizing the anomaly score to obtain the confidence score.
[0044] In a preferred embodiment, in step S45, triggering different abnormal decisions based on the confidence level includes: if the confidence level is greater than 0.9, then triggering an emergency plan; if the confidence level is greater than or equal to 0.7 and less than or equal to 0.9, then triggering root cause tracing; and if the confidence level is greater than or equal to 0.5 and less than or equal to 0.7, then triggering an early warning message.
[0045] On the other hand, this invention proposes an anomaly diagnosis system for UAV flight data, comprising:
[0046] The data acquisition and processing module includes a data acquisition module and a dynamic time-domain sensing preprocessing module. The data acquisition module is used to acquire the preprocessed raw data. The dynamic time-domain sensing preprocessing module is used to detect time-domain outliers in the raw data based on the gradient threshold method to obtain time-domain abrupt change features. It also performs frequency domain decomposition on the raw data to obtain the frequency domain decomposition results. The time-domain abrupt change features, the frequency domain decomposition results and the raw data are fused to construct a spatiotemporal joint feature vector. A sliding window is used to sample the spatiotemporal joint feature vector to generate sliding window samples.
[0047] The multi-scale adaptive feature extraction module is used to construct a set of several expert networks, each corresponding to a different feature extraction scale. For sliding window samples, each expert network calculates intra-patch attention features and inter-patch attention features through a multi-head self-attention mechanism. The intra-patch attention features and inter-patch attention features are fused to obtain fused features. Based on gradient importance, the fused features are sparsified and lightweighted to output a lightweight feature representation.
[0048] The causal constraint contrastive learning module is used to convert a pre-constructed causal topology graph based on flight dynamics into a causal weight topology matrix. The lightweight feature representation is transformed by the causal weight topology matrix to generate topology-enhanced features. The lightweight feature representation and the topology-enhanced features are fused through residual connections to generate enhanced features. Features are randomly selected from the window of features at abrupt change points in the time domain as anomalous samples, and features are randomly selected from the window without abrupt change points as normal samples. The normal samples and anomalous samples are time-aligned and feature-aligned. The contrast loss and consistency loss of the lightweight feature representation and the topology-enhanced features are calculated and fused to form the overall optimization objective. The enhanced features are normalized and finally causal-enhanced features are generated.
[0049] The adaptive anomaly decision module is used to map causal enhancement features back to the original feature space through the reconstruction network, calculate the reconstruction error, calculate the similarity matrix of causal enhancement features and compare it with the causal weight topology matrix to obtain the causal loss, fuse the reconstruction error and causal loss according to the weights to obtain the basic mixed loss, calculate the temporal statistics of causal enhancement features, input the temporal statistics into the constructed fully connected network and calculate the confidence, and trigger different anomaly decisions based on the confidence.
[0050] The causal root cause tracing module is used to output a root cause analysis report; the root cause analysis report includes a ranking of the importance of root cause nodes, a visualization map of abnormal propagation paths, and counterfactual reasoning verification results.
[0051] Compared with the prior art, the present invention has the following beneficial effects:
[0052] 1. Improve the ability to capture time-varying features and the accuracy of anomaly detection: Through dynamic time-frequency sensing preprocessing, combined with gradient thresholding and time-frequency domain decomposition, the system effectively captures the time-domain abrupt change points and frequency-domain anomaly features of UAV flight data, and constructs a spatiotemporal joint feature vector. Compared with the traditional fixed architecture model, it can adapt to non-stationary data changes under complex working conditions, significantly reducing the rate of missed detections and false alarms, especially in dynamic environments such as urban buildings and severe weather.
[0053] 2. Enhanced causal interpretability and multi-parameter anomaly analysis capabilities: A causal topology graph is constructed based on flight dynamics. Weights are calibrated using the Granger causality test, and Shapley values and counterfactual reasoning are combined to achieve in-depth analysis from statistical correlation to causal logic. In multi-parameter joint anomaly scenarios, the root cause of the anomaly can be accurately traced (e.g., the propagation chain of control surface failure → attitude angle anomaly → airspeed fluctuation), solving the problem that existing technologies rely solely on statistical correlation and cannot pinpoint the root cause, providing precise guidance for rapid fault repair.
[0054] 3. Optimize computational efficiency and edge computing adaptability: By using multi-scale expert network sparsification, feature quantization (high-frequency floating-point / low-frequency integer) and gradient importance pruning, the model complexity and computational overhead are reduced while retaining key information, meeting the real-time monitoring needs of UAV edge nodes. Compared with traditional deep learning solutions, the computational resource consumption is reduced by about 40%, making it suitable for large-scale deployment of swarmed UAVs.
[0055] 4. Enhance adaptability to complex scenarios and cross-model universality: The causal topology graph can dynamically adjust nodes and weights according to the UAV model (quadcopter / fixed-wing), and adapt parameters to cope with the differences in dynamic characteristics of different models; the decision-making mechanism that integrates dynamic thresholds and consistency scores can adapt to changes in the flight environment (such as airflow and load) in real time, and maintain stable anomaly diagnosis performance in diverse scenarios such as industrial inspection and emergency rescue.
[0056] 5. Constructing a closed-loop diagnostic system and safety decision support: From dynamic time-frequency feature extraction to causal root cause tracing, a complete technical chain is formed, outputting a safety report that includes root cause ranking, propagation path visualization, and counterfactual verification results, providing full-process decision support for UAV flight safety. Experimental verification shows that this solution can reduce anomaly localization time by more than 50%, improve fault repair efficiency by 30%, and significantly reduce the risk of flight accidents. Attached Figure Description
[0057] Figure 1 This is a flowchart of an anomaly diagnosis method for UAV flight data according to the present invention;
[0058] Figure 2 This is a structural diagram of an anomaly diagnosis system for UAV flight data according to the present invention;
[0059] Figure 3a This is a schematic diagram illustrating the marking of time-domain anomalies during the dynamic time-frequency sensing preprocessing process in a specific embodiment of the present invention;
[0060] Figure 3b This is a schematic diagram of frequency domain analysis during the dynamic time-frequency sensing preprocessing process in a specific embodiment of the present invention;
[0061] Figure 3c These are the low-frequency components obtained by frequency domain decomposition in a specific embodiment of the present invention;
[0062] Figure 3d These are the high-frequency components decomposed in the frequency domain in a specific embodiment of the present invention;
[0063] Figure 4 This is a causal root cause diagram in a specific embodiment of the present invention. Detailed Implementation
[0064] The specific embodiments of the present invention will be described in detail below, but it should be understood that the scope of protection of the present invention is not limited to the specific embodiments.
[0065] Unless otherwise expressly stated, throughout the specification and claims, the term "comprising" or its variations such as "including" or "comprises" shall be understood to include the stated elements or components without excluding other elements or other components.
[0066] like Figure 1 As shown, the method for anomaly diagnosis of UAV flight data disclosed in this invention mainly includes the following steps:
[0067] S1, Dynamic Time-Frequency Awareness Preprocessing, including:
[0068] S11, Obtain the preprocessed raw data.
[0069] Specifically, flight data is collected in real time by the data acquisition device carried by the drone to form raw data, and then the raw data is preprocessed to obtain preprocessed raw data.
[0070] During implementation, the data acquisition devices specifically include inertial measurement units (IMU), global positioning systems (GPS), and power system sensors; flight data includes, but is not limited to, three-axis angular velocities. Parameters such as flight altitude h, airspeed v, and motor speed n are used to form raw data. Where N is the number of sampling points and D is the parameter dimension. The preprocessing of the original data includes, but is not limited to: performing median filtering to remove impulse noise and resampling the data to a uniform frequency f using linear interpolation. s To obtain the preprocessed raw data .
[0071] S12, based on the gradient threshold method, detect time-domain outliers in the original data to obtain time-domain abrupt change point features.
[0072] Specifically, S12 includes:
[0073] S121, calculates the temporal gradient for each parameter sequence based on the gradient thresholding method.
[0074] In this embodiment, the time gradient The calculation formula is:
[0075] ;
[0076] In the formula, x i (t) represents the current sampled value of the i-th parameter sequence at time t. Let be the sampled value of the i-th parameter sequence at the previous time step. The time interval is between two parameter sequences, where the parameter sequences are the original data after S11 preprocessing.
[0077] S122 sets a dynamic threshold based on the standard deviation, mean, and confidence coefficient of historical data.
[0078] In this embodiment, the dynamic threshold τ i The calculation formula is:
[0079] ;
[0080] in, Let σ be the mean, α be the confidence coefficient, and σ be the mean. h The standard deviation is the historical data.
[0081] S123, compare the temporal gradient with the dynamic threshold. When the absolute value of the temporal gradient is greater than the dynamic threshold, it is determined that there is a temporal outlier at that moment and marked, thus obtaining the temporal abrupt change feature C. t .
[0082] S13, perform frequency domain decomposition on the original data to obtain the frequency domain decomposition result.
[0083] Specifically, S13 includes:
[0084] S131 performs a discrete Fourier transform on each parameter sequence to convert the time-domain signal into a frequency-domain representation.
[0085] Specifically, the transformed frequency domain representation Specifically:
[0086] ;
[0087] In the formula, This is the output of the i-th signal at the k-th frequency point in the frequency domain after undergoing the Discrete Fourier Transform (DFT). The length of the parameter sequence.
[0088] S132 reconstructs the low-frequency and high-frequency components through inverse Fourier transform, separates the periodic features and sudden high-frequency features, and obtains the frequency domain decomposition result.
[0089] Specifically, the separated periodic features and sudden high-frequency features are as follows:
[0090] ;
[0091] In the formula, , Let be the time-domain signals corresponding to the low-frequency and high-frequency components of the i-th signal after processing. This is an inverse discrete Fourier transform operation that converts the frequency domain representation back to the time domain; , Low frequency , These are the time-domain signals corresponding to the low-frequency and high-frequency components of the i-th signal after processing; This is an inverse discrete Fourier transform operation that converts the frequency domain representation back to the time domain; , These are the frequency domain masks for the low-frequency and high-frequency components, respectively.
[0092] S14, the time-domain abrupt change features, frequency-domain decomposition results and original data are fused to construct a spatiotemporal joint feature vector, and a sliding window is used to sample the spatiotemporal joint feature vector to generate a sliding window sample.
[0093] Specifically, for each sampling time t, the spatiotemporal joint feature vector is represented as:
[0094] .
[0095] in, and These represent the low-frequency and high-frequency decomposition results of the D parameters, respectively.
[0096] A sliding window of size L is used to apply the above spatiotemporal joint feature vectors Sampling is performed, and the resulting sliding window sample Z m for:
[0097] ;
[0098] In the formula, , For the fused feature dimensions, , where is the total number of samples.
[0099] S2, multi-scale adaptive feature extraction, including:
[0100] S21, construct a set of several expert networks, each corresponding to a different feature extraction scale.
[0101] Before this step, first process the sliding window sample Z output in step S1. m Calculate its characteristic entropy value H(Zm) to measure the uncertainty of the data distribution. The formula for calculating the characteristic entropy value H(Zm) is as follows:
[0102] ;
[0103] In the formula, For the sliding window sample Z m The feature entropy value is such that a larger value indicates higher uncertainty. For the sliding window sample Z m The probability of taking the k-th state.
[0104] Construct an ensemble containing K expert networks. Each expert network corresponds to a different feature extraction scale S. i .
[0105] S22, for the sliding window samples, each expert network calculates intra-patch attention features and inter-patch attention features respectively through a multi-head self-attention mechanism.
[0106] Specifically, for the input sample, i.e., the sliding window sample Z m Each expert network calculates intra-patch local attention and inter-patch global dependency through a multi-head self-attention mechanism.
[0107] Among them, intra-patch local attention will slide the window sample Z m Divided into sizes S i Local patch P m,s Calculate the attention weight A of the features within the patch. m,s :
[0108] ;
[0109] In the formula: The feature representation associated with the m-th query and the s-th key; Let be the transpose of the m-th group and the s-th key feature, used for querying. Calculate correlation similarity to uncover key associations between flight data; is the dimension of the key vector.
[0110] The inter-patch global dependency treats all local patches as a whole, capturing global feature correlations through a cross-patch attention mechanism, and outputs a feature representation Q. m,i :
[0111] ;
[0112] In the formula: For input Z m Encoding / transformation; This is the m-th header and s-th value feature.
[0113] S23, the intra-patch attention features and inter-patch attention features are fused to obtain fused features.
[0114] Specifically, the attention features of the intra-patch and inter-patch are fused to obtain the output Q of each expert network. m,i The results of k activated expert networks are integrated using a weighted summation method to obtain the fusion feature, which is specifically represented as follows:
[0115] ;
[0116] In the formula, O m The fusion feature output by the m-th module. Let be the weight coefficient of the j-th branch in the m-th module.
[0117] S24, Based on gradient importance, the fused features are sparsified and lightweighted, and a lightweight feature representation is output.
[0118] Specifically, based on gradient importance, the above-mentioned fusion feature O m Sparsification: Set a pruning threshold Remove gradients whose absolute values are less than 1. The connections reduce model complexity.
[0119] and the fusion feature O mLightweight quantization is implemented: high-frequency anomaly-sensitive features are represented using 32-bit floating-point quantization, while low-frequency normal mode features are quantized using 8-bit integer quantization. This reduces memory usage and computational overhead while retaining key information, ultimately outputting a lightweight feature representation F. m .
[0120] S3, Causal Constraint Comparative Learning, includes:
[0121] S31 converts a pre-constructed causal topology graph based on flight dynamics into a causal weighted topology matrix.
[0122] Specifically, based on a pre-constructed causal topology graph of flight dynamics Based on flight dynamics principles, nodes (e.g., control surfaces → pitch) and directed edges (e.g., elevator → pitch angle → airspeed) are defined, with initial weights assigned by physical laws (e.g., the influence weight of control surfaces on attitude angles is set to 0.8). The causal topology graph is then transformed into a causal weighted topology matrix W, where... This represents the strength of the causal influence of node i on node j, when there is no direct causal relationship. .
[0123] S32, the lightweight feature representation is transformed by the causal weight topology matrix to generate topology-enhanced features.
[0124] Specifically, the generated topology enhancement features Specifically, it is expressed as follows:
[0125] .
[0126] In the formula, For activation functions; This is the bias vector.
[0127] S33, the lightweight feature representation and the topology enhancement feature are fused through residual connection to generate the enhanced feature.
[0128] Specifically, the generated enhanced features Specifically, it is expressed as follows:
[0129] ;
[0130] In the formula, For fusion weighting coefficients.
[0131] S34, randomly select features from the window of the time-domain mutation point features as abnormal samples, and randomly select features from the window without mutation points as normal samples, and perform time alignment and feature alignment between the normal samples and abnormal samples.
[0132] Specifically, abnormal samples are defined as Normal sample is .
[0133] S35, calculate the contrast loss and consistency loss of the lightweight feature representation and the topology enhancement feature, and fuse the contrast loss and consistency loss to form the overall optimization objective.
[0134] Specifically, for each of the k expert networks activated in S21, their lightweight feature representations are calculated. With topology enhancement features Contrast loss Comparison of losses Specifically, it is expressed as follows:
[0135] ;
[0136] In the formula, This is the loss function.
[0137] To ensure consistency in causal relationships across all expert networks and prevent conflicts between features at different scales, lightweight feature representations are calculated for each of the k activated expert networks in S21. With topology enhancement features Consistency loss Consistency loss Specifically, it is expressed as follows:
[0138] ;
[0139] In the formula, This is the loss weighting coefficient.
[0140] Finally, the fusion comparison loss was compared. and consistency loss This leads to the overall optimization objective:
[0141] ;
[0142] The model parameters are optimized using the gradient descent algorithm to update the causal feature representation, thereby enhancing the features. Simultaneously satisfying the following conditions: normal features and abnormal features are fully separated in the causal space, and feature transformation conforms to a predefined physical causal topology.
[0143] S36, The enhanced features are normalized to generate causal enhanced features;
[0144] Specifically, the generated causal enhancement features Specifically, it is expressed as follows:
[0145] ;
[0146] In the formula, To enhance features Normalization is performed.
[0147] S4, Adaptive Anomaly Decision Making, includes:
[0148] S41, the causal enhancement features are mapped back to the original feature space through the reconstruction network, and the reconstruction error is calculated.
[0149] Specifically, the reconstruction error Specifically, it is expressed as follows:
[0150] ;
[0151] In the formula, For the features after model reconstruction, represents the original input features, and N represents the total number of samples.
[0152] S42, calculate the similarity matrix of the causal enhancement feature and compare it with the causal weight topology matrix to obtain the causal loss.
[0153] Specifically, causal loss Specifically, it is expressed as follows:
[0154] ;
[0155] In the formula, For causal loss, The strength of feature association driven by data.
[0156] S43, the reconstruction error and the causal loss are fused according to weights to obtain the basic hybrid loss.
[0157] Specifically, the fused features are represented as follows:
[0158] ;
[0159] In the formula, Based on hybrid loss, These are the weighting coefficients.
[0160] S44, calculate the time series statistics for the causal enhancement features.
[0161] Specifically, the time-series statistics The calculation formula is:
[0162] .
[0163] In the formula, The mean, Standard deviation; It is the maximum value; It is the minimum value.
[0164] S45, input the time series statistics into the constructed fully connected network and calculate the confidence level, and trigger different anomaly decisions based on the confidence level.
[0165] Specifically, a three-layer fully connected network is designed. Its input is the time series statistics of causal features. Output the mean μ and log-variance of the latent variables. :
[0166] .
[0167] The fully connected network structure is as follows:
[0168] First layer: Fully connected layer FC(4,16) + ReLU activation function layer;
[0169] Second layer: Fully connected layer FC(16,8) + ReLU activation function layer;
[0170] Third layer: Fully connected layer FC(8,2).
[0171] Calculate the initial threshold based on the normal sample distribution. :
[0172] ;
[0173] middle: The mean of the statistic. It is a multiplier. denoted as the standard deviation of the statistic.
[0174] Adjust the initial threshold based on the real-time noise level. The dynamic threshold is obtained as follows:
[0175] ;
[0176] In the formula: For adjustment coefficients; This is a real-time statistic.
[0177] Obtaining the output of expert networks at different scales Calculate the cosine similarity matrix between features:
[0178] ;
[0179] In the formula: , Different fusion features output by the expert network.
[0180] The consistency score is calculated by taking the average of the diagonal lines of the cosine similarity matrix.
[0181] .
[0182] Incorporate consistency scores into the final outlier scores :
[0183]
[0184] In the formula: Based on mixed loss.
[0185] Anomalies are determined based on dynamic thresholds and anomaly scores:
[0186] .
[0187] Normalize the outlier scores to obtain the confidence level:
[0188] .
[0189] Different responses are triggered based on confidence level:
[0190] .
[0191] S5, Root Cause Analysis, includes:
[0192] Specifically, the initial weights are calibrated using a data-driven approach using the Granger causality test: time series of each parameter are extracted from normal flight data, and for each pair of variables X and Y that may have a causal relationship, the following regression model is constructed:
[0193]
[0194] ;
[0195] In the formula: For the current time step, predict the target variable that does not include the influence of X. For the target variable that includes the influence of X, predict the current time step. For target variable The value at time, For other variables The value at time, , These are the model weight coefficients. For the error term, The selected historical lag steps.
[0196] Calculate the F-statistic:
[0197] .
[0198] In the formula: for The sum of squared residuals, for The sum of squared residuals.
[0199] The weights of the causal graph are updated after standardizing the F-statistic values:
[0200] .
[0201] abnormal samples eigenvector x anomaly Standardized according to normal distribution:
[0202] .
[0203] In the formula: The mean of the corresponding feature. The standard deviation is denoted as .
[0204] mark The nodes that are abnormal nodes form a set. .
[0205] For any path in the causal graph Calculate the cumulative weight :
[0206] .
[0207] In the formula: For node v i to v i+1 edge weights, Let P be the number of edges of path P.
[0208] Using an improved Dijkstra's algorithm, starting from an anomalous node, find a path that satisfies the following conditions: 1. Prioritize selecting 1. Find the longest path. 2. Among paths with similar weights, choose the path with the fewest nodes. 3. Requirements: >θ (θ=0.1). Finally, the anomaly propagation path from the root cause node to the final affected node is obtained.
[0209] Define a function v(S) to represent the contribution of a feature subset S to the anomaly, which is estimated through an intervention experiment:
[0210]
[0211] In the formula: Counterfactual prediction value, For conditional expectation, For intervention operations; Set other variables to fixed values.
[0212] Assuming the root dependent variable After correction, predict whether the target variable Y has returned to normal. If the counterfactual predicted value... Close to the normal range, indicating This is the true root cause.
[0213] For each feature i, calculate its Shapley value. :
[0214] ;
[0215] In the formula: n is the total number of variables.
[0216] For each anomalous node i, calculate the intensity of its downstream impact. :
[0217] ;
[0218] In the formula: It is a downstream node.
[0219] Calculate the causal influence strength by combining Shapley value and outlier node i :
[0220] ;
[0221] According to the strength of causal influence R i Sort the root cause nodes in descending order to obtain the ranking of root cause importance.
[0222] Based on this, counterfactual reasoning is used for verification, and a structural causal model (SCM) is established:
[0223] ;
[0224] In the formula: For mapping functions, For the set of parent nodes, This is a distractor.
[0225] Intervention is applied to suspected root cause node i. That is, setting its value to the normal state, and simulating the system state after intervention by adjusting the parameters in the structural equation:
[0226] .
[0227] Calculate the change in abnormal scores before and after the intervention:
[0228]
[0229] In the formula: For abnormal remission rate; These are the abnormal indicators before the repair. These are the abnormal indicators after the repair.
[0230] Calculate the proportion of abnormal propagation paths disconnected after intervention. :
[0231]
[0232] In the formula: This represents the number of abnormal propagation edges that were blocked after repair. This represents the total number of edges in the abnormal propagation before the repair.
[0233] when > 0.8 and When the value is >0.7, the root cause verification is successful.
[0234] Final score based on importance R i Sort the root cause nodes in descending order, in the format: Root Cause 1 (Importance Score) → Intermediate Nodes (Propagation Weight) → ... → Final Anomaly Node. Generate a propagation path graph from root cause to result, where node size represents importance and edge thickness represents propagation weight.
[0235] After completing the above steps, the system will output a complete report including the root cause node importance ranking, anomaly propagation path visualization map, counterfactual reasoning verification results, and flight safety recommendations.
[0236] like Figure 2 As shown, the present invention also discloses an anomaly diagnosis system for UAV flight data, comprising:
[0237] The data acquisition and processing module includes a data acquisition module and a dynamic temporal domain-aware preprocessing module. The data acquisition module is used to acquire the preprocessed raw data. The dynamic temporal domain-aware preprocessing module is used to detect temporal outliers in the raw data based on the gradient threshold method to obtain temporal abrupt change features. It also performs frequency domain decomposition on the raw data to obtain the frequency domain decomposition results. Finally, the temporal abrupt change features, the frequency domain decomposition results and the raw data are fused to construct a spatiotemporal joint feature vector. A sliding window is used to sample the spatiotemporal joint feature vector to generate sliding window samples.
[0238] The multi-scale adaptive feature extraction module is used to construct a set of several expert networks, each corresponding to a different feature extraction scale. For sliding window samples, each expert network calculates intra-patch attention features and inter-patch attention features through a multi-head self-attention mechanism. The intra-patch attention features and inter-patch attention features are fused to obtain fused features. Based on gradient importance, the fused features are sparsified and lightweighted to output a lightweight feature representation.
[0239] The causal constraint contrastive learning module is used to convert a pre-constructed causal topology graph based on flight dynamics into a causal weight topology matrix. The lightweight feature representation is transformed by the causal weight topology matrix to generate topology-enhanced features. The lightweight feature representation and the topology-enhanced features are fused through residual connections to generate enhanced features. Features are randomly selected from the window of features at temporal abrupt change points as anomalous samples and from the window without abrupt change points as normal samples. The normal samples and anomalous samples are time-aligned and feature-aligned. The contrast loss and consistency loss of the lightweight feature representation and the topology-enhanced features are calculated and fused to form the overall optimization objective. The enhanced features are normalized and finally, causal-enhanced features are generated.
[0240] The adaptive anomaly decision module is used to map causal enhancement features back to the original feature space through the reconstruction network, calculate the reconstruction error, calculate the similarity matrix of the causal enhancement features and compare it with the causal weight topology matrix to obtain the causal loss, fuse the reconstruction error and causal loss according to the weights to obtain the basic hybrid loss, calculate the temporal statistics of the causal enhancement features, input the temporal statistics into the constructed fully connected network and calculate the confidence level, and trigger different anomaly decisions based on the confidence level.
[0241] The causal root cause tracing module is used to output a root cause analysis report; the root cause analysis report includes a ranking of the importance of root cause nodes, a visualization map of abnormal propagation paths, and counterfactual reasoning verification results.
[0242] The structure and working principle of each of the above systems and units can be referred to the descriptions in steps S1 to S5 above, and will not be repeated here.
[0243] The following is a specific embodiment to describe the anomaly diagnosis scheme for UAV flight data of the present invention.
[0244] In one specific embodiment, in a scenario simulating a quadcopter drone performing a 10-second short-distance inspection task, the drone experienced abnormal speed fluctuations at the 5th second due to an internal fault in the motor assembly. Combined with... Figures 3a-3d and Figure 4 The system initiates a dynamic time-frequency sensing preprocessing procedure, acquiring data at a frequency of 100Hz through the flight controller's integrated IMU and motor speed sensor. After median filtering and linear interpolation preprocessing, the system calculates the time gradient of the motor speed sequence and marks the time-domain abrupt change point after the 5th second based on the normal data of the first 5 seconds. Figure 3a As shown; then, the low-frequency stable and high-frequency abnormal signals of the motor speed are separated by DFT and IDFT, a spatiotemporal joint feature vector is constructed, and input samples are generated using a sliding window, as shown. Figure 3b , 3c and Figure 3dAs shown. Entering the multi-scale adaptive feature extraction stage, three expert networks, utilizing a multi-head self-attention mechanism, respectively capture the short-term correlation between the motor and control surface and the global dependency between the motor and airspeed. Combined with gradient importance analysis, feature sparsity and lightweighting are achieved. Subsequently, based on flight dynamics and a pre-constructed causal topology graph, topology enhancement features are generated through matrix operations and residual connections. Normal and abnormal samples are selected to calculate contrast loss and consistency loss to optimize the network, resulting in causal enhancement features. In adaptive anomaly decision-making, the reconstruction network restores the motor speed signal. Combined with the dynamic threshold of the first 5 seconds of normal data statistics, an alarm is triggered when the reconstruction error exceeds the threshold after the 5th second. The consistency score output by the expert networks is then fused to confirm the true anomaly. Finally, a VAR model is constructed for the "motor speed → airspeed" link. The weights are calibrated using Granger causality testing, and an improved Dijkstra algorithm is used to search for the critical propagation path starting from the abnormal motor speed node. This is combined with visualization results (such as...). Figure 4 As shown, the anomaly propagation path is "pitch angle → altitude", with a weight of 0.80; in the Shapley root cause ranking, pitch angle accounts for 0.36 and control surface accounts for 0.08 (after counterfactual verification and repair, the anomaly decreased by 70%), accurately locating the root cause of the anomaly, verifying the system's ability to diagnose power system failures, and providing a reliable basis for UAV operation and maintenance.
[0245] Furthermore, the above description is merely a typical example of a specific implementation of the present invention. Through a closed-loop process of dynamic time-frequency perception preprocessing, multi-scale feature extraction, causal constraint contrastive learning, adaptive anomaly decision-making, and causal root cause tracing, real-time anomaly diagnosis and root cause localization of UAV flight data are achieved. Those skilled in the art should understand that, based on the core concept of the present invention, the above implementation steps can be modified by adjusting parameters (such as the sliding window size L, the causal graph weight threshold θ), replacing modules (such as using wavelet transform instead of DFT for frequency domain decomposition), or optimizing the process, and all such changes should be included within the protection scope of the present invention.
[0246] Furthermore, the steps of constructing the causal topology graph and calibrating Granger causality test described in the above embodiments can be adaptively adjusted according to the dynamic characteristics of different types of UAVs. For example, when there are differences in the causal parameter association paths between quadcopter UAVs and fixed-wing UAVs, it is only necessary to adjust the nodes and weights of the causal graph to adapt, without departing from the technical principle of the present invention.
[0247] The feasibility of the technical solution of this invention has been verified through specific implementation steps, and it has significant engineering application value in scenarios such as UAV flight safety monitoring and fault early warning. For those skilled in the art, any equivalent modifications, substitutions, or improvements based on this embodiment without departing from the essence of this invention should be included within the scope of protection of the claims of this invention.
[0248] The main innovations of this invention are as follows: 1. This invention adopts a dynamic time-frequency sensing spatiotemporal feature fusion technology: Flight data is collected in real time through devices such as inertial measurement units and GPS. After median filtering and linear interpolation preprocessing, the gradient threshold method is used to detect abrupt changes in the time domain. The discrete Fourier transform (DFT) and inverse transform (IDFT) are combined to separate the periodic and burst features in the frequency domain. The time domain and frequency domain features are fused with the original data into a spatiotemporal joint feature vector. Then, the input sample is generated through a sliding window, which effectively solves the problem of capturing non-stationary and time-varying features of UAV flight data and provides multi-dimensional feature support for subsequent anomaly diagnosis. 2. This invention employs a feature extraction framework using multi-scale expert networks and attention mechanisms: It constructs a set of K expert networks, each calculating intra-patch local attention and inter-patch global dependencies through a multi-head self-attention mechanism to capture local correlations and global feature dependencies in flight data. The multi-expert outputs are then fused and sparsified based on gradient importance. High-frequency anomalous features and low-frequency normal patterns are quantized using 32-bit floating-point and 8-bit integer quantization, respectively, achieving lightweight feature representation and improving the model's adaptive extraction capability and computational efficiency for features at different scales. 3. This invention employs a feature enhancement method based on causal topological constraints and contrastive learning: A causal topological graph is pre-constructed based on flight dynamics principles and converted into an adjacency matrix. Topological enhancement features are generated through matrix transformation and fused with the original feature residuals. A contrastive loss (separating normal / abnormal features) and a consistency loss (unifying causal relationships across multi-expert networks) are designed to optimize model parameters, ensuring features are fully separated in the causal space and conform to physical topology. This addresses the problem of existing technologies relying solely on statistical correlation and lacking causal logic, enhancing the causal interpretability of features. 4. This invention employs a multi-dimensional dynamic threshold and consistency score-based anomaly decision-making mechanism: causal enhancement features are reconstructed through a reconstruction network to calculate reconstruction error. This, combined with causal loss and time-series statistics (mean, standard deviation, etc.), is input into a fully connected network to generate a dynamic threshold. Simultaneously, the cosine similarity consistency score output by a multi-scale expert network is introduced, fusing these to form the final anomaly score. A response is triggered based on the dynamic threshold and confidence level, enabling adaptive judgment of anomalies in complex flight scenarios and reducing false alarms and missed detections. 5. This invention employs a data-driven and physical constraint-integrated causal root cause tracing system: Granger causality tests are used to perform data-driven calibration of the initial causal graph weights, and the F-statistic quantifies the causal strength between parameters. The Shapley value is combined to quantify the marginal contribution of features to anomalies, and the Dijkstra algorithm is improved to search for high-weight anomaly propagation paths. Through counterfactual reasoning intervention experiments, the system state after root cause correction is simulated, and the anomaly mitigation rate and path blocking rate are calculated to verify the authenticity of the root cause. This forms a closed-loop tracing mechanism of "causal weight calibration - propagation path search - counterfactual verification," solving the problem of root cause localization for multi-parameter joint anomalies.6. This invention adopts cross-model adaptation and lightweight optimization technology: the nodes and weights of the causal topology graph can be dynamically adjusted according to the dynamic characteristics of the UAV model (such as quadcopter, fixed wing), and the anomaly diagnosis of different models can be realized through parameter adaptation; gradient importance pruning and categorical quantization (high frequency floating point, low frequency integer) are performed on the features to reduce the model's computational overhead and memory usage, and meet the real-time and resource-constrained requirements of UAV edge computing scenarios.
[0249] The main advantages of this invention are: 1. Improved ability to capture time-varying features and accuracy of anomaly detection: Through dynamic time-frequency sensing preprocessing, combined with gradient thresholding and time-frequency domain decomposition, it effectively captures temporal abrupt changes and frequency-domain anomaly features of UAV flight data, constructing a spatiotemporal joint feature vector. Compared with traditional fixed-architecture models, it can adapt to non-stationary data changes under complex working conditions, significantly reducing the rate of missed detections and false alarms, especially performing better in dynamic environments such as urban buildings and severe weather. 2. Enhanced interpretability of feature causality and ability to analyze multi-parameter anomalies: Based on flight dynamics, a causal topology graph is constructed. The weights are calibrated through Granger causality tests, combined with Shapley values and counterfactual reasoning, to achieve in-depth mining from statistical correlation to causal logic. In multi-parameter joint anomaly scenarios, the root cause of the anomaly can be accurately traced (such as the propagation chain of control surface failure → attitude angle anomaly → airspeed fluctuation), solving the problem that existing technologies rely only on statistical correlation and cannot locate the root cause, providing accurate guidance for rapid fault repair. 3. Optimize computational efficiency and edge computing adaptability: Through sparsification of multi-scale expert networks, feature quantization (high-frequency floating-point / low-frequency integer), and gradient importance pruning, the model complexity and computational overhead are reduced while retaining key information, meeting the real-time monitoring needs of UAV edge nodes. Compared with traditional deep learning solutions, computational resource consumption is reduced by approximately 40%, making it suitable for large-scale deployment of swarmed UAVs. 4. Enhance adaptability to complex scenarios and cross-model universality: The causal topology graph can dynamically adjust nodes and weights according to the UAV model (quadcopter / fixed-wing), adapting parameters to address the differences in dynamic characteristics of different models. The decision-making mechanism, which integrates dynamic thresholds and consistency scores, can adapt to changes in the flight environment (such as airflow and load) in real time, maintaining stable anomaly diagnosis performance in diverse scenarios such as industrial inspection and emergency rescue. 5. Construct a closed-loop diagnostic system and safety decision support: From dynamic time-frequency feature extraction to causal root cause tracing, a complete technical chain is formed, outputting a safety report including root cause ranking, propagation path visualization, and counterfactual verification results, providing full-process decision support for UAV flight safety. Experiments have shown that this solution can reduce the time required for anomaly location by more than 50%, improve fault repair efficiency by 30%, and significantly reduce the risk of flight accidents.
[0250] The foregoing description of specific exemplary embodiments of the invention is for illustrative and explanatory purposes. These descriptions are not intended to limit the invention to the precise forms disclosed, and it will be apparent that many changes and variations can be made in accordance with the foregoing teachings. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application, thereby enabling those skilled in the art to implement and utilize various different exemplary embodiments of the invention, as well as various different choices and variations. The scope of the invention is intended to be defined by the claims and their equivalents.
Claims
1. A method for diagnosing anomalies in UAV flight data, characterized in that, The method includes: S1, Dynamic Time-Frequency Awareness Preprocessing, including: S11, Obtain the preprocessed raw data; S12, Based on the gradient threshold method, detect time-domain outliers in the original data to obtain time-domain abrupt change point features; S13, perform frequency domain decomposition on the original data to obtain the frequency domain decomposition result; S14, the time-domain abrupt change features, frequency-domain decomposition results and original data are fused to construct a spatiotemporal joint feature vector, and a sliding window is used to sample the spatiotemporal joint feature vector to generate a sliding window sample; S2, multi-scale adaptive feature extraction, including: S21, Construct a set of several expert networks, each expert network corresponding to a different feature extraction scale; S22, for the sliding window samples, each expert network calculates intra-patch attention features and inter-patch attention features respectively through a multi-head self-attention mechanism; S23, the intra-patch attention features and inter-patch attention features are fused to obtain fused features; S24, Based on gradient importance, the fused features are sparsified and lightweighted, and a lightweight feature representation is output; S3, Causal Constraint Comparative Learning, includes: S31, converts the causal topology graph pre-constructed based on flight dynamics into a causal weight topology matrix; S32, the lightweight feature representation is transformed by the causal weight topology matrix to generate topology-enhanced features; S33, the lightweight feature representation and the topology enhancement feature are fused through residual connection to generate the enhanced feature; S34, randomly select features from the window of the time-domain mutation point features as abnormal samples, and randomly select features from the window without mutation points as normal samples, and perform time alignment and feature alignment between the normal samples and abnormal samples. S35, calculate the contrast loss and consistency loss of the lightweight feature representation and the topology enhancement feature, and fuse the contrast loss and consistency loss to form the overall optimization objective; S36, The enhanced features are normalized to generate causal enhanced features; S4, Adaptive Anomaly Decision Making, includes: S41, the causal enhancement features are mapped back to the original feature space through the reconstruction network, and the reconstruction error is calculated; S42, calculate the similarity matrix of the causal enhancement feature and compare it with the causal weight topology matrix to obtain the causal loss; S43, the reconstruction error and the causal loss are fused according to weights to obtain the basic hybrid loss; S44, Calculate the time-series statistics for the causal enhancement features; S45, input the time series statistics into the constructed fully connected network and calculate the confidence level, and trigger different anomaly decisions based on the confidence level; S5, Root Cause Tracing, Output Root Cause Analysis Report; The Root Cause Analysis Report includes the ranking of the importance of root cause nodes, a visualization map of abnormal propagation paths, and counterfactual reasoning verification results.
2. The method for anomaly diagnosis of UAV flight data as described in claim 1, characterized in that, S11 includes: collecting flight data in real time through a data acquisition device mounted on the UAV to form raw data, and then preprocessing the raw data to obtain preprocessed raw data.
3. The method for anomaly diagnosis of UAV flight data as described in claim 1, characterized in that, S12 includes: S121, calculate the temporal gradient for each parameter sequence based on the gradient thresholding method; S122, set dynamic thresholds based on historical data standard deviation, mean and confidence coefficient; S123, compare the time gradient with the dynamic threshold. When the absolute value of the time gradient is greater than the dynamic threshold, it is determined that there is a time domain outlier at that moment and it is marked, thus obtaining the time domain abrupt change point feature.
4. The method for anomaly diagnosis of UAV flight data as described in claim 1, characterized in that, S13 includes: S131, Perform a discrete Fourier transform on each parameter sequence to convert the time-domain signal into a frequency-domain representation; S132, the low-frequency and high-frequency components are reconstructed by inverse Fourier transform, and the periodic features and sudden high-frequency features are separated to obtain the frequency domain decomposition result.
5. The method for anomaly diagnosis of UAV flight data as described in claim 2, characterized in that, In step S11, the data acquisition device includes an inertial measurement unit, a global positioning system, and a power system sensor; the flight data includes three-axis angular velocity, flight altitude, airspeed, and motor speed; the preprocessing process of the raw data includes median filtering to remove impulse noise and linear interpolation to resample the data to a uniform frequency to obtain preprocessed raw data.
6. The method for anomaly diagnosis of UAV flight data as described in claim 1, characterized in that, Before step S21, the feature entropy value of the sliding window sample output by step S1 is calculated.
7. The method for anomaly diagnosis of UAV flight data as described in claim 1, characterized in that, In step S22, the intra-patch local attention divides the sliding window sample into several local patches and calculates the attention weights of the features within each patch; the inter-patch global dependency treats all local patches as a whole, captures global feature associations through a cross-patch attention mechanism, and outputs features; and / or, in step S23, the intra-patch attention features and the inter-patch attention features are fused to obtain the output of each expert network, and then the results of multiple expert networks are integrated using a weighted summation method to obtain fused features.
8. The method for anomaly diagnosis of UAV flight data as described in claim 1, characterized in that, In step S45, the confidence level acquisition process includes: calculating an initial threshold based on the normal sample distribution; adjusting the initial threshold according to the real-time noise level to obtain a dynamic threshold; acquiring the output of expert networks at different scales and calculating the cosine similarity matrix between features; taking the average of the diagonals of the cosine similarity matrix as the consistency score; incorporating the consistency score into the final anomaly score; and normalizing the anomaly score to obtain the confidence level.
9. The method for anomaly diagnosis of UAV flight data as described in claim 1, characterized in that, In step S45, triggering different abnormal decisions based on the confidence level includes: if the confidence level is greater than 0.9, an emergency plan is triggered; if the confidence level is greater than or equal to 0.7 and less than or equal to 0.9, root cause tracing is triggered; and if the confidence level is greater than or equal to 0.5 and less than or equal to 0.7, an early warning message is triggered.
10. An anomaly diagnosis system for unmanned aerial vehicle (UAV) flight data, characterized in that, The system includes: The data acquisition and processing module includes a data acquisition module and a dynamic time-domain sensing preprocessing module. The data acquisition module is used to acquire the preprocessed raw data. The dynamic time-domain sensing preprocessing module is used to detect time-domain outliers in the raw data based on the gradient threshold method to obtain time-domain abrupt change features. It also performs frequency domain decomposition on the raw data to obtain the frequency domain decomposition results. The time-domain abrupt change features, the frequency domain decomposition results and the raw data are fused to construct a spatiotemporal joint feature vector. A sliding window is used to sample the spatiotemporal joint feature vector to generate sliding window samples. The multi-scale adaptive feature extraction module is used to construct a set of several expert networks, each corresponding to a different feature extraction scale. For sliding window samples, each expert network calculates intra-patch attention features and inter-patch attention features through a multi-head self-attention mechanism. The intra-patch attention features and inter-patch attention features are fused to obtain fused features. Based on gradient importance, the fused features are sparsified and lightweighted to output a lightweight feature representation. The causal constraint contrastive learning module is used to convert a pre-constructed causal topology graph based on flight dynamics into a causal weight topology matrix. The lightweight feature representation is transformed by the causal weight topology matrix to generate topology-enhanced features. The lightweight feature representation and the topology-enhanced features are fused through residual connections to generate enhanced features. Features are randomly selected from the window of features at abrupt change points in the time domain as anomalous samples, and features are randomly selected from the window without abrupt change points as normal samples. The normal samples and anomalous samples are time-aligned and feature-aligned. The contrast loss and consistency loss of the lightweight feature representation and the topology-enhanced features are calculated and fused to form the overall optimization objective. The enhanced features are normalized and finally causal-enhanced features are generated. The adaptive anomaly decision module is used to map causal enhancement features back to the original feature space through the reconstruction network, calculate the reconstruction error, calculate the similarity matrix of causal enhancement features and compare it with the causal weight topology matrix to obtain the causal loss, fuse the reconstruction error and causal loss according to the weights to obtain the basic mixed loss, calculate the temporal statistics of causal enhancement features, input the temporal statistics into the constructed fully connected network and calculate the confidence, and trigger different anomaly decisions based on the confidence. The causal root cause tracing module is used to output a root cause analysis report; the root cause analysis report includes a ranking of the importance of root cause nodes, a visualization map of abnormal propagation paths, and counterfactual reasoning verification results.
Citation Information
Cited By
Internet of Things data intelligent analysis method based on deep learning
CN121388502A
Power inspection unmanned aerial vehicle accident tracing method and system based on multi-source data fusion
CN122133042A