A method, system, device, and medium for detecting abnormal MDLLOF tracks based on KD-tree structure.

By introducing a KD-tree structure into the MDLOF algorithm, the K-nearest neighbor tracks of multidimensional tracks can be quickly obtained, and the multi-factor orientation Hausdorff distance and local anomaly factor can be calculated. This solves the problem of long processing time in existing technologies and achieves efficient multidimensional anomaly track detection.

CN116518964BActive Publication Date: 2026-03-10XIDIAN UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-24
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing MDLOWF anomaly detection algorithms are time-consuming and difficult to efficiently detect anomalous behavior of multi-dimensional target tracks because they use brute force to solve for the K-nearest neighbor track set of the target track.

Method used

A multidimensional track dataset is constructed using a KD-tree structure. The K nearest neighbor tracks of the target track are quickly obtained through KD-tree query. The multi-factor directional Hausdorff distance and local anomaly factor are calculated, and anomaly thresholds are used to detect abnormal tracks.

Benefits of technology

It enables rapid detection of anomalies in position, speed, and heading in multidimensional tracks, improves the diversity of anomaly detection types and query efficiency, and meets the requirements of a processing speed of 100 tracks/second and an accuracy of 90%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116518964B_ABST
    Figure CN116518964B_ABST
Patent Text Reader

Abstract

A method, system, device, and medium for detecting abnormal tracks using MDLLOF based on a KD-tree structure; the method includes: first setting the number of nearest neighbors k and the anomaly threshold ε; constructing a KD-tree and calculating the multi-factor directional Hausdorff distance between the current track and its nearest neighbor tracks; and then calculating the TR for each track. i Multifactor nearest neighbor boundary distance δ Mborder (TR i (k) and the multi-factor reachable distance δ from each track to its nearest neighbor track. Mreach (TR i TR j ,k) and its nearest neighbor density ρ(TR) i Finally, the multidimensional local anomaly factor (MDLOF) is calculated for each track. i The method is to compare the anomaly detection threshold ε with the anomaly detection threshold ε to perform anomaly track detection; the system, equipment and medium are used to implement an MDLOF anomaly track detection method based on KD tree structure; the present invention has the characteristics of diverse anomaly detection types and high query efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of target tracking, in particular to a MDLOF abnormal track detection method, system, device and medium based on KD tree structure. BACKGROUND

[0002] The existing MDLOF abnormal detection algorithm constructs multi-dimensional abnormal factors through multi-factor directional Hausdorff distance, which can effectively measure the difference between target behaviors, but the algorithm needs to solve the K-neighbor track set of target track by brute force, which has the disadvantage of long time consumption.

[0003] The application patent application with the name of "target abnormal behavior detection method based on multi-dimensional features" and the publication number of [CN106022372A] provides a target abnormal behavior detection method based on multi-dimensional features. The method fully utilizes the attributes, types, positions, speeds and heading features of the target, realizes the mining of target abnormal behavior through the abnormal detection of multi-dimensional track data, and specifically includes the following steps: step 1, inputting the multi-dimensional track data set of the target, setting the attributes and type labels of the target; step 2, calculating the multi-factor directional Hausdorff distance between the target tracks; step 3, determining the neighbor track of each track; step 4, calculating the neighbor density of each track; step 5, calculating the multi-dimensional local abnormal factor of each track; step 6, performing abnormal detection judgment on each track; and step 7, setting the target abnormal behavior label. The method has simple parameter setting, high accuracy and easy engineering implementation, and has broad application prospects in the fields of pattern recognition and intelligent information processing. Since the invention adopts a brute force traversal method to query the K-neighbor track of each track, it has the disadvantage of high time consumption. SUMMARY

[0004] In order to overcome the above-mentioned shortcomings of the prior art, the purpose of the present application is to provide a MDLOF abnormal track detection method, system, device and medium based on KD tree structure, which sets the neighbor number k and the abnormal threshold value ε and constructs the KD tree according to the multi-dimensional track data set, calculates the multi-factor directional Hausdorff distance between the target track and its adjacent track, the multi-factor neighbor boundary distance of each track, the multi-factor distance from each track to its adjacent track and the neighbor density of itself, finally calculates the local abnormal factor by combining the MDLOF algorithm, and detects the abnormal track by comparing with the abnormal threshold value ε, which has the characteristics of multiple types of abnormal detection and high query efficiency.

[0005] In order to achieve the above-mentioned purpose, the technical scheme adopted by the present application is as follows:

[0006] A MDLOF abnormal track detection method based on KD tree structure, comprising the following steps:

[0007] Step 1: Set the number of nearest neighbors to k and the anomaly threshold to ε. Based on the multidimensional track dataset TD = {TR1, TR2, ..., TR...} n Construct a KD-tree;

[0008] Step 2: Use the KD-tree query process from Step 1 to obtain the k nearest neighbor tracks of the current track;

[0009] Step 3: Calculate the multi-factor orientation Hausdorff distance δ between the current track and its nearest neighbor tracks using the k nearest neighbor tracks. M (TR i TR j ), and utilize multi-factor orientation Hausdorff distance δ M (TR i TR j Calculate TR for each track i Multifactor nearest neighbor boundary distance δ Mborder (TR i ,k);

[0010] Step 4: Utilize the multi-factor nearest neighbor boundary distance δ from Step 3. Mborder (TR i (k) Calculate the multifactor reachable distance δ from each track to its nearest neighbor track. Mreach (TR i TR j ,k) and its nearest neighbor density ρ(TR) i ,k);

[0011] Step 5: Utilize the nearest neighbor density ρ(TR) from Step 4 i ,k) Calculate the multidimensional local anomaly factor MDLOF(TR) for each track. i ,k), and the multidimensional local anomaly factor MDLOF(TR) for each track. i The abnormal trajectory is compared with the abnormal threshold ε in step 1 to detect abnormal tracks.

