A traffic state prediction method based on an adaptive dynamic spatio-temporal graph convolution network

By using an adaptive dynamic spatiotemporal graph convolutional network, the problem of insufficient exploration of dynamic spatiotemporal correlations in existing traffic state prediction is solved, enabling accurate long-term prediction of traffic states and improving the performance of prediction models.

CN118116194BActive Publication Date: 2026-05-29INNER MONGOLIA UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INNER MONGOLIA UNIV OF TECH
Filing Date
2024-02-21
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing traffic condition prediction methods fail to fully explore the deep-seated dynamic spatiotemporal correlations and cannot accurately reflect the complex traffic network structure and dynamic spatial correlations, resulting in insufficient prediction accuracy.

Method used

An adaptive dynamic spatiotemporal graph convolutional network is adopted to generate dynamic filters by adaptively inferring graph structure and combining multi-scale gated TCN and time trend-aware self-attention mechanism to capture the spatiotemporal correlation in traffic state data.

Benefits of technology

It achieves accurate long-term prediction of traffic condition data, improves the accuracy and robustness of the prediction model, and is superior to existing methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118116194B_ABST
    Figure CN118116194B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of intelligent transportation, and particularly relates to a traffic state prediction method based on an adaptive dynamic space-time graph convolution network, which comprises the following steps: firstly, adaptively inferring a graph structure from macro and micro perspectives; secondly, extracting time dependence by using a multi-scale gated TCN; thirdly, perceiving a historical change trend hidden in a traffic state data sequence by a time trend perception self-attention mechanism, so as to realize accurate long-term prediction; and finally, generating a dynamic filter at each time step to filter node embedding and generate a dynamic graph, and capturing dynamic spatial dependence by combining an adaptive adjacency matrix. The present application can well mine complex space-time correlation in traffic state data, so as to reveal potential space-time correlation of a dynamic traffic system. Extensive experiments are conducted on two real traffic state data sets, and the experimental results show that the present application has achieved a good prediction level.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent transportation technology, and specifically relates to a traffic state prediction method based on an adaptive dynamic spatiotemporal graph convolutional network. Background Technology

[0002] Accurately predicting future traffic conditions has become one of the main means of traffic management, guidance, control, and optimization. In recent years, extensive research has been conducted on traffic condition prediction. While gated recurrent units (GRUs) and long short-term memory models (LSTMs) can establish temporal correlations and retain memories through gating mechanisms, these methods cannot simulate the spatial correlations of road networks. Therefore, some researchers have turned to convolutional neural networks (CNNs). However, CNNs are inherently suited to Euclidean space, while the structure of road networks is non-Euclidean. To address this issue, most methods use graph convolutional networks (GCNs) to process spatiotemporal information. Deep learning-based methods consider dynamic temporal correlations but neglect the complex dynamic spatial correlations in traffic condition data. The definition of road network structure is often static, but the spatial correlations of road sensor node features in real-world complex traffic networks often change continuously over time. Simultaneously, traffic condition data exhibits strong nonlinear characteristics and complex spatiotemporal dependencies, making traffic condition prediction a significant challenge in resolving spatiotemporal relationships due to highly dynamic spatiotemporal correlations. Currently, existing methods for describing the spatial connectivity of road networks do not fully depict the spatial relationships between traffic nodes and fail to reflect the dynamic changes in connectivity strength, neglecting the dynamic characteristics of the correlation between locations within the road network. Furthermore, most traffic state prediction methods do not fully utilize spatiotemporal dependencies, making it difficult to uncover the deep-seated dynamic spatiotemporal correlations within traffic state data.

[0003] For all these reasons, the accuracy of current technologies in predicting traffic conditions still needs to be improved. Summary of the Invention

[0004] To address the problem that existing traffic state prediction methods cannot fully explore deep-seated dynamic spatiotemporal correlations, the present invention aims to provide a traffic state prediction method based on an adaptive dynamic spatiotemporal graph convolutional network. This method starts from spatial correlation and temporal similarity, comprehensively explores multi-angle spatial relationships between traffic network nodes, and explores the correlation between micro-spatial structure and macro-spatial correlation in the road network, thereby achieving accurate traffic state prediction.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0006] A traffic state prediction method based on an adaptive dynamic spatiotemporal graph convolutional network is proposed. This method includes: first, adaptively inferring the graph structure from both macroscopic and microscopic perspectives; second, extracting temporal dependencies using a multi-scale gated TCN; third, perceiving historical change trends hidden in the traffic state data sequence through a time trend-aware self-attention mechanism, thereby achieving accurate long-term prediction; and finally, generating a dynamic filter at each time step to filter node embeddings, generating a dynamic graph, and capturing dynamic spatial dependencies by combining an adaptive adjacency matrix. This invention effectively mines the complex spatiotemporal correlations in traffic state data, thereby revealing the potential spatiotemporal associations of dynamic traffic systems.

