Multi-view fusion spatio-temporal dynamic graph convolution network city traffic flow prediction method

By employing a multi-view fusion spatiotemporal dynamic graph convolutional network method, this approach addresses the challenge of capturing the spatiotemporal characteristics and dynamic traffic patterns of urban road networks in existing technologies. It achieves accurate urban traffic flow prediction, improving prediction accuracy and robustness.

CN116935649BActive Publication Date: 2026-02-17CHINA UNIV OF MINING & TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202311004107.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-09
Publication Date
2026-02-17
Estimated Expiration
2043-08-09

AI Technical Summary

Technical Problem

Existing traffic flow prediction technologies struggle to capture the deep nonlinear spatiotemporal correlations in urban road networks, fail to effectively capture the spatiotemporal characteristics of road network data, and cannot capture the dynamic characteristics of traffic flow in static graphs. They also ignore the functional characteristics between nodes and the impact of dynamic traffic patterns, making it impossible to accurately uncover the long-term dependencies between traffic sequences.

Method used

We employ a multi-view fusion spatiotemporal dynamic graph convolutional network method. By constructing an encoder and decoder, and combining a temporal local convolutional multi-head self-attention module and a spatial multi-view dynamic graph convolutional module, we can capture the temporal similarity and dynamic spatiotemporal correlation between road network nodes, learn the global spatial features of the road network, and capture the dependency between local spatial structure and global spatial correlation.

Benefits of technology

It significantly improves the accuracy and robustness of urban traffic flow prediction, and can comprehensively capture the temporal similarity and dynamic spatiotemporal correlation between road network nodes, thereby enhancing the model's accuracy in urban traffic flow prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116935649B_ABST
    Figure CN116935649B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-view fusion's space-time dynamic graph convolution network traffic flow prediction method, this method from spatial correlation and time sequence similarity, fully excavate the multivariate spatial correlation between road network nodes, capture the dependence between local spatial structure and global spatial correlation in road network node, first use historical traffic flow data as input, add spatial embedding matrix and time embedding matrix to traffic flow sequence.Second, the historical traffic flow sequence processed is input into the encoder containing time local convolution multi-head self-attention module and spatial multi-view dynamic graph convolution module, and the space-time features are extracted by the encoder.Finally, the historical traffic flow sequence containing spatial embedding matrix and time embedding matrix and the output of the encoder are input into the decoder to generate future traffic flow data, which realizes accurate traffic flow prediction under multiple time windows and improves the accuracy of urban traffic flow prediction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of traffic flow prediction, and particularly relates to a multi-view fusion spatiotemporal dynamic graph convolution network urban traffic flow prediction method. BACKGROUND

[0002] In view of the problems of complex connectivity of urban road networks, unbalanced traffic distribution, dynamic changes of road conditions and the like, research on traffic flow prediction for urban road network systems has become a research hotspot at the present stage. Urban traffic flow prediction can provide continuous and accurate future state information of roads according to historical road conditions, provide effective decision support for urban planning and traffic management, provide information support for urban residents' travel path planning, and achieve the purpose of relieving traffic congestion and green and low-carbon travel.

[0003] Early urban traffic flow prediction technologies are mostly based on statistical learning methods and machine learning methods. These methods are difficult to capture the deep nonlinear spatiotemporal correlation in urban road networks, and are seriously dependent on feature engineering, and cannot effectively capture the spatiotemporal characteristics of road network data. In order to model the time and space characteristics of traffic flow, researchers have designed various neural network methods to solve the traffic flow prediction problem in the traffic field, such as the convolutional neural network (CNN) short-term traffic flow prediction method with the authorization number CN201910688693.0, the recurrent neural network (RNN) traffic flow prediction method with the authorization number CN202011119621.3, and the like, but such methods can only learn the traffic flow characteristics in the Euclidean space, and are difficult to express the urban road network with complex topological structure. RNN also has the problem of gradient explosion or disappearance, which leads to the model being unable to effectively capture the long-term dependence relationship between traffic sequences, and being unable to accurately mine the time evolution characteristics of traffic flow. Therefore, researchers introduce the graph convolution network (GCN) capable of processing non-Euclidean data into traffic flow prediction. GCN can learn the relationship between nodes by performing convolution operation on the traffic road network graph.