[0012] In step 1:

[0013] The value of the nearest neighbor number k must be set to meet the following requirements: when the MDLOF anomaly track detection method based on KD tree structure is running, the average data processing speed of the computer program is not less than 100 tracks / s and the accuracy is not less than 90%.

[0014] The value of the aforementioned anomaly threshold ε must be set such that the F1-score anomaly detection score of the MDLOF anomaly track detection method based on the KD tree structure is not less than 0.8.

[0015] By cleaning the historical multi-dimensional track dataset, removing tracks with uneven time intervals and missing key data, a multi-dimensional track dataset TD = {TR1, TR2,..., TR n} is formed.

[0016] In step 1, a KD tree is constructed through the multi-dimensional track dataset TD = {TR1, TR2,..., TR n}, which specifically includes the following steps:

[0017] Step 1.1: Sort the track dataset according to the maximum variance dimension D of the multi-dimensional track dataset TD = {TR1, TR2,..., TR n}, and construct the root node RT according to the median track data;

[0018] Step 1.2: Compare the D-dimensional data values of the remaining nodes with those of the root node RT, and assign the tracks with smaller values to the left subtree and the tracks with larger values to the right subtree;

[0019] Step 1.3: The left and right subtrees respectively construct KD trees according to the corresponding track sets.

[0020] The query steps for the k nearest neighbor tracks of the current track in step 2 are specifically as follows:

[0021] Step 2.1: Set the current node Current as the root node RT, PriorityQue as the priority queue, and Stack as the stack structure data;

[0022] Step 2.2: Through the recursive method, save the current node Current into the Stack, obtain the division dimension information SD retained in the current node Current, compare the Target node with the dimension information SD of the current node Current. If the Target node is larger, set the current node Current as Current.right and add the current node Current to the Stack; otherwise, set the current node Current as Current.left and add the current node Current to the Stack; Recursively repeat the above steps until Current is a leaf node, exit the recursion and continue with step 2.3;

[0023] Step 2.3: Set the current node Current as the top element of the Stack, and remove the top element from the Stack; When |PriorityQue| < k, execute step 2.4; When |PriorityQue| == k, execute step 2.5; When Current == RT, the algorithm ends;

[0024] Step 2.4: Place the current node Current into PriorityQue, and update the maximum distance R from the alternative nodes in PriorityQue to Target c , and execute from the sibling nodes

[0025] SearchKNeighbors(Current anotherChild , k, Target, Stack, PriorityQue) function and return to Step 2.3;

[0026] Step 2.5: Obtain the division dimension information SD retained in the current node Current, and calculate the distance dis between the current node Current and the Target in the SD dimension SD = |Current SD - Target SD |. If dis SD < R c , execute Step 2.6;

[0027] Step 2.6: When |PriorityQue| == k, compare the distances between the current node Current and the top node in PriorityQue and the Target node respectively. If the current node Current is closer to the Target node, remove the top node in PriorityQue, place the current node Current into PriorityQue, and return to Step 2.3; otherwise, do nothing and return to Step 2.3. When |PriorityQue| < k, place the current node Current into PriorityQue, update the maximum distance R from the alternative nodes in PriorityQue to Target c , and then execute SearchKNeighbors(Current anotherChild , k, Target, Stack, PriorityQue) function from the sibling nodes and return to Step 2.3.

[0028] The specific steps of Step 3 are as follows:

[0029] Step 3.1: Calculate the multi-factor distance mfdist(P i in the current track TR A and the track point P j in the neighboring track TR B ) through Equation (1); A , P B );

[0030]

[0031] In equation (1), mfdist(P A ,P B ) is to combine the waypoint P A With track point P B The distance between them is determined by multiple factors, including position, speed, and heading. and For track point P A With track point P B speed; and For track point P A With track point P B The course; For track point P A With track point P B The Euclidean distance of the velocity characteristics; For track point P A With track point P B The Euclidean distance of the heading characteristic; ω d ω is the weighting factor for the location features. v ω is a weighting factor for the velocity characteristic. θ ω is the weighting factor for the heading feature. d ω v ω θ The following conditions must be met:

[0032] ω d ≥0

[0033] ω v ≥0

[0034] ω θ ≥0

[0035] ω d +ω v +ω θ =1

[0036] Step 3.2: Using equation (2), utilize the multi-factor distance mfdist(P) from step 3.1. A ,P B Calculate the current track TR i TR with neighboring tracks j The multi-factor oriented Hausdorff distance δ between M (TR i TR j );

[0037]

[0038] In equation (2), the multi-factor orientation Hausdorff distance δ M (TRi TR j ) indicates the current track TR i TR with neighboring tracks j The degree of similarity between them;

[0039] Step 3.3: Utilize the multi-factor orientation Hausdorff distance δ from Step 3.2. M (TR i TR j Calculate the k-th nearest neighbor boundary distance δ for multiple factors of the trajectory. Mborder (TR i The specific steps include:

[0040] Step 3.3.1: Calculate the distance TR from the current track using equation (3). i Multifactor orientation Hausdorff distance set of the k nearest neighbor tracks N(TR) i ,k);

[0041] N(TR i ,k)={TR j ∈TD{TR≠TR i}|δ M (TR i TR j )≤δ Mborder (TR i ,k)},|N(TR i ,k)|≥k (3)

[0042] In equation (3), |N(TR) i |,k)| represents the number of tracks in the set, and is not less than k;

