CN113283665B - Urban traffic accident risk prediction method based on road network - Google Patents

Urban traffic accident risk prediction method based on road network Download PDF

Info

Publication number
CN113283665B
CN113283665B CN202110646085.0A CN202110646085A CN113283665B CN 113283665 B CN113283665 B CN 113283665B CN 202110646085 A CN202110646085 A CN 202110646085A CN 113283665 B CN113283665 B CN 113283665B
Authority
CN
China
Prior art keywords
accident
road
coarse
accident risk
road section
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
Application number
CN202110646085.0A
Other languages
Chinese (zh)
Other versions
CN113283665A (en
Inventor
赵东
马华东
宁静
罗丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN202110646085.0A priority Critical patent/CN113283665B/en
Publication of CN113283665A publication Critical patent/CN113283665A/en
Application granted granted Critical
Publication of CN113283665B publication Critical patent/CN113283665B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0635Risk analysis of enterprise or organisation activities
    • G06Q50/40

Abstract

A urban traffic accident risk prediction method based on a road network relates to the technical field of traffic accident risk prediction, solves the problems of space-time correlation and space heterogeneity, and comprises the following steps: establishing a mapping relation between an accident position and a road section; clustering the road sections according to the similarity between the road sections in the road section set to obtain coarse-grained regions and calculating the accident risk of the coarse-grained regions; fusing the long-term features and the short-term features and the weather features corresponding to the long-term features and the short-term features in the time dimension, and splicing the fused long-term features and short-term features after fusion; according to the external characteristics E of t moment to be predictedtObtaining importance weight of each historical time slice by adopting an attention mechanism; weighting and summing the spliced fusion data according to the weight to obtain a weighted and summed fusion result; and inputting the fusion result and the output result of the shunting module into a feature layer, and obtaining a predicted accident risk value by adopting an attention mechanism. The invention solves the problem of spatial heterogeneity, and gives consideration to the accuracy of prediction while dividing the space more finely.

Description

Urban traffic accident risk prediction method based on road network
Technical Field
The invention relates to the technical field of urban traffic prediction, in particular to a road network-based urban traffic accident risk prediction method.
Background
With the rapid development of urbanization, the rapid increase of the number of motor vehicles leads to frequent traffic accidents, causing casualties and huge economic losses, and therefore, predicting the risk of traffic accidents occurring in the future becomes urgent. However, it is difficult to accurately predict the risk of traffic accident occurrence, the time distribution of the traffic accident occurrence in day, week and month has large differences, and the accident risk is influenced by complex factors such as crowd density, traffic flow, weather, abnormal events and the like.
Early traditional machine learning methods mostly extracted road features: such as road shape, road speed, traffic flow on the road and the like, a statistical model is used for carrying out regression analysis on the number of traffic accidents occurring on the road, or road-level accidents are classified based on the characteristics so as to predict whether the accidents occur or not. The method comprises the following steps: random Forest, Decision Tree, Bayesian Network, etc. the specific implementation process is to select the features on the road by using a Random Forest method and send the features into a Decision Tree model or a Bayesian Network to obtain the final prediction result. The disadvantages of these methods are: the traffic accident prediction is carried out by adopting an oversimplified model, and the problems of spatial heterogeneity and time autocorrelation of the traffic accident are not considered.
And a part of machine learning methods are used for dividing the region into grids, a density estimation graph is established by using a KDE (kernel density estimation) method, and then K-means clustering is carried out to obtain the accident hotspot region. Another method uses Matrix factorization (Matrix decomposition) to decompose features in a grid into low rank matrices to infer traffic accident risk. As such, these methods only consider the spatial correlation of the incidents, lack temporal correlation, and do not model the spatio-temporal correlation well.
The method based on deep learning improves the problems, divides the area to be researched into grids, adopts CNN (convolutional neural network) to extract spatial features, adopts LSTM (long short term memory network) to extract temporal features, solves the problem of spatial heterogeneity of accident distribution by using a sliding window mode, and separately trains urban areas and rural areas. However, in terms of prediction accuracy, the partitioning dimension of the mesh is rough, and the prediction accuracy needs to be improved.
Disclosure of Invention
In order to solve the problem that the spatial-temporal correlation and the spatial heterogeneity of the existing method are not completely considered, the invention provides a road network-based urban traffic accident risk prediction method.
The technical scheme adopted by the invention for solving the technical problem is as follows:
a urban traffic accident risk prediction method based on a road network comprises the following steps:
step 1, establishing a mapping relation between an accident position and a road section according to the accident position and a road section set V to obtain a road section set with accident position information;
step 2, clustering and classifying road sections in the road section set with accident information according to the similarity between the road sections in the road section set to obtain a plurality of coarse-grained regions, and calculating accident risks of the coarse-grained regions according to the accident information of all the road sections in the coarse-grained regions;
step 3, obtaining long-term characteristics according to the historical long-term accident risk, and obtaining short-term characteristics according to the historical short-term accident risk;
step 4, fusing the long-term features and the weather features after normalization processing corresponding to the long-term features in a time dimension to obtain first fusion data, fusing the short-term features and the weather features after normalization processing corresponding to the short-term features in the time dimension to obtain second fusion data, and splicing the first fusion data and the second fusion data to obtain spliced fusion data;
step 5, according to the external characteristics E of the t moment to be predicted tObtaining the importance weight of each historical time slice by adopting an attention mechanism; performing weighted summation on the spliced fusion data according to the weight to obtain a fusion result after weighted summation;
step 6, inputting the fusion result into the feature layer, and fusing the output result of the shunting module in the result of the feature layer attention mechanism to obtain a predicted accident risk value YtThe shunting module takes historical average coarse-grained accident risk as input, and the output result is a shunted fine-grained accident risk result.
The beneficial effects of the invention are:
the invention relates to a city traffic accident risk prediction method based on a road network, which improves the accuracy of prediction while refining spatial dimensions by constructing a road network structure and considering the correlation among different road sections; the invention divides the space into fine-grained road sections, extracts the spatial characteristics of accident data through the graph network and solves the problem of spatial heterogeneity. According to the method, the area to be researched is divided into road sections in the spatial dimension, multi-source heterogeneous data and external characteristics are fused, the clustered coarse-grained accident risk is used for drainage, and the prediction accuracy is considered while the spatial division is finer. The invention combines the shunting module in the attention mechanism to shunt the coarse-grained accident risk, and can effectively solve the problem caused by uneven accident data samples. Based on the invention, accidents can be effectively prevented, the life and property loss caused by the accidents is reduced, and based on the invention, traffic planning and scheduling strategies can be better designed.
Drawings
Fig. 1 is a flow chart of a method for predicting the risk of an urban traffic accident based on a road network according to the present invention.
Fig. 2 is a flowchart of step 2 of the urban traffic accident risk prediction method based on the road network according to the present invention.
Fig. 3 is a prediction flow chart of an accident risk prediction model of the urban traffic accident risk prediction method based on the road network of the present invention.
Fig. 4 is a schematic diagram of a principle of a shunting module of the urban traffic accident risk prediction method based on the road network.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention, taken in conjunction with the accompanying drawings and detailed description, is set forth below.
Before the technical solution of the present invention is introduced, the symbols and definitions related to the present embodiment are explained or explained:
defining a first road section area: dividing a research area into N road sections to obtain a road network;
defining two, coarse grain region: clustering the N road sections into C regions with coarse granularity according to the characteristic similarity of the road sections; n, C are all positive integers; the unit of the coarse granularity is a coarse granularity area;
defining three, accident risk: the accident risk of the coarse-grained region is a coarse-grained accident risk, compared with the coarse-grained region, the road sections which are not clustered (namely the road sections) are fine-grained regions, the units with fine granularity are the road sections, and the accident risk of the road sections is a fine-grained accident risk. The present invention defines the risk of an accident as being a certain time period The number of accidents occurring in each area is weighted and summed with the corresponding accident shapes. The accident patterns are divided into severe, moderate and mild (risk value corresponding to severe 3, risk value corresponding to moderate 2 and risk value corresponding to mild 1) for use
Figure BDA0003109691870000031
Representing the sum of all accident risks in the area a in the time period t ', and a is epsilon {1, …, N } for fine-grained road segments, and a is epsilon {1, …, C } for coarse-grained areas, if the area a has 1-degree accident and 2-degree accident in the time period t', the accident is moderate
Figure BDA0003109691870000032
Defining a fourth road section adjacency matrix A: abstract expressing the road segment region constructed in definition I as a graph G (V, E, A), wherein V represents the divided road segment set, E is an edge set (constructed according to the connectivity between road segments), and A belongs to RN×N,RN×NIs an N × N matrix, A is an adjacent matrix of the graph G, and the element A in the A matrixijThe definition is as follows:
Figure BDA0003109691870000041
wherein i belongs to V, j belongs to V, ei,jRepresenting the communication relation between the road section i and the road section j, Sim (i, j) representing the similarity between the road section i and the road section j, and measured by calculating the JS divergence (Jensen-Shannon divergence) of the characteristics between the road section i and the road section j, and using fiFeature vector representing road section i, using fjFeature vector, f, representing road section j iIncluding attribute information of the road itself of the link i and POI (point of interest) attribute information of the surroundings of the link i, fjIncluding the attribute information of the road segment j and the POI attribute information around the road segment j, the JS divergence is defined as follows:
Figure BDA0003109691870000042
where k represents the dimension of the feature vector.
Based on the above definitions, the traffic accident prediction problem is modeled as a spatio-temporal prediction problem, Xt∈RNThe time t is the time to be predicted, and X is usedtRepresenting fine-grained accident risk of N road segments at time t, RNRepresents XtIs a vector of length N, Ct∈RC,CtRepresenting the accident risk of C coarse-grained regions at time t; rCIs represented by CtIs a vector belonging to a length C,
Figure BDA0003109691870000043
Etrepresenting the time characteristic at time t, each time slice is analyzed to have a length deThe one-hot code of (1) contains information such as festivals and holidays, RdeDenotes EtIs of length deVector of (d)eRepresenting the resolution length of each time slice;
Figure BDA0003109691870000044
Wtindicating the weather characteristics corresponding to each time slice,
Figure BDA0003109691870000045
represents WtIs of length dwVector of (d)wThe dimension representing the weather characteristics, such as selecting five weather attributes of temperature, humidity, ultraviolet intensity, wind speed and visibility, then dw5. In summary, the null prediction problem formalized at this time is described as follows: fine grained accident risk (X) of the first T time slices of the history given time T t-T,Xt-T+1,…,Xt-1) Coarse grain accident risk (C)t-T,Ct-T+1,…,Ct-1) Time characteristic (E)t-T,Et-T+1,…,Et-1) And weather characteristics (W)t-T,Wt-T+1,…,Wt-1) Predicting the accident risk Y of the T +1 time sliceT+1,YT+1∈RNAnd T is a positive integer.
Based on the problem model, the designed accident prediction method flow is shown in fig. 1, and mainly comprises two steps of data preprocessing and accident risk prediction. The data preprocessing and accident risk prediction model will be developed in detail below, as shown in fig. 1.
The data preprocessing process comprises the following steps:
step 1, according to the accident position and the road section set V, establishing a mapping relation between the accident position and the road section to obtain a road section set with accident information.
Firstly, the ith road segment in the road segment set V is defined, and the length of the ith road segment is liThe distance from the accident position P (lng, lat) to the starting point of the road section i is di_startAnd the distance from P (lng, lat) to the end point of the link i is di_endIf the distance from the accident P (lng, lat) to the road section i is Di,DiThe calculation formula is Di=di_start+di_end-li
The establishment of the mapping algorithm between the accident location and the road section comprises the following steps:
step 1.1: the distance between the accident position and a certain road section is equal to the distance between the accident position and the starting point of the road section plus the distance between the accident position and the terminal point of the road section, and the length of the road section; finding a link from the set of links V with the smallest distance to the accident location P (lng, lat), which is defined as the link P, and the distance d between the accident location P (lng, lat) and the link P p
Step 1.2: define a threshold value ε if dpIf the position is less than epsilon, the accident position P (lng, lat) is bound with the road section P, otherwise, the accident position P (lng, lat) is not bound with any road section in the road section set V, and the mapping of the accident position P (lng, lat) and the road section is completed.
And after mapping all the accident positions and the road sections, establishing the mapping relation between the accident positions and the road sections to obtain a mapping algorithm between the accident positions and the road sections, and thus obtaining a road section set with the accident position information.
And 2, clustering and classifying the road sections in the road section set with accident information according to the similarity between the road sections in the road section set to obtain a plurality of coarse-grained regions, and calculating the accident risk of the coarse-grained regions according to the accident information of all the road sections in the coarse-grained regions.
The specific process of step 2 is shown in the flow chart of the clustering algorithm shown in fig. 2:
step 2.1, inputting a feature vector of a road section to be clustered, and inputting the number C of pre-classified coarse-grained regions (namely, the number C of centroid points);
step 2.2, randomly generating C coarse-grained region centroid points;
step 2.3, classifying the road sections into coarse-grained regions closest to the road sections according to the similarity between the road section feature vectors, namely classifying the road sections into centroid points closest to the road sections according to the similarity measurement between the road section feature vectors;
Step 2.4, recalculating the centroid points of the coarse-grained regions after the road sections are classified;
step 2.5, judging whether the recalculated centroid points of the coarse-grained region meet error values, if so, finishing the step 2.6 after clustering classification, otherwise, returning to the step 2.3 to regenerate the centroid points of the coarse-grained region, and repeating the steps 2.2-2.5 until the error values are met, and then performing the step 2.6;
and 2.6, calculating accident risks of the coarse-grained regions according to the accident information of all road sections in the coarse-grained regions, wherein the accident information comprises the accident risks, and the accident risk of one coarse-grained region is equal to the sum of the accident risks of all the road sections in the region in the time period t'.
The similarity calculation formula between the links i and j is as follows, and the similarity between the links is calculated using the pearson correlation coefficient:
similarityi,j=P(fi,fj)
wherein, P (f)i,fj) Representing a feature vector fiAnd the feature vector fjPearson correlation coefficient therebetween; attribute information of the road itself, such as road administrative level information, road physical isolation information, road surface structure information, and the like. At the same time, to define the geographical location of the road segment more accurately, we use the surrounding POI interest point attribute information, i.e., the POI attributes within 300 meters of the road segment center point (hospital, road, etc.), The number of malls, subways, etc.) to characterize the geographic location of the road segment.
The accident risk prediction is as follows:
the accident risk prediction process is realized based on an accident risk prediction model, the designed prediction model method is shown in figure 3, and the method comprises the following steps:
firstly, inputting accident risks of l time slices before the history and accident risks of s time slices before the history, wherein l and s are positive integers, l is larger than s, the accident risks of l time slices before the history are called historical long-term accident risks, the accident risks of s time slices before the history are called historical short-term accident risks, the historical long-term accident risks are sent to a first gated graph convolution module to obtain long-term characteristics, and the historical short-term accident risks are sent to a second gated graph convolution module to obtain short-term characteristics. The size of the characteristic dimension is determined by the number of convolution kernels arranged in graph convolution, and the first gated graph convolution module and the second gated graph convolution module are different in network layer number and identical in design.
Step two: the long-term characteristics obtained in the step one and the weather characteristics (W) after the normalization processing corresponding to the long-term characteristicst-l,Wt-l+1,…,Wt-1) Fusing in time dimension to obtain first fused data, and normalizing the short-term features obtained in the step one with the weather features (W) corresponding to the short-term features t-s,Wt-s+1,…,Wt-1) And fusing in the time dimension to obtain second fused data, and splicing the first fused data and the second fused data to obtain spliced fused data, wherein the time dimension is l + s.
Step three: the spliced fusion data and the external characteristics E at the t moment to be predictedt(one-hot coding of finger holiday information) input temporal layer; according to the external characteristics E of t moment to be predictedtAdopting an attention mechanism in a time layer to obtain the importance weight of each historical time slice; and according to the weight, performing weighted summation on the spliced fusion data in a time layer to obtain a fusion result after weighted summation, wherein the time dimension at the moment is 1.
Step four: in step threeOn the basis, inputting the fusion result obtained in the step three into a feature layer, finally fusing the output result of a shunting module in the output result of the feature layer, wherein the shunting module takes the average coarse-grained accident risk of the previous one time slice as input and outputs the average coarse-grained accident risk as a shunted fine-grained accident risk result, an attention mechanism is adopted in the feature layer, the final feature dimension is 1, and the output result is a predicted accident risk value Yt. The average coarse-grained accident risk is the average value of accident risks in coarse-grained regions of the previous l time slices in history, and the fine-grained accident risk result is the accident risk result of the road section.
The prediction method of the present invention further comprises the step of calculating said average coarse-grained accident risk from the accident risk of the coarse-grained regions in step 2 (step two in the non-predictive model). And (3) inputting the accident risk of the coarse-grained region obtained in the step (2) into a shunting module after passing through the average coarse-grained accident risk.
Step two to obtain the hidden vector
Figure BDA0003109691870000071
(namely the spliced fusion data) is used as the input of the third step, and the time characteristic E of the moment to be predicted is input in the third stept(parsed one-hot coding), calculating an importance score for each time slice at the temporal level
α=softmax(tanh(Yl+sWY+EtWE+b1))
Wherein α ∈ R(l+s),R(l+s)Representing a vector of length (l + s), the learnable parametric dimensions are represented as follows:
Figure BDA0003109691870000072
Figure BDA0003109691870000073
b1∈R(l+s)
doutto representThe gated graph convolution module outputs the output dimension of the convolution characteristic; wYRepresenting the vector Y for the input hidden layerl+s(result obtained in step two) learning the obtained weight parameter, WERepresenting the temporal characteristic E for the moment to be predictedtLearned weight parameters, b1Representing the bias parameters learned by the neural network, R represents a vector, the symbols of the above formula are used to illustrate the dimension of each parameter,
Figure BDA0003109691870000074
has the meaning of (l + s) × (N × d)out) A vector of x 1 dimensions, and,
Figure BDA0003109691870000081
has the meaning of deVector of x (l + s) dimension.
The final output result of the third step is accumulated by the time score result of each step, and the specific calculation is as follows:
Figure BDA0003109691870000082
The input result in the third step is the hidden vector obtained in the second step
Figure BDA0003109691870000083
It is l + s in the time dimension, slicing it into Y in the time dimensionl+s=(y1,…yl+s),ym∈Yl+sM denotes the index in the time dimension, summing from 1 to l + s, resulting in Yα
Step four Using the result Y obtained in step threeαThe method for fusing the output result of the characteristic dimension and the attention of the analog time comprises the following calculation processes:
Figure BDA0003109691870000084
wherein the dimensions of the parameters are set as follows:
Figure BDA0003109691870000085
Figure BDA0003109691870000086
Figure BDA0003109691870000087
where beta represents the feature layer attention mechanism score,
Figure BDA0003109691870000088
Figure BDA0003109691870000089
representing for input YαThe weight parameters learned in the feature layer are used,
Figure BDA00031096918700000810
representing for input ETThe weight parameter learned at the feature level, b2 denotes bias,
Figure BDA00031096918700000811
has the meaning of doutA vector of dimension x N x 1,
Figure BDA00031096918700000812
has the meaning of de×doutThe vector of the dimensions is then calculated,
Figure BDA00031096918700000813
has the meaning of de×doutThe vector of the dimensions is then calculated,
Figure BDA00031096918700000814
expressed as length doutThe vector of (2).
The preliminary results Y obtained for the final feature layer are as follows:
Figure BDA00031096918700000815
wherein FhDenotes above YαVector in the feature dimension, YαIs one NxdoutVector, representable as
Figure BDA00031096918700000816
h denotes an index in the feature dimension, h is from 1 to doutAnd (6) summing.
Before outputting Y, a shunting module is designed to output the result, as shown in fig. 4, the model takes the average accident risk of the first time slice of the coarse-grained region after clustering as input, the output is the accident risk of the road section level, the model is essentially a three-layer feedforward full-connection layer, and the input layer of the shunting module uses L inputL for indicating and shunting module hidden layerhiddenIndicating, for the output layer of the splitter module, LoutIndicating, intermediate shunting module hidden layer LhiddenThe number is determined by the number of coarse-grained regions of the cluster and the number of road sections, and the parameters are set as follows:
Linput∈R1×C (14)
Lhidden∈RC×N (15)
Lout∈RN×1 (16)
finally, the predicted value of the method is output by combining the shunting result, and the formula is expressed as follows:
Yt=Y+Lout’ (17)
wherein R is1×CMeaning a vector of dimension 1 × C, RC×NMeaning a C x N dimensional vector, RN×1Meaning a vector of dimension Nx 1, Lout' denotes an output layer LoutAnd obtaining a result, namely a fine-grained accident risk result after shunting.
The overall model loss function is designed to further alleviate the problem of mismatching of accident data, where Y istRepresents the predicted value, Y represents YtCorresponding true value (true accident risk value), θ represents positiveThe quantization parameter w represents the weight parameter. The loss function is:
min(||y-Yt||2)×(y+1)+θ||w||2 (18)
the invention can effectively solve the problem caused by the non-uniform accident data samples (excessive zero values) by giving more weight to the non-zero values on the design of the loss function.
In the prior art, mainly aiming at the grid-level accident prediction, although the spatial heterogeneity of accidents is considered, the separate training is time-consuming, and the correlation among regions cannot be fully utilized; the invention divides the space into fine-grained road sections, extracts the spatial characteristics of accident data through the graph network and solves the problem of spatial heterogeneity. The invention relates to a road network-based urban traffic accident risk prediction method, which divides an area to be researched into road sections in a spatial dimension, fuses multi-source heterogeneous data and external characteristics, utilizes clustered coarse-grained accident risks as drainage, and considers the prediction accuracy while realizing finer spatial division. The invention combines the shunting module in the attention system to shunt the coarse-grained accident risk, and can effectively solve the problem caused by uneven accident data samples. The invention can effectively prevent accidents and reduce the loss of lives and properties caused by the accidents, and can better design traffic planning and scheduling strategies.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (8)

