Traffic jam prediction method based on graph neural network

By constructing the urban traffic monitoring graph structure and the graph neural network prediction method, the problem of limited traffic congestion detection range and difficulty in classifying the causes of congestion is solved, accurate prediction and optimization of traffic congestion is achieved, and a low-cost detection framework is provided to help Alleviating the unhealthy state of the transportation system.

CN118570694APending Publication Date: 2024-08-30SOUTHWEST PETROLEUM UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410624818.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The existing technology has problems in traffic congestion detection, such as limited detection range and difficulty in classifying the causes of congestion, which makes it difficult to effectively reduce traffic congestion time and energy waste.

Method used

Adopting a traffic congestion prediction method based on graph neural network, by constructing an urban traffic monitoring graph structure, collecting surveillance video data for target detection, calculating traffic attributes and abnormal event sequences, and using graph neural network for traffic congestion prediction, combined with clustering algorithms, Temporal convolutional network, local spectral graph convolutional neural network and long short-term memory network to predict traffic congestion.

Benefits of technology

It achieves accurate prediction of urban traffic congestion, focuses on the correlation between the current location and surrounding areas, provides a low-cost traffic congestion detection framework, helps alleviate unhealthy traffic system conditions, and provides new methods for the optimization of intelligent transportation systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570694A
    Figure CN118570694A
Patent Text Reader

Abstract

The invention discloses a traffic jam prediction method based on a graph neural network, and belongs to the field of target detection, and the method comprises the following steps: constructing an urban traffic monitoring graph structure, and collecting monitoring video data; monitoring video data are collected, and the monitoring video data comprise video data of different periods; performing target detection on the monitoring video data to obtain a traffic attribute and an abnormal event sequence; and based on the urban traffic monitoring graph structure, adopting a graph neural network to carry out traffic jam prediction on the traffic attributes and the abnormal event sequence to obtain a prediction result of the monitor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of target detection, and in particular relates to a traffic congestion prediction method based on graph neural network. Background Art

[0002] With the development of economy and technology, many countries will have serious traffic congestion problems at a certain time and space. Traffic congestion greatly reduces the efficiency of traffic operation, which causes serious waste of energy and time. Traffic congestion is one of the important challenges facing cities, and modern technology is being widely used to monitor and manage urban traffic flow to deal with congestion problems.

[0003] Sensor technology is one of the important means of detecting traffic congestion. By deploying equipment such as vehicle detectors, cameras, radars, and geomagnetic sensors on the road, the flow, speed, and density of vehicles can be monitored in real time to identify congestion. These sensors can transmit data to a central server via a wireless network for analysis and processing.

[0004] Intelligent Transportation System (ITS) is another key technology, which combines sensor technology, communication technology and information processing technology. ITS can realize intelligent control of traffic lights, intelligent navigation of vehicles and route optimization, thus reducing traffic congestion.

[0005] Data analysis and artificial intelligence technologies also play an important role in traffic congestion detection. Through the analysis of big data, the patterns and trends of traffic congestion can be identified, helping traffic management departments to make corresponding adjustments. At the same time, artificial intelligence technology can predict and identify congestion through machine learning and predictive algorithms, so that measures can be taken in advance to alleviate congestion.

[0006] The existing technology of traffic congestion detection has made significant progress. Through sensor technology, intelligent transportation systems, data analysis and artificial intelligence, urban traffic management departments can monitor and respond to traffic congestion more accurately and timely, providing strong support for the optimization of urban traffic flow. However, detection based on graph neural networks under surveillance videos is still a relatively new field. Therefore, this method uses graph neural networks and logistic regression methods to detect congestion and classify the causes of congestion, thereby reducing the time and energy waste of congestion. Summary of the invention

[0007] In order to solve the above technical problems, the present invention proposes a traffic congestion prediction method based on graph neural network to solve the problems existing in the above-mentioned prior art.

[0008] To achieve the above object, the present invention provides a traffic congestion prediction method based on graph neural network, comprising:

[0009] Construct urban traffic monitoring graph structure and collect monitoring video data;

[0010] Collecting surveillance video data, wherein the surveillance video data includes video data of different periods; performing target detection on the surveillance video data to obtain traffic attributes and abnormal event sequences;

