A traffic flow prediction method considering dynamic spatial relations

Through the time-varying spatial graph estimator and dynamic spatiotemporal convolution module, combined with the Pearson correlation coefficient and time convolution module, an efficient traffic flow prediction model was designed, which solved the problem that dynamic spatial relationships could not be captured in the existing technology, and realized that Accurate prediction and rapid response to traffic flows.

CN115841753BActive Publication Date: 2024-12-06HUAZHONG UNIV OF SCI & TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211504060.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-28
Publication Date
2024-12-06
Estimated Expiration
2042-11-28

AI Technical Summary

Technical Problem

The existing traffic flow prediction methods cannot effectively capture dynamic spatial relationships, resulting in insufficient response to emergencies and transient events in the traffic network, and the calculation complexity is high, making it difficult to achieve true dynamic spatial relationship calculations.

Method used

Using the time-varying spatial graph estimator and dynamic spatiotemporal convolution module, the correlation between traffic flow data nodes at the current moment is calculated through the Pearson correlation coefficient. Combining time and space characteristics, an efficient traffic flow prediction model is designed, which can be dynamically updated. Spatial relationships of transportation networks.

Benefits of technology

It realizes accurate prediction of traffic flow, can respond sensitively to emergencies, improves prediction accuracy, and has a simple model structure, fast calculation speed, small parameters, and easy to deploy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115841753B_ABST
    Figure CN115841753B_ABST
Patent Text Reader

Abstract

The present invention discloses a traffic flow prediction model considering dynamic spatial relations, belonging to the field of intelligent transportation. The present invention does not directly calculate the dynamic spatial relations of the traffic network, but designs a method for efficiently and simply calculating the dynamic spatial relations of the traffic network. The method converts real-time traffic flow information into the dynamic spatial relations of the traffic network through a spatiotemporal conversion module, an autoencoder, and a graph normalization module, which is recorded as a time-varying spatial graph, which truly reflects the time-varying characteristics of the dynamic spatial relations of the traffic network. Then, the spatiotemporal features of the traffic flow data are extracted and fused according to the time-varying spatial graph and the stable spatial graph based on the node positions of the traffic network to obtain the spatiotemporal fusion features of the traffic flow, which reflects both the stable spatiotemporal features of the traffic flow and the dynamic spatiotemporal features of the traffic flow, thereby being able to more accurately realize traffic flow prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent transportation, and more specifically, relates to a traffic flow prediction method considering dynamic spatial relationships. Background Art

[0002] With the update of computer and information technology, Intelligent Transport System (ITS) has gradually developed. As the key to the realization of intelligent transport system, traffic flow prediction has received high attention. Accurate traffic flow prediction is the basic premise of intelligent transport system and plays a significant role in solving urban traffic congestion.

[0003] One of the main characteristics of traffic flow is the ever-changing temporal and spatial characteristics: in terms of time, traffic flow data shows strong periodic characteristics. Affected by commuting traffic, traffic flow generally has morning and evening peaks on weekdays, while on non-working days, this phenomenon is not very significant; in terms of space, there are direct and indirect effects between nodes in the traffic network. The direct effect is mainly affected by the distance between nodes. Generally speaking, the smaller the distance between nodes, the greater the correlation between nodes, and the direct effect is a relatively long-term and stable correlation. The indirect effect mainly considers the hidden correlation between nodes that are far away. For example, the office area node and the residential area node may be far apart, but there may be a large correlation between the traffic flow changes between the two nodes, and this correlation also changes with time. For example, during commuting, the office area node and the residential area node are more correlated, while in other periods, the correlation between the two nodes is weaker. Therefore, how to characterize the above-mentioned dynamic spatiotemporal characteristics, especially the dynamic spatial relationship, is of great significance to traffic flow prediction.

[0004] Existing research on the dynamic spatial relationship of traffic flow mainly focuses on the accurate description and calculation of the dynamic spatial relationship itself. For example, the Dynamic Time Warping (DTW) algorithm is used to calculate the correlation between the complete time series collected from different nodes, and the obtained correlation matrix is ​​used as the dynamic spatial relationship of the traffic network. Some scholars also use more complex deep learning models such as Transformer to calculate the correlation between nodes through the embedded features of nodes to obtain the dynamic spatial relationship of the traffic network.