1. A urban traffic accident risk prediction method based on a road network is characterized by comprising the following steps:
step 1, establishing a mapping relation between an accident position and a road section according to the accident position and the road section set V to obtain a road section set with accident position information;
step 2, clustering and classifying road sections in the road section set with accident information according to the similarity between the road sections in the road section set to obtain a plurality of coarse-grained regions, and calculating accident risks of the coarse-grained regions according to the accident information of all the road sections in the coarse-grained regions;
step 3, obtaining long-term characteristics according to the historical long-term accident risk, and obtaining short-term characteristics according to the historical short-term accident risk;
step 4, fusing the long-term features and the weather features after normalization processing corresponding to the long-term features in a time dimension to obtain first fusion data, fusing the short-term features and the weather features after normalization processing corresponding to the short-term features in the time dimension to obtain second fusion data, and splicing the first fusion data and the second fusion data to obtain spliced fusion data;
Step 5, according to the external characteristics E of the t moment to be predictedtObtaining the importance weight of each historical time slice by adopting an attention mechanism; performing weighted summation on the spliced fusion data according to the weight to obtain a fusion result after weighted summation;
step 6, inputting the fusion result into the feature layer, and fusing the output result of the shunting module in the result of the feature layer attention mechanism to obtain a predicted accident risk value YtThe shunting module takes historical average coarse-grained accident risk as input, and the output result is a shunted fine-grained accident risk result; the shunting module comprises a shunting module input layer LinputShunt module hidden layer LhiddenAnd a shunting module output layer Lout,Linput∈R1×C,Lhidden∈RC×N,Lout∈RN×1Wherein R is1×CMeaning a vector of dimension 1 × C, RC×NMeaning a C x N dimensional vector, RN×1The meaning of (1) is a vector of dimension N × 1;
the step 3 specifically comprises the following steps: sending the historical long-term accident risk into a first gating graph convolution module to obtain long-term characteristics, and sending the historical short-term accident risk into a second gating graph convolution module to obtainShort-term characteristics, wherein the historical long-term accident risk is the accident risk of l time slices before the history, the historical short-term accident risk is the accident risk of s time slices before the history, l and s are positive integers, and l is larger than s; the time dimension of the fused data spliced in the step 4 is l + s; the step 5 specifically comprises the following steps: the spliced fusion data and the external characteristics E at the t moment to be predicted tInput time layer, EtFor one-hot coding of holiday information, according to EtAcquiring importance weight of each historical time slice by adopting an attention mechanism in a time layer, and weighting and summing spliced fusion data in the time layer according to the weight to acquire a fusion result after weighted summation, wherein the time dimension of the fusion result is 1; the average coarse-grained accident risk of the previous I time slices in the history is taken as an input by the shunting module in the step 6, and the step Y is carried outtHas a characteristic dimension of 1.
2. The urban traffic accident risk prediction method based on road network according to claim 1, characterized in that said method further comprises the step of calculating said average coarse-grained accident risk according to the accident risk of coarse-grained regions in step 2.
3. The urban traffic accident risk prediction method based on road network according to claim 1, characterized in that the fine-grained elements are road segments and the coarse-grained elements are coarse-grained regions.
4. The urban traffic accident risk prediction method based on road network according to claim 1, characterized in that said step 1 specifically comprises:
step 1.1, searching a road section P with the minimum distance to an accident position P (lng, lat) in the road section set V, wherein the distance between the accident position and the road section P is d p(ii) a The distance between the accident position and a certain road section is equal to the distance between the accident position and the starting point of the road section plus the distance between the accident position and the terminal point of the road section-the length of the road section;
step 1.2, define the threshold ε, if dpIf epsilon is less than epsilon, the accident position P (lng, lat) is bound with the road section PAnd if not, the accident position P (lng, lat) is not bound with any road section in the road section set V, and the mapping relation between the accident position P (lng, lat) and the road section is obtained, so that the road section set with the accident position information is obtained.
5. The road network-based urban traffic accident risk prediction method according to claim 1, wherein the specific process of step 2 is as follows:
step 2.1, inputting a feature vector of a road section to be clustered, and inputting the number C of pre-classified coarse-grained regions;
step 2.2, randomly generating C coarse-grained region centroid points;
step 2.3, classifying the road sections into coarse-grained regions closest to the road sections according to the similarity between the road section feature vectors;
step 2.4, all recalculating centroid points of coarse-grained regions after road section classification is completed;
step 2.5, judging whether the recalculated coarse-grained region centroid points meet the error value, if so, finishing the step 2.6 after the clustering classification is finished, otherwise, returning to the step 2.3
And 2.6, calculating accident risks of the coarse-grained region according to the accident information of all road sections in the coarse-grained region, wherein the accident information comprises the accident risks, and the accident risks of the coarse-grained region are equal to the sum of the accident risks of all road sections in the region in a time period.
6. The road network-based urban traffic accident risk prediction method according to claim 5, wherein said accident risk is divided into several levels of risks, and different levels of risks correspond to different accident risk values.
7. The urban traffic accident risk prediction method based on road network according to claim 5, characterized in that the similarity in step 2.3 is relatively goodi,j=P(fi,fj),P(fi,fj) Representing a feature vector fiAnd the feature vector fjPearson's correlation coefficient between fiIndicating roadFeature vector of segment i, using fjFeature vector, f, representing road section jiAnd fjBoth include attribute information of the road itself and attribute information of surrounding POI points of interest.
8. The urban traffic accident risk prediction method based on road network according to claim 1, characterized in that the loss function of the urban traffic accident risk prediction method is:
min(||y-Yt||2)×(y+1)+θ||w||2
wherein Y represents YtThe corresponding true value, θ represents the regularization parameter and w represents the weight parameter.
CN202110646085.0A 2021-06-10 2021-06-10 Urban traffic accident risk prediction method based on road network Active CN113283665B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110646085.0A CN113283665B (en) 2021-06-10 2021-06-10 Urban traffic accident risk prediction method based on road network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110646085.0A CN113283665B (en) 2021-06-10 2021-06-10 Urban traffic accident risk prediction method based on road network

