A traffic accident risk assessment method in continuous flow road scenarios

Through self-organized mapping cluster analysis and basic learner model, combined with self-organized mapping network and support vector machine, decision tree or artificial neural network, the problems of low accuracy and complex debugging of risk assessment models in the continuous flow road scenario in the existing technology are solved, and high-precision and rapid risk assessment and early warning are achieved, which improves the safety of the traffic system.

CN117238126BActive Publication Date: 2025-08-26SOUTHEAST UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311103644.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-29
Publication Date
2025-08-26
Estimated Expiration
2043-08-29

AI Technical Summary

Technical Problem

Existing real-time risk assessment models generally have problems such as low accuracy and requiring a lot of expert knowledge in continuous flow road scenarios, which are difficult to quickly build and put into use.

Method used

Adopted self-mapping cluster analysis and base learner model, combined with self-mapping network and support vector machine, decision tree or artificial neural network, a risk scenario identification model is constructed through self-mapping cluster analysis, the model is trained using the base learner, and the best risk threshold is selected through ROC curves and AUC indicators to achieve rapid risk assessment without complex parameter debugging.

Benefits of technology

It realizes high-precision real-time risk assessment in continuous flow road scenarios, can accurately predict road risks and provide early warnings, and improves the safety and reliability of the traffic system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117238126B_ABST
    Figure CN117238126B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for assessing traffic accident risk in a continuous flow road scenario, comprising: constructing a case-control dataset, dividing it into historical sample data and test data, performing self-organizing map cluster analysis using the historical sample data, and building a risk scenario identification model; inputting a test dataset, determining the risk scenario to which the test data belongs, training a base learner model using the historical sample data of the risk scenario as a training set, and outputting prediction results for the test data; plotting a receiver operating characteristic (ROC) curve for the prediction results of the test data, evaluating goodness of fit using the area under the curve (AUC) metric, and selecting an optimal risk threshold based on the Youden index; obtaining traffic flow parameters on the road to be assessed in real time, determining the risk scenario, and calculating the risk level on the road to be assessed in real time. The present invention provides accurate and real-time early warning of road traffic accident risks at a relatively low cost, thereby improving the safety and reliability of traffic system operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent transportation technology, and particularly relates to a traffic accident risk assessment method in a continuous flow road scenario. Background Art

[0002] Continuous traffic flow scenarios include high-grade roads such as expressways and urban freeways, characterized by restricted access, motor vehicle-only access, full interchanges, and complete closures. Accidents on such roads can negatively impact personal property and transportation efficiency. To reduce traffic accidents and improve traffic safety in continuous traffic flow scenarios, researchers are working to build a low-cost, transferable model that enables short-term monitoring and early warning of risks across a large area of ​​high-grade roads. This will facilitate timely implementation of control measures by road managers and help travelers plan their routes in advance. Numerous studies have been conducted domestically and internationally on accident causal analysis and safety measures. Numerous studies have confirmed that the occurrence of accidents is closely related to road traffic flow characteristics. Pre-accident traffic flow conditions, such as traffic volume, average speed, and environmental information, can indicate certain high-risk characteristics, making it possible to use road traffic flow information to pre-assess accident risks. However, the frequent occurrence of traffic accidents has not improved. Therefore, the focus of traffic safety management and control should shift from post-accident analysis to pre-accident risk assessment. The real-time accident risk assessment system can promptly remind drivers and supervisors to take necessary measures to avoid risks, which has important practical significance for reducing traffic accidents and protecting personal and property safety.

[0003] Currently, scholars have used econometric models to establish accident risk assessment models based on traffic flow data. While these models are simple to operate and understand, they generally suffer from low assessment accuracy. Complex machine learning models, such as deep learning, have further improved the accuracy of risk assessment. However, deep learning frameworks require complex model training and parameter tuning knowledge, and the resulting models are difficult to transfer, often requiring expert parameter re-tuning and training before they can be put into use. Therefore, there is an urgent need to establish new risk assessment models from the perspectives of accuracy and transferability. An ideal risk assessment model should be both highly accurate and transferable, and should not require complex expert knowledge to complete the model establishment and implementation.

[0004] Patent publication number CN106991510A proposes a method for predicting urban traffic accidents based on spatiotemporal distribution characteristics, while patent publication number CN110532298B proposes a multi-attribute weighted analysis method for railway accident causal factors. However, the former focuses on spatiotemporal distribution characteristics, and the influencing factors involve the personal information of traffic accident victims, making data acquisition difficult and lacking in portability. The latter, however, is specifically designed for railway accidents and is not applicable to continuous traffic road scenarios. Summary of the Invention

