Traffic flow prediction method and system based on bidirectional spatio-temporal expansion graph convolutional network

By adopting a bidirectional space-time extended graph convolution network in the traffic flow prediction model, combining feature fusion and causal convolution technology, the shortcomings of the existing models in extracting spatial features and processing abnormal data are solved, and the prediction accuracy and robustness are improved.

CN119832727AActive Publication Date: 2025-04-15CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411716096.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-04-15
Estimated Expiration
2044-11-27

AI Technical Summary

Technical Problem

The existing traffic flow prediction model has limitations when extracting spatial features, especially the spatial feature extraction of edge nodes is insufficient, and the outliers and missing data in traffic flow data are not effectively processed, affecting the prediction accuracy and robustness.

Method used

The traffic flow prediction method based on a bidirectional space-time extended graph convolution network is adopted to process abnormal and missing data through feature fusion and causal convolution technology, and the spatial characteristics of traffic flow, especially the spatial characteristics of edge nodes, are extracted using extended graph convolution technology.

Benefits of technology

It improves the accuracy and robustness of traffic flow prediction, reduces the number of model parameters and training time, and provides traffic flow prediction results more accurately and timely.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832727A_ABST
    Figure CN119832727A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic flow prediction method and system based on a bidirectional spatio-temporal expansion graph convolutional network. The method comprises the following steps: acquiring historical traffic flow data of each node in a road network in real time and taking the historical traffic flow data as initial traffic flow features; performing feature fusion and causal convolution on the initial traffic flow features in sequence to obtain traffic flow data with time sequence features; calculating a two-way normalized adjacent matrix corresponding to the road network, and performing extended graph convolution operation with an ARMA filter on the traffic flow data and the normalized adjacent matrix in each direction to obtain each layer of information of extended graph convolution in each direction; and aggregating each layer of information of the expansion graph convolution in the same direction to obtain a layer aggregation feature of the expansion graph convolution in each direction, and then obtaining final output through attention aggregation. According to the method, the prediction precision is improved, and the model parameter quantity and the training time are reduced to meet the requirement of real-time traffic flow prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to traffic flow prediction technology, and in particular to a traffic flow prediction method and system based on a bidirectional spatiotemporal extended graph convolutional network. Background Art

[0002] Traffic flow prediction technology is a core area in intelligent transportation systems (ITS). With the acceleration of urbanization, traffic congestion and accidents are becoming increasingly serious, and the demand for real-time and accurate traffic flow prediction is growing. Intelligent transportation systems have become a core part of smart city construction by innovating traffic management models and improving the utilization efficiency of transportation networks.

[0003] In the study of traffic flow prediction, many methods have emerged. Early research was mainly based on mathematical statistics methods, such as AutoRegressive Model (AR), History Average Model (HA), AutoRegressive Integrated Moving Average (ARIMA), Kalman Filter Model (KFM), etc. With the development of deep learning technology, prediction models based on neural networks have gradually become a hot topic of research, including BP neural network models, Stacked AutoEncoders (SAE), Recurrent Neural Network (RNN), etc.

[0004] In recent years, researchers have begun to explore deep learning models that combine spatiotemporal features. For example, some studies have proposed applying convolutional neural networks (CNNs) to data with spatiotemporal attributes to extract richer features. In addition, graph convolutional neural networks (GCNs) have shown strong capabilities in processing graph structured data, especially in irregular structured data such as traffic networks. Spatio-Temporal Graph Convolutional Network (STGCN) can better capture spatiotemporal information by extending spatial graph convolution to spatiotemporal graph convolution. Summary of the invention

[0005] The technical problems to be solved by the present invention are:

[0006] (1) First, existing models have limitations when extracting spatial features, especially the spatial features of edge nodes, which leads to limited prediction accuracy;

[0007] (2) Second, the outliers and missing data in the traffic flow data have not been effectively processed, which affects the accuracy and robustness of the model;

[0008] (3) Third, the existing models have very limited prediction accuracy and long response time, and are unable to provide accurate and timely guidance to traffic travelers and traffic management departments.

[0009] In view of the above problems in the prior art, the present invention provides a traffic flow prediction method and system based on a bidirectional spatiotemporal extended graph convolutional network, which can effectively extract the spatiotemporal characteristics of traffic flow, improve prediction accuracy, and reduce the number of model parameters and training time to meet the needs of real-time traffic flow prediction.