[0007] Furthermore, the specific steps of the traffic state prediction method based on adaptive dynamic spatiotemporal graph convolutional networks of the present invention can be described as follows:

[0008] Step 1: Define the traffic network as a graph G = (V, E, A), where the graph node V represents a road sensor, the graph edge E represents the connectivity between road sensors, and A ∈ R. N×N It is a static adjacency matrix; historical traffic state data recorded by road sensors is used as a graph signal;

[0009] Step 2: Select the traffic flow in the graph signal as the state prediction feature. The magnitude of the predicted traffic flow represents the congestion situation of future traffic conditions. Perform data preprocessing on the graph signal and divide it into training set, validation set and test set.

[0010] Step 3: Construct the macroscopic level diagram structure A Ma and microscopic level diagram structure A Mi Adding the two together and normalizing them, we obtain the adaptive adjacency matrix A. adp ;

[0011] Step 4: Construct a feature enhancement module, which consists of a channel calibration block and a time calibration block connected in series. The channel calibration block is a two-layer fully connected network. First, the feature mapping X∈R is... T×N×D A squeezing operation is performed, and then the impact of each channel is analyzed through a single activation process and a self-thresholding mechanism to obtain the output. Time calibration block with As input, temporal features are extracted using a temporal convolutional layer to obtain a reweighted feature map X. in ∈R T×N×D ;

[0012] Step 5: Construct an adaptive dynamic spatiotemporal graph convolutional network, with the network using X... in The input consists of multiple spatiotemporal blocks and a prediction block, wherein the spatiotemporal blocks include a temporal convolution module, a temporal attention module and a dynamic graph convolution module;

[0013] Step 6: Train the network from Step 5, and use the trained model to predict traffic conditions.

[0014] Compared with the prior art, the beneficial effects of the present invention are:

[0015] (1) This invention fully considers the shortcomings of static spatial modeling of traffic networks. It constructs a macro-adjacency matrix through spatial geographic map and functional map. The macro-level graph structure describes long-term complex spatial relationships. It constructs a micro-adjacency matrix by mining temporal change features. The micro-level graph structure describes sudden short-term fluctuations. The optimal adaptive graph structure is learned from both macro and micro levels.

[0016] (2) This invention fully considers the inherent influence of features and time in traffic status data, and enhances traffic features to improve the information interaction of data in feature channels and time dimensions, rather than performing simple channel dimensionality upgrade.

[0017] (3) This invention fully considers the local historical change trend in the time series and proposes a time trend perception self-attention mechanism to perceive the historical change trend hidden in the traffic state data series, thereby achieving accurate long-term prediction.

[0018] (4) This invention fully considers the complex dynamic spatial dependencies in traffic status data and designs a dynamic graph convolution module. At each time step, a dynamic filter is generated to filter the node embedding and generate a dynamic graph. By combining an adaptive adjacency matrix, dynamic spatial dependencies are captured.

[0019] (5) The present invention has been extensively tested on two real traffic state datasets and its performance has been evaluated with various baseline methods. The results show that the traffic state prediction model based on dynamic spatiotemporal graph convolutional network proposed in this invention outperforms other methods on three standard evaluation metrics and has high accuracy and robustness. Attached Figure Description

[0020] Figure 1 This is an overall structure diagram of an adaptive dynamic spatiotemporal graph convolutional network model disclosed in this invention;

[0021] Figure 2 This invention discloses a flowchart of an adaptive graph construction module in an adaptive dynamic spatiotemporal graph convolutional network model.

[0022] Figure 3 This is a flowchart of a feature enhancement module in an adaptive dynamic spatiotemporal graph convolutional network model disclosed in this invention.

[0023] Figure 4This is a comparison chart of the evaluation metrics of an adaptive dynamic spatiotemporal graph convolutional network model disclosed in this invention and five baseline models on the PEMS04 dataset at 12 time steps.

[0024] Figure 5 This is a comparison chart of the evaluation metrics of an adaptive dynamic spatiotemporal graph convolutional network model disclosed in this invention and five baseline models on the PEMS08 dataset at 12 time steps.

[0025] Figure 6 The figure shows the ablation experiment results of an adaptive dynamic spatiotemporal graph convolutional network model disclosed in this invention.

[0026] Figure 7 This is a visualization analysis of the prediction results of an adaptive dynamic spatiotemporal graph convolutional network model and STG-NCDE on the PEMS04 dataset disclosed in this invention.

[0027] Figure 8 This is a visualization analysis of the prediction results of an adaptive dynamic spatiotemporal graph convolutional network model and STG-NCDE on the PEMS08 dataset disclosed in this invention. Detailed Implementation

[0028] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.

[0029] Please see Figure 1 The diagram shows the overall structure of the traffic state prediction method based on adaptive dynamic spatiotemporal graph convolutional network in this invention. The method includes steps 1 to 6, wherein:

[0030] Step 1: Predefine a static graph. This invention defines the traffic network as a static graph G = (V, E, A), where graph nodes V represent road sensors, graph edges E represent the connectivity between road sensors, and A ∈ R. N×N The system uses a static adjacency matrix, with historical traffic state data recorded by road sensors serving as the graph signal. The graph signal undergoes data preprocessing and is then divided into training, validation, and test sets.

[0031] Specifically, in some embodiments of the present invention, the traffic state data collected by N road sensors at time t for a given traffic network can be regarded as a graph signal on graph G, denoted as X. t ∈R N×C Where C represents the number of traffic features, including flow rate, speed, and occupancy rate. The traffic state prediction task involves learning a function F that maps the historical time step T graphical signal to the future signal at time step P, specifically expressed as:

[0032] [Xt-T+1 ,…,X t ] = F Θ ([X t+1 ,…,X t+P ];G)

[0033] This invention selects traffic flow from the graph signal as the state prediction feature, with the predicted flow indicating the future traffic congestion level. This step involves data preprocessing of the graph signal, including Z-score normalization of the entire dataset, followed by selecting an appropriate dataset partitioning ratio: 60% of the data is used for training, 20% for validation, and the remaining 20% ​​for testing.

[0034] Step 2: Please refer to Figure 2 Construct an adaptive adjacency matrix A from both micro and macro perspectives. adp Specifically, construct the macroscopic level diagram structure A. Ma and microscopic level diagram structure A Mi Adding the two together and normalizing them, we obtain the adaptive adjacency matrix A. adp Among them, the macroscopic level diagram structure A Ma Describing comprehensive long-term information, it consists of a geospatial map and a functional map ΔA. The geospatial map uses a threshold Gaussian kernel to construct an adjacency matrix A. gs The function graph ΔA learns the hidden factors that are difficult to capture by predefined rules and injects the learned hidden relations into the adjacency matrix A. gs In the middle, information is supplemented; microscopic level diagram structure A Mi To describe sudden short-term fluctuations in traffic, since nodes are associated with time series records of traffic conditions, we can describe sudden short-term fluctuations in traffic by mining changes in node features.

[0035] The feature enhancement module of this invention is based on a "squeeze excitation" structure, which enhances the information interaction between the channel and time dimensions. It improves the expressive power of feature mapping by automatically calibrating the importance of the feature space. In some embodiments of this invention, the specific process of step 2 is as follows:

[0036] Step 2.1: Construct the macroscopic adjacency matrix. Adaptively learn the graph adjacency matrix from a macroscopic perspective. The adjacency matrix A of this invention... gs The formula expression is as follows:

[0037]

[0038] in, d represents the geospatial correlation between the i-th road sensor and the j-th road sensor. ijLet be the road network distance from the i-th road sensor to the j-th road sensor, or the Euclidean distance from the i-th road segment to the j-th road segment. Generally, the closer the distance, the stronger the spatial correlation; the farther the distance, the weaker the spatial correlation. ε is the standard deviation of the distance, and ε is the control A. gs The sparsity threshold, exp(·) denotes an exponential function with the natural constant e as the base.

[0039] In this invention, the functional graph ΔA is not designed as a learnable object without any prior information. Instead, it learns the implicit factors that are difficult to capture by predefined rules. Specifically, inspired by Tucker decomposition, given a specific spatial tensor, the purpose of Tucker decomposition is to approximate the dynamic road network node relationship matrix using the product of a core tensor and a factor matrix. The expression for calculating ΔA is as follows:

[0040] ΔA = softmax(ReLU(E) k ×1E t ×2E o ×3E e ))

[0041] Among them, × i For matrix multiplication in the i-th dimension, the function graph It consists of four learnable factor matrices. N represents the factor matrix at different times of the day. t N represents the number of time periods in a day; in this embodiment, N is chosen. t =288, E o ∈R N×s E represents the factor matrix of the starting node. e ∈R N×s E represents the factor matrix of the terminal node. k ∈R s ×s×s Let represent the core tensor, and s represent the dimension of the embedding matrix. The learned hidden relations are injected into the geospatial graph adjacency matrix A. gs In this process, information is supplemented. The macroscopic adjacency matrix is ​​defined as:

[0042] A Ma =A gs +ΔA

[0043] That is, the macroscopic adjacency matrix is ​​used as the macroscopic level graph structure A. Ma .

[0044] Step 2.2: Construct the microscopic adjacency matrix. From a microscopic perspective, the spatial relationships of nodes in the graph can change dramatically due to traffic events, whether routine or unexpected, such as peak hours, weather conditions, or traffic accidents. Since the spatial relationships of nodes are correlated with the time series of traffic conditions, we can describe sudden fluctuations by mining the changes in node features. Specifically, given node features X∈R... T×N×C First, a fully connected network is used to expand the feature dimension from C to D, transforming the feature attributes into a latent space, as shown below:

[0045] H G =FC(X)∈R T×N×D

[0046] Then, in order to extract the temporary spatial relationships of nodes at historical time step T, the transformed node features H are used here. G Along the time dimension, aggregation is performed across time dimensions using an aggregator to extract the temporary spatial relationships of nodes at historical time steps T. The formula is as follows:

[0047] M = AGGREGATE(H G )

[0048] Where M∈R N×D′ It contains information related to nodes and transient factors that may affect the spatial relationships between nodes. The AGGREGATE() function is implemented as a convolution operation:

[0049]

[0050] Where * represents the convolution operation, H i,d M represents the time information of the d-th channel of the i-th node in the input signal. i,d′ W is the d′-th channel of the i-th node in the output signal. d′,d These are trainable parameters that describe the correlation between the d-th channel of the input signal and the d′-th channel of the output signal. The convolution operation compresses the channel dimension to D′, and its convolution kernel size is 1×s′, where s′ is a hyperparameter of the convolution along the time dimension.

[0051] After aggregation across the time dimension, a metric function is learned by representing pairs of nodes. The relationships between nodes are derived as follows:

[0052]

[0053] Among them, M i ∈A N×D′ Let M represent the similarity matrix between the i-th node and other nodes. j ∈R N×D′Let A represent the similarity matrix between the i-th node and other nodes. Mi [i,j] represents the learnable correlation between the i-th node and the j-th node. The microadjacency matrix can be represented by matrix multiplication:

[0054] A Mi =M·M T

[0055] That is, the micro-adjacency matrix is ​​used as the micro-level graph structure A. Mi .

[0056] Step 2.3: Construct the adaptive adjacency matrix. The obtained macro-adjacency matrix and micro-adjacency matrix are added together using the ReLU activation function, and then normalized to obtain the adaptive adjacency matrix A of the graph. adp :

[0057] A adp =Norm(ReLU(A) Ma +A Mi ))

[0058] Step 3: Construct the feature enhancement module. The feature enhancement module consists of two cascaded substructures: a channel calibration block and a time calibration block. See also... Figure 3 Using historical traffic state data X∈R with a historical time step of T T×N×D As input to the feature enhancement module, the channel calibration block is a two-layer fully connected network. It first performs a squeezing operation on the feature map X, which helps the model recalibrate features with low-dimensional distributions. Then, it analyzes the impact of each channel through a single activation process and a self-thresholding mechanism to obtain the output. Similarly, in order to focus on important information in the time series, the time calibration block is used to... As input, temporal features are extracted using a temporal convolutional layer to obtain a reweighted feature map X. in ∈R T×N×D Finally, the results are input into the adaptive dynamic spatiotemporal graph convolutional network; the specific steps of step 3 are as follows:

[0059] Step 3.1: Construct the channel calibration block. The channel block is a two-layer fully connected network. First, the feature mapping X∈R is processed... T×N×D A squeezing operation is performed, which helps the model recalibrate features with low-dimensional distribution. The effect of each channel is then analyzed through a single activation process and a self-thresholding mechanism, as shown below:

[0060] x (c) =σ(W2φ(W1X+b1)+b2)

[0061]

[0062] Where W1 and W2 are the weight parameters of the fully connected layer, b1 and b2 are the biases of the fully connected layer, ⊙ is the Hamada product, and σ(·) and φ(·) are the Sigmoid and ReLU activation functions, respectively.

[0063] Step 3.2: Construct the temporal calibration block. To focus on important information in the temporal dimension, the temporal calibration block utilizes temporal convolutional layers for feature extraction. Output of the channel calibration block. As input to the time calibration block. The calculation format is as follows:

[0064]

[0065]

[0066] in,* k This indicates a temporal convolution operation. The convolution kernel is of size 1×k1. The convolution kernel is of size 1×k². After preprocessing by the feature enhancement layer, the reweighted feature map X is... in ∈R T×N×D The input is then used in the training of subsequent structures.

[0067] Step 4: Construct an adaptive dynamic spatiotemporal graph convolutional network. The network consists of multiple spatiotemporal blocks and a prediction block. Each spatiotemporal block contains a temporal convolutional module, a temporal attention module, and a dynamic graph convolutional module. The temporal convolutional module consists of multiple gated temporal convolutional layers with different receptive fields, which are stacked to expand the receptive field. The temporal attention module captures complex dynamic relationships in traffic state data through an improved multi-head self-attention temporal trend perception mechanism. That is, by adding causal convolutional layers on top of multi-head attention, it perceives historical trends hidden in the traffic state data sequence, thereby achieving accurate long-term prediction. The dynamic graph convolutional module extracts dynamic features from node attributes, generates dynamic filters through GCN at each time step, filters node embeddings, generates a dynamic graph, and correlates it with an adaptive adjacency matrix A. adp This process combines the capture of dynamic spatial dependencies. Finally, the outputs of the dynamic graph convolutional modules in each spatiotemporal block are concatenated and fed into the prediction block in a skip connection manner for output. This step takes the X obtained after processing by the feature enhancement module... in The input is fed into a stacked spatiotemporal block to extract dynamic spatiotemporal features. The specific steps are as follows:

