Road traffic anomaly detection method based on full-pure embedding and global search

Through the methods of fully pure embedding and global search, the problems of low data processing efficiency and low accuracy in road traffic abnormality detection are solved, and more accurate and efficient traffic abnormality detection is achieved. The defects of alternating least squares method are overcome and improved Traffic management efficiency.

CN119007450AActive Publication Date: 2024-11-22SUN YAT SEN UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411464345.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2024-11-22
Estimated Expiration
2044-10-21

AI Technical Summary

Technical Problem

In the detection of road traffic anomalies, the data has huge data volume, difficulty in extracting space-time features of data, and the alternating least squares method cannot handle CP decomposition problems containing many zero element tensors, resulting in low detection efficiency and low accuracy.

Method used

Using a method based on pure embedding and global search, map matching and seasonal filtering are obtained by obtaining floating vehicle data, urban road traffic network and tensor decomposition model are constructed, global search solutions are used using trust technology, and speed transfer matrix and Kullback are calculated. -Leibler divergence value to detect abnormal situations, overcoming the defects of alternating least squares method.

Benefits of technology

It realizes more accurate and efficient road traffic anomaly detection, improves traffic management efficiency and network efficiency, can handle tensor decomposition with zero elements, and improves computing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119007450A_ABST
    Figure CN119007450A_ABST
Patent Text Reader

Abstract

The invention provides a road traffic anomaly detection method based on full-pure embedding and global search. The method comprises the following steps: acquiring floating automobile data; defining a specific road section and calculating an average speed; constructing an urban road traffic network; constructing an average speed transfer matrix according to the probability distribution of speed conversion; constructing a tensor model according to the traffic data needing to be detected; performing global search by using a trust technology to find a local optimal solution meeting an error condition; and calculating Kullback-Leibler divergence values of the speed transfer matrix and the average speed transfer matrix so as to detect abnormal conditions in the urban road traffic network. According to the invention, road traffic abnormal conditions can be detected more accurately and efficiently, and the traffic management efficiency and the traffic network efficiency are improved; and moreover, the defects that the alternating least square method is slow in convergence, low in calculation efficiency, low in precision and incapable of processing CP decomposition of tensors containing more zero elements are overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of traffic anomaly detection, and in particular to a road traffic anomaly detection method based on holomorphic embedding and global search. Background Art

[0002] With the acceleration of urbanization, urban road traffic systems are facing increasingly severe challenges, including but not limited to traffic congestion, frequent traffic accidents, delayed emergency response, etc. Traditional traffic management methods often rely on manual observation and experience judgment, which is difficult to meet the dynamic and complex needs of modern urban traffic.

[0003] With the development of the Internet of Things, big data, and artificial intelligence technologies, it has become possible to monitor traffic conditions using multi-source information such as vehicle-mounted GPS, traffic cameras, and mobile communication data. Road traffic anomaly detection focuses on identifying situations that are significantly different from normal traffic flow patterns. Here, "abnormality" usually refers to behaviors or events in which key indicators such as traffic flow, speed, and density deviate from historical statistical laws or expected patterns within a given time period. These anomalies may be caused by traffic accidents, changes in weather conditions, road construction, emergencies, etc. After road traffic anomaly detection, the results obtained can be applied to traffic management in a variety of ways to optimize traffic flow, improve safety, and improve citizens' travel experience. Although existing technologies can perform road traffic anomaly detection based on the above data, there are still problems such as huge data volume and difficulty in extracting data spatiotemporal features.

[0004] In view of the above problems, tensor analysis technology, especially tensor CP decomposition, has gradually attracted attention in the field of traffic research due to its ability to process multidimensional data. Tensor CP decomposition can decompose a high-order tensor (i.e., a multidimensional data structure) into the sum of several rank tensors, each of which represents a basic pattern or component in the data. This decomposition method shows great potential in revealing the potential structure of traffic behavior, pattern recognition, and anomaly detection, and provides a new perspective and tool for urban road traffic anomaly detection. Alternating least squares method is a commonly used algorithm for solving tensor CP decomposition. This method transforms the CP decomposition model into an unconstrained optimization problem for solution. However, this method cannot guarantee convergence to the global optimum or the stationary point, but can only guarantee that the objective function will no longer decrease. When solving the CP decomposition of high-order tensors, the error is large, the convergence is slow, and the computational efficiency is low; and it cannot handle the CP decomposition of tensors containing many zero elements. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention provides a road traffic anomaly detection method based on holomorphic embedding and global search. The present invention can detect road traffic anomalies more accurately and efficiently, thereby improving traffic management efficiency and traffic network performance; and the present invention overcomes the defect that the alternating least squares method cannot handle the CP decomposition of tensors containing more zero elements.