[0043] Step 3.3.2: Calculate the current track TR using equation (4). i The set of k nearest neighbor tracks N(TR) i ,k) Medium distance current track TR i Multifactor Oriented Hausdorff Distance δ M (TR i TR j The largest track NN (TR) i ,k);

[0044] NN(TR i ,k)=argmax(δ M (TR i TR j )),TR j ∈N(TR i Equation (4)

[0045] Step 3.3.3: Using equation (5), utilize the maximum track NN(TR) from step 3.3.2. i ,k) Calculate δ Mborder (TR i ,k);

[0046] δ Mborder (TR i ,k)=δ M (TR i ,NN(TR i Equation (5)

[0047] In equation (5), δ Mborder (TR i ,k) represents the k-th nearest neighbor boundary distance of the multi-factor trajectory.

[0048] Step 4 specifically includes the following steps:

[0049] Step 4.1: Calculate the current track TR using equation (6). i To the nearest track TR j Multi-factor reachable distance δ Mreach (TR i TR j ,k);

[0050] δ Mreach (TR i TR j ,k)=max{δ Mborder (TR j ,k),δ M (TR j TR i Equation (6)

[0051] Step 4.2: Calculate the current track TR using equation (7). i The nearest neighbor density is defined as ρ(TR) i ,k):

[0052]

[0053] Step 5 specifically includes the following steps:

[0054] Step 5.1: Calculate the multidimensional local anomaly factor (MDLOF) of the track using equation (8). i ,k);

[0055]

[0056] In equation (8), MDLOF(TR) i (k) represents the current track TR iNeighboring tracks and current track TR i The average of the ratios of the densities of the nearest neighbors;

[0057] Step 5.2: Multidimensional Local Anomaly Factor (MDLOF) (TR) i The value of (k) is compared with the anomaly threshold ε. If the multidimensional local anomaly factor MDLOF(TR) is... i If the value of k is greater than the abnormal threshold ε, then the current track is an abnormal track.

[0058] A KD-tree-based MDLof-Loop anomaly track detection system includes:

[0059] The KD-tree module is divided into two parts: construction and query. The construction part utilizes the multidimensional track dataset TD = {TR1, TR2, ..., TR}. n The KD tree is constructed using the KD tree structure generated in the construction part, and the query part queries the k nearest neighbor tracks of the current track using the KD tree structure generated in the construction part, and generates a set of the k nearest neighbor tracks of the current track.

[0060] Anomaly detection module: used to determine abnormal tracks. It obtains the nearest tracks of the target track through the query function provided by the KD tree module, which supports the subsequent calculation of the magnitude of the multidimensional local anomaly factor corresponding to the real-time track. Finally, the judgment result is obtained by comparing with the anomaly threshold.

[0061] Data preprocessing module: Cleans the historical multidimensional track dataset, removing tracks with uneven time intervals and missing key data, and forms a multidimensional track dataset for constructing a KD tree.

[0062] A KD-tree-based MDLOF anomaly track detection device includes:

[0063] Memory: Used to store the computer program that implements the MDLof-Loop anomaly track detection method based on KD-tree structure described above;

[0064] Processor: Used to implement the MDLof-based abnormal track detection method based on KD-tree structure when executing the computer program.

[0065] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the MDLofF anomaly track detection method based on a KD-tree structure.

[0066] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0067] 1. Because it uses the MDLOF algorithm for anomaly detection, it can detect position anomalies, speed anomalies, and heading anomalies in multidimensional tracks; combined with the KD tree structure, it can query the K nearest neighbor tracks of the target track more quickly, and has the effect of diverse anomaly detection types and high query efficiency.

[0068] 2. The present invention provides an MDLofF anomaly track detection system, device and medium based on KD tree structure, which is used to implement an MDLofF anomaly track detection method based on KD tree structure. Therefore, it can detect position anomalies, speed anomalies and heading anomalies in multidimensional tracks, and can quickly query the nearest tracks of the target track. It has the effect of diverse anomaly detection types and high query efficiency. Attached Figure Description

[0069] Figure 1 This is a flowchart of the method of the present invention.

[0070] Figure 2 This is a graph comparing the running times of the MDLOF algorithm and the KD-MDLOF algorithm. Detailed Implementation

[0071] The working principle of the present invention will now be described in detail with reference to the accompanying drawings.

[0072] See Figure 1 A method for detecting abnormal tracks using MDLOF based on KD-tree structure, comprising the following steps:

[0073] Step 1: Set the number of nearest neighbors to k and the anomaly threshold to ε. Based on the multidimensional track dataset TD = {TR1, TR2, ..., TR...} n Construct a KD-tree;

[0074] Step 2: Use the KD-tree query process from Step 1 to obtain the k nearest neighbor tracks of the current track;

[0075] Step 3: Calculate the multi-factor orientation Hausdorff distance δ between the current track and its nearest neighbor tracks using the k nearest neighbor tracks. M (TR i TR j ), and utilize multi-factor orientation Hausdorff distance δ M (TR i TR j Calculate TR for each track i Multifactor nearest neighbor boundary distance δ Mborder (TR i ,k);

[0076] Step 4: Utilize the multi-factor nearest neighbor boundary distance δ from Step 3. Mborder (TR i(k) Calculate the multifactor reachable distance δ from each track to its nearest neighbor track. Mreach (TR i TR j ,k) and its nearest neighbor density ρ(TR) i ,k);

[0077] Step 5: Utilize the nearest neighbor density ρ(TR) from Step 4 i ,k) Calculate the multidimensional local anomaly factor MDLOF(TR) for each track. i ,k), and the multidimensional local anomaly factor MDLOF(TR) for each track. i The abnormal trajectory is compared with the abnormal threshold ε in step 1 to detect abnormal tracks.

