As China’s economy continues to grow rapidly,traffic flow forecasting plays a crucial role in traffic management,road safety and public travel.At the same time,the increase in population and vehicles has also caused a series of social problems such as traffic congestion and environmental pollution.Traffic flow prediction is an important part of the intelligent transportation system,which ensures that the intelligent transportation system can achieve more efficient traffic control by predicting real-time road information.Accurate traffic flow prediction can provide traffic managers with a reasonable basis for traffic decision-making,and make public travel safer and more convenient,thereby alleviating related social problems.The highly nonlinear and dynamic spatiotemporal dependence of traffic flow data brings challenges to traffic flow prediction.The dependencies between spatiotemporal data extracted by most correlation models based on traffic flow prediction are static.Graph convolution-based models such as DCRNN(Diffusion Convolutional Recurrent Neural Network)and STGCN(Spatiotemporal Graph Convolutional Network)are highly dependent on predefined,static adjacency matrices to reflect spatial dependencies,while adjacency matrices represent traffic network graphs.Message passing reflects the dynamic changes of traffic flow in different situations,thus limiting the effect of the model.For the above problems,this dissertation proposes a spatiotemporal fusion model based on graph attention and a spatiotemporal attention network model.The main research contents are as follows:(1)According to the research on the spatiotemporal dependence of traffic data,this dissertation proposes a spatiotemporal fusion model based on graph attention.The method adopts a multi-head attention mechanism in the temporal module to capture the temporal correlation of the traffic flow;in the spatial module,graph attention network,multi-head attention mechanism and feedforward neural network are adopted to capture the spatial correlation of the traffic flow.Finally,temporal features and spatial features are fused through a gating mechanism to achieve short-term traffic flow prediction.Validation on real datasets shows that the model outperforms all baseline models on the MAPE metric,and the other two metrics also outperform most baseline models,proving the effectiveness of the model.(2)According to the fact that most models reflect spatial dependencies through a predefined,static adjacency matrix,this dissertation proposes a model based on spatiotemporal attention network(STformer).The model first extracts temporal features by gating recursive units;extracts global and local spatial features of traffic data in the encoder and decoder respectively,and finally fuses the spatial features in the decoder through multi-head attention.Finally,the learned spatiotemporal features are aggregated in a feedforward neural network for traffic flow prediction.Validation on Pe MS03 dataset and METR-LA dataset shows that the model and the baseline model show superiority in all indicators,and the prediction accuracy reaches 96.1% and93.3% respectively. |