[0006] The technical solution of the present invention is: a road traffic anomaly detection method based on holomorphic embedding and global search, comprising the following steps: S1), obtain floating car data, and perform map matching and seasonal filtering on it; S2), defining specific road sections and calculating the average speed of each road section; S3) Constructing the urban road traffic network based on the defined road sections; S4), constructing an average speed transfer matrix according to the probability distribution of speed conversion; S5), constructing a tensor decomposition model according to the traffic data to be detected, and solving it; S6), using trust technology to perform global search to find a local optimal solution that meets the error condition; and reducing the local optimal solution to a speed transfer matrix, a factor matrix of adjacent sections and time intervals in the urban road traffic network; S7), calculate the Kullback-Leibler divergence value of the restored speed transfer matrix and the average speed transfer matrix in the road traffic network to detect abnormal conditions in the urban road traffic network.

[0007] Preferably, in step S1), seasonal components are removed from the original floating car data, and the nearest road or the most likely road is determined based on the three indicators of position, speed and direction by calculating the distance between the GPS point and each road on the map and combining the speed and direction information of the vehicle, specifically including the following steps: S11), obtaining the location data of the vehicle; S12), loading road network data; S13), cleaning the vehicle data; S14), using a similarity matching algorithm to preliminarily match the GPS coordinates with roads in the road network; S15), using the speed and direction information of the vehicle to improve the matching results; S16) and verify the results.

[0008] Preferably, in step S11), the vehicle location data includes GPS coordinates (longitude and latitude), timestamp, speed, and direction.

[0009] Preferably, in step S12), the road network data of the road is geometric information, including the longitude and latitude of the road, the road type, and the speed limit.

[0010] Preferably, in step S15), the speed and direction information of the vehicle is used to improve the matching result, which specifically includes the following steps: S151), checking whether the speed of the vehicle is within the expected speed range of the road; S152), calculating the direction angle of the vehicle and comparing it with the direction of the road. If the driving direction of the vehicle is roughly the same as the direction of the road, the match is considered to be more reliable; S153), comprehensively considering the matching degree between the position, speed and direction of the vehicle and the road, and selecting the road with the highest matching degree as the final result according to the comprehensive score.

[0011] Preferably, in step S16), a map visualization tool is used to check the matching results.

[0012] Preferably, in step S2), defining road sections and calculating average speeds of different road sections specifically includes the following steps: S21), defining specific road sections according to map data, and road signs, intersections or natural dividing points of the road; S22), for each defined road section, extracting data of all vehicles passing through the road section; S23), calculating the travel time of the vehicle through the road section according to the timestamps of the starting point and the end point of the road section passed by the vehicle; S24), determining the length of each road section according to the map data; S25), according to the length and travel time of each road section, calculate the average speed of the corresponding road section.

[0013] Preferably, in step S22), the extracted vehicle data includes vehicle ID, timestamp, location, and speed.

[0014] Preferably, in step S3), the urban road traffic network is constructed by using defined road sections as edges and road intersections as nodes.

[0015] Preferably, in step S4), an average speed transfer matrix is ​​constructed according to the probability distribution of speed conversion; specifically, the steps include: S41), defining Z speed intervals and collecting vehicle speed data on each road section; then traversing each vehicle speed data and counting it; S42), constructing a speed probability distribution matrix according to the Z speed intervals; S43), dividing the elements of each row of the speed probability distribution matrix by the sum of the elements of the row to obtain an average speed transfer matrix.

[0016] Preferably, in step S5), a tensor decomposition model is constructed and solved according to the traffic data to be detected, which specifically includes the following steps: S51), the expression of the constructed tensor decomposition model is: In the formula, is a third-order tensor; represents the size of the velocity transfer matrix, represents the number of adjacent road segment pairs in the urban road traffic network, represents the number of time intervals; ; Indicates rank; They represent the speed transfer matrix, the factor matrix of adjacent road sections and time intervals in the urban road traffic network respectively; S52), after the tensor is decomposed by CP, three factor matrices will be obtained , , ; Establish the following unconstrained optimization problem to find a rank Tensor Make it Close, that is: S53) The unconstrained optimization problem is transformed into a projected gradient system through trust technology, namely: In the formula, is the factor matrix Elements in for The Jacobian matrix of ; For time; is the number of time intervals; is a vector function where each element satisfy: in, ; S54), fast and flexible holomorphic embedding method to solve projected gradient system, and solve function Perform a power series expansion: in, is the solution function In the power series expansion of The coefficient of the term, As the starting point of the extension, substitute equation (5) into equation (3) and compare the two sides. The coefficients of the same-order terms are used to establish equations and equation groups, and the coefficients of the power series expansion are calculated. Then, the power series expansion of the solution function is obtained, and then a rational approximation is constructed based on the existing power series coefficients to calculate the numerical solution that meets the error conditions.

[0017] The beneficial effects of the present invention are: 1. The present invention solves differential equations by constructing a power series expansion of the solution function, and adopts piecewise rational approximation. It only needs to divide the target interval into a few segments to approximate the extension path with high precision; it can effectively overcome the defects of slow convergence and low calculation efficiency of the alternating least squares method; 2. The present invention uses global search technology to expand the search domain when solving optimization problems, and searches for multiple local optimal solutions by layer-by-layer search, thereby making it possible to find high-quality local optimal solutions, which can effectively overcome the defect of low precision of the alternating least squares method; 3. The present invention can detect abnormal road traffic conditions more accurately and efficiently, thereby improving traffic management efficiency and traffic network performance; and the present invention overcomes the defect that the alternating least squares method cannot handle the CP decomposition of tensors containing many zero elements. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a schematic diagram of the process of the present invention; Figure 2 A schematic diagram of a process for constructing and solving a tensor decomposition model for the present invention; Figure 3 It is a schematic diagram of the flow of the projection gradient calculation system of the present invention. DETAILED DESCRIPTION

[0019] The specific implementation of the present invention will be further described below in conjunction with the accompanying drawings: like Figure 1 As shown, this embodiment provides a road traffic anomaly detection method based on holomorphic embedding and global search, comprising the following steps: S1), obtain floating car data, and perform map matching and seasonal filtering on it; This embodiment continuously tracks and records the data received from the satellite based on the global satellite navigation system (GNSS) receiver installed on the vehicle, and transmits the data to the central server or cloud platform; then removes the seasonal component from the original floating car data, calculates the distance between the GPS point and each road on the map, and combines the speed and direction information of the vehicle to find the nearest road or the most likely road. Specifically, it includes the following steps: S11), obtaining the vehicle's location data, including GPS coordinates (including longitude and latitude), timestamp, speed, and direction; S12), loading road network data; road network data is mainly geometric information, usually including the longitude and latitude of the road, road type, and speed limit; S13), cleaning the vehicle data, in this embodiment, removing outliers; S14), using a similarity matching algorithm to preliminarily match the GPS coordinates with the roads in the road network, this embodiment only considers the location; S15), using the speed and direction information of the vehicle to improve the matching results; S16), perform result verification. In this embodiment, a map visualization tool is used to check the matching results.

[0020] Preferably, in step S15), the speed and direction information of the vehicle is used to improve the matching result, which specifically includes the following steps: S151), checking whether the speed of the vehicle is within the expected speed range of the road; S152), calculating the direction angle of the vehicle and comparing it with the direction of the road. If the driving direction of the vehicle is roughly the same as the direction of the road, the match is considered to be more reliable; S153), comprehensively considering the matching degree between the position, speed and direction of the vehicle and the road, and selecting the road with the highest matching degree as the final result according to the comprehensive score.