[0011] Based on the urban traffic monitoring graph structure, a graph neural network is used to predict traffic congestion based on the traffic attributes and abnormal event sequences to obtain the prediction result of the monitor.

[0012] Optionally, the process of constructing the urban traffic monitoring graph structure includes:

[0013] Construct city monitor graph and city traffic light graph based on clustering algorithm;

[0014] Based on the geographical location information, the signal light information of the city traffic signal light diagram is integrated into the city monitor diagram to obtain a city traffic monitoring diagram structure.

[0015] Optionally, the video data of different periods collected based on the monitoring points include: three-hour data, daily data and weekly data.

[0016] Optionally, the process of performing target detection on the surveillance video data includes:

[0017] Identify the number of lanes, number of vehicles, length of road section and abnormal events in the monitoring video data based on the YOLOv8 network;

[0018] Recording the start time and end time of the abnormal event to obtain an abnormal event sequence;

[0019] Detecting the vehicle coordinates in the surveillance video data based on a multi-target tracking algorithm;

[0020] The traffic attributes are calculated based on the number of lanes, the number of vehicles, the length of the road section and the vehicle coordinates, wherein the traffic attributes include: average vehicle speed, traffic flow density and congestion index.

[0021] Optionally, the calculation formula of the congestion index is:

[0022]

[0023] In the formula, δ represents the congestion index and D represents the traffic flow density.

[0024] Optionally, the process of using a graph neural network to predict traffic congestion based on the traffic attributes and abnormal event sequences based on the urban traffic monitoring graph structure includes:

[0025] Constructing time series of different periods based on the traffic attributes of the surveillance videos taken by different monitoring points; wherein the time series of different periods include three-hour time series, daily time series and weekly time series;

[0026] Processing the daily time series and the weekly time series based on spatiotemporal embedding to obtain daily data embedding and weekly data embedding;

[0027] Processing the three-hour time series, daily data embedding, and weekly data embedding based on a time convolutional network to obtain spatiotemporal feature data;

[0028] Processing the spatiotemporal feature data based on a local spectral graph convolutional neural network to obtain correlations between nodes;

[0029] Processing the abnormal event sequence based on a long short-term memory network to obtain a time pattern of congestion events;

[0030] The prediction results of the monitoring points are obtained based on the time pattern of the congestion event and the correlation between the nodes.

[0031] Optionally, the calculation process of processing the three-hour time series, daily data embedding and weekly data embedding based on the time convolution network is:

[0032]

[0033] Where S is the input of the temporal convolutional network, Θ1 is the first learnable parameter, Θ2 is the second learnable parameter, b is the third learnable parameter, c is the fourth learnable parameter, △ represents the 1D convolution operation, ⊙ is the element-wise product, Tangent hyperbolic activation function, σ is the sigmoid activation function.

[0034] Optionally, before processing the spatiotemporal feature data based on the local spectral graph convolutional neural network, the method further includes using an attention mechanism to determine weights of different periods; wherein the calculation formula for determining the weights is:

[0035]

[0036]

[0037]

[0038]

[0039]

[0040] Where a is the fifth learnable parameter, A1 is the sixth learnable parameter, A2 is the seventh learnable parameter, and d is the eighth learnable parameter. and They are daily cycle embedding and weekly cycle embedding, Y R is the most recent period embedding, e D represents the importance of daily period embedding compared to the most recent period embedding, e W is the importance of weekly cycle embedding compared to the recent cycle embedding, ATT o is the output of the attention layer.

[0041] Compared with the prior art, the present invention has the following advantages and technical effects:

[0042] The present invention constructs a city traffic monitoring graph structure and collects monitoring video data; collects monitoring video data, wherein the monitoring video data includes video data of different periods; performs target detection on the monitoring video data to obtain traffic attributes and abnormal event sequences; and uses a graph neural network based on the city traffic monitoring graph structure to predict traffic congestion for the traffic attributes and abnormal event sequences to obtain the prediction results of the monitor. The present invention has the following technical effects: (1) The present invention constructs the city monitor network into a graph structure, which can not only focus on the congestion situation at the current location, but also obtain the correlation with the surrounding area. (2) The present invention proposes a low-cost framework for traffic congestion detection. (3) The traffic system of most cities is in an unhealthy state. The present invention provides a method for detecting congestion, providing direction for taking measures to alleviate the unhealthy state. (4) The present invention provides a new method for continuously improving and optimizing traffic congestion prediction for intelligent transportation systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0044] Figure 1 is a prediction flow chart of an embodiment of the present invention;