[0078] In step 1:

[0079] The number of nearest neighbors directly affects the efficiency of the method. When the number of nearest neighbors is too large, the query time will increase, but the detection accuracy will improve. When the number of nearest neighbors is too small, the detection accuracy will decrease, but the query time will decrease. Therefore, the value of the number of nearest neighbors k needs to be set according to the specific scenario to improve the overall accuracy and efficiency of the method. At the same time, it is necessary to meet the requirement that when the MDLof-based KD-tree abnormal track detection method is running, the average data processing speed of the computer program is not less than 100 tracks / s and the accuracy is not less than 90%.

[0080] Due to the limited number of abnormal tracks and the scarcity of acquisition methods, setting the aforementioned abnormality threshold ε also depends on the corresponding application scenario. This value is obtained by comparing the abnormal track data generated by simulation with historical track data. It must meet the requirement that the F1-score of the MDLOF abnormal track detection method based on the KD-tree structure is not less than 0.8. In anomaly detection, accuracy represents the probability that the predicted abnormal track is actually abnormal, and recall represents the proportion of tracks that are actually abnormal but are predicted to be abnormal. The F1-score evaluates the performance of anomaly detection under different anomaly thresholds by balancing accuracy and recall. Finally, the anomaly threshold with an F1-score of not less than 0.8 is obtained as the method parameter.

[0081] By cleaning the historical multidimensional track dataset and removing tracks with uneven time intervals and missing key data, a multidimensional track dataset TD = {TR1, TR2, ..., TR} is formed. n}

[0082] In step 1, the multidimensional track dataset TD = {TR1, TR2, ..., TR} is used. n Constructing a KD-tree involves the following steps:

[0083] Step 1.1. Sort the track dataset according to the maximum variance dimension D of the multi-dimensional track dataset TD = {TR1, TR2,..., TR n}, and construct the root node RT based on the median track data;

[0084] Step 1.2. Compare the D-dimensional data values of the remaining nodes with those of the root node RT. Assign the tracks with smaller values to the left subtree and the tracks with larger values to the right subtree;

[0085] Step 1.3. Respectively construct KD-trees for the left and right subtrees according to the corresponding track sets.

[0086] In order to conveniently obtain the adjacent tracks similar to the target track, it is necessary to query the adjacent tracks of the target track according to the KD-tree in Step 1. The query steps for the k adjacent tracks of the current track in Step 2 are specifically as follows:

[0087] Step 2.1. Set the current node Current as the root node RT, PriorityQue as the priority queue, and Stack as the stack structure data;

[0088] Step 2.2. Through the recursive method, save the current node Current into Stack, obtain the division dimension information SD retained in the current node Current, compare the Target node with the dimension information SD of the current node Current. If the Target node is larger, set the current node Current as Current.right and add the current node Current to Stack; otherwise, set the current node Current as Current.left and add the current node Current to Stack; Recursively perform the above steps until Current is a leaf node, exit the recursion and continue with Step 2.3;

[0089] Step 2.3. Set the current node Current as the top element of the Stack, and remove the top element from Stack; When |PriorityQue| < k, execute Step 2.4; When |PriorityQue| == k, execute Step 2.5; When Current == RT, the algorithm ends;

[0090] Step 2.4. Place the current node Current into PriorityQue, update the maximum distance R from the alternative nodes in PriorityQue to Target c , and execute from the sibling node

[0091] SearchKNeighbors(Current anotherChild, k, Target, Stack, PriorityQue) function and return to Step 2.3;

[0092] Step 2.5: Obtain the partition dimension information SD retained in the current node Current, and calculate the distance dis between the current node Current and the Target SD dimension SD = |Current SD - Target SD |. If dis SD < R c , execute Step 2.6;

[0093] Step 2.6: When |PriorityQue| == k, compare the distances between the current node Current and the top node in PriorityQue and the Target node respectively. If the current node Current is closer to the Target node, remove the top node in PriorityQue and place the current node Current into PriorityQue and return to Step 2.3; otherwise, do nothing and return to Step 2.3. When |PriorityQue| < k, place the current node Current into PriorityQue, update the maximum distance R from the alternative nodes in PriorityQue to Target c , and then execute the SearchKNeighbors(Current anotherChild , k, Target, Stack, PriorityQue) function from the sibling nodes and return to Step 2.3;

[0094] Among them, RT is the root node of the KD tree, k is the number of searched nearest neighbor points, Target is the target data point, Stack is the stack structure data used to save the path information for convenient backtracking later, and PriorityQue is the priority queue used to save the k data points closest to Target.

[0095] The specific steps of the said Step 3 include the following steps:

[0096] Step 3.1: Calculate the multi-factor distance mfdist(P i in the current track TR A and the track point P j in the neighboring track TR B through Equation (1); A , P B );

[0097]

[0098] In equation (1), mfdist(P A ,P B ) is to combine the waypoint P A With track point P B The distance between them is determined by multiple factors, including position, speed, and heading. and For track point P A With track point P B speed; and For track point P A With track point P B The course; For track point P A With track point P B The Euclidean distance of the velocity characteristics; For track point P A With track point P B The Euclidean distance of the heading characteristic; ω d ω is the weighting factor for the location features. v ω is a weighting factor for the velocity characteristic. θ ω is the weighting factor for the heading feature. d ω v ω θ The following conditions must be met:

[0099] ω d ≥0

[0100] ω v ≥0

