CN109993970B - Urban area traffic accident risk prediction method - Google Patents
Urban area traffic accident risk prediction method Download PDFInfo
- Publication number
- CN109993970B CN109993970B CN201910199664.8A CN201910199664A CN109993970B CN 109993970 B CN109993970 B CN 109993970B CN 201910199664 A CN201910199664 A CN 201910199664A CN 109993970 B CN109993970 B CN 109993970B
- Authority
- CN
- China
- Prior art keywords
- traffic
- time
- traffic accident
- future
- historical
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
- G08G1/0125—Traffic data processing
- G08G1/0129—Traffic data processing for creating historical data or processing based on historical data
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
- G08G1/0137—Measuring and analyzing of parameters relative to traffic conditions for specific applications
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Analytical Chemistry (AREA)
- Chemical & Material Sciences (AREA)
- Theoretical Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Computational Linguistics (AREA)
- Biomedical Technology (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Traffic Control Systems (AREA)
Abstract
The invention discloses a method for predicting urban area traffic accident risks, which adopts an encoder-decoder deep learning framework with a space-time attention mechanism to accurately predict the future traffic accident risks. On the basis of a large amount of multi-source heterogeneous data related to the traffic accident, the risk of the future traffic accident is more effectively and accurately predicted by fusing the multi-source heterogeneous data; the main data set is traffic accident volume and traffic flow of different vehicles, and the external data is external environment data such as weather, street design and the like; the scheme of the invention provides a space-time attention mechanism, which can simultaneously grasp the space-time characteristics of local and global regions, not only improves the accuracy of the model, but also improves the interpretability of the model, and finally can read the importance degree of different influence factors on the predicted value through the attention value. The framework provided by the invention can be expanded to other similar space-time data fields and has universality value.
Description
Technical Field
The invention belongs to the technical field of data mining.
Background
Along with the rapid development of urbanization and the realization of road motorized progress, the life of people is more convenient. Meanwhile, the explosive growth of motor vehicles puts great pressure on the government traffic control, and a series of social safety problems such as traffic jam, air pollution and traffic accidents are caused. According to the "global road safety situation report" published in 2015 by the world health organization, every year, road traffic accidents cause about 130 million deaths worldwide, 2000 to 5000 million people suffer non-fatal injuries. Road traffic accidents are a major cause of death in all age groups. Therefore, it is important to accurately and effectively predict the number of traffic accidents in each area of the city in a future period of time to reduce the number of traffic accidents. Government and city managers can artificially regulate and control police strength, assist in the investigation of hidden dangers of local traffic accidents and reduce the possibility of traffic accidents. Urban design and planning personnel can obtain important influence factors of high-risk road sections, and traffic accidents are fundamentally reduced through new urban road planning. In addition, by knowing the risk of future traffic accidents, a safer scheme and route can be selected for the individual trip.
Through the search of the existing patents and the related technologies, the existing methods related to the traffic accident risk prediction are as follows:
(1) chenfei, Wang Rui jin, Likei and the like, a multidimensional-factor-based expressway traffic accident analysis and prediction method, CN108417033A and 2018. The method mainly models multidimensional factors influencing highway traffic accidents and a prediction model of the traffic accidents. The method establishes a Bayesian network for the multidimensional influence factor data to obtain the influence probability of each factor on the traffic accident, and the probability is used as a prediction model.
(2) Zhao billows, Cheng hui ling, Mao Tianqi and the like, a traffic accident prediction method based on PCA and BP neural networks, CN108510126A and 2018. Constructing a traffic accident prediction model based on PCA and BP neural networks, importing a traffic accident data set in the Internet of vehicles into the model, and screening out a characteristic vector of the traffic accident data set by the model; then, performing decorrelation processing on the feature vectors by using the PCA to obtain a preset number of linearly independent features in the feature vectors; and inputting the linearly independent features into the BP neural network for training.
(3) xu-Cheng, Liu Pan, Wangwu, and a prediction method of expressway real-time traffic accident risk based on discriminant analysis, CN102360525A, 2012. The method substitutes the real-time traffic flow characteristic parameters into the expressway accident risk judging model to judge whether the risk of the traffic accident exists or not.
The examination of the prior documents reveals that the existing method has the following defects: (1) the method mainly comprises the steps of manually extracting features related to traffic accidents, wherein feature data are mainly related to vehicles, and establishing corresponding probability models; (2) most methods establish a model aiming at a specific road section, and lack of traffic accident prediction of urban areas; (3) when a traffic accident model of a specific area is modeled, the traffic volume of surrounding areas and the space-time influence of the traffic accident are not considered.
Therefore, in the scheme of the invention, a plurality of kinds of heterogeneous data are collected, including external data such as traffic accident volume data, flow data of various vehicles and road and weather data, and the purpose is to accurately predict the traffic accident risk of different areas of a city at a future time by utilizing multi-source heterogeneous data related to traffic and considering the space-time influence of different areas.
Herein, the traffic accident data and the traffic flow data are collectively referred to as traffic indexes. It is really very complex to model traffic indicators and external environmental features across all areas of history to predict future traffic risks. There are several major difficulties:
(1) regional internal timing effects: in the same area, different traffic indexes have different influences on the traffic accident risk, and the influences can dynamically change based on time. We need a component to model the local spatio-temporal feature impact.
(2) Outer zone timing effects: traffic indexes of other areas have influence on the traffic accident of the current area, and the influence also dynamically changes along with time. We need a component to model the spatio-temporal feature impact of different regions globally.
(3) The influence of environmental factors. Although the traffic accident risk situation is mainly related to the traffic volume, factors such as weather, temperature, holidays and the like also easily cause the traffic accident emergency situation. For example, the tire burst is easily caused by overhigh temperature in summer, traffic accidents are caused, the traffic accidents are reduced in rainy days, and the like. Therefore, a component is needed to integrate the impact of external environmental factors on the risk of regional traffic accidents.
In order to solve the above problems, we propose a spatiotemporal attention deep learning framework for solving traffic accident risk prediction, and our main contributions are as follows:
1) for the regional traffic risk time series prediction problem, traffic flow data which are important factors influencing the occurrence of traffic accidents are subdivided for the first time, the traffic flow data are subdivided into traffic flow data of various vehicles, and the influence of different traffic flows is dynamically modeled.
2) For the regional traffic risk prediction problem, the encoder-decoder based attention mechanism is used for the first time to fit spatiotemporal features. Specifically, a temporal attention mechanism and a spatial attention mechanism are used, and the spatial attention mechanism includes a local spatial attention and a global spatial attention. The local space attention is used for fitting the importance of different traffic indexes in the area to the traffic accident in the current area; the global space attention is the importance of fitting traffic indexes of different areas to the traffic accident risk of the current area; temporal attention is used to model the dynamic dependence of different time instants in the future and different time instants in the history.
3) An external feature fusion component is designed to obtain external environment features, and accuracy of predicting future traffic accident risks is enhanced.
Meanwhile, the method aims to mine the relevance in the data as much as possible, the influence of multi-source heterogeneous data is fused, the prediction performance of the space-time data is improved, the provided framework can be applied to the traffic field and can also be extended to other space-time data fields containing the multi-source heterogeneous data, and the universality of the method is improved. Therefore, the regional traffic accident risk prediction method provided by the invention has higher research significance and application value. In view of the above stated difficulties in predicting traffic risks, the present invention aims to provide a more efficient, more accurate solution and to overcome the drawbacks of the prior art.
Disclosure of Invention
The invention aims to construct a learning framework based on a deep space-time attention mechanism to predict urban area traffic accident risks. The encoder-decoder with space-time attention in deep learning is utilized, and the space-time characteristics of different areas in data can be acquired simultaneously, so that the prediction accuracy of the traffic accident risk is improved, and the prediction error is reduced. And an external feature component is added at the end of the model, so that the influence of external environment features can be fused, and the prediction is more accurate. Meanwhile, the end-to-end frame design can improve the prediction speed of the model, so that the prediction process is simpler and more effective. The method can solve the problem of actual traffic accident risk prediction and can be expanded to other space-time related fields.
The purpose of the invention is realized by the following technical scheme:
step one, inputting a model: counting multi-source heterogeneous data related to traffic accidents according to time dimension and space dimension
(1) Dividing a target city into sub-regions according to a traffic administrative region, and counting traffic flow and traffic accident amount of different vehicle types of the sub-regions at historical time; taking the traffic flow and traffic accident volume data of different vehicle types as the ith area ziMultiple traffic indexes ofnIIs the number of traffic indicators.
(2) Setting the time window size T, wherein 1 hour, 2 hours or 1 day can be selected;
(3) under a fixed time window T, the area ziThe data of the adjacent historical p timestamps are superposed together according to time sequence, and a region z is formediA local segment of historical traffic index sequenceWhereinRepresenting region ziWith the current time t0Historical traffic indicator vector t ∈ [0, p-1 ] from t timestamps];
(4) Under the time window T in the step (3), the data of the historical p timestamps adjacent to the region set Z are sequentially superposed according to time to form a global historical traffic index sequenceWherein Z ═ { Z ═1,z2,…,zmAnd m is the number of regions,representing all m regions and the current time t0Historical traffic indicator vector t ∈ [0, p-1 ] from t timestamps]。
Step two, the encoder: learning local temporal variations and temporal and spatial effects of surrounding areas
We predict the region z according to the traffic index vector of the first p timestamps obtained in step oneiTraffic accident risk of q timestamps in the future. The basic deep learning framework is an encoder-decoder, the encoder is used for encoding historical traffic indexes at p moments, and the decoder is used for decoding and generating traffic accident risks at q moments in the future. Wherein the basic unit of the encoder uses several gated cyclic units (GRUs) that can model long-term time dependence. The specific steps of the encoder stage are as follows:
(1) obtaining weighted local inputUsing a local spatial attention mechanism, the importance of the future traffic accident risk to the locally different traffic indicators is obtained, t ∈ [ t for each historical timestamp t0-(p-1),t0]Computing the t-th hidden layer unit input h of the encodert-1Local traffic index vector at time tCoefficient of importanceThereby obtaining weighted local input
(2) Obtaining weighted global inputsUsing a global spatial attention mechanism, the importance of future traffic accident risk and globally different regional traffic indicators is obtained for each historical timestamp t, t ∈ [ t0-(p-1),t0]Computing the t-th hidden layer unit input h of the encodert-1Traffic index vector of all regions at time tCoefficient of importanceNext, the traffic index vector of all regions is calculatedUsing Conv1 x 1 component to perform dimensionality reduction processing to obtain traffic index vectors of all regions subjected to dimensionality reductionFinally, we get a weighted global inputThus we get the full spatial input at each instant t
Step three, a decoder: timing prediction using temporal attention mechanism and extrinsic features
The decoder stage generates predicted values of traffic accident risks at q moments in the future, and simultaneously, external environment characteristics are integrated, so that the prediction accuracy is improved. The basic unit of the decoder is also the use of several gated cyclic units (GRUs) that can model the long-term time dependence. The specific steps of the decoder stage are as follows:
(1) establishing historical and future relation by using a time attention mechanism, namely establishing hidden layer unit output h of each historical moment t in the encodertAnd hiding the layer unit input d at each time t' in the future in the decodert′-1Attention value of (gamma)tWherein, t ∈ [ t0-(p-1),t0]. Then the value e of the decoder staget′Namely the context information of the hidden layer unit at the t' th time of the decoder,the method can help the model to better learn the dynamic influence of historical moments on future moments.
(2) Fusing external environment characteristics: when the decoder predicts the traffic accident risk at each future moment, external features such as road design, weather, time, POI interest points and area IDs need to be combined. And performing One-hot unique coding and numerical feature normalization processing on the category features in the features. Then, all the external features are coded by using an embedded layer to obtain the external feature input at the final future time t
(3) The predicted value at the t' -1 th timeContext information e at time tt′And external featuresAnd inputting the three parts of data into a neural unit GRU at the t 'th moment of a decoder to obtain the traffic accident risk at the t' th moment in the future.
(4) Repeating the process of (3), we can obtain the area ziTraffic accident risk values at q moments in the future.
Compared with the prior art, the invention has the advantages and effects that:
(1) the invention provides a traffic accident risk prediction framework based on deep learning. The frame is end-to-end, and a user only needs to collect a data set related to a traffic accident and process the data set into the method without manually extracting features, so that a final prediction result can be obtained; (2) according to the method, a large amount of multi-source heterogeneous data related to traffic accidents are collected, the main data sets are traffic accident amount and traffic flow of different vehicles, the external data are external environment data such as weather and street design, and the risk of future traffic accidents is predicted more effectively and accurately by fusing the multi-source heterogeneous data; (3) the invention designs a space-time attention mechanism which can simultaneously grasp the space-time characteristics of local and global regions, thereby not only improving the precision of the model, but also improving the interpretability of the model, and reading the importance degree of different influence factors on a predicted value through the attention value; (4) the framework provided by the invention can be expanded to other similar space-time data fields, and has universality value.
Drawings
Fig. 1 is a schematic view of a traffic accident risk prediction framework according to the present invention.
FIG. 2 is a table comparing models of embodiments of the present invention.
Detailed Description
The invention is described in further detail below in connection with real traffic data in the new york area.
1. Data source
(1) Vehicle crash data. Vehicle crash data we obtained from the new york police department. This data contains every traffic record on the shelf from 2012 to 2018. This data set includes, in addition to basic information about time, place, street, etc., the type of vehicle at issue and the primary cause of the crash.
(2) Vehicle travel data. We obtained car travel data from the new york taxi and limousine committee, which contained 2009 to date motor vehicle travel records, each record containing the precise geographic coordinates of getting on and off the car and the time to get on and off the car. The specific motor vehicle comprises three vehicles, namely a yellow taxi, a green taxi and a net appointment taxi. The main service ranges of yellow and green taxis are differentiated, and yellow taxis can carry passengers anywhere in five big areas of new york. Green taxis are then defined to allow only boarding in shanghanton, bronx, queen and startengtai, so that the two taxis reflect different travel patterns. The network appointment vehicle refers to a vehicle which is reserved through the internet, and the network appointment vehicle is commonly provided with a Uber, a Lyft and the like.
(3) Data of a bicycle with flag. The bicycle travel data comprise each riding data of New York from 7 months of 2013 to date, and the included data dimensions are mainly starting point coordinates, starting point time, ending point coordinates, time spent and the like.
(4) And dividing taxi regions into data. We use the taxi's zoning as the standard for all data division, since the traffic accident data is mainly motor vehicle accidents, here the default bike's zoning is consistent with taxi's zoning.
(5) Weather data. The weather data is from a national weather data center. The data dimensions include date and time, station longitude and latitude, temperature, humidity, visibility, wind direction, weather and the like.
(6) Road design data. The road design data come from the new york open data center and include speed limit values of streets, whether bicycle priority lanes are included, whether left turn signal lamps are included, and the like.
(7) POI data. POI data represents the point of interest data, also from the New York public data center, including the longitude and latitude coordinates of points of interest such as schools, shopping malls, gourmet, entertainment and sports.
2. The detailed steps of the urban area traffic accident risk prediction framework are as follows:
step one, inputting a model: counting multi-source heterogeneous data related to traffic accidents according to time dimension and space dimension
(1) Dividing the New York area into 256 sub-areas according to a traffic administrative area, and counting traffic flow and traffic accident volume of different vehicle types of each sub-area at historical time, wherein the specific vehicle types include four types of yellow taxis, green taxis, network appointment vehicles and bicycles; taking the traffic flow and traffic accident volume data of different vehicle types as the ith area ziMultiple traffic indexes of nIIs the number of traffic indicators, nI=5。
(2) Setting a time window size T, wherein T is 1 hour;
(3) under a fixed time window T, the area ziThe data of adjacent historical 12 hours are superposed together according to time sequence, and a region z is formediOf a local segmentHistorical traffic index sequenceWherein Representing region ziWith the current time t0Historical traffic index vector t ∈ [0,11 ] t hours];
(4) Under the time window T in the step (3), data of 12 hours of histories adjacent to all the area sets Z are sequentially superposed according to time, and a global historical traffic index sequence is formedWherein Z ═ { Z ═1,z2,…,zmAnd m is the number of regions,representing all m regions and the current time t0Historical traffic index vector t ∈ [0, p-1 ] t hours]。。
Step two, the encoder: learning local temporal variations and temporal and spatial effects of surrounding areas
Predicting the area z according to the traffic index vector of the first 12 hours obtained in the step oneiQ are the traffic accident risks in the future. The basic deep learning framework is an encoder-decoder, the encoder is used to encode historical traffic metrics for p time instants, and the decoder is used to decode traffic accident risk that generates q time instants in the future, where q is 12. Wherein the basic unit of the encoder uses several gated cyclic units (GRUs) that can model long-term time dependence. The specific steps of the encoder stage are as follows:
(1) obtaining weighted local inputUsing local spatial attentionFor each historical timestamp t, t ∈ [ t0-(p-1),t0]Computing the t-th hidden layer unit input h of the encodert-1Local traffic index vector at time tCoefficient of importanceWherein, the jth traffic indexThe importance coefficient calculation formula is as follows:
(2) Obtaining weighted global inputsUsing a global spatial attention mechanism, the importance of future traffic accident risk and globally different regional traffic indicators is obtained for each historical timestamp t, t ∈ [ t0-(p-1),t0]Computing the t-th hidden layer unit input h of the encodert-1All m regional traffic index vectors at t moment Of importance coefficient, hereN comprising m regionsIThe traffic index information can be calculated according to the region and the index, and the region type importance coefficients can be generated respectivelyAnd index-type importance coefficientCorrespondingly obtaining two global input regional global inputsAnd index type global input
First, we calculate the region type importance coefficient βtThe kth region type importance coefficientThe calculation formula of (a) is as follows:
by aiming at traffic index vectors of all regionsUsing Conv1 x 1 component to perform dimensionality reduction processing to obtain traffic index vectors of all regions subjected to dimensionality reductionFurther obtain the first global input, regional global input
Similarly, we calculate the index-type importance coefficient etThe importance coefficient of the I < th > index typeThe calculation formula of (a) is as follows:
similarly, by applying traffic index vector to all regionsUsing Conv1 x 1 component to perform dimensionality reduction processing to obtain new traffic index vectors of all regions subjected to dimensionality reductionFurther obtain a second global input, a regional global inputCombining the two global inputs, we get the final global input
Step three, a decoder: timing prediction using temporal attention mechanism and extrinsic features
The decoder stage generates predicted values of traffic accident risks at q moments in the future, and simultaneously, external environment characteristics are integrated, so that the prediction accuracy is improved. The basic unit of the decoder is also the use of several gated cyclic units (GRUs) that can model the long-term time dependence. The specific steps of the decoder stage are as follows:
(1) establishing historical and future relation by using a time attention mechanism, namely establishing hidden layer unit output h of each historical moment t in the encodertAnd hiding the layer unit input d at each time t' in the future in the decodert′-1Attention value of (gamma)tWherein, t ∈ [ t0-(p-1),t0]. t' time t th time attention valueThe calculation formula is as follows:
then the value e of the decoder staget′Namely the context information of the hidden layer unit at the t' th time of the decoder, the method can help the model to better learn the dynamic influence of historical moments on future moments.
(2) Fusing external environment characteristics: when the decoder predicts the traffic accident risk at each future moment, external features such as road design, weather, time, POI interest points and area IDs need to be combined. And performing One-hot unique coding and numerical feature normalization processing on the category features in the features. Then, all the external features are coded by using an embedded layer to obtain the external feature input at the final future time t
(3) The predicted value at the t' -1 th timeContext information e at time tt′And external featuresAnd inputting the three parts of data into a neural unit GRU at the t 'th moment of a decoder to obtain the traffic accident risk at the t' th moment in the future.
(4) Repeating the process of (3), we can obtain the area ziTraffic accident risk values at 12 moments in the future.
3. Results of the experiment
3.1 Experimental setup
(1) Data set partitioning: we predict the traffic accident risk for the future 12 hours based on historical 12 hours of traffic accident data, traffic flow data and some other external data. Therefore, we processed both the data in the training set and the test set into a sequence of 24 time slices (12 time slices as input for training, and another 12 time slice data as labels). Our entire data set (1 year and half, 13104 hours, 265 regions) was transformed into 3,472,548 pieces of data. All data was divided into three parts, the first part, 2017 data, was used as a training set. The second part, 2018 month 1-2 data is used as verification set; the third section, data from 3-6 months 2018, was used as a test set. As shown in the previous sections, we use an encoder-decoder framework with a spatiotemporal attention mechanism to predict the traffic accident risk for 3-6 months in 2018 for each region.
(2) Evaluation indexes are as follows: we use MSE (mean Square error) to minimize the prediction valueAnd true value yrealThe error between. We also used RMSE (root mean square error) and MAE (mean absolute error) to evaluate our predictions.
The formula for the three evaluation indices is as follows:
(3) basic model: to compare the effects of our proposed model, we used several models as follows as the basic model. (a) HA historical mean. And taking the average number of traffic accidents per hour in different areas in the training set as a predicted value. (b) LR is input from local historical traffic accident risk data, and the historical data is divided into three time dimensions, namely time proximity, time periodicity and time trend. Therefore, the traffic accident amount in the first 10 hours, the accident amount in the same hour every week in the first 4 weeks and the accident amount in the same hour every day in the first 7 days of the area are taken. (c) LSTM refers to a long short-term memory network, trained using a two-layer LSTM network. (d) Xgboost is a machine learning function library of a gradient lifting algorithm, and a tree model fusion mode is adopted. Three characteristics such as traffic accidents, traffic flow and external characteristics are extracted. (e) Seq2seq. use an LSTM layer encoding input to generate a context feature, and then use this context feature and another LSTM layer to decode the prediction value.
3.2 Experimental results and analysis
In this section, we compare our model with the basic model. For fairness, we show the best results for each model. The experimental result is shown in fig. 2, the LR result is better than the HA result, which indicates that the traffic accident not only HAs obvious periodicity, but also the traffic accident in the near time can reflect the real situation in the future. LSTM is better than LR, which means that the RNN structure with memory unit can capture the relation between different time slices before and after processing the time sequence problem. The lower error of Seq2Seq than LSTM depends on the setting of the decoder structure, and the structure of Seq2Seq has better performance in long-term prediction. The Xgboost model is only inferior to the model provided by people, and the traffic accident risk is not only influenced by the historical data of the Xgboost model, but also the traffic flow data and external factors have important contribution to the accurate prediction of the traffic accident. The model provided by the inventor obtains the best result in three indexes of MSE, RMSE and MAE, and great improvement is obtained because the model can well capture the dynamic influence of three aspects of local traffic indexes, other regional traffic indexes, external factors and the like on the future traffic accident risk.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The scope of the invention is indicated by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.
Claims (1)
1. A method for predicting urban area traffic accident risk comprises the following steps:
step one, inputting a model: counting multi-source heterogeneous data related to traffic accidents according to time dimension and space dimension
(1) Dividing a target city into sub-regions according to a traffic administrative region, and counting traffic flow and traffic accident amount of different vehicle types of the sub-regions at historical time; taking the traffic flow and traffic accident volume data of different vehicle types as the ith area ziMultiple traffic indexes ofnIIs the number of traffic indicators;
(2) setting a time window size T;
(3) under a fixed time window T, the area ziThe data of the adjacent historical p timestamps are superposed together according to time sequence to formRegion ziA local segment of historical traffic index sequenceWhereinRepresenting region ziWith the current time t0Historical traffic indicator vector t ∈ [0, p-1 ] from t timestamps];
(4) Under the time window T in the step (3), the data of the historical p timestamps adjacent to the region set Z are sequentially overlapped together according to time to form a global historical traffic index sequenceWherein Z ═ { Z ═1,z2,...,zmM is the number of regions,representing all m regions and the current time t0Historical traffic indicator vector t ∈ [0, p-1 ] from t timestamps];
Step two, the encoder: learning local time sequence change and the space-time influence of surrounding areas;
predicting the region z according to the traffic index vectors of the first p timestamps obtained in the step oneiTraffic accident risk of q timestamps in the future; the basic deep learning framework is an encoder-decoder, wherein the encoder is used for encoding historical traffic indexes at p moments, and the decoder is used for decoding and generating traffic accident risks at q moments in the future; wherein, the basic unit of the encoder uses a plurality of gating cycle units GRU which can model long-term time dependence; the specific steps of the encoder stage are as follows:
(1) obtaining weighted local inputObtaining future traffic accident wind by using local space attention mechanismImportance of risk to locally different traffic metrics, t ∈ t for each historical timestamp t0-(p-1),t0]Computing the t-th hidden layer unit input h of the encodert-1Local traffic index vector at time tCoefficient of importanceThereby obtaining weighted local input
(2) Obtaining weighted global inputsUsing global space attention mechanism to obtain the importance of future traffic accident risk and traffic indexes of different global regions, and for each historical time stamp t, t ∈ t0-(p-1),t0]Computing the t-th hidden layer unit input h of the encodert-1Traffic index vector of all regions at time tCoefficient of importanceNext, the traffic index vector of all regions is calculatedUsing Conv1 x 1 component to perform dimensionality reduction processing to obtain traffic index vectors of all regions subjected to dimensionality reductionFinally, a weighted global input is obtainedThis results in a total spatial input per time t
Step three, a decoder: using a temporal attention mechanism and a temporal prediction of external features;
the decoder stage generates predicted values of traffic accident risks at q moments in the future, and simultaneously, external environment characteristics are integrated, so that the prediction accuracy is improved; the basic unit of the decoder is also to use a plurality of gating cycle units GRU which can model long-term time dependence; the specific steps of the decoder stage are as follows:
(1) establishing historical and future relation by using the time attention mechanism, namely establishing hidden layer unit output h of each historical moment t in the encodertAnd hiding the layer unit input d at each time t' in the future in the decodert′-1Attention value of (gamma)tWherein, t ∈ [ t0-(p-1),t0](ii) a Value e of decoder staget′Namely the context information of the hidden layer unit at the t' th time of the decoder,the help model learns the dynamic influence of the historical moment on the future moment better;
(2) fusing external environment characteristics: when the traffic accident risk at each future moment is predicted in a decoder, external characteristics such as road design, weather, time, POI interest points, area IDs and the like need to be combined; adopting One-hot single-hot coding and numerical characteristic normalization processing for the category characteristics in the characteristics; then, all the external features are coded by using an embedded layer to obtain the external feature input at the final future time t
(3) The predicted value at the t' -1 th timeContext information e at time tt′And external featuresInputting the three parts of data into a gate control cycle unit GRU at the t 'moment of a decoder to obtain the traffic accident risk at the t' moment in the future;
(4) repeating the process of (3) to obtain the area ziTraffic accident risk values at q moments in the future.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910199664.8A CN109993970B (en) | 2019-03-15 | 2019-03-15 | Urban area traffic accident risk prediction method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910199664.8A CN109993970B (en) | 2019-03-15 | 2019-03-15 | Urban area traffic accident risk prediction method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109993970A CN109993970A (en) | 2019-07-09 |
CN109993970B true CN109993970B (en) | 2020-09-29 |
Family
ID=67129438
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910199664.8A Active CN109993970B (en) | 2019-03-15 | 2019-03-15 | Urban area traffic accident risk prediction method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109993970B (en) |
Families Citing this family (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110335478B (en) * | 2019-07-10 | 2021-01-12 | 江苏航天大为科技股份有限公司 | Cross-subarea linkage control method based on deep learning |
CN110570651B (en) * | 2019-07-15 | 2020-10-30 | 浙江工业大学 | Road network traffic situation prediction method and system based on deep learning |
CN110322695B (en) * | 2019-07-23 | 2020-10-09 | 内蒙古工业大学 | Short-term traffic flow prediction method based on deep learning |
CN111063194A (en) * | 2020-01-13 | 2020-04-24 | 兰州理工大学 | Traffic flow prediction method |
CN111383465B (en) * | 2020-03-23 | 2022-03-22 | 中交第一公路勘察设计研究院有限公司 | Highway danger early warning and speed control system based on car networking |
CN111710154B (en) * | 2020-05-15 | 2022-11-18 | 湖州师范学院 | Expressway traffic flow prediction method |
CN111524358B (en) * | 2020-05-22 | 2022-04-15 | 云南大学 | Regional radiation sexual communication flow prediction method |
CN112329106A (en) * | 2020-11-05 | 2021-02-05 | 深圳壹账通智能科技有限公司 | Road safety design method, system, computer equipment and readable storage medium |
CN112418081B (en) * | 2020-11-20 | 2023-09-29 | 南京森林警察学院 | Method and system for quickly surveying traffic accidents by air-ground combination |
CN113033780A (en) * | 2021-03-24 | 2021-06-25 | 西北大学 | Cloud platform resource prediction method based on double-layer attention mechanism |
CN112733818B (en) * | 2021-03-30 | 2021-08-13 | 深圳佑驾创新科技有限公司 | Attention mechanism-based vehicle lamp state identification method, device, terminal and medium |
CN112991743B (en) * | 2021-04-22 | 2021-10-08 | 泰瑞数创科技(北京)有限公司 | Real-time traffic risk AI prediction method based on driving path and system thereof |
CN113469407A (en) * | 2021-05-21 | 2021-10-01 | 北京市燃气集团有限责任公司 | Gas accident prediction method and device |
CN113283665B (en) * | 2021-06-10 | 2022-07-19 | 北京邮电大学 | Urban traffic accident risk prediction method based on road network |
CN113947902A (en) * | 2021-10-18 | 2022-01-18 | 上海海事大学 | Real-time traffic accident detection and early warning method based on Seq2Seq self-encoder model |
CN114333317B (en) * | 2021-12-31 | 2023-06-02 | 杭州海康威视数字技术股份有限公司 | Traffic event processing method and device, electronic equipment and storage medium |
CN114462313B (en) * | 2022-01-25 | 2024-04-16 | 青岛海信网络科技股份有限公司 | Traffic accident risk prediction method, device, equipment, medium and product |
CN115482665B (en) * | 2022-09-13 | 2023-09-15 | 重庆邮电大学 | Knowledge and data collaborative driving multi-granularity traffic accident prediction method and device |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3852019A1 (en) * | 2015-03-27 | 2021-07-21 | Equifax, Inc. | Optimizing neural networks for risk assessment |
CN105654729B (en) * | 2016-03-28 | 2018-01-02 | 南京邮电大学 | A kind of short-term traffic flow forecast method based on convolutional neural networks |
CN107180530B (en) * | 2017-05-22 | 2019-09-06 | 北京航空航天大学 | A kind of road network trend prediction method based on depth space-time convolution loop network |
CN108510126A (en) * | 2018-04-11 | 2018-09-07 | 南京邮电大学 | A kind of Predictive Methods of Road Accidents based on PCA and BP neural network |
CN108647834B (en) * | 2018-05-24 | 2021-12-17 | 浙江工业大学 | Traffic flow prediction method based on convolutional neural network structure |
-
2019
- 2019-03-15 CN CN201910199664.8A patent/CN109993970B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109993970A (en) | 2019-07-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109993970B (en) | Urban area traffic accident risk prediction method | |
CN108629978A (en) | A kind of traffic trajectory predictions method based on higher-dimension road network and Recognition with Recurrent Neural Network | |
CN106548645B (en) | Vehicle route optimization method and system based on deep learning | |
CN109697852B (en) | Urban road congestion degree prediction method based on time sequence traffic events | |
CN104318324B (en) | Shuttle Bus website and route planning method based on taxi GPS records | |
Chen et al. | Analysis of factors affecting the severity of automated vehicle crashes using XGBoost model combining POI data | |
Jang et al. | Evaluation of pedestrian safety: Pedestrian crash hot spots and risk factors for injury severity | |
Wang et al. | Fine-grained traffic flow prediction of various vehicle types via fusion of multisource data and deep learning approaches | |
Lin et al. | A spatial-temporal hybrid model for short-term traffic prediction | |
Kong et al. | RMGen: A tri-layer vehicular trajectory data generation model exploring urban region division and mobility pattern | |
CN112863182B (en) | Cross-modal data prediction method based on transfer learning | |
CN114692984B (en) | Traffic prediction method based on multi-step coupling graph convolution network | |
WO2022142418A1 (en) | Traffic performance index prediction method and device based on gis map information | |
CN114881356A (en) | Urban traffic carbon emission prediction method based on particle swarm optimization BP neural network optimization | |
CN115985104A (en) | Traffic flow prediction device, prediction method and prediction model construction method | |
CN115205965A (en) | Helmet detection method based on combination of improved YOLO _ X algorithm and attention module | |
CN116913088A (en) | Intelligent flow prediction method for expressway | |
CN115662113A (en) | Signalized intersection people-vehicle game conflict risk assessment and early warning method | |
Oliveira et al. | Bikeway: A multi-sensory fuzzy-based quality metric for bike paths and tracks in urban areas | |
Kong et al. | A fusion-based system for road-network traffic state surveillance: a case study of Shanghai | |
Zhang et al. | Spatio-temporal digraph convolutional network-based taxi pickup location recommendation | |
CN117218836A (en) | Urban planning project comprehensive management information platform based on smart city | |
Zhou et al. | Estimating capacity of bicycle path on urban roads in Hangzhou, China | |
CN110211380A (en) | A kind of highway congestion section detection method of multi-source traffic data fusion | |
CN114139773A (en) | Public traffic flow prediction method based on space-time graph convolutional network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |