A method for tracing the abnormality of UAV flight trajectory based on fusion clustering algorithm
By integrating the clustering algorithm and the Lasso regression algorithm to identify abnormal points in the UAV flight trajectory, and using the improved KD tree algorithm to quickly notify the on-duty personnel to deal with it, the problem of poor UAV anomaly detection in the existing technology is solved. This ensures the stability and safety of drone inspections.
Patent Information
- Application Number
- CN202410707824.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-06-03
AI Technical Summary
Existing drone anomaly detection technology cannot quickly and accurately handle abnormal conditions of drone flight, resulting in threats to the stability and safety of drone inspections.
A method based on the fusion clustering algorithm is used to classify and organize the spatio-temporal data of the UAV flight trajectory through the hierarchical clustering algorithm. The Lasso regression algorithm is used to calculate the weight of the data features, and the improved KD tree algorithm is combined with the improved KD tree algorithm to quickly notify the on-duty personnel to go to the scene. Verify the cause of the exception.
It achieves accurate detection and traceability of abnormal points in the drone flight trajectory, ensures flight safety and data integrity, and improves the stability and safety of drone inspections.
Smart Images

Figure CN118277813B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicle (UAV) anomaly detection, and in particular to a method for tracing the anomaly of an unmanned aerial vehicle (UAV) flight trajectory based on a fusion clustering algorithm. Background Art
[0002] With the rapid evolution and continuous development of new power systems, data business applications based on drones have ushered in a booming development momentum in power systems. This trend has brought many opportunities, but also triggered severe challenges. In particular, since the data transmission between unmanned terminals and power systems involves highly sensitive key data information, the security issues in this field have become particularly prominent and important. At the same time, there are potential security risks in the use of drones due to uncontrollable behavior, which increases the challenges to data transmission and processing security. In order to ensure that drones are controllable, auditable, and traceable throughout the process driven by data services, it is urgent to conduct in-depth research on safety monitoring and traceability technologies for drones. This research is not only about the development of the technical level, but also involves the healthy development of the entire power system and drone industry. Effective safety monitoring and traceability technologies will provide reliable guarantees for the sustainable development of drone data applications in power systems and promote the safe, stable and efficient operation of services. Therefore, research and technological innovation in this area are of vital importance to ensure the security and controllability of drone data business applications.
[0003] Data show that the fragmentation change trend is a common abnormal phenomenon in industrial systems. Trends can be roughly divided into four forms: slow to fast, fast to slow, constant to changing, and changing to constant. The change in the trajectory of a drone is a typical abnormality in the fragmentation change trend. This abnormal trend of fragmentation from constant to changing is usually manifested as a slow rise, slow fall, or slow fluctuation of the parameter. Limited by the control mechanism and actual application scenarios of drones, when drones are disturbed, their flight will slowly deviate from the established trajectory. In the case of abnormal changes in the segment, the data changes very slowly at the beginning, with the result that the residual between the predicted point and the true point of the single-point prediction model is much smaller than the threshold, thereby reducing the anomaly detection effect.
[0004] Chinese patent document CN112100137A discloses a "UAV anomaly detection method based on multi-log collaborative analysis". The following steps are adopted: extract templates from the UAV flight log, extract the features of different events, and represent the text information of the UAV flight log in the form of feature vectors; use the PCA algorithm to reduce the dimension of the obtained feature vectors; use the k-medoids algorithm to classify the events into a known cluster according to the shortest Euclidean metric; identify events, perform anomaly detection on the events, and determine whether they are abnormal events. If they are not abnormal events, they are put back into the training data set for training in the learning phase. If they are abnormal events, continue to determine whether the attack model is known. If not, define the abnormal event as a new attack model. If so, classify the abnormal event as a known attack model. The above technical solution cannot quickly and accurately handle abnormal situations of UAV flights and ensure the stability and safety of UAV inspections. Summary of the invention
[0005] The present invention mainly solves the technical problem that the original technical solution cannot quickly and accurately handle the abnormal situation of UAV flight and ensure the stability and safety of UAV inspection. It provides a method for tracing the abnormality of UAV flight trajectory based on fusion clustering algorithm, and applies hierarchical clustering algorithm to classify and organize complex and sensitive spatiotemporal data features to identify potential abnormal points. Lasso The weights of various data features obtained by the regression algorithm are used to calculate the sum of the products of potential anomalies and the weights of various data features. The system detects anomalies in the flight trajectory of the drone to ensure flight safety and stability. Once an anomaly is confirmed, the system immediately calls the improved KD The tree algorithm quickly notifies the nearest on-duty personnel to go to the scene to conduct a comprehensive inspection and thoroughly verify the factors that interfere with the normal flight of the drone, quickly and accurately handle abnormal situations of drone flight, ensure the flight safety and data integrity of the drone, and provide reliable protection and support for the drone flight system.
[0006] The above technical problem of the present invention is mainly solved by the following technical solution: The present invention comprises the following steps:
[0007] S1 extracts the drone’s data and performs decryption and preprocessing;
[0008] S2 uses a hierarchical clustering algorithm to find potential anomalies in the UAV’s flight trajectory;
[0009] S3 determines the impact of each data feature on the normal flight trajectory of the drone, uses the Lasso regression algorithm to obtain the weight of each data feature, calculates the sum of the product of the potential anomaly point and the weight of each data feature, and traces back to obtain the exact trajectory anomaly point;
[0010] S4 arranges personnel to verify and investigate abnormal points.
[0011] A hierarchical clustering algorithm is applied to classify and organize complex and sensitive spatiotemporal data features to identify potential anomalies. Lasso The weights of various data features obtained by the regression algorithm are used to calculate the sum of the products of potential abnormal points and the weights of various data features. The system can accurately and effectively detect abnormal points in the flight trajectory of drones, ensure flight safety and stability, and maintain power grid security. Once an abnormal point is confirmed, the system immediately calls the improved KD The tree algorithm quickly notifies the nearest on-duty personnel to go to the scene for a comprehensive inspection and thorough verification of the factors that interfere with the normal flight of the drone.
[0012] Preferably, the step S1 of extracting the data of the drone includes extracting the data features of the drone's flight trajectory, wherein the trajectory data of the drone is mainly complex and sensitive spatiotemporal data, including three-dimensional position information, roll angle, pitch angle, yaw angle, speed, and acceleration based on a time series. The data from the drone is decrypted and preprocessed using a data processor.
[0013] Preferably, the preprocessing step S1 includes removing irrelevant data, and then assuming that the kth UAV is at time t and at time i of its flight The three-dimensional space coordinates are:
[0014]
[0015] Calculate the Euclidean distance between them,
[0016]
[0017] For time series data, the instantaneous velocity and acceleration are estimated by difference, that is, the instantaneous velocity is
[0018]
[0019] The acceleration is
[0020]
[0021] The rolling angle of the kth UAV at time t during the i-th flight , Pitch angle , yaw angle Decrypted data. As the input of the algorithm, the sample will definitely affect the analysis results of the algorithm output. Therefore, good data cleaning and preprocessing are crucial to improving the accuracy of the algorithm.
[0022] Preferably, the above multiple data features are standardized, and the normalization formula is:
[0023]
[0024] Therefore, the data characteristics of the k-th UAV at time t of the i-th flight are recorded as:
[0025] .
[0026] In order to scale the value ranges between different data features to a similar scale and avoid the problem of unstable model training or slow convergence caused by large differences in the values of different features, data of different dimensions should be normalized.
[0027] Preferably, the step S2 specifically includes:
[0028] S2.1 Calculate the similarity measure matrix for the single data feature of multiple sets of data sets for each drone, expressed as:
[0029]
[0030] represents the similarity measure matrix of the data feature m of the kth drone, which is a symmetric matrix, that is, , where the matrix elements are defined as:
[0031]
[0032] express and The Euclidean distance of
[0033] S2.2 initialization, each Treated as separate clusters;
[0034] S2.3 uses single-link clustering, takes the minimum distance as the distance metric of the cluster, and gradually merges the closest trajectory points to form a hierarchical clustering tree;
[0035] S2.4 The normal trajectories are finally merged into one cluster, and the remaining few isolated clusters are potential abnormal trajectories. The segmentation threshold is set to divide the clusters into normal clusters and potential abnormal clusters.
[0036] The drone trajectory anomaly detector is used to find potential anomalies in the drone flight trajectory. The hierarchical clustering algorithm is used to calculate the similarity measurement matrix between data points. According to the similarity measurement matrix, the two most similar clusters are found. The two most similar clusters are merged into a new cluster. The similarity measurement matrix is updated to reflect the similarity between the newly merged cluster and other clusters. The most similar clusters are repeatedly merged until all data points reach a pre-set threshold. The final clustering result is determined, and the clusters are divided into normal clusters and potential anomaly clusters.
[0037] Preferably, the step S3 specifically includes:
[0038] S3.1 For the kth UAV, if its data feature m is judged as a potential anomaly by the UAV trajectory anomaly detector in the i-th flight, it is marked as Otherwise, mark it as ;
[0039] S3.2 The weight of data feature m is marked as ,use Lasso The regression algorithm obtains the weight of each data feature;
[0040] S3.3 For the same time t, the different data features m of the same trajectory of the kth UAV are obtained , firstly perform an OR operation. If the result of the OR operation is not 0, it means that a data feature of the flight trajectory of the kth UAV at time t may be abnormal;
[0041] S3.4 Comprehensively judge the possible abnormal points at this time t
[0042]
[0043] In the formula, Indicates the decision threshold.
[0044] The abnormal behavior determiner uses the Lasso regression algorithm to determine the impact of each data feature on the normal flight trajectory of the drone through the data set of the normal flight trajectory of the drone. According to the abnormal situation of the data features calculated by the drone trajectory anomaly detector, the Lasso regression algorithm is used to obtain the weight of each data feature, and the sum of the product of the potential abnormal point and the weight of each data feature is calculated, so as to make a comprehensive judgment and trace the exact trajectory abnormal point.
[0045] As a preference, the step S3.2 specifically comprises: pre-utilizing Lasso The regression model divides the normal inspection trajectory data of the drone into a training set and a test set, and then trains the Lasso Regression model; using Lasso The regression model determines the impact of each data feature on the normal flight trajectory of the drone. Lasso The coefficients of the regression model reflect the degree of influence of each data feature on the normal flight trajectory of the UAV. By observing the coefficients obtained by the model, we can determine the data features that have the greatest impact on the flight of the UAV and the data features that have little or even negligible impact.
[0046] Preferably, the step S4 specifically includes:
[0047] S4.1 Obtain the longitude and latitude of the kth drone at time t ;
[0048] S4.2 For the location data set of the personnel on duty that day, follow KD The tree is constructed recursively. KD Tree;
[0049] S4.3 From KD Starting from the root node of the tree, recursively traverse KD Tree;
[0050] S4.4 When backtracking to the root node, find the nearest neighbor;
[0051] S4.5 Notify the on-duty personnel at the nearest neighboring point through real-time communication to verify and eliminate abnormal points.
[0052] The abnormal points given by the abnormal behavior determiner are sent to the system, and the system improves KD The tree algorithm notifies the on-duty personnel closest to the abnormal point to go to the scene to verify the cause of the abnormality and check whether there is any illegal behavior that deliberately interferes with the normal inspection of drones.
[0053] Preferably, the step S4.3 specifically includes: using Manhattan distance to compare the target point, calculating the distance between the on-duty personnel position of the current node and the drone coordinates, and recording the current nearest point and distance; determining the next subtree to traverse according to the position of the drone coordinates; continuing to recursively traverse the subtree downward until the leaf node, using a pruning strategy, and when a node close enough to the target point has been found, stopping the search for its child nodes to improve search efficiency.
[0054] Preferably, the step S4.3 further comprises backtracking, during which the parent node and other subtree nodes are checked to see whether there are closer positions of the persons on duty, and the nearest neighbor points and distances are updated.
[0055] The beneficial effect of the present invention is that it is mainly used to solve the problem of tracing the abnormal points of the flight trajectory during the UAV inspection of power grid lines. By using the method proposed in the present invention, the sensitive spatiotemporal information of the UAV can be obtained based on the decrypted UAV inspection data set, and the abnormal points of the UAV trajectory can be found by integrating the multi-weighted hierarchical clustering algorithm, and the abnormal points of the UAV trajectory can be found by improving the KD Tree algorithm, the system notifies the on-duty personnel closest to the abnormal point to go to the scene for processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a flow chart of identifying abnormal points of the present invention.
[0057] Figure 2 It is a screening processing node flow chart of the present invention. DETAILED DESCRIPTION
[0058] The technical solution of the present invention is further specifically described below through embodiments and in conjunction with the accompanying drawings.
[0059] Embodiment: This embodiment is a method for tracing the abnormality of a UAV flight trajectory based on a fusion clustering algorithm, such as Figure 1 As shown,
[0060] The following steps are involved:
[0061] S1 extracts the data of the drone and performs decryption and preprocessing. The data includes extracting the data features of the drone's flight trajectory. The trajectory data of the drone is mainly complex and sensitive spatiotemporal data, including three-dimensional position information based on time series, roll angle, pitch angle, yaw angle, speed, and acceleration. The data processor is used to decrypt and preprocess the data from the drone.
[0062] Preprocessing includes removing irrelevant data, and then assuming that the kth drone is at time t of the i-th flight and The three-dimensional space coordinates are:
[0063]
[0064] Calculate the Euclidean distance between them,
[0065]
[0066] For time series data, the instantaneous velocity and acceleration are estimated by difference, that is, the instantaneous velocity is
[0067]
[0068] The acceleration is
[0069]
[0070] The rolling angle of the kth UAV at time t during the i-th flight , Pitch angle , yaw angle Decrypted data. As the input of the algorithm, the sample will definitely affect the analysis results of the algorithm output. Therefore, good data cleaning and preprocessing are crucial to improving the accuracy of the algorithm.
[0071] Preferably, the above multiple data features are standardized, and the normalization formula is:
[0072]
[0073] Therefore, the data characteristics of the k-th UAV at time t of the i-th flight are recorded as:
[0074] .
[0075] In order to scale the value ranges between different data features to a similar scale and avoid the problem of unstable model training or slow convergence caused by large differences in the values of different features, data of different dimensions should be normalized.
[0076] Step S2 specifically includes:
[0077] S2.1 Calculate the similarity measure matrix for the single data feature of multiple sets of data sets for each drone, expressed as:
[0078]
[0079] represents the similarity measure matrix of the data feature m of the kth drone, which is a symmetric matrix, that is, , where the matrix elements are defined as:
[0080]
[0081] express and The Euclidean distance of
[0082] S2.2 initialization, each Treated as separate clusters;
[0083] S2.3 uses single-link clustering, takes the minimum distance as the distance metric of the cluster, and gradually merges the closest trajectory points to form a hierarchical clustering tree;
[0084] S2.4 The normal trajectories are finally merged into one cluster, and the remaining few isolated clusters are potential abnormal trajectories. The segmentation threshold is set to divide the clusters into normal clusters and potential abnormal clusters.
[0085] The drone trajectory anomaly detector is used to find potential anomalies in the drone flight trajectory. The hierarchical clustering algorithm is used to calculate the similarity measurement matrix between data points. According to the similarity measurement matrix, the two most similar clusters are found. The two most similar clusters are merged into a new cluster. The similarity measurement matrix is updated to reflect the similarity between the newly merged cluster and other clusters. The most similar clusters are repeatedly merged until all data points reach a pre-set threshold. The final clustering result is determined, and the clusters are divided into normal clusters and potential anomaly clusters.
[0086] The drone trajectory anomaly detector is used to find potential anomalies in the drone flight trajectory. The hierarchical clustering algorithm is used to calculate the similarity measurement matrix between data points. According to the similarity measurement matrix, the two most similar clusters are found. The two most similar clusters are merged into a new cluster. The similarity measurement matrix is updated to reflect the similarity between the newly merged cluster and other clusters. The most similar clusters are repeatedly merged until all data points reach a pre-set threshold. The final clustering result is determined, and the clusters are divided into normal clusters and potential anomaly clusters.
[0087] S3 determines the impact of each data feature on the normal flight trajectory of the drone, uses the Lasso regression algorithm to obtain the weight of each data feature, calculates the sum of the product of the potential anomaly point and the weight of each data feature, and traces back to obtain the exact trajectory anomaly point, including:
[0088] S3.1 For the kth UAV, if its data feature m is judged as a potential anomaly by the UAV trajectory anomaly detector in the i-th flight, it is marked as Otherwise, mark it as ;
[0089] S3.2 The weight of data feature m is marked as ,use Lasso The regression algorithm obtains the weights of various data features; specifically, it includes: pre-using Lasso The regression model divides the normal inspection trajectory data of the drone into a training set and a test set, and then trains the Lasso Regression model; using Lasso The regression model determines the impact of each data feature on the normal flight trajectory of the drone. Lasso The coefficients of the regression model reflect the degree of influence of each data feature on the normal flight trajectory of the UAV. By observing the coefficients obtained by the model, we can determine the data features that have the greatest impact on the flight of the UAV and the data features that have little or even negligible impact.
[0090] S3.3 For the same time t, the different data features m of the same trajectory of the kth UAV are obtained , firstly perform an OR operation. If the result of the OR operation is not 0, it means that a data feature of the flight trajectory of the kth UAV at time t may be abnormal;
[0091] S3.4 Comprehensively judge the possible abnormal points at this time t
[0092]
[0093] In the formula, Indicates the decision threshold.
[0094] The abnormal behavior determiner uses the Lasso regression algorithm to determine the impact of each data feature on the normal flight trajectory of the drone through the data set of the normal flight trajectory of the drone. According to the abnormal situation of the data features calculated by the drone trajectory anomaly detector, the Lasso regression algorithm is used to obtain the weight of each data feature, and the sum of the product of the potential abnormal point and the weight of each data feature is calculated, so as to make a comprehensive judgment and trace the exact trajectory abnormal point.
[0095] S4 arranges personnel to verify and investigate abnormal points, including:
[0096] S4.1 Obtain the longitude and latitude of the kth drone at time t ;
[0097] S4.2 For the location data set of the personnel on duty that day, follow KD The tree is constructed recursively. KD Tree;
[0098] S4.3 From KD Starting from the root node of the tree, recursively traverse KD The process includes comparing the target point with the Manhattan distance, calculating the distance between the current node's on-duty position and the drone coordinates, and recording the current nearest point and distance; determining the next subtree to traverse based on the drone coordinates; and continuing to recursively traverse the subtree until the leaf node is reached. When a node close enough to the target point is found, the search for its child nodes is stopped to improve the search efficiency. The process also includes backtracking, during which the parent node and other subtree nodes are checked to see if there are closer on-duty positions, and the nearest neighbor points and distances are updated.
[0099] S4.4 When backtracking to the root node, find the nearest neighbor;
[0100] S4.5 Notify the on-duty personnel at the nearest neighboring point through real-time communication to verify and eliminate abnormal points.
[0101] The abnormal points given by the abnormal behavior determiner are sent to the system, and the system improves KD The tree algorithm notifies the on-duty personnel closest to the abnormal point to go to the scene to verify the cause of the abnormality and check whether there is any illegal behavior that deliberately interferes with the normal inspection of drones.
[0102] A hierarchical clustering algorithm is applied to classify and organize complex and sensitive spatiotemporal data features to identify potential anomalies. LassoThe weights of various data features obtained by the regression algorithm are used to calculate the sum of the products of potential abnormal points and the weights of various data features. The system can accurately and effectively detect abnormal points in the flight trajectory of drones, ensure flight safety and stability, and maintain power grid security. Once an abnormal point is confirmed, the system immediately calls the improved KD The tree algorithm quickly notifies the nearest on-duty personnel to go to the scene for a comprehensive inspection and thorough verification of the factors that interfere with the normal flight of the drone.
[0103] First, construct a data trajectory anomaly effective identification component structure, such as Figure 2 As shown:
[0104] Data processor: The data processor mainly decrypts and preprocesses the data from the drone. The trajectory data involving the drone is mainly complex and sensitive spatiotemporal data, that is, three-dimensional position information, roll angle, pitch angle, yaw angle, speed, acceleration, etc. based on time series. In order to scale the value range between different data features to a similar scale and avoid the problem of unstable model training or slow convergence caused by large differences in the values of different features, data of different dimensions should be normalized.
[0105] Drone trajectory anomaly detector: The drone trajectory anomaly detector mainly finds potential anomalies in the drone flight trajectory. This patent uses a hierarchical clustering algorithm to calculate the similarity measurement matrix between data points, and find the two most similar clusters based on the similarity measurement matrix. Merge the two most similar clusters into a new cluster. Update the similarity measurement matrix to reflect the similarity between the newly merged cluster and other clusters. Repeatedly merge the most similar clusters until all data points reach a pre-set threshold. Determine the final clustering result and divide the clusters into normal clusters and potential anomaly clusters.
[0106] Abnormal behavior determiner: This patent uses the Lasso regression algorithm to determine the impact of each data feature on the normal flight trajectory of the drone through the data set of the normal flight trajectory of the drone. According to the abnormal situation of the data features calculated by the drone trajectory anomaly detector, the Lasso regression algorithm is used to obtain the weight of each data feature, and the sum of the product of the potential abnormal point and the weight of each data feature is calculated, so as to make a comprehensive judgment and trace the exact trajectory abnormal point.
[0107] Adaptive alarm mechanism: The abnormal points given by the abnormal behavior determiner are sent to the system. The system improves the KD tree algorithm to notify the on-duty personnel closest to the abnormal point to verify the cause of the abnormality on site and check whether there are any illegal acts that intentionally interfere with the normal inspection of drones.
[0108] The working method of effectively identifying the structure of data trajectory anomalies is as follows
[0109] 1. Data Processor
[0110] As the input of the algorithm, the sample will inevitably affect the analysis results of the algorithm output, so good data cleaning and preprocessing are crucial to improving the accuracy of the algorithm. The main rules for data cleaning are:
[0111] (1) Eliminate irrelevant data and retain the data of interest.
[0112] (2) Assume that the kth UAV is at time t during its i-th flight and The three-dimensional space coordinates are:
[0113]
[0114] Calculate the Euclidean distance between them,
[0115]
[0116] For time series data, the instantaneous velocity and acceleration are estimated by difference, that is, the instantaneous velocity is
[0117]
[0118] The acceleration is
[0119]
[0120] The rolling angle of the kth UAV at time t during the i-th flight , Pitch angle , yaw angle Decrypted data. As the input of the algorithm, the sample will definitely affect the analysis results of the algorithm output. Therefore, good data cleaning and preprocessing are crucial to improving the accuracy of the algorithm.
[0121] Preferably, the above multiple data features are standardized, and the normalization formula is:
[0122]
[0123] Therefore, the data characteristics of the k-th UAV at time t of the i-th flight are recorded as:
[0124] .
[0125] In order to scale the value ranges between different data features to a similar scale and avoid the problem of unstable model training or slow convergence caused by large differences in the values of different features, data of different dimensions should be normalized.
[0126] 2. Drone trajectory anomaly detector
[0127] Usually, the inspection route of each UAV on the power line is fixed, and the spatial coordinate information of each inspection should show a similar trajectory curve. On the contrary, the abnormal trajectory curve does not meet the rule.
[0128] The steps of trajectory abnormal data detection based on the fusion multi-weight hierarchical clustering algorithm are as follows:
[0129] (1) For each drone’s multiple datasets, the similarity measure matrix is calculated, which is expressed as:
[0130]
[0131] represents the similarity measure matrix of the data feature m of the kth drone, which is a symmetric matrix, that is, , where the matrix elements are defined as:
[0132]
[0133] express and The Euclidean distance of
[0134] S2.2 initialization, each Treated as separate clusters;
[0135] (3) Using single-link clustering, the minimum distance is used as the distance metric of the cluster, and the closest trajectory points are gradually merged to form a hierarchical clustering tree;
[0136] (4) Normal trajectories are finally merged into one cluster, and the remaining few isolated clusters are potential abnormal trajectories. The segmentation threshold is set to divide the clusters into normal clusters and potential abnormal clusters.
[0137] 3. Abnormal behavior detector
[0138] According to the abnormal situation of the data features calculated by the drone trajectory anomaly detector, the Lasso The regression algorithm obtains the weight of each data feature and finally makes a comprehensive judgment. The specific steps are as follows:
[0139] (1) For the kth UAV, if its data feature m is judged as a potential anomaly by the UAV trajectory anomaly detector in the i-th flight, it is marked as Otherwise, mark it as ;
[0140] (2) Mark the weight of data feature m as ,use Lasso The regression algorithm obtains the weights of various data features; specifically, it includes: pre-usingLasso The regression model divides the normal inspection trajectory data of the drone into a training set and a test set, and then trains the Lasso Regression model; using Lasso The regression model determines the impact of each data feature on the normal flight trajectory of the drone. Lasso The coefficients of the regression model reflect the degree of influence of each data feature on the normal flight trajectory of the UAV. By observing the coefficients obtained by the model, we can determine the data features that have the greatest impact on the flight of the UAV and the data features that have little or even negligible impact.
[0141] (3) For the same time t, the different data features m of the same trajectory of the kth UAV are obtained , firstly perform an OR operation. If the result of the OR operation is not 0, it means that a data feature of the flight trajectory of the kth UAV at time t may be abnormal;
[0142] (4) Comprehensively determine the possible abnormal points at time t
[0143]
[0144] In the formula, Indicates the decision threshold.
[0145] The abnormal behavior determiner uses the Lasso regression algorithm to determine the impact of each data feature on the normal flight trajectory of the drone through the data set of the normal flight trajectory of the drone. According to the abnormal situation of the data features calculated by the drone trajectory anomaly detector, the Lasso regression algorithm is used to obtain the weight of each data feature, and the sum of the product of the potential abnormal point and the weight of each data feature is calculated, so as to make a comprehensive judgment and trace the exact trajectory abnormal point.
[0146] S4 arranges personnel to verify and investigate abnormal points, including:
[0147] S4.1 Obtain the longitude and latitude of the kth drone at time t .
[0148] (2) Construction KD For the location dataset of the staff on duty that day, KD The tree is constructed recursively. KD Tree.
[0149] (3) Traversal KD Tree. KD Starting from the root node of the tree, traverse recursively:
[0150] a) Compare target points: Use Manhattan distance to calculate the distance between the current node’s on-duty personnel position and the drone’s coordinates, and record the current nearest point and distance.
[0151] b) Select subtree: According to the location of the drone coordinates, determine the next subtree (left subtree or right subtree) to traverse.
[0152] c) Recursive traversal of the subtree: Continue to recursively traverse the subtree until the leaf node. Using the pruning strategy, when a node close enough to the target point has been found, the search for its child nodes can be stopped to improve the search efficiency.
[0153] d) Backtracking to update the nearest neighbor point: During the backtracking process, check whether the parent node and other subtree nodes have a closer position of the on-duty personnel, and update the nearest neighbor point and distance.
[0154] (4) Find the nearest neighbor. When tracing back to the root node, the location of the nearest on-duty personnel is determined.
[0155] (5) The system notifies the duty officer via mobile phone application, text message, call or other real-time communication methods.
[0156] like Figure 1 , Figure 2 As shown, the main workflow is:
[0157] Step 1: First, use the decryption algorithm to decrypt the data set from the drone plug-in terminal. The data set contains multiple data features of the drone, and extract the data required for trajectory anomaly analysis, namely the three-dimensional position information, roll angle, pitch angle, and yaw angle based on the time series, and remove irrelevant data. Go to step 2.
[0158] Step 2: Use the difference to obtain the instantaneous velocity and acceleration of the drone. Go to step 3.
[0159] Step 3: Due to the difference in dimensions, the 8 data features obtained in steps 1 and 2 need to be standardized. The normalization formula is:
[0160] . Go to step 4.
[0161] Step 4: Calculate the similarity measure matrix for the single data features of multiple sets of data sets for each drone. The calculation formula is
[0162] . Go to step 5.
[0163] Step 5: Initialization. Treat as a separate cluster. Go to step 6.
[0164] Step 6: Use single-link clustering, take the minimum distance as the distance measure of the cluster, gradually merge the closest trajectory points, and form a hierarchical clustering tree. Go to step 7.
[0165] Step 7: Normal trajectories will eventually merge into one cluster, and the remaining few clusters will exist in isolation. These clusters may be abnormal trajectories. Set the segmentation threshold based on manual experience to divide the clusters into normal clusters and potential abnormal clusters. Go to step 8.
[0166] Step 8: For the kth UAV, if its data feature m is identified as a potential anomaly by the UAV trajectory anomaly detector in the i-th flight, it is marked as Otherwise, mark it as . Go to step 9.
[0167] Step 9: The weight of data feature m is marked as , pre-use Lasso Regression divides the normal inspection trajectory data of the drone into a training set and a test set, and then uses the training set to train Lasso Regression model. In this process, the model determines the characteristics of each data m Impact on the normal flight trajectory of the UAV.
[0168] Step 10: For the same time t, the different data features m of the same trajectory of the kth UAV are obtained , firstly perform an OR operation. If the result of the OR operation is 0, it means that all data features of the flight trajectory of the kth UAV at time t are normal. If the result of the OR operation is not 0, it means that some data features of the flight trajectory of the kth UAV at time t may be abnormal, and go to step 11.
[0169] Step 11: Make a comprehensive judgment on possible abnormal points at time t.
[0170]
[0171] In the formula represents the decision threshold. ,but k = k + 1, return to step 1; otherwise, go to step 12.
[0172] Step 12: When the abnormal behavior determiner determines that the kth UAV is abnormal at a certain time t, the adaptive alarm mechanism immediately alarms. The system obtains the abnormal point of the UAV's flight trajectory and improves KD The tree algorithm notifies the on-duty personnel closest to the abnormal point to go to the scene to verify the cause of the abnormality and check whether there is any illegal behavior that deliberately interferes with the normal inspection of drones. Example
[0173] Assume that a city power grid company uses drones to conduct regular inspections of power grid lines. The drones are scattered in drone warehouses near the inspection targets, and each drone is equipped with an external terminal module. First, the data from the drones is decrypted and then preprocessed. A hierarchical clustering algorithm is used to find potential abnormal points in the drone flight trajectory. Then, combined with the normal inspection of the drone, the abnormal points are Lasso The regression algorithm obtains the weights of various data features, makes a comprehensive judgment on potential anomalies, and traces the exact anomalies. KD Tree algorithm, the system sends a notification to the on-duty personnel closest to the abnormal point.
[0174] The specific implementation plan is:
[0175] (1) First, decrypt the trajectory data from the drone, extract the data features, and perform preprocessing, and normalize the data using a standardized formula.
[0176] (2) A hierarchical clustering algorithm is used to cluster the UAV flight trajectory data to identify potential outliers.
[0177] (3) In the abnormal behavior determiner, use Lasso The regression algorithm obtains the weight of each data feature, and finds the sum of the product of the potential outliers and the weight of each data feature, and the threshold By comparing, we can determine whether the k-th UAV is abnormal at a certain moment t.
[0178] (4) The system obtains the abnormal point location of the UAV flight trajectory and improves KD The tree algorithm notifies the on-duty personnel closest to the abnormal point to go to the scene to verify the cause of the abnormality and check whether there is any illegal behavior that intentionally interferes with the normal inspection of drones.
[0179] Improved optimization:
[0180] The drone trajectory anomaly detector uses hierarchical clustering to find possible abnormal points in the drone flight trajectory. K-Means Clustering algorithm, hierarchical clustering is insensitive to the choice of initial cluster centers. Hierarchical clustering does not need to assume that the data is convex, so it works better when dealing with non-convex clusters. Hierarchical clustering requires setting the segmentation threshold based on manual experience to divide clusters into normal clusters and potentially abnormal clusters.
[0181] The abnormal behavior detector will first This step can save system consumption. If the result of the OR operation is not 0, the possible abnormal points at time t will be comprehensively judged. LassoThe regression algorithm uses the data set of the normal flight trajectory of the drone to determine the impact of each data feature on the normal flight trajectory of the drone. According to the abnormal situation of the data features calculated by the drone trajectory anomaly detector, the Lasso The regression algorithm obtains the weight of each data feature, and finds the sum of the product of the potential outliers and the weight of each data feature, and the threshold By comparing, we can determine whether the k-th UAV is abnormal at a certain moment t.
[0182] The adaptive alarm mechanism is achieved by improving KD The algorithm introduces a pruning strategy to reduce unnecessary searches. When a node close enough to the target point has been found, the search for its child nodes can be stopped, thereby improving the search efficiency and saving system computing overhead.
[0183] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for tracing the abnormality of UAV flight trajectory based on fusion clustering algorithm, characterized in that: The following steps are involved: S1 extracts the data of the drone and performs decryption and preprocessing to extract the data features of the drone’s flight trajectory; S2 uses a hierarchical clustering algorithm to find potential anomalies in the drone's flight trajectory, including: S2.1 Calculate the similarity measure matrix for the single data features of multiple sets of data sets for each drone; G k,m Represents the similarity measure matrix of the data feature m of the k-th drone, and the matrix elements are defined as: d in Represents C k,m,i (t) and C k,m,n (t) Euclidean distance; S2.2 treats each Euclidean distance as a separate cluster; S2.3 uses single-link clustering, takes the minimum distance as the distance metric of the cluster, and gradually merges the closest trajectory points to form a hierarchical clustering tree; S2.4 The normal trajectories are finally merged into one cluster, and the remaining few isolated clusters are potential abnormal trajectories. The segmentation threshold is set to divide the clusters into normal clusters and potential abnormal clusters; S3 determines the impact of each data feature on the normal flight trajectory of the drone, uses the Lasso regression algorithm to obtain the weight of each data feature, calculates the sum of the product of the potential anomaly point and the weight of each data feature, and traces back to obtain the exact trajectory anomaly point, including: S3.1 For the kth UAV, if its data feature m is determined as a potential anomaly by the UAV trajectory anomaly detector in the i-th flight, then it is marked as ρ(k,m,i)=1, otherwise, it is marked as ρ(k,m,i)=0; S3.2 The weight of data feature m is marked as ω m , use the Lasso regression algorithm to obtain the weights of each data feature; S3.3 For the ρ(k,m,i) obtained from different data features m of the same trajectory of the k-th UAV at the same time t, first perform an OR operation. If the result of the OR operation is not 0, it means that a data feature of the flight trajectory of the k-th UAV at time t may be abnormal; S3.4 Comprehensively judge the possible abnormal points at this time t In the formula, κ o represents the judgment threshold; S4 arranges personnel to verify and investigate abnormal points.
2. According to claim 1, a method for tracing the abnormality of UAV flight trajectory based on fusion clustering algorithm is characterized in that: The step S1 of extracting the data of the drone includes extracting the data features of the flight trajectory of the drone. The trajectory data of the drone is mainly complex and sensitive spatiotemporal data, including three-dimensional position information and speed information based on time series.
3. A method for tracing the abnormality of UAV flight trajectory based on fusion clustering algorithm according to claim 1 or 2, characterized in that: The preprocessing step S1 includes removing irrelevant data, and then assuming that the three-dimensional space coordinates of the k-th UAV at time t and t+Δt of the i-th flight are respectively: P k,i (x k,i (t),y k,i (t),z k,i (t)),P k,i (x k,i (t+Δt),y k,i (t+Δt),z k,i (t+Δt)) calculates the Euclidean distance between them, and for time series data, the difference is used to estimate the instantaneous velocity and acceleration.
4. The method for tracing the abnormality of UAV flight trajectory based on fusion clustering algorithm according to claim 3 is characterized in that: The above multiple data features are standardized, and the data features of the k-th UAV at time t of the i-th flight are recorded as:
5. The method for tracing the abnormality of UAV flight trajectory based on fusion clustering algorithm according to claim 1 is characterized in that: The step S3.2 specifically includes: using the Lasso regression model to divide the normal inspection trajectory data of the drone into a training set and a test set in advance, and then using the training set to train the Lasso regression model; using the Lasso regression model to determine the impact of each data feature on the normal flight trajectory of the drone. The coefficient of the Lasso regression model reflects the degree of impact of each data feature on the normal flight trajectory of the drone. By observing the coefficients obtained by the model, the data features that have the greatest impact on the drone flight and the data features that have little or even negligible impact are determined.
6. The method for tracing the abnormality of UAV flight trajectory based on fusion clustering algorithm according to claim 1 is characterized in that: The step S4 specifically includes: S4.1 Obtain the longitude and latitude (u x ,u y ); S4.2 For the location data set of the personnel on duty that day, the KD tree is processed according to the construction method of the KD tree, and the KD tree is recursively constructed; S4.3 Starting from the root node of the KD tree, recursively traverse the KD tree; S4.4 When backtracking to the root node, find the nearest neighbor; S4.5 Notify the on-duty personnel at the nearest neighboring point through real-time communication to verify and eliminate abnormal points.
7. The method for tracing the abnormality of UAV flight trajectory based on fusion clustering algorithm according to claim 6 is characterized in that: The step S4.3 specifically includes using Manhattan distance to compare the target point, calculating the distance between the on-duty personnel position of the current node and the drone coordinates, recording the current nearest point and distance, and recursively traversing the subtree downward according to the position of the drone coordinates until the leaf node, while using a pruning strategy to improve search efficiency.
8. A method for tracing the abnormality of UAV flight trajectory based on fusion clustering algorithm according to claim 7 or 6, characterized in that: The step S4.3 also includes backtracking. During the backtracking process, the parent node and other subtree nodes are checked to see if there is a closer position of the person on duty, and the nearest neighbor point and distance are updated.
