Long-term traffic flow prediction method based on dynamic space-time diagram neural network
The dynamic adjacency matrix and an improved gated loop network are generated through the dynamic spatio-temporal graph neural network, which solves the problems of insufficient modeling of dynamic road networks and low training efficiency in traffic flow prediction, and achieves efficient traffic flow prediction.
Patent Information
- Application Number
- CN202510491853.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-07-22
AI Technical Summary
The existing traffic flow prediction methods are insufficient in dynamic road network modeling and space-time dependency capture, and are inefficient in training efficiency. Traditional graph neural networks have problems with high computational complexity and long-term memory loss.
A dynamic spatio-temporal graph neural network is used to generate a dynamic adjacency matrix through a diffusion probability model, combining multi-hop diffusion convolution and bidirectional diffusion convolution to capture spatial dependence, and improving the gated recurrent network for parallelized time modeling, fusing spatial and temporal features.
It improves the prediction accuracy of emergencies, enhances the correlation capture of long-distance nodes, improves training and inference efficiency, and enhances the model's ability to express complex space-time patterns.
Smart Images

Figure CN120356328A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical fields of machine learning, traffic prediction, etc., and particularly relates to a long-term traffic flow prediction method based on a dynamic spatio-temporal graph neural network. Background Art
[0002] Traditional time series prediction methods include simple linear regression, AutoRegressive Integrated Moving Average (ARIMA), and Seasonal AutoRegressive Integrated Moving Average (SARIMA). Among them, SARIMA can analyze the seasonal components in the time series, thus achieving better results. However, these methods only use time series data for analysis and do not consider the importance of relevant covariates in time series prediction. In the field of traffic flow prediction, the spatial relationship between roads plays a key role in predicting traffic flow changes. With the development of graph neural networks, many researchers have tried to apply graph neural networks to time series prediction methods. By using the original spatial topology relationship of roads, a static adjacency matrix is constructed, as shown in the attached specification Figure 1 However, the spatial dependence of traffic flow does not only depend on static road relationships, because although roads are connected in the actual spatial topology, they are not always unobstructed, as shown in the attached specification Figure 2 Therefore, some researchers have proposed using a spatial dynamic adjacency matrix to enhance the spatial relationship of roads. By combining a Graph Neural Network (GNN) and a Recurrent Neural Network (RNN), including its variants with long-term memory: Long Short Term Memory (LSTM) and Gate Recurrent Unit (GRU), deep learning methods have achieved remarkable results in traffic flow prediction.
[0003] However, the Long Short Term Memory and the Gate Recurrent Unit do not have the ability of parallel computing, which affects the training efficiency. And the Convolutional Neural Networks (CNN) with the ability of parallel operation will lead to the loss of long-term memory. Some researchers have adopted a Transformer-based structure to simulate the time dependence in traffic sequences.
[0004] The Transformer shows great potential in modeling long-term temporal dependencies but has the problem of inductive bias as it makes few assumptions about the structural information of the data. At the same time, the Transformer has a high computational complexity and longer training time. Summary of the Invention
[0005] Aiming at the defects and deficiencies of the existing technology, the present invention provides a long-term traffic flow prediction method based on a dynamic spatio-temporal graph neural network, which solves the problems of insufficient dynamic road network modeling, insufficient spatio-temporal dependence capture, and low training efficiency in the existing technology through the following innovative designs:
[0006] Dynamic adjacency matrix generation mechanism: Combining the Diffusion Model and the Graph Convolutional Network (GCN), through the embedding representation optimization in the pre-training stage and the noise-adding and denoising iterations in the diffusion generation stage, a dynamic adjacency matrix reflecting the time-varying characteristics of the road network is generated, replacing the traditional static or similarity-based adjacency matrix construction method;
[0007] Multi-hop diffusion convolution and bidirectional diffusion convolution: Introduce the design of multi-hop adjacency matrix superposition and bidirectional convolution with in / out-degree separation in spatial modeling to alleviate the over-smoothing problem of traditional graph convolution, while capturing the spatial dependence relationships of local neighborhoods and distant nodes;
[0008] Parallelized time modeling: Improve the Simultaneous Gated Recurrent Unit (SimGRU), eliminate the dependence on historical hidden states, and achieve batch processing of time series through a parallel scanning algorithm, taking into account the capture of long-term trends and periodic characteristics;
[0009] End-to-end feature fusion optimization: Based on the encoder-decoder architecture and residual modules, fuse the spatial features guided by the dynamic adjacency matrix and the parallelized time features to improve the adaptability of the prediction model to complex traffic scenarios.
[0010] The technical solution specifically adopted by the present invention to solve its technical problems is as follows:
[0011] A long-term traffic flow prediction method based on a dynamic spatio-temporal graph neural network, comprising the following steps:
[0012] Input historical traffic data and a static adjacency matrix, and generate a dynamic graph adjacency matrix through the Diffusion Model, including:
[0013] Pre-training stage: Use the Graph Convolutional Network to learn the embedding representation of the static adjacency matrix and traffic features to generate an initial dynamic adjacency matrix;
[0014] Diffusion generation stage: Optimize the initial adjacency matrix through multi-step noise addition and conditional denoising iterations to generate a dynamic adjacency matrix reflecting the time-varying characteristics of the road network;
[0015] Spatio-temporal collaborative modeling:
[0016] Spatial dependence modeling: Based on static and dynamic adjacency matrices, multi-hop diffusion convolution and bidirectional diffusion convolution are used to extract spatial dependence features of local and distant nodes;
[0017] Temporal dependence modeling: The simplified gated recurrent unit SimGRU is used to parallelize the time series to eliminate the serial dependence on historical hidden states and retain long-term trends and periodic features;
[0018] Fuse spatial and temporal features and output the traffic flow prediction results for future time periods.
[0019] Furthermore, the generation frequency of the dynamic adjacency matrix matches the prediction period, and future potential road network changes are inferred based on historical time window data.
[0020] Furthermore, the diffusion generation stage includes:
[0021] Gradually inject Gaussian noise into the initial dynamic adjacency matrix to generate an intermediate matrix with noise interference;
[0022] Through the conditional generation network, with historical traffic data and static adjacency matrix as conditions, iteratively denoise the noise matrix and output the optimized dynamic adjacency matrix.
[0023] Furthermore, the simplified gated recurrent unit SimGRU realizes parallelization through the following steps:
[0024] Eliminate the dependence of the gated unit on historical hidden states and directly generate the candidate state of the current time step through linear transformation;
[0025] Adopt the parallel scan algorithm to batch process the time series, dynamically fuse the current input and candidate state through the update gate, and output the time features.
[0026] Furthermore, the multi-hop diffusion convolution in the spatial dependence modeling includes bidirectional diffusion convolution on the static adjacency matrix to separate the in-degree and out-degree paths.
[0027] Furthermore, the multi-hop diffusion convolution is realized in the following way:
[0028] Multi-hop adjacency matrix stacking: Based on the static adjacency matrix, by stacking the outputs of multiple graph convolution layers, gradually aggregate the spatial features of multi-hop neighborhood nodes;
[0029] Over-smoothing mitigation mechanism: Add the convolution results of different hop numbers through skip connections to retain the differential features of local and distant nodes and avoid the feature homogenization problem caused by multi-layer graph convolution;
[0030] Long-distance Dependence Capture: Utilize the multi-hop adjacency matrix to cover non-directly connected nodes in the road network and capture the chain effect of cross-regional traffic flow.
[0031] Furthermore, the bidirectional diffusion convolution is implemented as follows:
[0032] Directional Separation: Decompose the static adjacency matrix into the out-degree direction adjacency matrix A s and the in-degree direction adjacency matrix A T s , which respectively represent the connection relationships of nodes as the starting point and ending point of traffic flow;
[0033] Bidirectional Feature Fusion: Perform graph convolution operations on the out-degree direction adjacency matrix and the in-degree direction adjacency matrix respectively, independently extract the spatial dependence features of upstream and downstream traffic flows, and fuse the two types of features into the final spatial representation;
[0034] Traffic Flow Modeling Optimization: Enhance the model's modeling ability of traffic flow propagation paths through directional separation to distinguish the upstream sources and downstream impact areas of congestion propagation.
[0035] Furthermore, the feature fusion is implemented through an encoder-decoder architecture, and shallow and deep features are fused through a residual module.
[0036] And, an electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the steps of the method described above.
[0037] A non-transitory computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps of the method described above.
[0038] Compared with the prior art, the present invention and its preferred solutions at least include the following beneficial effects:
[0039] Improved Dynamic Road Network Modeling Ability: The dynamic adjacency matrix generated by the diffusion model can reflect the time-varying characteristics of the traffic road network (such as temporary congestion, road closure) in real time, significantly improving the prediction accuracy of emergencies;
[0040] Optimized Spatial Dependence Modeling: The multi-hop diffusion convolution alleviates the over-smoothing problem and enhances the capture of long-distance node associations. The bidirectional diffusion convolution separates the out / in-degree paths to accurately model the propagation directionality of traffic flow;
[0041] Improved Training and Inference Efficiency: The parallel design of SimGRU breaks through the serial computing limit of traditional time modeling and supports the efficient processing of large-scale time window inputs;
[0042] Enhanced Robustness of Feature Fusion: The encoder-decoder architecture is combined with residual modules to preserve the complementarity between shallow detailed information and deep abstract features, improving the model's ability to represent complex spatio-temporal patterns. Description of the Drawings
[0043] The present invention will be further described in detail below in conjunction with the drawings and specific embodiments:
[0044] Figure 1 It is a schematic diagram of establishing an adjacency matrix according to the topological relationship of sensors in the prior art.
[0045] Figure 2 It is a schematic diagram of the change of sensor connectivity relationship over time in the prior art.
[0046] Figure 3 It is a process diagram of establishing a dynamic adjacency matrix using similarity according to the input time series in the prior art.
[0047] Figure 4 It shows the effect of the dynamic adjacency matrix finally obtained in the prior art.
[0048] Figure 5 It is a process diagram of the residual module in the embodiment of the present invention.
[0049] Figure 6 It is a process diagram of establishing a dynamic adjacency matrix using a diffusion model according to the input time series in the embodiment of the present invention.
[0050] Figure 7 It is a structural diagram of the graph convolutional network in the embodiment of the present invention.
[0051] Figure 8 It is a structural diagram of the overall model in the embodiment of the present invention. Specific Embodiments
[0052] To make the features and advantages of the present invention more obvious and understandable, specific embodiments are given below for detailed description as follows:
[0053] It should be noted that the following detailed description is illustrative and is intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in this specification have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs.
[0054] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0055] An embodiment of the present invention provides a long-term traffic flow prediction method based on a multi-source spatio-temporal graph neural network. Based on the model of the multi-source spatio-temporal graph neural network, it innovatively integrates the diffusion probability model and graph convolution to generate a dynamic graph adjacency matrix, realizing the adaptive modeling of the dynamic road network structure. The core technologies include: (1) a dynamic adjacency matrix generation mechanism based on the diffusion principle, which captures the time-varying characteristics of the road network connection relationship through a progressive denoising process; (2) using a graph convolutional network to capture the spatial relationship in traffic data; (3) using an improved gated recurrent network to capture the trends and periodicities in time series. By combining the graph neural network and the time module, the spatio-temporal graph neural network can more effectively model traffic flow data, thereby improving the prediction accuracy while maintaining a low training cost.
[0056] Its specific design process is as follows:
[0057] A multi-graph information aggregation method based on graph neural network is proposed. This method combines dynamic graphs and static graphs, optimizing the previous method of simply constructing a static graph structure by distance. Through the graph convolutional neural network, this method can propagate and aggregate the information of local and distant nodes, thereby enhancing the spatial correlation between nodes.
[0058] A time-dependent modeling method based on an encoder-decoder structure, using an improved gated recurrent network to establish long short-term memory is proposed. By using a simplified gated recurrent neural network, and combining the graph convolutional network and the gated recurrent unit to construct the basic units of the encoder and decoder, stacking multiple layers to strengthen long short-term memory.
[0059] A method for generating a dynamic graph adjacency matrix using a diffusion model is proposed. By using the diffusion model and inputting historical time series features, a historical dynamic graph adjacency matrix is generated for establishing spatial dependence.
[0060] The following is a specific introduction to the solution of the embodiment of the present invention:
[0061] 1. Model overview:
[0062] First, the input time series data is used to obtain a dynamic graph adjacency matrix after denoising operations using the diffusion probability model. Subsequently, a graph convolutional network is used to model the spatial relationship of the time series. The encoder and decoder of the model are composed of a simplified gated recurrent neural network and a graph neural network, and the time dependence of the sequence is modeled through multi-layer stacking and residual modules. Finally, a fully connected layer is used for dimensionality reduction and mapping to the prediction result.
[0063] 2. Graph adjacency matrix generation
[0064] The model input is the sensor observation data X with a window size of L and the road network structure A of the sensor. s As a static adjacency matrix, the ultimate goal of the model is to predict the data for the next H time slices.
[0065] First, a suitable graph adjacency matrix needs to be established for the graph convolutional network.
[0066] The established graph adjacency matrix is divided into a predefined static graph adjacency matrix and a dynamic graph adjacency matrix that changes dynamically over time.
[0067] Static graph adjacency matrix A s Is usually established based on the spatial distance between sensors, as follows:
[0068]
[0069] σ in formula (1) is the standard deviation of the distance. This formula stipulates the maximum distance k between nodes, and two nodes beyond this distance are set to be unconnected. According to node v i And v j The Euclidean distance is calculated based on the coordinates to obtain the shortest straight-line distance between two points.
[0070] However, in the real world, the connectivity relationship between different intersections usually changes over time, and relying solely on a single static graph adjacency matrix cannot fully capture the spatial relationship between road networks. Therefore, existing research introduces a dynamic graph adjacency matrix to simulate the dynamic changes of road networks. Traditional dynamic adjacency matrix A d Is obtained by calculating the similarity based on the time series X, usually cosine similarity, which presents different graph structures at different time steps t, such as Figure 3 , Figure 4 As shown. A d Is constructed as follows:
[0071]
[0072] Among them, Represents the dot product of vectors And ; Represents calculating the norm of vector . In this way, a corresponding adjacency matrix A d Can be constructed at each time step t to represent the dynamic structure of the traffic road network.
[0073] However, directly using similarity calculation to obtain a high-quality adjacency matrix cannot effectively represent the complex dynamic changes of the road network. Therefore, the embodiments of the present invention design a framework combining a graph convolutional network and a diffusion probability model for efficiently generating a dynamic graph adjacency matrix.
[0074] The method is divided into two stages: the pre-training stage and the diffusion generation stage.
[0075] (a) Pre-training stage: The GCN generates an initial dynamic adjacency matrix.
[0076] First, input the static adjacency matrix A obtained from formula (1) s , and the historical time series X as features. Use a GCN layer for training to obtain the embedding Z. This is an unsupervised training, and the present invention uses the neighborhood smoothing regularization method for unsupervised training. Finally, jointly generate the dynamic adjacency matrix with the diffusion model and jointly calculate the loss.
[0077] The formula for the entire pre-training stage is as follows:
[0078] Z l = σ(A s Z l-1 W l ) (3)
[0079] Z 1 = σ(A s XW 1 ) (4)
[0080]
[0081] (b) Diffusion generation stage: Generation of the dynamic matrix based on the diffusion model.
[0082] The diffusion model converts the dynamic adjacency matrix generated by the GCN into the target dynamic adjacency matrix A dyn .
[0083] Noise addition process:
[0084] First, input the initial adjacency matrix A obtained from pre-training dyn as the starting point of the diffusion process.
[0085] Gradually add Gaussian noise ∈~N(0, σ 2 I):
[0086]
[0087] Denoising process:
[0088] Learn a model p θ (A t-1 |At}, generating the final dynamic adjacency matrix A0 step by step from the noise matrix A T :
[0089]
[0090] where is the cumulative noise regulation parameter, z is a normally distributed noise.
[0091] To optimize the noise ∈, the mean squared error is used as the loss function:
[0092]
[0093] Through this step, a suitable static graph adjacency matrix and dynamic graph adjacency matrix can be obtained, providing a prerequisite for capturing potential spatial correlations in the road network and historical time series for subsequent graph convolution.
[0094] 3. Design of the Graph Convolutional Network
[0095] The graph convolutional network uses the adjacency matrix and a randomly initialized learnable parameter W to capture the spatial dependence of the model. The graph convolutional network layer receives the adjacency matrix time series data and obtains intermediate hidden data with spatial dependence through the convolutional network where N represents the number of nodes, T represents the time window length, and d represents the number of input features, usually speed, traffic flow, and lane occupancy, etc. The calculation formula of the graph convolutional network is:
[0096]
[0097] where A′ = A + I, representing the adjacency matrix with self-loops added, and D represents the degree matrix of A. By adding self-loops, self-information can be aggregated during graph convolution, enabling the capture of more local information.
[0098] The model establishes two graph convolutional network layers Gc s , Gc d , which respectively model the static adjacency matrix A s and the dynamic adjacency matrix A dyn to obtain the spatial correlation between the original road network structures and the spatial correlation after the road network changes dynamically over time.
[0099] To capture node information at a long distance, the dynamic graph convolutional layer Gc s contains multiple graph convolutional units, each graph convolutional unit contains multiple layers of graph convolutional layers, and a multi-hop adjacency matrix is introduced. The specific content is as follows:
[0100]
[0101] The static graph convolutional layer uses the diffusion bidirectional convolution method to capture long-range correlations. Through the diffusion mechanism, a random walk is performed on the graph. According to the characteristics of the diffusion process, a diffusion convolution that can capture the upstream and downstream traffic impacts is proposed. The specific content is as follows:
[0102]
[0103] Among them, D o , D i respectively represent the out-degree matrix and in-degree matrix of the adjacency matrix A s .
[0104] Through the two graph convolutional layers, the model can simultaneously capture the correlations between long-distance road network nodes and the correlations between local road network nodes, enabling each node to combine the historical time series changes of the global and adjacent nodes to assist in predicting its own future changes.
[0105] 4. Design of Time Modeling
[0106] In long-term traffic flow time series prediction, it is necessary to capture the trends and periodicities in the node historical time series and predict the changes in the future time series based on the learned trends and periodicities. Existing research usually uses RNN or its improved LSTM and gated recurrent networks for modeling. However, these methods rely on the transfer of hidden states and need to be optimized using backpropagation, which makes them unable to be computed in parallel. When performing long-term time series prediction, due to the long number of time steps, the training and inference speeds are slow. Therefore, this model uses an improved gated recurrent network, which removes the dependence of the gated unit on the past hidden states, enabling it to directly obtain the final result through inference. Finally, the parallel scan method can effectively shorten the training time. Specifically as follows:
[0107]
[0108] 5. Overall Model Design
[0109] The overall model is designed in an end-to-end manner, as Figures 5-8 shown. Based on the above-mentioned graph convolutional network and improved gated recurrent network as basic network units, they are integrated into the encoder and decoder.
[0110] The data passing through the encoder and decoder finally obtains the final prediction result through the residual module. The final loss of the model is as follows:
[0111]
[0112] Based on the same inventive concept, the present invention further provides a computer device, which includes: one or more processors, and a memory for storing one or more computer programs; the program includes program instructions, and the processor is configured to execute the program instructions stored in the memory. The processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, and is used to implement one or more instructions, specifically for loading and executing one or more instructions in the computer storage medium to implement the above method.
[0113] It should be further noted that, based on the same inventive concept, the present invention further provides a computer storage medium, on which a computer program is stored, and the computer program, when run by a processor, executes the above method. The storage medium may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may, for example, but not be limited to, an electrical, magnetic, optical, electrical, magnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or combined with an instruction execution system, apparatus, or device.
[0114] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should have the ordinary meanings understood by those with ordinary skills in the field to which the present invention pertains. The "first", "second" and similar terms used in the present invention do not denote any order, quantity or importance, but are only used to distinguish different components. Words such as "comprising" or "including" mean that the elements or objects appearing before this word cover the elements or objects listed after this word and their equivalents, without excluding other elements or objects. Words such as "connected" or "linked" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Upper", "lower", "left", "right", etc. are only used to represent relative position relationships. When the absolute position of the object being described changes, the relative position relationship may also change accordingly.
[0115] As described above, these are only the preferred embodiments of the present invention, and are not limitations on the present invention in other forms. Any person skilled in the art may use the technical content disclosed above to make changes or modifications into equivalent embodiments with equivalent changes. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the technical solution content of the present invention still fall within the protection scope of the technical solution of the present invention.
[0116] The present invention is not limited to the above best implementation manner. Anyone inspired by the present invention can obtain various other forms of long-term traffic flow prediction methods based on dynamic spatio-temporal graph neural networks. All equal changes and modifications made according to the scope of the patent application of the present invention shall fall within the coverage scope of the present invention.
Claims
1. A long-term traffic flow prediction method based on dynamic spatio-temporal graph neural network, characterized in that, It includes the following steps: Input historical traffic data and a static adjacency matrix, and generate a dynamic graph adjacency matrix through a diffusion probability model, including: Pretraining stage: Use a graph convolutional network to perform embedded representation learning on the static adjacency matrix and traffic features to generate an initial dynamic adjacency matrix; Diffusion generation stage: Iteratively optimize the initial adjacency matrix through multi-step noise addition and conditional denoising to generate a dynamic adjacency matrix reflecting the time-varying characteristics of the road network; Spatio-temporal collaborative modeling: Spatial dependence modeling: Based on the static adjacency matrix and the dynamic adjacency matrix, extract the spatial dependence features of local and distant nodes through multi-hop diffusion convolution and bidirectional diffusion convolution; Temporal dependence modeling: Parallelize the time series through a simplified gated recurrent unit SimGRU to eliminate the serial dependence on historical hidden states and retain long-term trends and periodic features; Fuse spatial and temporal features and output the traffic flow prediction results for future time periods.
2. The long-term traffic flow prediction method based on a dynamic spatio-temporal graph neural network according to claim 1, wherein: The generation frequency of the dynamic adjacency matrix matches the prediction period, and future potential road network changes are inferred based on historical time window data.
3. The long-term traffic flow prediction method based on a dynamic spatio-temporal graph neural network according to claim 1, wherein: The diffusion generation stage includes: Gradually inject Gaussian noise into the initial dynamic adjacency matrix to generate an intermediate matrix with noise interference; Through a conditional generation network, use historical traffic data and the static adjacency matrix as conditions to iteratively denoise the noise matrix and output an optimized dynamic adjacency matrix.
4. The long-term traffic flow prediction method based on a dynamic spatio-temporal graph neural network according to claim 1, wherein: The simplified gated recurrent unit SimGRU realizes parallelization through the following steps: Eliminate the dependence of the gated unit on the historical hidden state and directly generate the candidate state of the current time step through a linear transformation; Adopt a parallel scan algorithm to batch process the time series, dynamically fuse the current input and the candidate state through an update gate, and output temporal features.
5. The long-term traffic flow prediction method based on a dynamic spatio-temporal graph neural network according to claim 1, wherein: The multi-hop diffusion convolution in the spatial dependence modeling includes performing bidirectional diffusion convolution on the static adjacency matrix to separate the in-degree and out-degree paths.
6. The long-term traffic flow prediction method based on a dynamic spatio-temporal graph neural network according to claim 1, wherein: The multi-hop diffusion convolution is realized in the following way: Multi-hop adjacency matrix stacking: Based on the static adjacency matrix, gradually aggregate the spatial features of multi-hop neighborhood nodes by stacking the outputs of multiple graph convolutional layers; Over-smoothing mitigation mechanism: Add the convolution results of different hop numbers through skip connections to retain the differential features of local and distant nodes to avoid the feature homogenization problem caused by multi-layer graph convolution; Long-distance dependence capture: Use the multi-hop adjacency matrix to cover non-directly connected nodes in the road network and capture the chain effect of cross-regional traffic flow.
7. The long-term traffic flow prediction method based on a dynamic spatio-temporal graph neural network according to claim 5, wherein: The bidirectional diffusion convolution is realized in the following way: Directional separation: Decompose the static adjacency matrix into an out-degree directional adjacency matrix A s and an in-degree directional adjacency matrix A T s , representing the connection relationships of nodes as the starting and ending points of traffic flow respectively; Bidirectional feature fusion: Perform graph convolution operations on the out-degree direction adjacency matrix and the in-degree direction adjacency matrix respectively, independently extract the spatial dependence features of upstream and downstream traffic flows, and fuse the two types of features into the final spatial representation; Traffic flow modeling optimization: Enhance the model's ability to model the traffic flow propagation path through directional separation to distinguish the upstream source and downstream impact area of congestion propagation.
8. The long-term traffic flow prediction method based on a dynamic spatio-temporal graph neural network according to claim 1, wherein: The feature fusion is implemented through an encoder-decoder architecture, and the shallow and deep features are fused through a residual module.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1-8 when executing the program.
10. A non-transitory computer-readable storage medium, having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1-8 are implemented.
Citation Information
Cited By
Traffic flow prediction method, system, equipment and medium
CN121171023A
Abnormal event-oriented multi-modal primitive learning traffic prediction method, system and device, and storage medium
CN122090622A