Publications (2)

Publication Number Publication Date
CN113283665A CN113283665A (en) 2021-08-20
CN113283665B true CN113283665B (en) 2022-07-19

Family

ID=77284141

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110646085.0A Active CN113283665B (en) 2021-06-10 2021-06-10 Urban traffic accident risk prediction method based on road network

Country Status (1)

Country Link
CN (1) CN113283665B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN115018318B (en) * 2022-06-01 2023-04-18 航天神舟智慧系统技术有限公司 Social area risk prediction analysis method and system
CN116978236B (en) * 2023-09-25 2023-12-15 南京隼眼电子科技有限公司 Traffic accident early warning method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109544921A (en) * 2018-11-26 2019-03-29 中南大学 A kind of city road classification method based on traffic characteristics
CN109636049A (en) * 2018-12-19 2019-04-16 浙江工业大学 A kind of congestion index prediction technique of combination road network topology structure and semantic association
CN109993970A (en) * 2019-03-15 2019-07-09 西南交通大学 A kind of city area-traffic accident risk prediction method
CN110288825A (en) * 2019-05-23 2019-09-27 浙江工业大学 Traffic control sub-district clustering method based on multisource data fusion and SNMF
CN112862240A (en) * 2020-12-30 2021-05-28 厦门大学 Road obstacle risk assessment method and device based on urban big data and readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8700296B2 (en) * 2006-03-03 2014-04-15 Inrix, Inc. Dynamic prediction of road traffic conditions

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109544921A (en) * 2018-11-26 2019-03-29 中南大学 A kind of city road classification method based on traffic characteristics
CN109636049A (en) * 2018-12-19 2019-04-16 浙江工业大学 A kind of congestion index prediction technique of combination road network topology structure and semantic association
CN109993970A (en) * 2019-03-15 2019-07-09 西南交通大学 A kind of city area-traffic accident risk prediction method
CN110288825A (en) * 2019-05-23 2019-09-27 浙江工业大学 Traffic control sub-district clustering method based on multisource data fusion and SNMF
CN112862240A (en) * 2020-12-30 2021-05-28 厦门大学 Road obstacle risk assessment method and device based on urban big data and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于路网结构的城市交通事故短期风险预测方法";张延孔等;《智能系统学报》;20200731;第15卷(第4期);全文 *