[0004] The existing traffic flow prediction technology still has certain deficiencies, problem 1: the GCN uses a pre-defined static city road network graph to describe the spatial correlation between nodes, since the traffic flow of the road network node changes dynamically with time and space, these static graphs cannot capture its dynamic characteristics, and ignore the influence of similar functional characteristics between nodes in the road network and dynamic traffic patterns. Specifically, the nodes distributed in different areas of the city may have no direct connection edges or have a large distance span, if the functions of these areas are similar, then the traffic flow signals between them often show similar spatio-temporal characteristics and similar traffic patterns in different time dimensions. Therefore, comprehensively capturing the temporal similarity and dynamic spatio-temporal correlation between road network nodes can effectively improve the accuracy of urban traffic flow prediction. Problem 2: As a connected complex and high spatio-temporal correlation network structure, the dependence relationship between nodes not only exists in the local area, but also has correlation between nodes far away, and the dependence (interaction, correlation) relationship between nodes will affect the traffic conditions of the global road network. Therefore, it is necessary to capture the dependence relationship between the local spatial structure and the global spatial correlation of the road network. SUMMARY

[0005] The purpose of the present application is to provide a multi-view fusion spatio-temporal dynamic graph convolution network traffic flow prediction method. The method comprehensively excavates the multi-element spatial correlation between road network nodes from the spatial correlation and temporal similarity, learns the global spatial features of the road network, captures the dependence relationship between the local spatial structure and the global spatial correlation of the road network nodes, and realizes accurate urban traffic flow prediction.

[0006] Technical scheme: The multi-view fusion spatio-temporal dynamic graph convolution network urban traffic flow prediction method of the present application, for the target area, executes the following steps to obtain the predicted urban traffic flow of the target area in a preset future time period starting from the current time:

[0007] Step 1: For the target area, collect the historical traffic flow data corresponding to each sampling time in a preset historical time period ending at the current time;

[0008] Step 2: Add a spatial embedding matrix and a time embedding matrix to the historical traffic flow data collected in step 1 to obtain a historical traffic flow sequence that preserves the spatial heterogeneity and time sequence order characteristics of each node;

[0009] Step 3: Building the encoder: the encoder is stacked by L identical encoder layers, each of which contains two basic modules: a temporal local convolution multi-head self-attention module for modeling the temporal dependence of traffic data in the time dimension, and a spatial multi-view dynamic graph convolution module for capturing the spatial dynamic characteristics and temporal similar interaction characteristics of traffic data in the space dimension; input the historical traffic flow sequence of each reserved node spatial heterogeneity and time sequence order feature obtained in step 2 into the encoder to extract the spatio-temporal features, and output each historical traffic flow spatio-temporal feature sequence;

[0010] Step 4: Building the decoder: the encoder is stacked by L identical decoder layers, each of which is composed of two temporal local convolution multi-head self-attention modules and one spatial multi-view dynamic graph convolution module, the first temporal local convolution multi-head self-attention module is used to capture the temporal correlation in the decoder sequence, and the second temporal local convolution multi-head self-attention module is used to capture the correlation between the encoder output historical traffic flow spatio-temporal feature sequence and the decoder sequence; input the historical traffic flow sequence of each reserved node spatial heterogeneity and time sequence order feature in step 2 and the historical traffic flow spatio-temporal feature sequence in step 3 into the decoder, and output the predicted urban traffic flow of the target area in the preset future time period starting from the current time.

[0011] Further, step 2 specifically includes:

[0012] Step 2.1: In space, first, an additional embedding vector is assigned to each node to obtain an initial spatial position embedding matrix, and then a graph convolution layer is applied for Laplacian smoothing, so that each node has a similar representation with the neighbor nodes, reflecting the graph structure information while building a heterogeneous spatial structure, and finally obtaining the spatial embedding matrix E SP ;

[0013] Step 2.2: In time, in order to effectively model the order information of the time sequence, a time position embedding vector is added to each element of the initial sequence, so that adjacent elements have similar representations; a fixed position embedding E TP is selected for the input element at the position, obtaining a time embedding matrix and each vector dimension 1≤d≤d model , as follows:

[0014]

[0015]

[0016] where t is the relative index of each element in the input, d represents the vector dimension, and d model represents the model vector dimension;

[0017] Step 1.3: Space embedding matrix E SP and time embedding matrix E TP is added to the traffic flow sequence, obtaining a traffic flow sequence that retains the spatial heterogeneity of nodes and the sequential characteristics of time series:

[0018]

[0019] wherein X represents the traffic flow sequence, X Sp+TP represents the traffic flow sequence that retains the spatial heterogeneity of nodes and the sequential characteristics of time series.

[0020] Further, step 3 specifically includes: the historical traffic flow sequence after spatio-temporal embedding processing is sequentially input into the time local convolution multi-head self-attention module and the spatial multi-view dynamic graph convolution module in the encoder layer to extract the spatio-temporal features and dynamic characteristics of the traffic data:

[0021] Step 3.1: Constructing a time local convolution multi-head self-attention module, in order to solve the problem that the traditional multi-head self-attention mechanism cannot perceive local trends in traffic data prediction, this method introduces a time local convolution multi-head self-attention mechanism that can match the most relevant local features to explore the temporal dynamics of traffic sequences. Using the local perception characteristics of convolution operation, using 1D time series convolution calculation to replace linear projection on query and key, the convolution kernel only focuses on the local area in the input during convolution operation, so that the model can capture the local trend features in the traffic data and the short-term correlation in the sequence data. In order to avoid exposing future time series information to the model during the learning process and affecting the prediction results, causal convolution operation is used to mask the information after the current position, better capturing causal relationships without being disturbed by future information. The formal definition of the local convolution multi-head self-attention mechanism is as follows:

[0022] LCSelfMultiHead(Q,K,V)=Concat(LChead1,…,LChead h )W O

[0023]

[0024] wherein is the 1D convolution kernel parameter, is the causal convolution kernel parameter, * represents convolution operation, and the input of the l+1 layer encoder is After time local convolution multi-head self-attention operation on all nodes, the intermediate representation of the sequence is obtained

[0025] Step 3.2: Constructing the spatial multi-view dynamic graph convolution module, first modeling the spatial structure graph and the dynamic association graph, then performing spatial structure graph convolution and dynamic association graph convolution operation under spatial dual view, calculating the global representation learning of the road network, and finally weighting and fusing the learned global representation of the road network with the output of the spatial dynamic graph convolution module and the time sequence dynamic graph convolution module.

[0026] Further, in step 3.2, the modeling of the spatial structure graph and the dynamic association graph is as follows: based on static spatial structure and dynamic time sequence similarity, a spatial structure graph and a dynamic association graph are constructed respectively. The spatial structure graph is constructed based on real static road network distance and threshold Gaussian kernel, accurately recording the spatial position relationship between nodes. The distance matrix between node i and node j is The specific definition is as follows:

[0027]

[0028] Where d ij represents the distance between node i and node j, σ 2 is a threshold value for controlling the distribution of matrix AS, and ∈ is a threshold value for controlling the sparsity of the adjacency matrix; the dynamic association matrix between node i and node j is constructed by Fast-DTW algorithm Definition is:

[0029]

[0030] Where X i and X j represent the time sequence of node i and node j respectively, and ∈ is a threshold value for controlling the sparsity of the adjacency matrix.

[0031] Further, in step 3.2, the spatial structure graph convolution and dynamic association graph convolution operation under spatial dual view is as follows: the spatial correlation strength between nodes is dynamically calculated by using self-attention mechanism, and the connection relationship between nodes is adaptively adjusted. The output Z l of the given node representation and the time local convolution multi-head attention is as follows:

[0032]

[0033] Where S att (i,j) represents the correlation strength between node i and node j, and the greater the value of S att , the greater the correlation strength between nodes. The adjacency matrix A is adjusted by the spatial attention correlation weight matrix to obtain the output of the dynamic graph convolution module;

[0034] DGCN(Z l )=σ((A⊙Satt )Z l W)

[0035] where ⊙ denotes the Hadamard product, the spatial dynamic graph convolution directly uses the adjacency matrix A, only considers the single static structure of the traffic network, and ignores the similar functional characteristics between nodes and the influence of dynamic traffic patterns, so the spatial structure matrix A S and the dynamic correlation matrix A D are introduced, which capture the static spatial correlation and dynamic temporal similarity in traffic data, respectively, and based on the traffic graph matrix from the dual perspective, the spatial structure graph convolution module and the dynamic correlation graph convolution module are further constructed:

[0036]

[0037]