[0021] S2), defining specific road sections and calculating the average speed of each road section; specifically comprising the following steps: S21), defining specific road sections according to map data, and road signs, intersections or natural dividing points of the road; S22), for each defined road section, extracting all vehicle data passing through the road section, wherein the extracted vehicle data includes vehicle ID, timestamp, location, and speed; S23), calculating the travel time of the vehicle through the road section according to the timestamps of the starting point and the end point of the road section passed by the vehicle; S24), determining the length of each road section according to the map data; S25), according to the length and travel time of each road section, the average speed of the corresponding road section is calculated, and the calculation formula is expressed as: ; The calculated average speed is analyzed and checked for abnormal values ​​or extreme cases. If abnormal data is found, steps S23) - S25) are repeated.

[0022] S3) Constructing the urban road traffic network based on the defined road sections; In this embodiment, the urban road traffic network is constructed by using defined road sections as edges and road intersections as nodes.

[0023] S4), constructing an average speed transfer matrix according to the probability distribution of speed conversion; specifically comprising the following steps: S41), defining Z speed intervals and collecting vehicle speed data on each road section; then traversing each vehicle speed data and counting it; S42) Construct a speed probability distribution matrix based on the Z speed intervals, where each row of the speed probability distribution matrix represents the current state and each column represents the next state; the elements in the matrix Represents the vehicle speed from the interval Convert to interval The number of observations; S43), dividing the elements of each row of the speed probability distribution matrix by the sum of the elements of the row to obtain an average speed transfer matrix.

[0024] S5), construct a tensor decomposition model based on the traffic data to be detected, and solve it; Figure 2 As shown, the specific steps include: S51), the expression of the constructed tensor decomposition model is: In the formula, is a third-order tensor; represents the size of the velocity transfer matrix, represents the number of adjacent road segment pairs in the urban road traffic network, represents the number of time intervals; ; Indicates rank; They represent the speed transfer matrix, the factor matrix of adjacent road sections and time intervals in the urban road traffic network respectively; S52), after the tensor is decomposed by CP, three factor matrices will be obtained , , ; Establish the following unconstrained optimization problem to find a rank Tensor Make it Close, that is: S53) The unconstrained optimization problem is transformed into a projected gradient system through trust technology, namely: In the formula, is the factor matrix Elements in for The Jacobian matrix of ; For time; is the number of time intervals; is a vector function where each element satisfy: in, ; S54) Solve the projected gradient system using a fast and flexible holomorphic embedding method, and solve the function Perform a power series expansion: in, is the solution function In the power series expansion of The coefficient of the term, As the starting point of the extension, substitute equation (5) into equation (3) and compare the two sides. The coefficients of the same-order terms are used to establish equations and equation groups, and the coefficients of the power series expansion are calculated. Then, the power series expansion of the solution function is obtained, and then a rational approximation is constructed based on the existing power series coefficients to calculate the numerical solution that meets the error conditions.

[0025] As preferred in this embodiment, Figure 3 As shown, in step S54), the projected gradient system is solved using a fast and flexible holomorphic embedding method, which specifically includes the following steps: S541), initialization, set the order of the power series expansion to , the allowable error threshold on both sides of the equation is , the maximum interval length of each extension is , the optional initial point is ; S542) For a given ;by The power series with parameter is expressed as: in, yes In the power series expansion of The coefficient of the term; S543), Substitute the power series into equation (3) to obtain an equation with the coefficients of the power series expansion as unknowns, namely: in, is an unknown vector In the power series expansion of The coefficient vector of the term; q is the degree of the power series expansion; S544), since the right side of equation (6) is a polynomial vector, equation (7) is rewritten as: in, ; By deriving the power series expansion of the composite function, the vector function is calculated In the power series expansion of The coefficient vector of the term ;Compare The coefficients of the same-order terms of , find the coefficients of the power series expansion; From equation (8), we can get equation (9), and establish The system of equations satisfied and solved to obtain Values: S545) ,pass The power series information of The rational approximation of and its derivatives; S546) The rational approximation of the solution function and its derivative function are Substitute the value at into equation (3) and compare whether the difference between the left and right sides of the equation is less than the preset allowable error threshold. ; If satisfied, record ; If not satisfied, reduce , until it is satisfied, and finally recorded as ; then update ; S547), repeat steps S542) to S546), until the exist The value at is less than the given tolerance threshold ,but That is the numerical solution of the projected gradient system, denoted as ; S548) Substitute into formula (1) and determine whether the error condition is met. If so, proceed to step S7); if not, proceed to step S6); S6), using trust technology to perform global search to find the local optimal solution that meets the error condition and restore the speed transfer matrix; specifically including the following steps: S61), initialize the local optimal point set ;No. The set of local optimal points of a layer ; Escape point set ; Several search path sets , Order layer ; S62) Set the The set of local optimal points of a layer ; S63) The local optimum in ,from Select a search path to find the escape point, denoted as , Subscript the search path and update the set of escape points ; S64), from the escape point Set out to find The local optimal point of the adjacent layer ; Substitute the local optimal point into equation (1) to determine whether the error condition is met; If it satisfies, then save this local optimal point as , terminate the calculation; If not satisfied, then judge whether If not, update , , then switch to another search path and repeat steps S63) and S64) for all local optimal points After completing the above steps, determine Is it equal to If yes, proceed to step S65), otherwise, update , proceed to step S62); S65) The local optimal solution It is reduced to the speed transfer matrix, the factor matrix of adjacent road sections and time intervals in the urban road traffic network.