[0005] Technical problem to be solved: In response to the common problems of low accuracy and the need for extensive expert knowledge for model debugging in existing real-time risk assessment models, the present invention aims to design a traffic accident risk assessment method for continuous-flow road scenarios. This method can quickly construct an accident risk assessment module that can be put into use without the need for complex parameter debugging and model training, and whose assessment accuracy reaches the level of current mainstream complex machine learning models, and can predict road risks in real time.

[0006] Technical solution:

[0007] A traffic accident risk assessment method in a continuous flow road scenario, the traffic accident risk assessment method comprising the following steps:

[0008] S1: Obtain historical road accident data and historical traffic flow information for the road to be evaluated. Accident data and traffic flow parameters within a certain time range are collected. Whether an accident occurred is the dependent variable and traffic flow information is the independent variable to construct a case-control dataset. The accident data includes the event, location, and uplink and downlink directions of the accident. The traffic flow parameters include traffic volume, average speed, and lane occupancy of the road section.

[0009] S2: Divide the data in the case-control dataset into two categories: historical sample data and test data. Use the historical sample data to perform self-organizing map cluster analysis and build a risk scenario recognition model.

[0010] S3: Input the data set to be tested, determine the risk scenario to which the data to be tested belongs, use the historical sample data of the risk scenario as the training set to train the base learner model, and output the prediction results of the data to be tested;

[0011] S4: Draw the ROC curve for the prediction results of the test data, use the AUC indicator to evaluate the goodness of fit, and select the optimal risk threshold based on the Youden index;

[0012] S5: Obtain traffic flow parameters on the road to be evaluated in real time, use the risk scenario identification model determined in step S2 to determine the risk scenario, and use the risk assessment model determined in steps S3 and S4 to calculate the risk level on the road to be evaluated in real time.

[0013] Furthermore, in step S1, the process of collecting accident data occurring within a certain time range and traffic flow parameters within this time range includes the following sub-steps:

[0014] S101: Process the acquired historical road accident data and distinguish the upstream and downstream locations of the accident according to the location where the accident occurred;

[0015] S102: Historical traffic flow information is obtained from sensors deployed on the lanes. The traffic flow information sensor downstream of the traffic accident location is denoted as K, and the upstream sensor is denoted as K-1. Based on the time of the traffic accident, traffic flow information for sensors K and K-1 is collected within 5 to 10 minutes and 10 to 15 minutes before the accident. The traffic flow parameter variable flowdata is recorded as follows based on the cross-sectional location and time period:

[0016] flowdata=[f 1,up , v 1,up , o 1,up , f 2,up , v 2,up , o 2,up , f 1,down , v 1,down , o 1,down , f 2,down , v 2,down , o 2,down ]

[0017] Among them, the variable names f, v, and o represent traffic volume, average speed, and lane occupancy, respectively. Subscript 1 represents 5 to 10 minutes before the accident, subscript 2 represents 10 to 15 minutes before the accident, subscript up represents the upstream of the accident point, and subscript down represents the downstream of the accident point.

[0018] S103: The data label crash of the accident in step S101 is recorded as 1, and the normal driving data crash at the same location, same time and different date of the accident data is selected and recorded as 0 to construct a case-control dataset. The basic structure of the data in the case-control dataset is:

[0019] data = [crash, flowdata].

[0020] Furthermore, in step S1, the historical road accident data includes the time and location of the traffic accident, with the time being accurate to the minute level and the location being accurate to the hundred-meter level.

[0021] Furthermore, in step S1, in the case-control data set, the ratio of the number of normal driving data to the number of accident data is 3:1.

[0022] Furthermore, in step S2, the process of using historical sample data to perform self-organizing map cluster analysis and constructing a risk scenario identification model includes the following sub-steps:

[0023] S201: extracting historical sample data and test data from the case-control dataset according to the predicted partition ratio, and maintaining the ratio of accident data to normal driving data in the historical sample dataset and the test dataset consistent with the ratio of accident data to normal driving data in the case-control dataset;

[0024] S202: Use the historical sample data set to train the self-organizing map network model. According to the number N of historical sample data sets, the SOM network side length M is selected according to the following formula:

[0025]

[0026] Among them, there are M neurons on each side of the SOM network, with a total of M columns, totaling M 2 neurons, each neuron is connected to other neurons in a hexagonal pattern, forming a honeycomb network structure;

