An efficient anomaly identification method on sparse trajectory data

By constructing a hierarchical pattern tree and a fast matching algorithm on sparse trajectory data, the problem of excessively long running time of existing traffic incident detection algorithms is solved, achieving efficient traffic incident detection. This enables real-time processing of large amounts of data on urban roads while reducing computational costs.

CN118228164BActive Publication Date: 2026-02-06NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311839706.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2026-02-06
Estimated Expiration
2043-12-28

AI Technical Summary

Technical Problem

Existing traffic incident detection algorithms take too long to run on sparse trajectory data, cannot process all available data in real time, have high computational costs, and are difficult to apply effectively on urban roads.

Method used

A hierarchical pattern tree and a fast matching algorithm are adopted. By constructing a hierarchical pattern tree to compress event patterns, a min-heap is used to maintain the lower and upper bounds of nodes for fast matching, and the calculation is stopped in advance, reducing the average detection time and computational cost.

Benefits of technology

It accelerates the computational efficiency of traffic incident detection algorithms, enabling real-time processing of large amounts of trajectory data on urban roads, achieving immediate response, and reducing computational costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118228164B_ABST
    Figure CN118228164B_ABST
Patent Text Reader

Abstract

The embodiment of the present disclosure relates to an efficient anomaly identification method on sparse trajectory data. The method comprises: constructing a hierarchical pattern tree based on all event patterns by using a first algorithm; and calculating whether a trajectory pattern of a traffic trajectory T matches any event pattern based on the hierarchical pattern tree by using a second algorithm. The embodiment of the present disclosure compresses event patterns behind events by using a hierarchical pattern tree method. When checking whether an upcoming traffic trajectory is related to an event pattern, the calculation can be stopped in advance according to the hierarchical pattern tree. The MTTD time of FDM is reduced by constructing a hierarchical pattern tree and fast matching, and the cost of calculation is reduced. The calculation efficiency of the accelerated FDM is high, a large amount of trajectory data can be effectively processed, and an instant response can be made in real time.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present disclosure relate to the technical field of traffic incident detection, and in particular, to an efficient anomaly identification method on sparse trajectory data. BACKGROUND

[0002] Advances in traffic data collection technologies (e.g., loop sensors, road detectors, Global Positioning System (GPS), and closed-circuit television cameras) have provided a large amount of Big Traffic Data (BTD) in real time. These data (e.g., road traffic conditions, vehicle locations, speeds, pedestrian information, etc.) support urban computing applications (e.g., self-driving cars, intelligent navigation, intelligent traffic light control, and air pollution reduction, etc.) that aim to improve traffic conditions and the quality of life for citizens. One fundamental problem with BTD is the automatic discovery of incidents (e.g., roadblocks and traffic incidents). In particular, many incident detection (ID) algorithms have been proposed to mine and machine-learn BTD to identify anomalous traffic states so that appropriate actions can be taken. For most of the existing identification algorithms, it is usually assumed that the underlying traffic data is dense, i.e., there are a large number of traffic data (e.g., vehicle locations) for each road. This is a reasonable assumption for highways, as fixed devices such as road detectors and closed-circuit television cameras are installed on highways to periodically obtain traffic information. In fact, most experiments of existing ID solutions are conducted on highways. However, it is doubtful whether these solutions are effective on urban roads (i.e., urban roads with many adjacent intersections and traffic signals), because on urban roads, road detectors can be rare.

[0003] In this case, a ID detection algorithm on sparse traffic data, i.e., a Filter-Discover-Match (FDM) algorithm, is proposed to detect relevant incidents through the provided GPS data. This approach is inspired by an insight in the traffic community that the motion history (or trajectory) of a vehicle can be used to derive a speed pattern (i.e., observations of vehicle speed over time). It is found that a vehicle will first reduce its speed after passing an incident location, and then maintain this speed for a certain period of time, and finally increase its speed. The detection algorithm is based on this finding, and is performed by comparing incident speed vectors and normal speed vectors to discover incident patterns. For each incident speed vector and normal speed vector, a candidate speed pattern can be derived by computing the speed difference for each road segment. Next, all these candidate speed patterns are clustered. Each center of the clustering is an incident pattern. If the pattern of a speed vector of a real-time trajectory is close to a discovered incident pattern, an alarm is triggered.

[0004] In the above-mentioned algorithms, the mean time to detect (MTTD) measures the time between the occurrence of an event and the detection of the event by the ID algorithm. This includes the time needed to obtain all necessary data and the actual running of the ID algorithm. If one focuses on a single event, one often has to wait for several minutes until the observed vehicle produces enough data to successfully detect the event. In contrast, the running of the ID algorithm often takes only a few seconds. From this perspective, one might argue that the running time of the ID algorithm has a low priority because the MTTD is mainly determined by the waiting time for obtaining all necessary data. However, this is only the case if one focuses on detecting a single event. In fact, as soon as one wants to continuously observe a large road network, the running time of the ID algorithm becomes an important factor. If the running time of the algorithm is too slow, it can not be possible to process all available data in real time. Since FDM requires a large amount of analysis of trajectory data, the computational cost of such a solution can be quite high. SUMMARY

[0005] In order to avoid the shortcomings of the prior art, the present application provides an efficient anomaly identification method on sparse trajectory data, which solves the problem that the running time of the algorithm is too slow in the prior art, and all available data cannot be processed in real time.

