Space-time ARIMA traffic prediction method based on neural network
Through the neural network-based space-time ARIMA traffic prediction method, combined with the time-aware decomposition strategy and the space-time ARIMA network model, the problem that existing traffic prediction methods are difficult to deal with time-varying space dependence and seasonal patterns is solved, achieving higher accuracy and flexibility sexual traffic forecast.
Patent Information
- Application Number
- CN202411569651.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2044-11-05
AI Technical Summary
Existing traffic prediction methods are difficult to effectively deal with time-varying spatial dependence and mutually coupled seasonal patterns, resulting in insufficient prediction accuracy.
The space-time ARIMA traffic prediction method based on neural network is adopted to decompose traffic data into multiple subsets through time-aware decomposition strategy, and a spatio-time ARIMA network model is constructed, combining the time-dependent module and the space-dependent module to extract and fuse the time and space directions. Characteristic information is predicted.
It improves the accuracy and flexibility of traffic forecasting, can effectively handle time-varying spatial dependence and seasonal patterns, and provides more accurate traffic forecast results.
Smart Images

Figure CN119495188A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of traffic information prediction, in particular to a spatiotemporal ARIMA traffic prediction method based on neural network. Background Art
[0002] Traffic forecasting is one of the most important components of intelligent transportation systems (ITS). Accurate traffic forecasting can provide travelers with optimized travel routes, alleviate traffic congestion, reduce people's daily travel costs, and thus save public resources. However, traffic data has spatiotemporal dependence. The time-varying and nonlinear characteristics of spatiotemporal dependence patterns make traffic forecasting a challenging task.
[0003] Some early traffic forecasting studies considered traffic forecasting 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 network were introduced in traffic forecasting. However, these methods all ignore the inherent spatial characteristics of traffic data. Therefore, in recent years, existing technologies have improved the prediction performance by incorporating spatial correlation into traffic forecasting. For example, by utilizing graph convolutional networks and their extensions to learn the spatiotemporal patterns of traffic data, remarkable results have been achieved in prediction.
[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 roughly divided into two categories. The first category mainly targets the static spatiotemporal correlation of road network traffic data and uses various neural modules. Another research direction is the dynamic spatiotemporal correlation of traffic data. Some studies have extended graph convolutional networks to make them suitable for dynamic spatiotemporal correlations.
[0005] Although significant progress has been made in existing research, the following challenges still need to be addressed.
[0006] Challenge 1: Time-varying spatial dependencies. For example, the traffic conditions of a given node and the correlations between neighboring nodes are different on weekdays and weekends, which indicates that the underlying spatiotemporal mechanisms vary over time and can be viewed as a conceptual shift.
[0007] Challenge 2: Mutually coupled seasonal patterns: Traffic conditions in a certain time period are not only related to the previous time period, but also to the traffic conditions across cycles. For example, given a node, the traffic speed during 12:00-12:55 is not only related to the traffic conditions in the previous few hours, but also to the traffic conditions in the previous few hours. Summary of the invention
[0008] In view of the deficiencies in the prior art, the present invention provides a spatiotemporal ARIMA traffic prediction method based on a neural network. The present invention has high operating efficiency and can simultaneously extract time-dependent information and space-dependent information.
[0009] The technical solution of the present invention is: a spatiotemporal ARIMA traffic prediction method based on neural network, comprising the following steps:
[0010] S1), decomposing the original traffic data into multiple subsets through a time-aware decomposition strategy;
[0011] S2), split each subset into period and time period data to form a training data set and a test data set;
[0012] S3), constructing a spatiotemporal ARIMA network model; and using the training data set to train the spatiotemporal ARIMA network model;
[0013] S4) Use the trained spatiotemporal ARIMA network model to predict the test data set.
[0014] Preferably, in step S1), the original traffic data is decomposed into multiple subsets, which are expressed as:
[0015]
[0016] Where D represents the original traffic data in period T, represents the i-th subset within 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 the time dependency.
[0019] Preferably, in step S3), the spatial dependency module is composed of an attention layer and a gated fusion layer; the purpose of the attention layer is to learn the weight of the relationship between the neighboring nodes and the central node; the gated fusion mechanism is used to fuse the speed 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 respective prediction representations of the periodic and time period data, and finally fuses the two prediction representations for traffic prediction, ultimately obtaining multiple model training parameters.
[0021] Preferably, in step S3), the fusion of the periodic and time period data refers to passing the periodic and time period data through the time-dependent module and the space-dependent module respectively to obtain the periodic representation and time period data, and then fusing them to obtain the final prediction result.
[0022] Preferably, in step S3), during the training process of the spatiotemporal ARIMA network model, the goal is to minimize the error between the actual traffic data and the predicted value.
[0023] The beneficial effects of the present invention are:
[0024] 1. The spatiotemporal ARIMA network model of the present invention includes the traffic data of the central node and its spatial neighboring nodes. The present invention expands the spatiotemporal ARIMA network model through a neural network-based module to enable it to adapt to nonlinear correlations and enhance its flexibility;
[0025] 2. This paper proposes a time-aware data decomposition and learning framework that takes into account the temporal properties of traffic data to handle the time-varying spatial dependency problem; the dataset is divided into different learning sets according to the inherent distribution and transition period of the data;
[0026] 3. Compared with the existing traffic prediction methods, the present invention can predict accurate traffic prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a schematic diagram of the process of the present invention;
[0028] Figure 2 It is a time-aware data decomposition strategy diagram of the present invention;
[0029] Figure 3 It is a schematic diagram of the structure of the spatiotemporal ARIMA network model of the method of the present invention. DETAILED DESCRIPTION
[0030] The specific implementation of the present invention will be further described below in conjunction with the accompanying drawings:
[0031] like Figure 1 As shown, this embodiment provides a spatiotemporal ARIMA traffic prediction method based on a neural network, comprising the following steps:
[0032] S1), decompose the original traffic data into M subsets through the time-aware decomposition strategy; its structure is shown in Figure 2; specifically expressed as:
[0033]
[0034]
[0035] Where D represents the original traffic data in period T, represents the i-th subset within period T.
[0036] For example, in this embodiment, a week is regarded as a time period T = {Mon, Tue, ..., Sun}. Considering the data distribution changes and spatial dependence caused by the shift between weekdays and weekends, D can be divided into two subsets: and Among them, T1 = {Mon, Tue, ..., Fri} (i.e. working days), T2 = {Sat, Sun} (i.e. weekends).
[0037] S2), split each subset into period and time period data to form a training data set and a test data set;
[0038] S3), constructing a spatiotemporal ARIMA network model; and using the training data set to train the spatiotemporal ARIMA network model; specifically, Figure 3 As shown, the spatiotemporal ARIMA network model of this embodiment extracts and fuses feature information in the time and space directions to obtain prediction representations of the cycle and time period data respectively, and finally fuses these two representations for traffic prediction, ultimately obtaining M model training parameters.
[0039] In this embodiment, the spatiotemporal ARIMA network model includes a time-dependent module and a space-dependent module.
[0040] The time-dependent module is composed 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. Its expression is as follows:
[0041] h t,l =F1(x t,l );
[0042]
[0043] Among them, h t,l and Represents the input data x t,l , Representation on the central node and neighboring nodes after passing through the fully connected layer; F1 and F2 represent nonlinear transformations; t represents the tth period; n represents the nth neighbor; l represents the lth time period;
[0044] Then the representation h on the central node and the neighboring nodes t,l and Input into the DLinear module, through which the temporal dependency is captured, specifically:
[0045] e t,l =Linear(Dec(h t,l ))
[0046]
[0047] Where Dec(·) means decomposing the input into trend and seasonal components, and Linear(·) means adding the trend and seasonal components together to capture the temporal dependency. t,l , They represent the output representations of the central node and neighbor nodes after passing through the DLinear module respectively.
[0048] The spatial dependency module consists of an attention layer and a gated fusion layer. The attention layer is used to learn the weight α of the relationship between the neighbor node and the central node. n , thereby aggregating their information. In this embodiment, Q (query) is used as the speed condition of the central node, and K (key) and V (value) are used as the speed conditions of the neighboring nodes respectively; the aggregated neighboring nodes are represented as Therefore, the design of the attention layer is as follows:
[0049] Q=F Q (e t,l );
[0050]
[0051] In the formula, K n and V n Respectively represent the key and value of the nth neighbor node, s n Represents the similarity between the central node and the nth neighbor node, α n represents the attention score of the central node to the nth neighbor node; F represents the nonlinear transformation of the output after the attention layer, F Q represents a nonlinear transformation of the representation of the central node, F k 、F V Indicates a nonlinear transformation of the representation of neighbor nodes; d K K n The dimension size of .
[0052] Through the above, we can get the central node representation e t,l Aggregate representation of neighbor nodes Then, the gated fusion mechanism is used to fuse the speed information of the central node and its neighboring nodes. The gated fusion mechanism can be written as follows:
[0053]
[0054] In the formula, β represents the gate; and b β is a learnable parameter, ⊙ represents the Hadamard product, and σ(·) represents the sigmoid function.
[0055] In this embodiment, the fusion of the period and time period data refers to the process of passing the period and time period data through the time-dependent module and the space-dependent module respectively to obtain the period representation y. p and time period data y τ , then the period is represented by y p and time period data y τ Fusion, get the final prediction result y s , its expression is expressed as:
[0056] y s =W p y p +W τ y τ ;
[0057] Where W p and W τ represents the learnable parameters of the fully connected layer, representing the different effects of correlation between cycles and time periods; p and τ They are the period and time segment representations of the gated fusion layer output, 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 value, that is, for a given training set Ω, the loss function Loss can be written as:
[0059] Loss=∑ s∈Ω (Y s -y s ) 2 ;
[0060] Among them, s∈Ω represents a sample in the training set, Y s and s represent the true value and the predicted value respectively.
[0061] S4) Use the trained spatiotemporal ARIMA network model to predict the test data set.
[0062] In order to illustrate the advantages of the method of this embodiment, as shown in Table 1, the RMSE, MAE, Accuracy, R 2and var value traffic prediction score table, the SZ-taxi dataset is widely used in the field of traffic prediction. As can be seen from Table 1, the Ours method in this embodiment obtains the best RMSE, MAE, Accuracy, R2 and var value, indicating that this embodiment (Ours) obtains the best traffic prediction effect.
[0063] Table 1 Quantitative analysis of the method of this embodiment and the existing algorithm on the SZ-taxi data set (* represents a value that is too small and has no reference value)
[0064]
[0065]
[0066] The above embodiments and descriptions are only for illustrating the principles and best embodiments of the present invention. Without departing from the spirit and scope of the present invention, the present invention may be subject to various changes and improvements, all of which fall within the scope of the present invention to be protected.
Claims
1. A spatiotemporal ARIMA traffic forecasting method based on neural network, characterized in that: The steps include: S1), decomposing the original traffic data into multiple subsets through a time-aware decomposition strategy; S2), split each subset into period and time period data to form a training data set and a test data set; S3), constructing spatiotemporal ARIMA network model; And use the training data set to train the spatiotemporal ARIMA network model; S4) Use the trained spatiotemporal ARIMA network model to predict the test data set.
2. The spatiotemporal ARIMA traffic forecasting method based on a neural network according to claim 1, characterized in that: In step S1), the original traffic data is decomposed into multiple subsets, which are specifically expressed as follows: Where D represents the original traffic data in period T, represents the i-th subset within period T; Indicates that there are M different data distributions.
3. The spatiotemporal ARIMA traffic forecasting method based on neural network according to claim 1, characterized in that: In step S3), the spatiotemporal ARIMA network model includes a time-dependent module and a space-dependent module.
4. The spatiotemporal ARIMA traffic forecasting method based on a neural network according to claim 3, characterized in that: In step S3), the time dependency module is composed 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 the DLinear module is used to capture the time dependency.
5. The spatiotemporal ARIMA traffic forecasting method based on neural network according to claim 3, characterized in that: In step S3), the spatial dependency module is composed of an attention layer and a gated fusion layer; the purpose of the attention layer is to learn the weight of the relationship between the neighboring nodes and the central node; The gated fusion layer utilizes a gated fusion mechanism to fuse the speed information of the central node and its neighboring nodes.
6. The spatiotemporal ARIMA traffic forecasting method based on neural network according to claim 3, characterized in that: In step S3), the spatiotemporal ARIMA network model extracts and fuses the feature information in the time and space directions to obtain the prediction representation of the cycle and time period data respectively, and finally fuses the two prediction representations to perform traffic prediction, and finally obtains multiple model training parameters.
7. The spatiotemporal ARIMA traffic forecasting method based on neural network according to claim 6, characterized in that: In step S3), the fusion of the periodic and time period data refers to passing the periodic and time period data through the time-dependent module and the space-dependent module respectively to obtain the periodic representation and time period data, and then fusing them to obtain the final prediction result.
8. The spatiotemporal ARIMA traffic forecasting method based on neural network according to claim 7, characterized in that: In step S3), during the training process of the spatiotemporal ARIMA network model, the goal is to minimize the error between the actual traffic data and the predicted value.
9. The spatiotemporal ARIMA traffic forecasting method based on neural network according to claim 4, characterized in that: In step S3), the expression of the fully connected layer is as follows: h t,l =F1(x t,l ); Among them, h t,l and Represents the input data x t,l , Representation on the central node and neighboring nodes after passing through the fully connected layer; F1 and F2 represent nonlinear transformations; t represents the tth cycle; n represents the nth neighbor; l represents the,th time period; Then the representation h on the central node and the neighboring nodes t,l and Input into the DLinear module, through which the temporal dependency is captured, specifically: e t,l =Linear(Dec(h t,l )) Where Dec(·) means decomposing the input into trend and seasonal components, and Linear(·) means adding the trend and seasonal components together to capture the temporal dependency. t,l , They represent the output representations of the central node and neighbor nodes after passing through the DLinear module respectively.
10. The spatiotemporal ARIMA traffic forecasting method based on neural network according to claim 5, characterized in that: The gated fusion gate fuses the central node representation through the gated fusion mechanism. t,l Aggregate representation of neighbor nodes The gated fusion mechanism can be written as follows: In the formula, β represents the gate; and b β is a learnable parameter, ⊙ represents the Hadamard product, and σ(·) 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