[0005] However, no matter which method is used, a true dynamic spatial relationship is not achieved, because in the above method, the correlation calculation is based on the complete traffic flow data collected at the node, and the calculated dynamic spatial correlation is used for traffic flow prediction at all times. It is essentially a static spatial relationship, reflecting the stable and long-term correlation between nodes, and cannot truly reflect the sudden and short-term correlation between node pairs, such as the short-term correlation between node pairs caused by traffic accidents. Summary of the invention

[0006] In view of the above defects or improvement needs of the prior art, the present invention provides a traffic flow prediction method taking into account dynamic spatial relationships, the purpose of which is to accurately extract the complex spatiotemporal characteristics of traffic flow and improve the prediction accuracy of traffic flow.

[0007] To achieve the above object, the present invention provides a traffic flow prediction method considering dynamic spatial relationships, comprising:

[0008] S1. After preprocessing the data collected from the traffic network, divide it into a training set, a test set, and a validation set;

[0009] S2. Construct a traffic flow prediction model, including a time-varying spatial graph estimator and a dynamic spatiotemporal convolution module;

[0010] The time-varying spatial graph estimator includes a space-time conversion module, an autoencoder, and an output layer; the space-time conversion module is used to calculate the correlation of the time series data between the two nodes of the current time frame traffic flow data X(t) to obtain the initial topological structure of the time-varying spatial graph between the nodes in the current period; the autoencoder performs data denoising and feature learning on the initial topological structure; the output layer activates and normalizes the features learned by the autoencoder to obtain the time-varying spatial graph G t ;

[0011] Dynamic spatiotemporal convolution module, used to extract spatial graph G, time-varying spatial graph G t , and the traffic flow data X(t) of the current time frame and the traffic flow data X(t) of the predicted period one day ago D (t) and the traffic flow data X for the period to be predicted one week ago W (t) The spliced ​​three-channel data X S Dynamic spatiotemporal fusion features in (t);

[0012] S3. Iteratively train the traffic flow prediction model using the training set;

[0013] S4. Input the traffic network spatial diagram, the traffic flow data one hour before the prediction period, the traffic flow data one day before, and the traffic flow data one week before into the trained traffic flow prediction model to obtain the traffic flow prediction result.

[0014] Further, the dynamic spatiotemporal convolution module includes a first temporal convolution unit, a time-varying spatial graph convolution unit, a spatial graph convolution unit, and a second temporal convolution unit;

[0015] The first time convolution unit extracts three-channel data X S (t) time characteristic M;

[0016] The time-varying spatial graph convolution unit, according to the time-varying spatial graph G t Extract the spatial features representing the correlation of time series from the time feature M to obtain dynamic spatiotemporal features;

[0017] The spatial graph convolution unit extracts the spatial features representing the correlation of time series in the temporal features M according to the spatial graph G to obtain static spatiotemporal features;

[0018] The second time convolution unit further extracts features in the time dimension from the fused dynamic spatiotemporal features and static spatiotemporal features.

[0019] Furthermore, the convolution formula in the time-varying spatial graph convolution unit is as follows:

[0020]

[0021] represents the graph convolution operation, Θ represents the convolution kernel of the graph convolution, For all nodes in the transportation network, W t is a time-varying spatial graph G t The topological structure of θ represents the graph convolution weight parameter.

[0022] Furthermore, the convolution calculation formula in the spatial graph convolution unit is:

[0023]

[0024] is an intermediate variable.

[0025] Furthermore, the temporal feature M learned by the first temporal convolutional unit is,

[0026] M=ReLU(Q⊙H+P)

[0027] Q is X S (t)′ is the time dimension feature, H is the learnable weight parameter, and P is the residual feature.

[0028] Furthermore, the Pearson correlation coefficient is used to calculate the correlation of the time series data between two nodes of the current time frame traffic flow data X(t).

[0029] Furthermore, the traffic flow prediction model also includes a residual unit.

[0030] Furthermore, two layers of dynamic spatiotemporal convolutional modules are cascaded.