[0010] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0011] A traffic flow prediction method based on a bidirectional spatiotemporal extended graph convolutional network includes the following steps:

[0012] Obtain historical traffic flow data of each node in the road network in real time and use it as initial traffic flow features;

[0013] The initial traffic flow features are sequentially subjected to feature fusion and causal convolution to obtain traffic flow data with time series features;

[0014] Calculating a bidirectional normalized adjacency matrix corresponding to the road network, performing an extended graph convolution operation with an ARMA filter on the traffic flow data and the normalized adjacency matrix in each direction, and obtaining each layer of information of the extended graph convolution in each direction;

[0015] Aggregate the information of each layer of the extended graph convolution in the same direction to obtain the layer aggregation features of the extended graph convolution in each direction;

[0016] The layer aggregation features of the extended graph convolution in each direction are aggregated through attention to obtain the final output and serve as the prediction result of traffic flow data.

[0017] Furthermore, the initial traffic flow features are sequentially subjected to feature fusion and causal convolution. Specifically, the initial traffic flow features are divided into paths, and each path is sequentially subjected to feature fusion and causal convolution to obtain traffic flow data corresponding to the normalized adjacency matrix in each direction.

[0018] Furthermore, when the initial traffic flow features are subjected to feature fusion and causal convolution in sequence, the steps of feature fusion include:

[0019] The dimension of the data sequence of each node is expanded along the time dimension to obtain the data sequence after the dimension is expanded;

[0020] The data sequence after each node dimension is expanded is subjected to feature aggregation through the specified kernel width. The expression is as follows:

[0021]

[0022] in, is the data sequence after the dimension of the i-th node is expanded, * F is the feature aggregation operation, Γ κ is the convolution kernel for feature aggregation, κ is the kernel width, is the output of the feature aggregation of the i-th node;

[0023] The above steps are iterated until the number of feature fusion operations meets the requirement.

[0024] Furthermore, when the initial traffic flow features are subjected to feature fusion and causal convolution in sequence, the steps of causal convolution include:

[0025] Get the output of feature fusion for each node, and then calculate the output of causal convolution for each node in parallel. The expression is as follows:

[0026]

[0027] Among them, F(s) represents the output of the first layer after a layer of causal convolution. s elements; represents the output of the feature fusion of the i-th node, * d represents the causal convolution operation, Γ K is a convolution kernel with width K, represents the s+jth element in the output of the fusion of the i-th node feature, γ j Represents the j-th element of the convolution kernel.

[0028] Furthermore, when calculating the bidirectional normalized adjacency matrix corresponding to the road network, it specifically includes:

[0029] According to the connection relationship of the nodes in the road network, an initial adjacency matrix A is calculated;

[0030] Determine the number of nodes that need to add edges, and select the corresponding number of nodes in order from small to large as the nodes that need to add edges, and construct a filling matrix A′ according to the nodes that need to add edges;

[0031] Use the filling matrix A′ to expand the initial adjacency matrix A to obtain the expanded adjacency matrix A e ;

[0032] Calculate the extended adjacency matrix A e The corresponding Laplace matrix L e, then the Laplace matrix L e The upper and lower triangular matrices of are normalized separately to obtain the bidirectional normalized adjacency matrix L p and L r .

[0033] Furthermore, when adding edge nodes as needed to construct the filling matrix A′, it includes:

[0034] Record the position index of each node that needs to add edges, calculate the difference between the median degree of all nodes and the average degree of the nodes that need to add edges to obtain the number of edges added to the node, make non-repetitive pairwise combinations of the index of each node that needs to add edges, assign values ​​to the corresponding positions of the filling matrix A′, and increase the counter by one until the index of each node is traversed or the value of the counter reaches the number of edges added to the node.

[0035] Furthermore, when the traffic flow data and the normalized adjacency matrix in different directions are subjected to extended graph convolution operations with ARMA filters, the expressions are as follows:

[0036]

[0037] in, represents the output of the lth layer of the extended graph convolution corresponding to the mth direction, represents the traffic flow data corresponding to the mth direction, represents the normalized adjacency matrix corresponding to the mth direction, and V m is a learnable parameter and σ(·) is the ReLU activation function.

