A traffic prediction method based on comprehensive spatiotemporal characteristics

By combining spatiotemporal features and LSTM network models in traffic prediction, and considering a variety of time and space factors, the problem of neglecting non-periodic factors and global spatial features in the existing technology is solved, and accurate prediction of traffic flow and travel are achieved. Planning improvements.

CN118015834BActive Publication Date: 2024-09-03SHANDONG JIANZHU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410162751.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-05
Publication Date
2024-09-03
Estimated Expiration
2044-02-05

AI Technical Summary

Technical Problem

Existing traffic flow prediction methods ignore the impact of non-periodic factors such as weather and holidays on traffic flow, are difficult to cope with dynamic time changes in complex traffic systems, and cannot effectively capture the global situation of non-adjacent nodes when modeling spatial information. characteristics, resulting in insufficient prediction accuracy.

Method used

A traffic prediction method based on comprehensive spatiotemporal features is adopted. By extracting spatiotemporal dimension features and processing them, combined with the spatiotemporal attention module and spatiotemporal convolution module, the LSTM network model is used for prediction, taking into account the dynamic changes of time and space, including hours, days, and weeks. , holidays and weather factors, as well as the impact of non-neighboring nodes.

Benefits of technology

It achieves accurate prediction of vehicle flow density, estimates the probability of congestion in the transportation network, improves traffic management efficiency, reduces or avoids congestion, provides more accurate travel planning solutions, and improves travel efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118015834B
    Figure CN118015834B
Patent Text Reader

Abstract

The present invention discloses a traffic prediction method based on comprehensive spatiotemporal features, including: extracting the spatiotemporal dimensional features of the predicted road section based on the traffic network, and inputting the spatiotemporal dimensional features as the original graph signal matrix into the spatiotemporal block for processing to obtain the final input, wherein the spatiotemporal block includes a spatiotemporal attention module and a spatiotemporal convolution module; combining the final input with the result obtained by the residual convolution operation of the original graph signal matrix, and processing to obtain the final output; inputting the final output into the LSTM network model, and inputting the output result of the model into the fully connected layer to obtain the final prediction result. The present invention helps to improve the efficiency of traffic management and can also reduce or avoid the possibility of congestion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle network technology, and in particular to a traffic prediction method based on comprehensive spatiotemporal characteristics. Background Art

[0002] With the continuous increase in the number of vehicles, traffic management is facing increasingly severe challenges. Traffic congestion will reduce the operating efficiency of the highway network, increase the risk of traffic accidents, and negatively affect the quality of life of citizens. In this context, traffic speed prediction is a key means to alleviate traffic problems. How to accurately predict the huge amount of traffic data in real time to improve the effectiveness of traffic control has become a major research hotspot, and its theory, methods and applications have received more and more attention and attention.

[0003] Highway traffic flow prediction involves typical spatiotemporal data prediction problems. Existing traffic flow prediction methods mainly focus on modeling and predicting factors with periodic linear time changes such as days and weeks. However, these methods ignore the potential impact of non-periodic factors such as weather and holidays on traffic flow. This leads to certain deficiencies in these methods when dealing with dynamic time changes in complex traffic systems. On the other hand, in terms of spatial information modeling, existing methods mainly focus on capturing the relationship between neighboring nodes, but often fail to effectively capture the global spatial characteristics of non-adjacent nodes, which also has a certain impact on the accuracy of traffic prediction.

[0004] In summary, existing traffic forecasting methods lack the ability to model the dynamic spatiotemporal correlation of traffic data and are unable to cope with complex changes in the traffic environment. Summary of the invention

[0005] In order to solve the above technical problems, the present invention proposes a traffic prediction method based on comprehensive spatiotemporal characteristics. By predicting traffic flow density, a more intelligent and reliable vehicle trip planning solution is provided for travelers, so as to minimize or avoid the occurrence of vehicle network congestion and road jams.

[0006] To achieve the above object, the present invention provides a traffic prediction method based on comprehensive spatiotemporal characteristics, comprising:

[0007] Based on the traffic network, extract the spatiotemporal dimension features of the predicted road section, and input the spatiotemporal dimension features as the original graph signal matrix into the spatiotemporal block for processing to obtain the final input volume, wherein the spatiotemporal block includes a spatiotemporal attention module and a spatiotemporal convolution module;

[0008] The final input is combined with the result obtained by the residual convolution operation of the original image signal matrix, and processed to obtain the final output;

[0009] The final output is input into the LSTM network model, and the output result of the model is input into the fully connected layer to obtain the final prediction result.

[0010] Preferably, the traffic network is undirected G = (V, E, A), where V is a finite set of nodes, E represents a set of edges of connectivity between nodes, A represents an adjacency matrix of the graph G, and element A∈R N*N .

[0011] Preferably, the spatiotemporal dimension features include: hourly time dimension features, daily time dimension features, weekly time dimension features, holiday time dimension features, weather time dimension features and spatial dimension features.

[0012] Preferably, the spatiotemporal dimension features are input as the original image signal matrix into the spatiotemporal block for processing, including:

[0013] The spatiotemporal dimension features are used as the input image signal matrix, and weighted by the spatiotemporal convolution module to obtain a normalized temporal attention matrix and a normalized spatial attention matrix;

[0014] Combining the normalized spatial attention matrix with the adjacency matrix in the traffic network through the spatiotemporal attention module to adjust the influence weights between nodes;

[0015] The normalized time attention matrix is ​​applied to the original graph signal matrix for dynamic adjustment, and the time attention matrix is ​​combined with the original graph signal matrix to obtain a final input quantity, which is the graph signal matrix after considering the time attention adjustment.

[0016] Preferably, in the spatiotemporal convolution module, polynomial approximation is performed on the input image signal matrix based on Chebyshev polynomials.

[0017] Preferably, the spatiotemporal convolution module comprises:

[0018] Graph convolutional units in the spatial dimension: used to capture spatial dependencies from neighboring regions;

[0019] Graph convolutional units in the time dimension: used to capture temporal dependencies from neighboring time.

[0020] Preferably, the spatiotemporal dimension features are input as the original image signal matrix into the spatiotemporal block for processing, further comprising:

[0021] The final input is input into the spatiotemporal convolution module and combined with the result obtained by the residual convolution operation of the original image signal matrix. The combined result is normalized by layer normalization and ReLU activation function to obtain the final output.

[0022] Preferably, the LSTM network model includes:

[0023] Input gate: used to determine the information of traffic data showing significant changes in any time period in the input, and add the information to the unit state for storage, and dynamically adjust the information according to the new input, wherein the unit state is used to transmit and store information, and the standard of significant changes is obtained through model training;

[0024] Forget gate: used to evaluate irrelevant information in the current unit state and forget it;

[0025] A unit state updating unit: used to update the unit state based on the results of the input gate and the forget gate, retaining information about current traffic conditions, weather and holidays;

[0026] Output gate: used to determine the output quantity based on the information in the current cell state.

[0027] Preferably, the parameters of the LSTM network model are updated by a back-propagation algorithm.

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

[0029] (1) The present invention accurately predicts the traffic density and estimates the probability of congestion in the urban traffic network, thereby gaining in-depth insights into the complex relationships between intersections and roads, which not only helps improve the efficiency of traffic management, but also reduces or avoids the possibility of congestion.

[0030] (2) The present invention provides travelers with more accurate and convenient travel planning solutions by fully considering the time dynamics, thereby improving the efficiency of travelers and reducing unnecessary waiting and driving distance. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0032] Figure 1 A flow chart of vehicle flow prediction according to an embodiment of the present invention;

[0033] Figure 2 This is a flow chart of the ASTGCN spatiotemporal block of an embodiment of the present invention. DETAILED DESCRIPTION

[0034] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0035] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0036] Road congestion is closely related to traffic density. In the traffic detection stage, this method estimates the probability of congestion by predicting traffic flow and provides corresponding avoidance measures. In the traffic prediction stage, the spatial dimension characteristics of traffic flow and the time dimension characteristics of multiple scales are used as input to predict the traffic flow at the next moment. This method is based on the dynamic nonlinear characteristics of hours, days, weeks, holidays and weather. It not only comprehensively considers multiple periodic factors in time, but also considers the influence of non-adjacent nodes in space, thereby more comprehensively considering various situations of traffic flow.

[0037] This paper proposes a traffic prediction method based on comprehensive spatiotemporal characteristics, such as Figure 1 ,include:

[0038] Based on the traffic network, the spatiotemporal dimension features of the predicted road section are extracted, and the spatiotemporal dimension features are input into the spatiotemporal block as the original graph signal matrix for processing to obtain the final input volume, where the spatiotemporal block includes the spatiotemporal attention module and the spatiotemporal convolution module;

[0039] Specifically, the transportation network is defined as an undirected G = (V, E, A), where V is a finite set of nodes, E is a set of edges representing the connectivity between nodes, and A represents the adjacency matrix of the graph G, whose elements A∈R N*N In this model, the adjacency matrix A is used to represent the connectivity between nodes in the graph, where if there is an edge connecting two nodes, the element in the corresponding adjacency matrix is ​​1, otherwise it is 0.

[0040] The spatiotemporal attention module and the spatiotemporal convolution module together form a spatiotemporal block to process the relationship between a node and its neighborhood as well as the information and changes of the node at different time points. By stacking multiple spatiotemporal blocks, the model can further extract a larger range of dynamic spatial-temporal correlations.