[0027] S203: Initialize the SOM network and randomly assign a K-dimensional weight w to each neuron j =[a k ], the value of k is consistent with the number of flowdata independent variable elements in the historical sample data; j is the neuron number, j = 1, 2, ..., M 2 ;

[0028] S204: For the historical sample data set X=[x1, x2, ...x i ..., x N ], input samples for training in sequence, and compare the i-th historical sample x i The Euclidean distance between each neuron weight is used as the clustering label of the historical sample, and the historical sample data x is determined by the following formula i Categories:

[0029]

[0030] Where, i = 1, 2, ..., N;

[0031] S205: Update SOM network weights:

[0032] w←w+ηh(d)(x i -w)

[0033] Where w is the weight to be updated, η is the learning rate, h(·) is the decay function, and d is the distance between the activated neuron and other neurons;

[0034] S206: Divide the risk scenarios according to the number of samples and accident samples in each SOM neuron, and calculate the accident rate r of each neuron c :

[0035]

[0036] Among them, N sample are all samples belonging to neuron c, N crash is the number of accident samples in neuron c;

[0037] S207, comparing the accident ratio in the clustered neurons with the accident data ratio in the historical sample data set. If the accident ratio in the clustered neurons exceeds the accident data ratio in the historical sample data set, it is identified as a high-risk scenario; otherwise, it is identified as a low-risk scenario.

[0038] Furthermore, in step S3, the base learner model adopts any one of a support vector machine model, a decision tree model, and an artificial neural network model.

[0039] Furthermore, in step S3, the process of training the base learner model using the historical sample data of the risk scenario as a training set and outputting the prediction results of the data to be tested includes the following steps:

[0040] S301: Select an artificial neural network as the base learner, determine the number of neurons in each layer of the artificial neural network, keep the number of elements in the input layer consistent with the traffic flow parameter variable flowdata, select one hidden layer with 8 hidden elements, and use a unit output layer. After each learning output prediction result, compare it with the measured value, and use the difference as the error back-propagation learning to update the synaptic weights.

[0041] S302: Input the test data in the test set, classify the test data in the SOM network, and compare the test data x p The Euclidean distance between each neuron weight is used as the clustering label of the sample, and the test data x is determined. p Category t;

[0042] S303: Select all the data x to be tested in the historical sample data set p A training set is constructed based on the data of category t, and the training set is applied to the artificial neural network for training. After the preset accuracy requirements are met, the model output is completed, and the test data is predicted and the predicted value is output. After the prediction is completed, the trained artificial neural network is discarded to complete the real-time learning process.

[0043] Furthermore, in step S4, the process of drawing an ROC curve for the prediction results of the test data, evaluating the goodness using the AUC indicator, and selecting the optimal risk threshold according to the Youden index includes the following steps:

[0044] S401: Calculate the ROC curve of the test set data, calculate the accident risk r of the case-control data set, and determine the minimum value r of the accident risk prediction value min and the maximum value r max , with r min is the minimum value, r max The classification threshold sequence C is constructed with the maximum value and 0.001 as the step size. j}, according to the elements in the classification threshold sequence C, calculate the corresponding confusion matrix in turn. The specific steps are:

[0045] The risk index is converted into a prediction of whether an accident will occur according to the following formula:

[0046]

[0047] Where y* is the prediction of whether an accident occurs. When y*=y=1, it is recorded as a true positive TP; when y*=1, y=0, it is recorded as a false positive FP; when y*=0, y=1, it is recorded as a false negative FN; when y*=y=0, it is recorded as a true negative TN. For each classification threshold c j , calculate the recall rate TPR under this threshold j and false alarm rate FPR j :

[0048]

[0049]

[0050] With FPR as the horizontal coordinate and TPR as the vertical coordinate, plot points in sequence in the two-dimensional coordinate system and calculate the area under the receiver operating status curve (AUC) surrounded by the above coordinates and the origin, (1, 1), and (1, 0);

[0051] S402: Select TPR j -FPR j The corresponding classification threshold c is the maximum j As the final classification threshold c y .

[0052] Furthermore, in step S5, for the road to be predicted, corresponding traffic flow information data is collected, and the collected data includes the traffic volume, average vehicle speed and lane occupancy rate of each section;

[0053] The collected traffic flow information data is imported into the risk scenario recognition model to determine the category to which the data belongs and identify the risk scenario; then the base learner is used for instant learning, real-time evaluation of the current road risk index is performed, and warnings are issued for scenarios that exceed the final classification threshold.