[0068] Step 4.1: Constructing the Temporal Convolutional Module. To improve the model's ability to extract long-term temporal dependencies, this invention uses a multi-scale gated temporal convolutional layer to capture the temporal dynamics of traffic state data. Given the input of the l-th gated temporal convolutional layer... First, use convolution kernels Map the input to X (l) Doubling the number of channels and using a convolution kernel size of 1×K, we obtain the output... Gated temporal convolution is defined as follows:

[0069]

[0070] Z (l) =φ(E l )⊙σ(F l )

[0071] in,* τ Z represents the gated-time convolution operation. (l) ∈R T-(K-1)×N×D E l and F l Representing Z′ respectively (l) The first and second halves. Multi-scale gated temporal convolutional layers expand the receptive field of the temporal dimension by stacking gated temporal convolutions, improving their ability to extract long-term dependencies in data. Defined as follows:

[0072]

[0073]

[0074] in, Corresponding to X respectively (l) After passing through gated-time convolutions with kernels of size 1×K1, 1×K2, and 1×K3, the multi-scale outputs are concatenated using the Concat(·) operation to obtain the desired result. To ensure the parameters are trainable and that the output dimension is equal to the input dimension, the output is obtained through residual connections.

[0075] Step 4.2: Constructing the Temporal Attention Module. To address the issue of local trend agnosticness in numerical data prediction caused by previous multi-head self-attention methods, this invention improves upon the multi-head self-attention temporal trend perception mechanism by considering local contextual information. It is a variant of convolutional self-attention. Causal convolution is added before the query and key linear projection operations to avoid exposing future temporal information to the model. Since the convolution operation is performed by taking the context as input, this enables the model to perceive the local historical change trends hidden in the traffic state data sequence. The improved temporal trend perception self-attention mechanism is defined as follows:

[0076]

[0077]

[0078] Trhead j=Attention(QW j Q KW j k VW j V )

[0079] TrMHSelfAttention(Q,K,V)=Concat(Thead1,...,Trhead h W O

[0080] in,* c For causal convolution operations, Here, h represents the kernel parameters of the causal convolution, h represents the number of attention heads, and W represents the number of attention heads. j Q W j k and W j V W is the projection matrix of the linear transformation applied to Q, K, and V. O This is the projection matrix that acts on the final output.

[0081] Step 4.3: Constructing the dynamic graph convolution module. Due to the complexity of urban traffic conditions and their highly dynamic spatiotemporal correlations, this invention uses a time-varying dynamic graph to reflect the dynamic spatial correlations between traffic state data. Adaptive adjacency matrix A adp It reflects the stationary correlation between each node and can be used in the message passing process of dynamic node states. Its output is a dynamic filter tensor. Dynamic filter tensor With randomly initialized node embedding matrices E1, E2∈R N×D The dynamic filter DE is obtained by performing broadcast multiplication. t The formula is as follows:

[0082]

[0083]

[0084]

[0085]

[0086]

[0087] Where ★ represents graph convolution operation, a is a hyperparameter controlling the saturation rate of the activation function, and DE tThe dynamic node embeddings are filtered for time step t, and the correlation between nodes is dynamically adjusted. The dynamic adjacency matrix DA is calculated for each time step using the similarity between node embeddings. t Simultaneously, the dynamic adjacency matrix is ​​standardized using the following formula:

[0088]

[0089] in, Let represent the standardized dynamic adjacency matrix at time step t. This approach combines static and dynamic graphs to uncover hidden dynamic spatial dependencies, while applying bidirectional diffusing convolution to graph convolution. Particularly in the dynamic graph diffusing convolution part, the influence of bidirectional traffic flow in the dynamic graph is considered. The bidirectional diffusing convolution is defined as follows:

[0090]

[0091] in, Let D represent the transfer matrix of the diffusion process and the transfer matrix of the reverse diffusion process, respectively. O =diag(A adp ),D I =diag(A adp T ) are all non-out-degree diagonal matrices, θ k,f θ k,b These are the parameters for the learnable graph convolution.

[0092] Dynamic adjacency matrix generation, as a crucial component of dynamic graph convolution, utilizes graph convolution within the dynamic filter to achieve message passing between nodes, fully extracting spatial dynamic information and implicitly learning the dynamic representation of the road network. Finally, the output dynamic adjacency matrix is ​​used in a bidirectional diffusing convolutional network to obtain the output of the dynamic graph convolution module, as shown in the following formula:

[0093]

[0094]

[0095]

[0096]

[0097] Here, α, β, and γ are hyperparameters that control the weights of different components. and These represent the input and output of the dynamic graph convolution module, respectively. K is the graph convolution depth, W1 and W2 are learnable parameters, and θ is the learnable graph convolution parameter.

[0098] Step 4.4: To avoid model degradation and accelerate model convergence, residual connections are added to each spatiotemporal block. Specifically, the residual connection output of the l-th ST-Layer is as follows:

[0099]

[0100] Among them, H (l) The output of the dynamic graph convolution for the l-th spatiotemporal block. This is the jump output of the l-th spacetime block. Jump outputs from different spacetime blocks are merged together using jump connections, as shown below:

[0101]

[0102] in, For a fully connected network of layer l, This is the jump output for layer l. To achieve multi-step traffic prediction, multiple spatiotemporal blocks are superimposed and multi-layer attributes are fused to capture spatiotemporal patterns. Then, the prediction results for the next P steps of all nodes are obtained through a multilayer perceptron:

[0103]

[0104] Among them, X OUT The output of the skip connection is MLP(·), which is a multilayer perceptron. This represents the predicted value for the future time step P.

[0105] Step 5: Calculate the mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) between the final predicted and true values ​​obtained in Step 4. Then, perform backpropagation through the Adam optimizer to update the network parameters. This yields the adaptive dynamic spatiotemporal graph convolutional network model trained in each round. The formulas for mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) are shown below:

[0106]

[0107]

[0108]

[0109] Where y is the true value. This is a predicted value.

[0110] Step 6: Repeat steps 2 to 5 to optimize the model parameters until the loss function converges, i.e., the MAE no longer decreases. Then the network parameters are updated to the optimal level, and the model training ends.

[0111] This invention experimentally validated the above-mentioned method and achieved significant results. Please refer to Table 1, which shows the experimental results of 17 methods on two real traffic state datasets, PEMS04 and PEMS08, under the same experimental conditions. The evaluation criteria are mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE). By comparing the prediction results of all methods, the experimental results of the best-performing model are shown in bold in the table. Table 1 shows that the adaptive dynamic spatiotemporal graph convolutional network model significantly improves the prediction performance over an average of 12 time steps compared to other methods. Compared to the state-of-the-art method STG-NCDE (Spatio-Temporal Graph Neural Controlled Differential Equation), the mean absolute error (MAE) is reduced by 4.58% and 5.05%, the root mean square error (RMSE) is reduced by 3.38% and 5.24%, and the mean absolute percentage error (MAPE) is reduced by 2.51% and 4.13%, respectively.

[0112] Table 1. Experimental results of the PEMS04 and PEMS08 traffic state datasets.

[0113]

[0114]

[0115] Please see Figure 4 , Figure 5 The figure shows a comparison of the prediction results of the Adaptive Dynamic Spatiotemporal Graph Convolutional Network model with five baseline models at 12 time steps on the PEMS04 and PEMS08 datasets under the same experimental conditions. As can be seen from the figure, compared with other baseline models, the Adaptive Dynamic Spatiotemporal Graph Convolutional Network outperforms the other baselines in prediction performance at all time steps.

[0116] Please see Figure 6 The image shows an ablation study conducted on the PEMS04 dataset under the same experimental conditions to evaluate and understand the impact of key components in the adaptive dynamic spatiotemporal graph convolutional network model on the model's predictive performance. The variants of the adaptive dynamic spatiotemporal graph convolutional network model are compared below:

[0117] RMTC: An adaptive dynamic spatiotemporal graph convolutional network model without multi-scale gated temporal convolution modules. That is, stacked gated temporal convolutions are removed, and only traditional gated temporal convolutions are used to extract temporal correlations.

[0118] RFA: An adaptive dynamic spatiotemporal graph convolutional network model without a feature enhancement module, i.e., the channel calibration fast and the temporal calibration fast are removed.

[0119] RAmi: An adaptive dynamic spatiotemporal graph convolutional network model that does not consider building an adaptive graph structure at the micro level, that is, it removes the micro graph adjacency matrix and only uses the macro graph adjacency matrix.

[0120] RDG: Adaptive dynamic spatiotemporal graph convolutional network model without dynamic graph convolution, that is, the dynamic graph convolution branch in the spatial graph convolution module is removed, and only diffusion convolution is used to capture spatial correlation.

[0121] RFA+RDG: An adaptive dynamic spatiotemporal graph convolutional network model without feature enhancement modules and dynamic graph convolutions, i.e., removing the channel calibration block, temporal calibration block, and dynamic graph convolution branches in the spatial graph convolutional layers.

[0122] RFA+RDG+RTAtt: An adaptive dynamic spatiotemporal graph convolutional network model without feature enhancement modules, dynamic graph convolution, and trend-aware self-attention mechanisms. That is, the dynamic graph convolution branches in the channel calibration fast and temporal calibration fast and spatial graph convolution modules, as well as the temporal attention module, are removed.

[0123] Experimental results show that the feature enhancement module, the multi-scale gated temporal convolution module, the dynamic graph convolution branch in the graph convolution module, and the temporal attention module all positively impact the prediction performance of the adaptive dynamic spatiotemporal graph convolutional network model. Specifically, adding the dynamic graph convolution branch slightly decreases the prediction performance at 5 minutes, but the performance improves significantly with increasing prediction duration, indicating that the generated dynamic graph effectively uncovers complex time-varying spatial correlations. Adding the feature enhancement module or the micrograph adjacency matrix also improves the model's prediction performance. Furthermore, adding multiple modules, such as the feature enhancement module or the micrograph adjacency matrix, significantly improves the model's prediction performance, demonstrating the effectiveness of each component in capturing global spatiotemporal dependencies. Moreover, removing either the feature enhancement module or the temporal attention module results in a significant loss in prediction performance.