[0045] Figure 2 This is a graph neural network structure diagram of an embodiment of the present invention. DETAILED DESCRIPTION

[0046] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0047] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0048] Embodiment 1

[0049] The present invention proposes a traffic congestion prediction method based on graph neural network. The purpose is: (1) Using the video captured by the monitor as the basic detection data solves the problem that the sensor-based detection is difficult to fully cover, resulting in a limited detection range; (2) A static graph structure is established for all monitors in the city, increasing the data interaction between adjacent monitors, and solving the direct or indirect impact of congestion on adjacent sections. (3) The target detection technology is added to solve the problem of classifying the causes of congestion (such as traffic accidents, construction, etc.) when there is congestion.

[0050] like Figure 1 As shown, this embodiment provides a traffic congestion prediction method based on a graph neural network, comprising the following steps:

[0051] Construct urban traffic monitoring graph structure and collect monitoring video data;

[0052] Collecting surveillance video data, wherein the surveillance video data includes video data of different periods; performing target detection on the surveillance video data to obtain traffic attributes and abnormal event sequences;

[0053] Based on the urban traffic monitoring graph structure, a graph neural network is used to predict traffic congestion based on traffic attributes and abnormal event sequences to obtain the prediction results of the monitor.

[0054] The specific implementation process includes:

[0055] S1: Construct the city’s traffic monitoring into a graph structure.

[0056] S11: Use a clustering algorithm to establish a city monitor graph (nodes are monitors, and edges are distances between two monitors) and a city traffic light graph (nodes are traffic lights, and edges are distances between two traffic lights).

[0057] S12: Integrate traffic light information into the nodes of the monitor graph through the real geographic location as the attribute of the monitor node, construct an initial graph with attributes, that is, the urban traffic monitoring graph structure, and classify the nodes, 1 means no traffic light, 2 means there is a traffic light.

[0058] S13: Integers 1 to 8 are used to represent the geographical location relationship between the nodes, which respectively represent directly in front, directly behind, directly to the left, directly to the right, left front, right front, left back, and right back.

[0059] S2: Collect surveillance video data.

[0060] S21: Divide the video data of each monitoring point into three categories: data within three hours, daily data, and weekly data.

[0061] S22: One time interval of the video dataset is 5 minutes.

[0062] S3: Perform target detection.

[0063] S31: Use YOLOv8 to collect the number of lanes, number of vehicles, length of the road section currently photographed by the monitor, and whether there are any abnormal situations.

[0064] S32: Use a multi-target tracking algorithm to detect the initial coordinates of the vehicle in the video and the coordinates of the next frame detection, so as to collect the speed of each vehicle in the field of view.

[0065] S33: If an abnormal event occurs, the abnormal start time and end time are recorded, the duration of the abnormal event is calculated, and the abnormal event sequence is obtained.

[0066] S4: Process the detected values ​​to obtain a congestion index.

[0067] S41: Calculate the average speed, which is the average of the speeds of all vehicles per unit time:

[0068]

[0069] v i is the speed of each vehicle and n is the number of vehicles.

[0070] S42: Calculate traffic flow density: n is the number of vehicles, m is the number of lanes, and L is the length of the road at the current viewing angle.

[0071] S43: Calculate the congestion index:

[0072]

[0073] The smaller δ is, the more congested the traffic is; otherwise, the smoother the traffic is.

[0074] According to the traffic congestion index, the current traffic situation is graded: 7≤δ≤10 means smooth traffic; 4≤δ<7 means light congestion; 2≤δ<4 means moderate congestion; and 0≤δ<2 means severe congestion.

[0075] S44: The video time interval is five minutes, and the congestion index sequence corresponding to each node is obtained every five minutes.