[0038] Furthermore, when aggregating each layer of information of the extended graph convolution in the same direction, it specifically includes:

[0039] Convolve each layer of information corresponding to the extended graph in the mth direction The layer output information of the extended graph convolution corresponding to the mth direction is obtained through two layers of fully connected layer output modules, and the expression is as follows:

[0040]

[0041] in, and is a trainable parameter, sigmoid(·) is the activation function;

[0042] After obtaining the layer output information of the extended graph convolution corresponding to the m-th direction, aggregate the different layer information of the same extended graph convolution to obtain the layer aggregation features of the extended graph corresponding to the m-th direction. The expression is as follows:

[0043]

[0044] Among them, ⊙ is the Hadamard product operation, is the training parameter, H m is the layer aggregation feature of the expanded graph corresponding to the m-th direction.

[0045] Furthermore, when the layer aggregation features of the extended graph convolution in different directions are aggregated through attention aggregation, the expression is as follows:

[0046]

[0047] Among them, H m is the layer aggregation feature of the extended graph corresponding to the mth direction, Z m H m The converted one-dimensional vector, W m Yes and Z m Training parameters of the same dimension, b m is the bias, α m is the attention score of the expanded graph corresponding to the mth direction, Z o is the final result of attention aggregation.

[0048] The present invention also proposes a traffic flow prediction system based on a bidirectional spatiotemporal extended graph convolutional network, comprising a microprocessor and a computer-readable storage medium connected to each other, wherein the microprocessor is programmed or configured to execute any of the traffic flow prediction methods based on a bidirectional spatiotemporal extended graph convolutional network.

[0049] Compared with the prior art, the advantages of the present invention are:

[0050] (1) The present invention uses feature fusion technology to effectively process abnormal and missing data in traffic flow data and smooth the data while taking into account the original node features and the features of the nodes added after graph expansion;

[0051] (2) The present invention fully extracts the spatial characteristics of traffic flow, especially the spatial characteristics of edge nodes, by extending the graph convolution technology, thereby improving the accuracy of prediction;

[0052] (3) The present invention optimizes the model structure and improves the reliability of the prediction results through information aggregation and output technology;

[0053] (4) When aggregating spatial information at different layers, the present invention shares graph convolution parameters and combines lightweight causal convolution design to reduce the number of parameters and training time, thereby improving the practical application value of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 Flowchart of the bidirectional spatiotemporal extended graph convolution model.

[0055] Figure 2 Schematic diagram of feature fusion module.

[0056] Figure 3 This is a schematic diagram of the extended graph structure. DETAILED DESCRIPTION

[0057] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.

[0058] Embodiment 1

[0059] This embodiment proposes a traffic flow prediction method based on a bidirectional spatiotemporal extended graph convolutional network. To address the first disadvantage, a road network extended graph structure is proposed, and autoregressive moving average (ARMA) filter graph convolution is used as a model component to extract spatial features, especially the spatial features of edge nodes, and spatial features of different layers are aggregated through bidirectional graph convolution; to address the second disadvantage, a feature fusion module is constructed, and traffic flow data is preprocessed through feature reconstruction and feature aggregation, and abnormal and missing data are smoothed, while taking into account the node information added after the graph is expanded; to address the third disadvantage, a bidirectional spatiotemporal extended graph convolution model (Bi-STEGCM) is proposed. When aggregating spatial information of different layers through feature fusion, lightweight causal convolution and bidirectional graph convolution technology, the convolution kernel parameters are shared, the spatiotemporal characteristics of traffic flow are effectively extracted, the prediction accuracy is improved, and the number of model parameters and training time are reduced to meet the needs of real-time traffic flow prediction.

[0060] The method of this embodiment specifically includes the following steps:

[0061] S1) Real-time acquisition of historical traffic flow data of each node in the road network and use it as initial traffic flow features;

[0062] S2) The initial traffic flow features are sequentially subjected to feature fusion and causal convolution to obtain traffic flow data with time series features;

[0063] S3) calculating a bidirectional normalized adjacency matrix corresponding to the road network, and performing an extended graph convolution operation with an ARMA filter on the traffic flow data and the normalized adjacency matrix in each direction, to obtain each layer of information of the extended graph convolution in each direction;

[0064] S4) Aggregate each layer of information of the extended graph convolution in the same direction to obtain layer aggregation features of the extended graph convolution in each direction;

[0065] S5) Aggregate the layer aggregation features of the extended graph convolution in each direction through attention aggregation to obtain the final output as the prediction result of the traffic flow data.

[0066] Each step is described in detail below.

[0067] In this embodiment, before step S1, a road network traffic flow prediction problem is further defined. The road network structure is composed of the location of the sensor (node) and the connectivity of the sensor. In this embodiment, the road network graph structure is defined as an undirected graph G = (V, E, A), where Represents the set of road network nodes, E represents the set of edges, which means that if two sensors are reachable in the road network and there is no other sensor between them, then an edge in the road network graph structure is formed between the two sensors. is the adjacency matrix, which can be obtained through the set E of edges.

[0068] Traffic flow data involves multiple variables such as traffic speed and traffic flow. In this embodiment, we focus on traffic speed prediction. Therefore, the traffic characteristics of node i at time t can be expressed as For the current time t, the traffic characteristics of node i in the next T time steps can be expressed as The traffic characteristics of all nodes at time t can be expressed as The traffic prediction problem in this embodiment can be defined as: for the current time t, using the historical observed traffic speed of P time steps Predict traffic speed Q time steps into the future The mapping relationship is represented by f(·), which can be expressed by formula (1):

[0069]

[0070] Therefore, the historical traffic flow data of each node in step S1 of this embodiment specifically refers to a sequence of historical observed traffic flow data of P time steps before the current time t of each node.

[0071] This embodiment constructs a bidirectional spatiotemporal extended graph convolution model through steps S2 to S5. In order to simulate the nonlinear expression ability of highly complex traffic flow, the model uses causal convolution to capture temporal features and extended graph convolution to capture spatial features, such as Figure 1 As shown in the figure, the original features first enter the feature fusion layer and reconstruct new features. This process can alleviate the impact of missing data and outliers on the model; then the time series features are extracted through causal convolution. The data with time series features are then input into the extended graph convolution layer. Considering the directionality of traffic flow, the model uses a pair of twin networks with bidirectional adjacency matrices as extended graph convolution layers. In order to better extract spatial features, the spatial extended graph convolution of each layer needs to enter the layer output module; at the same time, the output models of the same layer in the twin network are aggregated into the information aggregation layer. Finally, the information aggregation layer results of different layers are input into the output model to obtain the final result.

[0072] In step S2 of this embodiment, when the initial traffic flow features are sequentially subjected to feature fusion and causal convolution, the feature fusion step is included. The feature fusion process can also alleviate the impact of missing data and unconventional traffic (weather influence, traffic accidents) on traffic flow prediction. At the same time, considering the subsequent extended graph convolution, the expanded node features will reuse the internal graph network node features. Through feature fusion, both the internal node features and the expanded node features can be taken into account at the same time. The specific steps are as follows:

[0073] S21) The dimension of the data sequence of each node is expanded along the time dimension to obtain the data sequence after the dimension is expanded, such as Figure 2 As shown in the figure, through the feature reconstruction layer, the data is doubled along the time dimension, with the feature of node i For example, we can get This operation can double the dimension of the node sequence, which can enrich the sequence features and meet the needs of subsequent feature aggregation and causal convolution operations to reduce the sequence dimension. t:(t+P) →X t:(t+2P) ;

[0074] S22) performs feature aggregation on the data sequence after the dimension of each node is expanded through the specified kernel width. Figure 2 The feature aggregation layer in the figure has a kernel width of 3. Taking node i as an example, the expression is as follows:

[0075]

[0076] in, is the input of the original road network information in feature aggregation, that is, the data sequence after the i-th node dimension is expanded. * F is the feature aggregation operation, Γ κ is the convolution kernel of feature aggregation, κ is the kernel width, and after the feature aggregation operation, the output is reduced by 2(κ-1) in the time dimension. The output of feature aggregation is

[0077] Iterate the above steps until the number of feature fusion operations meets the requirements, and you can get: in is the input feature, i.e., the initial traffic flow feature in step S1, FF m is the mth feature fusion operation, is the output of the mth feature fusion operation, where T F =2P-2(κ-1).

