Traffic speed prediction method based on improved state space model

By improving the state space model, combining adaptive graph structure and multi-layer MLP network, the space-time dependence and high-dimensional data processing problems of traditional models in traffic speed prediction are solved, and a more accurate and efficient traffic speed prediction effect is achieved.

CN116386321BActive Publication Date: 2024-12-10SOUTH CHINA UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310040591.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-11
Publication Date
2024-12-10
Estimated Expiration
2043-01-11

AI Technical Summary

Technical Problem

Traditional linear time series models are difficult to effectively deal with the problems of spatiotemporal dependence and high-dimensional large data volume in traffic speed prediction, and existing deep learning methods such as CNN are not optimal in traffic prediction.

Method used

Adopting an improved state space model, fuses time and spatial information through adaptive graph structure and space-time fusion feature layer, and transforms the state matrix and input matrix in Backbone into higher dimensional tensors, and uses multi-layer MLP network and Relu activation function to improve The predictive power of the model.

Benefits of technology

More accurate and efficient traffic speed prediction is achieved, the interpretability and nonlinear expression of the model are improved, and the prediction effect and efficiency are better than traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116386321B_ABST
    Figure CN116386321B_ABST
Patent Text Reader

Abstract

The present invention discloses a traffic speed prediction method based on an improved state space model, comprising: 1) inputting the adjacency matrix and historical traffic speed data into an adaptive graph structure + time-space fusion feature layer, the adaptive graph structure + time-space fusion feature layer will learn a more realistic adjacency matrix based on the original adjacency matrix, the adjacency matrix and the historical traffic speed data are fused to obtain an embedding layer Embedding that fuses time-space features; 2) inputting Embedding into Backbone, Backbone obtains future traffic speed features according to the state matrix, input matrix, output matrix and discretized state space equation, and the future traffic speed features are used to obtain the predicted value of the future traffic speed through the multi-layer MLP network of the decoder. The present invention adopts an adaptive graph structure, which can learn more realistic spatial information, thereby achieving a better prediction effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of deep learning time series prediction, and in particular to a traffic speed prediction method based on an improved state space model. Background Art

[0002] In the development and operation of smart cities and intelligent transportation systems (ITSs), traffic status is detected through sensors on the road (such as loop detectors), transaction records of subway and bus systems, and traffic monitoring videos. Traffic status is very important for traffic forecasting, which is usually based on historical traffic status data. In addition, many external factors can affect traffic factors, such as weather and holidays, so external factors are sometimes added to improve accuracy.

[0003] Traffic forecasting is more challenging than other time series forecasting problems because it involves high-dimensional data volumes and multiple changes, including emergency situations. Traffic conditions at a specific location are spatially dependent and may be affected not only by nearby areas but also by distant areas. Congestion on one road section may lead to increased traffic on another route. In addition, traffic forecasts are temporally dependent and may be seasonal or affected by holidays. Traditional linear time series models, such as autoregressive and integrated moving average (ARIMA) models, cannot effectively handle such spatiotemporal forecasting problems. Machine learning and deep learning techniques have been introduced into this field to improve forecasting accuracy, for example, by modeling the entire city as a grid and applying convolutional neural networks (CNNs) to process it. CNNs can handle Euclidean data such as images relatively well and have long surpassed humans in image classification tasks. However, when faced with a graphical problem such as traffic forecasting, the CNN approach is not optimal.

[0004] With the development of deep learning, a new network structure has been proposed. This network structure is based on a modern spatial state model, called the Structured State Space sequence model. Compared with attention, it can easily extract very long time series features with fewer parameters. It is also more interpretable. Using it as a basis to transform a model that can process traffic speed prediction data can improve the prediction effect and make the model more interpretable. Summary of the invention

[0005] The purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and propose a traffic speed prediction method based on an improved state space model, which can accurately predict the traffic speed.

[0006] To achieve the above purpose, the technical solution provided by the present invention is: a traffic speed prediction method based on an improved state space model, wherein the method realizes traffic speed prediction based on the improved state space model Structured State Space sequence model, wherein the improved state space model is an improvement of the original Structured State Space sequence model in three parts; the first part is to improve the encoder part of the Structured State Space sequence model, replacing the original Liner network with an adaptive graph structure + spatiotemporal fusion feature layer, so that the model can fuse time and space information; the second part is to transform the dimensions of the state matrix, input matrix, and output matrix of the backbone network Backbone in the Structured State Space sequence model to better meet the needs of traffic speed prediction; the third part is to improve the decoder of the Structured State Space sequence model, changing the Liner network to a multi-layer MLP network and adding a Relu activation function;

[0007] The specific implementation of the traffic speed prediction method includes the following steps:

[0008] 1) Input the adjacency matrix and historical traffic speed data into the adaptive graph structure + spatiotemporal fusion feature layer. The adaptive graph structure + spatiotemporal fusion feature layer will learn a more realistic adjacency matrix based on the original adjacency matrix. The adjacency matrix is ​​fused with the historical traffic speed data to obtain the embedding layer that integrates the spatiotemporal features.

