Method for predicting severity of accident of mixed driving of automatic driving and manual driving
By obtaining and matching traffic accident data in a mixed environment of autonomous driving and manual driving, screening characteristic variables that affect severity, and building a joint prediction model, the problems of insufficient data and missing variables in the existing technology are solved, and the accuracy of accident severity prediction and the goodness of fit of the model are improved.
Patent Information
- Application Number
- CN202510043489.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2045-01-10
AI Technical Summary
The existing autonomous driving accident data has problems such as missing key variables and insufficient data volume, which leads to the inability to fully explore factors that affect the severity of the accident. The existing model has poor generalization ability and is difficult to reflect the performance in real scenarios.
By obtaining traffic accident data in a mixed environment of autonomous driving and manual driving, the road traffic characteristics and built environment characteristics of the accident location point were extracted, and a data set of traffic accident characteristics variables were established for autonomous driving and manual driving, and a characteristic variable affecting the severity of traffic accidents was screened based on machine learning, and a joint prediction model for the severity of autonomous driving and manual driving accidents in a mixed environment was constructed.
The problems of insufficient data volume and missing key variables were solved, and a joint prediction model that can analyze the mechanism of the impact of accident characteristics, road characteristics and built environment characteristics on the severity of the accident were constructed, which improved the prediction accuracy and goodness of the fit of the model.
Smart Images