[0124] Please see Figure 7 , Figure 8 The image shows a visualization analysis of the prediction curves and actual traffic flow curves of the Adaptive Dynamic Spatiotemporal Graph Convolutional Network (ADG-NCDE) model and STG-NCDE on the PEMS04 and PEMS08 datasets. While the ADG-NCDE model and STG-NCDE can fit the real-world traffic flow changes well across many time periods, the model in this invention exhibits more accurate prediction performance in challenging traffic scenarios, such as morning and evening rush hours or situations with large fluctuations. For example, Figure 7The visualization results of a sensor or node within a given day on PEMS04 are shown. As can be seen from the part marked by the blue dashed box, the model of this invention responds to the dynamic changes of peak traffic faster and more accurately than the baseline method. In contrast, STG-NCDE has limited predictive ability, and its predicted curve deviates significantly from the ground truth. Therefore, the adaptive dynamic spatiotemporal graph convolutional network model proposed in this invention can capture complex spatiotemporal dependencies more quickly and effectively, thereby simulating the dynamic changes of real-time traffic conditions more accurately.

Claims

1. A traffic state prediction method based on an adaptive dynamic spatiotemporal graph convolutional network, characterized in that, Includes the following steps: Step 1: Define the transportation network as a graph Graph nodes Represents road sensors, graph edges This indicates the connectivity between road sensors. It is a static adjacency matrix; historical traffic state data recorded by road sensors is used as a graph signal; Step 2: Select the traffic flow in the graph signal as the state prediction feature. The magnitude of the predicted traffic flow represents the congestion situation of future traffic conditions. Perform data preprocessing on the graph signal and divide it into training set, validation set and test set. Step 3: Construct the macroscopic level diagram structure and microscopic level diagram structure Add the two together and normalize them to obtain the adaptive adjacency matrix. ; Describes comprehensive long-term information, consisting of geospatial maps and functional maps. The geospatial map is constructed using a threshold Gaussian kernel to establish an adjacency matrix. , Learn implicit factors that are difficult to capture by predefined rules, and inject the learned hidden relationships into... Information supplementation is achieved in the adjacency matrix. The expression is: in, Indicates the first The road sensor and the first The geospatial correlation between road sensors and [other sensors]. For the first The road sensor to the first The road network distance of the first road sensor, or the first... The section to the first Euclidean distance of each road segment It is the standard deviation of the distance. It is control Sparsity threshold Represented by natural constant An exponential function with base 0; The functional diagram The expression is as follows: in, For the first Matrix multiplication in multiple dimensions, function graph It consists of four learnable factor matrices. This represents the factor matrix at different times of the day. The factor matrix representing the starting node. The factor matrix representing the end node. Represents the core tensor. The number of moments in a day. Let be the dimension of the embedding matrix; Define the macroscopic adjacency matrix as: That is, using the macro-adjacency matrix as the macro-level graph structure. ; The calculation method for describing sudden short-term fluctuations is as follows: Given node features First, the attribute dimension is reduced from... Expand to The feature attributes are transformed into a latent space, as shown below: Then, the transformed node features Along the time dimension, aggregation is performed across time dimensions using an aggregator to extract the nodes' historical time steps. The temporary spatial relationship is given by the formula: in, Includes information related to nodes and temporary factors. The function is a convolution operation: in For convolution operations, Indicates the first element in the input signal The node of the first Channel time information, It is the first in the output signal The node of the first aisle, These are trainable parameters that describe the input signal's first... Channels and output signals The correlation between channels is compressed into a single channel dimension by the convolution operation. ; By learning the metric function of paired node representations The relationships between nodes are derived as follows: in, , indicating the first The similarity matrix of each node to other nodes. , indicating the first The similarity matrix of each node to other nodes. Indicates the first The node and the first If the nodes can learn correlations, then the expression for the micro-adjacency matrix is: That is, using the micro-adjacency matrix as the micro-level graph structure. ; Step 4: Construct a feature enhancement module, which consists of a channel calibration block and a time calibration block connected in series. The channel calibration block is a two-layer fully connected network. First, the feature mapping is performed... A squeezing operation is performed, and then the impact of each channel is analyzed through a single activation process and a self-thresholding mechanism to obtain the output. Time calibration block with Using this as input, temporal features are extracted using a temporal convolutional layer to obtain a reweighted feature map. ; Step 5: Construct an adaptive dynamic spatiotemporal graph convolutional network, the network using... The input consists of multiple spatiotemporal blocks and a prediction block, wherein the spatiotemporal blocks include a temporal convolution module, a temporal attention module and a dynamic graph convolution module; Step 6: Train the network from Step 5 and use the trained model to predict traffic conditions.