Also Published As

Publication number Publication date
CN113283665A (en) 2021-08-20

Similar Documents

Publication Publication Date Title
CN113283665B (en) Urban traffic accident risk prediction method based on road network
CN109697852B (en) Urban road congestion degree prediction method based on time sequence traffic events
Jamal et al. Injury severity prediction of traffic crashes with ensemble machine learning techniques: A comparative study
Chen et al. Traffic flow prediction based on deep learning in internet of vehicles
CN108898829B (en) Dynamic short-time traffic flow prediction system aiming at non-difference division and data sparseness
CN110322064B (en) Urban trip demand prediction method
Li et al. Graph CNNs for urban traffic passenger flows prediction
CN112270355B (en) Active safety prediction method based on big data technology and SAE-GRU
CN113268916A (en) Traffic accident prediction method based on space-time graph convolutional network
CN113159364A (en) Passenger flow prediction method and system for large-scale traffic station
CN108986453A (en) A kind of traffic movement prediction method based on contextual information, system and device
CN114565124A (en) Ship traffic flow prediction method based on improved graph convolution neural network
Shao et al. The traffic flow prediction method using the incremental learning-based CNN-LTSM model: the solution of mobile application
CN113222218A (en) Traffic accident risk prediction method based on convolution long-time and short-time memory neural network
CN112529284A (en) Private car residence time prediction method, device and medium based on neural network
Dai et al. Attention based simplified deep residual network for citywide crowd flows prediction
CN115269758A (en) Passenger-guidance-oriented road network passenger flow state deduction method and system
Li et al. Quantifying the uncertainty in long-term traffic prediction based on PI-ConvLSTM network
Rasaizadi et al. Short-term prediction of traffic state for a rural road applying ensemble learning process
CN115762147B (en) Traffic flow prediction method based on self-adaptive graph meaning neural network
Bag et al. SENE: A novel manifold learning approach for distracted driving analysis with spatio-temporal and driver praxeological features
Nguyen et al. Complex event analysis for traffic risk prediction based on 3D-CNN with multi-sources urban sensing data
Zhou et al. Stack ResNet for short-term accident risk prediction leveraging cross-domain data
CN115204445A (en) Travel demand prediction method and system for interaction between urban functional areas
CN113011512A (en) Traffic generation prediction method and system based on RBF neural network model

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