[0041] The final input is combined with the result obtained by residual convolution operation of the original image signal matrix, and processed to obtain the final output;

[0042] The final output is input into the LSTM network model for training to obtain the training results;

[0043] LSTM learns long-term dependencies in time series through its gating mechanism; the parameters of the LSTM network are updated through the back-propagation algorithm to optimize the learning of long-term dependencies. The loss function considers the accuracy of traffic flow prediction and the accurate representation of external factors.

[0044] Input the training results into the added fully connected layer to obtain the final prediction results;

[0045] By adding a fully connected layer, the output of each component is guaranteed to have the same size and dimension as the predicted target.

[0046] Embodiment 1

[0047] Step 1: Extract hourly time dimension features, i.e., traffic flow changes a few hours before the next moment;

[0048] Step 2: Extract the daily time dimension features, that is, the traffic flow changes at the next moment in the previous few days;

[0049] Step 3: Extract weekly time dimension features, that is, the traffic flow changes at the same time of the same day in the previous weeks;

[0050] Step 4: Extract the holiday time dimension features, that is, the traffic flow changes at the next moment of the same holiday;

[0051] Step 5: Extract weather time dimension features, i.e., the traffic at the next moment under the same weather conditions;

[0052] Step 6: Extract spatial dimension features, that is, for the predicted road section, obtain the vehicle density information of the connecting road sections or intersections;

[0053] Step 7: The spatiotemporal attention module and the spatiotemporal convolution module together form a spatiotemporal block (e.g. Figure 2 ) to process the relationship between a node and its neighborhood as well as the information of the node at different time points and its changes. Multiple spatiotemporal blocks are superimposed. By stacking multiple spatiotemporal blocks, the model can further extract a larger range of dynamic space-time correlations;

[0054] Step 8: Take the extracted spatiotemporal dimension features as the input image signal matrix X, and weight them through the spatiotemporal attention module to obtain the normalized temporal attention matrix E′ and spatial attention matrix S′;

[0055] in:

[0056] X∈R( N*C*T ), where N represents N observation points, C represents three observation values ​​(flow, speed and time occupancy), and T represents T time steps of the input.

[0057] Step 9: In the graph convolution of the spatiotemporal convolution module, Chebyshev polynomials are used to perform polynomial approximation on the adjacency matrix A. In graph convolution, nodes are updated with information about their neighbors, and Chebyshev polynomials make this update not only based on directly connected neighbors, but also take into account nodes in a wider neighborhood, providing the temporal convolution layer with node signals strengthened by spatial relationships.

[0058] Step 10: After the graph convolution operation, the normalized spatial attention matrix will be combined with the adjacency matrix A in the subsequent S′ graph convolution to dynamically adjust the influence weights between nodes.

[0059] The normalized temporal attention matrix E′ is directly applied to the input matrix X, dynamically adjusting the input, combining the temporal attention matrix with the original graph signal matrix, and weighting the original signal to reflect the importance of the temporal dimension to obtain the final input The final input obtained by the model at this time It is a feature representation that has taken into account the importance of spatial and temporal dimensions.

[0060] Step 11: Adjusted Input Data It is fed into the spatiotemporal convolution module.

[0061] The spatiotemporal convolution module consists of graph convolution in the spatial dimension and convolution in the temporal dimension, aiming to capture both spatial dependencies from neighboring regions and temporal dependencies from neighboring times.

[0062] Will Combined with the result x_residual obtained by a residual convolution operation on the original data input matrix X, and finally processed by layer normalization and ReLU activation function, the final output is obtained. Combining the residual information with the output of spatiotemporal convolution allows the spatiotemporal block network model to retain the original information of the input data and learn the complex dependencies of the data in the spatial and temporal dimensions, thereby generating more accurate prediction results.

[0063] Step 12: The feature matrix after spatiotemporal block processing and the feature encoding of external factors such as weather conditions and holidays will become the input of the next network model LSTM. This matrix contains the spatial and temporal features of traffic data. It further integrates global information and captures long-term dependencies in time series;

[0064] Step 13: At each time step, the LSTM unit receives the current input features (including traffic data and external features) and the hidden state of the previous time step.

[0065] State updates and gate operations:

[0066] Input gate: It is used to determine the important information that traffic data in a certain period of time in the input volume shows significant changes, add the important information to the unit state for storage, and dynamically adjust the information according to the new input;

[0067] The input gate first calculates a gating signal obtained by a sigmoid activation function. This signal determines the importance of each data point (0, 1). The standard of significant change is learned by the model during training.

[0068] Each LSTM unit contains a cell state, which is responsible for transmitting and storing information in LSTM so that the network can better capture and remember key information when processing long sequences.

