Search

CN-116434569-B - Traffic flow prediction method and system based on STNR model

CN116434569BCN 116434569 BCN116434569 BCN 116434569BCN-116434569-B

Abstract

The invention discloses a traffic flow prediction method and a traffic flow prediction system based on STNR models, which comprise the steps of sorting historical traffic flow data of a target road section according to time sequence, dividing the historical traffic flow data into long-term data and short-term data to obtain a training set, constructing a traffic flow prediction model, taking the long-term data and the short-term data as input of the traffic flow prediction model, training the traffic flow prediction model, acquiring the traffic flow data of the target road section at the current moment, inputting the traffic flow data into the trained traffic flow prediction model, and predicting the traffic flow of a future period. The method effectively captures the spatial dependence and the time dependence of the traffic flow, and improves the prediction accuracy.

Inventors

  • LIN CHANGTING
  • HAN MENG
  • DAI QIANG
  • ZHANG LONGYUAN
  • REN QIANQIAN
  • JU ZHAOJIE
  • YU WEIPING
  • WANG BIN

Assignees

  • 浙江大学滨江研究院

Dates

Publication Date
20260512
Application Date
20221226

Claims (4)

  1. 1. A traffic flow prediction method based on STNR model, comprising: (1) The historical traffic flow data of the target road sections are ordered according to time sequence and divided into long-term data and short-term data to obtain a training set, wherein the short-term data Expressed as: ; Wherein, the Is the number of times the model is used, Representing the last period of time N represents the length of the time series; Long term data Expressed as: ; Wherein, the Is the first Of a cycle of Data of time; (2) Constructing a traffic flow prediction model, taking long-term data and short-term data as input of the traffic flow prediction model, and training the traffic flow prediction model, wherein the traffic flow prediction model comprises a full-connection layer, a long-term processing module, a time-space convolution module and a multi-layer perceptron module; The full connection layer extracts the long-term and short-term time characteristics of the long-term and short-term data respectively, and the long-term and short-term time characteristics are expressed as follows: ; ; Wherein, FC represents a full connection layer, and ReLU represents a ReLU function; , , And Is a learnable parameter; And Is that And Is a feature matrix of (1); The long-term and short-term processing module comprises a time convolution network unit and a long-term and short-term fusion unit, wherein the time characteristic of capturing long-term data through the time convolution network unit is expressed as follows: ; Wherein, the And Is a learnable parameter; representing temporal features of the extracted long-term data; the long-term and short-term fusion unit adopts the attention mechanism for fusion And Comprising: Will be And Conversion to attention vector And : ; ; Wherein, the A nonlinear activation function; 、 、 And Is a convolution operation; Multiplying the obtained attention vector and the input respectively, and then fusing the product result to obtain the following steps: ; Wherein, the Is a channel multiplication operator; Is a spatial multiplication operator, output Is a fusion time feature; the obtained fusion time characteristics are output to the space-time convolution module; the time-space convolution module comprises a gating circulation unit and a graph convolution unit, wherein the gating circulation unit takes the fusion time characteristic as input to capture the time dependence and the space dependence output of the input , And an adaptive adjacency matrix input based on an attention mechanism to a graph convolution unit output , Obtaining a prediction result after passing through the multi-layer sensor module; the multi-layer sensor module consists of two ReLU stacked layers with linear transformation; (3) And collecting traffic flow data of a target road section at the current moment, inputting the traffic flow data into a trained traffic flow prediction model, and predicting the traffic flow of a future period.
  2. 2. The method for predicting traffic flow based on STNR model as claimed in claim 1, wherein the time convolution network is a hole convolution network.
  3. 3. The traffic flow prediction method based on the STNR model according to claim 1, wherein when training the traffic flow prediction model, mean Absolute Error (MAE) is used as a training target: ; The result of the prediction is indicated, The true value is represented by a value that is true, Representing a model of the training process, Representing all the learnable parameters in the model.
  4. 4. A traffic flow prediction system based on STNR models is characterized by comprising the traffic flow prediction model which is constructed and trained according to claim 1, wherein the collected traffic flow data of a target road section at the current moment is input into the traffic flow prediction system to obtain a traffic flow prediction result of a future period.