[0054] Beneficial effects:

[0055] The traffic accident risk assessment method under the continuous flow road scenario of the present invention helps to provide accurate and real-time early warning of road traffic accident risks at a relatively low cost, provides a theoretical basis for formulating proactive risk prevention and control measures, and improves the safety and reliability of traffic system operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 This is a flow chart of the traffic accident risk assessment method in a continuous flow road scenario of the present invention;

[0057] Figure 2 Schematic diagram of data collection;

[0058] Figure 3 Schematic diagram of SOM topology;

[0059] Figure 4 A flowchart comparing just-in-time learning strategies and traditional prediction models;

[0060] Figure 5 It is a risk assessment module based on self-organizing map and just-in-time learning strategy. DETAILED DESCRIPTION

[0061] The following examples may enable those skilled in the art to more fully understand the present invention, but are not intended to limit the present invention in any way.

[0062] See also Figure 1 The present invention discloses a traffic accident risk assessment method for a continuous flow road scenario, which provides a basis for real-time prediction of road risks, issuance of control measures, and travel route planning. The traffic accident risk assessment method includes the following steps:

[0063] S1: Obtain historical road accident data and historical traffic flow information for the road to be evaluated. Accident data and traffic flow parameters within a certain time range are collected. Whether an accident occurred is the dependent variable and traffic flow information is the independent variable to construct a case-control dataset. The accident data includes the event, location, and uplink and downlink directions of the accident. The traffic flow parameters include traffic volume, average speed, and lane occupancy of the road section.

[0064] S2: Divide the data in the case-control dataset into two categories: historical sample data and test data. Use the historical sample data to perform self-organizing map cluster analysis and build a risk scenario recognition model.

[0065] S3: Input the data set to be tested, determine the risk scenario to which the data to be tested belongs, use the historical sample data of the risk scenario as the training set to train the base learner model, and output the prediction results of the data to be tested;

[0066] S4: Draw the ROC curve for the prediction results of the test data, use the AUC indicator to evaluate the goodness of fit, and select the optimal risk threshold based on the Youden index;

[0067] S5: Obtain traffic flow parameters on the road to be evaluated in real time, use the risk scenario identification model determined in step S2 to determine the risk scenario, and use the risk assessment model determined in steps S3 and S4 to calculate the risk level on the road to be evaluated in real time.

[0068] Specifically, step S1 includes the following sub-steps:

[0069] S1.1: Historical road accident data includes the time and location of the accident. The time should be accurate to the minute, and the location should be accurate to the hundred-meter level. Based on the location of the accident, the upstream and downstream locations should be distinguished.

[0070] S1.2: If Figure 2 As shown in Figure 1, historical traffic flow information can be obtained by sensors deployed on the lanes. The traffic flow information sensor downstream of the traffic accident site is denoted as K, and the upstream sensor is denoted as K-1. Based on the time of the traffic accident, traffic flow information is collected from sensors K and K-1 within 5 to 10 minutes and 10 to 15 minutes before the accident, including traffic volume, average speed, and lane occupancy of the road section. The variables are denoted according to the section location and time period as follows:

[0071] flowdata=[f 1,up , v 1,uup , o 1,up , f 2,up , v 2,up , o 2,up , f 1,down , v 1,down , o 1,down , f 2,down , v 2,down , o 2,down ];

[0072] Among them, the variable names f, v, and o represent traffic volume, average speed, and lane occupancy, respectively. Subscript 1 represents 5 to 10 minutes before the accident, subscript 2 represents 10 to 15 minutes before the accident, subscript up represents the upstream of the accident point, and subscript down represents the downstream of the accident point.

[0073] S1.3: The case-control dataset is constructed by labeling the accident data in S1.1 as 1, and selecting the normal driving data with the same location, time, and date as the accident data as 0. The ratio of the number of normal driving data to the number of accident data is 3:1. The historical traffic flow information variables are added to both the accident data and the non-accident data as described in S1.2. The basic structure of the resulting case-control dataset is:

[0074] data = [crash, flowdata].

[0075] Specifically, step S2 includes the following sub-steps:

[0076] S2.1: The historical sample data and test data are extracted from the case-control dataset described in S1 in a ratio of 7:3, and the ratio of accident data to normal driving data in the historical sample dataset and the test dataset is also maintained at approximately 1:3;

[0077] S2.2: Use the historical sample data set to train the SOM network model. According to the number of historical sample data sets N, select the SOM network side length M according to the following formula:

[0078]

[0079] That is, there are M neurons on each side of the SOM network, with M columns in total, and M in total. 2 Each neuron is connected to other neurons in a hexagonal pattern to form a honeycomb network structure, such as Figure 3 As shown;

[0080] S2.3: Training the SOM clustering network. First, initialize the SOM network and randomly assign a K-dimensional weight w to each neuron. j =[a k ], the value of k is consistent with the number of flowdata independent variable elements in the historical sample data, and the value here can be 12;

[0081] S2.4: For the historical sample data set X = [x1, x2, ..., x N ], input samples for training in sequence, and compare historical samples x i The Euclidean distance between each neuron weight is used as the clustering label of the sample, that is, the historical sample data x i The category is determined by the following formula:

[0082]

[0083] S2.5: After each sample data is classified, the SOM network weights will be updated. The update formula is:

[0084] w←w+ηh(d)(x i -w)

[0085] Where w is the weight to be updated, η is the learning rate, which can be set to 0.5, and h(·) is the decay function. In practical applications, the standard Gaussian function is often used. d is the distance between the activated neuron and other neurons, and its Euclidean distance is calculated according to the coordinates of the neuron in the network;

[0086] S2.6: After all samples are classified, divide the risk scenarios according to the number of samples and the number of accident samples in each SOM neuron, and calculate the accident rate of each neuron:

[0087]

[0088] Among them, N sample are all samples belonging to neuron c, N crash is the number of accident samples in neuron c. In the historical sample data set, the number of accidents and the number of non-accidents theoretically maintain a ratio of about 1:3. Therefore, if the accident ratio in the clustered neurons exceeds 25%, it is identified as a high-risk scenario, and the others are low-risk scenarios.

[0089] Specifically, step S3 includes the following sub-steps:

[0090] S3.1: If Figure 4 The figure shows the basic process of just-in-time learning. First, the base learner as the classifier is determined. Various machine learning methods such as support vector machine, CART decision tree, artificial neural network, etc. can be used. Here, an artificial neural network (ANN) suitable for classification tasks and with fewer hyperparameters is selected as the base learner. The number of neurons in each layer of the ANN is determined. The input layer is kept consistent with the number of elements in the flowdata at 12. The hidden layer is selected as 1 layer with 8 hidden elements. The output layer is a unit. After each learning output prediction result, it is compared with the measured value, and the difference is used as the error back propagation learning to update the weights of each synapse.

[0091] S3.2: Input the test data in the test set. First, the test data is classified in the SOM network and compared with the test data x p The Euclidean distance between each neuron weight is used as the clustering label of the sample, that is, the test data x p The category is determined by the following formula:

[0092]

[0093] S3.3: In this embodiment, the training set is all the historical sample data sets that belong to the test data xp The data of category t is used to train the ANN. After the preset accuracy requirements are met, the model output is completed and the test data x is used to train the ANN. p Make predictions, output the predicted values, and discard the trained artificial neural network after the predictions are completed.

[0094] Specifically, step S4 includes the following sub-steps:

[0095] S4.1 Calculate the ROC curve of the test data obtained in step S3, calculate the accident risk r of the case-control data set according to the SOM-JITL-ANN model, and determine the minimum and maximum values ​​of the accident risk prediction value r min 、r max , with r min is the minimum value, r max The classification threshold sequence C is constructed with the maximum value and 0.001 as the step size. j}, according to the elements in the classification threshold sequence C, calculate the corresponding confusion matrix in turn. The specific steps are:

[0096] The risk index is converted into a prediction of whether an accident will occur according to the following formula:

[0097]

[0098] Where y* is the prediction of whether an accident occurs. When y*=y=1, it is recorded as a true positive (TP); when y*=1, y=0, it is recorded as a false positive (FP); when y*=0, y=1, it is recorded as a false negative (FN); when y*=y=0, it is recorded as a true negative (TN). For each classification threshold c j , calculate the recall rate (TPR) under this threshold j ) and false positive rate (FPR j ):

[0099]

[0100]

[0101] With FPR as the horizontal coordinate and TPR as the vertical coordinate, points are plotted in sequence in the two-dimensional coordinate system, and the area under the receiver operating characteristic (ROC) curve (AUC) enclosed by the above coordinates and the origin, (1, 1), and (1, 0) is calculated.

[0102] S4.2: Select TPR j -FPR j The corresponding classification threshold c is the maximum j As the final classification threshold c y .

[0103] Specifically, step S5 includes the following sub-steps:

[0104] S5.1: If Figure 5 As shown, for the road to be predicted, the traffic flow information data in step S1 is collected, including the traffic volume, average vehicle speed and lane occupancy of each section;

[0105] S5.2: If Figure 5 As shown in the figure, after the test data is input, the SOM network obtained in step S2 is first used to determine the category to which the data belongs, and risk scene recognition is performed. Then, the base learner in step S3 is used for real-time learning to evaluate the current road risk index in real time, and the final classification threshold c obtained in step S4 is exceeded. y Issue early warnings in the event of a

[0106] Specific examples

[0107] In order to demonstrate the practicality of the continuous stream road scene accident risk assessment method based on self-organizing map and real-time learning provided by the present invention, the following specific examples are used for further explanation.

[0108] Taking a specific expressway as an example, traffic flow and accident data were collected over a three-month period as described in step S1. The expressway is 13 kilometers long, and seven microwave sensors were deployed along the route to collect traffic flow data. Each sensor was approximately 1.6 kilometers apart, and each sensor recorded the cross-sectional traffic volume, average speed, and lane occupancy every 5 minutes. Accident data were collected and the time and location of the accident were confirmed, resulting in a total of 123 accidents. For each accident, traffic volume, occupancy, and speed data collected by sensors upstream and downstream of the accident site for the preceding 5-10 minutes and 10-15 minutes were used as feature variables, as described in step S1.2 of the specific implementation. A total of 12 independent variables were used. A case-control dataset was constructed as described in step S1.3 of the specific implementation. For each accident data item, three non-accident data items were randomly selected from the same observation section, at the same time, but on different dates, and the corresponding feature variables were calculated. The resulting case-control dataset contained 492 data items.

[0109] When using this dataset for performance testing, as described in step S2.1 of the specific implementation, all JITL-based methods used 70% of the data as a historical sample database and 30% as test data. Traditional modeling methods continued to divide the data into training and test sets, with the ratio of 70% to 30%, and the ratio of accident data to non-accident data in both sets was maintained at approximately 1:3.

[0110] According to step S2.2 of the specific implementation, a SOM network is constructed. After calculating M∈(2.65, 4.04), M=3 is selected here to establish a SOM network with 9 neurons. Training is performed according to steps S2.3 to S2.5 of the specific implementation. According to step S2.6 of the specific implementation, risk scenarios are identified. Among the 9 neurons, 2 neurons have an accident sample rate exceeding 25%, reaching 29.2% and 37.1% respectively, indicating that they are identified as high-risk scenarios. The others are identified as low-risk scenarios.

[0111] According to step S3.1 of the specific implementation method, an ANN is used as the base learner. The number of neurons in each ANN layer is determined. The input layer maintains the same number of elements as the flowdata at 12. A hidden layer is selected with 8 hidden elements, and the output layer is a unit. After each learning output prediction result, it is compared with the measured value, and the difference is used as the error backpropagation learning to update the synaptic weights. According to steps S3.2 and S3.3 of the specific implementation method, a similar sample set based on the SOM clustering results is constructed for the test data, and the prediction results of the test data are output. The AUC indicator is calculated according to step S4 of the specific implementation method. The results of SOM-JITL-ANN are compared with ANN and XGBoost. Directly using the ANN model for risk assessment is not effective, with an AUC of only 0.665. After applying the SOM-JITL strategy, performance is greatly improved, with an AUC indicator of 0.830, a 24.8% increase over traditional ANN and exceeding the AUC performance of 0.759 of complex machine learning XGBoost.

[0112] During the modeling process, SOM-JITL-ANN used the default parameters of the base learner and only made a single parameter adjustment on the SOM network structure configuration. However, when using the XGBoost algorithm for dataset testing, the default parameters ultimately resulted in an AUC metric close to 1 on the training set, but a test set AUC of only 0.6, resulting in a significant training-test metric discrepancy. Clearly, XGBoost was overfitting the training set, requiring hyperparameter adjustment. Parameter adjustment employed a greedy algorithm, listing multiple recommended values ​​for seven parameters: the number of decision trees, learning rate, maximum depth, column sampling ratio, L1 regularization weight, L2 regularization weight, and minimum leaf node branch loss. Once a parameter was optimal, the next parameter was optimized, resulting in an optimized model with a test set AUC of 0.759. This process would need to be repeated if the dataset was changed. Combined with the model accuracy comparison results, the SOM-JITL module greatly simplifies the parameter debugging process of complex machine learning models, making it possible to complete risk assessment modeling with less parameter adjustment knowledge. When considering model portability and having high accuracy requirements, the SOM-JITL module is a feasible and effective method.