[0101] ω θ ≥0

[0102] ω d +ω v +ω θ =1

[0103] Using mfdist(P A ,P B Expand the dimension of the directional Hausdorff distance.

[0104] Step 3.2: Using equation (2), utilize the multi-factor distance mfdist(P) from step 3.1. A ,P B Calculate the current track TR i TR with neighboring tracks j The multi-factor oriented Hausdorff distance δ between M (TR i TR j );

[0105]

[0106] In equation (2), the multi-factor orientation Hausdorff distance δ M (TR i TR j ) indicates the current track TR i TR with neighboring tracks j The degree of similarity between them;

[0107] Step 3.3: Utilize the multi-factor orientation Hausdorff distance δ from Step 3.2. M (TR i TR j Calculate the k-th nearest neighbor boundary distance δ for multiple factors of the trajectory. Mborder (TR i The specific steps include:

[0108] Step 3.3.1: Calculate the distance TR from the current track using equation (3). i Multifactor orientation Hausdorff distance set of the k nearest neighbor tracks N(TR) i ,k);

[0109] N(TR i ,k)={TR j ∈TD{TR≠TR i}|δ M (TR i TR j )≤δ Mborder (TR i ,k)},|N(TR i ,k)|≥k (3)

[0110] In equation (3), |N(TR) i |,k)| represents the number of tracks in the set, and is not less than k;

[0111] Step 3.3.2: Calculate the current track TR using equation (4). i The set of k nearest neighbor tracks N(TR) i ,k) Medium distance current track TR i Multifactor Oriented Hausdorff Distance δ M (TR i TR j The largest track NN (TR) i ,k);

[0112] NN(TR i ,k)=argmax(δ M (TR i TR j )),TRj ∈N(TR i Equation (4)

[0113] Track set N(TR) i ,k) Medium-range track TR i The maximum trajectory for multi-factor orientation Hausdorff is NN(TR) i ,k),NN(TR) i ,k) can also be understood as track TR i The k-th nearest neighbor track.

[0114] Step 3.3.3: Using equation (5), utilize the maximum track NN(TR) from step 3.3.2. i ,k) Calculate δ Mborder (TR i ,k);