[0038] After the spatial dual-perspective dynamic graph convolution, the spatial structure graph convolution and the dynamic correlation graph convolution operations are performed, and the spatial structure graph convolution result and the dynamic correlation graph convolution result

[0039] Further, in step 3.2, the global representation learning of the road network is calculated, and finally the learned global representation of the road network is weighted and fused with the outputs of the spatial dynamic graph convolution module and the temporal dynamic graph convolution module. Specifically, from the global perspective of the nodes, the global representation learning of the road network is calculated to capture the global spatial correlation between different nodes in the road network, and the Pearson correlation coefficient is used to analyze the global spatial correlation between the nodes in the traffic network. For any nodes i and j in the road network, the global correlation matrix between them is constructed as follows: is represented as follows:

[0040]

[0041] where X i =(x 1,i ,x 2,i ,…,x t,i ) is the traffic flow feature of node i in the t time period, is the average value of X i , and the node pairs with high correlation are selected by setting the correlation threshold k; if the correlation measure between the nodes is greater than k, the correlation measure value is kept, otherwise it is represented as 0.

[0042] The global representation learning of the road network uses graph convolution to aggregate the node features with high correlation, models the node spatial correlation in the global range of the road network, and the global representation learning of the road network is calculated as follows:

[0043]

[0044] In order to analyze the role and relationship between the traffic flow signal in the global space of the road network and the dynamic characteristics of the local space propagation, the learned global representation of the road network is weighted and fused with the output of the spatial dynamic graph convolution module and the time dynamic graph convolution module, the node representation of the multi-space feature and the global feature is realized, and the definition of the fusion operation is as follows:

[0045]

[0046] Wherein, alpha, tau [0, 1], alpha is the fusion ratio of the global representation, tau is the fusion ratio of the two kinds of graph representation, and the output of the spatial multi-view dynamic graph convolution module is obtained after the fusion operation

[0047] Further, step 4 specifically comprises:

[0048] The constructed decoder is stacked by L identical decoder layers, each decoder layer is composed of two time local convolution multi-head self-attention modules and a spatial multi-view dynamic graph convolution module. Based on the output of the encoder The decoder part uses another L decoding layers to predict the future space-time traffic flow sequence

[0049] The first time local convolution multi-head self-attention module is used to capture the time sequence correlation in the decoder sequence, the second time local convolution multi-head self-attention module is used to capture the correlation between the encoder output sequence and the decoder sequence, the generated future sequence is input into the full connection network to map to the specified dimension, and finally the prediction sequence of the specified future prediction step is output

[0050] Advantages: compared with the prior art, the present application has the following obvious advantages:

[0051] (1) The present application fully considers the static information and dynamic mode of the traffic road network, and captures the time sequence similarity correlation between nodes, does not depend on the pre-defined static adjacency matrix, and constructs a spatial distance graph and a dynamic similarity graph from two perspectives of static road network and dynamic mode;

[0052] (2) The present application fully considers the local change trend information and causal relationship in the time sequence, proposes a local convolution self-attention mechanism, considers the spatial heterogeneity and traffic sequence order information in the process of capturing the time sequence change, and designs a dynamic graph convolution network for exploring the hidden dynamic spatial correlation of nodes;

[0053] (3) The application fully considers the dependency relationship between the local structure and the global correlation in the road network, designs a road network global traffic feature calculation module, improves the expressiveness of the road network node features, and significantly improves the ability of the model to capture the local changes and global dependencies of the road network;

[0054] (4) The application verifies the effectiveness of the method on four real traffic data sets, and the experimental results show that the multi-view fusion spatio-temporal dynamic graph convolution network urban traffic flow prediction model has high accuracy and robustness in urban traffic flow prediction. BRIEF DESCRIPTION OF DRAWINGS

[0055] Figure 1 A flowchart of a multi-view fusion spatio-temporal dynamic graph convolution network urban traffic flow prediction method disclosed in the present application.

[0056] Figure 2 A flowchart of the Fast-DTW algorithm in the multi-view fusion spatio-temporal dynamic graph convolution network method disclosed in the present application.

[0057] Figure 3 A dynamic graph convolution example graph in the multi-view fusion spatio-temporal dynamic graph convolution network method disclosed in the present application.

[0058] Figure 4 A road network global representation learning example graph in the multi-view fusion spatio-temporal dynamic graph convolution network method disclosed in the present application. DETAILED DESCRIPTION