[0076] The process of using graph neural network to predict traffic congestion based on traffic attributes and abnormal event sequences based on the urban traffic monitoring graph structure includes: constructing time series of different periods based on the traffic attributes of monitoring videos taken by different monitoring points; among them, time series of different periods include three-hour time series, daily time series and weekly time series; processing daily time series and weekly time series based on spatiotemporal embedding to obtain daily data embedding and weekly data embedding; processing three-hour time series, daily data embedding and weekly data embedding based on time convolutional network to obtain spatiotemporal feature data; processing spatiotemporal feature data based on local spectral graph convolutional neural network to obtain the correlation between nodes; processing abnormal event sequences based on long short-term memory network to obtain the time pattern of congestion events; obtaining the prediction results of monitoring points based on the time pattern of congestion events and the correlation between nodes. The specific implementation process includes:

[0077] S5: Use graph neural networks to predict future traffic conditions, as shown in the attached Figure 2 shown.

[0078] S51: Assume that the time at this time is T0, and the prediction target is the traffic volume from T0+1 to T0+X, so as to predict the occurrence of traffic congestion.

[0079] (1) Time series for the last three hours: (L is the length of the time series).

[0080] (2) Daily cycle time series:

[0081]

[0082] T D is the number of samples in a day, n is the number of days, T P is the number of prediction time steps.

[0083] (3) Weekly time series:

[0084]

[0085] T W is the number of samples in a week, n ​​is the number of weeks, T P is the number of prediction time steps.

[0086] S52: Use spatiotemporal embedding to process daily and weekly data to enhance the spatial and temporal expressiveness of spatiotemporal modeling. Given an input sequence S∈R T*N*D (T is the length of the time series, N is the number of monitor nodes, and D is the dimensionality of the hidden representation), defining the learnable temporal embedding E T and learnable spatial embedding E S , through broadcast operation, E T and E SExpand to the same dimension as S. Use two independent spatiotemporal embeddings, daily data embedding: Weekly data embedding: S D and S W They are daily data and weekly data. and They are the spatial embedding of daily data and the spatial embedding of weekly data, and They are time embedding for daily data and time embedding for weekly data respectively.

[0087] S53: Use the temporal convolutional network (TCN) to process the formed spatiotemporal sequence data. The formula is as follows:

[0088]

[0089] Where S is the input of the temporal convolutional network, Θ1 is the first learnable parameter, Θ2 is the second learnable parameter, b is the third learnable parameter, c is the fourth learnable parameter, △ represents the 1D convolution operation, ⊙ is the element-wise product, Tangent hyperbolic activation function, σ is the sigmoid activation function.

[0090] S54: In order to further simulate the interaction between different cycles, the attention mechanism is used after TCN to determine the weights of different cycles. The calculation method is as follows:

[0091]

[0092]

[0093]

[0094]

[0095]

[0096] Where a is the fifth learnable parameter, A1 is the sixth learnable parameter, A2 is the seventh learnable parameter, and d is the eighth learnable parameter. and They are daily cycle embedding and weekly cycle embedding, Y R is the most recent period embedding, e D and e W is the attention score, e D represents the importance of daily period embedding compared to the most recent period embedding, e W Indicates the importance of weekly period embedding compared to the recent period embedding, ATT o is the output of the attention layer.

[0097] S55: A local spectral graph convolutional neural network (SGCN) is used to aggregate the neighboring node information of the congested node within 0 to k-1 hops to the node.

[0098] A predefined matrix A is used to represent the correlation between nodes. A is defined as follows:

[0099]

[0100] The local spectral graph convolution operation is defined as follows:

[0101]

[0102] K is the length of the graph convolution, and is a learnable parameter, P f =A / rowsum(A) is the forward transfer matrix, P b =A T / rowsum(A T ) is the reverse transfer matrix.

[0103] The output of the i-th layer local spectral graph convolutional neural network is used as the input of the i+1-th layer:

[0104]

[0105] Wherein, X is R or D or W.

[0106] Based on multi-layer convolution operations, the periodic interaction between the current node and other surrounding nodes is predicted.

[0107] S56: The time interval between traffic congestion may be several minutes or even hours, so the distribution of traffic congestion is sparse. The congestion event sequence can provide the short-term and medium-term time patterns of traffic congestion. The congestion events are encoded, including the start time, end time, and duration, to form a congestion sequence, and the congestion event sequence is input into the long short-term memory network (LSTM) to model the time pattern of congestion events.

