With the acceleration of urbanization,the pressure of road traffic load is gradually increasing,and it is urgent to carry out scientific management and scheduling,and it is imperative to develop an intelligent transportation system(ITS).Traffic flow prediction is the basis of ITS,which aims to predict the future state of the road network based on information such as historical data in the traffic network.Real-time accurate traffic flow forecasts can provide future road conditions and are critical to traffic management.Traffic flow data has dynamic spatiotemporal correlation characteristics,which makes its accurate prediction challenging.Existing traffic flow prediction methods mainly focus on capturing the time series features of historical data,and lack of analysis of dynamic spatial correlation features in traffic networks,resulting in large deviations between prediction results and real values.Aiming at this problem,this thesis proposes to use graph convolutional network and spatiotemporal attention mechanism to predict traffic flow.The specific work is as follows:First,graph convolution is introduced to mine the spatial features of traffic flow data,and a spatiotemporal graph convolutional network model(GTCN)is constructed for the task of traffic flow prediction.The model contains multiple spatiotemporal graph convolutional layers composed of graph convolutional networks and gated temporal convolutional networks.Among them,graph convolutional networks are used to extract spatial features of traffic flow,and gated temporal convolutional networks are used to extract traffic flow.temporal characteristics.By stacking multiple spatiotemporal graph convolutional layers,spatiotemporal features at different temporal granularities can be effectively extracted at the same time,and the prediction accuracy can be improved.Then,on the basis of GTCN,a spatiotemporal attention mechanism is introduced,and a traffic flow prediction model(STAGTCN)based on the combination of spatiotemporal attention mechanism and graph convolution is designed.The model contains multiple spatiotemporal modules,each consisting of a spatiotemporal attention mechanism and a spatiotemporal graph convolutional network.Among them,the spatiotemporal attention mechanism is responsible for adjusting the mutual influence degree of spatiotemporal nodes for different scenarios,and the spatiotemporal graph convolutional network extracts the spatiotemporal features of the data based on the adjustment results of the spatiotemporal attention mechanism.Combining a spatiotemporal attention mechanism and a spatiotemporal graph convolutional network improves the prediction performance by effectively capturing the dynamic spatiotemporal features of the traffic flow.This thesis conducts prediction experiments on California highway dataset(Pe MSD7)and Shenzhen taxi GPS dataset(SZ-taxi),and uses MAE,MAPE and RMSE as evaluation indicators to compare the performance of the proposed model with commonly used baseline models.The experimental results show that the prediction effect of the GTCN model is better than other baseline models,and the prediction performance of STAGTCN is further improved than that of GTCN.Experiments show that the STAGTCN model proposed in this thesis can effectively mine the dynamic spatiotemporal characteristics of traffic flow data and improve the accuracy of prediction. |