| With the acceleration of urbanization,the gradual expansion of the scale of the traffic system and the increasing demand of citizens for travel,traffic accidents have become a public safety issue concerned by all countries in the world.Traffic accidents not only endanger human life safety,but also cause certain economic losses to the society.Therefore,if traffic accidents can be predicted effectively,it will have a positive effect on preventing accidents and reducing the losses caused by accidents.However,there are many factors affecting the occurrence of accidents,including not only temporal and spatial factors such as road structure,vehicle speed,traffic flow,weather and point of interest(POI)distribution,but also subjective factors such as drivers’ physical characteristics and driving behaviors.Therefore,it is still a challenging task to accurately predict accident risk under multiple influencing factors.Although relevant scholars have made a lot of research in the field of accident risk prediction,there is still room for improvement.Further research can be carried out from the following aspects:(1)With the development of deep learning,more and more advanced theories have been proposed,and the application of emerging research methods in the field of accident prediction may further improve the accuracy of prediction.(2)There are many factors affecting the accident,and only some studies can consider limited data.With the development of science and technology,data collection methods and equipment will be more advanced.The use of more abundant data sets for research will play a positive role in the prediction of accidents.(3)Accident samples are scarce data.In previous studies,most scholars did not consider the impact of accident sample imbalance on accident risk prediction.In view of the above problems,a gated spatial-temporal graph convolutional networks(GSTGCN)model based on graph convolutional neural network(GCN)and gated recurrent unit(GRU)is established in this paper to predict traffic accident risk.In this model,the spatial correlation between roads is extracted by GCN,the temporal correlation between environmental factors is extracted by GRU,and the spatial-temporal correlation is extracted by the composite module of GCN and GRU.In addition,the weighted loss function is designed to solve the zero-inflated issue.In order to verify the predictive performance of the network model,relevant data of Los Angeles and Houston in the United States traffic accident data set are selected to test the model.The experimental results show that the root mean square error,mean absolute error and recall rate of GSTGCN model are 4.17,2.21,0.813 and 5.94,3.26,0.794 respectively in the two cities,which is better than the existing statistical model,machine learning model and a variety of composite models.Finally,an ablation experiment was designed to remove each module,and it was verified that different modules of this model are helpful to improve the prediction accuracy.In addition,in order to surmount the error propagation problem that may occur when traditional recurrent neural network capture long-term dependence through gating mechanism,this paper proposes an improved Transformer(i-Transformer)model to predict traffic accident risk.A spatial Transformer module composed of the dynamic graph convolutional networks module and the static graph convolutional networks module is designed to capture dynamic and static spatial features.Meanwhile,a temporal Transformer module is designed to capture time features in accident data.Similarly,in an effort to solve the zero-inflated issue caused by the imbalance of accident samples,the weighted L2 loss function is introduced to assign different weights to different accident samples of different risk levels.In order to verify the prediction performance of the network model,Miami and Orlando in the traffic accident data set of the United States were selected as the research objects.The i-Transformer model is compared with a variety of existing models in terms of Precision,Recall and F1-score,and the average increases in the two cities are 18.1%,20.9%,19.5% and 21%,21.6%,21.3%,respectively.Finally,the ablation experiment is designed to verify that each module has a positive effect on improving the predictive performance of the model. |