A Spatiotemporal ARIMA Traffic Prediction Method Based on Neural Networks
By employing a neural network-based spatiotemporal ARIMA method, which decomposes and constructs a spatiotemporal ARIMA network model with time awareness, the problem of time-varying spatial dependence and seasonal patterns in traffic data is solved, enabling more accurate traffic prediction.
Patent Information
- Application Number
- CN202411569651.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2044-11-05
AI Technical Summary
Existing traffic forecasting methods fail to effectively handle the time-varying spatial dependence and coupled seasonal patterns of traffic data, resulting in insufficient forecast accuracy.
A spatiotemporal ARIMA method based on neural networks is adopted. The data is decomposed into multiple subsets through a time-aware decomposition strategy, and a spatiotemporal ARIMA network model containing time-dependent and spatial-dependent modules is constructed. The model is trained using a training dataset and finally used for traffic prediction.
It improves the accuracy of traffic forecasting, effectively handles time-varying spatial dependence and seasonal patterns, and provides more accurate traffic forecast results.
Smart Images

Figure CN119495188B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traffic information prediction technology, and in particular to a spatiotemporal ARIMA traffic prediction method based on neural networks. Background Technology
[0002] Traffic forecasting is one of the most important components of Intelligent Transportation Systems (ITS). Accurate traffic forecasting can provide travelers with optimized routes, alleviate traffic congestion, reduce daily travel costs, and thus save public resources. However, traffic data has spatiotemporal dependencies, and the time-varying and nonlinear characteristics of these spatiotemporal dependency patterns make traffic forecasting a challenging task.
[0003] Early traffic forecasting research treated it as a time-series forecasting task. For example, time-series models—Autoregressive Integrated Moving Average (ARIMA) and sequence-based machine learning models—Support Vector Regression and Recurrent Neural Networks—were introduced into traffic forecasting. However, these methods neglected the inherent spatial characteristics of traffic data. Therefore, in recent years, existing techniques have improved forecasting performance by incorporating spatial correlations into traffic forecasting. For instance, significant results have been achieved in forecasting by utilizing graph convolutional networks and their extensions to learn spatiotemporal patterns in traffic data.
[0004] The development of neural network technology has made it possible to use deep models to capture complex spatiotemporal correlations for traffic prediction, which can be broadly divided into two categories. The first category mainly targets the static spatiotemporal correlations of road network traffic data, employing various neural modules. The other research direction focuses on the dynamic spatiotemporal correlations of traffic data. Some studies have extended graph convolutional networks to make them suitable for dynamic spatiotemporal correlation scenarios.
[0005] Despite significant progress in existing research, the following challenges remain to be addressed.
[0006] Challenge 1: Time-varying spatial dependence. For example, traffic conditions at a given node and the correlation between neighboring nodes differ on weekdays and weekends, indicating that the underlying spatiotemporal mechanisms change over time, which can be viewed as a conceptual shift.
[0007] Challenge 2: Interlocking seasonal patterns, where traffic conditions at a given time period are not only related to the previous time period but also to traffic conditions across cycles. For example, given a node, traffic speed between 12:00 and 12:55 is related not only to traffic conditions in the previous few hours but also to traffic conditions in the preceding consecutive hours. Summary of the Invention
[0008] To address the shortcomings of existing technologies, this invention provides a spatiotemporal ARIMA traffic prediction method based on neural networks. This invention has high operating efficiency and can simultaneously extract time-dependent and spatial-dependent information.
[0009] The technical solution of this invention is: a spatiotemporal ARIMA traffic prediction method based on neural networks, comprising the following steps:
[0010] S1) The original traffic data is decomposed into multiple subsets using a time-aware decomposition strategy;
[0011] S2) Each subset is split into periodic and time period data to form training and test datasets;
[0012] S3) Construct a spatiotemporal ARIMA network model; and train the spatiotemporal ARIMA network model using the training dataset;
[0013] S4) Use the trained spatiotemporal ARIMA network model to make predictions on the test dataset.
[0014] Preferably, in step S1), the original traffic data is decomposed into multiple subsets, represented as follows:
[0015]
[0016] In the formula, D represents the raw traffic data within period T. This represents the i-th subset within a period T.
[0017] Preferably, in step S3), the spatiotemporal ARIMA network model includes a time-dependent module and a space-dependent module.
[0018] Preferably, in step S3), the time dependency module consists of a fully connected layer and a DLinear module. The fully connected layer is responsible for processing the information of the central node and the information of other neighboring nodes, and the DLinear module is used to capture time dependencies.
[0019] Preferably, in step S3), the spatial dependency module consists of an attention layer and a gating fusion layer; the purpose of the attention layer is to learn the weights of the relationship between neighboring nodes and the central node; the gating fusion mechanism is used to fuse the velocity information of the central node and its neighboring nodes.
[0020] Preferably, in step S3), the spatiotemporal ARIMA network model extracts and fuses feature information in the time and space directions to obtain prediction representations of periodic and time period data respectively. Finally, the two prediction representations are fused to perform traffic prediction, and multiple model training parameters are obtained.
[0021] Preferably, in step S3), the fusion of periodic and time period data refers to passing the periodic and time period data through the time-dependent module and the spatial-dependent module respectively to obtain the periodic representation and the time period data, and then fusing them to obtain the final prediction result.
[0022] Preferably, in step S3), the goal of the spatiotemporal ARIMA network model during training is to minimize the error between the real traffic data and the predicted values.
[0023] The beneficial effects of this invention are as follows:
[0024] 1. The spatiotemporal ARIMA network model of the present invention includes traffic data of the central node and its spatially neighboring nodes. The present invention extends the spatiotemporal ARIMA network model through a neural network-based module, enabling it to adapt to nonlinear correlations and enhance its flexibility.
[0025] 2. This invention proposes a time-aware data decomposition and learning framework that considers the temporal attributes of traffic data to address the problem of time-varying spatial dependencies; based on the inherent distribution and transition period of the data, the dataset is divided into different learning sets.
[0026] 3. Compared with existing traffic prediction methods, the present invention can predict traffic results more accurately. Attached Figure Description
[0027] Figure 1 This is a schematic flowchart of the method of the present invention;
[0028] Figure 2 This is a diagram illustrating the time-aware data decomposition strategy of the present invention.
[0029] Figure 3 This is a schematic diagram of the spatiotemporal ARIMA network model of the method of the present invention. Detailed Implementation
[0030] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings:
[0031] like Figure 1 As shown, this embodiment provides a spatiotemporal ARIMA traffic prediction method based on neural networks, including the following steps:
[0032] S1) The original traffic data is decomposed into M subsets using a time-aware decomposition strategy; its structure is shown in Figure 2; specifically, it is represented as follows:
[0033]
[0034]
[0035] In the formula, D represents the raw traffic data within period T. This represents the i-th subset within a period T.
[0036] For example, in this embodiment, a week is considered as a time period T = {Mon, Tue, ..., Sun}. Considering the changes in data distribution and spatial dependencies caused by the shift between weekdays and weekends, D can be divided into two subsets. and Where T1 = {Mon, Tue, ..., Fri} (i.e., weekdays) and T2 = {Sat, Sun} (i.e., weekends).
[0037] S2) Each subset is split into periodic and time period data to form training and test datasets;
[0038] S3) Construct a spatiotemporal ARIMA network model; and train the spatiotemporal ARIMA network model using the training dataset; specifically as follows: Figure 3 As shown, the spatiotemporal ARIMA network model in this embodiment extracts and fuses feature information in the time and space directions to obtain prediction representations of periodic and time period data respectively. Finally, the two representations are fused to perform traffic prediction, resulting in M model training parameters.
[0039] In this embodiment, the spatiotemporal ARIMA network model includes a time-dependent module and a spatial-dependent module.
[0040] The time-dependent module consists of a fully connected layer and a DLinear module. The fully connected layer is responsible for processing the information of the central node and other neighboring nodes, and its expression is as follows:
[0041] h t,l =F1(x t,l );
[0042]
[0043] Among them, h t,l and These represent the input data x. t,l , The representation of the nodes at the center and neighbor nodes after passing through the fully connected layer; F1 and F2 represent nonlinear transformations; t represents the t-th period; n represents the n-th neighbor; l represents the l-th time period;
[0044] Then, the representations h on the central node and neighboring nodes are... t,l and The input is fed into the DLinear module, which captures time dependencies, specifically as follows:
[0045] e t,l =Linear(Dec(h t,l ))
[0046]
[0047] Where Dec(·) represents decomposing the input into trend and seasonal components, and Linear(·) represents adding the trend and seasonal components to capture time dependence; t,l , These represent the output representations of the central node and neighboring nodes after passing through the DLinear module, respectively.
[0048] The spatial dependency module consists of an attention layer and a gating fusion layer. The attention layer is used to learn the weights α of the relationship between neighboring nodes and the central node. n This aggregates their information. In this embodiment, Q (query) is used as the velocity condition for the central node, and K (key) and V (value) are used as the velocity conditions for the neighboring nodes, respectively. The aggregated neighboring node representation... Therefore, the attention layer is designed as follows:
[0049] Q = F Q (e t,l );
[0050]
[0051] In the formula, K n and V n Let s represent the key and value of the nth neighbor node, respectively. n α represents the similarity between the central node and its nth neighbor node. n F represents the attention score of the central node to its nth neighbor node; F represents the non-linear transformation performed on the output after the attention layer. Q F represents a nonlinear transformation of the representation of the central node. k F V This indicates a nonlinear transformation of the representations of neighboring nodes; d K K represents n The size of the dimension.
[0052] The central node representation e is obtained through the above. t,l Aggregate representation of neighboring nodes Then, a gating fusion mechanism is used to fuse the speed information of the central node and its neighboring nodes. The gating fusion mechanism can be written in the following form:
[0053]
[0054] In the formula, β represents the gate; and b β Here, ⊙ represents the Hadamard product, and σ(·) represents the sigmoid function.
[0055] In this embodiment, fusing periodic and time period data means processing the periodic and time period data through a time-dependent module and a space-dependent module respectively to obtain the periodic representation y. p and time period data y τ Then the period is represented by y p and time period data y τ By merging the results, we obtain the final prediction result y. s Its expression is:
[0056] y s =W p y p +W τ y τ ;
[0057] In the formula, W p and W τ The learnable parameters of the fully connected layer represent the different effects of the correlation between the period and the time period; y p and y τ These represent the period and time period of the output from the gated fusion layer, respectively.
[0058] In this embodiment, the goal of the spatiotemporal ARIMA network model during training is to minimize the error between the actual traffic data and the predicted values. That is, for a given training set Ω, the loss function Loss can be written as:
[0059] Loss=∑ s∈Ω (Y s -y s ) 2 ;
[0060] Where s∈Ω represents a sample in the training set, Y s and y s These represent the actual value and the predicted value, respectively.
[0061] S4) Use the trained spatiotemporal ARIMA network model to make predictions on the test dataset.
[0062] To illustrate the advantages of the method in this embodiment, Table 1 shows the RMSE, MAE, Accuracy, and R of the method in this embodiment compared to some existing algorithms on the SZ-taxi dataset at different time periods. 2The SZ-taxi dataset, with its traffic prediction score table and var value, is widely used in the field of traffic prediction. Table 1 shows that the Ours method in this embodiment achieves the best RMSE, MAE, Accuracy, R2, and var values, indicating that this embodiment (Ours) achieves the best traffic prediction performance.
[0063] Table 1. Quantitative analysis of the method in this embodiment and existing algorithms on the SZ-taxi dataset (* indicates values that are too small to be of reference value).
[0064]
[0065]
[0066] The embodiments and descriptions above are merely illustrative of the principles and preferred embodiments of the present invention. Various changes and modifications may be made to the present invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed.
Claims
1. A spatiotemporal ARIMA traffic prediction method based on neural networks, characterized in that, Includes the following steps: S1) Decompose the original traffic data into multiple subsets using a time-aware decomposition strategy; S2) Each subset is split into periodic and time period data to form training and test datasets; S3) Construct a spatiotemporal ARIMA network model; And a spatiotemporal ARIMA network model was trained using the training dataset; The spatiotemporal ARIMA network model includes a time-dependent module and a spatial-dependent module; The time dependency module consists of a fully connected layer and a DLinear module. The fully connected layer is responsible for processing the information of the central node and the information of other neighboring nodes, and the DLinear module is used to capture time dependencies. The expression for the fully connected layer is as follows: ; ; in, and These represent the input data. , The representation of the central node and neighboring nodes after passing through the fully connected layer; , Indicates nonlinear transformation; t Indicates the first t One cycle; n Indicates the first n One neighbor; l Indicates the first l A time period; Then the representations on the central node and neighboring nodes and The input is fed into the DLinear module, which captures time dependencies, specifically as follows: in, This indicates that the input is decomposed into trend and seasonal components. This means adding trend and seasonal components to capture time dependence; , These represent the output representations of the center node and neighboring nodes after passing through the DLinear module, respectively. S4) Use the trained spatiotemporal ARIMA network model to make predictions on the test dataset.
2. The spatiotemporal ARIMA traffic prediction method based on neural networks according to claim 1, characterized in that: In step S1), the original traffic data is decomposed into multiple subsets, specifically as follows: ; ; In the formula, Indicates period T The original traffic data within, Indicates period T The first i A subset; This indicates that there are M distinct data distributions; Indicates the first One cycle.
3. The spatiotemporal ARIMA traffic prediction method based on neural networks according to claim 1, characterized in that: In step S3), the spatial dependency module consists of an attention layer and a gating fusion layer; the purpose of the attention layer is to learn the weights of the relationship between neighboring nodes and the central node. The gated fusion layer uses a gated fusion mechanism to fuse the speed information of the central node and its neighboring nodes.
4. The spatiotemporal ARIMA traffic prediction method based on neural networks according to claim 1, characterized in that: In step S3), the spatiotemporal ARIMA network model extracts and fuses feature information in the time and space directions to obtain prediction representations of periodic and time period data respectively. Finally, the two prediction representations are fused to perform traffic prediction, and multiple model training parameters are obtained.
5. The spatiotemporal ARIMA traffic prediction method based on neural networks according to claim 4, characterized in that: In step S3), fusing periodic and time period data means passing the periodic and time period data through the time dependency module and the spatial dependency module respectively to obtain the periodic representation and the time period data, and then fusing them to obtain the final prediction result.
6. The spatiotemporal ARIMA traffic prediction method based on neural networks according to claim 5, characterized in that: In step S3), the goal of the spatiotemporal ARIMA network model during training is to minimize the error between the real traffic data and the predicted values.
7. The spatiotemporal ARIMA traffic prediction method based on neural networks according to claim 3, characterized in that: The gated fusion layer uses a gated fusion mechanism to fuse the representation of the central node. Aggregate representation of neighboring nodes The gating fusion mechanism can be written in the following form: ; ; In the formula, Indicates a door; 、 and For learnable parameters, Represents the Hadama product. This represents the sigmoid function.
Citation Information
Patent Citations
Space-time ARMA graph convolutional network traffic flow prediction method
CN118298621A
Systems and methods for public transit arrival time prediction
EP4310450A1