[0113] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions based on the principles of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should be considered within the scope of protection of the present invention.

Claims

1. A traffic accident risk assessment method in a continuous flow road scenario, characterized in that: The traffic accident risk assessment method comprises the following steps: S1: Obtain historical road accident data and historical traffic flow information for the road to be evaluated. Accident data and traffic flow parameters within a certain time range are collected. Whether an accident occurred is the dependent variable and traffic flow information is the independent variable to construct a case-control dataset. The accident data includes the event, location, and uplink and downlink directions of the accident. The traffic flow parameters include traffic volume, average speed, and lane occupancy of the road section. S2: Divide the data in the case-control dataset into two categories: historical sample data and test data. Use the historical sample data to perform self-organizing map cluster analysis and build a risk scenario recognition model. S3: Input the data set to be tested, determine the risk scenario to which the data to be tested belongs, use the historical sample data of the risk scenario as the training set to train the base learner model, and output the prediction results of the data to be tested; S4: Draw the ROC curve for the prediction results of the test data, use the AUC indicator to evaluate the goodness of fit, and select the optimal risk threshold based on the Youden index; S5: Obtain traffic flow parameters on the road to be evaluated in real time, determine the risk scenario using the risk scenario identification model determined in step S2, and calculate the risk level on the road to be evaluated in real time using the risk assessment model determined in steps S3 and S4; In step S2, the process of using historical sample data to perform self-organizing map cluster analysis and constructing a risk scenario identification model includes the following sub-steps: S201: extracting historical sample data and test data from the case-control dataset according to the predicted partition ratio, and maintaining the ratio of accident data to normal driving data in the historical sample dataset and the test dataset consistent with the ratio of accident data to normal driving data in the case-control dataset; S202: Use the historical sample data set to train the self-organizing map network model. According to the number N of historical sample data sets, the SOM network side length M is selected according to the following formula: Among them, there are M neurons on each side of the SOM network, with a total of M columns, totaling M 2 neurons, each neuron is connected to other neurons in a hexagonal pattern, forming a honeycomb network structure; S203: Initialize the SOM network and randomly assign a K-dimensional weight w to each neuron j =[a k ], the value of k is consistent with the number of flowdata independent variable elements in the historical sample data; j is the neuron number, j = 1, 2, ..., M 2 ; S204: For the historical sample data set X=[x1,x2,...x i ...,x N ], input samples for training in sequence, and compare the i-th historical sample x i The Euclidean distance between each neuron weight is used as the clustering label of the historical sample, and the historical sample data x is determined by the following formula i Categories: Where i = 1, 2, ..., N; S205: Update SOM network weights: w←w+ηh(d)(x i -w) Where w is the weight to be updated, η is the learning rate, h(·) is the decay function, and d is the distance between the activated neuron and other neurons; S206: Divide the risk scenarios according to the number of samples and accident samples in each SOM neuron, and calculate the accident rate r of each neuron c : Among them, N sample are all samples belonging to neuron c, N crash is the number of accident samples in neuron c; S207, comparing the accident ratio in the clustered neurons with the accident data ratio in the historical sample data set. If the accident ratio in the clustered neurons exceeds the accident data ratio in the historical sample data set, it is identified as a high-risk scenario; otherwise, it is identified as a low-risk scenario.

2. The traffic accident risk assessment method in a continuous flow road scenario according to claim 1 is characterized in that: In step S1, the process of collecting accident data occurring within a certain time range and traffic flow parameters within this time range includes the following sub-steps: S101: Process the acquired historical road accident data and distinguish the upstream and downstream locations of the accident according to the location where the accident occurred; S102: Historical traffic flow information is obtained from sensors deployed on the lanes. The traffic flow information sensor downstream of the traffic accident location is denoted as K, and the upstream sensor is denoted as K-1. Based on the time of the traffic accident, traffic flow information for sensors K and K-1 is collected within 5 to 10 minutes and 10 to 15 minutes before the accident. The traffic flow parameter variable flowdata is recorded as follows based on the cross-sectional location and time period: flowdata=[f 1,up ,v 1,up ,o 1,up ,f 2,up ,v 2,up ,o 2,up ,f 1,down ,v 1,down ,o 1,down ,f 2,down ,v 2,down ,o 2,down ] Among them, the variable names f, v, and o represent traffic volume, average speed, and lane occupancy, respectively. Subscript 1 represents 5 to 10 minutes before the accident, subscript 2 represents 10 to 15 minutes before the accident, subscript up represents the upstream of the accident point, and subscript down represents the downstream of the accident point. S103: The data label crash of the accident in step S101 is recorded as 1, and the normal driving data crash at the same location, same time and different date of the accident data is selected and recorded as 0 to construct a case-control dataset. The basic structure of the data in the case-control dataset is: data = [crash, flowdata].