[0006] According to the embodiments of the present disclosure, an efficient anomaly identification method on sparse trajectory data is provided, which comprises:

[0007] Step S1: based on all event patterns, a hierarchical pattern tree is constructed by using a first algorithm;

[0008] Step S1.1: if the count value of the current detection is equal to the total number of dimensions , the current recursion returns;

[0009] Step S1.2: otherwise, the next best dimension is obtained;

[0010] Step S1.3: using a partitioning method, the -th dimension is partitioned with a relaxation factor ;

[0011] Step S1.4: for the -th dimension, if the -th dimension range of an event pattern added in a group of patterns is within the range of the relaxation factor , the event pattern is added in the pattern ;

[0012] Step S1.5: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] Set as a list of partition sets, the list contains event patterns from the same partition. ID;

[0013] Step S1.6: According to Each element in Create child nodes, and recursively build tree nodes on the child nodes. ;

[0014] Step S1.7: Based on tree nodes Start the next recursion and add the tree nodes in the current iteration. The child nodes are set to ;

[0015] Step S2: Based on the hierarchical pattern tree, calculate the traffic trajectory using the second algorithm. T trajectory pattern Is it related to any event pattern? match;

[0016] Step S2.1: Initialize the min-heap Calculate the lower and upper bounds of the root node, and push the root node and its lower bound into a min-heap. ;

[0017] Step S2.2: Process the min-heap The nodes in the heap, up to the min-heap. Empty;

[0018] Step S2.3: In each iteration, according to the min-heap... The smallest node that pops the lower bound. And use a lower bound check to see if the matching process can be terminated if it returns false;

[0019] Step S2.4: If the smallest node If it is a non-leaf node, then calculate the minimum node. The lower and upper bounds of each child node; if the lower bound is less than the first threshold... Then push the child node into the min-heap. ;

[0020] Step S2.5: If the smallest node If it is a leaf node, then the process is stopped if the upper bound returns true.

[0021] Step S2.6: If not, calculate the traffic trajectory. T trajectory pattern with minimum node Calculate the distance between each event pattern and check if the distance is less than a first threshold. ;

[0022] Step S2.7: If a min-heap is used If all nodes have been processed and the process has not terminated, then return false.

[0023] Furthermore, step S1.6 includes:

[0024] Based on each element Calculate its minimum value and maximum value ;

[0025] Based on the minimum value and maximum value , construct child nodes.

[0026] Furthermore, each dimension Distributed score for:

[0027] (1)

[0028] in, It is a dimension The number of splits in the middle, It is a dimension The first in Sub-splitting yes The The average value of the splits. It belongs to The The size of the sub-split pattern, It is a penalty factor when splitting a large number of parts. calculate Fluctuations in the middle pattern.

[0029] Furthermore, the steps for calculating the lower bound of each child node of the minimum node include:

[0030] When calculating the distance between patterns, the different dimensions are independent of each other:

[0031] (2)

[0032] (3)

[0033] in, Right now This is an event-driven pattern. For trajectory mode The j dimension, for event patterns of the j first dimension;

[0034] The lower bound of the distance between a trajectory pattern and a pattern on the subtree rooted at the current node is recursively defined as:

[0035] (4)

[0036] where i.e. , is the lower bound of the distance between a trajectory pattern and a pattern in the subtree rooted at denotes the parent node of the current node ; since the root node has no parent, we set ;

[0037] When matching a trajectory pattern by traversing the tree, a min-heap is used to maintain the nodes and their lower bounds as keys.

[0038] If the minimum value maintained in the min-heap is greater than or equal to the first threshold , no event pattern will be matched, i.e., the matching process is safely stopped in advance.

[0039] Further, the step of calculating the upper bound of each child node of the minimum node comprises:

[0040] Calculating the upper bound of the distance between a trajectory pattern and a pattern on the subtree rooted at the current node , which is related to the previous dimension, i.e., let be located at the layer of the tree, then the upper bound is recursively defined as follows:

[0041] (5)

[0042] where i.e. , is the upper bound of the distance between a trajectory pattern and a pattern in the subtree rooted at

[0043] The trajectory pattern of a traffic trajectory and each event pattern on the subtree rooted at the node ​​​​​​​​​​​​the distance between the trajectory and the event pattern, i.e. , satisfies the following condition:

[0044] (6)

[0045] wherein, i.e. the trajectory pattern , i.e. the event pattern ;

[0046] if the upper bound of the leaf node is less than the first threshold , the matching process is safely stopped, i.e. the distance between the trajectory and all event patterns in the leaf node is less than the first threshold .

[0047] The technical solutions provided by the embodiments of the present disclosure can include the following beneficial effects:

[0048] In the embodiments of the present disclosure, through the above-mentioned efficient anomaly identification method on sparse trajectory data, on the one hand, the event pattern behind the event is compressed through the hierarchical pattern tree method. When checking whether the upcoming traffic trajectory is related to the event pattern, the calculation can be stopped in advance according to the hierarchical pattern tree. On the other hand, through the way of constructing the hierarchical pattern tree and fast matching, the MTTD time of FDM is reduced, and the cost of calculation is reduced. The calculation efficiency of the accelerated FDM is very high, which can effectively process a large amount of trajectory data and make an instant response in real time. BRIEF DESCRIPTION OF DRAWINGS

