Unmanned aerial vehicle working condition identification method based on adaptive density clustering and attention neural network

By combining adaptive density clustering and attention neural networks, the accuracy and efficiency issues of UAV flight condition identification are solved, enabling accurate online identification of UAV flight conditions and improving stability, while reducing hardware resource consumption and inference latency.

CN121564584APending Publication Date: 2026-02-24HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511698574.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-19
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively identify the flight conditions of drones, especially in variable environments and complex mission conditions, leading to misjudgments or omissions. Furthermore, traditional methods are costly and lack universality.

Method used

An adaptive density clustering and attention neural network approach is adopted. The OPTICS algorithm is used to detect valley points for adaptive density partitioning. The DBSCAN algorithm is used to generate initial hard labels, and sliding window and consistency detection are used to generate soft labels. Finally, the neural network is trained with bidirectional LSTM and multi-head self-attention layer to realize working condition recognition.

Benefits of technology

It achieves accurate online identification of UAV operating conditions, avoids over-aggregation and under-aggregation phenomena, improves the stability of transition segment identification, and reduces hardware resource consumption and inference latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121564584A_ABST
    Figure CN121564584A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of unmanned aerial vehicle working condition identification, and discloses an unmanned aerial vehicle working condition identification method based on adaptive density clustering and an attention neural network, and the method comprises the following steps: collecting unmanned aerial vehicle flight data, and carrying out the preprocessing of time synchronization, noise filtering and normalization on the collected data; carrying out automatic clustering on the preprocessed data based on an improved DBSCAN-OPTICS algorithm, and generating a probabilistic working condition soft label; and inputting the multi-dimensional time sequence with the soft label into a neural network containing a bidirectional LSTM layer and a multi-head self-attention layer, and training to obtain a working condition identification model. According to the method, the three-axis angle, the three-axis angular velocity, the three-axis acceleration, the three-axis velocity and the height data of the unmanned aerial vehicle are collected through multiple sensors, the working condition label is automatically generated through the improved DBSCAN-OPTICS algorithm, real-time working condition recognition of the unmanned aerial vehicle is achieved, the complex maneuvering working condition can be recognized with high precision without manual labeling, and the working condition recognition efficiency is improved. And the real-time performance and the accuracy of unmanned aerial vehicle health state evaluation can be obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of UAV operating condition recognition technology, specifically to a UAV operating condition recognition method based on adaptive density clustering and attention neural network. Background Technology

[0002] With the rapid popularization of drones in surveying, inspection, logistics, and emergency rescue, flight missions are becoming increasingly diversified and longer-term, leading to a corresponding increase in the difficulty of operation and maintenance and safety management. Drones often experience drastic attitude changes, payload shifts, and environmental interference during missions, resulting in short-term and frequently changing flight "conditions." However, drone performance gradually declines with increasing operating time, leading to a higher failure rate. Therefore, researching health management technologies to improve the reliability and availability of drone equipment is of great significance. However, the complexity of drone equipment, the variability of mission planning, and the diversity of environments cause drones to repeatedly switch operating states, exhibiting multi-condition characteristics, which poses many challenges to data-driven health management. Currently, the industry mainly relies on manual experience thresholding and fixed-parameter clustering or traditional supervised models to determine flight conditions. Manual experience thresholding involves maintenance personnel manually setting intervals based on prior experience such as acceleration amplitude and pitch angle thresholds, simply dividing them into states such as "hovering," "forward," and "ascending." This method is low-cost, but the thresholds are difficult to accommodate different aircraft models, different payloads, or sudden maneuvering scenarios, and are prone to misjudgment or omission once the environmental wind field changes. Fixed-parameter clustering or traditional supervised models automatically classify multidimensional sensor data through one-time DBSCAN clustering or unidirectional LSTM networks. Clustering algorithms with fixed radius or single density are difficult to adapt to data segments with huge density differences, such as "hovering" and "high-speed transition", and are prone to "over-clustering" or "under-clustering". Supervised models rely on a large number of manual labels, and the high labor cost and labeling error limit their universality.

[0003] Therefore, further solutions to the above problems are needed. The applicant proposes a method for UAV operating condition identification based on adaptive density clustering and attention neural network. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a method for identifying the operating conditions of unmanned aerial vehicles (UAVs) based on adaptive density clustering and attention neural networks. This method solves the problems mentioned in the background section, ensures online identification of the operating conditions of UAVs, and provides a foundation and guarantee for UAV health management.