[0031] In general, compared with the prior art, the above technical solution conceived by the present invention can achieve the following beneficial effects.

[0032] (1) The research focus of this invention is not on calculating dynamic spatial relationships, but on designing an efficient and simple method for calculating dynamic spatial relationships of traffic networks. This method can convert the traffic flow data at the current moment into the dynamic spatial relationships at the current moment, so that the dynamic spatial relationships can truly change over time, and thus can respond sensitively to sudden events or transient events in the traffic network, and more accurately predict traffic flows.

[0033] (2) The method for calculating the dynamic spatial relationship of the traffic network designed by the present invention does not use complex algorithms and models such as DTW or Transformer, but instead uses the Pearson coefficient algorithm with lower computational complexity and a simple fully connected network model. This method can not only effectively calculate the dynamic spatial relationship of the traffic network, but also has a simple structure and a small number of parameters. Therefore, the calculation speed is fast, the model size is small, and it is easier to deploy.

[0034] (3) The spatiotemporal features of traffic flow data are extracted based on dynamic spatial relationships and static spatial relationships respectively, and the two are fused to obtain spatiotemporal fusion features. This feature includes both the long-term spatiotemporal features and the short-term spatiotemporal features of traffic flow, thus more accurately reflecting the real spatiotemporal characteristics of traffic flow. Then, the temporal convolution module is used to further extract the spatiotemporal fusion features to obtain a more accurate traffic flow prediction value. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 Provide a model framework for traffic flow prediction;

[0036] Figure 2 A framework for time-varying spatial graph estimators;

[0037] Figure 3 The sensitivity of different models to prediction time; (a) is the MAE error of the PeMSD8 dataset; (b) is the RMSE error of the PeMSD8 dataset; (c) is the MAE error of the PeMSD4 dataset; (d) is the RMSE error of the PeMSD4 dataset;

[0038] Figure 4 The time-varying spatial graphs of some nodes generated in two consecutive time periods; (a) is the time-varying spatial graph from 00:00 to 01:00; (b) is the time-varying spatial graph from 01:00 to 02:00;

[0039] Figure 5 This is the result of ablation experiment;

[0040] Figure 6 The short-term prediction results of the model; (a) is the prediction for the working day of node 0 of PeMSD4; (b) is the prediction for the non-working day of node 0 of PeMSD8;

[0041] Figure 7 Long-term prediction results for the model. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0043] The specific implementation of the present invention is divided into two stages: a training stage and an operation stage. The traffic flow collected by the PeMS system of the California highway network is used as an example for illustration.

[0044] The training phase includes: a large amount of long-term historical data of existing traffic flows is required, which is divided into training set, validation set and test set in a ratio of 6:2:2. In order to reduce the adverse effects of large or small values ​​in traffic time series data on feature learning, the Z-scores method is used to preprocess the data. The model proposed in the present invention adopts the Pytorch deep learning framework. The time series length T of the model input is 12, and the future time series length T′ predicted by the model is 6, that is, the traffic flow data for the next half hour is predicted by the traffic flow data of the past hour. The initial learning rate is set to 0.001. In order to speed up the convergence of the model, the decaying learning rate adjustment strategy is used. After every 5 rounds of training, the learning rate is reduced to 0.7 times the original, and the batch size is set to 64. The number of training iterations is 100 times, and the mean squared loss function (MSE) is used as the loss function during training. The Adam optimizer is used for back propagation optimization of the neural network parameters.

[0045] The specific implementation is as follows:

[0046] Step 1: First, preprocess the traffic flow data collected at the nodes in the traffic network. The processing method uses the Z-scores method to preprocess the data. The specific method is as follows:

[0047]

[0048] Among them, X is the traffic flow data of the training set, is the mean of the time series at each node, is the standard deviation of the time series at each node.

[0049] After data preprocessing, it is divided into training set, test set and validation set;

[0050] S2. References Figure 1 , build a traffic flow prediction model; including time-varying spatial graph estimator and dynamic spatiotemporal convolution module;