[0049] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure. It is apparent that the accompanying drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.

[0050] Figure 1 FIG. 1 shows a step diagram of an efficient anomaly identification method on sparse trajectory data in an exemplary embodiment of the present disclosure;

[0051] Figure 2 FIG. 2 shows a general architecture diagram of the FDM algorithm in an exemplary embodiment of the present disclosure;

[0052] Figure 3 FIG. 3 shows a schematic diagram of the hierarchical pattern tree in an exemplary embodiment of the present disclosure; Figure 3 (a) is an event pattern from a to e; Figure 3 (b) is a structural schematic diagram of the hierarchical pattern tree;

[0053] Figure 4The diagram illustrates the results of efficiency evaluation of the relaxation factor in the first and second datasets, respectively, in an exemplary embodiment of this disclosure. Figure 4 (a) shows the performance of the FDM algorithm with varying relaxation factors on the first dataset; Figure 4 (b) shows the performance of the FDM algorithm with varying relaxation factors on the second dataset; Figure 4 (c) is a comparison of the efficiency evaluation of the FDM algorithm with other algorithms on the first dataset; Figure 4 (d) is a comparison of the efficiency evaluation of the FDM algorithm with other algorithms on the second dataset;

[0054] Figure 5 The diagram shows a comparison of DR score, FAR score and F1 score after performance evaluation based on the number of different event patterns k, velocity vector dimension m, first threshold and second threshold in the first and second datasets respectively. Figure 5 (a) is a comparison of DR score, FAR score and F1 score after performance evaluation based on the number of event patterns k in the first dataset; Figure 5 (b) is a comparison chart of DR score, FAR score and F1 score after performance evaluation based on velocity vector dimension m in the first dataset; Figure 5 (c) is a comparison chart of DR score, FAR score and F1 score after evaluating the effect based on the number of event patterns k in the second dataset; Figure 5 (d) is a comparison chart of DR score, FAR score and F1 score after evaluating the effect according to the velocity vector dimension m in the second dataset; Figure 5 (e) is a comparison chart of DR score, FAR score and F1 score after performance evaluation based on the second threshold in the first dataset; Figure 5 (f) is a comparison chart of DR score, FAR score and F1 score after performance evaluation based on the first threshold in the first dataset; Figure 5 (g) is a comparison chart of DR score, FAR score and F1 score after performance evaluation based on the second threshold in the second dataset; Figure 5 (h) is a comparison chart of DR score, FAR score and F1 score after performance evaluation based on the first threshold in the second dataset;

[0055] Figure 6 This illustrates exemplary embodiments of the present disclosure, with the following: under the first dataset and the second dataset, respectively... A comparison chart showing the evaluation based on the increase of the sparsity coefficient and the evaluation based on the increase of the sparsity coefficient; Figure 6 (a) For the first dataset, as The graph shows the increase in F1 scores for the FDM algorithm compared to other methods; Figure 6 (b) For the first dataset, as The increase in DR scores for the FDM algorithm compared to other methods is shown in the graph. Figure 6 (c) represents the situation in the first dataset, as... The graph shows a comparison of FAR scores between the FDM algorithm and other methods, with the increase in FAR scores. Figure 6 (d) represents the situation in the first dataset, as... The graph shows the comparison of MTTD scores between the FDM algorithm and other methods as the number of MTTDs increases. Figure 6 (e) represents the situation in the second dataset, as... The graph shows the increase in F1 scores for the FDM algorithm compared to other methods; Figure 6 (f) represents the situation in the second dataset, as... The increase in DR scores for the FDM algorithm compared to other methods is shown in the graph. Figure 6 (g) represents the situation in the second dataset, where... The graph shows a comparison of FAR scores between the FDM algorithm and other methods, with the increase in FAR scores. Figure 6 (h) represents the situation in the second dataset, as... The graph shows the comparison of MTTD scores between the FDM algorithm and other methods as the number of MTTDs increases. Figure 6 (i) is a comparison of the F1 scores of the FDM algorithm with other methods as the sparsity coefficient increases on the first dataset; Figure 6 (j) is a comparison of the DR scores of the FDM algorithm and other methods as the sparsity coefficient increases in the first dataset; Figure 6 (k) represents the sparsity coefficient as the number of data points increases in the first dataset. The graph shows a comparison of FAR scores between the FDM algorithm and other methods, with the increase in FAR scores. Figure 6 (l) is a comparison of the MTTD scores of the FDM algorithm and other methods as the sparsity coefficient increases in the first dataset; Figure 6 (m) is a comparison of the F1 scores of the FDM algorithm with other methods as the sparsity coefficient increases on the second dataset; Figure 1 (n) is a comparison of the DR scores of the FDM algorithm and other methods as the sparsity coefficient increases in the second dataset; Figures 1 to 6 (o) represents the effect of increasing sparsity coefficient on the second dataset. The graph shows a comparison of FAR scores between the FDM algorithm and other methods, with the increase in FAR scores. Figure 2 (p) is a comparison of the MTTD scores of the FDM algorithm and other methods as the sparsity coefficient increases on the second dataset. Detailed Implementation

[0056] Example implementations will now be described more fully with reference to the accompanying drawings. Example implementations can be implemented in any