[0005] To achieve the above objectives, the present invention provides the following technical solution: A method for identifying the operating conditions of unmanned aerial vehicles (UAVs) based on adaptive density clustering and attention neural networks includes the following steps: S1: Collect UAV flight data, and perform preprocessing on the collected data, including time synchronization, noise filtering, and normalization, to obtain flight data samples. ; S2: Calculate the distance d between candidates using Euclidean distance, select the top k nearest neighbors, and construct a time-constrained k nearest neighbor graph; S3: Based on the k-nearest neighbor graph, run the OPTICS algorithm to obtain the reachability distance sequence of the samples. Perform local valley detection on the reachability distance sequence to find valley points v. Divide the sample into segments based on the valley points and adaptively determine the density threshold based on each valley segment. The DBSCAN algorithm is then invoked within each valley segment to obtain initial hard labels for the flight data samples. ; S4: Construct a sliding window and perform operations on continuous sample labels. Consistency detection, among which As a consistency threshold, the pure working condition hard labels obtained in step S3 are transformed into probabilistic soft labels to explicitly express the transition process between the two working conditions to the neural network. S5: Input the multidimensional time series with soft labels into a neural network containing a bidirectional LSTM layer and a multi-head self-attention layer to train the working condition recognition model.

[0006] As a further aspect of the present invention: the initial clustering labels in step S3 are obtained using the following steps, specifically: 1. Collect UAV flight data, and perform preprocessing such as time synchronization, noise filtering, and normalization on the collected data to obtain flight data samples. ; 2: Set the time window width =0.2s, and calculate the frame-level half-window according to formula (1). : (1) in, The flight data sampling frequency is set, and then a candidate index set is built for each frame: (2); 3: Calculate the Euclidean distance between candidate sets. The distance calculation formula is shown in equation (3): (3) Select the k nearest neighbors: (4) Where MinPts is the minimum point, representing the minimum value in a sample. The minimum number of samples that must be included in the neighborhood. ; 4: Then construct a time-constrained k-nearest neighbor graph for the flight data according to equation (5): (5); 5: Based on the k-nearest neighbor graph, select the candidate set. Calculate and sort in ascending order according to formula (6): (6) when When the minimum Pt nearest neighbor is defined as the core distance core(i), otherwise let Then, using the OPTICS algorithm, the reachability distance sequence R of the samples is obtained: (7) Where p represents the core point being processed; 6: Use a window length of A Savitzky-Golay filter of polynomial order 3 is used to smooth the reachability sequence of the OPTICS output according to equation (8) to obtain the smoothed reachability. : (8) in, The Savitzky–Golay coefficient; 7: Calculate the smooth reachable distance global mean and global variance : (9) (10) The valley candidate condition is defined as follows: (11) in, The valley threshold coefficient, if and If i is a local minimum and simultaneously satisfies equation (11), then i is denoted as valley point v. Then, the valley with the smaller smooth reachable distance value is retained, and the other is deleted, resulting in an ascending sequence. Then, following equation (12), j is traversed sequentially from 0, and the index range becomes the segment list for segment division: (12) Each valley segment adaptively determines the density threshold. Equals the median of the smooth reachable distance of the corresponding segment; 8: The neighborhood structure for each segment is as follows: (13) The DBSCAN algorithm is run within each valley segment, and the global label array is used. Equation (14) ensures that cluster numbers in different segments do not conflict. (14) We obtain the initial cluster labels and the initial operating condition labels for the flight data samples. Number of operating condition categories, K.

[0007] As a further aspect of the present invention: the working condition identification model in step S5 is obtained using the following steps, specifically: 1: Construct a sliding window for each time index t according to equation (15). When the edge is less than N frames, use the number of available frames: (15); 2: Remove noise and count the number of samples in each category: (16) (17) Equation (16) indicates that in the window Within this range, select all samples that are classified as class k, and count represents the number of these samples. The number of valid frames within the window; 3: Calculate the consistency degree according to formula (18) The most frequently occurring category percentage is considered consistent: (18) like If it is a pure operating condition, it is considered a transitional operating condition; otherwise, it is considered a transitional operating condition. This is the consistency threshold; 4: Generate soft tags. For pure working conditions, set the main class. Generate tags according to formula (19): (19) For the transitional operating condition, generate probability soft labels according to equations (20) and (21): (20) (twenty one) For a full noise window, i.e. : (twenty two) Express "uncertainty" to the network to avoid gradient explosion caused by hard empty labels; 5: Establish an LSTM network for time-series feature extraction of flight data, and determine the network's hyperparameters, including: the feature dimension of the input data, the dimension of the hidden layers, the number of neural network layers, and the activation function; 6: Linearly map the output H of the last layer of the LSTM according to equation (23): (twenty three) Where Q is the Query tensor, representing the information we want to focus on in each frame; K is the Key tensor, describing the features that can be retrieved by others in each frame; and V is the Value tensor, which is the actual weighted and aggregated content vector calculated on M heads. (twenty four); 7: Perform mean pooling and max pooling on the attention output and then concatenate them: (25) in The length of the input sequence; 8: Train the network using cross-entropy with transition weights, where the weights are: (26) in, It is the frequency of occurrence of each type. The transition amplification factor is used to give higher gradient weights to the transition conditions. Then, Equation (27) is used as the loss for backpropagation. The optimizer adopts AdamW, and the final UAV condition recognition model is obtained by training. (27).