[0078] In step S2 of this embodiment, when the initial traffic flow features are subjected to feature fusion and causal convolution in sequence, a causal convolution step is included, specifically including: obtaining the output of feature fusion of each node, and then calculating the output of causal convolution of each node in parallel.

[0079] At the road network node i, the causal convolution model uses the time series traffic flow speed information of the corresponding node As input, after convolution kernel operation, it is output to the next layer (in the case of no padding operation, the information dimension will be reduced by -1 dimension of kernel width). The specific calculation is shown in formula (3):

[0080]

[0081] Among them, F(s) represents the sth element output after one layer of causal convolution; represents the output of the feature fusion of the i-th node, * d represents the causal convolution operation, Γ K It is a convolution kernel with width K, and its width is K; represents the s+jth element of the input feature vector, that is, the s+jth element in the output of the ith node feature fusion, γ j represents the jth element of the convolution kernel. In this process, N nodes in the road network are calculated in parallel.

[0082] Passing the feature-fused road network information into the causal convolutional model yields: The channel is D C , a causal convolution kernel with width K, is the output of causal convolution, where T C =2P-2κ-K+3.

[0083] In step S3 of this embodiment, when calculating the bidirectional normalized adjacency matrix corresponding to the road network, it includes:

[0084] S31) Calculate the expansion graph:

[0085] According to the connection relationship of the nodes in the road network, the initial adjacency matrix A is calculated. Specifically, the connection relationship of the road network can be obtained through the distance between its nodes, and the road network adjacency matrix can be obtained through the node connection relationship. Before expanding the graph, the initial adjacency matrix is ​​first obtained by formula (4).

[0086]

[0087] Among them, A ij represents the element in the i-th row and j-th column of the adjacency matrix A, dist(v i ,v j ) represents the node v in the road networki To node v j The distance, σ 2 is the variance of the distances of all nodes in the road network, and δ is the threshold. In the traffic path network, the connection relationship between nodes contains adjacency information, which has a substantial impact on the evolution of traffic flow related information in the road network.

[0088] The graph is further expanded because the traffic flow in any graph network does not exist in isolation. Part of the traffic flow in the dataset used is obtained from the external structure and can also flow out to the external structure.

[0089] Figure 3 (a) It can be seen that the degree of the edge nodes (non-filled nodes) of the road network graph is smaller than the degree of the internal nodes, so the edge nodes can be basically determined by the value of the degree, thereby expanding the graph. The graph expansion method is as follows:

[0090] Determine the number of nodes that need to increase the edge. The expression is as follows:

[0091] M=N×τ, (5)

[0092] Among them, N is the number of nodes in the road network, τ is a hyperparameter that determines the proportion of nodes with newly added edges in the extended graph, and M is the number of nodes that need to add edges;

[0093] Select the corresponding number of nodes in order from small to large as the nodes that need to add edges. The expression is as follows:

[0094]

[0095] in, is a one-dimensional vector in which the node degrees are arranged from small to large. Take out the degrees of the first M nodes and record them as The position index corresponding to its node is recorded as D in .

[0096] Add edge nodes as needed to build a filling matrix A', including:

[0097] After recording the position index of each node that needs to add edges, calculate the difference between the median degree of all nodes and the average degree of the nodes that need to add edges to get the number of edges added to the node. The expression is as follows:

[0098] d m =d mode -d ne , (7)

[0099] Among them, d m is the median of all node degrees d mode And the average degree d of the nodes whose edges need to be increased neThe difference between

[0100] The index of each node to which edges need to be added is combined in pairs without duplication, and the corresponding position of the filling matrix A′ is assigned ε, and the counter is incremented by one until the index of each node is traversed or the value of the counter reaches the number of edges added to the node. The expression for assigning ε is as follows:

[0101]

[0102] Among them, dist is the average value of all distances of road network nodes.

[0103] The pseudo code of the algorithm for constructing the filling matrix A' by adding edge nodes as needed is as follows:

[0104]

[0105]

[0106] After obtaining the filling matrix A′, the initial adjacency matrix A is expanded using the filling matrix A′ to obtain the expanded adjacency matrix A e , as shown in formula (9):