[0026] S7), calculating the Kullback-Leibler divergence value of the restored speed transfer matrix and the average speed transfer matrix in the road traffic network to detect abnormal conditions in the urban road traffic network, specifically comprising the following steps: S71) is the velocity transfer matrix restored in step S6), is the average velocity transfer matrix, and the elements of each matrix and Respectively represent the speed range Transfer to speed zone The probability of ; calculating the Kullback-Leibler divergence value between the two matrices; specifically including the following steps: S711), for each speed interval , calculate the Kullback-Leibler divergence value between the row vectors corresponding to the interval, for the The Kullback-Leibler divergence is defined as: In the formula, and Respectively represent matrices and No. OK; S712), according to the following formula, take the average value of the Kullback-Leibler divergence of all rows to obtain the matrix and KL divergence of: Where Z is the number of speed intervals; S72) A threshold is set based on historical data. If the Kullback-Leibler divergence value during the test period exceeds the preset threshold, it is considered that an abnormal situation exists.

[0027] The above embodiments and descriptions are only for illustrating the principles and best embodiments of the present invention. Without departing from the spirit and scope of the present invention, the present invention may be subject to various changes and improvements, all of which fall within the scope of the present invention to be protected.

Claims

1. A road traffic anomaly detection method based on holomorphic embedding and global search, characterized in that: The following steps are involved: S1), obtain floating car data, and perform map matching and seasonal filtering on it; S2), defining specific road sections and calculating the average speed of each road section; S3) Constructing the urban road traffic network based on the defined road sections; S4), constructing an average speed transfer matrix according to the probability distribution of speed conversion; S5), constructing a tensor decomposition model according to the traffic data to be detected, and solving it; S6), using trust technology to perform global search to find the local optimal solution that meets the error condition; and reducing the local optimal solution to the speed transfer matrix, the factor matrix of adjacent sections and time intervals in the urban road traffic network; S7), calculate the Kullback-Leibler divergence value of the restored speed transfer matrix and the average speed transfer matrix in the road traffic network to detect abnormal conditions in the urban road traffic network.

2. The method for detecting road traffic anomalies based on holomorphic embedding and global search according to claim 1 is characterized in that: In step S1), the nearest road or the most likely road is found by calculating the distance between the GPS point and each road on the map and combining the speed and direction information of the vehicle.

3. The road traffic anomaly detection method based on holomorphic embedding and global search according to claim 1 is characterized in that: In step S2), road sections are defined and average speeds of different road sections are calculated, which specifically includes the following steps: S21), defining specific road sections according to map data, and road signs, intersections or natural dividing points of the road; S22), for each defined road section, extracting data of all vehicles passing through the road section; S23), calculating the travel time of the vehicle through the road section according to the timestamps of the starting point and the end point of the road section passed by the vehicle; S24), determining the length of each road section according to the map data; S25), according to the length and travel time of each road section, calculate the average speed of the corresponding road section.