[0059] The technical solutions of the application will be further described below with reference to the accompanying drawings.

[0060] Please refer to Figure 1 , which is a flowchart of the multi-view fusion spatio-temporal dynamic graph convolution network urban traffic flow prediction method in the present application, and the method comprises steps 1 to 3, wherein:

[0061] Step 1, using historical traffic flow data as input, adding spatial embedding matrix and time embedding matrix to the traffic flow sequence to obtain a traffic flow sequence that retains node spatial heterogeneity and time sequence order characteristics; the specific scheme is as follows:

[0062] Step 1.1: In space, first, assign an additional embedding vector to each node to obtain an initial spatial position embedding matrix, then apply a graph convolution layer for Laplacian smoothing, so that each node has a similar representation with neighbor nodes, reflecting graph structure information while constructing a heterogeneous spatial structure, and finally obtaining the spatial embedding matrix E SP .

[0063] Step 1.2: In terms of time, to effectively model the sequential information of the time series, a time position embedding vector is added to each element of the initial sequence, so that adjacent elements have similar representations. A fixed-position embedding E is selected for the input element at the specified position. TP The time embedding matrix is ​​obtained, and each vector dimension is 1≤d≤d. model As shown below:

[0064] E TP (t,2d)=sin(t / 10000 2d / dmodel )

[0065] E TP (t,2d+1)=cos(t / 10000 2d / dmodel )

[0066] Where t is the relative index of each element in the input.

[0067] Step 1.3: Insert the spatial embedding matrix E SP and time embedding matrix E TP Adding it to the traffic flow sequence yields a traffic flow sequence that retains both the spatial heterogeneity of the nodes and the temporal sequence characteristics:

[0068]

[0069] Step 2: Input the historical traffic flow sequence containing the spatial embedding matrix and the temporal embedding matrix into the encoder. The encoder consists of L identical encoder layers stacked together. Each layer contains two basic modules: a temporal local convolutional multi-head self-attention module that models the temporal dependencies of traffic data in the temporal dimension, and a spatial multi-view dynamic graph convolutional module that captures the spatial dynamic characteristics and temporal similarity interaction features of traffic data in the spatial dimension. The encoder extracts spatiotemporal features. The specific steps of Step 2 are as follows:

[0070] Historical traffic flow sequences, after being processed by spatiotemporal embedding, are sequentially input into the temporal local convolutional multi-head self-attention module and the spatial multi-view dynamic graph convolutional module in the encoder layer to extract the spatiotemporal features and dynamic characteristics of the traffic data.

[0071] Step 2.1: Constructing a Temporal Local Convolutional Multi-Head Self-Attention Module. To address the issue that traditional multi-head self-attention mechanisms fail to perceive local trends in traffic data prediction, this method introduces a temporal local convolutional multi-head self-attention mechanism that matches the most relevant local features to explore the temporal dynamics of traffic sequences. Leveraging the local perception characteristic of convolution operations, 1D temporal convolution computation replaces the linear projections on the query and key. This convolutional kernel focuses only on local regions in the input during convolution operations, enabling the model to capture local trend features in traffic data and short-term correlations in sequence data. To avoid exposing future temporal information to the model during the learning process and affecting prediction results, causal convolution operations are used to mask information after the current position, better capturing causal relationships without being interfered with by future information. The formal definition of the local convolutional multi-head self-attention mechanism is as follows.