[0051] refer to Figure 2 , the time-varying spatial graph estimator includes a space-time conversion module, an autoencoder and an output layer; the space-time conversion module is used to calculate the correlation of the time series data between the two nodes of the current time frame traffic flow data X(t) to obtain the initial topological structure of the time-varying spatial graph between the nodes in the current period; the autoencoder performs data denoising and feature learning on the initial topological structure; the output layer activates and normalizes the features learned by the autoencoder to obtain the time-varying spatial graph G t The collected data X(t) of the current time window first enters the time-space conversion module of the TSG estimator, which converts the information X(t) containing time and space dimensions into information containing only space dimensions. can be regarded as the initial topological structure of the time-varying spatial graph and as the initial solution for feature learning, where In order to reduce the complexity of the model and improve the calculation speed of the algorithm, the conversion method uses the Pearson correlation coefficient to measure the correlation of time series data. The calculation method is as follows:

[0052]

[0053] The initial topological structure A(t) of the time-varying spatial graph enters the autoencoder structure for data denoising and feature learning. Both the encoder and decoder are composed of linear layers. After the autoencoder, Softmax is used as the activation function to obtain

[0054] In order to facilitate graph convolution operations on time-varying spatial graphs, a graph normalization layer is added to the time-varying spatial graph estimator. The normalized matrix W t , as follows:

[0055]

[0056] in,

[0057] Dynamic spatiotemporal convolution module, used to extract spatial graph G, time-varying spatial graph G t, and the traffic flow data X(t) of the current time frame and the traffic flow data X(t) of the predicted period one day ago D (t) and the traffic flow data X for the period to be predicted one week ago W (t) The spliced ​​three-channel data X S Dynamic spatiotemporal fusion features in (t);

[0058] In order to make full use of the periodic characteristics of traffic data, in addition to the collected data X(t) in the current time window, the model input also introduces the recent time segment and the long-term time segment corresponding to the current time window, which are recorded as and The recent time segment collection rule is the traffic flow of the predicted period one day ago, and the long-term time segment collection rule is the traffic flow of the predicted period one week ago. D (t), X W (t) is regarded as three channels of input, which eventually form the model input, denoted as Among them C i is the number of input channels. In the embodiment of the present invention, C i =3;

[0059] refer to Figure 1 In part B, the dynamic spatiotemporal convolution module includes a first time convolution unit, a time-varying spatial graph convolution unit, a spatial graph convolution unit, and a second time convolution unit; the first time convolution unit extracts three-channel data X S (t) time feature M; time-varying spatial graph convolution unit, according to the time-varying spatial graph G t Extract the spatial features representing the correlation of time series in the time feature M to obtain dynamic spatiotemporal features; the spatial graph convolution unit extracts the spatial features representing the correlation of time series in the time feature M according to the spatial graph G to obtain static spatiotemporal features; the second time convolution unit further extracts features in the time dimension from the fused dynamic spatiotemporal features and static spatiotemporal features; use the layer norm method to standardize the data rows, weaken the size relationship between the time series data of different nodes, and retain the relative size relationship of the time series data on each node to ensure the stability of feature distribution;

[0060] The calculation principles of the time-varying spatial graph convolution unit and the spatial graph convolution unit are the same, and both use the spectral domain-based graph convolutional network (GCN) to extract spatial features.

[0061] The convolution formula defined in the spectral domain is as follows:

[0062]

[0063] in Represents the graph convolution operation, the convolution kernel of the graph convolution is Θ, It is the traffic flow collected by all nodes in the traffic network in a certain period of time. The normalized Laplace matrix Among them I N is the identity matrix, is the degree matrix of the graph W is the weighted adjacency matrix of the graph. Fourier basis It is composed of the eigenvectors of the normalized Laplacian matrix L, is a diagonal matrix consisting of the eigenvalues ​​of the normalized Laplace matrix L.

[0064] As the number of nodes on the graph increases, the size of the standardized Laplace matrix also increases. Therefore, solving its corresponding eigendecomposition requires huge computing resources. Therefore, K-order Chebyshev polynomials can be used for approximate solution to reduce the time algorithm complexity.

[0065]

[0066] in λ max is the maximum eigenvalue of L, is the k-order Chebyshev polynomial in The value at θ k are polynomial coefficients. Then equation (4) can be simplified as:

[0067]

[0068] Chebyshev polynomial T k (x) Satisfy:

[0069] T0(x)=1,T1(x)=x,T k (x) = 2xT k-1 (x)-T k-2 (x) (7)

[0070] Using the first-order Chebyshev polynomial to approximate equation (6) we get:

[0071]

[0072] Since there are normalization and standardization layers in the neural network, we can assume that λ max ≈2, is the shared parameter in the convolution kernel, where C s is the number of spatial convolution channels. In order to reduce the number of parameters and prevent overfitting, Then formula (8) can be simplified as:

[0073]

[0074] in,

[0075] In the spatial graph convolution module, the Determined by the topological structure W of the spatial graph of the traffic network, it does not change over time and is relatively fixed. In the time-varying spatial graph convolution module, the time-varying spatial graph G obtained by the time-varying spatial graph estimator is used t (V,E t ,W t )'s topological structure W t To replace the That is, the convolution formula in the time-varying spatial graph convolution module is as follows:

[0076]

[0077] refer to Figure 1 In the C part, the temporal convolution unit is mainly implemented through a convolutional network, and by setting appropriate padding parameters, the length of the time series data before and after the convolution operation remains unchanged. First, by adjusting the data dimension to Figure 1 The upper left convolution layer in part C is used to extract the input X S (t)′ is a feature in the time dimension, and the output is recorded as Among them C t Indicates the number of time convolution channels. Input X S (t)′ Figure 1 The convolution layer on the upper right of part C is then activated by the Sigmoid function, and the output is recorded as According to the characteristics of the activation function, the elements in H are all between 0 and 1, so H is used as 0 to adjust Q, that is, Q and H are matrix-dot multiplied. Figure 1 The convolution layer in the lower right corner of part C is used as a residual unit to accelerate training and prevent gradient disappearance. Finally, the ReLU function is used to activate and output. The temporal features learned through a temporal convolution module can be expressed as:

[0078] M=ReLU(Q⊙H+P) (11)

[0079] Where, Q = W1*X s (t)′+b1,H=W2*X s (t)′+b2,P=σ(W3*X s(t)′+b3), W2, W2, W3 are the weight parameters of the convolution kernel, * is the convolution operation, b1, b2, b3 are the bias weights, σ ​​is the Sigmoid activation function, and ⊙ is the matrix multiplication operation. The nonlinear component is introduced by the ReLU function to better represent the nonlinear characteristics of traffic flow in the time domain.

[0080] S3. Iteratively train the traffic flow prediction model using the training set;

[0081] S4. Input the traffic network spatial map, the traffic flow data one hour before the predicted period, the traffic flow data one day before, and the traffic flow data one week before into the trained traffic flow prediction model to obtain the traffic flow prediction result;

[0082] In order to evaluate the performance of the model proposed in the present invention, the present invention uses three indicators: Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Weighted Mean Absolute Percentage Error (WMAPE) for evaluation. The specific calculation method is as follows:

[0083]

[0084]

[0085]

[0086] Among them, y i is the true value, is the predicted value.

[0087] In order to evaluate the prediction performance of the model proposed in this invention, the following models are selected for comparison, including traditional prediction methods, traditional machine learning models, and the recently popular deep learning models:

[0088] HA: Historical mean method, using the average value of observations over a period of time as the prediction of traffic flow in the future. The present invention uses the traffic flow in the past hour to predict the traffic flow in the next five minutes.

[0089] SVR: Support Vector Regression, selects an appropriate kernel function, and obtains an optimized model by minimizing the total loss and maximizing the interval. The present invention uses radial basis function as the kernel function for prediction.

[0090] STGCN: Use a one-dimensional convolutional neural network for temporal feature extraction and a spectral-domain-based graph convolutional network for spatial feature extraction, alternating between the two. The present invention sets the number of temporal convolution channels to 64, the number of spatial convolution channels to 16, the batch size to 64, and the temporal convolution kernel size to 1×3.

[0091] ASTGCN: Based on the spatiotemporal convolutional network, the spatiotemporal attention module is introduced to better capture the spatiotemporal characteristics of traffic flow. The present invention sets the number of temporal convolution channels to 64, the number of spatial convolution channels to 64, the batch size to 64, and the temporal convolution kernel size to 1×3.

