A target city traffic accident severity analysis method
Through cross-city data feature alignment and cost-sensitive classification model, the problems of insufficient traffic accident data and class imbalance in the target city are solved, accurate traffic accident severity analysis is achieved, and reliable policy recommendations are provided for traffic management.
Patent Information
- Application Number
- CN202211499937.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-11-28
Smart Images

Figure CN116311882B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a target city traffic accident severity analysis method and belongs to the technical field of traffic safety. BACKGROUND
[0002] Road traffic accidents have become one of the main causes of casualties in many countries, and have brought heavy costs to the society. In the past decade, based on the historical data of road traffic accidents, modeling and analyzing the influencing factors leading to traffic accidents have become a widely used research method in the field of traffic safety. The research results of traffic accident causality analysis can provide suggestions and inspirations for the traffic management department to formulate policies to prevent traffic accidents, and thus have strong practical application value.
[0003] In the existing traffic accident analysis, researchers often assume that there are a large number of complete traffic accident data in the target city. Obviously, collecting complete traffic accident data requires installing a large number of monitoring devices on each urban road and paying a large amount of manpower and financial resources for device supervision and data processing. In fact, some low-level development cities often cannot afford such high data collection costs. In some high-level development cities, even if the traffic management department has collected complete traffic accident data, due to data privacy considerations, only a small amount of low-sensitive accident data can be obtained. Based on the above analysis, it can be known that in actual traffic accident analysis, the problem of less data in the target city must be faced and solved.
[0004] In the analysis of traffic accident severity, there is also a class imbalance problem, that is, the number of samples of serious accidents leading to death or serious injury is much smaller than the number of samples of non-serious accidents leading to minor injury or no injury. Researchers often use resampling techniques to solve the class imbalance problem in accident severity analysis, but whether the few serious accident samples are oversampled or the majority of non-serious accidents are undersampled, the resampling method changes the data distribution of the original accident data, which is easy to lead to a locally optimal prediction result, and is not conducive to the accurate analysis of traffic accidents. SUMMARY
[0005] In order to solve the problem of less data and class imbalance affecting the accuracy of analysis in traffic accident severity analysis, the application proposes a target city traffic accident severity analysis method, introduces cross-city traffic accident data and a cost-sensitive classification model, and accurately obtains the influencing factors leading to different severity of traffic accidents in the target city under the condition of using only a small amount of traffic accident data in the target city.
[0006] To solve the above technical problems, the application adopts the following technical means:
[0007] The application provides a target city traffic accident severity analysis method, comprising the following steps:
[0008] Traffic accident data of different cities is acquired, and a target city and a source city are determined according to the amount of traffic accident data of each city.
[0009] The traffic accident data of the target city and the source city distributed in the heterogeneous feature space is aligned in features by using a unified feature representation method, so that a same city traffic accident sample feature representation of the cross-city traffic accident sample is obtained.
[0010] The same city traffic accident sample feature representation of the cross-city traffic accident sample is brought into a cost-sensitive cross-city traffic accident analysis model, so that influence factors leading to different severities of the target city traffic accident are obtained.
[0011] Further, the amount of traffic accident data of the target city is less than the amount of traffic accident data of the source city.
[0012] Further, the traffic accident data of the target city represents the i th traffic accident sample in the target city, D t is the total number of accident features in the target city traffic accident data, N t is the total number of traffic accident samples of the target city, i=1, 2, …, N t ; the traffic accident data of the source city wherein, represents the j th traffic accident sample in the source city, D s is the total number of accident features in the source city traffic accident data, N s is the total number of traffic accident samples of the source city, j=1, 2, …, N s .
[0013] Further, the same city traffic accident sample feature representation of the cross-city traffic accident sample is as follows:
[0014]
[0015] wherein, UFR(x) represents the same city traffic accident sample feature representation of the cross-city traffic accident sample, x is the target city traffic accident sample or the source city traffic accident sample, represents D c dimensional traffic accident features common to the target city and the source city, represents D t -D c dimensional traffic accident features unique to the target city, represents D s -D c dimensional traffic accident features unique to the source city.
[0016] Further, the serious accident data in the traffic accident is taken as the positive class, and the non-serious data is taken as the negative class, according to the source city traffic accident sample after uniform feature representation, the cost-sensitive Logistic regression is trained and the accident severity knowledge w of the source city is obtained (s) .
[0017] Further, the cost-sensitive cross-city traffic accident analysis model is trained based on the accident severity knowledge w of the source city, and the objective function of the cost-sensitive cross-city traffic accident analysis model is as follows: (s)
[0018]
[0019] Wherein, w represents the likelihood parameter of the Logistic regression, C represents the misclassification cost of the positive class sample, N represents the total number of traffic accident samples of the target city, (t) + t represents the i th traffic accident sample in the target city, represents the class of the sample , and represents the sample is positive, represents the sample after uniform feature representation, C represents the misclassification cost of the negative class sample, _ represents the sample is negative, and λ is the intensity coefficient of cross-city knowledge migration, i=1, 2, …, N t t
[0020]
[0021] Wherein, represents the isomorphic sample feature representation , and represents the posterior probability of the isomorphic sample feature representation
[0022] Further, the method for obtaining the influencing factors causing different severity of the target city traffic accident is as follows:
[0023] The isomorphic sample feature representation of the target city is brought into the cost-sensitive cross-city traffic accident analysis model, the likelihood parameter w of the Logistic regression for analyzing the severity of the target city accident is obtained by solving the objective function of the cost-sensitive cross-city traffic accident analysis model (t) ;
[0024] Likelihood parameters w based on logistic regression (t) , For any target city traffic accident sample By calculating its posterior probability About the target city traffic accident sample Arbitrary component The partial derivative is obtained Quantitative analysis rule: if The kth accident feature has a positive correlation with the serious accident; if The kth accident feature has a positive correlation with the non-serious accident; wherein, Indicates the likelihood parameter corresponding to the kth dimension of the accident feature in the target city traffic accident data, k=1,…,D t , D t The total number of accident features in the target city traffic accident data.
[0025] The following advantages can be obtained after using the above technical means:
[0026] The application provides a target city traffic accident severity analysis method, which uses source city traffic accident data with a large amount of data and a cost-sensitive classification model to analyze the severity of target city traffic accidents. First, the feature alignment of the target city and the source city traffic accident data is performed through a unified feature representation method, and then a unified and analysis-friendly isomorphic sample feature representation is obtained. Then, the cross-city traffic accident analysis model is trained using the source city traffic accident data, and a cost-sensitive cross-city traffic accident analysis model that is unbiased to the majority and minority samples is obtained. Finally, the influencing factors leading to different severity of target city traffic accidents are accurately obtained through the cost-sensitive cross-city traffic accident analysis model. The application can accurately and reliably analyze traffic accidents under the condition of using only a small amount of target city traffic accident data, solves the problem of few data and class imbalance in the prior art, can provide suggestions and inspirations for the traffic management department to formulate policies to prevent traffic accidents, and has high practical value. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 It is a step flow chart of the target city traffic accident severity analysis method. DETAILED DESCRIPTION
[0028] The technical solutions of the application will be further described below in combination with the drawings:
[0029] The application provides a target city traffic accident severity analysis method, which uses source city traffic accident data with a large amount of data and a cost-sensitive classification model to analyze the severity of target city traffic accidents. First, the feature alignment of the target city and the source city traffic accident data is performed through a unified feature representation method, and then a unified and analysis-friendly isomorphic sample feature representation is obtained. Then, the cross-city traffic accident analysis model is trained using the source city traffic accident data, and a cost-sensitive cross-city traffic accident analysis model that is unbiased to the majority and minority samples is obtained. Finally, the influencing factors leading to different severity of target city traffic accidents are accurately obtained through the cost-sensitive cross-city traffic accident analysis model. The application can accurately and reliably analyze traffic accidents under the condition of using only a small amount of target city traffic accident data, solves the problem of few data and class imbalance in the prior art, can provide suggestions and inspirations for the traffic management department to formulate policies to prevent traffic accidents, and has high practical value. Figure 1
[0030] Step A, obtain traffic accident data of different cities, determine target city and source city according to the amount of traffic accident data of each city. The traffic accident data of each city contains a plurality of traffic accident samples, and the traffic accident sample needs to contain the space-time information in a period of time before and after the occurrence of the traffic accident, such as accident occurrence time, weather condition, accident location, road traffic condition, accident impact mode, whether there is personnel casualty, whether hit-and-run, etc.
[0031] The present application collects a small amount of target city traffic accidents, denoted as Among them, represents the i-th traffic accident sample in the target city, D t is the total number of accident characteristics in the target city traffic accident data, and the accident characteristics refer to accident occurrence time, weather condition, accident location, road traffic condition, accident impact mode, whether there is personnel casualty, whether hit-and-run, etc., N t is the total number of traffic accident samples of the target city, i=1, 2, …, N t The present application selects a city with a large amount of traffic accident data as a source city, and the traffic accident data of the source city is denoted as Among them, represents the j-th traffic accident sample in the source city, D s is the total number of accident characteristics in the source city traffic accident data, N s is the total number of traffic accident samples of the source city, j=1, 2, …, N s .
[0032] In the embodiment of the present application, the target city can be a known city, and the source city is determined according to the target city, and the amount of traffic accident data of the target city is required to be less than that of the source city. In theory, any city other than the target city can be used as the source city, but when selecting the source city in practice, the following two points need to be considered:
[0033] 1. Considering the rigor and rationality of traffic accident analysis, the amount of traffic accident data of the source city should be much larger than that of the target city, i.e. N t <<N s Therefore, the present application selects a city with as much traffic accident data as possible as the source city, so as to analyze the traffic accident situation of the target city based on the traffic accident data of the source city subsequently.
[0034] 2. Considering the explainability of cross-city common accident knowledge, the present application assumes that there is at least one common accident characteristic between the traffic accident data of the target city and the source city, i.e. D c ≥1; in order to meet this assumption, the present application selects a city with as many common characteristics as possible with the traffic accident data of the target city as the source city.
[0035] Step B, using uniform feature representation method to align the target city and source city traffic accident data distributed in heterogeneous feature space, to obtain the isomorphic sample feature representation of cross-city traffic accident samples, so as to subsequent similarity calculation. The cross-city traffic accident samples include both target city traffic accident sample information and source city traffic accident sample information.
[0036] In the embodiment of the application, the isomorphic sample feature representation of the cross-city traffic accident samples is as follows:
[0037]
[0038] Wherein, UFR(x) represents the isomorphic sample feature representation of the cross-city traffic accident samples, x is the target city traffic accident sample or the source city traffic accident sample, D common traffic accident features in the target city and the source city are represented by c D unique traffic accident features in the target city are represented by t c D unique traffic accident features in the source city are represented by s c .
[0039] In the embodiment of the application, if x represents the target city traffic accident sample, the isomorphic sample feature representation of the target city can be obtained by using formula (4) Wherein, Similarly, if x represents the source city traffic accident sample, the isomorphic sample feature representation of the source city can be obtained by using formula (4) Wherein,
[0040] Step C, taking the isomorphic sample feature representation of the cross-city traffic accident samples into the cost-sensitive cross-city traffic accident analysis model, to obtain the influencing factors leading to different severity of the target city traffic accidents.
[0041] In the embodiment of the application, the traffic accident leading to death or serious injury is defined as a serious accident, and other traffic accidents are defined as non-serious accidents. The serious accidents in the traffic accident data are taken as positive class (+1), and the non-serious data are taken as negative class (-1).
[0042] Step C01, analyzing the traffic accident severity by the classifier, the application can select a cost-sensitive Logistic regression model or a support vector machine model. In the embodiment of the application, a cost-sensitive Logistic regression model is adopted. According to the source city traffic accident samples after uniform feature representation, the cost-sensitive Logistic regression is trained to obtain the likelihood parameters w of the Logistic regression of the source city (s) , that is, the accident severity knowledge of the source city, which can be used for predicting the accident severity of the source city.
[0043] The objective function of the cost-sensitive Logistic regression model corresponding to the source city traffic accident is as follows:
[0044]
[0045] wherein, C + represents the misclassification cost of the positive class sample, represents the number of positive class samples in the source city traffic accident data, represents the class of the sample , y represents that the sample is positive, represents the isomorphic sample feature representation of the sample after uniform feature representation, C _ represents the misclassification cost of the negative class sample, represents the number of negative class samples in the source city traffic accident data, represents the class of the sample , y represents that the sample
[0046] is negative.
[0047] wherein, represents the posterior probability of the isomorphic sample feature representation belonging to the class.
[0048] Step C02, training the cost-sensitive cross-city traffic accident analysis model based on the accident severity knowledge w (s) of the source city, and bringing the isomorphic sample feature representation of the target city into the cost-sensitive cross-city traffic accident analysis model, to obtain the likelihood parameters w of the Logistic regression for analyzing the accident severity of the target city by solving the objective function of the cost-sensitive cross-city traffic accident analysis model. (t) .
[0049] The objective function of the cost-sensitive cross-city traffic accident analysis model is as follows:
[0050]
[0051] where w (t) represents the likelihood parameter of Logistic regression, represents the class of sample , represents the sample is positive class, represents the sample isomorphic sample feature representation after uniform feature representation, represents the sample is negative class, and λ is the intensity coefficient of cross-city knowledge transfer.
[0052]
[0053] where, represents the isomorphic sample feature representation belongs to the posterior probability of class.
[0054] Since the target city has a small data problem, i.e., N t →0, the cost-sensitive Logistic regression model can only learn the biased likelihood parameter w (t) , but the source city has more complete accident samples, so it is easy to learn the unbiased likelihood parameter w (s) of the source city. In order to use the unbiased likelihood parameter w (s) to guide the learning of the biased likelihood parameter w (t) of the target city, the formula (7) of the application realizes the common accident severity knowledge between cities by minimizing knowledge transfer from the source city to the target city.
[0055] In formula (7), the parameter λ is used to control the intensity of cross-city knowledge transfer, and the value of λ can be an empirical value given by a person, or the optimal value of λ can be obtained by cross-validation model training method. The greater the value of λ, the greater the intensity of knowledge transfer.
[0056] In the embodiment of the application, the LIBLINEAR MATLAB toolkit can be used to solve the model objective function and obtain the likelihood parameter.
[0057] Step C03, based on the likelihood parameter w (t) of Logistic regression, represents the likelihood parameter corresponding to the kth-dimensional accident feature in the target city traffic accident data, and for any target city traffic accident sample by calculating its posterior probability about the target city traffic accident sample any component the partial derivative of the function is greater than 0, that is, if the kth accident feature has a positive correlation with the serious accident; if the kth accident feature has a positive correlation with the non-serious accident; wherein, k = 1, …, D t .
[0058] Through the above analysis, the influence of each accident feature on the severity of the traffic accident can be obtained. After dividing the accident features that have a positive correlation with the serious accident and the accident features that have a positive correlation with the non-serious accident, the influence factors of the different severity of the traffic accident in the target city are obtained.
[0059] Compared with the prior art, the present application introduces cross-city traffic accident data and a cost-sensitive classification model, and can accurately and reliably analyze the traffic accident, find out the influence factors of the different severity of the traffic accident, and provide suggestions and inspirations for the traffic management department to formulate policies for preventing the occurrence of traffic accidents, which has high practical value.
[0060] The above only describes the preferred embodiments of the present application, and it should be pointed out that, for ordinary skilled persons in the technical field, several improvements and modifications can be made without departing from the technical principles of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.
Claims
1. A method for analyzing the severity of urban traffic accidents in a target city, characterized by, The method comprises the following steps: Obtaining traffic accident data of different cities, and determining a target city and a source city according to the amount of traffic accident data of each city; Performing feature alignment on the traffic accident data of the target city and the source city distributed in a heterogeneous feature space by using a unified feature representation method to obtain a homogeneous sample feature representation of cross-city traffic accident samples; Bringing the homogeneous sample feature representation of the cross-city traffic accident samples into a cost-sensitive cross-city traffic accident analysis model to obtain influence factors leading to different severity of traffic accidents in the target city; The serious accident in the traffic accident data is taken as a positive class, and the non-serious data is taken as a negative class, and according to the source city traffic accident sample after uniform feature representation, the cost-sensitive Logistic regression is trained and the accident severity knowledge of the source city is obtained source city-based accident severity knowledge , the cost-sensitive cross-city traffic accident analysis model is trained, and an objective function of the cost-sensitive cross-city traffic accident analysis model is: ; wherein, represents the likelihood parameter of the Logistic regression, represents the misclassification cost of the positive class samples, is the total number of traffic accident samples in the target city, represents the i-th traffic accident sample in the target city, represents the class of the sample , represents the sample is positive, represents the sample isomorphic sample feature representation after uniform feature representation, represents the misclassification cost of the negative class samples, represents the sample is negative, is the intensity coefficient of cross-city knowledge transfer, , is the total number of traffic accident samples in the target city; ; wherein, represents a homogenous sample feature representation belongs to the posterior probability of the class.
2. The method for analyzing the severity of urban traffic accidents in a target city according to claim 1, characterized in that, The amount of traffic accident data of the target city is less than that of the source city.
3. The method for analyzing the severity of traffic accidents in a target city according to claim 1, wherein, Traffic accident data of a target city , , denotes the i-th traffic accident sample in the target city, is the total number of accident features in the traffic accident data of the target city, is the total number of traffic accident samples of the target city, Traffic accident data of a source city , wherein, denotes the j-th traffic accident sample in the source city, is the total number of accident features in the traffic accident data of the source city, is the total number of traffic accident samples of the source city, .
4. The method for analyzing the severity of urban traffic accidents in a target city according to claim 3, characterized in that, The homogeneous sample feature representation of the cross-city traffic accident samples is as follows: ; wherein, represents the isomorphic sample feature representation of the cross-city traffic accident sample, x is the target city traffic accident sample or the source city traffic accident sample, represents the common dimension traffic accident feature in the target city and the source city, represents the unique dimension traffic accident feature in the target city, represents the unique dimension traffic accident feature in the source city.
5. The method for analyzing the severity of urban traffic accidents in a target city according to claim 1, wherein, The method for obtaining the influence factors leading to different severity of traffic accidents in the target city is as follows: representing the homogenous sample features of the target city into the cost-sensitive cross-city traffic accident analysis model, by solving the objective function of the cost-sensitive cross-city traffic accident analysis model, obtaining the likelihood parameters of the Logistic regression for analyzing the accident severity of the target city ; Likelihood parameters based on logistic regression , , for any target city traffic accident sample , by computing its posterior probability about the target city traffic accident sample Any component partial derivative, get quantitative analysis rules: if , the first accident characteristics on the positive correlation of the cause of serious accidents; if , the first accident characteristics on the positive correlation of the cause of non-serious accidents; wherein, indicates the likelihood parameters corresponding to the k-dimensional accident characteristics in the target city traffic accident data, , the total number of accident characteristics in the target city traffic accident data.
Citation Information
Patent Citations
Method for quantifying spatial and temporal distribution of traffic accidents based on built environment and micro-blog data
CN107622325A
Cross-modal data prediction method based on transfer learning
CN112863182A
Fault diagnosis method and diagnosis framework based on deep cost sensitive convolutional network
CN114139598A