[0008] Compared with the prior art, the beneficial effects of the present invention are: 1. Density adaptive design avoids over- or under-polymerization. By detecting local valleys in the OPTICS-Reachability curve, it automatically generates an independent radius for each density segment. Compared to fixed DBSCAN enables density adaptation, avoiding the occurrence of "overpolymerization / underpolymerization".

[0009] 2. This invention utilizes window consistency. The soft label formula smooths out the originally drastic changes in hard labels into probability outputs, significantly improving the stability of transition segment recognition.

[0010] 3. This invention introduces a cross-entropy training network with transition weighting, which considers both class frequency and transition importance. Compared with ordinary cross-entropy or focal loss, it takes into account both class imbalance and transition sparseness.

[0011] 4. This invention embeds a multi-head self-attention layer after a bidirectional LSTM and completes timing compression through a "mean-max" dual pooling method. Compared with traditional solutions that only use LSTM or have large pure Transformer architectures, this model significantly reduces hardware resource consumption, power consumption, and inference latency, while maintaining the ability to model long-term dependencies. Attached Figure Description

[0012] Figure 1 The flowchart shows the UAV operating condition recognition method based on adaptive density clustering and attention neural network of the present invention. Figure 2 This is a flowchart of the adaptive density clustering and probabilistic soft labeling method in the UAV condition recognition method based on adaptive density clustering and attention neural network of the present invention. Figure 3 This is a structural diagram of the condition recognition model in the UAV condition recognition method based on adaptive density clustering and attention neural network of the present invention. Detailed Implementation

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

[0014] Example Specifically, this invention is based on the perspective of online identification of UAV operating conditions. Considering the diversity of operating conditions during UAV flight missions, it analyzes the characteristics of various flight parameters of UAVs under different operating conditions, collects UAV operation data under various operating conditions, constructs a UAV dataset with operating condition labels, and establishes a UAV operating condition identification model. The selected UAV flight parameters include: three-axis angle, three-axis angular velocity, three-axis acceleration, three-axis velocity, and altitude.

[0015] Please see Figure 1-3 This invention provides a method for identifying the operating conditions of unmanned aerial vehicles (UAVs) based on adaptive density clustering and attention neural networks. The method includes the following steps: Step 1: Collect UAV flight data, and perform preprocessing such as time synchronization, noise filtering, and normalization on the collected data to obtain flight data samples. ; Step 2: Set the time window width =0.2s, and calculate the frame-level half-window according to formula (1). : (1) in, The flight data sampling frequency is set, and then a candidate index set is built for each frame: (2); Step 3: Calculate the Euclidean distance between candidate sets. The distance calculation formula is shown in equation (3): (3) Select the k nearest neighbors: (4) Wherein, MinPts represents the minimum point, indicating the minimum value in a sample. The minimum number of samples that must be included in the neighborhood. ; Step 4: Construct a time-constrained k-nearest neighbor graph for the flight data according to equation (5): (5); Step 5: Based on the k-nearest neighbor graph, obtain the candidate set. Calculate and sort in ascending order according to formula (6): (6) when When the minimum Pt nearest neighbor is defined as the core distance core(i), otherwise let Then, using the OPTICS algorithm, the reachability distance sequence R of the samples is obtained: (7) Where p represents the core point being processed; Step 6: Use a window length of... A Savitzky-Golay filter of polynomial order 3 is used to smooth the reachability sequence of the OPTICS output according to equation (8) to obtain the smoothed reachability. : (8) in, The Savitzky–Golay coefficient; Step 7: Calculate the smooth reachable distance global mean and global variance : (9) (10) The valley candidate condition is defined as follows: (11) in, The valley threshold coefficient, if and If i is a local minimum and simultaneously satisfies equation (11), then i is denoted as valley point v. Then, the valley with the smaller smooth reachable distance value is retained, and the other is deleted, resulting in an ascending sequence. Then, following equation (12), j is traversed sequentially from 0, and the index range becomes the segment list for segment division: (12) Each valley segment adaptively determines the density threshold. Equals the median of the smooth reachable distance of the corresponding segment; Step 8: The neighborhood of each segment is constructed as follows: (13) The DBSCAN algorithm is run within each valley segment, and the global label array is used. Equation (14) ensures that cluster numbers in different segments do not conflict. (14) We obtain the initial cluster labels and the initial operating condition labels for the flight data samples. Number of operating condition categories, K; Step 9: Construct a sliding window for each time index t according to equation (15). If the edge is less than N frames, use the number of available frames: (15); Step 10: Remove noise and count the number of samples in each category: (16) (17) Equation (16) indicates that in the window Within this range, select all samples that are classified as class k, and count represents the number of these samples. The number of valid frames within the window; Step 11: Calculate the consistency degree according to formula (18) The most frequently occurring category percentage is considered consistent: (18) like If it is a pure operating condition, it is considered a transitional operating condition; otherwise, it is considered a transitional operating condition. This is the consistency threshold; Step 12: Generate soft tags. For pure working conditions, set the main class. Generate tags according to formula (19): (19) For the transitional operating condition, generate probability soft labels according to equations (20) and (21): (20) (twenty one) For a full noise window, i.e. : (twenty two) Express "uncertainty" to the network to avoid gradient explosion caused by hard empty labels; Step 13: Establish an LSTM network for time-series feature extraction of flight data, and determine the network's hyperparameters, including: the feature dimension of the input data, the dimension of the hidden layers, the number of neural network layers, and the activation function; Step 14: Perform a linear mapping on the output H of the last layer of the LSTM according to equation (23): (twenty three) Where Q is the Query tensor, representing the information we want to focus on in each frame; K is the Key tensor, describing the features that can be retrieved by others in each frame; and V is the Value tensor, which is the actual weighted and aggregated content vector calculated on M heads. (twenty four); Step 15: Perform mean pooling and max pooling on the attention output and then concatenate them: (25) in The length of the input sequence; Step 16: Train the network with transition-weighted cross-entropy, with the following weights: (26) in, It is the frequency of occurrence of each type. The transition amplification factor is used to give higher gradient weights to the transition conditions. Then, Equation (27) is used as the loss for backpropagation. The optimizer adopts AdamW, and the final UAV condition recognition model is obtained by training. (27).

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