4. The method for detecting road traffic anomalies based on holomorphic embedding and global search according to claim 3 is characterized in that: In step S22), the extracted vehicle data includes vehicle ID, timestamp, location, and speed.

5. The method for detecting road traffic anomalies based on holomorphic embedding and global search according to claim 1, characterized in that: In step S3), the urban road traffic network is constructed by using the defined road sections as edges and road intersections as nodes.

6. The method for detecting road traffic anomalies based on holomorphic embedding and global search according to claim 1, characterized in that: In step S4), an average speed transfer matrix is ​​constructed according to the probability distribution of speed conversion; specifically, the steps include: S41), defining Z speed intervals and collecting vehicle speed data on each road section; then traversing each vehicle speed data and counting it; S42), constructing a speed probability distribution matrix according to the Z speed intervals; S43), dividing the elements of each row of the speed probability distribution matrix by the sum of the elements of the row to obtain an average speed transfer matrix.

7. The method for detecting road traffic anomalies based on holomorphic embedding and global search according to claim 1 is characterized in that: In step S5), the expression of the tensor decomposition model constructed according to the traffic data to be detected is: In the formula, is a third-order tensor; represents the size of the velocity transfer matrix, represents the number of adjacent road segment pairs in the urban road traffic network, represents the number of time intervals; ; Indicates rank; They represent the speed transfer matrix, the factor matrix of adjacent road sections and time intervals in the urban road traffic network respectively.

8. The method for detecting road traffic anomalies based on holomorphic embedding and global search according to claim 7 is characterized in that: The tensor decomposition model described above is subjected to CP decomposition to obtain three factor matrices: , , ; Establish the following unconstrained optimization problem to find a rank Tensor Make it Close, that is: And the unconstrained optimization problem is transformed into a projected gradient system through the trust technique, namely: In the formula, is the factor matrix Elements in for The Jacobian matrix of ; For time; is the number of time intervals; is a vector function where each element satisfy: in, .

9. The method for detecting road traffic anomalies based on holomorphic embedding and global search according to claim 8, characterized in that: Using a fast and flexible holomorphic embedding method to solve the projected gradient system, the solution function Perform a power series expansion: in, is the solution function In the power series expansion of The coefficient of the term, As the starting point of the extension, substitute equation (5) into equation (3) and compare the two sides. The coefficients of the same-order terms are used to establish equations and equation groups, and the coefficients of the power series expansion are calculated. Then, the power series expansion of the solution function is obtained, and then a rational approximation is constructed based on the existing power series coefficients to calculate the numerical solution that meets the error conditions.

10. The method for detecting road traffic anomalies based on holomorphic embedding and global search according to claim 1, characterized in that: In step S7), the Kullback-Leibler divergence value of the restored speed transfer matrix and the average speed transfer matrix in the road traffic network is calculated to detect abnormal conditions in the urban road traffic network, which specifically includes the following steps: S71) is the velocity transfer matrix restored in step S6), is the average velocity transfer matrix, and the elements of each matrix and Respectively represent the speed range Transfer to speed zone The probability of ; calculating the Kullback-Leibler divergence value between the two matrices; specifically including the following steps: S711), for each speed interval , calculate the Kullback-Leibler divergence value between the row vectors corresponding to the interval, for the The Kullback-Leibler divergence is defined as: In the formula, and Respectively represent matrices and No. OK; S712), according to the following formula, take the average value of the Kullback-Leibler divergence of all rows to obtain the matrix and KL divergence of: Where Z is the number of speed intervals; S72) A threshold is set based on historical data. If the Kullback-Leibler divergence value during the test period exceeds the preset threshold, it is considered that an abnormal situation exists.

Citation Information

Patent Citations

  • Road condition generation method, related device and equipment

    CN109919347A

  • Traffic abnormity identification method and system based on travel time evolution, and storage medium

    CN111192454A

  • SMO-based traffic jam real-time prediction and alleviation method, electronic equipment and storage medium

    CN117392850A

  • Method for automatically controlling a vehicle, device for generating control signals for a vehicle and vehicle

    EP2881829B1

  • Method of creating a speed estimation

    US20100318286A1