[0009] 2) The Embedding is input into Backbone. Backbone obtains the future traffic speed characteristics based on the state matrix, input matrix, output matrix and discretized state space equation. The future traffic speed characteristics are used to obtain the predicted value of the future traffic speed through the multi-layer MLP network of the decoder.

[0010] Further, in step 1), the specific situation of the adaptive graph structure + spatiotemporal fusion feature layer is as follows: the predefined adjacency matrix is ​​recorded as G0, all traffic nodes are input into the node embedding layer node-embedding to obtain an N×H0 matrix, recorded as E, where N is the number of traffic nodes, H0 is the feature dimension of node-embedding, E and its transpose E T The adjacency matrix G1 is obtained by matrix multiplication, and then weighted with G0 to obtain the adjacency matrix G2 which is more consistent with the actual situation. The specific formulas are as follows (1) and (2):

[0011] G1=E×E T (1)

[0012] G2=G0+αG1 (2)

[0013] Among them, α is the adaptive adjacency matrix weighted hyperparameter. Then, the maximum value M of the historical data on the time scale is taken, and the historical data is divided by M, which plays a normalization role and can improve the generalization ability of the model. Then, the dimensions of the historical data and G2 are expanded, and the Hadamard product is performed to fuse the node information with the features of the historical data to obtain the Embedding that fuses the time and space features.

[0014] Furthermore, in step 2), the state matrix A and input matrix B in the Backbone of the original Structured State Space sequence model are both two-dimensional H1×H1 matrices, where H1 is the characteristic dimension of the Structured State Space sequence model. The state matrix A and input matrix B are transformed into N×H1×H1 tensors, where N is the number of traffic nodes, which is equivalent to learning a state matrix and input matrix for each node. It is possible to establish a corresponding state matrix and input matrix for each node in a more targeted manner, thereby improving the accuracy of model prediction. The tensor dimension of the Embedding that integrates time and space features does not change after passing through the Backbone, so a multi-layer MLP network is required to obtain the final traffic speed prediction result. Compared with a single-layer Liner network, a multi-layer MLP network can learn more features. After adding the Relu activation function, the nonlinear expression ability of the model can be improved.

[0015] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0016] 1. Compared with the traditional traffic speed prediction method, this method adopts an adaptive graph structure, which can learn more appropriate and real spatial information, thereby achieving better prediction results.

[0017] 2. This method uses a more advanced and interpretable spatial state model as the backbone network, which is better in efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is the overall architecture diagram of the method of the present invention; in the figure, INPUT is the input historical traffic speed data, Graphlearning is the adaptive graph structure, Spatial temporal layer is the spatiotemporal fusion feature layer, Backbone is the backbone network, Decoder is the decoder, and OUTPUT is the predicted traffic speed data.

[0019] Figure 2 It is a schematic diagram of the adaptive graph structure; in the figure, numbers of node is the number of nodes, i.e., the number of traffic sensors.

[0020] Figure 3 It is a structural diagram of the spatiotemporal fusion feature layer; in the figure, History data is the historical traffic speed data.

[0021] Figure 4 This is a schematic diagram of the Backbone structure, which consists of multiple S4 layers (Structured State Spacesequence model layers). DETAILED DESCRIPTION

[0022] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0023] like Figures 1 to 4 As shown, this embodiment discloses a traffic speed prediction method based on an improved state space model, which realizes traffic speed prediction based on the improved state space model Structured State Space sequence model, wherein the improved state space model is an improvement of the original Structured State Space sequence model in three parts; the first part is to improve the encoder part of the Structured State Space sequence model, replacing the original Liner network with an adaptive graph structure + spatiotemporal fusion feature layer, so that the model can fuse time and space information; the second part is to transform the dimensions of the state matrix, input matrix, and output matrix of the Backbone in the Structured State Space sequence model to better meet the needs of traffic speed prediction; the third part is to improve the decoder of the Structured State Space sequence model, changing the Liner network to a multi-layer MLP network and adding a Relu activation function. The specific implementation of the traffic speed prediction method includes the following steps:

[0024] 1) Input the adjacency matrix and historical traffic speed data into the adaptive graph structure + spatiotemporal fusion feature layer. The adaptive graph structure + spatiotemporal fusion feature layer will learn a more realistic adjacency matrix based on the original adjacency matrix. The adjacency matrix is ​​fused with the historical traffic speed data to obtain the embedding layer that integrates the spatiotemporal features.

[0025] The specific situation of the adaptive graph structure + spatiotemporal fusion feature layer is as follows: the predefined adjacency matrix is ​​recorded as G0, all traffic nodes are input into the node-embedding (node ​​embedding layer) to obtain an N×H0 matrix, recorded as E, where N is the number of traffic nodes, H0 is the feature dimension of node-embedding, E and its transpose E T The adjacency matrix G1 is obtained by matrix multiplication, and then weighted with G0 to obtain the adjacency matrix G2 which is more consistent with the actual situation. The specific formulas are as follows (1) and (2):