[0107] A e =A+A′, (9)

[0108] Among them, A e To expand the adjacency matrix, this process is to make the degree of the internal nodes of the road network graph the same as the degree of the edge nodes, by Figure 3 (c) You can see that the road network diagram will expand.

[0109] Further calculate the expanded adjacency matrix A e The corresponding Laplace matrix L e , specifically, the extended adjacency matrix A e conduct Normalized, where D e A e The degree matrix of .

[0110] S32) Calculate the bidirectional extended adjacency matrix

[0111] After getting the extended adjacency matrix A e , the Laplace matrix L is obtained by symmetric normalization e After that, the Laplace matrix L e The upper and lower triangular matrices of are normalized separately to obtain the bidirectional normalized adjacency matrix L p and L r , the symmetric matrix represents an undirected graph, and two asymmetric normalized matrices are obtained through equations (10) and (11) to characterize the directed nature of the road network traffic flow.

[0112] L p =softmax(triu(L e )), (10)

[0113] L r =softmax(tril(L e )), (11)

[0114] Among them, triu(·) and tril(·) are used to obtain the upper triangular and lower triangular matrices respectively, and softmax(·) is a normalization operation. Finally, the bidirectional normalized adjacency matrix L is obtained p and L r .

[0115] In step S2 of this embodiment, the initial traffic flow features are sequentially subjected to feature fusion and causal convolution. Specifically, the initial traffic flow features are divided into paths, and each path is sequentially subjected to feature fusion and causal convolution to obtain traffic flow data corresponding to the normalized adjacency matrix in each direction.

[0116] After the initial traffic flow features are fused through their respective features, we can obtain and Then, after causal convolution, we get traffic flow data with time series characteristics. and Furthermore, in step S3 of this embodiment, when the traffic flow data and the normalized adjacency matrix of each direction are respectively subjected to an extended graph convolution operation with an ARMA filter, the expression is as follows:

[0117]

[0118] in, represents the output of the lth layer of the extended graph convolution corresponding to the mth direction, represents the traffic flow data corresponding to the mth direction, represents the normalized adjacency matrix corresponding to the mth direction, and V m are learnable parameters, where σ(·) is the ReLU activation function. By taking m=1, and m = 2, A bidirectional extended graph convolution can be obtained.

[0119] In step S4 of this embodiment, when aggregating each layer of information of the extended graph convolution in the same direction, it includes:

[0120] Convolve each layer of information corresponding to the extended graph in the mth direction Output and convert the three-dimensional tensor into a shape of N×(TC ×D l ), and then the layer output information of the extended graph convolution corresponding to the mth direction is obtained through two layers of fully connected layer output modules. The expression is as follows:

[0121]

[0122] in, and is a trainable parameter. Through full connection, the layer output information of the extended graph convolution corresponding to the mth direction can be obtained. sigmoid(·) is the activation function.

[0123] After obtaining the layer output information of the extended graph convolution corresponding to the m-th direction, the different layer information of the same extended graph convolution is aggregated through formula (14) to obtain the layer aggregation feature of the extended graph corresponding to the m-th direction, which is expressed as follows:

[0124]

[0125] Among them, ⊙ is the Hadamard product operation, is the training parameter, H m is the layer aggregation feature of the extended graph corresponding to the mth direction,

[0126] Through the above operations, the layer aggregation features of the spatiotemporal extended graph convolution in different directions are obtained respectively. In order to select the information that is relatively important to the current prediction task, in step S5 of this embodiment, the feature information H in different directions is m The final output is obtained through attention aggregation, and the final output is the prediction result of traffic flow data. The specific operation can be defined as:

[0127]

[0128] Among them, Z m H m The converted one-dimensional vector, W m Yes and Z m Training parameters of the same dimension, b m is the bias. m is the attention score of the expanded graph corresponding to the mth direction, Z o is the final result of attention aggregation,