Figure CN119904988A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of accident cause analysis, and in particular to a method for predicting the severity of accidents in mixed automatic driving and manual driving. Background Art
[0002] Before the full popularization of autonomous driving systems, traffic conditions with mixed autonomous and manually driven vehicles are still a typical feature on the road. However, autonomous vehicles have also exposed many problems in the actual operation of mixed traffic environments. Conducting traffic safety analysis based on accident data over the years, building an accident severity prediction model, quantitatively studying the factors affecting the severity of accidents in mixed traffic environments, and evaluating the safety effects of autonomous driving vehicles will help to formulate targeted improvement strategies and establish an effective and complete accident warning mechanism, which is of great significance for improving the conditions for autonomous driving vehicles to go on the road, improving safety in mixed traffic environments, and reducing accident losses.
[0003] From a data perspective, the road traffic system is composed of four major elements: "people, vehicles, roads, and environment". Traffic accidents are usually random events caused by the failure of these elements. The interaction of these elements determines the occurrence, development, and consequences of accidents. Therefore, when constructing an accident severity prediction model in a mixed traffic environment, it is necessary to take autonomous driving vehicles and manually driven vehicles as the starting point, study their behavioral changes during driving, trace their causes, and analyze factors such as road characteristics and built environment that affect vehicle behavior, so as to achieve accurate prediction of the severity of the accident. However, the existing autonomous driving accident data has the problem of missing key variables, which makes it impossible to fully explore the factors that affect the severity of the accident. In addition, the sample size of the existing data set is small, and there are problems with missing or unverified data, which leads to the poor generalization ability of the existing model and makes it difficult to reflect the performance in real scenarios.
[0004] From a methodological perspective, existing traffic safety analysis methods usually treat the severity of autonomous driving accidents and manually driven accidents as independent analysis units, use Logit and Probit regression models, and their extended models for accident prediction, and analyze the relationship between accident severity and various influencing factors. However, in a mixed traffic environment, certain factors may affect the severity of both autonomous driving vehicle accidents and manually driven vehicle accidents, and existing single models often ignore the mutual relationship between the severity of accidents between these two types of vehicles. In addition, the background factors of accidents in reality are complex and diverse, and it is impossible to fully collect and quantify all factors that may affect the severity of accidents, which in turn introduces unobserved heterogeneity. Existing accident severity prediction methods in mixed environments ignore the mutual relationship between different types of vehicles and the unobserved heterogeneity in the data set, resulting in biased model parameter estimation. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method for predicting the severity of accidents in mixed autonomous driving and manual driving.
[0006] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:
[0007] A method for predicting the severity of an accident in which automatic driving and manual driving are mixed comprises the following steps:
[0008] Obtain traffic accident data in a mixed environment of autonomous driving and manual driving;
[0009] According to the accident location in the traffic accident data, the road traffic characteristics and built environment characteristics of the accident location are extracted;
[0010] Match traffic accident data with road traffic characteristics and built environment characteristics at the accident location to establish a data set of traffic accident characteristic variables for autonomous driving and manual driving;
[0011] Based on the characteristic variable data set of traffic accidents involving autonomous driving and manual driving, the characteristic variables that affect the severity of traffic accidents are screened based on machine learning;
[0012] According to the characteristic variables that affect the severity of traffic accidents, a joint prediction model for the severity of accidents caused by autonomous driving and manual driving is constructed in a mixed traffic environment to predict the severity of accidents.
[0013] Furthermore, obtaining traffic accident data in a mixed environment of autonomous driving and manual driving includes:
[0014] Extract autonomous driving accident feature information based on historical autonomous driving accident data, and set an independent accident code for each autonomous driving accident; the accident features include accident time, accident location, collision type, vehicle characteristics, natural environmental conditions, and accident details;
[0015] Locate the accident location based on the accident location and accident details, and convert it into longitude and latitude coordinates in the earth coordinate system;
[0016] Extracting characteristic information of manual driving accidents based on historical manual driving accident data;
[0017] According to the characteristic information of autonomous driving accidents and manual driving accidents, all manual driving accidents with the same road characteristics and built environment characteristics as the autonomous driving accidents are screened in the set first buffer zone, and the manual driving accidents closest to the autonomous driving accidents are selected for pairing to generate traffic accident data in a mixed environment of autonomous driving and manual driving.
[0018] Furthermore, according to the accident location in the traffic accident data, the road traffic characteristics and built environment characteristics of the accident location are extracted, including:
[0019] According to the accident location in the traffic accident data, the road feature information of the accident location is extracted; the road features include intersection type, traffic control facility type, central separation facility type, number of lanes, pedestrian crossings and roadside parking spaces;
[0020] According to the accident location in the traffic accident data, the road attribute information of the accident location is extracted; the road attributes include road name, road grade, speed limit, number of lanes and one-way roads;
[0021] According to the accident location in the traffic accident data, the built environment information of the accident location within the set second buffer zone is extracted; the built environment includes land use type, parks, restaurants, schools, bus and subway stations, hospitals and shopping centers.
[0022] Furthermore, the traffic accident data is matched with the road traffic characteristics and built environment characteristics of the accident location points to establish a data set of traffic accident characteristic variables for autonomous driving and manual driving, including:
[0023] According to the accident codes and longitude and latitude coordinates, the characteristic information of autonomous driving accidents, the characteristic information of manual driving accidents, the road characteristic information, the road attribute information and the built environment information are matched to establish a characteristic variable data set of autonomous driving and manual driving traffic accidents.
[0024] Furthermore, based on the characteristic variable data set of traffic accidents of autonomous driving and manual driving, the characteristic variables affecting the severity of traffic accidents are screened based on machine learning, including:
[0025] Based on the characteristic variable dataset of autonomous driving and manual driving traffic accidents, the random forest model was constructed with the severity of autonomous driving accidents and manual driving accidents as the target variable, and the accident characteristics, road characteristics, and built environment characteristics as the characteristic variables.
[0026] In each decision tree of the random forest, the Gini index is used to measure the classification contribution of the feature variable to the severity of the accident when the node is split. The node sample is split into two subsets by the feature variable, and the change in the node Gini index after the split is calculated;
[0027] Traverse all decision trees in the random forest, accumulate the changes in the Gini index caused by the feature variables in each node split, and obtain the feature variable importance of the feature variable for the accident severity classification effect in the random forest;
[0028] The importance of all characteristic variables is standardized to obtain the relative importance of each characteristic variable to the severity of the accident;
[0029] The characteristic variables are sorted from high to low according to their relative importance, the cumulative contribution ratio is calculated based on the first number of characteristic variables, and the characteristic variables that affect the severity of the traffic accident are determined based on the cumulative contribution ratio of the characteristic variables and the set threshold.
[0030] Furthermore, the change in the Gini index of the node after the split is calculated as follows:
[0031]
[0032] Among them, ΔGini(X j ) is the change in the Gini index of the node after the split, Gini(D) is the Gini index of the node sample D, |D L | is the child node dataset D after splitting L The size of |D R | is the child node dataset D after splitting R The size of |D| is the size of the current node data set D, Gini(D L ) is the child node data set D L The Gini index, Gini (D R ) is the child node data set D R The Gini index, X j is the jth feature variable.
[0033] Furthermore, the cumulative contribution ratio of the characteristic variables is calculated as follows:
[0034] The first number of characteristic variables are accumulated, and the ratio of the sum of the accumulated characteristic variables to the sum of all characteristic variables is calculated to obtain the cumulative contribution ratio of the characteristic variables.
[0035] Furthermore, based on the characteristic variables affecting the severity of traffic accidents, a joint prediction model for the severity of accidents caused by autonomous driving and manual driving in mixed traffic environments is constructed to predict the severity of accidents, including:
[0036] The severity of autonomous driving accidents and manual driving accidents was used as the dependent variable, and the characteristic variables affecting the severity of traffic accidents were used as the independent variables to construct a random parameter bivariate Probit model.
[0037] Assuming that the regression coefficient of the independent variable in the model varies randomly between different accident samples, set a new regression coefficient of the independent variable;
[0038] The joint probability density function of all accident data is established based on the independent variables and the new independent variable regression coefficients, and converted into a log-likelihood function;
[0039] The integral in the log-likelihood function is approximated using a quasi-Monte Carlo method;
[0040] Based on the approximate log-likelihood function, the parameters are iteratively estimated using the gradient descent method;
[0041] Through multiple iterations of optimization, until the log-likelihood function converges, the coefficient value of each characteristic variable for the accident severity classification is finally obtained.
[0042] Furthermore, the quasi-Monte Carlo method is used to approximate the integral in the log-likelihood function:
[0043]
[0044] in, is the joint probability density function, Y i1 is the target random variable related to the classification result of the severity of the autonomous driving accident in the i-th sample, Y i2 is the target random variable related to the classification result of the severity of human driving accidents in the i-th sample, X i are the accident characteristics, road characteristics and built environment variables related to the severity of the i-th sample, represents the random parameter related to the severity of the autonomous driving accident in the i-th sample, is the random parameter related to the severity of manual driving accidents in the i samples, Σ is the covariance matrix between the severity of automatic driving and manual driving accidents, and M is the number of simulated sampling.
[0045] Furthermore, based on the approximate log-likelihood function, the gradient descent method is used to iteratively estimate the parameters, specifically:
[0046]
[0047] in, and are the random parameters β at the t+1th iteration. i ' ,1 The mean and variance of and are the random parameters β at the tth iteration. i ' ,1 The mean and variance of , η is the learning rate, is the gradient of the log-likelihood function.
[0048] The present invention has the following beneficial effects:
[0049] (1) The present invention obtains traffic accident data in a mixed environment of autonomous driving and manual driving from multiple data sources, matches the road characteristics and built environment characteristics of the accident location, and constructs a complete accident feature data set to solve the problem of insufficient existing data volume and lack of key feature variables.
[0050] (2) The present invention combines the mixed environment of autonomous driving and manual driving to construct a joint accident severity prediction model. The model can analyze the impact mechanism of accident characteristics, road characteristics and built environment characteristics on accident severity, and improve the prediction accuracy and model fit goodness of fit by overcoming the problem that the existing model ignores the correlation between dependent variables and the unobserved heterogeneity in the data set. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A flowchart of a method for predicting the severity of an accident in mixed autonomous driving and manual driving is provided;
[0052] Figure 2 Extracting geographic coordinates of autonomous driving accidents;
[0053] Figure 3 A schematic diagram of pairing autonomous driving accidents with manual driving accidents;
[0054] Figure 4 Extract process intention for the characteristic variable dataset of traffic accidents between autonomous driving and manual driving. DETAILED DESCRIPTION
[0055] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0056] like Figure 1 As shown, an embodiment of the present invention provides a method for predicting the severity of an accident in which automatic driving and manual driving are mixed, comprising the following steps S1 to S5:
[0057] S1. Obtain traffic accident data in a mixed environment of autonomous driving and manual driving;
[0058] In an optional embodiment of the present invention, step S1 of acquiring traffic accident data in a mixed environment of automatic driving and manual driving includes:
[0059] Extract autonomous driving accident feature information based on historical autonomous driving accident data, and set an independent accident code for each autonomous driving accident; the accident features include accident time, accident location, collision type, vehicle characteristics, natural environmental conditions, and accident details;
[0060] Locate the accident location based on the accident location and accident details, and convert it into longitude and latitude coordinates in the earth coordinate system;
[0061] Extracting characteristic information of manual driving accidents based on historical manual driving accident data;
[0062] According to the characteristic information of autonomous driving accidents and manual driving accidents, all manual driving accidents with the same road characteristics and built environment characteristics as the autonomous driving accidents are screened in the set first buffer zone, and the manual driving accidents closest to the autonomous driving accidents are selected for pairing to generate traffic accident data in a mixed environment of autonomous driving and manual driving.
[0063] In this embodiment, step S1 collects 699 autonomous driving accident data that occurred from January 2015 to July 2024 from the National Highway Traffic Safety Administration (https: / / www.nhtsa.gov / lawsregulations / standing-generalorder-crash-reporting#data), the California Department of Motor Vehicles (https: / / www.dmv.ca.gov / portal / vehicle-industryservices / autonomousvehicles / autonomous-vehiclecollision-reports / ), global news reports and social media posts, and collects factors such as accident severity, collision type, and accident occurrence time.
[0064] This embodiment uses the historical autonomous driving accident data disclosed by the National Highway Traffic Safety Administration (NHTSA) and the California Department of Motor Vehicles (CA DMV) as the main source to extract the characteristic information of autonomous driving accidents and set an independent accident code for each autonomous driving accident. Using global news reports and social media posts as auxiliary data sources, a large language model (such as ChatGPT) is used to uniformly convert accident information from different countries into English. In order to ensure the accuracy and consistency of the data, specific prompt questions are set in ChatGPT (for example: estimating severity, extracting accident type, extracting accident time, etc.) to extract accident characteristic information from text data. Accident characteristics include: accident time, location, collision type, vehicle characteristics, natural environmental conditions, and detailed description of the accident.
[0065] In this embodiment, step S1 uses the accident location and accident details to locate the specific location of the accident in Google Earth and converts it into longitude and latitude coordinates in the WGS1984 coordinate system. Figure 2 shown.
[0066] In this embodiment, step S1 collects manual driving accident data from January 2015 to July 2024 from the Traffic Injury Mapping System of the University of California, Berkeley (https: / / tims.berkeley.edu / about.php), and obtains factors such as accident severity, collision type, accident time, and accident coordinates; maps the two types of accidents to ArcGIS, and matches each autonomous driving accident with a manual driving accident with the same road and built environment characteristics by constructing a 50-meter buffer zone, as shown in the following figure. Figure 3 shown.
[0067] This embodiment uses the traffic injury mapping system of the University of California, Berkeley as the main data source to extract the data of manual driving accidents over the years, including the characteristic information and geographic coordinates of each accident; and imports the autonomous driving accidents and manual driving accidents into the geographic information system (ArcGIS). For each autonomous driving accident, a buffer zone with a radius of 50m is set to screen out all manual driving accidents with the same road characteristics and built environment characteristics as the autonomous driving accident. According to the distance from the autonomous driving accident point, the nearest manual driving accident is selected from the buffer zone for pairing to generate traffic accident data in a mixed traffic environment.
[0068] S2, extracting the road traffic characteristics and built environment characteristics of the accident location according to the accident location in the traffic accident data;
[0069] In an optional embodiment of the present invention, step S2 extracts the road traffic characteristics and built environment characteristics of the accident location point according to the accident location in the traffic accident data, including:
[0070] According to the accident location in the traffic accident data, the road feature information of the accident location is extracted; the road features include intersection type, traffic control facility type, central separation facility type, number of lanes, pedestrian crossings and roadside parking spaces;
[0071] According to the accident location in the traffic accident data, the road attribute information of the accident location is extracted; the road attributes include road name, road grade, speed limit, number of lanes and one-way roads;
[0072] According to the accident location in the traffic accident data, the built environment information of the accident location within the set second buffer zone is extracted; the built environment includes land use type, parks, restaurants, schools, bus and subway stations, hospitals and shopping centers.
[0073] In this embodiment, if Figure 4As shown, step S2 first uses the longitude and latitude of the accident to collect road feature information such as intersection type, traffic control facility type and number of lanes on Google Earth; uses Overpass Turb to query road attribute information such as road grade, road speed limit and one-way road at the accident site; uses ArcGIS to collect land use type at the accident site and whether there are parks, schools, restaurants, subway stations and bus stops and other built environment information; thereby matching the road traffic characteristics and built environment characteristics of the accident location.
[0074] This embodiment uses Google Earth street view map to locate the accident location based on the latitude and longitude coordinates of the accident, and extracts relevant road feature information, including but not limited to location, intersection type, traffic control facility type, central separation facility type, number of lanes, crosswalks, and roadside parking spaces.
[0075] This embodiment uses the Overpass API to query the road information near the accident site through the Overpass Turb tool. The URL for sending the request is "http: / / overpass-api.de / api / interpreter?data=[out:json];(way(around:{radius},{latitude},{longitude})["highway"];);out body". In this URL, {latitude},{longitude} should be replaced with the longitude and latitude coordinates of the accident site respectively; in addition, {radius} should be replaced with the query range (in meters). Through this API request, the Overpass Turb platform will return road attribute information such as road name, road grade, speed limit, number of lanes, one-way roads, etc. within the range near the specified longitude and latitude.
[0076] This embodiment uses a Python script to call the Overpass API, send an HTTP request and set query parameters to specify the query area range and the built environment information to be queried. After the API returns data in JSON format, the response data is parsed into a Python dictionary object through the response.Json() parameter, and the built environment elements in the dictionary object are traversed to extract the label information of each element and its latitude and longitude coordinates in the WGS1984 coordinate system. The autonomous driving accident and built environment data are imported into ArcGIS, and a buffer with a radius of 500m is set at each autonomous driving accident point. The spatial connection tool is used to extract the built environment features within the buffer range, including land use types, parks, restaurants, schools, bus stops and subway stations, hospitals, shopping centers, etc.
[0077] S3. Match the traffic accident data with the road traffic characteristics and built environment characteristics of the accident location to establish a data set of traffic accident characteristic variables for autonomous driving and manual driving;
[0078] In an optional embodiment of the present invention, step S3 matches the traffic accident data with the road traffic characteristics and built environment characteristics of the accident location point to establish a data set of traffic accident characteristic variables for autonomous driving and manual driving, including:
[0079] According to the accident codes and longitude and latitude coordinates, the characteristic information of autonomous driving accidents, the characteristic information of manual driving accidents, the road characteristic information, the road attribute information and the built environment information are matched to establish a characteristic variable data set of autonomous driving and manual driving traffic accidents.
[0080] In this embodiment, step S3 uses the accident code and longitude and latitude as common identifiers to match the autonomous driving accident feature information, manual driving accident feature information, road feature information, road attribute information and built environment features. The matched information is regarded as a complete accident feature variable sample, and the character variables are converted into numerical variables using independent coding to establish the accident feature variable data set D2.
[0081] This embodiment matches the feature information of autonomous driving accidents, feature information of manual driving accidents, road feature information, road attribute information and built environment information based on the two common identifiers of accident code and longitude and latitude, and regards the matched information as a complete sample of accident feature variables. For all accident samples, the integrated feature variables will constitute the feature variable data set D1. During the matching process, the accident code and longitude and latitude coordinates are used for precise docking to ensure that each accident data can be correctly associated with the relevant road and built environment features.
[0082] This embodiment preprocesses the sample data set D1, first using the mode to fill in the missing categorical variable values. For outliers or data that do not meet predefined standards (for example: unreasonable accident time, geographical location), they are regarded as "dirty data" and deleted. Next, all n categorical variables in the sample data set are converted into n-1 independent binary variables using an independent coding method to avoid the virtual variable trap. Among them, the ignored variables are reference variables, which represent the most common or most meaningful categories in practical applications. Finally, a data set D2 of characteristic variables for traffic accidents involving autonomous driving and manual driving is established, and the results are shown in Table 1:
[0083] Table 1 shows the accident feature variable dataset after variable extraction and feature coding.
[0084]
[0085] S4. Based on the characteristic variable data set of traffic accidents involving autonomous driving and manual driving, the characteristic variables affecting the severity of traffic accidents are screened based on machine learning;
[0086] In an optional embodiment of the present invention, step S4 screens the characteristic variables affecting the severity of traffic accidents based on machine learning according to the characteristic variable data sets of traffic accidents of autonomous driving and manual driving, including:
[0087] Based on the characteristic variable dataset of autonomous driving and manual driving traffic accidents, the random forest model was constructed with the severity of autonomous driving accidents and manual driving accidents as the target variable, and the accident characteristics, road characteristics, and built environment characteristics as the characteristic variables.
[0088] In each decision tree of the random forest, the Gini index is used to measure the classification contribution of the feature variable to the severity of the accident when the node is split. The node sample is split into two subsets by the feature variable, and the change in the node Gini index after the split is calculated;
[0089] Traverse all decision trees in the random forest, accumulate the changes in the Gini index caused by the feature variables in each node split, and obtain the feature variable importance of the feature variable for the accident severity classification effect in the random forest;
[0090] The importance of all characteristic variables is standardized to obtain the relative importance of each characteristic variable to the severity of the accident;
[0091] The characteristic variables are sorted from high to low according to their relative importance, the cumulative contribution ratio is calculated based on the first number of characteristic variables, and the characteristic variables that affect the severity of the traffic accident are determined based on the cumulative contribution ratio of the characteristic variables and the set threshold.
[0092] The calculation method of the cumulative contribution ratio of the characteristic variable is:
[0093] The first number of characteristic variables are accumulated, and the ratio of the sum of the accumulated characteristic variables to the sum of all characteristic variables is calculated to obtain the cumulative contribution ratio of the characteristic variables.
[0094] In this embodiment, step S4 constructs a random forest model based on the sample data set D2, and selects the top 20 variables with the most important feature vectors, including rear-end collision, side collision, side scrape, night, slippery road surface, bus lane, signal light, two-way 3-lane, bus stop and subway station, weekday, pedestrian crossing, bicycle lane, school, park, two-way 4-lane, and Y-shaped intersection.
[0095] This embodiment constructs a random forest model based on the sample data set D2, with the severity of autonomous driving accidents and manual driving accidents as target variables, and accident characteristics, road characteristics, and built environment characteristics as feature variables to construct the random forest model.
[0096] In this embodiment, in each decision tree of the random forest, the Gini index is used to measure the characteristic variable X j The classification contribution to the severity of the accident when the node splits is calculated as:
[0097]
[0098] Where c is the number of accident severity categories, p i It is the sample proportion of a certain type of accident in the node (such as the proportion of accidents without injury).
[0099] Through the characteristic variable X j Split the node sample D into two subsets D L and D R , and calculate the change in the node Gini index after the split, which reflects the characteristic variable X j The influence degree on the classification of accident severity. The larger the value of the change, the greater the contribution of the characteristic variable to the classification of accident severity. The calculation formula is:
[0100]
[0101] Among them, ΔGini(X j ) is the change in the Gini index of the node after the split, Gini(D) is the Gini index of the node sample D, |D L | is the child node dataset D after splitting L The size of |D R | is the child node dataset D after splitting R The size of |D| is the size of the current node data set D, Gini(D L ) is the child node data set D L The Gini index, Gini (D R ) is the child node data set D R The Gini index, X j is the jth feature variable.
[0102] This example traverses all decision trees in the random forest and accumulates the feature variables X j The change in the Gini index caused by each node split is used to obtain the characteristic variable X j The overall impact on the classification of accident severity in random forests, that is, the importance of feature variables. The calculation formula is:
[0103]
[0104] Among them, T is the set of all trees in the random forest, t is the serial number of each tree, and i is the serial number of each node in the tree.
[0105] In this embodiment, the importance of all characteristic variables is standardized to obtain the relative importance of each characteristic variable to the severity of the accident. The calculation formula is:
[0106]
[0107] Where n is the total number of feature variables in the model.
[0108] This embodiment sorts the feature variables from high to low according to the importance of the standardized feature variables. For the feature variables ranked in the top k, their importance scores are accumulated and calculated, and the comprehensive score is divided by the total importance score of all feature variables to obtain the cumulative contribution ratio. The calculation formula is:
[0109]
[0110] According to the set 80% threshold, the selected feature variables are determined.
[0111] S5. Based on the characteristic variables that affect the severity of traffic accidents, a joint prediction model for the severity of accidents caused by autonomous driving and manual driving in a mixed traffic environment is constructed to predict the severity of accidents.
[0112] In an optional embodiment of the present invention, step S5 constructs a joint prediction model for the severity of accidents of automatic driving and manual driving in a mixed traffic environment to predict the severity of the accident based on the characteristic variables affecting the severity of the traffic accident, including:
[0113] The severity of autonomous driving accidents and manual driving accidents was used as the dependent variable, and the characteristic variables affecting the severity of traffic accidents were used as the independent variables to construct a random parameter bivariate Probit model.
[0114] Assuming that the regression coefficient of the independent variable in the model varies randomly between different accident samples, set a new regression coefficient of the independent variable;
[0115] The joint probability density function of all accident data is established based on the independent variables and the new independent variable regression coefficients, and converted into a log-likelihood function;
[0116] The integral in the log-likelihood function is approximated using a quasi-Monte Carlo method;
[0117] Based on the approximate log-likelihood function, the parameters are iteratively estimated using the gradient descent method;
[0118] Through multiple iterations of optimization, until the log-likelihood function converges, the coefficient value of each characteristic variable for the accident severity classification is finally obtained.
[0119] In this embodiment, step S5 uses the severity of autonomous driving accidents and manual driving accidents as dependent variables and the top 20 feature variables in terms of feature vector importance as independent variables to establish a random parameter bivariate Probit to obtain the parameter estimation results of the final model.
[0120] This embodiment is based on the sample data set D2, takes the severity of autonomous driving accidents and manual driving accidents as dependent variables, and takes the screened characteristic variables as independent variables to construct a bivariate Probit model, specifically:
[0121]
[0122] Among them, y i,1 and i,2 Represent the severity results of autonomous driving accidents and manual driving accidents, respectively, and and represents the corresponding latent variable. i,1 and X i,2 are independent variables, representing accident characteristics, road characteristics, and built environment variables related to accident severity. i,1 and β i,2 is the regression coefficient of the corresponding independent variable, ε i,1 and ε i,2 are the errors, which follow a standard normal distribution with mean 0 and variance 1.
[0123] Considering that there is a correlation between the severity of autonomous driving accidents and manual driving accidents, the error term ε i,1 and ε i,2 The correlation between them is expressed by the covariance matrix, which is:
[0124]
[0125] Among them, ρ is the correlation coefficient, which represents the correlation measure of the severity of autonomous driving and manual driving accidents.
[0126] This embodiment sets random parameters and assumes that the regression coefficients of the independent variables in the model vary randomly between different accident samples to capture the heterogeneity between individuals. Specifically,
[0127] β i ' ,1 =β i,1 +δ i,1
[0128] β i ' ,2 =βi,2 +δ i,2
[0129] Among them, δ i,1 and δ i,2 represents a randomly distributed term to capture unobserved heterogeneity in the accident data.
[0130] In this embodiment, for the i-th accident, P(Y i1 ,Y i2 ∣X i ,β i ' ,1 ,β i ' ,2 ,Σ) is the given independent variable X i and parameter β i ' ,1 ,β i ' ,2 , joint probability density under Σ conditions. Assuming that the N accident data are independently distributed, the likelihood function Represents the joint probability density function of all accident data, specifically:
[0131]
[0132] Where Σ is the covariance matrix between the severity of autonomous driving and manual driving accidents, and ε i,1 and ε i,2 f(β i ' ,1 ,β i ' ,2 ) is the random parameter β i ' ,1 ,β i ' ,2 The joint distribution of .
[0133] Since the model contains random parameters, it needs to be converted into a log-likelihood function, and the calculation formula is:
[0134]
[0135] This embodiment uses the quasi-Monte Carlo method to approximate the integral in the log-likelihood function, setting ε i,1 and ε i,2 The integral in the likelihood function is approximated by the random effect obtained by sampling M times from the normal distribution, and the calculation formula is:
[0136]
[0137] Where, M is the number of simulated sampling; represents the random effect parameter related to the severity of autonomous driving accidents in the i-th sample, is the random effect parameter related to the severity of manual driving accidents in the i samples, which are derived from the joint distribution f(β i ' ,1 ,β i ' ,2 ) is obtained by sampling m times.
[0138] For each accident sample i, its log-likelihood function is approximately:
[0139]
[0140] in, is the joint probability density function; Y i1 is the target random variable of the i-th sample, reflecting the classification result of the severity of the autonomous driving accident; Y i2 is the target random variable of the i-th sample, reflecting the classification result of the severity of the manual driving accident; X i are the accident characteristics, road characteristics and built environment variables related to the severity of accident i; Σ is the covariance matrix between the severity of autonomous driving and manual driving accidents, M is the number of simulation samplings, and this embodiment uses the gradient descent method to iteratively estimate parameters based on the approximate log-likelihood function. Assuming the random parameter β i ' ,1 and β i ' ,2 Normal distribution:
[0141]
[0142] Calculate the gradient of the distribution parameters. The calculation formulas are (with random parameters β i ' ,1 For example):
[0143]
[0144] in, is from the distribution f(β i ' ,1 ,β i ' ,2 ) draws the mth random parameter sample drawn from .
[0145] Update the independent variable regression coefficient according to the gradient of the distribution function, specifically:
[0146]
[0147] in, and are the random parameters β at the t+1th iteration. i ' ,1 The mean and variance of and are the random parameters β at the tth iteration. i ' ,1 The mean and variance of , η is the learning rate, is the gradient of the log-likelihood function.
[0148] Through multiple iterations of optimization, until the log-likelihood function converges, the final coefficient value of each characteristic variable for the accident severity classification is obtained. If the mean and variance of a random parameter are not significant at the significance level of 0.1, it is set as a fixed parameter and the estimation process is repeated until all parameters are significant. The parameter estimation results of the final model are shown in Table 2:
[0149] Table 2 shows the parameter estimation results of the random parameter bivariate Probit model
[0150]
[0151] Based on the above parameter estimation results, construct a i1 and i2 The random parameter bivariate probit model is:
[0152]
[0153] Where X i1 and X i2 is the characteristic variable determined in the parameter estimation results; β i ' ,1 ,β i ' ,2 are random effects, all with mean μ and variance σ 2 The coefficients in the table represent the random parameters μ and σ 2 .
[0154] Calculate the joint probability of the target variable and predict the severity of the autonomous driving accident and the manual driving accident as follows:
[0155]
[0156] where Φ2 is the cumulative distribution function of the bivariate normal distribution, Represents the feature variable X i A linear combination of the model parameters (mean vector μ1, μ2).
[0157] When P(Y i1 =1,Y i2 =1|X i )>0.5, then predict y i1 =1,y i2=1, that is, both the autonomous driving accident and the manual driving accident are serious injuries. If the above conditions are not met, it is predicted that at least one type of accident does not constitute a serious injury.
[0158] In an optional embodiment of the present invention, in order to compare and analyze the effectiveness of the method of the present invention, a random parameter univariate model (RUB) and a bivariate Probit (BP) model are simultaneously established, and the AIC value and likelihood ratio test are used to compare with the method of the present invention.
[0159] This embodiment is based on the Akaike information criterion (AIC), taking into account the complexity and fitting effect of the model, and calculates the relative goodness of fit of the model. The calculation formula is:
[0160] AIC=-2ln(L)+2k
[0161] Where k is the number of parameters in the model and L is the maximum likelihood estimate of the model.
[0162] This embodiment compares the likelihood function values of the two models based on the likelihood ratio test (LC) to evaluate whether there is a significant difference between the fitting effects of the models. The calculation formula is:
[0163] LR=-2ln(L N )-ln(L A )
[0164] Among them, ln(L N ) and ln(L A ) represent the log-likelihood values of model N and model A respectively.
[0165] When the P value corresponding to LR is less than 0.05, model A is considered to be significantly better than model N.
[0166] This embodiment uses the AUC value, accuracy, precision, and recall rate to evaluate the prediction accuracy of the model based on the actual accident severity category of the accident sample and the accident severity category predicted by the model. The calculation formula is:
[0167]
[0168] Among them, TP is the number of samples whose actual severity is injury accidents and the model also predicts them to be injury accidents; FP is the number of samples whose actual severity is no injury accidents but the model incorrectly predicts them to be injury accidents; TN is the number of samples whose actual severity is no injury accidents and the model also predicts them to be no injury accidents; FN is the number of samples whose actual severity is injury accidents but the model incorrectly predicts them to be no injury accidents.
[0169] The comparison results of the method of the present invention with the random parameter univariate model (RUB) and the bivariate Probit (BP) model are shown in Table 3:
[0170] Table 3 Goodness of fit of the three models
[0171]
[0172] Based on the goodness of fit test results of the above three models, the AIC values of the random parameter univariate Probit model, the bivariate Probit model and the random parameter bivariate Probit model are 1364.1, 1343.1 and 1334.7 respectively. The AIC value of the random parameter bivariate Probit model is significantly reduced (the difference is greater than 5 compared with other models), indicating that the random parameter bivariate Probit model provides an excellent fitting effect. In addition, the likelihood ratio test results confirm that the random parameter bivariate Probit model is statistically significantly better than the random parameter univariate Probit model and the bivariate. Therefore, the random parameter bivariate Probit model proposed in the present invention can significantly improve the goodness of fit of the accident severity under mixed environment, and has certain practical value.
[0173] In addition, the prediction accuracy of the model was evaluated based on the AUC value, accuracy, precision, and recall. The AUC value of the model was 0.74, the prediction accuracy was 0.66, the prediction precision was 0.65, and the prediction recall was 0.69. The values of the above evaluation indicators are all much greater than 0.5, indicating that the method provided by the present invention performs well and has a high accuracy in predicting the severity of accidents in a mixed environment of autonomous driving and manual driving.
[0174] In summary, the present invention starts with the original autonomous driving accident data, matches the manual driving accidents around the accident, and obtains vehicle movement, road characteristics and built environment characteristics through various channels, thus constructing a traffic accident characteristic variable data set in a mixed traffic environment. Through correlation analysis, redundant attributes are screened out and character data is independently encoded, and the original accident data set is processed into a data set that is convenient for statistical mining and analysis; and a random parameter bivariate Probit model is introduced to solve the problem of ignoring the correlation between dependent variables and the unobserved heterogeneity in the data set in the existing accident severity prediction model, thereby improving the prediction accuracy and goodness of fit of the model.
[0175] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0176] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0177] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0178] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
[0179] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A method for predicting the severity of accidents in mixed autonomous driving and manual driving, characterized in that: The following steps are involved: Obtain traffic accident data in a mixed environment of autonomous driving and manual driving; According to the accident location in the traffic accident data, the road traffic characteristics and built environment characteristics of the accident location are extracted; Match traffic accident data with road traffic characteristics and built environment characteristics at the accident location to establish a data set of traffic accident characteristic variables for autonomous driving and manual driving; Based on the characteristic variable data set of traffic accidents involving autonomous driving and manual driving, the characteristic variables that affect the severity of traffic accidents are screened based on machine learning; According to the characteristic variables that affect the severity of traffic accidents, a joint prediction model for the severity of accidents caused by autonomous driving and manual driving is constructed in a mixed traffic environment to predict the severity of accidents.
2. The method for predicting the severity of an accident in mixed automatic driving and manual driving according to claim 1, characterized in that: Obtaining traffic accident data in a mixed environment of autonomous driving and manual driving includes: Extract autonomous driving accident feature information based on historical autonomous driving accident data, and set an independent accident code for each autonomous driving accident; the accident features include accident time, accident location, collision type, vehicle characteristics, natural environmental conditions, and accident details; Locate the accident location based on the accident location and accident details, and convert it into longitude and latitude coordinates in the earth coordinate system; Extracting characteristic information of manual driving accidents based on historical manual driving accident data; According to the characteristic information of autonomous driving accidents and manual driving accidents, all manual driving accidents with the same road characteristics and built environment characteristics as the autonomous driving accidents are screened in the set first buffer zone, and the manual driving accidents closest to the autonomous driving accidents are selected for pairing to generate traffic accident data in a mixed environment of autonomous driving and manual driving.
3. The method for predicting the severity of an accident in mixed automatic driving and manual driving according to claim 1, characterized in that: According to the accident location in the traffic accident data, the road traffic characteristics and built environment characteristics of the accident location are extracted, including: According to the accident location in the traffic accident data, the road feature information of the accident location is extracted; the road features include intersection type, traffic control facility type, central separation facility type, number of lanes, pedestrian crossings and roadside parking spaces; According to the accident location in the traffic accident data, the road attribute information of the accident location is extracted; the road attributes include road name, road grade, speed limit, number of lanes and one-way roads; According to the accident location in the traffic accident data, the built environment information of the accident location within the set second buffer zone is extracted; the built environment includes land use type, parks, restaurants, schools, bus and subway stations, hospitals and shopping centers.
4. The method for predicting the severity of accidents in mixed automatic driving and manual driving according to claim 1, characterized in that: The traffic accident data is matched with the road traffic characteristics and built environment characteristics of the accident location points to establish a data set of traffic accident characteristic variables for autonomous driving and manual driving, including: According to the accident codes and longitude and latitude coordinates, the characteristic information of autonomous driving accidents, the characteristic information of manual driving accidents, the road characteristic information, the road attribute information and the built environment information are matched to establish a characteristic variable data set of autonomous driving and manual driving traffic accidents.
5. The method for predicting the severity of an accident in mixed automatic driving and manual driving according to claim 1, characterized in that: Based on the characteristic variable dataset of traffic accidents involving autonomous driving and manual driving, the characteristic variables that affect the severity of traffic accidents are screened based on machine learning, including: Based on the characteristic variable dataset of autonomous driving and manual driving traffic accidents, the random forest model was constructed with the severity of autonomous driving accidents and manual driving accidents as the target variable, and the accident characteristics, road characteristics, and built environment characteristics as the characteristic variables. In each decision tree of the random forest, the Gini index is used to measure the classification contribution of the feature variable to the severity of the accident when the node is split. The node sample is split into two subsets by the feature variable, and the change in the node Gini index after the split is calculated; Traverse all decision trees in the random forest, accumulate the changes in the Gini index caused by the feature variables in each node split, and obtain the feature variable importance of the feature variable for the accident severity classification effect in the random forest; The importance of all characteristic variables is standardized to obtain the relative importance of each characteristic variable to the severity of the accident; The characteristic variables are sorted from high to low according to their relative importance, the cumulative contribution ratio is calculated based on the first number of characteristic variables, and the characteristic variables that affect the severity of the traffic accident are determined based on the cumulative contribution ratio of the characteristic variables and the set threshold.
6. The method for predicting the severity of an accident in mixed automatic driving and manual driving according to claim 5, characterized in that: The calculation method of the change in the Gini index of a node after splitting is: Among them, ΔGini(X j ) is the change in the Gini index of the node after the split, Gini(D) is the Gini index of the node sample D, |D L | is the child node dataset D after splitting L The size of |D R | is the child node dataset D after splitting R The size of |D| is the size of the current node data set D, Gini(D L ) is the child node data set D L The Gini index, Gini (D R ) is the child node data set D R The Gini index, X j is the jth feature variable.
7. The method for predicting the severity of accidents in mixed automatic driving and manual driving according to claim 5, characterized in that: The calculation method of the cumulative contribution ratio of the characteristic variable is: The first number of characteristic variables are accumulated, and the ratio of the sum of the accumulated characteristic variables to the sum of all characteristic variables is calculated to obtain the cumulative contribution ratio of the characteristic variables.
8. The method for predicting the severity of accidents in mixed automatic driving and manual driving according to claim 1, characterized in that: According to the characteristic variables affecting the severity of traffic accidents, a joint prediction model for the severity of accidents caused by autonomous driving and manual driving in mixed traffic environments is constructed to predict the severity of accidents, including: The severity of autonomous driving accidents and manual driving accidents was used as the dependent variable, and the characteristic variables affecting the severity of traffic accidents were used as the independent variables to construct a random parameter bivariate Probit model. Assuming that the regression coefficient of the independent variable in the model varies randomly between different accident samples, set a new regression coefficient of the independent variable; The joint probability density function of all accident data is established based on the independent variables and the new independent variable regression coefficients, and converted into a log-likelihood function; The integral in the log-likelihood function is approximated using a quasi-Monte Carlo method; Based on the approximate log-likelihood function, the parameters are iteratively estimated using the gradient descent method; Through multiple iterations of optimization, until the log-likelihood function converges, the coefficient value of each characteristic variable for the accident severity classification is finally obtained.
9. The method for predicting the severity of accidents in mixed automatic driving and manual driving according to claim 8, characterized in that: The quasi-Monte Carlo method is used to approximate the integral in the log-likelihood function: in, is the joint probability density function, Y i1 is the target random variable related to the classification result of the severity of the autonomous driving accident in the i-th sample, Y i2 is the target random variable related to the classification result of the severity of human driving accidents in the i-th sample, X i are the accident characteristics, road characteristics and built environment variables related to the severity of the i-th sample, represents the random parameter related to the severity of the autonomous driving accident in the i-th sample, is the random parameter related to the severity of manual driving accidents in the i samples, Σ is the covariance matrix between the severity of automatic driving and manual driving accidents, and M is the number of simulated sampling.
10. The method for predicting the severity of accidents in mixed automatic driving and manual driving according to claim 8, characterized in that: Based on the approximate log-likelihood function, the gradient descent method is used to iteratively estimate the parameters, specifically: and and are the random parameters β at the tth iteration. i ′ ,1 The mean and variance of , η is the learning rate, is the gradient of the log-likelihood function.
Citation Information
Patent Citations
Road traffic accident risk factor analysis method based on random forest
CN110276370A
Urban road traffic accident risk assessment method based on gradient boosting decision tree
CN116777300A
Road traffic accident severity and duration prediction method
CN117010559A
Method for predicting severity interaction of traffic accidents in urban area and urban-rural combination part
CN117373238A
Organic solar cell and the manufacturing method thereof
KR1020240145791A