Unmanned aerial vehicle flight data anomaly detection method and system, and electronic equipment
By simulating flight data, and using dynamic time regularization algorithm to select source domains with high similarity for integrated migration, the problem of data scarcity in drone abnormal detection is solved, the detection accuracy and generalization ability are improved, and intelligent decision-making of drones in data scarcity scenarios is supported.
Patent Information
- Application Number
- CN202510178251.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-06-06
AI Technical Summary
During the abnormal detection process of drones, the lack of sufficient flight data leads to low model accuracy, and it is impossible to effectively support intelligent decision-making in data scarce scenarios such as test flights or short-term flights of new drones.
The neural network model is trained by simulated flight data, and the dynamic time regularization algorithm is used to calculate the similarity between the target domain and multiple source domains. The source domain with the highest similarity is selected for integrated migration, a pre-trained model is generated, and the model is fine-tuned and evaluated through the limited samples of the target domain, and finally anomaly detection is used to use dynamic detection thresholds.
It improves the accuracy and generalization capabilities of the drone flight data anomaly detection model, can perform abnormal detection more accurately, and supports intelligent decision-making of drones in data scarce scenarios.
Smart Images

Figure CN120105152A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning technology, and in particular to a method and system for detecting anomaly in flight data of a drone, and electronic equipment. Background Art
[0002] In the test flight or short-term flight phase of a new drone, the deep learning model training process requires sufficient data, and each flight during the test flight test phase of a drone may only last a few minutes, so the amount of flight data collected in the initial stage is limited. Similarly, in short-term flight scenarios involving high risks, harsh environments, or complex tasks, the data samples of drones may be limited. These tasks are usually performed under controlled conditions, further limiting the amount of available flight data.
[0003] In summary, in the process of drone anomaly detection, there is a lack of sufficient flight data for anomaly detection model training, resulting in low model accuracy and inability to effectively provide support for drone intelligent decision-making in data-scarce scenarios such as test flights of new drones or short-term flights. Summary of the invention
[0004] The present invention provides a method and system for detecting anomalies in flight data of unmanned aerial vehicles, and electronic equipment, so as to solve the problem in the related art that, during the anomaly detection process of unmanned aerial vehicles, there is a lack of sufficient flight data for unmanned aerial vehicle anomaly detection, resulting in low test accuracy and insufficient model generalization in the test link of the unmanned aerial vehicle. In the scheme of the present application, a neural network model is trained by simulating flight data, and the amount of data in the training process is sufficient, so that the model obtained by training can have higher accuracy.
[0005] The present invention provides a method for detecting abnormality in flight data of a UAV, comprising:
[0006] Acquire real flight data and simulated flight data of the drone, with the real flight data serving as the target domain and the simulated data of multiple flights serving as multiple source domains; the real flight data is collected by a real drone, and the simulated flight data is generated by simulation software;
[0007] Calculating the similarity between the target domain and multiple source domains, and selecting several source domains with the highest similarity for integrated migration;
[0008] The neural network model is trained through the selected source domain to obtain a pre-trained model;
[0009] Fine-tune and evaluate the pre-trained model using limited samples and test samples from the target domain to obtain multiple basic prediction results for the test samples in the target domain.
[0010] The prediction output and prediction residual sequence of each basic prediction model are assigned migration weights and weighted summed using similarity to obtain the prediction output result of the final target domain and the final prediction residual sequence used as the basis for abnormality judgment;
[0011] A dynamic detection threshold is used to perform anomaly detection on the final prediction residual sequence of the UAV flight data to be detected;
[0012] The neural network model is a hybrid neural network model of long short-term memory neural network and attention mechanism;
[0013] The neural network model includes a long short-term memory layer, a random dropout layer, an attention layer, and a fully connected layer;
[0014] The long short-term memory layer is used to extract hierarchical features and long-term and short-term dependency information of input data;
[0015] The random dropout layer is used to reduce overfitting of the neural network model;
[0016] The neural network model conforms to the following calculation formula:
[0017] f(t)=σ(w hf h(t-1)+w xf x(t)+b f ) (1);
[0018] i(t)=σ(w hi h(t-1)+w xi x(t)+b i ) (2);
[0019] C(t)=tanh(w xc x(t)+w hc h(t-1)+b c ) (3);
[0020] C(t)=f t C(t-1)+i(t) C(t) (4);
[0021] o(t)=w ho h(t-1)+w xo x(t)+b o (5);
[0022] h(t)=o(t)tanh(C(t)) (6);
[0023] Among them, x(t) and h(t) are input and output, C(t) is the cell state, f(t), i(t) and o(t) are the update information of the forget gate, input gate and output gate respectively, w and b are weights and biases, σ and tanh are activation functions;
[0024] The calculating the similarity between the target domain and the plurality of source domains includes:
[0025] Determine the similarity between the target domain and the source domain by using a dynamic time warping algorithm;
[0026] The determining the similarity between the target domain and the source domain by using a dynamic time warping algorithm includes:
[0027] Calculating a distance value between the target domain and each of the source domains based on the dynamic time warping algorithm;
[0028] Based on the total distance value between the target domain and the plurality of source domains, determining a weight value corresponding to each of the source domains;
[0029] Determining the similarity between the target domain and the source domain based on the weight value corresponding to the source domain;
[0030] For multiple source domains A=(a 1 ,a 2 ,…,a e ) and the target domain b, where e is the number of source domains, and the distance value between the source domain and the target domain can be expressed as D = {d dtw (a 1 ,b),d dtw (a 2 ,b),…,d dtw (a e ,b)}. Then, these distance values are summed as shown in the following formula:
[0031]
[0032] In the formula is the total distance value, d dtw (a ε ,b) represents the DTW distance value between the εth source domain and the target domain b. The migration weight of each source domain is obtained based on the following formula, as shown below:
[0033]
[0034] In the formula w(a ε ) is the εth source domain a ε The final prediction result of the target domain is defined as follows:
[0035]
[0036] Where y FER represents the final integration result, Y ε is from the εth source domain a ε Delivered prediction results;
[0037] The method of using a dynamic detection threshold to perform abnormality detection on the final prediction residual sequence of the UAV flight data to be detected includes:
[0038] Determine the anomaly detection threshold based on extreme value theory;
[0039] If the test residual value exceeds the anomaly detection threshold, it is determined that the UAV flight data corresponding to the test residual value is abnormal;
[0040] The specific process includes:
[0041] The part exceeding the threshold Th is rewritten as δ-Th, following the generalized Pareto distribution, as shown in the following formula:
[0042]
[0043] Where Th is the initial threshold, γ and σ are the shape parameter and scale parameter respectively. GPD uses maximum likelihood estimation to update the parameters σ and γ for updating. Therefore, the following formula should be maximized:
[0044]
[0045] where n Th Represents the total number of sample data points exceeding Th, and then, the following formula can be obtained:
[0046]
[0047] Where q represents the predetermined value of the extreme point, N total is the total number of samples, Φ represents the final threshold z q The difference with Th, Φ = z q -Th, we can further get:
[0048]
[0049] Will With the final threshold z q Compare and realize anomaly detection. When the smoothing value of the φth sample Greater than the threshold z corresponding to the sample q (φ), it indicates that the point is abnormal and conforms to the following formula:
[0050]
[0051] In the formula, 1 indicates abnormality and 0 indicates normality.
[0052] According to the method for detecting anomalies in UAV flight data provided by the present invention, the neural network model is trained by the selected source domain to obtain a pre-trained model, including:
[0053] Inputting the selected source domain data into a pre-constructed neural network model, and determining a training residual value of the pre-constructed neural network model based on output data of the neural network model;
[0054] The training residual value is smoothed by an exponentially weighted moving average method.
[0055] According to the drone flight data anomaly detection method provided by the present invention, the pre-training model is fine-tuned and evaluated through limited samples and test samples in the target domain, including:
[0056] Inputting the sample of the target domain into the pre-training model, and determining the test residual value of the pre-training model based on the output data of the pre-training model;
[0057] The test residual values are smoothed by an exponentially weighted moving average method.
[0058] According to the method for detecting anomalies in UAV flight data provided by the present invention, the neural network model is trained by the selected source domain to obtain a pre-trained model, including:
[0059] Inputting the source domain data into a pre-built neural network model to determine a prediction value;
[0060] Calculating a mean square error between the predicted value and the data in the source domain;
[0061] When the mean square error satisfies the set condition, it is determined that the pre-training model is obtained through training.
[0062] The present invention also provides a UAV flight data anomaly detection system, comprising:
[0063] A data acquisition unit is used to acquire real flight data and simulated flight data of the UAV, with the real flight data serving as the target domain and the simulated data of multiple flights serving as multiple source domains; the real flight data is collected by a real UAV, and the simulated flight data is generated by simulation software;
[0064] A training set construction unit, used to calculate the similarity between the target domain and multiple source domains, and select several source domains with the highest similarity for integrated migration;
[0065] A first training unit is used to train the neural network model through the selected source domain to obtain a pre-trained model;
[0066] The second training unit is used to fine-tune and evaluate the pre-trained model through limited samples and test samples of the target domain to obtain multiple basic prediction results of the test samples of the target domain;
[0067] The residual determination unit is used to use the similarity to perform migration weight assignment and weighted summation on the prediction output and prediction residual sequence of each basic prediction model to obtain the prediction output result of the final target domain and the final prediction residual sequence used as the basis for abnormality determination;
[0068] The anomaly detection unit is used to perform anomaly detection on the final prediction residual sequence of the UAV flight data to be detected by using a dynamic detection threshold.
[0069] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, any of the above-mentioned methods for detecting abnormalities in flight data of unmanned aerial vehicles is implemented.
[0070] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the computer program implements any of the above-mentioned methods for detecting anomalies in flight data of unmanned aerial vehicles.
[0071] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for detecting anomalies in flight data of unmanned aerial vehicles.
[0072] In the UAV flight data anomaly detection method provided by the present invention, a neural network model is trained based on simulated flight data generated by simulation software, thereby avoiding the difficulty in obtaining flight data of existing aircraft models due to commercial factors and the like. At the same time, the simulated flight data used is also the data with the highest similarity to the actual flight data selected from a number of simulated data, so as to make full use of the knowledge of multiple similar source domains for integrated migration. In this way, anomaly detection of UAV flight data can be performed more accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0074] Figure 1 1 is a flow chart of a method for detecting abnormal flight data of a UAV provided by an embodiment of the present invention;
[0075] Figure 2 It is one of the structural schematic diagrams of the neural network model provided by the embodiment of the present invention;
[0076] Figure 3 This is the second structural diagram of the neural network model provided by the embodiment of the present invention;
[0077] Figure 4 This is one of the performance test schematic diagrams provided by the embodiment of the present invention;
[0078] Figure 5 This is the second performance test schematic diagram provided by the embodiment of the present invention;
[0079] Figure 6 This is the third performance test schematic diagram provided by the embodiment of the present invention;
[0080] Figure 7 is a structural schematic diagram of a UAV flight data anomaly detection system provided by an embodiment of the present invention;
[0081] Figure 8 It is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0082] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0083] When detecting drone flight data, some of the related technologies will also apply deep learning algorithms, but the deep learning algorithms in the related technologies are often difficult to fully capture the potential patterns in limited data. In the absence of sufficient real flight data, developing effective anomaly detection methods is a major challenge.
[0084] In recent years, transfer learning has attracted much attention as a promising solution. It can utilize pre-trained models on large-scale datasets and transfer the learned knowledge to the target task, thereby improving performance when data is scarce. However, traditional transfer learning methods usually train models by directly integrating data from multiple source domains or assigning uniform weights to each source domain. This increases computational overhead and may have an adverse effect on the performance of transfer learning, especially when there is a huge distribution difference between the source and target domains. Therefore, it is crucial to effectively select source domains and assign transfer weights in multi-source transfer ensemble learning. However, relevant research in the field of anomaly detection in drone flight data is still scarce, and current research still faces many challenges in related aspects. Based on this, the following method is provided in this application to solve the problems existing in the prior art.
[0085] Figure 1 It is a flow chart of a method for detecting abnormality in UAV flight data provided by an embodiment of the present invention.
[0086] like Figure 1 As shown, this embodiment provides a method for detecting abnormal flight data of a drone, including:
[0087] Step 101, obtaining real flight data and simulated flight data of a drone, with the real flight data serving as a target domain and the simulated data of multiple flights serving as multiple source domains; the real flight data is collected by a real drone, and the simulated flight data is generated by simulation software;
[0088] In practical applications, the real flight data can be the data from the test flight phase of a new type of UAV before its official use, or the data from the short-term flight mission phase of an officially used UAV. In these phases, the UAV will only fly for a short period of time, so the flight data generated is relatively small. In this case, it is difficult to train the neural network model with a small amount of data. Even if training is forced, the accuracy of the trained model will not be high due to the small amount of training data. Based on this, in this embodiment, the flight process of the UAV can also be simulated by simulation software. Since the simulation process is not limited by the actual scene, the simulation software can generate simulated flight data. In this way, the defect of being unable to train due to the lack of real flight data can be compensated.
[0089] In practical applications, the simulation software may use mature simulation software in the prior art, and in this embodiment, there is no limitation on this.
[0090] Step 102, calculating the similarity between the target domain and multiple source domains, and selecting several source domains with the highest similarity for integrated migration;
[0091] In practice, the simulated flight data generated by the simulation software may not be 100% identical to the real flight data. The simulated flight data may have more or less deviations from the real flight data of the UAV. Based on this, in step 102 of this embodiment, the simulated flight data generated by the simulation software can be further screened. The purpose of the screening is to screen out a part of the data that is most similar to the real flight data of the UAV from a large number of simulated flight data, so as to improve the credibility of the simulated flight data and further improve the accuracy of anomaly detection of the trained neural network model.
[0092] During implementation, the screening method is to calculate the similarity between each simulated flight data and the actual flight data one by one. After all the similarities are calculated, all the simulated flight data can be sorted based on the similarities, and then several simulated flight data that are most similar to the actual flight data are selected. The simulated flight data obtained after the final screening can be used to construct a training set for training the neural network model. The amount of data in the training set can be determined based on the actual situation.
[0093] Step 103, training the neural network model through the selected source domain to obtain a pre-trained model;
[0094] In practical applications, a neural network model to be trained can be constructed in advance based on a long short-term memory neural network model (LSTM), and the neural network model to be trained can be trained based on a training set constructed based on simulated flight data.
[0095] The LSTM model is designed to overcome the limitations of traditional recurrent neural networks (RNNs) in capturing long-term dependencies. By combining memory cells and gates, LSTM can retain and update information over a long period of time, effectively alleviating problems such as gradient vanishing and explosion. This has led to significant success for LSTM in time series prediction, but in practical applications, the memory capacity and ability of LSTM models in related technologies to capture long-distance dependencies may be limited when processing long sequences, which may affect the expressiveness and robustness of the model. To solve this problem, an attention mechanism is introduced in this embodiment, which can adaptively assign different weights to different time steps, so that the model can more effectively focus on the most prominent information in the data and enhance the model's ability to capture relevant patterns in long sequences.
[0096] The LSTM model in this embodiment conforms to the following calculation formula:
[0097] f(t)=σ(w hf h(t-1)+w xf x(t)+b f ) (1);
[0098] i(t)=σ(w hi h(t-1)+w xi x(t)+b i ) (2);
[0099] C(t)=tanh(w xc x(t)+w hc h(t-1)+b c ) (3);
[0100] C(t)=f t C(t-1)+i(t) C(t) (4);
[0101] o(t)=w ho h(t-1)+w xo x(t)+b o (5);
[0102] h(t)=o(t)tanh(C(t)) (6);
[0103] Among them, x(t) and h(t) are input and output, C(t) is the cell state, f(t), i(t) and o(t) are the update information of the forget gate, input gate and output gate respectively, w and b are weights and biases, σ and tanh are activation functions.
[0104] Furthermore, the attention mechanism aims to focus on relevant areas while reducing attention to irrelevant areas. This enables the model to prioritize more important aspects when processing information, thereby improving its performance and efficiency. By selectively emphasizing important features, the attention mechanism can improve the model's ability to capture key patterns and relationships, thereby making better decisions and more accurate predictions. Therefore, the attention mechanism can selectively emphasize the most relevant features and dynamically adjust the focus based on the input data, resulting in a powerful optimization effect on traditional models. At time t, for the output h(t) of the LSTM, the relevant operation of the attention mechanism is shown in the following formula:
[0105]
[0106] Where e(t) is the attention score function, a(t) is the attention probability distribution representation output by the attention mechanism to the LSTM hidden layer, g is the activation function, and w a and b a are weights and biases, and S(t) is the output of attention.
[0107] Step 104, fine-tuning and evaluating the pre-trained model using limited samples and test samples of the target domain to obtain multiple basic prediction results of the test samples of the target domain;
[0108] In practical applications, the pre-trained model obtained after training the neural network model with simulated flight data has achieved a relatively high detection accuracy. However, since the authenticity of the simulated flight data is ultimately not as good as the real flight data of the drone, the pre-trained model can be further trained with real flight data in this step. This training mainly fine-tunes or optimizes the pre-trained model so that the model can better adapt to the characteristics of the target field. The model can be effectively adjusted to adapt to the specific needs of the target field, thereby indirectly solving the problem of insufficient data in the target field.
[0109] Step 105, using the similarity, the prediction output and prediction residual sequence of each basic prediction model are assigned migration weights and weighted summed to obtain the prediction output result of the final target domain and the final prediction residual sequence used as the basis for abnormality determination;
[0110] Step 106: Use a dynamic detection threshold to perform anomaly detection on the final prediction residual sequence of the UAV flight data to be detected.
[0111] During implementation, the drone flight data to be detected can be input into the anomaly detection model, and the anomaly detection model can output corresponding anomaly detection information based on the input drone flight data. The anomaly detection information may include whether there is an anomaly and alarm information.
[0112] In practical applications, the anomaly detection model can output alarm information after outputting anomaly detection information.
[0113] The above model training method used in this implementation is actually a transfer learning method. In transfer learning, domain and task are two core concepts. A domain can be defined as Dom = {F, P(F)}, where F represents the feature space and P(F) represents the marginal probability distribution on the feature space F. The feature space F can be further formalized as F = {f|f i ∈F,i=1,2,…,n}, that is, by the specific feature f i Intuitively, the domain describes the characteristics and distribution of the input data in the learning problem. After determining a specific domain Dom = {F, P (F)}, it is also necessary to define the corresponding task. The task can be expressed as Task = {y label ,g(·)}, where y label represents the label space, g(·) is the mapping function used to map instances of the feature space F to the label space y label Given the source domain and the target domain, they can be defined as and where f s,j ∈F sand f t,j ∈F t denote the observed samples in the source domain and the target domain respectively, and Respectively represent f s,j and f t,j In this example, the source domain is the training set built based on simulated flight data, and the target domain is the real flight data of the drone. The core of transfer learning is to improve the prediction performance of the target g(·) through the knowledge of the source domain. Considering the complexity of the task and the scale of available data, this paper chooses a model-based transfer learning method to make full use of the expressive power of the pre-trained model and improve the performance of the target domain task.
[0114] To sum up, in the UAV flight data anomaly detection method provided in this embodiment, the pre-trained model obtained after training the neural network model through simulated flight data has achieved a relatively high detection accuracy. However, since the authenticity of the simulated flight data is ultimately not as good as the real flight data of the UAV, in this step, the pre-trained model can be further trained with real flight data. This training is mainly to fine-tune or optimize the pre-trained model so that the model can better adapt to the characteristics of the target field, and can effectively adjust the model to adapt to the specific needs of the target field. In this way, the UAV flight data can be more accurately detected for anomalies.
[0115] In an exemplary embodiment, the calculating the similarity between the target domain and a plurality of source domains includes:
[0116] The similarity between the target domain and the source domain is determined by a dynamic time warping algorithm.
[0117] In the related art, common methods for calculating similarity include cosine distance and Euclidean distance. Cosine distance quantifies the similarity between two vectors by calculating the ratio of the inner product of the two vectors to the product of their sizes. The smaller the value, the higher the similarity. Euclidean distance evaluates similarity by determining the straight-line distance between the source domain and the target domain. The smaller the distance, the higher the similarity. However, both methods require that the sequence lengths of the source domain and the target domain are the same, because they both perform pairwise comparisons between corresponding elements in the sequence.
[0118] In practical applications, changes in data sources or inherent fluctuations in time series often bring challenges to ensuring that the source domain and the target domain have the same sequence length. Both of the above algorithms will be affected by changes in data sources or inherent fluctuations in time series, resulting in low data processing accuracy. Based on this, the dynamic time warping algorithm is applied in the solution of this embodiment for similarity calculation.
[0119] Dynamic Time Warping (DTW) can construct the correspondence between two sequence elements of different lengths according to the principle of shortest distance, and then evaluate the similarity of the two sequences. Furthermore, given two time series X = (x 1 ,x 2 ,…,x M ) and Y=(y 1 ,y 2 ,…,y N ), where M and N are the sample lengths of X and Y respectively. The distance between the mth sample in X and the nth sample in Y can be defined as follows:
[0120]
[0121] Where d(x m ,y n ) is the distance between corresponding points and is determined by the Euclidean distance metric. Then, we can get the distance matrix dm=(d mn ) MN , where d ij =d(x m ,y n On this basis, DTW will use the dynamic programming method to calculate dm = (d mn ) MN Continue searching for path Pa = (pa 1 ,pa 2 ,…,pa L ) to obtain d 11 to d MN The shortest path between them is taken as the similarity between X and Y. Its expression can be defined as follows:
[0122]
[0123] Where d dtw (X,Y) is the final distance between X and Y, that is, the similarity.
[0124] In an exemplary embodiment, determining the similarity between the target domain and the source domain by using a dynamic time warping algorithm includes:
[0125] Calculating a distance value between the target domain and each of the source domains based on the dynamic time warping algorithm;
[0126] Based on the total distance value between the target domain and the plurality of source domains, determining a weight value corresponding to each of the source domains;
[0127] Based on the weight value corresponding to the source domain, the similarity between the target domain and the source domain is determined.
[0128] In the solution of this application, DTW is used to calculate the similarity between each source domain and the target domain. The smaller the DTW value, the higher the similarity between the source domain and the target domain, and the greater the application potential of the source domain in the target domain, which helps to improve the performance of transfer learning. However, if you only rely on a single basic model for target domain prediction, you will not be able to fully utilize the information provided by other source domain models, which may lead to unsatisfactory prediction results. Ensemble learning aims to effectively integrate multiple learning models to improve overall prediction performance. To this end, a model integration strategy that combines similarity is designed in this implementation scheme to achieve better model performance by reasonably fusing multiple models. For multiple source domains A=(a 1 ,a 2 ,…,a e ) and the target domain b, where e is the number of source domains, and the DTW value between the two can be expressed as D = {d dtw (a 1 ,b),d dtw (a 2 ,b),…,d dtw (a l ,b)}. Then, these distance values are summed as follows:
[0129]
[0130] In the formula is the total distance value, d dtw (a ε ,b) represents the DTW distance value between the εth source domain and the target domain b. Based on formula (13), the migration weight of each source domain can be obtained as follows:
[0131]
[0132] In the formula w(a ε ) is the εth source domain a ε Therefore, the final prediction result of the target domain can be defined as follows:
[0133]
[0134] Where y FER represents the final integration result, Y ε is from the εth source domain a ε The prediction results delivered.
[0135] In an exemplary embodiment, the pre-built neural network model is trained by the selected source domain to obtain a pre-trained model, including:
[0136] Inputting the selected source domain data into a pre-constructed neural network model, and determining a training residual value of the pre-constructed neural network model based on output data of the neural network model;
[0137] The training residual value is smoothed by an exponentially weighted moving average method to obtain a pre-training model.
[0138] In an exemplary embodiment, fine-tuning and evaluating the pre-trained model using limited samples and test samples of the target domain includes:
[0139] Inputting the sample of the target domain into the pre-training model, and determining the test residual value of the pre-training model based on the output data of the pre-training model;
[0140] The test residual values are smoothed by an exponentially weighted moving average method.
[0141] In the actual UAV flight data collection process, due to environmental interference (such as wind speed changes, temperature fluctuations), sensor accuracy limitations, and communication signal noise, the collected data is often accompanied by random noise. However, these random noises may cause the model to be unable to accurately capture the true trend or pattern of the data during training or testing, thereby reducing the accuracy of anomaly detection. In practical applications, the residual reflects the difference between the model prediction value and the actual observation value, and can effectively characterize the degree of anomaly in the data. When the residual value of a point exceeds the preset threshold, the point can be considered to be an anomaly. Therefore, the first stage of anomaly detection is to calculate the residual. Specifically, for the training output result of the pre-trained model of each training set, its training residual can be calculated by the following formula:
[0142]
[0143] In the formula as well as are the training residuals, training sample predictions, and true values of the pre-trained model for the εth training set. Similarly, the test residuals of each pre-trained model for real flight data can be calculated by the following formula:
[0144]
[0145] In the formula as well as are the test residual, test sample prediction value and true value of the εth pre-trained model transferred to the real flight data. Therefore, based on the above formula, the final training and test residuals can be obtained as follows:
[0146]
[0147] In the formula and are the final integrated training residual and test residual, respectively.
[0148] Furthermore, after the residual data is calculated, the residual is smoothed by the exponentially weighted moving average (EWMA) method in this embodiment to reduce the impact of unpredictable components on model performance. Specifically, EWMA gives exponentially decreasing weights to real data, making the recent data have a greater impact on the smoothed value, thereby effectively retaining the main trend of data changes while reducing the interference of noise. and The smoothing operation process is as follows:
[0149]
[0150] In the formula and They are The smoothed and original values of the βth sample, and They are The smoothed value and original value of the φth sample, α is an adjustable weight parameter.
[0151] In an exemplary embodiment, the method of using a dynamic detection threshold to perform anomaly detection on the final prediction residual sequence of the unmanned aerial vehicle flight data to be detected includes:
[0152] Determine the anomaly detection threshold based on extreme value theory;
[0153] If the test residual value exceeds the anomaly detection threshold, it is determined that the UAV flight data corresponding to the test residual value is abnormal.
[0154] When performing anomaly detection, traditional statistical threshold methods usually have strict assumptions on the residual distribution, such as normality. However, when the residual distribution deviates from the normality assumption, it may lead to inaccurate threshold setting, thereby affecting the sensitivity and accuracy of anomaly detection. This situation may cause false positives or negatives, thereby weakening the practical application effect of the model. In order to solve this problem, this embodiment introduces a peak over threshold method (SPOT) based on extreme value theory. This method does not require strict assumptions on the residual distribution, avoiding the reliance of traditional methods on distribution assumptions. At the same time, SPOT can automatically adjust the threshold and is robust to changing stream data. Specifically, the SPOT method uses Pickands–Balkema–de HaanTheorem to rewrite the part exceeding the threshold Th as (δ-Th), and may follow the generalized Pareto distribution (GPD):
[0155]
[0156] Where Th is the initial threshold, γ and σ are the shape parameter and scale parameter respectively. GPD uses maximum likelihood estimation to update the parameters σ and γ for SPOT update. Therefore, the following formula should be maximized:
[0157]
[0158] where n Th Represents the total number of sample data points exceeding Th. Based on the above formula, the updated γ * and σ * , and then, we can get the following formula:
[0159]
[0160] Where q represents the predetermined value of the extreme point, N total is the total number of samples. Φ represents the final threshold z q The difference between Th and Φ = z q -Th, therefore, we can further get:
[0161]
[0162] Finally, Final threshold z q To compare the anomaly detection. Specifically, when the smoothed value of the φth sample Greater than the threshold z corresponding to the sample q (φ), it indicates that the point is abnormal, and vice versa. Therefore, the process can be defined as follows:
[0163]
[0164] In the formula, 1 indicates abnormality and 0 indicates normality.
[0165] Figure 2 It is one of the structural schematic diagrams of the neural network model provided by the embodiment of the present invention.
[0166] like Figure 2 As shown, in an exemplary embodiment, the neural network model is a long short-term memory neural network;
[0167] The neural network model includes a long short-term memory layer, a random dropout layer, an attention layer, and a fully connected layer;
[0168] The long short-term memory layer is used to extract hierarchical features and long-term and short-term dependency information of input data;
[0169] The random dropout layer is used to reduce overfitting of the neural network model.
[0170] The neural network model provided in this embodiment is designed based on the traditional LSTM model and combines the advantages of the attention mechanism. Figure 2 It can be seen that this integration method makes full use of the sequential learning ability of LSTM and the dynamic focusing ability provided by the attention mechanism, so that the model can better capture long-term dependencies and prioritize the most relevant information in the data. Specifically, the LSTM-AM model extracts hierarchical features and long-term and short-term dependency information in the time series through three LSTM layers. At the same time, in order to prevent the model from overfitting, two random dropout layers (Dropout) are added. Then, the attention mechanism is added after the last LSTM layer to enhance the model's ability to focus on key time steps. Finally, the model generates the final prediction results through two fully connected layers (Dense).
[0171] Figure 3 This is the second structural diagram of the neural network model provided by the embodiment of the present invention.
[0172] like Figure 3 As shown in the figure, in actual applications, based on the above pre-built neural network model, a pre-trained model can be obtained based on the training set training. Furthermore, an anomaly detection model can be obtained based on real flight data. At this stage, the parameters of the pre-trained model can be partially or completely frozen according to needs. Specifically, the first five layers of the pre-trained model parameters are frozen, and only the last attention layer and two Dense layers are fine-tuned so that the model can better learn the specific features of the target domain, such as Figure 3 This approach can effectively adjust the model parameters while retaining the source domain knowledge to make it more suitable for the target domain, thereby improving the performance of the model in the target domain.
[0173] In an exemplary embodiment, the training of the neural network model by the selected source domain to obtain the pre-trained model includes:
[0174] Inputting the data of the training set into a pre-built neural network model to determine a predicted value;
[0175] Calculating a mean square error between the predicted value and the data in the source domain;
[0176] When the mean square error satisfies the set condition, it is determined that the pre-training model is obtained through training.
[0177] In practical applications, during the model training process, the mean squared error (MSE) can be used as the training loss function of the model. The mean squared error measures the difference between the predicted value and the true value, and optimizes the model parameters by minimizing the loss function, so that the model's prediction results are closer to the actual value. Suppose at time t, the predicted output of a source domain model is The true value is y train , then the loss function can be calculated as follows:
[0178]
[0179] In the formula is the loss function, λ is the length of the training sample, and They are and train The μth element of .
[0180] The following is a specific example of a method for detecting abnormal flight data of a drone provided by the present application, including:
[0181] XTDrone simulation software was used to obtain a large amount of simulated UAV flight data. XTDrone is a UAV simulation platform developed based on PX4, ROS and Gazebo, with multiple types of UAVs built in. Specifically, a compound wing UAV model named "standard_vtol" was used to obtain simulated flight data. In order to simulate the real scene as much as possible, multiple flight paths were autonomously planned for this type of UAV, thereby generating diverse and unevenly distributed flight data. The real data used came from a real compound wing UAV. Specifically, the "standard_vtol" UAV was flown five times under different flight paths. The feature data length of each flight was intercepted to 12,000 sampling points. For the convenience of subsequent analysis, the five flight data were named SF1, SF2, SF3, SF4 and SF5 respectively. For the real data, a flight data of a real UAV was used, named RF, and the feature data length of 6,000 sampling points was intercepted from it for experiments. SF1, SF2, SF3, SF4 and SF5 were used as source domains. RF was used as the target domain. Redundant and irrelevant parameters were removed and finally 16 parameters closely related to flight attitude were selected as experimental data, as shown in Table 1.
[0182] Table 1 UAV attitude control related flight data used.
[0183]
[0184] It is very difficult to obtain real abnormal flight data because drone failures or abnormal events are usually sporadic and uncertain. This makes it difficult to obtain a large amount of representative abnormal data and may involve high costs, especially in the event of serious failures or accidents, which may cause huge losses such as equipment damage or casualties. In addition, the types and scenarios of abnormal events are complex and diverse, including sensor failures, system deviations, and aircraft damage. Each anomaly has different probabilities and characteristics, which further increases the difficulty and risk of data acquisition. In view of this, in order to avoid the risks and costs that may arise in actual flights, the injection of deviation and drift anomalies is performed according to the following formula:
[0185]
[0186] Where y(t) and y(t) anomaly They are normal and abnormal flight data respectively. is a constant, and ζ(t) is a function of t. In this paper, we use the x-axis angular velocity (WX) of the gyroscope to monitor the parameters. The value of is 3. Since the drift anomaly is more complex, points are taken at equal intervals of [3,4] to represent ζ(t). Figure 4 Shows WX after the anomaly is injected.
[0187] In order to verify the effectiveness of MSETL-AD, BiLSTM-TL and MTE-LSTM are used as comparative experiments. Figure 5 The visualization of the prediction results of MSETL-AD, BiLSTM-TL, and MTE-LSTM is shown. Although these methods still show obvious prediction bias in the data mutation area, they can all capture the overall trend more effectively. However, further observation shows that MTE-LSTM shows overfitting on noisy data compared with MSETL-AD and BiLSTM-TL. This is because MTE-LSTM adopts the LSTM structure, which is easy to memorize noise features when processing long sequence data, resulting in overfitting of noise. In contrast, although BiLSTM-TL uses the interaction of bidirectional information to alleviate the overfitting of noise to a certain extent, its effect is still relatively limited. Compared with MTE-LSTM and BiLSTM-TL, MSETL-AD uses LSTM to capture the long-term dependencies in the time series and emphasizes important features by integrating the attention mechanism, thereby effectively reducing noise interference while enhancing the ability to model data trends.
[0188] Table 2 lists the MAE and RMSE values. For deviation and drift anomalies, MTE-LSTM has the highest MAE and RMSE values, which are 1.98678 and 3.91059, respectively. For deviation anomalies, BiLSTM-TL has a MAE value of 1.63844 and a RMSE value of 3.48378; for drift anomalies, MTE-LSTM has a MAE value of 1.63848 and a RMSE value of 3.48375. In contrast, MSETL-AD has the lowest MAE and RMSE values, with deviation anomaly values of 1.55935 and 3.27438, and drift anomaly values of 1.56028 and 3.28292, respectively. This shows that MSETL-AD has stronger prediction capabilities and performs better than MTE-LSTM and BiLSTM-TL in extracting key features and suppressing noise interference. This further demonstrates the effectiveness of the proposed method in prediction.
[0189] Table 2 MAE and RMSE values of MTE-LSTM, BiLSTM-TL and MSETL-AD.
[0190]
[0191] Figure 6 The anomaly detection results of MTE-LSTM, BiLSTM-TL and MSETL-AD are shown. It should be emphasized that in order to ensure fairness, we use the threshold calculation method proposed in this paper for all baseline methods. Figure 6As shown in the figure, these methods all have relatively more TPs, among which MTE-LSTM and BiLSTM-TL are the most obvious. However, it is gratifying that from the distribution of TN, these methods can effectively detect most abnormal samples. Table 3 lists the anomaly detection results of MTE-LSTM, BiLSTM-TL and MSETL-AD for different anomaly types. Specifically, compared with other methods, MTE-LSTM has the lowest FPR value and the highest Pr value for drift anomaly, which are 0.40% and 98.99% respectively. Its ACC value and F1 value are also relatively high. For deviation anomaly, MTE-LSTM performs equally well in these indicators. The FPR, ACC, Pr and F1 values of BiLSTM-TL are 2.76%, 86.47%, 93.71% and 79.17% respectively, and the FPR, ACC, Pr and F1 values of deviation anomaly and drift anomaly are 1.52%, 87.27%, 96.44% and 80.17% respectively. Compared with other methods, BiLSTM-TL has the smallest FPR value for deviation anomalies. However, in terms of TPR values, both MTE-LSTM and BiLSTM-TL are below 70.00%. In contrast, MSETL-AD has the highest TPR value of 83.87% for deviation and drift anomalies, and also performs best in several other indicators, including ACC value and F1 value. Specifically, in addition to the TPR value, the FPR, ACC, Pr, and F1 values of MSETL-AD for deviation and drift anomalies are 3.28%, 91.90%, 93.88%, and 88.59%, and 1.48%, 93.02%, 97.14%, and 90.02%, respectively. These results show that MSETL-AD has superior anomaly detection performance compared with the baseline method and the single-source transmission method.
[0192] Table 3 Anomaly detection results of MTE-LSTM, BiLSTM-TL and MSETL-AD.
[0193]
[0194] Figure 7 It is a structural schematic diagram of a UAV flight data anomaly detection system provided by an embodiment of the present invention.
[0195] like Figure 7 As shown, the present invention also provides a drone flight data anomaly detection system, comprising:
[0196] The data acquisition unit 701 is used to acquire the real flight data and simulated flight data of the UAV, the real flight data is used as the target domain, and the simulated data of multiple flights are used as multiple source domains; the real flight data is collected by a real UAV, and the simulated flight data is generated by simulation software;
[0197] A training set construction unit 702 is used to calculate the similarity between the target domain and multiple source domains, and select several source domains with the highest similarity for integrated migration;
[0198] A first training unit 703 is used to train the neural network model through the selected source domain to obtain a pre-trained model;
[0199] A second training unit 704 is used to fine-tune and evaluate the pre-training model through limited samples and test samples of the target domain to obtain multiple basic prediction results of the test samples of the target domain;
[0200] The residual determination unit 705 is used to perform migration weight assignment and weighted summation on the prediction output and prediction residual sequence of each basic prediction model by using similarity, so as to obtain the prediction output result of the final target domain and the final prediction residual sequence used as the basis for abnormality determination;
[0201] The anomaly detection unit 706 is used to perform anomaly detection on the final prediction residual sequence of the unmanned aerial vehicle flight data to be detected by using a dynamic detection threshold.
[0202] The specific implementation method of the drone flight data anomaly detection system provided in this embodiment can be implemented with reference to the above embodiment and will not be repeated here.
[0203] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the drone flight data anomaly detection method.
[0204] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk, etc. Various media that can store program codes.
[0205] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0206] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0207] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting anomalies in UAV flight data, characterized in that: include: Obtain the real flight data and simulated flight data of the drone, with the real flight data as the target domain and the simulated data of multiple flights as multiple source domains; The real flight data is collected by a real UAV, and the simulated flight data is generated by simulation software; Calculating the similarity between the target domain and multiple source domains, and selecting several source domains with the highest similarity for integrated migration; The neural network model is trained through the selected source domain to obtain a pre-trained model; Fine-tune and evaluate the pre-trained model using limited samples and test samples from the target domain to obtain multiple basic prediction results for the test samples in the target domain. The prediction output and prediction residual sequence of each basic prediction model are assigned migration weights and weighted summed using similarity to obtain the prediction output result of the final target domain and the final prediction residual sequence used as the basis for abnormality judgment; A dynamic detection threshold is used to perform anomaly detection on the final prediction residual sequence of the UAV flight data to be detected; The neural network model is a hybrid neural network model of long short-term memory neural network and attention mechanism; The neural network model includes a long short-term memory layer, a random dropout layer, an attention layer, and a fully connected layer; The long short-term memory layer is used to extract hierarchical features and long-term and short-term dependency information of input data; The random dropout layer is used to reduce overfitting of the neural network model; The neural network model conforms to the following calculation formula: f(t)=σ(w hf h(t-1)+w xf x(t)+b f ) (1); i(t)=σ(w hi h(t-1)+w xi x(t)+b i ) (2); C(t)=tanh(w xc x(t)+w hc h(t-1)+b c ) (3); C(t)=f t C(t-1)+i(t) C(t) (4); o(t)=w ho h(t-1)+w xo x(t)+b o (5); h(t)=o(t)tanh(C(t)) (6); Among them, x(t) and h(t) are input and output, C(t) is the cell state, f(t), i(t) and o(t) are the update information of the forget gate, input gate and output gate respectively, w and b are weights and biases, σ and tanh are activation functions; The calculating the similarity between the target domain and the plurality of source domains includes: Determine the similarity between the target domain and the source domain by using a dynamic time warping algorithm; The determining the similarity between the target domain and the source domain by using a dynamic time warping algorithm includes: Calculating a distance value between the target domain and each of the source domains based on the dynamic time warping algorithm; Based on the total distance value between the target domain and the plurality of source domains, determining a weight value corresponding to each of the source domains; Determining the similarity between the target domain and the source domain based on the weight value corresponding to the source domain; For multiple source domains A=(a1,a2,…,a l ) and the target domain b, where e is the number of source domains, and the distance value between the source domain and the target domain can be expressed as D = {d dtw (a1,b),d dtw (a2,b),…,d dtw (a l ,b)}. Then, these distance values are summed as shown in the following formula: In the formula is the total distance value, d dtw (a ε ,b) represents the DTW distance value between the εth source domain and the target domain b. The migration weight of each source domain is obtained based on the following formula, as shown below: In the formula w(a ε ) is the εth source domain a ε The final prediction result of the target domain is defined as follows: Where y FER represents the final integration result, Y ε is from the εth source domain a ε Delivered prediction results; The method of using a dynamic detection threshold to perform abnormality detection on the final prediction residual sequence of the UAV flight data to be detected includes: Determine the anomaly detection threshold based on extreme value theory; If the test residual value exceeds the anomaly detection threshold, it is determined that the UAV flight data corresponding to the test residual value is abnormal; The specific process includes: The part exceeding the threshold Th is rewritten as δ-Th, following the generalized Pareto distribution, as shown in the following formula: Where Th is the initial threshold, γ and σ are the shape parameter and scale parameter respectively. GPD uses maximum likelihood estimation to update the parameters σ and γ for updating. Therefore, the following formula should be maximized: where n Th Represents the total number of sample data points exceeding Th, and then, the following formula can be obtained: Where q represents the predetermined value of the extreme point, N total is the total number of samples, Φ represents the final threshold z q The difference with Th, Φ = z q -Th, we can further get: Will With the final threshold z q Compare and realize anomaly detection. When the smoothing value of the φth sample Greater than the threshold z corresponding to the sample q (φ), it indicates that the point is abnormal and conforms to the following formula: In the formula, 1 indicates abnormality and 0 indicates normality.
2. The method for detecting anomaly in UAV flight data according to claim 1, characterized in that: The neural network model is trained by the selected source domain to obtain a pre-trained model, including: Inputting the selected source domain data into a pre-constructed neural network model, and determining a training residual value of the pre-constructed neural network model based on output data of the neural network model; The training residual value is smoothed by an exponentially weighted moving average method.
3. The method for detecting abnormality in UAV flight data according to claim 1, characterized in that: The pre-trained model is fine-tuned and evaluated using limited samples and test samples of the target domain, including: Inputting the sample of the target domain into the pre-training model, and determining the test residual value of the pre-training model based on the output data of the pre-training model; The test residual values are smoothed by an exponentially weighted moving average method.
4. The method for detecting abnormality in UAV flight data according to claim 1, characterized in that: The neural network model is trained by the selected source domain to obtain a pre-trained model, including: Inputting the source domain data into a pre-built neural network model to determine a prediction value; Calculating a mean square error between the predicted value and the data in the source domain; When the mean square error satisfies the set condition, it is determined that the pre-training model is obtained through training.
5. UAV flight data anomaly detection system, characterized by: include: A data acquisition unit is used to acquire real flight data and simulated flight data of the UAV, with the real flight data serving as the target domain and the simulated data of multiple flights serving as multiple source domains; the real flight data is collected by a real UAV, and the simulated flight data is generated by simulation software; A training set construction unit, used to calculate the similarity between the target domain and multiple source domains, and select several source domains with the highest similarity for integrated migration; A first training unit is used to train the neural network model through the selected source domain to obtain a pre-trained model; The second training unit is used to fine-tune and evaluate the pre-trained model through limited samples and test samples of the target domain to obtain multiple basic prediction results of the test samples of the target domain; The residual determination unit is used to use the similarity to perform migration weight assignment and weighted summation on the prediction output and prediction residual sequence of each basic prediction model to obtain the prediction output result of the final target domain and the final prediction residual sequence used as the basis for abnormality determination; An anomaly detection unit, used for performing anomaly detection on the final prediction residual sequence of the UAV flight data to be detected by using a dynamic detection threshold; The neural network model is a hybrid neural network model of long short-term memory neural network and attention mechanism; The neural network model includes a long short-term memory layer, a random dropout layer, an attention layer, and a fully connected layer; The long short-term memory layer is used to extract hierarchical features and long-term and short-term dependency information of input data; The random dropout layer is used to reduce overfitting of the neural network model; The neural network model conforms to the following calculation formula: f(t)=σ(w hf h(t-1)+w xf x(t)+b f ) (1); i(t)=σ(w hi h(t-1)+w xi x(t)+b i ) (2); C(t)=tanh(w xc x(t)+w hc h(t-1)+b c ) (3); C(t)=f t C(t-1)+i(t) C(t) (4); o(t)=w ho h(t-1)+w xo x(t)+b o (5); h(t)=o(t)tanh(C(t)) (6); Among them, x(t) and h(t) are input and output, C(t) is the cell state, f(t), i(t) and o(t) are the update information of the forget gate, input gate and output gate respectively, w and b are weights and biases, σ and tanh are activation functions; The training set construction unit is also used to: Calculating a distance value between the target domain and each of the source domains based on the dynamic time warping algorithm; Based on the total distance value between the target domain and the plurality of source domains, determining a weight value corresponding to each of the source domains; Determining the similarity between the target domain and the source domain based on the weight value corresponding to the source domain; For multiple source domains A=(a1,a2,…,a l ) and the target domain b, where e is the number of source domains, and the distance value between the source domain and the target domain can be expressed as D = {d dtw (a1,b),d dtw (a2,b),…,d dtw (a l ,b)}. Then, these distance values are summed as shown in the following formula: In the formula is the total distance value, d dtw (a ε ,b) represents the DTW distance value between the εth source domain and the target domain b. The migration weight of each source domain is obtained based on the following formula, as shown below: In the formula w(a ε ) is the εth source domain a ε The final prediction result of the target domain is defined as follows: Where y FER represents the final integration result, Y ε is from the εth source domain a ε Delivered prediction results; The method of using a dynamic detection threshold to perform abnormality detection on the final prediction residual sequence of the UAV flight data to be detected includes: Determine the anomaly detection threshold based on extreme value theory; If the test residual value exceeds the anomaly detection threshold, it is determined that the UAV flight data corresponding to the test residual value is abnormal; The method of using a dynamic detection threshold to perform abnormality detection on the final prediction residual sequence of the UAV flight data to be detected includes: Determine the anomaly detection threshold based on extreme value theory; If the test residual value exceeds the anomaly detection threshold, it is determined that the UAV flight data corresponding to the test residual value is abnormal; The specific process includes: The part exceeding the threshold Th is rewritten as δ-Th, following the generalized Pareto distribution, as shown in the following formula: Where Th is the initial threshold, γ and σ are the shape parameter and scale parameter respectively. GPD uses maximum likelihood estimation to update the parameters σ and γ for updating. Therefore, the following formula should be maximized: where n Th Represents the total number of sample data points exceeding Th, and then, the following formula can be obtained: Where q represents the predetermined value of the extreme point, N total is the total number of samples, Φ represents the final threshold z q The difference with Th, Φ = z q -Th, we can further get: Will With the final threshold z q Compare and realize anomaly detection. When the smoothing value of the φth sample Greater than the threshold z corresponding to the sample q (φ), it indicates that the point is abnormal and conforms to the following formula: In the formula, 1 indicates abnormality and 0 indicates normality.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for detecting anomalies in flight data of a UAV as described in any one of claims 1 to 4 is implemented.
Citation Information
Cited By
Fault diagnosis method, device and equipment for flight control system of unmanned aerial vehicle and storage medium
CN121115718A
Large reservoir facade two-dimensional water temperature intelligent rapid prediction method
CN121301798A
Unmanned aerial vehicle abnormal behavior identification method based on improved residual network
CN121482435A