ETC abnormal data rapid detection method based on improved DTW algorithm
By improving the DTW algorithm and multi-branch tree detection technology, the problems of missed and erroneous transactions in the highway ETC system have been solved, enabling rapid detection and labeling processing, and improving data quality and system efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FUJIAN UNIV OF TECH
- Filing Date
- 2023-03-13
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies are insufficient to effectively detect and handle missed and erroneous transactions in highway ETC systems, resulting in unknown data quality and impacting system efficiency and application value.
An improved DTW algorithm is adopted to convert ETC transaction data into vehicle trajectory sequences, calculate the matching similarity with gantry trajectory sequences, construct a dynamic matching window, identify abnormal trajectory points, and use anomaly feature recognition algorithms and multi-branch tree detection technology to quickly identify missed and erroneous transaction data.
It enables rapid detection and tagging of abnormal data in the highway ETC system, improving data quality and ensuring the accuracy of transaction data and system efficiency.
Smart Images

Figure CN116226684B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of highway management technology, and in particular to a rapid detection method for abnormal ETC data based on an improved DTW algorithm. Background Technology
[0002] At present, my country has built the world's largest electronic toll collection (ETC) system for highways, deploying more than 20,000 gantry devices on more than 160,000 kilometers of highways across the country. The number of ETC on-board units (OBU) exceeds 200 million, and the daily average number of ETC transaction data is nearly 1 billion [1]. ETC transaction data almost records the traffic conditions of vehicles on highways, and can be used for highway traffic flow prediction [2-3], travel time estimation [4-5], traffic demand visualization [6], etc., and is expected to provide important auxiliary decision-making information services for intelligent driving on highways.
[0003] However, due to equipment failures, large vehicle obstructions, and wireless crosstalk, the ETC system on highways inevitably experiences missed and erroneous transactions. Clearly, utilizing the ETC system to provide auxiliary decision-making information services for intelligent driving on highways requires strict control of the error rate and missing rate of ETC data. Accurate detection of these errors and missing data relies on the semantic structure of the trajectory. Trajectory anomaly detection, as a key issue in time-series data processing, is a research hotspot both domestically and internationally. The DTW (Dynamic Time Warping) algorithm, as a mainstream method for measuring trajectory similarity, has been widely studied and applied, such as in user similarity analysis [8-9], travel pattern analysis, and travel route recommendation. However, due to the massive volume of ETC transaction data and the lack of systematic data feature modeling, some provincial platforms have attempted to use mainstream algorithms such as DTW to determine the error rate and missing rate of daily ETC transaction data for highways across the province. However, these attempts have encountered a series of problems, including long processing times and low efficiency. Therefore, the quality of ETC transaction data for highways nationwide is currently largely unknown, severely impacting the efficiency of the highway ETC system and hindering the realization of the value of ETC big data applications. How to more effectively utilize the massive amount of information provided by the ETC gantry system to support highway operation management and services is one of the current challenges in highway operation management and services. Summary of the Invention
[0004] The purpose of this invention is to provide a rapid detection method for abnormal ETC data based on an improved DTW algorithm.
[0005] The technical solution adopted in this invention is:
[0006] A rapid detection method for abnormal ETC data based on an improved DTW algorithm includes the following steps:
[0007] Step 1: Convert ETC transaction data into vehicle trajectory sequences (ETra) based on the spatiotemporal semantic characteristics of highway ETC transaction data;
[0008] Step 2: Obtain the gantry trajectory sequence ODLJ of the highway based on the vehicle trajectory sequence ETra query;
[0009] Step 3: Starting from both ends of the vehicle trajectory sequence ETra, calculate the matching similarity with the gantry trajectory sequence ODLJ;
[0010] Step 4: Construct a dynamic matching window based on the identified segmentation and matching points as boundaries, perform dynamic path planning, and quickly identify abnormal trajectory points within a limited range;
[0011] Furthermore, the specific steps of step 3 are as follows:
[0012] Step 3-1: Start the forward semantic information matching with the starting feature point of the vehicle trajectory sequence ETra as the current feature point;
[0013] Step 3-2: Determine whether the current feature point of the vehicle trajectory sequence ETra has the same semantic information as the corresponding feature point in the gantry trajectory sequence ODLJ; if yes, increment the matching feature tag value of the gantry trajectory sequence ODLJ and the vehicle trajectory sequence ETra and execute step 3-6; otherwise, execute step 3-3.
[0014] Step 3-3: Set or obtain the dynamic retrieval step size R used to limit fast match finding;
[0015] Step 3-4: Determine whether the current feature point of the vehicle trajectory sequence ETra has retrieved the feature point of the gantry trajectory sequence ODLJ within the dynamic retrieval step size R; if yes, proceed to step 3-5; otherwise, proceed to step 3-6.
[0016] Step 3-5: Determine whether the current feature point of the vehicle trajectory sequence ETra has the same semantic information as the corresponding feature point in the gantry trajectory sequence ODLJ; if yes, increment the matching feature tag value of the gantry trajectory sequence ODLJ and the vehicle trajectory sequence ETra by one, and add auxiliary tag values to the feature points in the retrieved vehicle trajectory sequence to output the result; otherwise, proceed to step 3-6.
[0017] Step 3-6: Determine if there are any unmatched feature points in the vehicle trajectory sequence ETra; if so, select the next feature point in the current sorting of the vehicle trajectory sequence ETra as the current feature point and execute step 3-2; otherwise, execute step 3-7.
[0018] Step 3-7: Determine whether the current match is a forward-order semantic information match; if yes, start a reverse-order semantic information match with the endpoint feature point of the vehicle trajectory sequence ETra as the current feature point and execute step 3-2; otherwise, execute step 3-8.
[0019] Steps 3-8: Detect each set of feature points corresponding to the matching feature label values one by one, and add several sets of feature points with auxiliary label values into the anomaly range set.
[0020] Furthermore, in step 3-3, the dynamic retrieval step size R for comparison is the length of the absolute value of the difference between the vehicle trajectory sequence ETra and the gantry trajectory sequence ODLJ, plus the starting point of the two trajectories. The expression for R is:
[0021] R=|Len(ODLJ)-Len(ETraj)|+1 (1)
[0022] Specifically, the dynamic retrieval step size R is used to constrain the maximum retrieval length for trajectory mismatches between the vehicle trajectory sequence ETraj and the OD trajectory. The length of the dynamic retrieval step size R is used to limit the fast search for matching ODLJ. i The matching feature points. If a match is successful within the range of R or a boundary point of R is reached, then ODLJ is marked. i The value, and perform ODLJ i+1 Feature point retrieval.
[0023] Therefore, this invention iterates through the trajectory points of ODLJ. i When performing a matching search with the ETraj trajectory sequence, only the trajectory point ODLJ needs to be used. i The starting point is added to the dynamic retrieval step size R to quickly confirm the matching feature points within the retrieval range. When the length of the vehicle trajectory sequence Len(ETraj) is less than the length of the OD path Len(ODLJ), it can be inferred that there must be missed transactions when the vehicle travels in ETraj. This invention also iterates through the trajectory points ODLJ. i When performing a matching search with the ETraj trajectory sequence, due to the presence of missing transactions (missing data) in ETraj, ODLJ was encountered. i It is also necessary to confirm with several subsequent data points of the current trajectory in ETraj. This invention also uses the length of the dynamic retrieval step size R to limit the rapid search for matching ODLJ within this range. i The matching feature points. If a match is successful within the range of R or a boundary point of R is reached, then ODLJ is marked. i The value, and perform ODLJ i+1 Feature point retrieval.
[0024] Furthermore, the specific steps of steps 3-8 are as follows:
[0025] Step 3-8-1: Construct the W window based on the identified segmentation and matching points as boundaries:
[0026] ODLJ represents the path sequence and ETraj represents the vehicle trajectory sequence, {d0, ..., d...} n} and {q0, ..., q m Let} represent the trajectory points of ETraj and ODLJ, respectively. Together, they form a normalized matrix D, where n and m are the sizes of the normalized matrix D, and i and j are the i-th data point in the query sequence and the j-th data point in the subsequence, respectively.
[0027]
[0028] The window size is w = r row ×r col r row = <r1,r2,r3,...,r m >, r col = <c1,c2,c3,...,c n >. r row It is the horizontal dynamic retrieval step size, r col This represents the dynamic retrieval step size for the longitudinal trajectory points.
[0029] Step 3-8-2: After construction, each window W uses the Anomaly Feature Recognition (AFC) algorithm to perform path planning detection on the abnormal data within the window in order to identify missed or erroneous transaction data.
[0030] Step 3-8-3: Add the identified data features to the anomaly range set.
[0031] Furthermore, the steps of the AFC (Abnormal Feature Detection) algorithm are as follows:
[0032] Step 3-8-2-1: Based on the n vehicle transaction gantries and the standard road network topology, obtain the topology storage matrix A of the corresponding standard subtree sets. mn ;
[0033] Step 3-8-2-2: Generate a storage matrix B of the corresponding real-time vehicle dynamic trajectory subtree set based on the gantry nodes through which the vehicles are en route. mn The storage matrix B is updated by iteratively analyzing the real-time uploaded ETC transaction data. mn ;
[0034] Step 3-8-2-3: By detecting anomalies in the subtree set, the anomaly identification matrix C is obtained by marking the vehicle trajectory set with anomaly labels based on the detection results. mn The three matrices are of the same size.
[0035] Furthermore, the specific steps of step 3-8-2-1 are as follows:
[0036] (1-1) Generate dynamic vehicle trajectories based on vehicle transaction data, with the gantry where the vehicle transaction occurs as the root node of the subtree;
[0037] (1-2) Match the root node of the subtree with the standard topology TOPO to obtain the corresponding standard subtree set TOPO. si si represents the i-th standard subtree S;
[0038] (1-3) Based on the path selection algorithm, calculate the weight of each branch of the standard subtree set. Each standard subtree corresponds to an array to store the weight of the branch.
[0039] Furthermore, in (1-1), dynamic trajectories of vehicle transaction data are extracted at fixed time intervals.
[0040] Furthermore, the specific steps of step 3-8-2-2 are as follows:
[0041] (2-1) The gantry node where the vehicle completes the transaction at time T is taken as the current node, that is, the current node enters the queue as the root of the subtree;
[0042] (2-2) Output the current node G1, and let the first-level child nodes (G2, G3) of the current node G1 calculate the time domain of the vehicle arriving at each first-level child node in turn according to their respective weights.
[0043] (2-3) Wait for the system to confirm that the first-level sub-nodes (G2, G3) have reached their departure time;
[0044] (2-4) Determine whether the vehicle generates transaction data with any first-level child node (G2, G3) gantry within the corresponding time domain; if yes, mark the first-level child node that generated the transaction data as "0", prune the subtree of the other child node at the same level, and execute step (2-5); otherwise, mark all corresponding first-level child nodes as "1" and execute step (2-5).
[0045] (2-5) Determine if there are second-level child nodes (i.e., child nodes G4, G5, G6, and G7 of the first-level child node); if yes, proceed to (2-6); otherwise, end the dynamic trajectory matching process and obtain the storage matrix B of the real-time vehicle dynamic driving trajectory subtree set. mn ;
[0046] (2-6) Determine if all first-level child nodes are marked as "1"; if yes, proceed to step (2-7); otherwise, enter the T+1 time period and take the first-level child node marked as "0" as the current node and proceed to step (2-2);
[0047] (2-7) Determine if the current node has any unmatched sibling nodes; if yes, select the node with the largest weight among the unmatched sibling nodes corresponding to the current node as the current node and execute step (2-2); otherwise, select the first-level node corresponding to the second-level child node with the largest weight as the current node and execute step (2-2). From (2-2) to (2-7) is a cyclic execution process, selecting the largest weight each time, until the topological subtree has no child nodes.
[0048] Furthermore, in step 3-8-2-3, A mn With B mn Dynamic matching is performed to obtain the anomaly identifier matrix C of the gantries through which vehicles pass. mn ,in:
[0049]
[0050]
[0051] A mn With B mn Dynamic matching is performed to obtain the anomaly identifier matrix C of the gantries through which vehicles pass. mn ;
[0052]
[0053] A mn With B mn A successful match is marked as 0, and a non-match is marked as 1, indicating an anomaly in the gantry. Matrix C mn Rows represent transactions involving one vehicle with multiple gantries, while columns represent transactions involving multiple vehicles with a single gantry.
[0054] Furthermore, the statistical anomaly identification matrix C mn The abnormal frequency for each gantry is determined by defining the column statistical function as follows:
[0055]
[0056] Among them, S k This represents the frequency of anomalies for each gantry, where k is the maximum number of gantry elements in the matrix (at most n), and i is the anomaly identification matrix C. mn The number of vehicles involved in the supervision.
[0057] Furthermore, the gantry anomaly rate is calculated based on the frequency of gantry anomalies, and the formula for calculating the gantry anomaly rate is as follows.
[0058]
[0059] Where, ε Tav This represents the average ETC gantry anomaly rate over the time period T. N represents the abnormal frequency of vehicles passing through the ETC gantry within the time period t. t t represents the number of vehicles passing through the ETC gantry during the time period t, and N represents the total number of vehicles passing through the ETC gantry.
[0060] This invention addresses the issue that if any vehicle N passing through the ETC gantry experiences a missing or abnormal condition within a certain timeframe, the greater the degree of the missing or abnormal condition, the lower the vehicle's health status.
[0061] This invention employs the above technical solution, based on the improved DTW algorithm SegrDTW, to perform similarity matching on the trajectories of vehicles traveling along the ODLJ path. It then rapidly calculates dissimilar trajectory segments in the ETraj trajectory using a constrained feature window method. Building upon this, an abnormal trajectory identification algorithm is designed based on the spatiotemporal characteristics of ETC trajectories to identify and label missed / erroneous transactions in the EData transaction data within the trajectory set. Finally, the labeling results are mapped and restored, and the accuracy of the missed / erroneous ETC transaction data is verified. Attached Figure Description
[0062] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments;
[0063] Figure 1 This is a schematic diagram of the framework of the ETC abnormal data rapid detection method based on the improved DTW algorithm of the present invention;
[0064] Figure 2 This is a schematic diagram of the segmentation and matching feature window;
[0065] Figure 3 A diagram illustrating the process of finding and confirming matching points;
[0066] Figure 4 This is a schematic diagram of the overall framework for dynamic detection of gantry anomalies.
[0067] Figure 5 This is a flowchart illustrating the dynamic multi-branch tree gantry anomaly detection process.
[0068] Figure 6 This is a schematic diagram of a partial directed topology network TOPO.
[0069] Figure 7 This is a schematic diagram of the queue state at different stages;
[0070] Figure 8 A schematic diagram comparing the running efficiency of different OD sequence lengths;
[0071] Figure 9 A diagram illustrating the comparison of runtime efficiency tests for different data volumes;
[0072] Figure 10 A diagram showing the comparison of anomaly detection and retrieval times at different depths;
[0073] Figure 11 This diagram illustrates the comparison of unlocking efficiency at different tree depths using the DTS-BFS algorithm. Detailed Implementation
[0074] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0075] like Figures 1 to 11 As shown in the figure, this invention discloses a method for rapid detection of abnormal ETC data based on an improved DTW algorithm, which includes the following steps:
[0076] Step 1: Convert ETC transaction data into vehicle trajectory sequences (ETra) based on the spatiotemporal semantic characteristics of highway ETC transaction data;
[0077] Step 2: Obtain the gantry trajectory sequence ODLJ of the highway based on the vehicle trajectory sequence ETra query;
[0078] Step 3: Starting from both ends of the vehicle trajectory sequence ETra, calculate the matching similarity with the gantry trajectory sequence ODLJ;
[0079] Step 4: Construct a dynamic matching window based on the identified segmentation and matching points as boundaries, perform dynamic path planning, and quickly identify abnormal trajectory points within a limited range.
[0080] Furthermore, the specific steps of step 3 are as follows:
[0081] Step 3-1: Start the forward semantic information matching with the starting feature point of the vehicle trajectory sequence ETra as the current feature point;
[0082] Step 3-2: Determine whether the current feature point of the vehicle trajectory sequence ETra has the same semantic information as the corresponding feature point in the gantry trajectory sequence ODLJ; if yes, increment the matching feature tag value of the gantry trajectory sequence ODLJ and the vehicle trajectory sequence ETra and execute step 3-6; otherwise, execute step 3-3.
[0083] Step 3-3: Set or obtain the dynamic retrieval step size R used to limit fast match finding;
[0084] Step 3-4: Determine whether the current feature point of the vehicle trajectory sequence ETra has retrieved the feature point of the gantry trajectory sequence ODLJ within the dynamic retrieval step size R; if yes, proceed to step 3-5; otherwise, proceed to step 3-6.
[0085] Step 3-5: Determine whether the current feature point of the vehicle trajectory sequence ETra has the same semantic information as the corresponding feature point in the gantry trajectory sequence ODLJ; if yes, increment the matching feature tag value of the gantry trajectory sequence ODLJ and the vehicle trajectory sequence ETra by one, and add auxiliary tag values to the feature points in the retrieved vehicle trajectory sequence to output the result; otherwise, proceed to step 3-6.
[0086] Step 3-6: Determine if there are any unmatched feature points in the vehicle trajectory sequence ETra; if so, select the next feature point in the current sorting of the vehicle trajectory sequence ETra as the current feature point and execute step 3-2; otherwise, execute step 3-7.
[0087] Step 3-7: Determine whether the current match is a forward-order semantic information match; if yes, start a reverse-order semantic information match with the endpoint feature point of the vehicle trajectory sequence ETra as the current feature point and execute step 3-2; otherwise, execute step 3-8.
[0088] Steps 3-8: Detect each set of feature points corresponding to the matching feature label values one by one, and add several sets of feature points with auxiliary label values into the anomaly range set.
[0089] Furthermore, in step 3-3, the dynamic retrieval step size R for comparison is the length of the absolute value of the difference between the vehicle trajectory sequence ETra and the gantry trajectory sequence ODLJ, plus the starting point of the two trajectories. The expression for R is:
[0090] R=|Len(ODLJ)-Len(ETraj)|+1 (1)
[0091] Specifically, the dynamic retrieval step size R is used to constrain the maximum retrieval length for trajectory mismatches between the vehicle trajectory sequence ETraj and the OD trajectory. The length of the dynamic retrieval step size R is used to limit the fast search for matching ODLJ. i The matching feature points. If a match is successful within the range of R or a boundary point of R is reached, then ODLJ is marked. i The value, and perform ODLJ i+1 Feature point retrieval.
[0092] Therefore, this invention iterates through the trajectory points of ODLJ. i When performing a matching search with the ETraj trajectory sequence, only the trajectory point ODLJ needs to be used. i The starting point is added to the dynamic retrieval step size R to quickly confirm the matching feature points within the retrieval range. When the length of the vehicle trajectory sequence Len(ETraj) is less than the length of the OD path Len(ODLJ), it can be inferred that there must be missed transactions when the vehicle travels in ETraj. This invention also iterates through the trajectory points ODLJ. iWhen performing a matching search with the ETraj trajectory sequence, due to the presence of missing transactions (missing data) in ETraj, ODLJ was encountered. i It is also necessary to confirm with several subsequent data points of the current trajectory in ETraj. This invention also uses the length of the dynamic retrieval step size R to limit the rapid search for matching ODLJ within this range. i The matching feature points. If a match is successful within the range of R or a boundary point of R is reached, then ODLJ is marked. i The value, and perform ODLJ i+1 Feature point retrieval.
[0093] Furthermore, the specific steps of steps 3-8 are as follows:
[0094] Step 3-8-1: Construct a W-window based on the identified segmentation and matching points as boundaries, such as... Figure 3 As shown:
[0095] ODLJ represents the path sequence and ETraj represents the vehicle trajectory sequence, {d0, ..., d...} n} and {q0, ..., q m Let} represent the trajectory points of ETraj and ODLJ, respectively. Together, they form a regularized matrix D, where n and m are the sizes of this matrix, and i and j represent the i-th data point in the query sequence and the j-th data point in the subsequence, respectively.
[0096]
[0097] The window size is w = r row ×r col r row = <r1,r2,r3,...,r m >, r col = <c1,c2,c3,...,c n >, r row It is the horizontal dynamic retrieval step size, r col This represents the dynamic retrieval step size for the longitudinal trajectory points.
[0098] Step 3-8-2: After construction, each window W uses the Anomaly Feature Recognition (AFC) algorithm to perform path planning detection on the abnormal data within the window in order to identify missed or erroneous transaction data.
[0099] Step 3-8-3: Add the identified data features to the anomaly range set.
[0100] Furthermore, the steps of the AFC (Abnormal Feature Detection) algorithm are as follows:
[0101] Step 3-8-2-1: Based on the n vehicle transaction gantries and the standard road network topology, obtain the topology storage matrix A of the corresponding standard subtree sets. mn;
[0102] Step 3-8-2-2: Generate a storage matrix B of the corresponding real-time vehicle dynamic trajectory subtree set based on the gantry nodes through which the vehicles are en route. mn The storage matrix B is updated by iteratively analyzing the real-time uploaded ETC transaction data. mn ;
[0103] Step 3-8-2-3: By detecting anomalies in the subtree set, the anomaly identification matrix C is obtained by marking the vehicle trajectory set with anomaly labels based on the detection results. mn A mn B mn C mn The row and column sizes of the three matrices are the same.
[0104] Furthermore, the specific steps of step 3-8-2-1 are as follows:
[0105] (1-1) Generate dynamic vehicle trajectories based on vehicle transaction data, with the gantry where the vehicle transaction occurs as the root node of the subtree;
[0106] (1-2) Match the root node of the subtree with the standard topology TOPO to obtain the corresponding standard subtree set TOPO. si si represents the i-th standard subtree S;
[0107] (1-3) Based on the path selection algorithm, calculate the weight of each branch of the standard subtree set. Each standard subtree corresponds to an array to store the weight of the branch.
[0108] Furthermore, in (1-1), dynamic trajectories of vehicle transaction data are extracted at fixed time intervals.
[0109] Furthermore, the specific steps of step 3-8-2-2 are as follows:
[0110] (2-1) Take the gantry node where the vehicle completes the transaction at time T as the current node, that is, the current node enters the queue as the root of the subtree; (2-2) Output the current node G1, and let the first-level child nodes (G2, G3) of the current node G1 calculate the time domain of the vehicle arriving at each first-level child node in turn according to their respective weights.
[0111] (2-3) Wait for the system to confirm that the first-level sub-nodes (G2, G3) have reached their departure time;
[0112] (2-4) Determine whether the vehicle generates transaction data with any first-level child node (G2, G3) gantry within the corresponding time domain; if yes, mark the first-level child node that generated the transaction data as "0", prune the subtree of the other child node at the same level, and execute step (2-5); otherwise, mark all corresponding first-level child nodes as "1" and execute step (2-5).
[0113] (2-5) Determine if there are second-level child nodes (i.e., child nodes G4, G5, G6, and G7 of the first-level child node); if yes, proceed to (2-6); otherwise, end the dynamic trajectory matching process and obtain the storage matrix B of the real-time vehicle dynamic driving trajectory subtree set. mn ;
[0114] (2-6) Determine if all first-level child nodes are marked as "1"; if yes, proceed to step (2-7); otherwise, enter the T+1 time period and take the first-level child node marked as "0" as the current node and proceed to step (2-2);
[0115] (2-7) Determine if the current node has any unmatched sibling nodes; if yes, select the node with the largest weight among the unmatched sibling nodes corresponding to the current node as the current node and execute step (2-2); otherwise, select the first-level node corresponding to the second-level child node with the largest weight as the current node and execute step (2-2). From (2-2) to (2-7) is a cyclic execution process, selecting the largest weight each time, until the topological subtree has no child nodes.
[0116] Furthermore, in step 3-8-2-3, A mn With B mn Dynamic matching is performed to obtain the anomaly identifier matrix C of the gantries through which vehicles pass. mn ,in:
[0117]
[0118]
[0119] A mn With B mn Dynamic matching is performed to obtain the anomaly identifier matrix C of the gantries through which vehicles pass. mn ;
[0120]
[0121] A mn With B mn A successful match is marked as 0, and a non-match is marked as 1, indicating an anomaly in the gantry. Matrix C mn Rows represent transactions involving one vehicle with multiple gantries, while columns represent transactions involving multiple vehicles with a single gantry.
[0122] Furthermore, the statistical anomaly identification matrix C mn The abnormal frequency for each gantry is determined by defining the column statistical function as follows:
[0123]
[0124] Among them, S k This represents the frequency of anomalies for each gantry, where k is the maximum number of gantry elements in the matrix (at most n), and i is the anomaly identification matrix C. mn The number of vehicles involved in the supervision.
[0125] Furthermore, the gantry anomaly rate is calculated based on the frequency of gantry anomalies, and the formula for calculating the gantry anomaly rate is as follows.
[0126]
[0127] Where, ε Tav This represents the average ETC gantry anomaly rate over the time period T. N represents the abnormal frequency of vehicles passing through the ETC gantry within the time period t. t t represents the number of vehicles passing through the ETC gantry during the time period t, and N represents the total number of vehicles passing through the ETC gantry.
[0128] The specific principles of this invention will be explained in detail below:
[0129] like Figure 3 As shown, the overall framework of this invention involves similarity matching of vehicle trajectories traveling along the ODLJ path, and rapidly calculating mismatched and dissimilar trajectory segments in the ETraj trajectory using a constrained feature window method. Based on this, an abnormal trajectory identification algorithm is designed according to the spatiotemporal characteristics of ETC trajectories to identify and label missed / erroneous transactions in the EData transaction data within the trajectory set. Finally, the labeling results are mapped back, and the missed / erroneous ETC transaction data are verified to confirm the accuracy of the results.
[0130] Dynamic retrieval matching step size: Vehicle trajectory sequences ETraj may contain missed or erroneous transactions, causing the length of the transaction trajectory ETraj to differ from the length of the OD trajectory. To address this issue of unequal length comparison, this invention proposes the concept of a dynamic retrieval step size. The dynamic retrieval step size R for transaction gantry comparison is defined as the length of the sum of the starting point of the comparison between the two trajectories and the absolute value of the difference between them. The value of R is:
[0131] R=|Len(ODLJ)-Len(ETraj)|+1 (1)
[0132] The dynamic retrieval step size R is used to constrain the maximum retrieval length for trajectory mismatches between the vehicle trajectory sequence ETraj and the OD trajectory. When the length of the vehicle trajectory Len(ETraj) is greater than the length of the OD path Len(ODLJ), there will inevitably be erroneous transactions in the vehicle trajectory ETraj. Therefore, this invention iterates through the trajectory points ODLJ. i When performing a matching search with the ETraj trajectory sequence, only the trajectory point ODLJ needs to be used. i The starting point is added to the dynamic retrieval step size R to quickly confirm the matching feature points within the retrieval range. When the length of the vehicle trajectory sequence Len(ETraj) is less than the length of the OD path Len(ODLJ), it can be inferred that there must be missed transactions when the vehicle travels in ETraj. This invention also iterates through the trajectory points ODLJ. i When performing a matching search with the ETraj trajectory sequence, due to the presence of missing transactions (missing data) in ETraj, ODLJ was encountered. i It is also necessary to confirm with several subsequent data points of the current trajectory in ETraj. This invention also uses the length of the dynamic retrieval step size R to limit the rapid search for matching ODLJ within this range. i The matching feature points. If a match is successful within the range of R or a boundary point of R is reached, then ODLJ is marked. i The value, and perform ODLJ i+1 Feature point retrieval.
[0133] The identification steps for matching feature point retrieval are described below. Since the trajectory of ETC transaction ETraj has the characteristic of matching origin and destination points OD, and the elements in the trajectory spatiotemporal data satisfy the definition of a point in Euclidean space, this invention defines a matching feature point P in the trajectory sequence ETraj and ODLJ. At this feature point, there exists a Euclidean distance of 0 between ETraj and ODLJ, i.e., P|dist(ETraj,ODLJ)=0. Figure 4 As shown, due to the inconsistency in length between ETraj and ODLJ, some sequences may be left unmatched during the traversal process. To prevent this, this invention employs a bidirectional traversal retrieval strategy. (See below.) Figure 4 As shown, ODLJ1 and ODLJ2 are the starting and ending points of ETraj, respectively, for bidirectional matching. Matching feature points are calculated using the Euclidean distance calculation functions dist(ETraj,ODLJ1) and dist(ETraj,ODLJ2) for ETraj and ODLJ respectively, in the directions from the starting point to the ending point and from the ending point to the starting point. The retrieval range for each trajectory point is the dynamic retrieval step size R.
[0134] After identifying feature points (i.e. trajectory points without anomalies), these feature points are used as anchor point boundaries. Next, the algorithm constructs windows W for regions where the interval between these anchor points is greater than 1. These windows W are used to constrain the calculation of identifying abnormal data such as missed transactions and erroneous transactions.
[0135] The process of retrieving and segmenting feature points and establishing an abnormal trajectory range retrieval window is described in Algorithm 1.
[0136] Algorithm 1. Abnormal Trajectory Range Retrieval Window Algorithm
[0137]
[0138]
[0139] In steps 7 to 19, the algorithm first performs a forward and reverse traversal, using Euclidean distance to compare the sequence values of ETraj and ODLJ to determine matching feature points. If the matches are not equal, it checks within a step size R to see if there are any matching points. Figure 5 As shown, where {d0,...,d n} and {q0,...,q m} are the trajectory points of ETraj and ODLJ, respectively. P|dist(d) is calculated using the Euclidean distance algorithm. i ,q j Match trajectory points within the range R where ) = 0. Figure 5 The orange location point), if no point is matched within the constraints of R ( Figure 5 The search area within the dashed box), then for (d) i ,q j Mark and perform (d) i+1 ,q j+1 The algorithm finds matching feature points for trajectory points. It performs two traversals, one forward and one backward, to ensure that any intermediate data points that are not matched during the matching process are identified, thus obtaining all segmentation matching points in the ETraj and ODLJ trajectories where the Euclidean distance is equal to 0. In steps 21 to 25, the algorithm constructs a W-window based on the identified segmentation matching points as boundaries.
[0140]
[0141] The window size is w = r row ×r col r row = <r1,r2,r3,...,r m >, r col = <c1,c3,c3,...,c nEach constructed window W can use the Anomaly Feature Detection (AFC) algorithm (step 24) to perform path planning detection on the abnormal data within the window to identify missed or erroneous transactions. Step 27 returns the identified data feature results.
[0142] Multi-branch tree gantry anomaly dynamic identification algorithm framework: To address the difficulties in operation and maintenance caused by the diverse types and wide distribution of gantry system equipment, this invention fully utilizes the time-series characteristics of gantry transaction data and the characteristics of gantry topology network structure to propose a real-time self-diagnosis and self-inspection technology for gantry anomalies based on ETC transaction data. It uses transaction data to dynamically evaluate the real-time dynamic trajectory of vehicles, employs a Naive Bayes classifier to determine the weights of each connected branch path in the dynamic trajectory of on-the-road vehicles to evaluate the effectiveness of the on-the-road trajectory, and finally uses a priority-based dynamic multi-branch tree anomaly detection algorithm to achieve gantry dynamic anomaly self-inspection.
[0143] The gantry equipment anomaly self-inspection and self-diagnosis algorithm mainly consists of the following three steps:
[0144] Step 1: Based on the gantry topology of the ETC system, analyze and statistically analyze the travel time of each section, calculate the probability distribution density function parameters of the travel time of each section, and substitute these parameters into the distribution function model to determine the travel time domain of the highway network section (the time domain of this section is determined by the travel time of each vehicle in the section).
[0145] Step 2: Based on the gantries the vehicle passes through, identify all gantries connected to the current gantry. Use a Naive Bayes classifier for path selection. The core of the selection is to calculate the probability of passage time under different path selection conditions. Use the conditional probability value as the path weight and traverse it in descending order to determine the priority of subsequent subtree branch matching.
[0146] Step 3: Use a priority-based dynamic multi-branch tree anomaly detection algorithm to identify dynamic anomalies in the gantry.
[0147] This invention proposes a dynamic multi-branch tree gantry anomaly detection algorithm. The algorithm uses the starting gantry of the road network as the root node of the vehicle's travel path, with the gantry itself as a leaf node in a multi-branch tree. As a vehicle passes through a gantry, a dynamic subtree that changes over time is generated. When a gantry failure occurs in the road network, the algorithm can detect the missing nodes and edges in the subtree caused by the gantry anomaly. These missing nodes lead to dynamic changes in the tree structure and attributes, enabling rapid identification of the faulty gantry.
[0148] Since the time it takes for vehicles to pass through the gantry is real-time, the algorithm uses fixed time intervals to extract the dynamic trajectory of vehicle transaction data for easier detection. The dynamic multi-branch tree gantry anomaly detection algorithm aims to find the nodes in the dynamic standard subtree where abnormal vehicle transactions occur. For example... Figure 5As shown, this is a time-sliding window, where different standard dynamic subtrees correspond to different vehicle dynamic movements within different sliding windows. This invention proposes a method for static topological subtree segmentation of vehicle trajectory nodes based on time windows, and obtains corresponding standard subtrees according to time. The algorithm first obtains a set of standard subtrees based on n vehicle transaction gantries and the standard road network topology; then, it generates a set of dynamic subtrees based on the gantry nodes passed by vehicles in transit, and updates the subtree sets by iteratively analyzing real-time uploaded ETC transaction data; finally, it detects anomalies in the subtree sets and marks vehicle trajectory sets with anomaly labels based on the detection results. The specific detection steps are as follows:
[0149] Step 1: Process n vehicle transaction trajectories in parallel:
[0150] (1-1) Generate dynamic vehicle trajectories based on vehicle transaction data, with the gantry where the vehicle transaction occurs as the root node of the subtree.
[0151] (1-2) Match the root node of the subtree with the standard topology TOPO to obtain the corresponding standard subtree set TOPO. si .
[0152] (1-3) Based on the path selection algorithm, calculate the weight of each branch of the standard subtree set.
[0153] Step 2: As Figure 6 As shown in Figure 7, dynamic matching (taking the vehicle dynamic transaction trajectory queue as an example) involves the system platform detecting vehicles entering the road in three time periods based on the standard road network topology. A specific execution example is as follows:
[0154] (2-1) The gantry node where the vehicle has completed the transaction at the current time is added to the queue as the root of the subtree.
[0155] (2-2) Dequeue the current node, output G1, and simultaneously allow the child nodes of this node to enter the queue in sequence according to their respective weights. Calculate the time domain for vehicle arrival at each node.
[0156] (2-3) Once the system confirms that G2 and G3 have left the station, it will remove G2 and G3 from the queue and enqueue their child nodes G4, G5, G6 and G7 according to their weights to await calculation.
[0157] Determine whether the vehicle has generated transaction data with gantries G2 and G3 within the corresponding time domain. If the vehicle has generated transaction data with one of the gantry nodes, mark that node as "0", prune the other subtree, and simultaneously enter time window T+1. Continue executing steps (2-3), (2-2), and (2-3). If the vehicle has not generated transaction data with either G2 or G3, mark both nodes as "1", and enter time window T+1. At this time, there will be 4 subtrees rooted at G4, G5, G6, and G7. First, enqueue the child nodes of the subtree with the larger edge weight, and repeat steps (2-2) and (2-3).
[0158] Step 3: Pruning:
[0159] (3-1) If a gantry transaction occurs between the child nodes of the corresponding subtree in step (2-3), the remaining nodes at the same level do not need to participate in the comparison. At time T, only one branch label is retained in the subtree, and the others are deleted. For example, if a transaction data is generated with the gantry node G3, G2 and the child nodes G4 and G5 enqueued by G2 will be cut off.
[0160] (3-2) If no transaction data is generated at time T+1, then proceed to time T+2 and repeat the above steps (2-3) until transaction data is generated with the standard subtree node, then execute step (3-1).
[0161] (3-3) Continue until no leaf node in any subtree is matched.
[0162] The standard subtree topology storage matrix A can be obtained through the above steps. mn According to the dynamic matching in Step 2, we can obtain the result related to A. mn The corresponding real-time vehicle dynamic driving trajectory storage matrix B mn ,in:
[0163]
[0164]
[0165] In Step 2, A mn With B mn Dynamic matching is performed to obtain the anomaly identifier matrix C of the gantries through which vehicles pass. mn .
[0166]
[0167] Where A mn With B mn A successful match is marked as 0, and a non-match is marked as 1, indicating an anomaly in the gantry. Matrix C mnRows represent transactions between a vehicle and multiple gantries, while columns represent transactions between multiple vehicles and a single gantry. To count the frequency of anomalies for each gantry in the above result matrix, a column counting function needs to be defined, as follows:
[0168]
[0169] Among them, S k This represents the frequency of anomalies for each gantry, k is the maximum number of gantry elements in the matrix, and i is the number of vehicles involved in the monitoring within the matrix.
[0170] After counting the frequency of gantry anomalies, it is necessary to calculate the gantry anomaly rate. This invention defines it as follows:
[0171] The definition of gantry anomaly rate is: if any vehicle N passing through the ETC gantry experiences a missing or abnormal condition within a certain period of time, the health status is lower. The formula for calculating the gantry anomaly rate is as follows.
[0172]
[0173] Where, ε Tav This represents the average ETC gantry anomaly rate over the time period T. N represents the abnormal frequency of vehicles passing through the ETC gantry within the time period t. t t represents the number of vehicles passing through the ETC gantry during the time period t, and N represents the total number of vehicles passing through the ETC gantry.
[0174] Anomaly Data Rapid Detection Experiment Analysis: The dataset originates from approximately 60.3445 million real transaction data entries collected by Fujian Provincial Expressway Information Technology Company through the ETC gantry system from September 3rd to September 12th, 2020. These were converted into 9,057,160 transaction trajectories, along with gantry topology information for the entire Fujian province. The original transaction data table contains 103 fields, recording various information about vehicles and gantries, specifically including license plate number, gantry ID, transaction data, time, and gantry latitude and longitude. A portion is shown in Table 1 below.
[0175] Table 1. Attributes of Transaction Data
[0176] Serial Number Field representation Field Name example 1 TRADEID Transaction identifier S0***1 (bit) 2 TRADETIME Trading hours 2020 / 9 / 3 20:00:01 3 FLAGID gantry number 3502** 4 OBUID Device MAC 66AD40** 5 OBUPLATE OBU license plate Lanmin AP**** 6 ENTIME Entry Time 2020 / 9 / 3 7:48:39 7 ENSTATION Entrance toll station 46** 8 LNG longitude 118.56** 9 LAT latitude 24.85*** 10 VEHCLASS Vehicle type 1
[0177] To verify the scientific validity of the algorithm proposed in this invention in detecting and identifying missed / erroneous transaction data, this experiment selected four road sections in Fujian Province as test sets: Yiban-Haicang Hub, Shaxian Qiujiang-Dapu Hub, Xianyou Bangtou-Fuzhou South, and Nanping North-Minhou Ganzhe. This dataset involves busy road sections in Fuzhou, Xiamen, Quanzhou, Sanming, Putian, and Nanping, and has obvious representativeness of abnormal data.
[0178] The experiment verifies the performance of the algorithm proposed in this invention, and verifies it from three aspects: the retrieval efficiency of trajectory data with a specified OD path length, the data retrieval efficiency of long-distance trajectory data, and the data retrieval efficiency of large data volume.
[0179] First, the efficiency of trajectory data retrieval for specified OD paths was verified. The SegrDTW algorithm was compared with three mainstream anomaly retrieval algorithms—DTW, Hausdorff, and EDR—in terms of execution time efficiency. The results are shown in Table 3. The SegrDTW algorithm showed a multiple-fold increase in efficiency compared to the other algorithms. Experiments demonstrated the effectiveness of the SegrDTW algorithm model in spatiotemporal data similarity applications, ensuring robustness of retrieval and effectively improving operational efficiency. For example, on the Yiban-Haicang interchange section, the SegrDTW algorithm improved retrieval time by 6.9 times, 7.3 times, and 10 times compared to DTW, Hausdorff, and EDR, respectively.
[0180] Table 2 Comparison of Retrieval Time -- Unit: seconds
[0181] OD Name SegrDTW DTW Hausdorff EDR Yiban-Haicang Hub 0.18 1.25 1.31 1.80 Shaxian Qiujiang-Dapu Hub 0.24 1.15 1.38 1.78 Xianyou Bangtou - Fuzhou South 0.15 0.77 0.98 1.28 Nanping North - Minhou Sugarcane 0.21 1.14 1.21 2.25
[0182] Statistical analysis of a day's transaction data for Fujian Province yielded 16,528 OD pairs. Based on the average OD pair retrieval time across the four segments, the estimated time for anomaly detection across the entire province was calculated as follows: EDR algorithm required 29,378.52 seconds (approximately 8.16 hours), Hausdorff algorithm required 20,164.16 seconds (approximately 5.6 hours), DTW algorithm required 17,808.92 seconds (approximately 4.95 hours), and SegrDTW algorithm required 3,222.96 seconds (approximately 0.89 hours). In comparison, the SegrDTW algorithm proposed in this invention saves significantly more time in detecting anomalies in a single day's transaction data across the entire province. If applied to anomaly detection of nationwide ETC gantry transaction data, the retrieval efficiency of the method proposed in this invention will have an even greater advantage.
[0183] Secondly, this invention verifies the algorithm's performance based on the length of the transaction data sequence for long paths (comparison of retrieval performance for long data). The experiment selected gantry OD sequences along the Fujian section of the Shenhai Expressway with lengths of 15, 25, 35, 45, and 55 gantries, and matched them with vehicle trajectories for detection. The results are as follows: Figure 8 As shown. The horizontal axis represents the sequence length, and the vertical axis represents the runtime. From Figure 8As can be seen, the running time of the EDR algorithm curve is exponentially related to the sequence length, and has the greatest impact; the running time of the DTW and Hausdorff algorithms is greatly affected by the sequence length; the running time of the SegrDTW algorithm is linearly related to the sequence length, with a very small change, close to a straight line, and has the least impact. This is mainly because the algorithm of this invention uses dynamic radius retrieval, which can minimize the amount of computation.
[0184] To address the anomaly detection requirements of ETC big data, the algorithm needs to have high computational processing capabilities. To further verify the algorithm's performance under large datasets, an experiment was conducted using data from the Quanzhou-Xiamen route from September 3rd to September 12th (10 days). The results are as follows... Figure 9 As shown in the figure, the horizontal axis represents the amount of data for the 10-day trajectory, and the vertical axis represents the runtime. The figure shows that the runtime of the EDR, DTW, and Hausdorff algorithms increases exponentially with the amount of trajectory data, indicating that the amount of data significantly affects the runtime. The runtime of the SegrDTW algorithm shows a linear relationship with the amount of data; as the amount of data increases, the change is smaller and tends to be stable, demonstrating strong stability in performance. This is because the SegrDTW algorithm significantly increases the discard ratio, reducing unnecessary computation and thus exhibiting a higher lower bound compactness. With low time and space complexity, it achieves the early discarding of dissimilar subsequences, reducing the computational load of subsequent DTW, thus the retrieval time does not increase significantly with the increase in data size.
[0185] To further verify the effectiveness of the SEgrDTW algorithm, the experiment selected 3168 trajectory data points of Class I and Class II. Among the Class II trajectories, there were 951 missed transactions, 1425 erroneous transactions, and 792 other abnormal data points. The accuracy was compared with that of the DTW algorithm, and the experimental results are shown in Table 4. Table 4 shows that the detection accuracy for normal trajectories was 100%, while the detection accuracy for abnormal trajectories was 99.46%. The detection accuracy of the DTW algorithm and the SEgrDTW algorithm is consistent, indicating that the SEgrDTW algorithm achieves both fast detection and high retrieval accuracy.
[0186] Table 3. Statistics on Detection Accuracy
[0187]
[0188] To evaluate the algorithm's accuracy in feature extraction from trajectory sequences, experiments were conducted using the original feature data and the anomaly feature dataset generated by SegrDTW. This invention analyzed the detection performance of 3168 samples with features of erroneous transactions, missed transactions, and other abnormal transactions, along with 3168 samples of normal transactions. The statistical results are shown in Table 5. The table shows that the SegrDTW algorithm achieves an accuracy of over 99% in detecting erroneous transactions, missed transactions, and other abnormal transactions, effectively detecting abnormal transaction data. The precision for all three anomaly scenarios is 1, indicating that the algorithm detects anomalies in all detected gantries. The recall rates for erroneous and missed transactions are 0.9833 and 0.9848, respectively, indicating that a small number of samples in the erroneous transaction detection experiment were detected as missed transactions or other abnormal transactions, and similarly, a small number of missed transactions were detected as erroneous transactions or other abnormal transactions. However, the table shows that the other anomaly detection rate is 1, indicating that there are no errors in the other anomaly detection experiment, and all other abnormal transaction data were completely identified.
[0189] Table 4. SegrDTW Anomaly Type Detection Results
[0190] Exception types accuracy accuracy Recall rate F value Mistake in trading 0.9916 1 0.9833 0.9915 Missed transactions 0.9924 1 0.9848 0.9923 Other abnormal transactions 1 1 1 1
[0191] For the above experiments, this invention selected the Quanzhou-Xiamen section as a sample for verification, and statistically analyzed the abnormal distribution of gate frames as follows: Figure 10 As shown in the figure, the number of erroneous transactions is the highest, followed by missed transactions, while other abnormal transactions are the lowest.
[0192] Analysis of Gantry Anomaly Identification Experiment: To verify the scientific validity of the DTS-BFS algorithm proposed in this invention in detecting and identifying gantry transaction missing anomalies, this invention selected three main road segments along three roads, including busy road segments in Fuzhou, Xiamen, Quanzhou, and Nanping. Then, branches directly connected to the gantries of the main road segments were extracted to construct three topology trees: Scenario 1: a topology tree with a depth of 10; Scenario 2: a topology tree with a depth of 20; and Scenario 3: a topology tree with a depth of 30. 100 vehicles were simulated for dynamic identification of gantry transaction anomalies in each scenario.
[0193] The experiment will verify the efficiency of depth-first search in a specified topological subtree and the stability of the algorithm's performance. First, the efficiency of trajectory retrieval along a specified path will be verified. The time efficiency of the DTS-BFS algorithm will be compared with that of anomaly detection based on DFS, Best First Search, and A* algorithm traversal matching. The average retrieval times for the four sets of experiments are shown in Table 5. The longest retrieval time for A* algorithm is 3.22 seconds, Best First Search is 2.69 seconds, DFS is 3.08 seconds, and DTS-BFS is 2.30 seconds. In comparison, the algorithm proposed in this invention has a faster retrieval speed.
[0194] Table 5 Comparison of average retrieval times for gantry anomaly detection algorithms -- Unit: seconds
[0195] DTS-BFS DFS BestFirstSearch A* Scene 1 2.09 2.24 2.53 2.67 Scene 2 2.21 2.34 2.60 3.15 Scene 3 2.30 3.08 2.69 3.22
[0196] exist Figure 10 As shown in (a), (b), and (c), the time comparison for anomaly identification retrieval of time-domain transaction matching based on multi-branch tree path weights for topology tree storage matrices of depths 10, 20, and 30 is compared. In scenario 1, with a depth of 10, the DTS-BFS algorithm has the shortest time in all four experiments, around 2 seconds. Other algorithms show large fluctuations in the four experiments, with the longest retrieval time exceeding 3 seconds. In scenario 2, with the tree depth increased to 20, the DTS-BFS algorithm still has the shortest time in all four experiments, fluctuating between 2 and 3 seconds. Other algorithms have times exceeding 4 seconds, with fluctuations exceeding 2 seconds. In scenario 3, with a tree depth of 30, the DTS-BFS algorithm still has the fastest retrieval time in the four experiments.
[0197] exist Figure 11 The paper demonstrates that the anomaly retrieval efficiency of the DTS-BFS algorithm fluctuates within 2-3 seconds across four experimental groups in three scenarios, with the fastest time being 1.95 seconds and the slowest 2.62 seconds. It can be seen that as the number of gantry nodes increases, the retrieval time of the DTS-BFS algorithm in the first experimental group increases accordingly. However, in the second, third, and fourth experimental groups, the retrieval time of the DTS-BFS algorithm fluctuates within 0.5 seconds, indicating that increasing the dimensionality of the gantry nodes has little impact on the algorithm's retrieval efficiency.
[0198] This invention proposes a novel approach to gantry maintenance and toll evasion investigation. Vehicle trajectories are dynamically constructed based on the time series of real-time transaction data. Points in the vehicle trajectories are used as the root nodes of dynamic subtrees. The standard topology road network map is decomposed into a standard multi-branch tree, and a Bayesian classifier algorithm is used to assign weights to each branch for optimal matching. Then, based on the time domain of each branch, the transaction gantries of each branch in the corresponding time domain are matched with the gantries in the standard topology subtree. Mismatched gantries are marked as abnormal. Vehicle trajectories with abnormal markings and the same origin-destination (OD) are stored in a matrix. Horizontal and vertical operations are performed on the matrix. Multiple consecutive vertical anomalies indicate a high probability of gantry malfunction, and relevant maintenance personnel should be advised to pay close attention to the gantry's operation. Multiple consecutive horizontal anomalies indicate suspected toll evasion, and relevant departments should be advised to monitor the vehicle.
[0199] This invention proposes a novel approach to gantry maintenance and toll evasion detection. First, based on the spatiotemporal semantic characteristics of highway ETC transaction data, it is converted into an OD (Original Distance) path trajectory set. Similarity measurements are then performed between the OD ends of each trajectory and the ETC gantry sequence. Next, a dynamic matching window is constructed using the identified segmentation and matching points as boundaries, enabling dynamic path planning and rapid identification of abnormal trajectory points within a defined range. Compared to the traditional DTW (Deep Dive Wrap) algorithm, this approach avoids extensive and time-consuming matrix calculations.
[0200] Obviously, the described embodiments are only a part of the embodiments of this application, not all of them. Without conflict, the embodiments and features in the embodiments of this application can be combined with each other. The components of the embodiments of this application described and illustrated herein can generally be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of this application is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
Claims
1. A method for rapid detection of abnormal ETC data based on an improved DTW algorithm, characterized in that: It includes the following steps: Step 1: Convert ETC transaction data into vehicle trajectory sequences (ETra) based on the spatiotemporal semantic characteristics of highway ETC transaction data; Step 2: Obtain the gantry trajectory sequence ODLJ of the highway based on the vehicle trajectory sequence ETra query; Step 3: Starting from both ends of the vehicle trajectory sequence ETra, calculate the matching similarity with the gantry trajectory sequence ODLJ; the specific steps of Step 3 are as follows: Step 3-1: Start the forward semantic information matching with the starting feature point of the vehicle trajectory sequence ETra as the current feature point; Step 3-2: Determine whether the current feature point of the vehicle trajectory sequence ETra has the same semantic information as the corresponding feature point in the gantry trajectory sequence ODLJ; if yes, increment the matching feature tag value of the gantry trajectory sequence ODLJ and the vehicle trajectory sequence ETra and execute step 3-6; otherwise, execute step 3-3. Step 3-3: Set or obtain the dynamic retrieval step size R used to limit fast match finding; Steps 3-4: Determine the current feature point of the vehicle trajectory sequence ETra within the dynamic retrieval step size. Check if feature points of the gantry trajectory sequence ODLJ are found; if yes, proceed to step 3-5; otherwise, proceed to step 3-6. Step 3-5: Determine whether the current feature point of the vehicle trajectory sequence ETra has the same semantic information as the corresponding feature point in the gantry trajectory sequence ODLJ; if yes, increment the matching feature tag value of the gantry trajectory sequence ODLJ and the vehicle trajectory sequence ETra by one, and add auxiliary tag values to the feature points in the retrieved vehicle trajectory sequence to output the result; otherwise, proceed to step 3-6. Step 3-6: Determine if there are any unmatched feature points in the vehicle trajectory sequence ETra; if so, select the next feature point in the current sorting of the vehicle trajectory sequence ETra as the current feature point and execute step 3-2; otherwise, execute step 3-7. Step 3-7: Determine whether the current match is a forward-order semantic information match; if yes, start a reverse-order semantic information match with the endpoint feature point of the vehicle trajectory sequence ETra as the current feature point and execute step 3-2; otherwise, execute step 3-8. Steps 3-8 involve sequentially detecting each set of feature points corresponding to the matching feature label values, and adding several sets of feature points with auxiliary label values to the anomaly range set. The specific steps of steps 3-8 are as follows: Step 3-8-1: Construct the W window based on the identified segmentation and matching points as boundaries: ODLJ represents path sequences and ETraj represents vehicle trajectory sequences. as well as Let be the trajectory points of ETraj and ODLJ, respectively. Together, they form a regularized matrix D, where n and m are the sizes of this matrix, and i and j are the i-th data point in the query sequence and the j-th data point in the subsequence, respectively. (2) The window size is , , ; It is the horizontal dynamic retrieval step size. The dynamic retrieval step size for longitudinal trajectory points; Step 3-8-2: After construction, each window W uses the Anomaly Feature Recognition (AFC) algorithm to perform path planning detection on the abnormal data within the window in order to identify missed or erroneous transaction data. Step 3-8-3: Add the identified data features to the anomaly range set; Step 4: Construct a dynamic matching window based on the identified segmentation and matching points as boundaries, perform dynamic path planning, and quickly identify abnormal trajectory points within a limited range.
2. The method for rapid detection of abnormal ETC data based on the improved DTW algorithm according to claim 1, characterized in that: In step 3-3, the dynamic retrieval step size for comparison is the length of the absolute value of the difference between the vehicle trajectory sequence ETra and the gantry trajectory sequence ODLJ, taken from their starting points. , The expression is: (1) in, This represents the path length of the vehicle trajectory sequence ETra. This represents the path length of the gantry trajectory sequence ODLJ.
3. The method for rapid detection of abnormal ETC data based on the improved DTW algorithm according to claim 1, characterized in that: The steps of the Anomaly Feature Detection (AFC) algorithm are as follows: Step 3-8-2-1: Based on the n vehicle transaction gantries and the standard road network topology, obtain the topology storage matrix of the corresponding standard subtree sets. ; Step 3-8-2-2: Generate a storage matrix of the corresponding real-time vehicle dynamic trajectory subtree set based on the gantry nodes through which the vehicles are en route. The storage matrix is updated by iteratively analyzing the real-time uploaded ETC transaction data. ; Step 3-8-2-3: By detecting anomalies in the subtree set, an anomaly identification matrix is obtained by marking the vehicle trajectory set with anomaly labels based on the detection results. .
4. The method for rapid detection of abnormal ETC data based on the improved DTW algorithm according to claim 3, characterized in that: The specific steps of step 3-8-2-1 are as follows: (1-1) Generate dynamic vehicle trajectories based on vehicle transaction data, with the gantry where the vehicle transaction occurs as the root node of the subtree; (1-2) Connect the root node of the subtree to the standard topology Matching them yields the corresponding standard subtree set. , S represents the i-th standard subtree; (1-3) Based on the path selection algorithm, calculate the weight of each branch of the standard subtree set. Each standard subtree corresponds to an array to store the weight of the branch.
5. The method for rapid detection of abnormal ETC data based on the improved DTW algorithm according to claim 4, characterized in that: (1-1) uses a fixed time interval to extract the dynamic trajectory of vehicle transaction data.
6. The method for rapid detection of abnormal ETC data based on the improved DTW algorithm according to claim 3, characterized in that: The specific steps of step 3-8-2-2 are as follows: (2-1) The gantry node where the vehicle completes the transaction at time T is taken as the current node, that is, the current node enters the queue as the root of the subtree; (2-2) Output the current node G1, and let the first-level child nodes (G2, G3) of the current node G1 calculate the time domain of the vehicle arriving at each first-level child node in turn according to their respective weights; (2-3) Wait for the system to confirm that the primary sub-nodes (G2, G3) have all reached their departure time; (2-4) Determine whether the vehicle has generated transaction data with any first-level child node (G2, G3) gantry within the corresponding time domain; if yes, mark the first-level child node that generated the transaction data as "0", prune the subtree of the other child node at the same level, and execute step (2-5); otherwise, mark all corresponding first-level child nodes as "1" and execute step (2-5). (2-5) Determine if there are second-level child nodes (i.e., child nodes G4, G5, G6, and G7 of the first-level child node); if yes, proceed to (2-6); otherwise, end the dynamic trajectory matching process and obtain the storage matrix of the real-time vehicle dynamic driving trajectory subtree set. ; (2-6) Determine if all first-level child nodes are marked as "1"; if yes, proceed to step (2-7); otherwise, take the first-level child node marked as "0" as the current node and proceed to step (2-2); (2-7) Determine if the current node has any unmatched sibling nodes; if yes, select the node with the largest weight among the unmatched sibling nodes corresponding to the current node as the current node and execute step (2-2); otherwise, select the first-level node corresponding to the second-level child node with the largest weight as the current node and execute step (2-2); that is, from (2-2) to (2-7) is a cyclic execution process, each time selecting the one with the largest weight, until the topological subtree has no child nodes.
7. The method for rapid detection of abnormal ETC data based on the improved DTW algorithm according to claim 3, characterized in that: In step 3-8-2-3, and Dynamic matching is performed to obtain an anomaly identifier matrix for vehicles passing through gantries. , (3) = (4) (5) in, and A successful match is marked as 0, and a non-match is marked as 1, indicating an anomaly in the gantry. Rows represent transactions involving one vehicle with multiple gantries, while columns represent transactions involving multiple vehicles with a single gantry.
8. The method for rapid detection of abnormal ETC data based on the improved DTW algorithm according to claim 3, characterized in that: It also includes the following steps: Step 3-8-2-4: Calculate the anomaly identifier matrix. The frequency of anomalies for each gantry is as follows: ,k=1,2...,n (6) in, This indicates the frequency of anomalies for each gantry. The matrix contains at most n gantry frames. It is an anomaly identifier matrix The number of vehicles involved in the supervision; Step 3-8-2-5: Calculate the gantry anomaly rate based on the frequency of gantry anomalies. The formula for calculating the gantry anomaly rate is: (7) in, This represents the average ETC gantry anomaly rate over the time period T. This indicates the abnormal frequency of vehicles passing through the ETC gantry within the time period t. t represents the number of vehicles passing through the ETC gantry during the time period t, and N represents the total number of vehicles passing through the ETC gantry.
Citation Information
Patent Citations
Vehicle abnormal deceleration region detecting method and system based on trajectory data
CN110379163A
Intersection abnormal vehicle track recognition and analysis method based on hierarchical clustering
CN110570658A