A lane-level traffic flow prediction method based on dynamic traffic flow big data
By adopting a lane-level traffic prediction method based on dynamic traffic big data in traffic flow prediction, and integrating spatiotemporal features using expanded convolution and graph convolution networks, the problem of poor accuracy and interpretability of traffic flow prediction in the prior art is solved. More accurate and interpretable lane-level traffic flow predictions are achieved.
Patent Information
- Application Number
- CN202410838440.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-06-26
AI Technical Summary
The existing traffic flow prediction methods are difficult to effectively explore the space-time dependence characteristics of road networks, resulting in insufficient accuracy of lane-level traffic flow prediction, especially poor interpretability of deep learning models, and traditional methods cannot fully explore the independence between lanes and Relevance.
The lane-level traffic prediction method based on dynamic traffic big data is adopted. By constructing an expanded convolutional neural network and a graph convolutional network, temporal and spatial characteristics are integrated, and the gating structure is designed using a self-learning matrix and attention mechanism to generate prediction results.
It improves the accuracy and interpretability of lane-level traffic flow prediction, can more fully explore the spatio-temporal characteristics of the road network and provide more accurate prediction results.
Smart Images

Figure CN118865661B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of traffic flow prediction, and in particular to a lane-level traffic flow prediction method based on dynamic traffic flow big data. Background Art
[0002] Intelligent transportation systems are considered to be effective measures to solve a series of traffic problems such as traffic congestion, and lane-level traffic flow prediction is an important support for intelligent transportation systems. However, in the real road network environment, the spatial structure of the road network is complex, and the temporal and spatial characteristics of the road network are dependent, making lane-level traffic flow prediction more difficult. Accurate traffic flow prediction provides important decision-making support for urban traffic managers, helps optimize traffic resource allocation, improve traffic signal control, etc. For travelers, it can provide them with important reference information to help them plan their trips reasonably and choose the best travel mode.
[0003] Traditional traffic flow prediction methods are mostly based on statistics and traditional machine learning models, such as the historical average (HA) model, the autoregressive integrated moving average (ARIMA) model, the support vector machine (SVM) model, etc. The characteristics of these methods are that the model design is relatively simple, but it is difficult to explore the spatial characteristics of the road network, and thus it is impossible to effectively analyze the spatiotemporal dependence characteristics of the road network, which greatly reduces the accuracy of the prediction results.
[0004] Based on this, some researchers have proposed data-driven network-scale prediction models for traffic flow prediction, such as the patent application number CN201610183090.1, which is named Prediction Method Based on Convolutional Neural Network (CNN). However, this type of prediction method has obvious limitations. This type of method can only be applied to Euclidean data, and traffic data is usually non-Euclidean data.
[0005] The prediction method based on deep learning model is considered to be an effective means to solve the above problems because it can fully explore the spatial characteristics of the road network. In recent years, the traffic flow prediction method based on deep learning has received more and more attention, such as the patent application number CN202310437213.X, which is named the urban short-term traffic flow prediction method based on the GCN-IPSO-LSTM combination model. However, the traffic flow prediction method based on deep learning is also controversial. For example, some scholars believe that the interpretability of deep learning models is poor.
[0006] Methods based on deep learning have achieved some results in the field of traffic flow prediction. However, lane-level traffic flow prediction methods based on deep learning models are still lacking. Lanes in the same road section are both independent and related to a certain extent, especially the connection between adjacent lanes is very close. Fully exploring the independence and correlation between lanes is very important for accurate traffic flow prediction. Therefore, it is necessary to explore lane-level traffic flow prediction methods. Summary of the invention
[0007] The purpose of the present invention is to disclose a lane-level traffic flow prediction method based on dynamic traffic flow big data to solve the technical problems raised in the background technology.
[0008] In order to achieve the above object, the present invention provides the following technical solutions:
[0009] The present invention provides a lane-level traffic flow prediction method based on dynamic traffic flow big data, comprising:
[0010] S1, collecting historical traffic flow information of the road network to be predicted;
[0011] S2, constructs a historical traffic flow information matrix of the road network based on the data obtained in S1, and processes the historical traffic flow information matrix of the road network using dilated convolution; at the same time, the traffic flow information of the same node in the road network at different historical times is constructed as a vector, and a learnable matrix is calculated based on the vectors of all nodes to analyze the dynamic characteristics of the road network;
[0012] S3, constructing a data-driven spatial feature adjacency matrix;
[0013] S4, designs a gating structure to integrate temporal features and spatial features. The design of this gating structure is based on the attention mechanism and global pooling operation to obtain the final prediction result.
[0014] Optionally, S2 includes:
[0015] S21, construct the road network historical traffic flow information matrix X as follows:
[0016]
[0017] is the traffic flow of the nth node in the road network at time step t, n∈[1,N]; T represents the length of the input time series, and N represents the total number of nodes;
[0018] S22, constructing an expanded convolutional neural network model. In the process of temporal feature extraction, the input of the expanded convolutional neural network model is X, a fully connected layer is used to increase the dimension of the matrix X, and the calculation result obtained by the increased dimension is processed by the expanded convolution, and a first weight matrix w1 is set;
[0019] S23, weight the result after convolution, the weight matrix is w1, and the time feature matrix X' obtained after weighting the three-layer dilated convolution is calculated:
[0020] X'=Xw1
[0021] S24, calculate the self-learning matrix:
[0022] For the lth node and the mth node in the road network, the vectors of the historical traffic flow of the two nodes are expressed as:
[0023] and
[0024] In the self-learning matrix, the values of the corresponding positions of l and m are for:
[0025]
[0026] Calculate the self-learning matrix A:
[0027]
[0028] S25, perform softmax operation on the self-learning matrix A, convert the values of all elements in A to [0,1], including:
[0029]
[0030] Express The result of the softmax operation;
[0031] S26, set the threshold r to remove redundant information with less impact:
[0032]
[0033] S27, using Construct the matrix A' after the matrix A is processed by softmax.
[0034] Optionally, S3 includes:
[0035] S31, construct the topology diagram of the road network structure:
[0036] For the i-th node and the j-th node in the road network, the true distance between the two nodes is represented as d ij , then the calculation method of the elements corresponding to these two nodes in the adjacency matrix D of the road network spatial topology graph is:
[0037]
[0038] Among them, D ij represents the value of the element corresponding to the i-th node and the j-th node in the adjacency matrix, σ represents the standard deviation of the spatial distance between the i-th node and the j-th node, and ε represents the threshold for controlling the sparsity of the adjacency matrix;
[0039] S32, constructing a lane-level analysis adjacency matrix of the road network. For the i-th node and the j-th node in the road network, the corresponding element D' in the dynamic adjacency matrix D' of the road network is ij The values are:
[0040]
[0041] in is the traffic flow of the ith node at time step z, is the average traffic flow of the ith node in the time period [tT, t], is the traffic flow of the jth node at time step z, is the average traffic flow of the jth node in the time period [tT, t];
[0042] S33: Constructing a data-driven spatial feature adjacency matrix
[0043]
[0044] Where W2 is the second weight matrix of the dynamic correlation matrix of the road network;
[0045] S34: Extracting spatial features using graph convolutional networks:
[0046]
[0047] H (b) represents the feature matrix of the b-th layer, represents the degree matrix, Represents the matrix Normalize, W b-1 represents the weight matrix of layer b-1; H (0) =X; is the degree matrix, which is a diagonal matrix, Represents diagonal elements, and the value of each position on the main diagonal is the degree, represents the i-th row and j-th column of the adjacency matrix; Indicates finding the number of edges by column.
[0048] Optionally, S4 includes:
[0049] S41, integrates the spatiotemporal information, and converts X', A', The three matrices are concatenated into a very large tensor P:
[0050]
[0051] S42, global mean pooling operation:
[0052]
[0053] p[:,:,c] represents a dimensionality reduction operation, which uses a column of elements as an index and outputs features of the other two dimensions. Represents a global pooling operation; reshape means reshaping the summation result into a matrix S;
[0054] S43, using the attention mechanism, calculate the third weight matrix W3 to perform weighted processing on the above three matrices, and the tensor obtained after processing is P';
[0055] S44, residual connection, assuming that the input time feature tensor is P0, the final output result tensor
[0056]
[0057] The final prediction result;
[0058] W4 and W5 represent a fourth weight matrix and a fifth weight matrix, respectively.
[0059] Compared with the prior art, the present invention has the following advantages:
[0060] Advantage 1: The present invention uses dilated convolution to extract temporal features, and by integrating small receptive fields and large receptive fields, the method can more fully explore temporal feature information.
[0061] Advantage 2: The present invention fully exploits the spatiotemporal characteristics in the road network and introduces a self-learning matrix to exploit the dynamic spatial characteristics in the road network, making the prediction effect of the entire model more accurate and better interpretable.
[0062] Advantage 3: The present invention is a lane-level traffic flow prediction. In some existing research results, the lane-level traffic flow prediction technology is still in the exploratory stage, and most of the traffic flow prediction methods are non-lane-level predictions. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0064] Figure 1 A schematic diagram of a lane-level traffic flow prediction method based on dynamic traffic flow big data of the present invention.
[0065] Figure 2 A schematic diagram of the principle of traditional convolution.
[0066] Figure 3 A schematic diagram of the principle of dilated convolution. DETAILED DESCRIPTION
[0067] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0068] like Figure 1 As shown, the present invention provides a lane-level traffic flow prediction method based on dynamic traffic flow big data, comprising:
[0069] S1, collecting historical traffic flow information of the road network to be predicted;
[0070] S2, constructs a historical traffic flow information matrix of the road network based on the data obtained in S1, and processes the historical traffic flow information matrix of the road network using dilated convolution; at the same time, the traffic flow information of the same node in the road network at different historical times is constructed as a vector, and a learnable matrix is calculated based on the vectors of all nodes to analyze the dynamic characteristics of the road network;
[0071] S3, constructing a data-driven spatial feature adjacency matrix;
[0072] S4, designs a gating structure to integrate temporal features and spatial features. The design of this gating structure is based on the attention mechanism and global pooling operation to obtain the final prediction result.
[0073] Optionally, S1 is:
[0074] Sensor equipment is deployed in the road network to be predicted, and the historical traffic flow information of the road network is collected by using the sensor equipment. Specifically, a certain position of a lane in the road network is taken as a minimum unit node, and the traffic flow information of the node in a certain historical time period is counted. Multiple lanes in the same section of the road network share the same sensor, and the sensor must be able to distinguish each lane and its own traffic flow.
[0075] Optionally, S2 includes:
[0076] S21, construct the road network historical traffic flow information matrix X as follows:
[0077]
[0078] is the traffic flow of the nth node in the road network at time step t, n∈[1,N]; T represents the length of the input time series, and N represents the total number of nodes;
[0079] During calculation, historical traffic flow information is input in segments, and each segment corresponds to a time series of length T.
[0080] S22, constructing an expanded convolutional neural network model. In the process of temporal feature extraction, the input of the expanded convolutional neural network model is X. A fully connected layer is used to increase the dimension of the matrix X. The calculation result obtained by the increased dimension is processed by using the expanded convolution. The matrix X is subjected to three expanded convolution operations. In order to avoid the gridding effect problem, the expansion coefficients are set to 1, 2, and 3 respectively, and the first weight matrix w1 is set.
[0081] S23, in a real road network environment, time feature dependency not only exists at relatively close time points, such as the dependency between morning peak and evening peak, so it is necessary to capture the dependency between relatively close time points while paying attention to the relationship between relatively distant time periods. Therefore, this method performs weighted processing on the three-layer dilated convolution;
[0082] The convolution result is weighted, the weight matrix is w1, and the time feature matrix X' is obtained after the weighted three-layer expansion convolution:
[0083] X'=Xw1
[0084] Compared with the traditional convolutional neural network (CNN), the use of dilated convolution is to increase the receptive field and improve the effect of feature extraction. Figure 3 As shown, compared with the traditional convolution (i.e. Figure 2 Compared to the convolution shown in Figure 2, the kernel size of the dilated convolution remains unchanged.
[0085] Since spatiotemporal features need to be integrated in S4, it is necessary to ensure that the dimensions of the temporal feature matrix and the spatial feature matrix are the same. In addition to weighting the cubic convolution operation, the matrix w1 also needs to adjust the dimension of X', X'∈R N×N .
[0086] S24, calculate the self-learning matrix:
[0087] For the lth node and the mth node in the road network, the vectors of the historical traffic flow of the two nodes are expressed as:
[0088] and
[0089] In the self-learning matrix, the values of the corresponding positions of l and m are for:
[0090]
[0091] The meaning of is the transpose multiplication of two vectors. The two vectors represent the traffic flow between two nodes in the road network at different time points. If the traffic flow between the two nodes at certain time points is large, then A large value of indicates that there is a direct or indirect connection between the two nodes.
[0092] Calculate the self-learning matrix A:
[0093]
[0094] The calculation results of the self-learning matrix reflect the dynamic spatial characteristics of the road network. A common scenario in life is that when a node in the road network is congested due to factors such as traffic accidents, the traffic volume of some other nodes in the road network will increase significantly. This phenomenon is manifested in the self-learning matrix A as the values of the corresponding positions of the two nodes are significantly larger than other positions in the matrix, thereby capturing the dynamic correlation of some nodes in the road network, and then capturing some dynamic spatial characteristics of the road network.
[0095] S25, perform softmax operation on the self-learning matrix A, convert the values of all elements in A to [0,1], including:
[0096]
[0097] Express The result of the softmax operation;
[0098] S26, set the threshold r to remove redundant information with less impact:
[0099]
[0100] The function of the self-learning matrix is mainly to capture the connection between lanes with relatively large traffic volume. Therefore, the connection between two lanes with smaller corresponding values will be eliminated to improve the scientificity and interpretability of the matrix.
[0101] The r value is continuously corrected during the experiment, and the one with better experimental results is selected.
[0102] S27, using Construct the matrix A' after the softmax processing of matrix A. A' is the matrix of the self-learning matrix minus the invalid information of the self-learning matrix, which is finally used to measure the dynamic spatial characteristics of the road network.
[0103] Optionally, S3 includes:
[0104] S31, construct the topology diagram of the road network structure:
[0105] For the i-th node and the j-th node in the road network, the true distance between the two nodes is represented as d ij , then the calculation method of the elements corresponding to these two nodes in the adjacency matrix D of the road network spatial topology graph is:
[0106]
[0107] Among them, D ij represents the value of the element corresponding to the i-th node and the j-th node in the adjacency matrix, σ represents the standard deviation of the spatial distance between the i-th node and the j-th node, and ε represents the threshold for controlling the sparsity of the adjacency matrix;
[0108] S32, construct the lane-level analysis adjacency matrix of the road network:
[0109] Most GCN-based traffic predictions only construct a static adjacency matrix with fixed weights, without considering that the relationship between different nodes may change under various circumstances. In particular, it is difficult for a static adjacency matrix to respond to spatiotemporal changes in a timely manner, making it difficult for the model to achieve accurate predictions. In this method, based on the historical traffic information of S21, for the i-th node and the j-th node in the road network, the corresponding element D' in the dynamic adjacency matrix D' of the road network is ij The values are:
[0110]
[0111] in is the traffic flow of the ith node at time step z, is the average traffic flow of the ith node in the time period [tT, t], is the traffic flow of the jth node at time step z, is the average traffic flow of the jth node in the time period [tT, t];
[0112] By calculating the traffic flow difference between two nodes, the correlation between lanes is analyzed. Taking two adjacent lanes as an example, the traffic flow between the two lanes and the historical traffic flow are very close, so D' ij The value of is smaller.
[0113] S33: Constructing a data-driven spatial feature adjacency matrix
[0114]
[0115] Where W2 is the second weight matrix of the dynamic correlation matrix of the road network;
[0116] S34: Extracting spatial features using graph convolutional networks:
[0117]
[0118] H (b) represents the feature matrix of the b-th layer, represents the degree matrix, Represents the matrix Normalize, W b-1 represents the weight matrix of layer b-1; H (0) =X; is the degree matrix, which is a diagonal matrix, Represents diagonal elements, and the value of each position on the main diagonal is the degree, represents the i-th row and j-th column of the adjacency matrix; Indicates finding the number of edges by column.
[0119] Optionally, S4 includes:
[0120] S41, integrates the spatiotemporal information, and converts X', A', The three matrices are concatenated into a very large tensor P:
[0121]
[0122] concat means concatenation operation;
[0123] S42, global mean pooling operation:
[0124]
[0125] p[:,:,c] represents a dimensionality reduction operation, which uses a column of elements as an index and outputs features of the other two dimensions. Represents a global pooling operation; reshape means reshaping the summation result into a matrix S;
[0126] S43, using the attention mechanism, calculate the third weight matrix W3 to perform weighted processing on the above three matrices, and the tensor obtained after processing is P';
[0127] S44, residual connection, assuming that the input time feature tensor is P0, the final output result tensor
[0128]
[0129] The final prediction result;
[0130] W4 and W5 represent a fourth weight matrix and a fifth weight matrix, respectively.
[0131] The prediction method of this method is to use the traffic flow information of the previous day to predict the traffic flow situation at the same time period of the next day. Specifically, for example, the traffic flow situation at 8 o'clock in the morning on July 15, 2023 is used to predict the traffic flow situation at 8 o'clock in the morning on July 16, 2023.
[0132] Compared with the prior art, the present invention has the following advantages:
[0133] Advantage 1: The present invention uses dilated convolution to extract temporal features, and by integrating small receptive fields and large receptive fields, the method can more fully explore temporal feature information.
[0134] Advantage 2: The present invention fully exploits the spatiotemporal characteristics in the road network and introduces a self-learning matrix to exploit the dynamic spatial characteristics in the road network, making the prediction effect of the entire model more accurate and better interpretable.
[0135] Advantage 3: The present invention is a lane-level traffic flow prediction. In some existing research results, the lane-level traffic flow prediction technology is still in the exploratory stage, and most of the traffic flow prediction methods are non-lane-level predictions.
[0136] The preferred embodiments of the present invention disclosed above are only used to help illustrate the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A lane-level traffic flow prediction method based on dynamic traffic flow big data, characterized in that: include: S1, collecting historical traffic flow information of the road network to be predicted; S2, constructs a historical traffic flow information matrix of the road network based on the data obtained in S1, and processes the historical traffic flow information matrix of the road network using dilated convolution; at the same time, the traffic flow information of the same node in the road network at different historical times is constructed as a vector, and a learnable matrix is calculated based on the vectors of all nodes to analyze the dynamic characteristics of the road network; S3, constructing a data-driven spatial feature adjacency matrix; S4, design a gating structure to integrate temporal features and spatial features. The design of the gating structure is based on the attention mechanism and global pooling operation to obtain the final prediction result; S2 includes: S21, construct the road network historical traffic flow information matrix X as follows: is the traffic flow of the nth node in the road network at time step t, n∈[1,N]; T represents the length of the input time series, and N represents the total number of nodes; S22, constructing an expanded convolutional neural network model. In the process of temporal feature extraction, the input of the expanded convolutional neural network model is X, a fully connected layer is used to increase the dimension of the matrix X, and the calculation result obtained by the increased dimension is processed by the expanded convolution, and a first weight matrix w1 is set; S23, weight the result after convolution, the weight matrix is w1, and the time feature matrix X′ obtained after weighting the three-layer dilated convolution is calculated: S24, calculate the self-learning matrix: For the lth node and the mth node in the road network, the vectors of the historical traffic flow of the two nodes are expressed as: and In the self-learning matrix, the values of the corresponding positions of l and m are for: Calculate the self-learning matrix A: S25, perform softmax operation on the self-learning matrix A, convert the values of all elements in A to [0,1], including: Express The result of the softmax operation; S26, set the threshold r to remove redundant information with less impact: S27, using Construct the matrix A′ after the matrix A is processed by softmax; S3 includes: S31, construct the topology diagram of the road network structure: For the i-th node and the j-th node in the road network, the true distance between the two nodes is represented as d ij , then the calculation method of the elements corresponding to these two nodes in the adjacency matrix D of the road network spatial topology graph is: Among them, D ij represents the value of the element corresponding to the i-th node and the j-th node in the adjacency matrix, σ represents the standard deviation of the spatial distance between the i-th node and the j-th node, and ε represents the threshold for controlling the sparsity of the adjacency matrix; S32, construct the lane-level analysis adjacency matrix of the road network. For the i-th node and the j-th node in the road network, the corresponding element D in the dynamic adjacency matrix D' of the road network is i ' j The values are: in is the traffic flow of the ith node at time step z, is the average traffic flow of the ith node in the time period [tT, t], is the traffic flow of the jth node at time step z, is the average traffic flow of the jth node in the time period [tT, t]; S33: Constructing a data-driven spatial feature adjacency matrix Where W2 is the second weight matrix of the dynamic correlation matrix of the road network; S34: Extracting spatial features using graph convolutional networks: H (b) represents the feature matrix of the b-th layer, represents the matrix Normalize, W b-1 represents the weight matrix of layer b-1; H (0) =X; is the degree matrix, which is a diagonal matrix, Represents diagonal elements, and the value of each position on the main diagonal is the degree, represents the i-th row and j-th column of the adjacency matrix; Indicates finding the number of edges by column.
2. The lane-level traffic flow prediction method based on dynamic traffic flow big data according to claim 1 is characterized in that S4 include: S41, integrates the spatiotemporal information, and converts X′, A′, The three matrices are concatenated into a very large tensor P: S42, global mean pooling operation: p[:,:,c] represents a dimensionality reduction operation, which uses a column of elements as an index and outputs features of the other two dimensions. Represents a global pooling operation; reshape means reshaping the summation result into a matrix S; S43, using the attention mechanism, calculate the third weight matrix W3 to weight the above three matrices, and the tensor obtained after processing is P′; S44, residual connection, assuming that the input time feature tensor is P0, the final output result tensor The final prediction result; W4 and W5 represent a fourth weight matrix and a fifth weight matrix, respectively.
Citation Information
Patent Citations
A short-term traffic flow prediction method based on convolutional neural network
CN105654729B
Urban short-term traffic flow prediction method based on GCN-IPSO-LSTM combined model
CN116721537A
Graph learning-based graph convolutional neural network traffic prediction method and system
CN112949828A
Traffic flow prediction method based on asynchronous space-time expansion graph convolutional network
CN113570859A