3. The traffic accident risk assessment method in a continuous flow road scenario according to claim 2 is characterized in that: In step S1, the historical road accident data includes the time and location of the traffic accident, with the time being accurate to the minute level and the location being accurate to the hundred-meter level.

4. The traffic accident risk assessment method in a continuous flow road scenario according to claim 2 is characterized in that: In step S1, in the case-control data set, the ratio of the number of normal driving data to the number of accident data is 3:

1.

5. The traffic accident risk assessment method in a continuous flow road scenario according to claim 1 is characterized in that: In step S3, the base learner model adopts any one of a support vector machine model, a decision tree model, and an artificial neural network model.

6. The traffic accident risk assessment method in a continuous flow road scenario according to claim 1, characterized in that: In step S3, the process of training the base learner model using the historical sample data of the risk scenario as a training set and outputting the prediction results of the test data includes the following steps: S301: Select an artificial neural network as the base learner, determine the number of neurons in each layer of the artificial neural network, keep the number of elements in the input layer consistent with the traffic flow parameter variable flowdata, select one hidden layer with 8 hidden elements, and use a unit output layer. After each learning output prediction result, compare it with the measured value, and use the difference as the error back-propagation learning to update the synaptic weights. S302: Input the test data in the test set, classify the test data in the SOM network, and compare the test data x p The Euclidean distance between each neuron weight is used as the clustering label of the sample, and the test data x is determined. p Category t; S303: Select all the data x to be tested in the historical sample data set p A training set is constructed based on the data of category t, and the training set is applied to the artificial neural network for training. After the preset accuracy requirements are met, the model output is completed, and the test data is predicted and the predicted value is output. After the prediction is completed, the trained artificial neural network is discarded to complete the real-time learning process.

7. The traffic accident risk assessment method in a continuous flow road scenario according to claim 1 is characterized in that: In step S4, the ROC curve is drawn for the prediction results of the test data, the AUC indicator is used to evaluate the goodness, and the optimal risk threshold is selected according to the Youden index. The process includes the following steps: S401: Calculate the ROC curve of the test set data, calculate the accident risk r of the case-control data set, and determine the minimum value r of the accident risk prediction value min and the maximum value r max , with r min is the minimum value, r max The classification threshold sequence C is constructed with the maximum value and 0.001 as the step size. j }, according to the elements in the classification threshold sequence C, calculate the corresponding confusion matrix in turn. The specific steps are: The risk index is converted into a prediction of whether an accident will occur according to the following formula: Where y* is the prediction of whether an accident occurs. When y*=y=1, it is recorded as a true positive TP; when y*=1, y=0, it is recorded as a false positive FP; when y*=0, y=1, it is recorded as a false negative FN; when y*=y=0, it is recorded as a true negative TN. For each classification threshold c j , calculate the recall rate TPR under this threshold j and false alarm rate FPR j : With FPR as the horizontal coordinate and TPR as the vertical coordinate, plot points in sequence in the two-dimensional coordinate system and calculate the area under the receiver operating status curve (AUC) surrounded by the above coordinates and the origin, (1, 1), and (1, 0); S402: Select TPR j -FPR j The corresponding classification threshold c is the maximum j As the final classification threshold c y .

8. The traffic accident risk assessment method in a continuous flow road scenario according to claim 1 is characterized in that: In step S5, for the road to be predicted, corresponding traffic flow information data is collected, including the traffic volume, average vehicle speed and lane occupancy rate of each section; Import the collected traffic flow information data into the risk scenario identification model to determine the category to which the data belongs and identify the risk scenario; The base learner is then used for instant learning to evaluate the current road risk index in real time and issue warnings for scenarios that exceed the final classification threshold.

Citation Information

Patent Citations

  • Method for predicting city traffic accidents based on time-space distribution characteristics

    CN106991510A

  • Multi-attribute railway accident causal weighting analysis method

    CN110532298B

  • Heterogeneous traffic accident cause analysis method and device

    CN110491121A

  • Data-knowledge driven urban rail transit risk identification method

    CN116564551A