Description

Traffic flow prediction method and system based on STNR model Technical Field The invention relates to the technical field of intelligent traffic, in particular to a traffic flow prediction method and system based on STNR models. Background With the continuous development of society, the number of motor vehicles in cities is increased, and the traffic jam phenomenon is also increased. For this reason, many countries solve the problem of traffic jam by developing an intelligent traffic system (IntelligentTransportationSystem, ITS), and solve such problem by decision and guidance of ITS, and fast and accurate traffic flow prediction is the key of ITS to make decision and guidance. The traffic information acquisition system in the Intelligent Traffic System (ITS) acquires information (such as traffic flow, vehicle speed and the like) by adopting a roadside acquisition unit, the information processing and analysis system analyzes and processes the acquired data, and the information release system provides an optimal path for people after statistical analysis and arrangement, so that traffic jam is avoided, and traffic pressure is relieved. The current information analysis and processing part utilizes the traffic flow prediction to achieve the purpose, so how to obtain accurate prediction information becomes a key step of the intelligent traffic system. Zhao et al propose a traffic flow data prediction method (Hamilton W,Ying Z,Leskovec J.Inductive representation learning on large graphs[C]Advances in Neural Information Processing Systems.2017:1024-1034.), based on LSTM that uses LSTM to extract temporal features of traffic flow data, resulting in temporal trends of traffic flow data. The method only can learn time characteristics, cannot extract spatial characteristics of traffic flow data, and is inaccurate in prediction of traffic flow due to incomplete data analysis. The evodia et al proposed a hybrid deep learning framework (Wu,H.Tan,Short-term traffic flow forecasting with spatial-temporal correlation in a hybrid deep learning framework.2016.), that included a CNN module and an LSTM module that used the CNN module and LSTM module, respectively, to extract different features of the data. And the CNN module extracts the spatial characteristics of the traffic flow data of the adjacent areas. The LSTM module extracts temporal features of the traffic flow data. And finally, combining the features extracted by the CNN module and the LSTM module to predict traffic flow data. The university of northern industries comprehensively considers time domain and space, and provides a long-period memory network (RNC-LSTM) based on road network relevance (Zhouming. Short-time traffic flow prediction method research [ D ] of northern industries university based on road network time-space information, 2020.) which obtains the time-space characteristic input of traffic data by calculating an association coefficient matrix through an abstract road network structure, and finally, the short-term prediction of traffic flow is carried out by fusing and constructing a prediction system. However, due to the characteristics of huge traffic flow information data scale, strong time-space dependence, obvious social correlation and the like, the time delay and the accuracy of traffic flow prediction are difficult to ensure. The reason is that the current traffic flow prediction method uses the traffic flow of the urban road flow of the road section adjacent to the space as an independent variable, utilizes the historical time sequence data to establish a prediction model, uses the change of the time dimension change as the independent variable, adopts the current most popular intelligent learning algorithm to perform prediction simulation, and lacks research and analysis of synchronizing the two dimensions of the time space, so that the reliable, real-time and accurate prediction of the urban road traffic condition is difficult to realize. Disclosure of Invention The invention provides a traffic flow prediction method and a traffic flow prediction system based on STNR model, which improve the accuracy of traffic flow prediction. The technical scheme of the invention is as follows: a traffic flow prediction method based on STNR model, comprising: The historical traffic flow data of the target road sections are ordered according to time sequence and divided into long-term data and short-term data, and a training set is obtained; The traffic flow prediction model is constructed, long-term data and short-term data are used as input of the traffic flow prediction model, and the traffic flow prediction model is trained, wherein the traffic flow prediction model comprises a full-connection layer, a long-term processing module, a space-time convolution module and a multi-layer perceptron module, the full-connection layer extracts long-term time characteristics and short-term time characteristics of the long-term data and the short-term data respe