[0115] δ Mborder (TR i ,k)=δ M (TR i ,NN(TR i Equation (5)

[0116] In equation (5), δ Mborder (TR i ,k) represents the k-th nearest neighbor boundary distance of the multi-factor trajectory.

[0117] Step 4 specifically includes the following steps:

[0118] Step 4.1: Calculate the current track TR using equation (6). i To the nearest track TR j Multi-factor reachable distance δ Mreach (TR i TR j ,k);

[0119] δ Mreach (TR i TR j ,k)=max{δ Mborder (TR j ,k),δ M (TR j TR i Equation (6)

[0120] Step 4.2: Calculate the current track TR using equation (7). i The nearest neighbor density is defined as ρ(TR) i ,k):

[0121]

[0122] Step 5 specifically includes the following steps:

[0123] Step 5.1: Calculate the multidimensional local anomaly factor (MDLOF) of the track using equation (8). i ,k);

[0124]

[0125] In equation (8), MDLOF(TR) i (k) represents the current track TR i Neighboring tracks and current track TR i The average of the ratios of the densities of the nearest neighbors;

[0126] Step 5.2: Multidimensional Local Anomaly Factor (MDLOF) (TR) i The value of (k) is compared with the anomaly threshold ε. If the multidimensional local anomaly factor MDLOF(TR) is... i If the value of k is greater than the abnormal threshold ε, then the current track is an abnormal track.

[0127] A KD-tree-based MDLof-Loop anomaly track detection system includes:

[0128] The KD-tree module is divided into two parts: construction and query. The construction part utilizes the multidimensional track dataset TD = {TR1, TR2, ..., TR}. n The KD tree is constructed using the KD tree structure generated in the construction part, and the query part queries the k nearest neighbor tracks of the current track using the KD tree structure generated in the construction part, and generates a set of the k nearest neighbor tracks of the current track.

[0129] Anomaly detection module: used to determine abnormal tracks. It obtains the nearest tracks of the target track through the query function provided by the KD tree module, which supports the subsequent calculation of the magnitude of the multidimensional local anomaly factor corresponding to the real-time track. Finally, the judgment result is obtained by comparing with the anomaly threshold.

[0130] Data preprocessing module: Cleans the historical multidimensional track dataset, removing tracks with uneven time intervals and missing key data, and forms a multidimensional track dataset for constructing a KD tree.

[0131] A KD-tree-based MDLOF anomaly track detection device includes:

[0132] Memory: Used to store the computer program that implements the MDLof-Loop anomaly track detection method based on KD-tree structure described above;

[0133] Processor: Used to implement the MDLof-based abnormal track detection method based on KD-tree structure when executing the computer program.

[0134] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or any conventional processor. The processor is the control center of the device for detecting MDLof-like anomalies based on a KD-tree structure, connecting various parts of the device via various interfaces and lines.

[0135] When the processor executes the computer program, it implements the steps of the above-mentioned MDLofF anomaly track detection based on a KD-tree structure, for example: setting the number of nearest neighbors to k and the anomaly threshold to ε, and based on the multidimensional track dataset TD = {TR1, TR2, ..., TR...} n Construct a KD tree; first calculate the multi-factor orientation Hausdorff distance δ between the track and its nearest neighbor tracks. M (TR i TR j The algorithm then uses a KD-tree query process to obtain the k nearest neighbor tracks of the current track, and finally calculates the multi-factor orientation Hausdorff distance between the current track and its nearest neighbor tracks. The multi-factor orientation Hausdorff distance is then used to calculate the TR (Trajectory Length) of each track. i Multifactor nearest neighbor boundary distance δ Mborder (TR i ,k); Utilizing multi-factor nearest neighbor boundary distance δ Mborder (TR i (k) Calculate the multifactor reachable distance δ from each track to its nearest neighbor track. Mreach (TR i TR j ,k) and its nearest neighbor density ρ(TR) i ,k); using the nearest neighbor density ρ(TR) i ,k) Calculate the multidimensional local anomaly factor MDLOF(TR) for each track. i The method involves comparing the multidimensional local anomaly factor of each track with the anomaly threshold ε to detect abnormal tracks. This achieves the MDLOWF anomaly track detection based on a KD-tree structure.

[0136] Alternatively, when the processor executes the computer program, it implements the functions of each module in the above system. For example, the KD-tree module is divided into two parts: construction and query. The construction part utilizes the multidimensional track dataset TD = {TR1, TR2, ..., TR}. n The KD-tree is constructed to generate a KD-tree structure. The query part queries the K nearest neighbor tracks of the target track using the KD-tree structure generated in the construction part, generating a set of the K nearest neighbor tracks of the target track. The anomaly detection module is used to determine abnormal tracks. It obtains the nearest neighbor tracks of the target track through the query function provided by the KD-tree module, which supports the subsequent calculation of the magnitude of the multidimensional local anomaly factor corresponding to the real-time track. Finally, the determination result is obtained by comparing it with the anomaly threshold.

[0137] The output yields the results of the MDLOF anomaly track detection based on the KD-tree structure.

[0138] For example, the computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing preset functions. These instruction segments describe the execution process of the computer program in the device for detecting MDLof anomalies based on a KD-tree structure. For example, the computer program can be divided into a KD-tree module and an anomaly detection module. The specific functions of each module are as follows: KD-tree module: divided into construction and query parts. The construction part utilizes a multidimensional track dataset TD = {TR1, TR2, ..., TR...} n The KD-tree is constructed to generate a KD-tree structure. The query part queries the K nearest neighbor tracks of the target track through the KD-tree structure generated by the construction part, generating a set of the K nearest neighbor tracks of the target track. The anomaly detection module is used to determine the anomaly track. It obtains the nearest neighbor tracks of the target track through the query function provided by the KD-tree module, which supports the subsequent calculation of the magnitude of the multidimensional local anomaly factor corresponding to the real-time track. Finally, the determination result is obtained by comparing with the anomaly threshold, and the result of the MDLOWOF anomaly track detection based on the KD-tree structure is output.

[0139] The device for detecting abnormal MDLOCLOF flight paths based on a KD-tree structure can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. This device may include, but is not limited to, processors and memory. Those skilled in the art will understand that the above is an example of a device for detecting abnormal MDLOCLOF flight paths based on a KD-tree structure and does not constitute a limitation on such a device. It may include more components than described above, or combine certain components, or use different components. For example, the device may also include input / output devices, network access devices, buses, etc.

[0140] The memory can be used to store the computer program and / or modules. The processor implements various functions of the device for detecting abnormal tracks based on the KD tree structure MDLof by running or executing the computer program and / or modules stored in the memory and calling the data stored in the memory.

[0141] The memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function (such as sound playback or image playback). The data storage area may store data created based on the use of the phone (such as audio data or a phonebook). Furthermore, the memory may include high-speed random access memory (RAM) and non-volatile memory, such as hard disks, RAM, plug-in hard disks, SmartMediaCards (SMC), Secure Digital (SD) cards, flash cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.

[0142] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the MDLof-based KD-tree structure-based abnormal track detection method.

[0143] If the module / unit of the MDLofF anomaly track detection system based on KD tree structure is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0144] This invention implements all or part of the process in the above-described MDLofF anomaly track detection based on a KD-tree structure. It can also be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program implements the steps of the above-described MDLofF anomaly track detection based on a KD-tree structure. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or a preset intermediate form, etc.

[0145] The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0146] It should be noted that the content contained in the computer-readable storage medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.

[0147] It should be noted that embodiments of the present invention can be implemented using hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated hardware.

[0148] Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuitry of semiconductors such as very large-scale integrated circuits or gate arrays, logic chips, transistors, etc., or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-described hardware circuitry and software, such as firmware.

[0149] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.

[0150] Comparative experiment

[0151] Experiment content: Design an experiment to verify and compare the effectiveness of the MDLOF algorithm and the KD-MDLOF algorithm in abnormal trajectory analysis.

[0152] Experimental environment and parameter configuration: The trajectory dataset used in the experiment was based on the civil aviation trajectory dataset near Chengdu Shuangliu Airport, with the addition of anomalous trajectories. The observed airspeed range of civil aircraft was [170m / s, 510m / s], the time interval for trajectory point acquisition was 0.5 seconds, and the K value was selected as 20.

[0153] Experimental results:

[0154] Table 1. Number of outlier data detected by MDLOF and KD-MDLOF algorithms

[0155]

[0156]

[0157] Table 2. Anomaly detection accuracy of MDLOF and KD-MDLOF algorithms

[0158] Number of abnormal data MDLOF algorithm detection accuracy KD-MDLOF algorithm detection accuracy 20 100% 100% 50 93.6% 88.9% 100 92.6% 91.3%

[0159] As can be seen from Tables 1 and 2 above, as the number of outliers increases, the number of outliers detected by the KD-MDLOF algorithm and the accuracy are not significantly different from those of the MDLLOF algorithm. The accuracy of outlier detection gradually stabilizes and fluctuates around 90%.

