CN-122024496-A - Traffic flow prediction method based on dynamic graph convolution cyclic neural network
Abstract
The invention provides a traffic flow prediction method based on a dynamic graph rolling and circulating neural network, which relates to the technical field of intelligent traffic and is based on an attention-enhanced dynamic graph rolling and circulating neural network, and comprises the following steps of obtaining space-time embedding by utilizing a periodic time mode of a space-time embedding fusion traffic signal and node space identity information; combining space-time embedding and flow embedding, dynamically generating a dynamic graph structure reflecting the real dynamic relation of nodes, decoupling the weight of graph convolution by a node self-adaptive parameter learning method to enable each node to learn a corresponding traffic mode, embedding the dynamic graph convolution into a GRU unit in the time dimension to extract space-time dependency, introducing a time sequence strengthening module, and outputting a traffic flow prediction result by explicitly modeling the cross-time long-range dependency through multiple-head attention. The method can obviously improve the accuracy and the robustness of the traffic flow prediction result under the complex traffic environment, and has good practical application value.
Inventors
- ZHAI HUAWEI
- LIU YINGHENG
- CUI LICHENG
Assignees
- 大连海事大学
Dates
- Publication Date
- 20260512
- Application Date
- 20260115
Claims (10)
- 1. The traffic flow prediction method based on the dynamic graph convolution cyclic neural network is based on the attention-enhanced dynamic graph convolution cyclic neural network and is characterized by comprising the following steps of: S1, utilizing a periodic time mode of a space-time embedded fusion traffic signal and node space identity information to obtain space-time embedding; S2, combining the space-time embedding and the flow embedding obtained in the step S1 to dynamically generate a dynamic graph structure reflecting the real dynamic relation of the nodes; s3, decoupling the weight of the graph convolution by a node self-adaptive parameter learning method, so that each node learns a corresponding traffic mode; s4, embedding the dynamic graph convolution into the GRU unit in the time dimension, and extracting the space-time dependency relationship; s5, introducing a time sequence strengthening module, and outputting a traffic flow prediction result through the long-range dependency relationship of multi-head attention explicit modeling crossing time.
- 2. The traffic flow prediction method based on the dynamic graph convolution cyclic neural network according to claim 1, wherein the space-time embedded acquisition process in S1 includes the following steps: s11, constructing a time-of-day embedding matrix And week time embedding matrix Wherein, the method comprises the steps of, Representing the number of time points in a day; The number of days in a week is indicated, ; Representing an embedding dimension; S12, according to the target time information Determining a corresponding day index And Zhou Suoyin And embedding the matrix from time of day And week time embedding matrix Respectively extracting corresponding time of day embedding And week time embedding ; S13, embedding the time of day into And week time embedding Time embedding is obtained through Hadamard product operation The calculation formula is as follows: Wherein, the method comprises the steps of, Representing the hadamard product; s14, constructing a space embedding matrix Representing the spatial identity information of the node, Representing the number of nodes in the traffic network After broadcast processing and Space-time embedding is obtained through Hadamard product operation The calculation formula is as follows: 。
- 3. the traffic flow prediction method based on the dynamic graph convolution cyclic neural network according to claim 1, wherein the dynamic graph structure in S2 is generated by a dynamic graph generating method, and the method comprises the following steps: S21, inputting traffic flow signals Flow embedding via linear layer mapping The calculation formula is as follows: Wherein, the method comprises the steps of, The length of the time series is indicated, Representing an input feature dimension; S22, embedding the flow With the space-time embedding obtained in step S1 After Hadamard product operation, activating through tanh function to obtain dynamic graph embedding The calculation formula is as follows: ; s23, embedding the dynamic diagram With which it is transposed Multiplying, activating by a ReLU function to obtain a dynamic adjacency matrix, replacing a static adjacency matrix in the traditional graph convolution, and generating a dynamic graph structure, wherein the corresponding dynamic graph convolution expression is as follows: Wherein, the method comprises the steps of, Representing the identity matrix; representing a degree matrix corresponding to the dynamic adjacency matrix; Representing a weight matrix; Representing a bias vector; Representation of And outputting the convolution of the moment dynamic diagram.
- 4. The traffic flow prediction method based on the dynamic graph convolution cyclic neural network according to claim 1, wherein the node adaptive parameter learning method in S3 comprises the following steps: S31, setting a weight matrix of graph convolution Wherein, the method comprises the steps of, Representing an input feature dimension; Representing an output feature dimension; S32, weight matrix Decomposition into node parameter matrices Weight matrix Deviation matrix Wherein, the method comprises the steps of, , , 。
- 5. The traffic flow prediction method based on the dynamic graph convolution cyclic neural network according to claim 1, wherein the method for embedding the dynamic graph convolution into the GRU unit in S4 includes the steps of convolving the dynamic graph generated in S2 as a feature conversion layer of the GRU unit, so that the GRU unit synchronously aggregates dynamic space dependency information when updating a hidden state, and the calculation formula of the corresponding dynamic graph convolution gating cyclic unit is as follows: ; ; ; ; Wherein, the Representing a reset gate; Representing an update gate; Representation of Inputting time; Representation of A hidden state from time to time; Representation of Outputting a hidden state at the moment; Representing a sigmoid activation function; representing a dynamic graph convolution operation; representing a splicing operation; Representing a spatial embedding matrix; 、 、 Representing a learnable weight parameter; 、 、 Representing a learnable bias parameter.
- 6. The traffic flow prediction method based on a dynamic graph convolution cyclic neural network according to claim 1, wherein the time sequence reinforcement module in S5 is constructed based on a transducer style attention structure, and the method comprises the following steps: S51, outputting GRU unit As a query, the historical hidden state sequence of the node As keys and values; s52, modeling a cross-time dynamic dependency relationship through a multi-head attention mechanism, wherein a calculation formula is as follows: ; ; Wherein, the 、 、 Representing a learnable weight parameter; an output representing multi-headed attention; Representing an embedding dimension; s53, sequentially performing residual connection and layer normalization, feedforward network processing and secondary layer normalization to obtain the enhanced time sequence characteristics The calculation formula is as follows: ; Wherein LayerNorm denotes a layer normalization operation, FFN denotes a feed forward network, Representing the features after the first normalization; S54, will The final traffic flow prediction result is obtained through the characteristic transformation of the linear layer The calculation formula is as follows: 。
- 7. A traffic flow prediction method based on a dynamic graph convolution cyclic neural network according to claim 3, characterized in that said input traffic flow signal Including one or more traffic parameters of traffic flow, vehicle speed, traffic flow density.
- 8. The traffic flow prediction method based on the dynamic graph rolling and circulating neural network according to claim 1, wherein the periodic time mode comprises a daily periodic mode and a weekly periodic mode, and the collaborative characterization is realized through daily time embedding and weekly time embedding in S1.
- 9. The traffic flow prediction method based on the dynamic graph convolution cyclic neural network according to claim 6, wherein the feed forward network adopts a two-layer fully-connected network structure, and nonlinear transformation is performed in the middle through a ReLU activation function.
- 10. A traffic flow prediction method based on a dynamic graph rolling recurrent neural network according to any of claims 1-9, characterized in that the method uses mean square error as a loss function during training, and updates model parameters by means of a random gradient descent or adaptive moment estimation optimizer.
Description
Traffic flow prediction method based on dynamic graph convolution cyclic neural network Technical Field The invention relates to the technical field of intelligent traffic, in particular to a traffic flow prediction method based on a dynamic graph convolution cyclic neural network. Background Along with the continuous acceleration of the urban process, the scale of the traffic system is increasingly enlarged, and the traffic running state is increasingly complex. Traffic flow prediction is one of key technologies in intelligent traffic systems, and plays an important role in traffic signal control, path planning, traffic guidance, congestion early warning and other applications. By analyzing and modeling the historical traffic flow data, the accurate prediction of the future traffic flow change is realized, and the method has important significance for improving the traffic running efficiency and guaranteeing the road traffic safety. Early traffic flow prediction methods were based mainly on statistical theory, such as historical averaging, autoregressive models, etc. The method has a simple structure and low calculation complexity, but generally depends on stronger linear assumption, is difficult to adapt to nonlinear characteristics and complex fluctuation rules existing in traffic flow data, and has limited prediction accuracy in practical application. With the development of machine learning technology, models such as support vector regression and random forest are introduced into the field of traffic flow prediction. The method can describe the nonlinear relation of traffic flow data to a certain extent, but usually each road node is regarded as an independent individual, so that the ubiquitous spatial association among nodes in the traffic network is ignored, and the overall operation characteristics of the traffic system are difficult to comprehensively reflect. In recent years, the deep learning method has become the main stream direction of traffic flow prediction research. Cyclic neural networks and their improved structures are widely used to model the time dependence of traffic flow, and convolutional neural networks are used to extract local timing features. However, the modeling capability of the method in the space dimension is still limited, and it is difficult to effectively express the complex space structure information in the traffic network. In order to solve the problem of spatial modeling, a graph neural network is introduced into the field of traffic flow prediction, and the spatial dependency relationship in traffic data is modeled by constructing a graph structure between road nodes. Existing methods for traffic flow prediction based on graph roll-up neural networks typically rely on predefined adjacency matrices, such as static graph structures built based on road physical connection relationships or historical statistical correlations. Although the method improves the prediction performance to a certain extent, the spatial topological structure of the method remains unchanged in the training and prediction process, and the actual situation that the node relation in the traffic network dynamically changes along with time is difficult to reflect. In addition, in order to simultaneously describe the spatial correlation and the time correlation of traffic flow, part of the researches combine the graph convolution network with the cyclic neural network to form a graph convolution cyclic neural network structure. However, in the existing related method, static diagram convolution and a standard circulation unit are mostly adopted to be combined, so that dynamic evolution characteristics of a traffic network space structure are not considered enough, meanwhile, in a long-time sequence modeling process, historical key information is easy to weaken, and modeling effect of a model on complex space-time dependency relationship is affected. Therefore, how to adaptively describe the spatial dependency relationship of the traffic network with time variation and effectively model the time evolution characteristic of the traffic flow data in the traffic flow prediction process is still a technical problem to be solved in the prior art. Disclosure of Invention According to the technical problems mentioned in the background art, a traffic flow prediction method based on a dynamic graph convolution cyclic neural network is provided. The method comprises the steps of firstly integrating the periodic time mode of traffic signals and node space identity information by utilizing space-time embedding, then combining the space-time embedding with flow embedding, and dynamically generating a dynamic graph structure capable of reflecting the real dynamic relation of nodes under the condition of lacking a priori adjacency matrix. And then, decoupling the weight of the graph convolution by a node self-adaptive parameter learning method on the basis of the traditional graph convolution, so that each node can