[0108] S6: Combine the output results to predict the future traffic congestion of each monitor node.

[0109] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A traffic congestion prediction method based on graph neural network, characterized in that: include: Construct urban traffic monitoring graph structure and collect monitoring video data; Collecting monitoring video data, wherein the monitoring video data includes video data of different periods; Performing target detection on the surveillance video data to obtain traffic attributes and abnormal event sequences; Based on the urban traffic monitoring graph structure, a graph neural network is used to predict traffic congestion based on the traffic attributes and abnormal event sequences to obtain the prediction result of the monitor.

2. The traffic congestion prediction method based on graph neural network according to claim 1 is characterized in that: The process of constructing the urban traffic monitoring graph structure includes: Construct city monitor graph and city traffic light graph based on clustering algorithm; Based on the geographical location information, the signal light information of the city traffic signal light diagram is integrated into the city monitor diagram to obtain a city traffic monitoring diagram structure.

3. The traffic congestion prediction method based on graph neural network according to claim 1 is characterized in that: The video data of different periods collected based on monitoring points include: three-hour data, daily data and weekly data.

4. The traffic congestion prediction method based on graph neural network according to claim 3 is characterized in that: The process of performing target detection on the surveillance video data includes: Identify the number of lanes, number of vehicles, length of road section and abnormal events in the monitoring video data based on the YOLOv8 network; Recording the start time and end time of the abnormal event to obtain an abnormal event sequence; Detecting the vehicle coordinates in the surveillance video data based on a multi-target tracking algorithm; The traffic attributes are calculated based on the number of lanes, the number of vehicles, the length of the road section and the vehicle coordinates, wherein the traffic attributes include: average vehicle speed, traffic flow density and congestion index.

5. The traffic congestion prediction method based on graph neural network according to claim 4 is characterized in that: The calculation formula of the congestion index is: In the formula, δ represents the congestion index and D represents the traffic flow density.

6. The traffic congestion prediction method based on graph neural network according to claim 1 is characterized in that: The process of using a graph neural network to predict traffic congestion based on the traffic attributes and abnormal event sequences based on the urban traffic monitoring graph structure includes: Constructing time series of different periods based on the traffic attributes of the surveillance videos taken by different monitoring points; wherein the time series of different periods include three-hour time series, daily time series and weekly time series; Processing the daily time series and the weekly time series based on spatiotemporal embedding to obtain daily data embedding and weekly data embedding; Processing the three-hour time series, daily data embedding, and weekly data embedding based on a time convolutional network to obtain spatiotemporal feature data; Processing the spatiotemporal feature data based on a local spectral graph convolutional neural network to obtain correlations between nodes; Processing the abnormal event sequence based on a long short-term memory network to obtain a time pattern of congestion events; The prediction results of the monitoring points are obtained based on the time pattern of the congestion event and the correlation between the nodes.

7. The traffic congestion prediction method based on graph neural network according to claim 6 is characterized in that: The calculation process of processing the three-hour time series, daily data embedding and weekly data embedding based on the time convolution network is: Where S is the input of the temporal convolutional network, Θ1 is the first learnable parameter, Θ2 is the second learnable parameter, b is the third learnable parameter, c is the fourth learnable parameter, Δ represents the 1D convolution operation, ⊙ is the element-wise product, Tangent hyperbolic activation function, σ is the sigmoid activation function.

8. The method for predicting traffic congestion based on graph neural network according to claim 7, characterized in that: Before processing the spatiotemporal feature data based on the local spectral graph convolutional neural network, the method also includes using an attention mechanism to determine the weights of different periods; wherein the calculation formula for determining the weights is: Where a is the fifth learnable parameter, A1 is the sixth learnable parameter, A2 is the seventh learnable parameter, and d is the eighth learnable parameter. and They are daily period embedding and weekly period embedding, Y R is the latest cycle embedding, e D represents the importance of daily period embedding compared to the most recent period embedding, e W is the importance of weekly cycle embedding compared to the recent cycle embedding, ATT o is the output of the attention layer.