[0129] After step S5 of this embodiment, model training is also performed. In this embodiment, the model parameter feature fusion step length κ is set to 3; the causal convolution kernel width K is set to 3, and the number of channels D is set to C=16. When constructing the initial adjacency matrix A, δ=3 is set in the datasets PEMS03 and PEMS07, and δ=0.5 is set in the datasets PEMS04 and PEMS08. In the extended graph, τ=0.2 is set, that is, edges are added to the 20% of nodes with the smallest degree. In the bidirectional graph convolution, n=4 is set to obtain a 4-layer graph convolution, and D is set. l =64, get the dimension of training parameters, set the number of neurons D in the two layers of full connection F1 =64,D F2 = 12. The initial learning rate is set to 0.01, and decays to 0.7 times the original value every 15 batches. The number of iterations is 200, the batch size is 32, the dropout rate is 0.2, the optimizer is AdamW, and the loss function is Huber loss.

[0130] Embodiment 2

[0131] This embodiment proposes a traffic flow prediction system based on a bidirectional spatiotemporal extended graph convolutional network, including a microprocessor and a computer-readable storage medium connected to each other, wherein the microprocessor is programmed or configured to execute the traffic flow prediction method based on a bidirectional spatiotemporal extended graph convolutional network described in Example 1.

[0132] In summary, the present invention proposes a traffic flow prediction method based on a bidirectional spatiotemporal extended graph convolutional network, and proposes a system for executing the method. Aiming at the complex spatiotemporal dependence of road network traffic flow and the inability to fully extract the spatial features of road network edge nodes, the present invention proposes a bidirectional spatiotemporal extended graph convolutional model (Bi-STEGCM). The model component feature fusion can better deal with the problem of missing data. This component uses a sliding window to smooth the traffic flow data and will not destroy the temporal characteristics of the traffic flow. The road network traffic structure can be characterized by a graph structure, but the spatial structure of the edge nodes is very limited. The edge node graph structure is expanded using an extended graph to enrich the spatial structure of the road network. Considering the directional nature of road network traffic flow, constructing a bidirectional extended graph convolution can more effectively give play to the advantages of the extended graph in extracting spatial topological structures. Combined with the causal convolution of the temporal model, the spatiotemporal characteristics of traffic flow can be fully explored, and better results can be achieved in traffic flow prediction.

[0133] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A traffic flow prediction method based on a bidirectional spatiotemporal extended graph convolutional network, characterized in that: The following steps are involved: Obtain historical traffic flow data of each node in the road network in real time and use it as initial traffic flow features; The initial traffic flow features are sequentially subjected to feature fusion and causal convolution to obtain traffic flow data with time series features; Calculating a bidirectional normalized adjacency matrix corresponding to the road network, performing an extended graph convolution operation with an ARMA filter on the traffic flow data and the normalized adjacency matrix in each direction, and obtaining each layer of information of the extended graph convolution in each direction; Aggregate the information of each layer of the extended graph convolution in the same direction to obtain the layer aggregation features of the extended graph convolution in each direction; The layer aggregation features of the extended graph convolution in each direction are aggregated through attention to obtain the final output and serve as the prediction result of traffic flow data.

2. The traffic flow prediction method based on bidirectional spatiotemporal extended graph convolutional network according to claim 1 is characterized in that: The initial traffic flow features are subjected to feature fusion and causal convolution in turn. Specifically, the initial traffic flow features are divided into paths, and each path is subjected to feature fusion and causal convolution in turn to obtain the traffic flow data corresponding to the normalized adjacency matrix in each direction.

3. The traffic flow prediction method based on bidirectional spatiotemporal extended graph convolutional network according to claim 1 is characterized in that: When the initial traffic flow features are subjected to feature fusion and causal convolution in sequence, the steps of feature fusion include: The dimension of the data sequence of each node is expanded along the time dimension to obtain the data sequence after the dimension is expanded; The data sequence after each node dimension is expanded is subjected to feature aggregation through the specified kernel width. The expression is as follows: in, is the data sequence after the dimension of the i-th node is expanded, * F is the feature aggregation operation, Γ κ is the convolution kernel for feature aggregation, κ is the kernel width, is the output of the feature aggregation of the i-th node; The above steps are iterated until the number of feature fusion operations meets the requirement.