[0072] LCSelfMultiHead(Q,K,V)=Concat(LChead1,…,LChead h W O

[0073]

[0074] in For 1D convolution kernel parameters, These are the parameters for the causal convolution kernel, and * indicates the convolution operation. The input to the (l+1)th layer encoder is... After performing temporal local convolution multi-head self-attention operations on all nodes, an intermediate representation of the sequence is obtained.

[0075] Step 2.2: Construct a spatial multi-view dynamic graph convolution module. First, model the spatial structure graph and the dynamic association graph. Then, perform convolution operations on the spatial structure graph and the dynamic association graph under the dual spatial view to calculate the global representation learning of the road network. Finally, perform weighted fusion of the learned global representation of the road network with the outputs of the spatial dynamic graph convolution module and the temporal dynamic graph convolution module.

[0076] Traffic map construction: Based on static spatial structure and dynamic temporal similarity, a spatial structure map and a dynamic relationship map were constructed respectively. The spatial structure map was constructed based on the distance of the real static road network and a thresholded Gaussian kernel, accurately recording the spatial positional relationships between nodes. The distance matrix between nodes i and j is also included. The specific definition is as follows:

[0077]

[0078] Where d ij σ represents the distance between node i and node j.2 For control matrix A S The threshold for distribution, ∈ is the threshold for controlling the sparsity of the adjacency matrix.

[0079] Please see Figure 2 The dynamic correlation matrix between nodes i and j is constructed using the Fast-DTW algorithm. definition for:

[0080]

[0081] Where X i and X j Let i and j represent the time series of nodes i and j, respectively, and ∈ be the threshold for controlling the sparsity of the adjacency matrix.

[0082] Please see Figure 3 To capture the dynamic spatial relationships between nodes in a road network, this method constructs a spatially multi-view dynamic graph convolution. It utilizes a self-attention mechanism to dynamically calculate the spatial correlation strength between nodes and adaptively adjusts the connectivity between them. Given the node representation and the output Z of the temporal local convolution multi-head attention mechanism... l The spatial attention relevance weight matrix is ​​calculated as follows:

[0083]

[0084] Where S att (i,j) represents the correlation strength between nodes i and j, S att A larger value indicates a stronger correlation between nodes. The adjacency matrix A is adjusted using the spatial attention correlation weight matrix to obtain the output of the dynamic graph convolution module.

[0085] DGCN(Z l )=σ((A⊙S att )Z l W)

[0086] Where ⊙ represents the Hadamard product, the spatial dynamic graph convolution directly uses the adjacency matrix A, which only considers the static structure of a single traffic network and ignores the similar functional characteristics between nodes and the influence of dynamic traffic patterns. Therefore, a spatial structure matrix A is introduced. S and dynamic correlation matrix A D The system captures static spatial correlation and dynamic temporal similarity in traffic data, and further constructs a spatial structure graph convolution module and a dynamic correlation graph convolution module based on the dual-view traffic graph matrix.

[0087]

[0088]

[0089] After performing dynamic graph convolution under dual spatial perspectives, spatial structure graph convolution and dynamic relational graph convolution operations are performed, and the spatial structure graph convolution result is output. Convolution results with dynamic relational graphs

[0090] Please see Figure 4 A global representation learning module is constructed to compute the global representation of the road network from a global perspective of nodes, thereby capturing the global spatial correlation between different nodes in the road network. This method uses the Pearson correlation coefficient to analyze the global spatial correlation between nodes in the traffic network. For any nodes i and j in the road network, a global correlation matrix is ​​constructed between them. It is expressed as follows:

[0091]

[0092] Where X i =(x 1,i ,x 2,i ,…,x t,i Let be the traffic flow characteristics of node i during time period t. For X i The average value is used. Highly correlated node pairs are selected by setting a correlation threshold k. If the correlation metric between nodes is greater than k, its correlation metric value is maintained; otherwise, it is represented as 0.

[0093] Global representation learning for the road network uses graph convolution to aggregate highly correlated node features, modeling the spatial correlation of nodes across the entire road network. The global representation learning computation for the road network is as follows:

[0094]

[0095] To analyze the dynamic characteristics and relationships between traffic flow signals propagating in the global and local spaces of the road network, this method performs a weighted fusion of the learned global road network representation with the outputs of the spatial dynamic graph convolutional module and the temporal dynamic graph convolutional module, achieving node representations of multi-dimensional spatial features and global features. The fusion operation is defined as follows:

[0096]

[0097] Where α, τ ∈ [0, 1], α is the fusion ratio of the global representation, and τ is the fusion ratio of the two graph representations. The output of the spatial multi-view dynamic graph convolution module is obtained after the fusion operation.

Claims

1. A multi-view fusion spatio-temporal dynamic graph convolution network urban traffic flow prediction method, characterized in that, For the target area, the following steps are performed to obtain the predicted urban traffic flow of the target area in a preset future time period starting from the current time: Step 1: For the target area, collect historical traffic flow data corresponding to each sampling time in a preset historical time period ending at the current time; Step 2: Add a spatial embedding matrix and a temporal embedding matrix to the historical traffic flow data collected in step 1 to obtain a historical traffic flow sequence with spatial heterogeneity and temporal sequence characteristics of each reserved node; Step 3: Construct an encoder: the encoder is composed of L identical encoder layers, each of which includes two basic modules: a time local convolution multi-head self-attention module for modeling the temporal dependence of traffic data, and a spatial multi-view dynamic graph convolution module for capturing the spatial dynamic characteristics and temporal similar interaction features of traffic data; input the historical traffic flow sequence with spatial heterogeneity and temporal sequence characteristics of each reserved node obtained in step 2 into the encoder to extract spatio-temporal features, and output each historical traffic flow spatio-temporal feature sequence; Step 3 specifically includes: the historical traffic flow sequence processed by spatio-temporal embedding is input into the time local convolution multi-head self-attention module and the spatial multi-view dynamic graph convolution module in the encoder layer in turn to extract the spatio-temporal features and dynamic characteristics of the traffic data: Step 3.1: Construct a time local convolution multi-head self-attention module, use the local perception characteristics of convolution operation, use 1D time series convolution calculation to replace linear projection on query and key, and the convolution kernel only focuses on the local area in the input during convolution operation, so that the model can capture the local trend characteristics in the traffic data and the short-term correlation in the sequence data; in order to avoid exposing future time series information to the model during learning, affecting the prediction result, use causal convolution operation to mask the information after the current position, better capture the causal relationship without the interference of future information, and the formal definition of the local convolution multi-head self-attention mechanism is as follows: ; ; wherein , is a 1D kernel parameter, is a causal kernel parameter, denotes a convolution operation, the layer encoder input is , after a time-local convolution multi-head self-attention operation on all nodes, an intermediate representation of the sequence is obtained; Step 3.2: Construct a spatial multi-view dynamic graph convolution module, first model the spatial structure graph and dynamic association graph, then perform spatial structure graph convolution and dynamic association graph convolution operation under spatial dual view, calculate the global representation learning of the road network, and finally weight and fuse the learned global representation of the road network with the output of the spatial dynamic graph convolution module and the time series dynamic graph convolution module; In step 3.2, the global representation learning of the road network is calculated, and finally the learned global representation of the road network is weighted and fused with the outputs of the spatial dynamic graph convolution module and the temporal dynamic graph convolution module. Specifically, from the global perspective of the nodes, the global representation learning of the road network is calculated to capture the global spatial correlation between different nodes in the road network. The Pearson correlation coefficient is used to analyze the global spatial correlation between nodes in the traffic network. For any node in the road network and , a global correlation matrix between them is constructed , which is represented as follows: ; wherein is a node In traffic flow characteristics over a time period, is the average value, by setting a correlation threshold selecting node pairs with high correlation; if the correlation measure between nodes is greater than , then its correlation measure value is kept, otherwise it is represented as 0; The global representation learning of the road network uses graph convolution to aggregate node features with high correlation, models the spatial correlation of nodes in the global range of the road network, and the global representation learning of the road network is calculated as follows: ; The learned global representation of the road network is weighted and fused with the output of the spatial dynamic graph convolution module and the time series dynamic graph convolution module to realize the node representation of multi-element spatial features and global features, and the definition of the fusion operation is as follows: ; wherein , is a fusion ratio of global representation, is a fusion ratio of two graph representations, and the output of the spatial multi-view dynamic graph convolution module after the fusion operation ; Step 4: Constructing a decoder: the encoder is composed of L identical decoder layers stacked, each decoder layer is composed of two time-local convolution multi-head self-attention modules and a spatial multi-view dynamic graph convolution module, the first time-local convolution multi-head self-attention module is used to capture the temporal correlation in the decoder sequence, and the second time-local convolution multi-head self-attention module is used to capture the correlation between the encoder output historical traffic flow spatio-temporal feature sequence and the decoder sequence; input the historical traffic flow sequence of each reserved node spatial heterogeneity and time sequence order feature of step 2 and each historical traffic flow spatio-temporal feature sequence of step 3 into the decoder, and output the predicted urban traffic flow of the target area in the preset future time period starting from the current time.

2. The multi-view fusion spatio-temporal dynamic graph convolution network urban traffic flow prediction method according to claim 1, characterized in that, Step 2 specifically comprises: Step 2.1: In space, first assign each node an additional embedding vector to get the initial spatial position embedding matrix, then apply the graph convolution layer for Laplacian smoothing, so that each node has a similar representation with the neighbor nodes, build the heterogeneous spatial structure while reflecting the graph structure information, and finally get the spatial embedding matrix ; Step 2.2: In time, to effectively model the sequential information of time series, add a time position embedding vector to each element of the initial sequence, so that adjacent elements have similar representations; select a fixed position embedding for the input element at the position , get the time embedding matrix and each vector dimension As follows: ; ; wherein is the relative index of each element in the input, d denotes the vector dimension, d model denotes the model vector dimension; Step 1.3: Spatial embedding matrix and temporal embedding matrix is added to the traffic flow sequence, resulting in a traffic flow sequence that preserves the spatial heterogeneity of the nodes and the sequential characteristics of the time series: ; where X represents the traffic flow sequence, X Sp+TP represents the traffic flow sequence that retains the spatial heterogeneity of nodes and the sequential characteristics of time series.

3. The multi-view fusion spatio-temporal dynamic graph convolution network urban traffic flow prediction method according to claim 1, characterized in that, In step 3.2, the modeling space structure graph and dynamic association graph are specifically: based on the static space structure and dynamic time sequence similarity, the space structure graph and the dynamic association graph are constructed respectively, the space structure graph is constructed based on the real static road network distance and the threshold Gaussian kernel, accurately records the spatial position relationship between nodes and the distance matrix between nodes is specifically defined as follows: ; wherein representative nodes and nodes between, is a threshold value for controlling the distribution of the matrix is a threshold value for controlling the sparsity of the adjacency matrix; the dynamic association matrix between nodes and is constructed by the Fast-DTW algorithm , is defined as: ​ ; wherein and denote the time series of nodes and nodes respectively, is a threshold value for controlling the sparsity of the adjacency matrix.

4. The multi-view fusion spatio-temporal dynamic graph convolution network urban traffic flow prediction method according to claim 1, characterized in that, In step 3.2, the spatial structure graph convolution and dynamic correlation graph convolution operation under the spatial dual view are specifically as follows: the spatial correlation strength between nodes is dynamically calculated by using a self-attention mechanism, the connection relationship between nodes is adaptively adjusted, the representation of a given node is given, and the output of time local convolution multi-head attention The calculation of the spatial attention correlation weight matrix is as follows: ; wherein represents the correlation strength between nodes and , The greater the value, the greater the correlation strength between nodes. The adjacency matrix is adjusted by the spatial attention correlation weight matrix , to obtain the output of the dynamic graph convolution module. ; wherein denotes the Hadamard product, the spatial dynamic graph convolution directly uses the adjacency matrix , only considers the single static structure of the traffic network, ignores the similar functional characteristics between nodes and the influence of dynamic traffic patterns, so the spatial structure matrix and the dynamic correlation matrix are introduced, which capture the static spatial correlation and dynamic temporal similarity in traffic data, respectively, and based on the traffic graph matrix from two perspectives, the spatial structure graph convolution module and the dynamic correlation graph convolution module are further constructed: ; ; After performing dynamic graph convolution under dual spatial perspectives, spatial structure graph convolution and dynamic relational graph convolution operations are performed, and the spatial structure graph convolution result is output. Convolution results with dynamic relational graphs .

5. The multi-view fusion spatio-temporal dynamic graph convolution network urban traffic flow prediction method according to claim 1, characterized in that, Step 4 specifically comprises: The decoder is constructed by stacking L identical decoder layers, each of which is composed of two temporal local convolution multi-head self-attention modules and one spatial multi-view dynamic graph convolution module, based on the output of the encoder , the decoder part uses another decoder layer to predict the future spatiotemporal traffic flow sequence ; The first time-local convolution multi-head self-attention module is used to capture the time correlation in the decoder sequence, the second time-local convolution multi-head self-attention module is used to capture the correlation between the encoder output sequence and the decoder sequence, the generated future sequence is input into a full connection network and mapped to a specified dimension, and finally the prediction sequence of a specified future prediction step is output .

Citation Information

Patent Citations

  • Short-term traffic flow prediction method based on 3D convolutional neural network

    CN110517482A

  • Traffic flow prediction method based on recurrent neural network with embedded attention mechanism

    CN112257918B

  • Traffic prediction method based on multi-scale space-time fusion graph network

    CN115240425A

  • Traffic flow prediction method based on improved space-time Transform

    CN115273464A

  • Traffic flow long-time prediction method and system based on improved Transform model

    CN115587454A