[0160] Depend on Figure 2 It can be seen that before 0.5 seconds, KD-MDLOF's anomaly detection speed is lower than MDLOF's, mainly because KD-MDLOF has an additional initialization process of building a KD-tree compared to MDLOF. After 0.5 seconds, KD-MDLOF's speed increases and surpasses MDLOF's anomaly detection speed. This is mainly because MDLOF uses a brute-force search method to obtain the k nearest neighbors, while KD-MDLOF uses a KD-tree structure for the search. The search process includes two parts: binary search and backtracking. The former determines the search path, and the latter recursively searches the k nearest neighbors to the root node along the search path, reducing the time complexity of searching for the k nearest neighbors from O(n^2) to O(n^2). 2The time complexity is reduced to O(nlog₂n). In this experiment, the KD-MDLOF algorithm reduced the running time by about 16% compared to the MDLOF algorithm.

Claims

1. A KD tree structure-based MDLOF anomaly track detection method, characterized in that, It comprises the following steps: Step 1, set the number of neighbors as k, the threshold of anomaly as ε, and construct a KD tree according to the multi-dimensional track data set TD = {TR1, TR2,..., TRn} ; n} Step 2, the query process of the KD tree in step 1 obtains the k nearest neighbor trajectories of the current trajectory; Step 3, using k nearest neighbor tracks to calculate the multi-factor directional Hausdorff distance δ M (TR i , TR j ) of the current track and the nearest neighbor track, and using the multi-factor directional Hausdorff distance δ M (TR i , TR j ) to calculate the multi-factor nearest neighbor boundary distance δ i (TR Mborder , k) of each track TR i . Step 4: Utilize the multi-factor nearest neighbor boundary distance δ from Step 3. Mborder (TR i (k) Calculate the multifactor reachable distance δ from each track to its nearest neighbor track. Mreach (TR i TR j ,k) and its nearest neighbor density ρ(TR) i ,k); Step 5: Utilize the nearest neighbor density ρ(TR) from Step 4 i ,k) Calculate the multidimensional local anomaly factor MDLOF(TR) for each track. i ,k), and the multidimensional local anomaly factor MDLOF(TR) for each track. i The abnormal trajectory is compared with the abnormal threshold ε in step 1 to perform abnormal trajectory detection. The specific steps are as follows: Step 5.1, compute the multi-dimensional local outlier factor MDLOF(TR) of the track by formula (8) i , k) ; In formula (8), MDLOF (TR i ) is the average value of the ratio of the density of the neighboring tracks of the current track TR i to the density of the neighboring tracks of the current track TR i . Step 5.2, compare the value of the multi-dimensional local outlier factor MDLOF(TR i ,k) with an outlier threshold ε, if the value of the multi-dimensional local outlier factor MDLOF(TR i ,k) is greater than the outlier threshold ε, the current track is an abnormal track.

2. The MDLOF anomalous track detection method based on KD-tree structure according to claim 1, characterized in that, The step 1 is characterized in that: The value of the number k of the nearest neighbors is set to meet the requirements that the average processing data speed of the computer program is not less than 100 trajectories / s and the accuracy is not less than 90% when the MDLOF abnormal trajectory detection method based on the KD tree structure is running; The value of the abnormal threshold ε is set to meet the requirement that the F1-score abnormal detection score of the MDLOF abnormal trajectory detection method based on the KD tree structure is not less than 0.8; By data cleaning of the historical multi-dimensional track data set, the tracks with uneven time intervals and missing key data are removed to form a multi-dimensional track data set TD = {TR1, TR2,..., TR n}.

3. The MDLOF anomalous track detection method based on KD-tree structure according to claim 2, characterized in that, The step 1 constructs the KD tree through the multi-dimensional track data set TD={TR1, TR2,..., TR n} and specifically includes the following steps: Step 1.

1. Sort the track data set TD = {TR1, TR2,..., TRN} according to the maximum variance dimension D, and construct the root node RT according to the median track data. n} according to the maximum variance dimension D, and construct the root node RT according to the median track data. Step 1.2, compare the D-dimensional data value of the remaining nodes with the root node RT, and divide the trajectories with smaller values into the left subtree and the trajectories with larger values into the right subtree; Step 1.3, the left and right subtrees are constructed according to the corresponding trajectory set respectively.

4. The MDLOF anomalous track detection method based on KD-tree structure according to claim 3, characterized in that, The query step of the k nearest neighbor trajectories of the current trajectory in step 2 is characterized in that: Step 2.1, set the current node Current as the root node RT, PriorityQue as the priority queue, and Stack as the stack structure data; Step 2.2, save the current node Current to the Stack by the recursive method, obtain the reserved division dimension information SD of the current node Current, compare the dimension information SD of the target node with the current node Current, if the target node is larger, set the current node Current as Current.right, and add the current node Current to the Stack; otherwise, set the current node Current as Current.left, and add the current node Current to the Stack; recursively execute the above steps until Current is a leaf node, and exit the recursion and continue step 2.3; Step 2.3, set the current node Current as the top element of the Stack, remove the top element from the Stack; when |PriorityQue|<k, execute step 2.4; when |PriorityQue|==k, execute step 2.5; when Current==RT, the algorithm ends; Step 2.4, place the current node Current into the PriorityQue, update the distance R of the alternative nodes in the PriorityQue to the farthest distance R from the Target c from sibling nodes SearchKNeighbors(Current anotherChild , k, Target, Stack, PriorityQue) function and return to step 2.3; Step 2.5, get the partition dimension information SD reserved in the current node Current, calculate the distance dis between the current node Current and the Target SD dimension SD = |Current SD -Target SD |, if dis SD < R c , execute step 2.6; Step 2.6, when |PriorityQue|==k, compare the distance between the current node Current and the top node in PriorityQue to the distance between the Target node, if the current node Current is closer to the Target node, remove the top node in PriorityQue and place the current node Current into PriorityQue and return to step 2.3, otherwise, do nothing and return to step 2.3; when |PriorityQue|<k, place the current node Current into PriorityQue and update the farthest distance R between the candidate nodes in PriorityQue to the Target c , then execute the SearchKNeighbors(Current anotherChild ,k,Target,Stack,PriorityQue) function from the sibling node and return to step 2.