[0092] STSGCN: Uses the spatiotemporal synchronous modeling mechanism to effectively capture complex local spatiotemporal correlations. The present invention sets the number of spatial convolution channels to 64, the batch size to 32, and each spatiotemporal network sequence contains 3 spatiotemporal networks.

[0093] The experimental results obtained on the PeMS04 and PeMS08 datasets are shown in Tables 1 and 2:

[0094] Table 1. Experimental results of PeMSD4 dataset

[0095]

[0096] Table 2. Experimental results of PeMSD8 dataset

[0097]

[0098]

[0099] In order to further test the performance of the model in short- to medium-term predictions and evaluate the sensitivity of the model to the prediction duration, the present invention predicts the traffic flow in the next 5 to 30 minutes on two data sets. Figure 3 The model proposed in this invention has significant advantages in MAE and RMSE indicators compared with other models in the medium- and short-term traffic flow prediction. Figure 3 From the trends of the curves (a)-(d) in the figure, we can see that as the prediction time increases, the prediction errors of the six models all show an upward trend. This is because the increase in the prediction time leads to an increase in the difficulty of prediction. Figure 3 It can be seen from the slopes of the curves (a)-(d) that with the increase of the prediction time, the prediction performance of the model proposed in the present invention decays the slowest, reflecting the great potential of the model in medium- and long-term predictions.

[0100] To verify the performance of the TSG estimator, a heat map is used to show the time-varying spatial graph of 20 nodes from 0 to 19 generated by the TSG estimator in two consecutive periods from 00:00 to 01:00 and 01:00 to 02:00 on February 17, 2018. The depth of the heat map reflects the degree of correlation between node pairs, such as Figure 4 As shown, compared Figure 4 As shown in (a) and (b), the time-varying spatial graphs of two consecutive time periods generated by the TSG estimator are similar overall, indicating that the TSG estimator can generate real-time spatial topological structures relatively smoothly, which reflects that the spatial topological structures of adjacent time periods will not produce large mutations. However, for some node pairs, the weights between the node pairs at different times have changed, such as Figure 4 The black line circled area in the figure reflects the sudden and short-term spatial relationship between local node pairs in a certain period of time. For example, a traffic accident occurred near a node, and this sudden incident will have a short-term impact on the traffic flow of other nearby nodes.

[0101] In order to verify the effectiveness of time-varying spatial graphs for traffic flow prediction, an ablation experiment was conducted on the TSG estimator module. The results are shown in the figure. Figure 5 As shown, through analysis Figure 5 It can be seen that the introduction of the time-varying spatial graph has a significant effect on reducing the prediction error of the model, and as the prediction time increases, the height difference of the bar graph gradually increases, reflecting that the time-varying spatial graph plays a more important role in the medium- and long-term prediction of traffic flow.

[0102] To visualize the prediction effect of the model, we select node 0 of the PeMSD4 and PeMSD8 datasets for a one-day prediction. Figure 6 As shown in (a)-(b), it can be seen that the model proposed in this invention can effectively capture the temporal characteristics of traffic flow as a whole. Figure 6 (a) shows the prediction effect of the model on weekdays. Since commuting traffic has an important impact on traffic flow changes on weekdays, which is intuitively manifested as the morning and evening peak traffic flow phenomenon on weekdays, DySTGCN can effectively capture this traffic flow change pattern and can accurately predict the time when the morning and evening peaks occur. Figure 6 (b) shows the prediction effect of the model on non-working days. Since there is basically no commuting traffic on non-working days, the traffic does not show peak hours in the morning and evening, but rather shows a "single peak". This is closely related to the living habits of urban residents. Generally speaking, residents with travel needs will mostly participate in traffic activities from 9 am to 9 pm, and less at other times. DySTGCN can effectively predict the traffic flow change trend on non-working days and give relatively accurate prediction results.

[0103] To further demonstrate the model's long-term prediction effect on traffic flow, the PeMSD4 dataset is used to predict traffic flow for seven days from February 18 to February 24, 2018. Figure 7 As shown. Figure 7 It can be seen that the model can well capture the long-term changing characteristics of traffic flow, can make long-term predictions of traffic flow continuously and uninterruptedly, and achieve relatively accurate prediction results.