Claims

1. A method for identifying the operating conditions of unmanned aerial vehicles (UAVs) based on adaptive density clustering and attention neural networks, characterized in that: The method includes the following steps: S1: Collect UAV flight data, and perform preprocessing on the collected data, including time synchronization, noise filtering, and normalization, to obtain flight data samples. ; S2: In the set time window Construct a time-constrained k-nearest neighbor graph from flight data; S3: Run the OPTICS algorithm based on the k-nearest neighbor graph to obtain the reachability distance sequence of the samples. Perform local valley detection on the reachability distance sequence and adaptively determine the density threshold based on each valley segment. The DBSCAN algorithm is then called within each valley segment to obtain initial cluster labels, thus generating initial hard labels for the flight data samples. ; S4: Construct a sliding window and perform operations on continuous sample labels. Consistency detection, among which As a consistency threshold, the pure working condition hard labels obtained in step S3 are transformed into probabilistic soft labels to explicitly express the transition process between the two working conditions to the neural network. S5: Input the multidimensional time series with soft labels into a neural network containing a bidirectional LSTM layer and a multi-head self-attention layer to train the working condition recognition model.

2. The method for UAV condition identification based on adaptive density clustering and attention neural network according to claim 1, characterized in that: The initial cluster labels in step S3 are obtained using the following steps: S31: For the preprocessed flight data sample set Establish a limited candidate index for each frame. ; S32: Select the k nearest neighbors by calculating the distance d between candidates using Euclidean distance. Construct a time-constrained k-nearest neighbor graph; S33: Regarding the serial number For each point, calculate its candidate neighbor set. and according to Euclidean distance Sort in ascending order and calculate core distance. The output access sequence is obtained based on the OPTICS algorithm. With the corresponding reachable distance sequence ; S34: Uses a window length of... A Savitzky-Golay filter of polynomial order 3 is used to smooth the reachability sequence output by OPTICS, resulting in a smoothed reachability distance. ; S35: Calculation global mean and standard deviation ,when And when the first-order difference sign changes from negative to positive, the index is... Recorded as valley points; among them ; S36: The segment defined by adjacent valley values ​​is denoted as... and within the section The median is defined as the local density threshold. ; S37: In the Section Within this process, a local density threshold and a minimum number of points (MinPts) are used to call the DBSCAN algorithm to obtain the initial cluster label sequence. .

3. The method for UAV condition identification based on adaptive density clustering and attention neural network according to claim 1, characterized in that: The working condition identification model in step S5 is obtained using the following steps: S51: Construct a sliding window of length N and count the occurrences of each category. ; S52: Calculate the consistency degree ; S53: Comparison of Consistency With consistency threshold The size is assigned to the pure working condition category one-hot vector and the transition working condition probabilistic soft label sequence, respectively; S54: The multidimensional time series is input into the bidirectional LSTM-Self-Attention neural network in the form of a sliding window. The LSTM has 2 layers and 128 hidden units in each layer. The self-attention adopts the form of 4-head scaled dot product. After the network output is concatenated by mean-max pooling, it is passed through two fully connected layers and Softmax to obtain the working condition probability vector of size K. The model is trained using weighted cross-entropy loss.