2. The traffic state prediction method based on adaptive dynamic spatiotemporal graph convolutional network according to claim 1, characterized in that, In step 1, time Traffic state data collected by road sensors can be viewed as a graph. A signal in the above graph is represented as , The traffic state prediction task involves learning a function, which represents the number of traffic features, including flow rate, speed, and occupancy rate. , to set the historical time step The graph signal is mapped to In the future signal of the time step, it is represented as: 。 3. The traffic state prediction method based on adaptive dynamic spatiotemporal graph convolutional network according to claim 1, characterized in that, In step 4, The calculation formula is as follows: in, , These are the weight parameters of the fully connected layer. , For the bias of the fully connected layer, yes product, and They are respectively and Activation function; The calculation formula is as follows: in, This indicates a temporal convolution operation. for kernel size, for The size of the convolution kernel.

4. The traffic state prediction method based on adaptive dynamic spatiotemporal graph convolutional network according to claim 3, characterized in that, In step 5, Input is fed into stacked spatiotemporal blocks to extract dynamic spatiotemporal features.

5. The traffic state prediction method based on adaptive dynamic spatiotemporal graph convolutional network according to claim 4, characterized in that, In step 5, the temporal convolution module consists of multiple gated temporal convolutional layers with different receptive fields; the temporal attention module captures the dynamic relationships in traffic state data through an improved multi-head self-attention temporal trend perception mechanism, that is, adding causal convolutional layers on the basis of multi-head attention to perceive the historical change trends hidden in the traffic state data sequence; the dynamic graph convolution module extracts dynamic features from node attributes, generates dynamic filters through GCN at each time step, filters node embeddings, generates a dynamic graph, and compares it with an adaptive adjacency matrix. Combined with capturing dynamic spatial dependencies; The outputs of the dynamic graph convolutional modules in each spatiotemporal block are concatenated and then fed into the prediction block for output in a skip connection manner.

6. The traffic state prediction method based on adaptive dynamic spatiotemporal graph convolutional network according to claim 5, characterized in that, In step 5: Step 5.1: Given the first... Input of layer-gated temporal convolutional layers First, use convolution kernels Doubling the number of channels in the input mapping will increase the kernel size. , get output ; Step 5.2: The improved multi-head self-attention time trend perception mechanism is defined as follows: in, For causal convolution operations, , The parameters of the convolution kernel for causal convolution. To note the number of heads, and A linear transformation is applied to The projection matrix on, This is the projection matrix that acts on the final output; Step 5.3: Convert the dynamic filtering tensor With random initialization of node embedding matrix A dynamic filter is obtained by performing broadcast multiplication. The formula is as follows: in, It is an adaptive adjacency matrix The output dynamic filtering tensor, For graph convolution operations, It is a hyperparameter that controls the saturation rate of the activation function. for Dynamic node embeddings after time step filtering dynamically adjust the correlation between nodes; the dynamic adjacency matrix for each time step is calculated using the similarity between node embeddings. Simultaneously, the dynamic adjacency matrix is ​​standardized using the following formula: in, Indicates time step The standardized dynamic adjacency matrix combines static and dynamic graphs to uncover hidden dynamic spatial dependencies, while also applying bidirectional diffusing convolution to graph convolution. The dynamic adjacency matrix is ​​used in a bidirectional diffusing convolutional network to obtain the output of the dynamic graph convolutional module, as shown in the following formula: in, , and These are hyperparameters that control the weights of different components. and These represent the input and output of the dynamic graph convolution module, respectively. The depth of the graph convolution. , For learnable parameters, These are the parameters for the learnable graph convolution.

7. The traffic state prediction method based on adaptive dynamic spatiotemporal graph convolutional network according to claim 6, characterized in that, Add residual connections to each spatiotemporal block, the first... The residual connection output of the ST-Layer is as follows: in, For the first The output of the dynamic graph convolution of each spatiotemporal block, For the first The jump outputs of individual spacetime blocks are merged together through jump connections, as shown below: in, For the first A fully connected network of layers. For the first The layer jumps the output; to achieve multi-step traffic prediction, multiple spatiotemporal blocks are superimposed and multi-layer attributes are fused to capture spatiotemporal patterns; then, the next steps of all nodes are obtained through a multilayer perceptron. Prediction results for the step: in, For the output of the jump connection, For multilayer perceptrons, Indicates the future Predicted value for time step.

8. The traffic state prediction method based on adaptive dynamic spatiotemporal graph convolutional network according to claim 6, characterized in that, Gated temporal convolution is defined as follows: in, This indicates a gated-time convolution operation. , and They represent The first and second halves of the multi-scale gated temporal convolutional layer are defined as follows: in, , , Corresponding to After a size of , , Multi-scale output of gated temporal convolution with convolutional kernels. The operation concatenates the outputs from three different scales to obtain the result. , To ensure the parameters are trainable and that the output dimension is equal to the input dimension, the output is obtained through residual connections. .