[0104] The operation phase refers to deploying the model with good enough prediction performance and high prediction stability obtained in the training phase to the smart city management system to realize real-time prediction of traffic flow throughout the city.

[0105] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A traffic flow prediction method considering dynamic spatial relationships, characterized in that: include: S1. After preprocessing the data collected from the traffic network, divide it into a training set, a test set, and a validation set; S2. Construct a traffic flow prediction model, including a time-varying spatial graph estimator and a dynamic spatiotemporal convolution module; The time-varying spatial graph estimator includes a time-space conversion module, an autoencoder, and an output layer; the time-space conversion module is used to calculate the correlation of the time series data between two nodes of the current time frame traffic flow data X(t) to obtain the initial topological structure of the time-varying spatial graph between the nodes in the current period; the autoencoder performs data denoising and feature learning on the initial topological structure; The output layer activates and normalizes the features learned by the autoencoder to obtain the time-varying spatial graph G t ; Dynamic spatiotemporal convolution module, used to extract spatial graph G, time-varying spatial graph G t , and the traffic flow data X(t) of the current time frame and the traffic flow data X(t) of the predicted period one day ago D (t) and the traffic flow data X for the period to be predicted one week ago W (t) The spliced ​​three-channel data X S Dynamic spatiotemporal fusion features in (t); S3. Iteratively train the traffic flow prediction model using the training set; S4. Input the traffic network spatial diagram, the traffic flow data one hour before the prediction period, the traffic flow data one day before, and the traffic flow data one week before into the trained traffic flow prediction model to obtain the traffic flow prediction result.

2. A traffic flow prediction method considering dynamic spatial relationships according to claim 1, characterized in that: A dynamic spatiotemporal convolution module, comprising a first temporal convolution unit, a time-varying spatial graph convolution unit, a spatial graph convolution unit, and a second temporal convolution unit; The first time convolution unit extracts three-channel data X S (t) time characteristic M; The time-varying spatial graph convolution unit, according to the time-varying spatial graph G t Extract the spatial features representing the correlation of time series from the time feature M to obtain dynamic spatiotemporal features; The spatial graph convolution unit extracts the spatial features representing the correlation of time series in the temporal features M according to the spatial graph G to obtain static spatiotemporal features; The second time convolution unit further extracts features in the time dimension from the fused dynamic spatiotemporal features and static spatiotemporal features.

3. A traffic flow prediction method considering dynamic spatial relationships according to claim 2, characterized in that: The convolution formula in the time-varying spatial graph convolution unit is as follows: represents the graph convolution operation, Θ represents the convolution kernel of the graph convolution, For all nodes in the transportation network, W t is a time-varying spatial graph G t The topological structure of θ represents the graph convolution weight parameter.

4. The traffic flow prediction method considering dynamic spatial relationships according to claim 2, characterized in that: The convolution calculation formula in the spatial graph convolution unit is: is an intermediate variable.

5. The traffic flow prediction method considering dynamic spatial relationships according to claim 2, characterized in that: The temporal feature M learned by the first temporal convolution unit is, M=ReLU(Q⊙H+P) Q is X S (t)′ is the time dimension feature, H is the learnable weight parameter, and P is the residual feature.

6. A traffic flow prediction method considering dynamic spatial relationships according to any one of claims 1 to 5, characterized in that: The Pearson correlation coefficient is used to calculate the correlation of the time series data between two nodes of the current time frame traffic flow data X(t).

7. A traffic flow prediction method considering dynamic spatial relationships according to any one of claims 1 to 6, characterized in that: The traffic flow prediction model also includes a residual unit.

8. The traffic flow prediction method considering dynamic spatial relationships according to claim 7, characterized in that: Two layers of dynamic spatiotemporal convolutional modules are cascaded.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the traffic flow prediction method considering dynamic spatial relationships as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Traffic flow prediction method based on Transform space-time diagram convolutional network

    CN114330671A

  • Traffic flow prediction method based on space-time fusion graph neural network

    CN114970825A

  • Method for estimating and predicting short-term traffic circulation state of urban road network

    WO2021109318A1