4. The traffic flow prediction method based on bidirectional spatiotemporal extended graph convolutional network according to claim 1 is characterized in that: When the initial traffic flow features are sequentially subjected to feature fusion and causal convolution, the steps of causal convolution include: Get the output of feature fusion for each node, and then calculate the output of causal convolution for each node in parallel. The expression is as follows: Among them, F(s) represents the output of the first layer after a layer of causal convolution. s elements; represents the output of the feature fusion of the i-th node, * d represents the causal convolution operation, Γ K is a convolution kernel with width K, represents the s+jth element in the output of the fusion of the i-th node feature, γ j Represents the j-th element of the convolution kernel.

5. The traffic flow prediction method based on bidirectional spatiotemporal extended graph convolutional network according to claim 1 is characterized in that: When calculating the bidirectional normalized adjacency matrix corresponding to the road network, specifically including: According to the connection relationship of the nodes in the road network, an initial adjacency matrix A is calculated; Determine the number of nodes that need to add edges, and select the corresponding number of nodes in order from small to large as the nodes that need to add edges, and construct a filling matrix A′ according to the nodes that need to add edges; Use the filling matrix A′ to expand the initial adjacency matrix A to obtain the expanded adjacency matrix A e ; Calculate the extended adjacency matrix A e The corresponding Laplace matrix L e , then the Laplace matrix L e The upper and lower triangular matrices of are normalized separately to obtain the bidirectional normalized adjacency matrix L p and L r .

6. The traffic flow prediction method based on bidirectional spatiotemporal extended graph convolutional network according to claim 5 is characterized in that: When constructing the filling matrix A' by adding edge nodes as needed, it includes: Record the position index of each node that needs to add edges, calculate the difference between the median degree of all nodes and the average degree of the nodes that need to add edges to obtain the number of edges added to the node, make non-repetitive pairwise combinations of the index of each node that needs to add edges, assign values ​​to the corresponding positions of the filling matrix A′, and increase the counter by one until the index of each node is traversed or the value of the counter reaches the number of edges added to the node.

7. The traffic flow prediction method based on bidirectional spatiotemporal extended graph convolutional network according to claim 1 is characterized in that: When the traffic flow data and the normalized adjacency matrix in different directions are respectively subjected to the extended graph convolution operation with the ARMA filter, the expression is as follows: in, represents the output of the lth layer of the extended graph convolution corresponding to the mth direction, represents the traffic flow data corresponding to the mth direction, represents the normalized adjacency matrix corresponding to the mth direction, and V m is a learnable parameter and σ(·) is the ReLU activation function.

8. The traffic flow prediction method based on bidirectional spatiotemporal extended graph convolutional network according to claim 1 is characterized in that: When aggregating each layer of information of the extended graph convolution in the same direction, it specifically includes: Convolve each layer of information corresponding to the extended graph in the mth direction The layer output information of the extended graph convolution corresponding to the mth direction is obtained through two layers of fully connected layer output modules, and the expression is as follows: in, and is a trainable parameter, sigmoid(·) is the activation function; After obtaining the layer output information of the extended graph convolution corresponding to the m-th direction, aggregate the different layer information of the same extended graph convolution to obtain the layer aggregation features of the extended graph corresponding to the m-th direction. The expression is as follows: Among them, ⊙ is the Hadamard product operation, is the training parameter, H m For the m The layer aggregation features of the expanded graph corresponding to each direction.

9. The traffic flow prediction method based on bidirectional spatiotemporal extended graph convolutional network according to claim 1 is characterized in that: When the layer aggregation features of the extended graph convolution in different directions are aggregated through attention, the expression is as follows: Among them, H m For the m The layer aggregation features of the expansion graph corresponding to the direction, Z m H m The converted one-dimensional vector, W m Yes and Z m Training parameters of the same dimension, b m is the bias, α m For the m The attention score of the expanded graph corresponding to each direction, Z o is the final result of attention aggregation.

10. A traffic flow prediction system based on a bidirectional spatiotemporal extended graph convolutional network, characterized in that: It comprises a microprocessor and a computer-readable storage medium connected to each other, wherein the microprocessor is programmed or configured to execute the traffic flow prediction method based on a bidirectional spatiotemporal extended graph convolutional network as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Hypergraph-based space-time hypergraph convolution traffic flow prediction method and system

    CN115565369A

  • Method and system for predicting future traffic flow based on heterogeneous graph

    CN118247968A

  • Short-term traffic flow prediction method based on causal gated-low-pass graph convolutional network

    US20240029556A1