[0057] Additionally, the drawings are to be read with reference to the claims. Deciduous of the drawings accompany the written description as a part of the disclosure of one or more embodiments. However, the drawings can not include all of the features of the products, methods, systems, and / or apparatuses of other embodiments. Some

[0058] An efficient anomaly identification method on sparse trajectory data is provided in the example implementation. Referring to FIG. 1, the efficient anomaly identification method on sparse trajectory data can include steps S1-S2. Figure 3

[0059] Step S1: Construct a hierarchical pattern tree using a first algorithm based on all event patterns;

[0060] Step S1.1: If the count value of the current detection is equal to the total number of dimensions , the current recursion returns;

[0061] Step S1.2: Otherwise, obtain the next best dimension ;

[0062] Step S1.3: Use a partitioning method to partition the -th dimension with a relaxation factor ;

[0063] Step S1.4: For the -th dimension, if adding an event pattern to a set of patterns has its -th dimension range within the relaxation factor , add the event pattern to the pattern ;

[0064] Step S1.5: Set to a list of partitions, which contains the IDs of event patterns in the same partition;

[0065] Step S1.6: According to each element in ,​​​ , create a child node and recursively build the tree node on the child node ;

[0066] Step S1.7: Start the next recursion with the tree node and set the child node of the tree node of the current iteration to ;

[0067] Step S2: Compute the trajectory pattern T of the traffic trajectory based on the hierarchical pattern tree using a second algorithm and check whether the trajectory pattern matches any of the event patterns ;

[0068] Step S2.1: Initialize a min-heap , compute the lower and upper bounds of the root node and push the root node and its lower bound into the min-heap ;

[0069] Step S2.2: Process the nodes in the min-heap until the min-heap is empty;

[0070] Step S2.3: In each iteration, pop the minimum node with the lower bound from the min-heap and check whether the matching process can be terminated with returning false using the lower bound;

[0071] Step S2.4: If the minimum node is a non-leaf node, compute the lower and upper bounds of each child node of the minimum node and push the child node into the min-heap if the lower bound is less than the first threshold ;

[0072] Step S2.5: If the minimum node is a leaf node, check whether the process can be stopped with returning true using the upper bound;

[0073] Step S2.6: If not, compute the distance between the trajectory pattern T of the traffic trajectory and each event pattern in the minimum node and check whether the distance is less than the first threshold ;

[0074] Step S2.7: If all nodes in the min-heap have been processed and the process has not been terminated, return false.

[0075] By the above efficient anomaly detection method on sparse trajectory data, on the one hand, the event pattern behind the event is compressed by the hierarchical pattern tree method. When checking whether the upcoming traffic trajectory is related to the event pattern, the calculation can be stopped in advance according to the hierarchical pattern tree. On the other hand, the MTTD time of FDM is reduced by constructing the hierarchical pattern tree and the fast matching method, and the cost of calculation is reduced. The calculation efficiency of the accelerated FDM is very high, which can effectively process a large amount of trajectory data and can make an instant response to real-time.

[0076] In the following, the above efficient anomaly detection method on sparse trajectory data in the present example embodiment will be described in more detail with reference to Figure 3 The above efficient anomaly detection method on sparse trajectory data in the present example embodiment will be described in more detail with reference to

[0077] In one embodiment, problem definition is first performed.

[0078] A GPS device continuously tracks its location. Due to technical limitations, the GPS location can only be tracked with discrete timestamps, so only a limited number of GPS points can be used to approximate the GPS trajectory. Given the number of vehicles tracked in the online phase and the number of accident patterns discovered in the offline phase, the accident detection algorithm must perform checks to match all trajectories, i.e., one check for each pattern of each trajectory. However and may be large, and an inefficient matching algorithm would significantly slow down the online phase. For example, in the traffic data of a certain city, due to the complex traffic conditions, the value of may reach 762000, the value of may reach several hundred. In a powerful server, it takes several minutes to match trajectories with event patterns. Since the trajectories collected from vehicles are analyzed in real time, the speed of the matching algorithm should be within a few seconds so that accidents can be detected as quickly as possible. More efficient online ID detection is needed to reduce the related calculation cost.

[0079] Some basic definitions are shown in Table 1:

[0080] Table 1

[0081]

[0082] The overall architecture of FDM is shown in Figure 3As shown, this application proposes an accurate and fast pattern matching algorithm (i.e., an efficient anomaly identification method on sparse trajectory data) to accelerate online pattern matching. It mainly consists of two parts: the first part is the construction of a hierarchical pattern tree, and the second part is the fast matching algorithm.

[0083] Construction of a hierarchical pattern tree:

[0084] There are some common prefixes among the discovered event patterns, so a novel hierarchical pattern tree was developed to further accelerate the matching process. The hierarchical pattern tree organizes event patterns according to dimensional similarity, as shown in Figure 3. Figure 4 The middle left side is Figure 4 (a) is from arrive The event pattern, the right side is Figure 4 (b) is the corresponding hierarchical pattern tree, whose boundary rectangle Represented as [ Each node contains a set of event patterns and a bounding rectangle. exist -th dimension The smallest and maximum value .For example, This indicates that nodes are divided according to the value of the second dimension. Since the values ​​of one dimension are not entirely identical in the event pattern, a relaxation factor is introduced here. As long as the one-dimensional differences in certain event patterns are within... Within the specified range, they are grouped into a bounding rectangle. For example, patterns The three-dimensional values ​​are 0.7 and 0.75, respectively. If It is 0.06, then They belong to the same branch because their value difference is 0.05, which is less than... So the minimum value Equals 0.7, maximum value It equals 0.75.

[0085] Reordering the dimensions: Some dimensions exhibit more pronounced fluctuations in event patterns than others. If we could first arrange the trajectories... pattern Comparing event patterns with those that fluctuate significantly across these dimensions increases the chance of stopping computation earlier. Therefore, it is further recommended to rearrange the dimensions of event patterns when constructing the hierarchical pattern tree.

[0086] The aim is to prioritize dimensions with higher variability during pattern matching. Another intuitive approach is to minimize the number of splits along each dimension to reduce computational overhead. The main idea is as follows:

[0087] 1. When constructing a pattern tree, the dimension with greater fluctuation should be selected first, followed by the dimension with less fluctuation.

[0088] 2. Multiple splits in a single dimension should be penalized.

[0089] To achieve a better ranking of dimensions, each dimension is ranked according to the following formula. Distribute scores :

[0090] (1)

[0091] in It is a dimension The number of splits in the middle, It is a dimension The first in Sub-splitting yes The The average value of the splits. It belongs to The The size of the sub-split pattern, It is a penalty factor when there are a large number of splits. calculate Fluctuations in the model. Because negative values ​​exist in the model values, absolute values ​​are used to assess fluctuations. The larger the value, the greater the fluctuation in the velocity pattern, because if the velocity vector remains close to the normal velocity vector, It should be close to zero. Utilizing... The hierarchical pattern tree is constructed using the dimensional order of the sorting, and... Indicates the reordered Dimension.

[0092] Algorithm 1 (i.e., the first algorithm) demonstrates the detailed process of constructing a hierarchical pattern tree, which is a recursive algorithm. If... Equal to the total number of dimensions If the current recursion returns (line 2), then the next optimal dimension is found using formula (1). Then, a segmentation method is applied, using factors... segmentation -th dimension. For -th dimension, if in a set of patterns Add a mode of -th dimension range Within the range, then it is within Add Then, Set as a list of partition sets, containing the IDs of event patterns within the same partition (line 4). For Each element in Each of these operations creates child nodes, and the tree is recursively built on these child nodes (lines 5-11). Specifically, for each element... Calculate its minimum value and maximum value (Line 9). Finally, based on the tree nodes... Begin the next recursion (line 10), and set the child nodes of the current iteration node to... (Line 11).

[0093]

[0094] in, p This is the currently traversed node. m The total number of dimensions, S index This is the set of IDs for the event patterns of the current node. S sub A collection (i.e., a list) of events partitioned by the event IDs of the current node. P a A matrix of event patterns. As a relaxation factor, m oi The optimal dimension selected when generating child nodes for the current node.

[0095] Understandably, the hierarchical pattern tree can be built offline because all event patterns can be obtained from historical traffic data. This does not incur any cost during the online matching process, as the hierarchical pattern tree can be obtained before online matching.

[0096] Fast matching algorithm (i.e., the second algorithm)

[0097] This will explain how to efficiently check the trajectory. pattern Can it be matched with a certain event pattern maintained in the hierarchical pattern tree?

[0098] The first step, since accidents rarely occur in the real world, is to use a second threshold. According to the velocity vector and The distance between them is used to trim a trajectory that closely resembles the path under normal traffic conditions. Only when the distance is greater than or equal to... The trajectories that pass the pruning step are considered for further study. After pruning, only patterns need to be checked, where .

[0099] For each pattern that passes the first step, it needs to be checked whether it can match some event pattern in the hierarchical pattern tree. To avoid traversing the whole tree, the lower and upper bounds of the distance between the pattern and the patterns stored in the current subtree are maintained during the traversal. Before discussing how to use the lower and upper bounds to stop early, the calculation and maintenance of the lower and upper bounds are introduced first.

[0100] Lower bound: According to Equation 2, the distance between two patterns is calculated independently in different dimensions:

[0101] (2)

[0102] (3)

[0103] At the same time, each layer of the hierarchical pattern tree only considers one dimension. Therefore, the lower bound of the distance between the pattern and the patterns in the subtree rooted at the current node can be defined recursively as:

[0104] (4)

[0105] where (i.e. ) is the lower bound of the distance between and the patterns in the subtree rooted at (i.e. ). Note that denotes the parent node of the current node . Since the root node has no parent, we set .

[0106] When traversing the tree to match , a min-heap can be used to maintain the nodes to be explored, with their lower bounds as the keys. If the minimum value maintained in the min-heap has already exceeded or equal to , no event pattern will be matched. In this case, the matching process can be stopped early safely.

[0107] Upper bound: Similarly, the upper bound of the distance between and the patterns in the subtree rooted at , which is related to the previous dimensions (assuming is located at the (layer). Therefore, the upper bound can be recursively defined as follows:

[0108]

[0109] in (Right now )yes With (Right now The distance between patterns in the subtree rooted at ) is relative to the previous The upper limit of the dimension. Similarly, setting... .

[0110] The pattern of the test trajectory can be derived. With nodes Each event pattern in the rooted subtree The distance between them, i.e. It meets the following conditions:

[0111]

[0112] Please note that the upper bound is only used when traversing to a leaf node, because by this point, the upper bound has already factored in all dimensions. If the upper bound of a leaf node is less than the first threshold... Then the matching process can be safely stopped because The distance to all patterns in the leaf nodes is less than .

[0113] Based on the pruning techniques using lower and upper bounds described above, an efficient matching algorithm is proposed, detailed in Algorithm 2. First, a min-heap is initialized. (Line 1) Calculate the lower and upper bounds of the root node (lines 2-3), then push the root node and its lower bound onto the heap (line 4). Next, continue processing the nodes in the heap until... Empty (lines 5-22). In each iteration, it will start from... Pop the node with the smallest lower bound. (Line 6), and uses a lower bound to check if the matching process can be terminated if it returns false (Line 7). If If it is a non-leaf node, then calculate The lower and upper bounds of each child node, if the lower bound is less than... Then push the child node onto the heap. (Lines 9-12). If Since it's a leaf node, first use the upper bound to see if the process can be stopped if it returns true (line 14). If not, then calculate... and distance between each event pattern (lines 16-19), and check whether the distance is less than the threshold (line 20). If all the nodes in the pattern tree have been processed and the process has not terminated, false is returned because no pattern can match .

[0114] The algorithm based on the hierarchical pattern tree is an exact solution to speed up the matching process. The lower bound (formula 4) and the upper bound (formula 5) are used to safely reduce the computational cost and do not involve any approximation. Note that the relaxation factor is only used to determine the boundary range of the rectangle and does not introduce any error.

[0115] Comparison with KNN algorithm: The KNN-based algorithm always finds the nearest neighbor first and then checks the distance between the pattern of the test trajectory and the nearest neighbor. However, events rarely occur in the real world. Most of the time, the test trajectory is a normal trajectory, which has a considerable distance from the nearest neighbor in the event pattern, so it can be pruned in advance to save computational cost. Therefore, the algorithm of the present application is different from NN because the algorithm of the present application can prune earlier and does not need to find the nearest neighbor.

[0116] Complexity: The complexity of the fast matching is . In the worst case, it is . However, in practice, , , . As verified by the experiment below, it is efficient.

[0117]

[0118] The simulation experiment is further described below.

[0119] Data set:

[0120] Experiments were conducted on two GPS datasets. The first dataset (Cityl) consists of 35.1 gigabytes of trajectory data collected from 440 taxis in a city in 2010. The GPS positions were generated at a rate of about one position per 40 seconds. The city map of the city was obtained from OpenStreetMap. Event data in 2010 was also obtained from the transport bureau of the city. In these data, 4386 events were used, which are events that at least one taxi passed a specified road segment within a specified time window. The second dataset (City2) used the famous simulation software Simulation of Urban MObility (SUMO) to simulate GPS data and event data. SUMO is widely used in the field of traffic analysis. Following the same setup as in "Traffic State Estimation", GPS data and event data were simulated in a city map containing all roads within the second ring road of a city. 5000 event data and 4.41 gigabytes of GPS data were simulated.

[0121] In addition to event instances, non-event instances were also randomly selected - i.e. randomly selected locations in the road network that did not have an event within a given time - to balance the two datasets, with a ratio of 1:2.3 between event instances and non-event instances.

[0122] 1. Efficiency evaluation

[0123] Figure 4 (b) and (d) evaluated the efficiency of Annoy (AN), fastmatch (FM method described above) proposed in this application, and match (M), which is the basic method described in the background art without the acceleration algorithm, without any efficiency improvement. Annoy (AN) has been recognized as one of the best nearest neighbor (NN) libraries. According to the estimation of the first real dataset, the number ratio of event speed patterns to normal speed patterns is 1:100000. The number of event patterns is 200, and the size of the sliding window is 20. Figure 4 The average running time in milliseconds is shown for one speed pattern. The execution time of FM is much lower than that of AN. This verifies that FM is more efficient than AN, which is a NN-based algorithm. In addition, in the second dataset, FM is 48.1 times faster than M; in the first dataset, FM is 28.5 times faster than M. Note that FM is an exact algorithm, which means that changing the relaxation factor will not affect the effectiveness of the algorithm.

[0124] The performance of the fast matching algorithm when changing the relaxation factor Figure 4 is illustrated in (a) and (c). As can be seen, the running time of FM is almost constant when the relaxation factor​Figure 4 As shown, when increasing When this happens, the execution time will decrease. Therefore, the execution time can be shortened. For example, in In the dataset, when When the value was increased from 0 to 1.2, the execution time decreased by 44.11%.

[0125] Figure 4 (a) shows the performance of the FDM algorithm with varying relaxation factors on the first dataset; Figure 5 (b) shows the performance of the FDM algorithm with varying relaxation factors on the second dataset; Figure 5 (c) is a comparison of the efficiency evaluation of the FDM algorithm with other algorithms on the first dataset; Figure 5 (d) is a comparison of the efficiency evaluation of the FDM algorithm with other algorithms on the second dataset.

[0126] like Figure 5 The figure shows the effect evaluation of the first and second real datasets based on the number of event patterns k, the velocity vector dimension m, the first threshold and the second threshold. Figure 5 (a) is a comparison of DR score, FAR score and F1 score after performance evaluation based on the number of event patterns k in the first dataset; Figure 5 (b) is a comparison chart of DR score, FAR score and F1 score after performance evaluation based on velocity vector dimension m in the first dataset; Figure 5 (c) is a comparison chart of DR score, FAR score and F1 score after evaluating the effect based on the number of event patterns k in the second dataset; Figure 5 (d) is a comparison chart of DR score, FAR score and F1 score after evaluating the effect according to the velocity vector dimension m in the second dataset; Figure 5 (e) is a comparison chart of DR score, FAR score and F1 score after performance evaluation based on the second threshold in the first dataset; Figure 6 (f) is a comparison chart of DR score, FAR score and F1 score after performance evaluation based on the first threshold in the first dataset; Figure 6 (g) is a comparison chart of DR score, FAR score and F1 score after performance evaluation based on the second threshold in the second dataset; Figure 6 (h) is a comparison chart of DR score, FAR score and F1 score after performance evaluation based on the first threshold in the second dataset.

[0127] 2. Evaluation at different sparsity levels

[0128] To evaluate its effectiveness in terms of sparsity, different subsets are drawn from two datasets to obtain datasets with different sparsity coefficients. Then, the performance of our method and competitors is evaluated on datasets with different sparsity coefficients. The formal definitions are as follows:

[0129] Road network dataset This refers to the time window No vehicles passed through the section of road. The percentage of cases that are as described above.

[0130]

[0131] in, ( ) represents the first Each section of road, ( )represent and Between the first A time window. It is a Boolean variable representing the time window. Did at least one vehicle pass through the section of road during that period? .also, It is an indicator function, if If the value is 1, then the function evaluates to 1; otherwise, it evaluates to 0. It is a section of road The total number, It is a time window The total number. The effect of the sparsity coefficient on... Figure 6 The evaluation was conducted in (ip). In the dataset, although SVMN and NNA achieved better DR scores, their FAR scores were significantly higher than those of the FDM method in this application, and their F1 scores were quite low. It can be seen that when the sparsity of the dataset increases (the sparsity coefficient increases from 50% to 80%), the FDM method in this application still outperforms other competitors in terms of F1 score and achieves the best MTTD, and in ( )and( In the dataset, DR and FAR remain competitive. This demonstrates that trajectory-based methods have good tolerance for data sparsity in both spatial and temporal dimensions.

[0132] like Figure 6 As shown, Figure 6 (a) For the first dataset, as The graph shows the increase in F1 scores for the FDM algorithm compared to other methods; Figure 6 (b) For the first dataset, as The increase in DR scores for the FDM algorithm compared to other methods is shown in the graph. Figure 6 (c) represents the situation in the first dataset, as... The graph shows a comparison of FAR scores between the FDM algorithm and other methods, with the increase in FAR scores. Figure 6 (d) represents the situation in the first dataset, as... The graph shows the comparison of MTTD scores between the FDM algorithm and other methods as the number of MTTDs increases. Figure 6 (e) represents the situation in the second dataset, as... The graph shows the increase in F1 scores for the FDM algorithm compared to other methods; Figure 6 (f) represents the situation in the second dataset, as... The increase in DR scores for the FDM algorithm compared to other methods is shown in the graph. Figure 6 (g) represents the situation in the second dataset, where... The graph shows a comparison of FAR scores between the FDM algorithm and other methods, with the increase in FAR scores. Figure 6 (h) represents the situation in the second dataset, as... The graph shows the comparison of MTTD scores between the FDM algorithm and other methods as the number of MTTDs increases. Figure 6 (i) is a comparison of the F1 scores of the FDM algorithm with other methods as the sparsity coefficient increases on the first dataset; Figure 6 (j) is a comparison of the DR scores of the FDM algorithm and other methods as the sparsity coefficient increases in the first dataset; Figure 6 (k) represents the sparsity coefficient as the number of data points increases in the first dataset. The graph shows a comparison of FAR scores between the FDM algorithm and other methods, with the increase in FAR scores. ​ (l) is a comparison of the MTTD scores of the FDM algorithm and other methods as the sparsity coefficient increases in the first dataset; ​ (m) is a comparison of the F1 scores of the FDM algorithm with other methods as the sparsity coefficient increases on the second dataset; ​ (n) is a comparison of the DR scores of the FDM algorithm and other methods as the sparsity coefficient increases in the second dataset; ​ (o) represents the effect of increasing sparsity coefficient on the second dataset. The graph shows a comparison of FAR scores between the FDM algorithm and other methods, with the increase in FAR scores. ​ (p) shows a comparison of the MTTD scores of the FDM algorithm with other methods as the sparsity coefficient increases on the second dataset. The accelerated FDM is computationally efficient, on average 38 times faster than the original detection algorithm without acceleration. This accelerated algorithm can effectively process large amounts of trajectory data, which is crucial for making real-time responses.

[0133] Through the above efficient anomaly recognition method on sparse trajectory data, on the one hand, the event mode behind the event is compressed through the hierarchical pattern tree method. When checking whether the upcoming traffic trajectory is related to the event mode, the calculation can be stopped in advance according to the hierarchical pattern tree. On the other hand, the MTTD time of FDM is reduced by constructing the hierarchical pattern tree and the way of fast matching, and the cost of calculation is reduced. The calculation efficiency of the accelerated FDM is very high, which can effectively process a large amount of trajectory data and make an instant response in real time.

[0134] In addition, the terms "first", "second", "third", etc. are used herein only to describe various conditions, and should not be construed to indicate or imply relative importance or a required number of the indicated technical features. Thus, the features defined with "first", "second", etc. can explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, the meaning of "a plurality of" is two or more, unless otherwise explicitly and specifically limited.

[0135] In the description of the present specification, the description referring to the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific feature, structure, material or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In the present specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in the present specification.

[0136] Other embodiments of the present disclosure will be apparent to those skilled in the art after consideration of the specification and practice of the application disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present disclosure following the general principles thereof and including modifications and equivalents of the present disclosure that are obvious to those skilled in the art. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. An efficient anomaly identification method for sparse trajectory data, characterized in that, The method includes: Set up online phase tracking Vehicles and offline phases discovered One accident mode; Based on the FDM algorithm, event detection is performed using GPS data, and specific scenarios are defined for each trajectory. Perform a check on each pattern to match all Trajectories; wherein, the FDM method includes steps S1 to S2: Step S1: Based on all event patterns, construct a hierarchical pattern tree using the first algorithm; Step S1.1: If the current detected count value Equal to the total number of dimensions If so, the current recursion returns; Step S1.2: Otherwise, obtain the next optimal dimension. ; Step S1.3: Using a segmentation method with a relaxation factor segmentation -th dimension; Step S1.4: For -th dimension, if in a set of patterns Add an event pattern of -th dimension range in relaxation factor Within the range, then in the mode Add event patterns ; Step S1.5: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require Set as a list of partition sets, the list contains event patterns from the same partition. ID; Step S1.6: According to Each element in Create child nodes, and recursively build tree nodes on the child nodes. ; Step S1.7: Based on tree nodes Start the next recursion and add the tree nodes in the current iteration. The child nodes are set to ; Step S2: Based on the hierarchical pattern tree, calculate the traffic trajectory using the second algorithm. T trajectory pattern Is it related to any event pattern? match; Step S2.1: Initialize the min-heap Calculate the lower and upper bounds of the root node, and push the root node and its lower bound into a min-heap. ; Step S2.2: Process the min-heap The nodes in the heap, up to the min-heap. Empty; Step S2.3: In each iteration, according to the min-heap... The smallest node that pops the lower bound. And use a lower bound check to terminate the matching process if it returns false; Step S2.4: If the smallest node If it is a non-leaf node, then calculate the minimum node. The lower and upper bounds of each child node; if the lower bound is less than the first threshold... Then push the child node into the min-heap. ; Step S2.5: If the smallest node If it is a leaf node, then the process is stopped if the upper bound returns true. Step S2.6: If not, calculate the traffic trajectory. T trajectory pattern with minimum node Calculate the distance between each event pattern and check if the distance is less than a first threshold. ; Step S2.7: If a min-heap is used If all nodes have been processed and the process has not terminated, return false; If a match is found, it indicates that a traffic incident has occurred. If a match fails, it means there is no traffic event.

2. The efficient anomaly identification method for sparse trajectory data according to claim 1, characterized in that, Step S1.6 includes: Based on each element Calculate its minimum value and maximum value ; Based on the minimum value and maximum value , construct child nodes.

3. The efficient anomaly identification method for sparse trajectory data according to claim 2, characterized in that, Each dimension Distributed score for: (1) in, It is a dimension The number of splits in the middle, It is a dimension The first in Sub-splitting yes The The average value of the splits. It belongs to The The size of the sub-split pattern, It is a penalty factor when splitting a large number of times. calculate Fluctuations in the middle pattern.

4. The efficient anomaly identification method for sparse trajectory data according to claim 3, characterized in that, The steps to compute the lower bound of each child node of the minimum node include: When calculating the distance between patterns, the different dimensions are independent of each other: (2) (3) in, Right now This is an event-driven pattern. For trajectory mode The j dimension, For event pattern The j dimension; Track mode With the current node The lower bound of the distance between patterns in the subtree rooted at a given point is recursively defined as: (4) in, Right now , for trajectory mode With The lower bound of the distance between patterns in the root subtree. Indicates the current node The parent node; since the root node has no parent node, it is set. ; Matching trajectory patterns by traversing the tree When using a min-heap Maintain the node and use its lower bound as the critical value; If min-heap The minimum value maintained in the middle is greater than or equal to the first threshold. If no event pattern is matched, the matching process can be safely stopped early.

5. The efficient anomaly identification method for sparse trajectory data according to claim 4, characterized in that, The steps to compute the upper bound of each child node of the minimum node include: Calculate trajectory pattern With the root node The upper bound of the distance between patterns in the subtree, which is related to the previous... Dimensional related, that is, let Located in the tree If the layer is defined, then the upper bound is recursively defined as follows: (5) in, Right now , for trajectory mode With The distance between patterns in the rooted subtree relative to the previous one The upper limit of the dimension; since the root node has no parent node, it is set to... ; Traffic trajectory patterns and node-based Each event pattern in the rooted subtree The distance between them, i.e. It meets the following conditions: (6) in, Trajectory mode , Event pattern ; If the upper bound of the leaf node is less than the first threshold If so, the matching process can be safely stopped. The distance to all event patterns in the leaf nodes is less than the first threshold. .

Citation Information

Patent Citations

  • Method for identifying false traffic information in internet of vehicles

    CN104732237A

  • Stream processing-based mode updating method

    CN106570172A