[0069] Forget gate: evaluates which information in the current cell state is no longer relevant, for example, if the weather changes suddenly, the old weather information should be forgotten.

[0070] Cell state update: Based on the results of the input gate and the forget gate, the cell state is updated to retain information about current traffic conditions, weather, and holidays.

[0071] Output gate: determines what information based on the current cell state should be used to generate the output at the current time step.

[0072] Step 14: Update the parameters of the LSTM network through the back-propagation algorithm to optimize the learning of long-term dependencies. The loss function considers the accuracy of traffic flow prediction and the accurate representation of external factors. Finally, add a fully connected layer to ensure that the output of each component has the same size and dimension as the prediction target.

[0073] Step 15: Since different time periods have different impacts on regional traffic flow, it is necessary to perform weighted fusion on the outputs of the five spatiotemporal blocks of hours, days, weeks, weather, and holidays to form the final prediction results.

[0074] The present invention accurately predicts the traffic density and estimates the probability of congestion in the urban traffic network, thereby providing a deep insight into the complex relationship between various intersections and roads. This not only helps to improve the efficiency of traffic management, but also reduces or avoids the possibility of congestion; by fully considering the time dynamics, it provides travelers with more accurate and convenient travel planning solutions, thereby improving the efficiency of travelers and reducing unnecessary waiting and driving distance.

[0075] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A traffic prediction method based on comprehensive spatiotemporal characteristics, characterized in that: include: Based on the traffic network, extract the spatiotemporal dimension features of the predicted road section, and input the spatiotemporal dimension features as the original graph signal matrix into the spatiotemporal block for processing to obtain the final input volume, wherein the spatiotemporal block includes a spatiotemporal attention module and a spatiotemporal convolution module; The traffic network is undirected. ,in, is a finite set of nodes, The set of edges representing the connectivity between nodes, Representation diagram The adjacency matrix of ; The spatiotemporal dimension features include: Hourly time dimension features, i.e., traffic flow changes a few hours before the next moment; Daily time dimension features, i.e., the traffic flow changes at the next moment in the previous few days; Weekly time dimension features, i.e., the traffic flow changes at the same time of the same day in the previous weeks; Holiday time dimension features, that is, the traffic flow changes at the next moment of the same holiday; Weather time dimension features, i.e., traffic at the next moment under the same weather conditions; Spatial dimension features, that is, for the predicted road section, obtain the vehicle density information of the connecting road sections or intersections; The spatiotemporal dimension features are input as the original image signal matrix into the spatiotemporal block for processing, including: The spatiotemporal dimension features are used as the input image signal matrix, and weighted by the spatiotemporal convolution module to obtain a normalized temporal attention matrix and a normalized spatial attention matrix; Combining the normalized spatial attention matrix with the adjacency matrix in the traffic network through the spatiotemporal attention module to adjust the influence weights between nodes; Applying the normalized time attention matrix to the original image signal matrix for dynamic adjustment, combining the time attention matrix with the original image signal matrix to obtain a final input amount, wherein the final input amount is the image signal matrix after considering the time attention adjustment; In the spatiotemporal convolution module, a polynomial approximation is performed on the input image signal matrix based on Chebyshev polynomials; The spatiotemporal convolution module comprises: Graph convolutional units in the spatial dimension: used to capture spatial dependencies from neighboring regions; Graph convolutional units in the time dimension: used to capture temporal dependencies from neighboring times; The spatiotemporal dimension features are input into the spatiotemporal block as the original image signal matrix for processing, and further include: The final input is input into the spatiotemporal convolution module, and combined with the result obtained by the residual convolution operation of the original image signal matrix, and the combined result is normalized by layer normalization and ReLU activation function to obtain the final output; The final input is combined with the result obtained by the residual convolution operation of the original image signal matrix, and processed to obtain the final output; The final output is input into the LSTM network model, and the output result of the model is input into the fully connected layer to obtain the final prediction result; Among them, since different time periods have different impacts on regional traffic flow, it is necessary to perform weighted fusion on the outputs of the five spatiotemporal blocks of hours, days, weeks, weather, and holidays to form the final prediction result; The LSTM network model includes: Input gate: used to determine the information of traffic data showing significant changes in any time period in the input, and add the information to the unit state for storage, and dynamically adjust the information according to the new input, wherein the unit state is used to transmit and store information, and the standard of significant changes is obtained through model training; Forget gate: used to evaluate irrelevant information in the current unit state and forget it; A unit state updating unit: used to update the unit state based on the results of the input gate and the forget gate, retaining information about current traffic conditions, weather and holidays; Output gate: used to determine the output quantity based on the information in the current cell state; The parameters of the LSTM network model are updated through the back-propagation algorithm.