3.

5. The MDLOF anomalous track detection method based on KD-tree structure according to claim 1, characterized in that, The step 3 comprises the following steps: Step 3.1, compute the current track TR by means of the formula (1) for the track point P in the current track TR i A j B A B the multi-factor distance mfdist(P​​​​​ In formula (1), mfdist(P A ,P B ) is a multi-factor distance combining the position, velocity, and heading between track point P A and track point P B ; and are the velocities of track point P A and track point P B ; and are the headings of track point P A and waypoint P B heading; waypoint P A Euclidean distance of the velocity feature from waypoint P B waypoint P Euclidean distance of the heading feature from waypoint P A waypoint P B ω d is a weight factor for the position feature; ω v is a weight factor for the velocity feature; ω θ is a weight factor for the heading feature; ω d , ω v , ω θ must satisfy the following conditions: ω d ≥0 ω v ≥0 ω θ ≥0 ω d +ω v +ω θ =1 Step 3.

2. Compute the multi-factor directed Hausdorff distance δ A (TR B , TR i ) between the current track TR j and the nearest neighbor track TR M by formula (2) using the multi-factor distance mfdist(P i , P j ) from Step 3.

1. In formula (2), the multi-factor directed Hausdorff distance δ M (TR i , TR j ) represents the degree of similarity between the current track TR i and the nearest neighbor track TR j ; Step 3.

3. Calculate the multi-factor oriented Hausdorff distance δk(TR M , TR i ) for the track multi-factor kth nearest neighbor boundary distance δk(TR j , TR Mborder , TR i , k) using the multi-factor oriented Hausdorff distance δ in step 3.2, specifically comprising the following steps: Step 3.3.

1. Compute the set N(TR, k) of the k-nearest neighbors trajectories of the current trajectory TR by the multi-factor directed Hausdorff distance of formula (3) i i Step 3.3.

1. Compute the set N(TR, k) of the k-nearest neighbors trajectories of the current trajectory TR by the multi-factor directed Hausdorff distance of formula (3)​ N(TR i ,k) = {TR j ∈ TD{TR≠ TR i}|δ M (TR i , TR j ) ≤ δ Mborder (TR i ,k)}, |N(TR i ,k)| ≥ k Equation (3) In formula (3), |N(TR i k) | represents the number of tracks in the set and is not less than k; Step 3.3.

2. Compute the current track TR i 's k-nearest neighbors set N(TR i ,k) of k tracks in the set of all tracks T i with the multi-factor directed Hausdorff distance δ M (TR i ,TR j ) of the current track TR i ; NN(TR i ,k) = argmax(δ M (TR i , TR j )), TR j ∈ N(TR i ,k) Equation (4) Step 3.3.3: Using equation (5), utilize the maximum track NN(TR) from step 3.3.

2. i ,k) Calculate δ Mborder (TR i ,k); δ Mborder (TR i ,k) = δ M (TR i ,NN(TR i ,k)) Equation (5) In formula (5), δ Mborder (TR i k) is the kth nearest neighbor boundary distance of the track multi-factor.

6. The MDLOF anomalous track detection method based on KD-tree structure according to claim 1, characterized in that, The step 4 comprises the following steps: Step 4.1, compute the current track TR by formula (6) i to the nearest neighbor track TR j of multi-factor reachable distance δ Mreach (TR i , TR j , k); δ Mreach (TR i ,TR j ,k) = max{δ Mborder (TR j ,k), δ M (TR j ,TR i )} Equation (6) Step 4.2, compute the current track TR by means of formula (7) i the density of the neighbors of TR i , k):

7. A system for MDLOF anomaly track detection based on KD-tree structure according to any one of claims 1-6, characterized in that, It comprises: The KD tree module is divided into two parts of construction and query. The construction part utilizes a multi-dimensional track data set TD={TR1, TR2,..., TR n} to construct a KD tree to generate a KD tree structure. The query part queries k nearest neighbor tracks of a current track through the KD tree structure generated by the construction part to generate a set of k nearest neighbor tracks of the current track. Anomaly detection module: used for judging abnormal trajectories, obtaining the nearest neighbor trajectories of the target trajectory through the query function provided by the KD tree module, providing support for subsequent calculation of the size of the multi-dimensional local outlier factor corresponding to the real-time trajectory, and finally obtaining the judgment result by comparing with the abnormal threshold; Data preprocessing module: through data cleaning of the historical multi-dimensional trajectory data set, removing trajectories with uneven time intervals and missing key data, forming a multi-dimensional trajectory data set for constructing a KD tree.

8. An MDL OF anomalous track detection device based on KD-tree structure, characterized by, It comprises: Memory: used for storing the computer program for implementing the MDLOF abnormal trajectory detection method based on the KD tree structure according to any one of claims 1-6; Processor: used to execute the computer program to realize the KD tree structure based MDLOF abnormal track detection method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the steps of the KD tree structure based MDLOF abnormal track detection method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Target abnormal behavior detection method based multidimensional characteristics

    CN106022372A