[0026] G1=E×E T (3)

[0027] G2=G0+αG1 (4)

[0028] Among them, α is the adaptive adjacency matrix weighted hyperparameter. Then, the maximum value M of the historical data on the time scale is taken, and the historical data is divided by M, which plays a normalization role and can improve the generalization ability of the model. Then, the dimensions of the historical data and G2 are expanded, and the Hadamard product is performed to fuse the node information with the features of the historical data to obtain the Embedding that fuses the time and space features.

[0029] 2) The Embedding is input into Backbone. Backbone obtains the future traffic speed characteristics based on the state matrix, input matrix, output matrix and discretized state space equation. The future traffic speed characteristics are used to obtain the predicted value of the future traffic speed through the multi-layer MLP network of the decoder.

[0030] The state matrix A and input matrix B in the Backbone of the original Structured State Space sequence model are both two-dimensional H1×H1 matrices, where H1 is the characteristic dimension of the Structured State Space sequence model. The state matrix A and input matrix B are transformed into N×H1×H1 tensors, where N is the number of traffic nodes. This is equivalent to learning a state matrix and input matrix for each node, which can more specifically establish a corresponding state matrix and input matrix for each node, thereby improving the accuracy of model prediction. The tensor dimension of the Embedding that integrates time and space features does not change after passing through the Backbone, so a multi-layer MLP network is required to obtain the final traffic speed prediction result. Compared with a single-layer Liner network, a multi-layer MLP network can learn more features. After adding the Relu activation function, the nonlinear expression ability of the model can be improved.

[0031] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. Traffic speed prediction method based on improved state space model, It is characterized in that This method realizes traffic speed prediction based on the improved state space model Structured State Space sequence model, wherein the improved state space model is an improvement of the original Structured State Space sequence model in three parts; the first part is to improve the encoder part of the Structured State Space sequence model, replacing the original Liner network with an adaptive graph structure + spatiotemporal fusion feature layer, so that the model can fuse time and space information; the second part is to transform the dimensions of the state matrix, input matrix, and output matrix of the backbone network Backbone in the Structured State Space sequence model to better meet the needs of traffic speed prediction; the third part is to improve the decoder of the Structured State Space sequence model, changing the Liner network to a multi-layer MLP network and adding a Relu activation function; The specific implementation of the traffic speed prediction method includes the following steps: 1) Input the adjacency matrix and historical traffic speed data into the adaptive graph structure + spatiotemporal fusion feature layer. The adaptive graph structure + spatiotemporal fusion feature layer will learn a more realistic adjacency matrix based on the original adjacency matrix. The adjacency matrix is ​​fused with the historical traffic speed data to obtain an embedding layer that integrates spatiotemporal features. The specific situation of the adaptive graph structure + spatiotemporal fusion feature layer is: the predefined adjacency matrix is ​​denoted as G 0 , input all traffic nodes into the node embedding layer node-embedding to obtain an N×H 0 The matrix is ​​denoted as E, where N is the number of traffic nodes, H 0 is the feature dimension of node-embedding, E and its transposed E T Perform matrix multiplication to obtain the adjacency matrix G 1 , and with G 0 Weighted to get the adjacency matrix G that is more consistent with reality 2 , the specific formulas are as follows (1) and (2): G 1 =E×E T (1) G 2 =G 0 +αG 1 (2) Among them, α is the adaptive adjacency matrix weighted hyperparameter. Then, the maximum value M of the historical data is taken on the time scale, and the historical data is divided by M, which plays a normalization role and can improve the generalization ability of the model. Then, the historical data and G are expanded. 2 The dimension of is used to perform Hadamard product, so that the node information is integrated with the characteristics of historical data to obtain the Embedding that integrates the time and space characteristics; 2) The Embedding is input into Backbone. Backbone obtains the future traffic speed characteristics based on the state matrix, input matrix, output matrix and discretized state space equation. The future traffic speed characteristics are used to obtain the predicted value of the future traffic speed through the multi-layer MLP network of the decoder.

2. The traffic speed prediction method based on the improved state space model according to claim 1, It is characterized in that In step 2), the state matrix A and input matrix B in the Backbone of the original Structured State Space sequence model are both two-dimensional H 1 ×H 1 Matrix, H 1 is the characteristic dimension of the Structured State Space sequence model, and the state matrix A and input matrix B are transformed into N×H 1 ×H 1 Tensor, where N is the number of traffic nodes, is equivalent to learning a state matrix and input matrix for each node, which can establish a corresponding state matrix and input matrix for each node in a more targeted manner, thereby improving the accuracy of model prediction. The tensor dimension does not change after the Embedding that integrates time and space features passes through Backbone, so a multi-layer MLP network is required to obtain the final traffic speed prediction result. Compared with a single-layer Liner network, a multi-layer MLP network can learn more features. After adding the Relu activation function, the nonlinear expression ability of the model can be improved.