A method for dynamically evaluating and intelligently managing and controlling traffic safety risks on expressways
By using multi-source data perception and feature engineering, combined with LightGBM and SHAP analysis, a three-dimensional risk labeling system and intelligent management and control strategy were constructed. This solved the problems of nonlinear interaction and hidden risk identification in highway traffic safety risk assessment, realized real-time risk quantification and dynamic intervention, and improved prediction accuracy and management efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI URBAN CONSTR INFORMATION TECH CO LTD
- Filing Date
- 2026-04-15
- Publication Date
- 2026-07-10
AI Technical Summary
Existing technologies are unable to effectively capture nonlinear interactions, identify hidden risks, and have poor adaptability in highway traffic safety risk assessment. Furthermore, traditional models lack interpretability and have weak capacity for handling imbalanced data, resulting in a high rate of missed detections for high-risk samples.
By employing multi-source data perception and feature engineering, a three-dimensional risk labeling system is constructed. A risk prediction model is built using the Light Gradient Boosting Machine algorithm, and interpretability analysis is performed through SHAP to generate multi-layer intelligent control strategies, including real-time graded early warning, dynamic speed limit and guidance, resource scheduling, and autonomous driving assisted decision-making.
It enables real-time risk quantification and hierarchical early warning of vehicle behavior in complex traffic flows on highways, significantly improves the accuracy of high-risk sample identification, reduces the probability of traffic accidents, has interpretability and high computational efficiency, and supports dynamic control of vehicle-road cooperation and autonomous driving.
Smart Images

Figure CN122369264A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of dynamic assessment technology for traffic safety risks, and in particular to a method for dynamic assessment and intelligent control of traffic safety risks on highways. Background Technology
[0002] In existing technologies, highway traffic safety risk management is mainly achieved through the following methods, but these methods have many shortcomings: (1) Rule-based methods (such as single threshold method, linear weighted method): The main idea is to set fixed thresholds for speed, acceleration, or lateral deviation, and determine the risk if these thresholds are exceeded; or to obtain a risk value by linearly weighting the various indicators.
[0003] Limitations: ① Inability to capture non-linear interactions: For example, the same lateral offset may be safe at low speeds but extremely dangerous at high speeds; linear methods cannot reflect this dynamic escalation mechanism. ② Failure to report hidden risks: It is difficult to identify scenarios that do not conform to the conventional definition of high-speed danger (such as distracted driving), such as "medium-low speed + lateral fluctuation" or "medium-low speed + sudden acceleration change." ③ Poor adaptability: Once the threshold is set, it is difficult to dynamically adjust with traffic flow conditions.
[0004] Traditional statistical analysis and machine learning models (such as logistic regression, support vector machine, random forest): Main idea: Use historical data to train a classifier to predict the level of accidents or risks.
[0005] Shortcomings: ① Limited expressive power: Logistic regression assumes a linear relationship between features, making it difficult to fit complex traffic dynamics features. ② Lack of interpretability: While ensemble models such as gradient boosting trees have high accuracy, their internal logic is complex (black box), making it impossible to output specific risk attributions, thus making it difficult for traffic management departments to directly use the results for enforcement or intervention. ③ Weak ability to handle imbalanced data: When high-risk samples are scarce, traditional models tend to favor the majority class (low risk), resulting in a high rate of missed detections for high-risk cases.
[0006] Therefore, it is necessary to provide a method for dynamic assessment and intelligent management of highway traffic safety risks, so as to quantify risks, provide graded early warnings, and dynamically intervene in vehicle behavior in complex highway traffic flows in real time. Summary of the Invention
[0007] The purpose of this invention is to provide a method for dynamic assessment and intelligent control of highway traffic safety risks, so as to perform real-time risk quantification, graded early warning and dynamic intervention of vehicle behavior in complex highway traffic flow.
[0008] To address the problems existing in the prior art, this invention provides a method for dynamic assessment and intelligent management of highway traffic safety risks, comprising the following steps: S1: Establish multi-source data perception and feature engineering; S2: Construct a three-dimensional risk labeling system composed of space, movement and behavior, and generate three-level risk labels based on the three-dimensional risk labeling system. The three-level risk labels include low risk, medium risk and high risk. S3: The Light Gradient Boosting Machine algorithm is used as input. The features obtained in S1 and the risk levels generated in S2 are input. The number, depth and learning rate of trees are adjusted through cross-validation to build a risk prediction model based on LightGBM. S4: Interpretability analysis based on SHAP S41: Features The formula for calculating the SHAP value is as follows: ; Let the model input feature vector be... The prediction function is ; For the complete set of feature indexes; A subset of features; For features not included Any subset of features; |N| is the total number of features. For subset The number of features; The prediction of the model under the feature subset S; For the model in feature subset and characteristics The following prediction; This represents the factorial operation; S42: Calculate the absolute value of the SHAP mean of each feature and sort them to obtain the feature importance; S43: For each sample identified as high-risk, calculate its SHAP dependency graph and interaction graph, and quantify the positive or negative contribution of each feature to the risk value of the sample. S5: Generate multi-layered intelligent management and control strategies.
[0009] Optionally, in the aforementioned method for dynamic assessment and intelligent control of highway traffic safety risks, multi-source data perception and feature engineering are established in S1, as follows: Data Acquisition: Using drone aerial photography, roadside LiDAR and / or high-definition cameras, collect micro-trajectory data of vehicles on highways. The vehicle micro-trajectory data includes frame number, time, vehicle ID, coordinates, vehicle type and lane number. Feature extraction: Calculate key kinematic features, including velocity, acceleration, jerk, lateral distance between the vehicle center and the left and right lane lines, and vehicle direction angle; Data cleaning: Remove outliers and noise, and perform standardization.
[0010] Optionally, in the method for dynamic assessment and intelligent control of highway traffic safety risks, the three-dimensional risk labeling system in S2 includes spatial invasiveness, motion severity, and behavioral urgency.
[0011] Optionally, in the aforementioned method for dynamic assessment and intelligent control of highway traffic safety risks, The formula for calculating spatial invasiveness is: ; in, The distance beyond the boundary. This is the lateral offset. Lane width, This refers to the width of the vehicle body; The severity of exercise is determined by classifying it into three levels: low speed, medium speed, and high speed, based on speed distribution and speed limit. The method for judging the urgency of a behavior is based on the acceleration distribution, which is divided into three levels: stable, fluctuating, and urgent.
[0012] Optionally, in the aforementioned method for dynamic assessment and intelligent control of highway traffic safety risks, S5 generates a multi-layered intelligent control strategy as follows: Based on the model prediction results and SHAP analysis results, implement differentiated control measures: Real-time graded warnings: For high-risk situations, point-to-point high-priority warnings are sent to specific vehicles via roadside units; for medium-risk situations, continuous tracking is performed, and lane departure or collision warnings are issued in conjunction with the onboard advanced driver assistance system. Dynamic speed limits and guidance: Based on the risk concentration of road segments, the variable speed limit signs are dynamically adjusted, and specific guidance information is released for "slow speed anomalies" identified by SHAP. Resource scheduling based on risk heatmaps: Real-time generation of road network risk heatmaps to guide the advance deployment of police forces and obstacle removal equipment to high-risk areas; Multi-scenario collaborative optimization: For congestion scenarios and multi-truck scenarios, light control is triggered in advance; for accident scenarios and debris spill scenarios, emergency lane opening or forced speed reduction is automatically triggered based on real-time risk level. Enabling autonomous driving: Transmitting SHAP interpretation results to autonomous vehicles to assist their decision-making.
[0013] Compared with the prior art, the present invention has the following advantages: (1) This invention is directly applied to the fields of intelligent transportation systems (ITS), active safety management and control of highways, vehicle-to-everything (V2X) communication and autonomous driving assistance decision-making technology. Specifically, it is applicable to scenarios in which microscopic vehicle trajectory data collected by drones, roadside sensing devices or vehicle terminals are used to perform real-time risk quantification, graded early warning and dynamic intervention of vehicle behavior in complex traffic flow on highways.
[0014] (2) Significantly improved prediction accuracy: Experimental data shows that the LightGBM model achieved an accuracy of 0.895, a recall of 0.844, an F1 score (F1 score is a statistical indicator used to evaluate the performance of binary classification models, with a value ranging from 0 to 1, calculated by the harmonic mean of precision and recall) of 0.850, and an AUC of 0.968 in identifying high-risk samples, significantly outperforming logistic regression (AUC 0.671) and other ensemble models (XGBoost). This effectively solved the problem of missed detections of high-risk samples and reduced the probability of serious traffic accidents.
[0015] (3) It possesses interpretability and credibility: the risk assessment conclusions are given through the ensemble learning prediction model, and the risk attribution analysis is given through the SHAP method. It reveals hidden risk scenarios such as "medium and low speed + lateral offset" and "medium and low speed + acceleration change" that are difficult to detect by traditional rules, filling the management blind spot.
[0016] (4) Achieve precise and proactive control in multiple scenarios: shift from static management to dynamic hierarchical intervention based on real-time risk levels. Support vehicle-road collaboration to provide autonomous vehicles with beyond-line-of-sight risk perception and transparent decision-making basis. Improve highway operation efficiency by enabling on-demand scheduling of management resources through risk heat maps.
[0017] (5) High computational efficiency and easy deployment: The LightGBM algorithm has a fast training speed and low memory usage, making it suitable for processing large-scale high-frequency trajectory data and meeting the needs of real-time online evaluation of highways. Attached Figure Description
[0018] Figure 1 A flowchart of the method for dynamic assessment and intelligent control of highway traffic safety risks provided in an embodiment of the present invention; Figure 2 A schematic diagram illustrating the generation of a multi-layer intelligent control strategy provided in an embodiment of the present invention; Figure 3 The SHAP dependency graph of vehicle speed provided in the embodiments of the present invention. Detailed Implementation
[0019] The specific embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. The advantages and features of the present invention will become clearer from the following description. It should be noted that the accompanying drawings are all in a very simplified form and use non-precise proportions, and are only used to facilitate and clarify the illustration of the embodiments of the present invention.
[0020] In the following, if the methods described herein include a series of steps, the order of these steps presented herein is not necessarily the only order in which these steps can be performed, and some of the steps described may be omitted and / or some other steps not described herein may be added to the method.
[0021] To address the problems existing in the prior art, this invention provides a method for dynamic assessment and intelligent control of highway traffic safety risks. This method constructs a closed-loop system encompassing "data perception - multi-dimensional index construction - ensemble learning prediction - interpretable attribution - intelligent control decision-making." It utilizes the high efficiency and non-linear fitting capability of the LightGBM algorithm for risk classification, and employs the SHAP (Shapley Additive Explanations) method to provide global and local interpretations of the model output, transforming the model results into executable control strategies.
[0022] Specific implementation steps, such as Figure 1 As shown, it includes the following steps: S1: Establish multi-source data perception and feature engineering, as follows: Data Acquisition: Using drone aerial photography, roadside LiDAR and / or high-definition cameras, collect micro-trajectory data of vehicles on highways. The vehicle micro-trajectory data includes frame number, time, vehicle ID, coordinates, vehicle type and lane number, etc. Feature extraction: Calculate key kinematic features, including velocity, acceleration, jerk (jerk is a physical quantity that describes how fast acceleration changes over time), lateral distance between the vehicle center and the left and right lane lines, and vehicle direction angle; Data cleaning: Remove outliers and noise, and perform standardization.
[0023] S2: Construct a three-dimensional risk labeling system composed of space, motion, and behavior, which does not rely on a single threshold, but generates training labels through logical rules.
[0024] The three-dimensional risk labeling system in S2 includes spatial invasiveness, movement severity, and behavioral urgency.
[0025] The formula for calculating spatial invasiveness is: ; in, The distance beyond the boundary. This is the lateral offset. Lane width, The vehicle width is used as the reference point; based on the distance from the road boundary, it is classified into three levels: safe, general, and dangerous (encroaching on adjacent lanes / shoulder); The severity of exercise is determined by classifying it into three levels: low speed, medium speed, and high speed, based on speed distribution (e.g., 85th percentile) and speed limit. The method for judging the urgency of a behavior is based on the acceleration distribution, which is divided into three levels: stable, fluctuating, and urgent.
[0026] Furthermore, a three-level risk label is generated based on the three-dimensional risk label system, which includes low risk, medium risk and high risk; Specifically, a risk decision matrix is set up, including a spatial priority principle: if spatial intrusion is severe, it is directly judged as high risk (Level 3); a dynamic escalation principle: if the location deviates from the norm but is accompanied by high speed or emergency operation, it is upgraded to high risk; and potential risk identification: even if the location is safe, if there is high speed and emergency braking, it is judged as medium risk (Level 2). Finally, three levels of risk labels—low (Level 1), medium (Level 2), and high (Level 3)—are generated as the model training targets.
[0027] S3: Constructing a risk prediction model based on LightGBM: S31: Model selection: The Light Gradient Boosting Machine (LightGBM) algorithm is adopted, which utilizes its leaf node-based growth strategy and gradient one-sided sampling technique to improve training speed and sensitivity to small-scale high-risk samples. S32: Model training: Input the features obtained in S1 and the risk levels generated in S2; S33: Maximize the accuracy of high-risk categories by adjusting parameters such as the number, depth, and learning rate of trees through cross-validation; in order to build a risk prediction model based on LightGBM. S4: Interpretability analysis based on SHAP S41: Features The formula for calculating the SHAP value is as follows: ; Let the model input feature vector be... The prediction function is ; For the complete set of feature indexes; A subset of features; For features not included Any subset of features; |N| is the total number of features. For subset The number of features; The prediction of the model under the feature subset S; For the model in feature subset and characteristics The following prediction; This represents the factorial operation; S42: Calculate the absolute value of the SHAP mean of each feature and sort them to obtain the feature importance; S43: Input multiple samples into the LightGBM-based risk prediction model, and output the risk level of each sample. For each sample that is determined to be high-risk, calculate its SHAP dependency graph and interaction graph, and quantify the positive and negative contribution of each feature to the risk value of the sample.
[0028] S5: As Figure 2 As shown, a multi-layered intelligent management and control strategy is generated in the following way: Based on the model prediction results and SHAP analysis results, implement differentiated control measures: (1) Real-time graded warning: For high risk (Level 3), a high-priority "point-to-point" warning is sent to a specific vehicle through the roadside unit (RSU); for medium risk (Level 2), continuous tracking is performed, and the on-board advanced driver assistance system is linked to issue lane departure or collision warnings. (2) Dynamic speed limit and guidance: Based on the risk concentration of road segments, the variable speed limit signs are dynamically adjusted, and specific guidance information is released for the "low speed anomaly" scenarios identified by SHAP; (3) Resource scheduling based on risk heat map: real-time generation of road network risk heat map to guide the early deployment of police force and obstacle removal equipment to high-risk areas; (4) Multi-scenario collaborative optimization: For congestion scenarios and multi-truck scenarios, mild control is triggered in advance; for accident scenarios and spillage scenarios, emergency lane opening or forced speed reduction is automatically triggered based on real-time risk level. (5) Enabling autonomous driving: Transmitting the SHAP interpretation results (such as "the risk stems from the sudden braking of the vehicle in front") to autonomous vehicles to assist their decision-making.
[0029] This invention leverages the parallel computing capabilities of LightGBM, combined with edge computing nodes, to achieve millisecond-level risk inference. It uses three-level risk labels as the basis for label generation, and utilizes SHAP to discover blind spots not covered by existing rules, thereby optimizing the rule base in reverse.
[0030] The following experiment will now illustrate this in detail: Experimental background: A section of a two-way four-lane highway was selected, and 40 minutes of high-resolution video was collected using a drone. After computer vision processing, 270,000 vehicle micro-trajectory data were obtained.
[0031] Experimental setup: (1) Input features: speed, acceleration, jerk, lateral offset, vehicle motion direction angle, lateral distance between vehicle center and left / right lane lines, etc.
[0032] (2) Risk Level Classification: Level 1 (Low Risk) accounts for 64%, indicating that the vehicle is driving smoothly within the lane without significant lateral deviation or violent acceleration / deceleration. Level 2 (Medium Risk) accounts for 23.2%, indicating scenarios with potential risks, including minor lane departures or emergency braking / acceleration within a safe lane. Level 3 (High Risk) accounts for 12.8%, indicating extremely high-risk scenarios, mainly including significant vehicle incursions into adjacent lanes / shoulders, or obvious instability at high speeds.
[0033] (3) Comparison models: Logistic Regression, Random Forest, XGBoost, CatBoost, LightGBM.
[0034] (4) Evaluation indicators: accuracy, recall, F1 score, AUC (Area Under Curve) value.
[0035] (5) Hardware environment: Python 3.7.6, Intel Core i7 CPU, 16GB RAM.
[0036] Experimental data and results:
[0037] Results analysis: (1) Performance advantages: LightGBM is the best in all metrics, especially in high-risk recall rate, which reaches 0.844, an improvement of 87.1% over traditional logistic regression and 0.6% over the second-best CatBoost.
[0038] (2) Interpretable findings: SHAP analysis showed that lateral distance was the primary risk factor, validating the "space-first" principle; such as Figure 3 The SHAP dependency graph shown reveals a nonlinear abrupt change in the speed threshold, with an abnormally high-risk cluster (SHAP value > 1.5) found in the 40-60 km / h range. This is a low-speed anomaly scenario not covered by traditional rules.
[0039] (3) Optimization of control strategy: After applying the graded early warning strategy of the present invention, the average deceleration response time of high-risk vehicles can be shortened by 2.5 seconds, and the number of potential rear-end collisions can be reduced by 18%.
[0040] Conclusion: Experimental data demonstrate that the LightGBM-SHAP-based method proposed in this invention outperforms existing technologies in terms of prediction accuracy, comprehensiveness of risk identification, and effectiveness of control strategies, and has significant value for widespread application.
[0041] Compared with the prior art, the present invention has the following advantages: (1) This invention is directly applied to the fields of intelligent transportation systems (ITS), active safety management and control of highways, vehicle-to-everything (V2X) communication and autonomous driving assistance decision-making technology. Specifically, it is applicable to scenarios in which microscopic vehicle trajectory data collected by drones, roadside sensing devices or vehicle terminals are used to perform real-time risk quantification, graded early warning and dynamic intervention of vehicle behavior in complex traffic flow on highways.
[0042] (2) Significantly improved prediction accuracy: Experimental data shows that the LightGBM model achieved an accuracy of 0.895, a recall of 0.844, an F1 score (F1 score is a statistical indicator used to evaluate the performance of binary classification models, with a value ranging from 0 to 1, calculated by the harmonic mean of precision and recall) of 0.850, and an AUC of 0.968 in identifying high-risk samples, significantly outperforming logistic regression (AUC 0.671) and other ensemble models (XGBoost). This effectively solved the problem of missed detections of high-risk samples and reduced the probability of serious traffic accidents.
[0043] (3) It possesses interpretability and credibility: the risk assessment conclusions are given through the ensemble learning prediction model, and the risk attribution analysis is given through the SHAP method. It reveals hidden risk scenarios such as "medium and low speed + lateral offset" and "medium and low speed + acceleration change" that are difficult to detect by traditional rules, filling the management blind spot.
[0044] (4) Achieve precise and proactive control in multiple scenarios: shift from static management to dynamic hierarchical intervention based on real-time risk levels. Support vehicle-road collaboration to provide autonomous vehicles with beyond-line-of-sight risk perception and transparent decision-making basis. Improve highway operation efficiency by enabling on-demand scheduling of management resources through risk heat maps.
[0045] (5) High computational efficiency and easy deployment: The LightGBM algorithm has a fast training speed and low memory usage, making it suitable for processing large-scale high-frequency trajectory data and meeting the needs of real-time online evaluation of highways.
[0046] The above are merely preferred embodiments of the present invention and do not constitute any limitation on the present invention. Any equivalent substitutions or modifications made by those skilled in the art to the technical solutions and content disclosed in the present invention without departing from the scope of the present invention shall be deemed to have remained within the protection scope of the present invention.
Claims
1. A method for dynamic assessment and intelligent control of highway traffic safety risks, characterized in that, Includes the following steps: S1: Establish multi-source data perception and feature engineering; S2: Construct a three-dimensional risk labeling system composed of space, movement and behavior, and generate three-level risk labels based on the three-dimensional risk labeling system. The three-level risk labels include low risk, medium risk and high risk. S3: The Light Gradient Boosting Machine algorithm is used as input. The features obtained in S1 and the risk levels generated in S2 are input. The number, depth and learning rate of trees are adjusted through cross-validation to build a risk prediction model based on LightGBM. S4: Interpretability analysis based on SHAP S41: Features The formula for calculating the SHAP value is as follows: ; in, For the complete set of feature indexes; A subset of features; For features not included Any subset of features; |N| is the total number of features. For subset The number of features; The prediction of the model under the feature subset S; For the model in feature subset and characteristics The following prediction; This represents the factorial operation; S42: Calculate the absolute value of the SHAP mean of each feature and sort them to obtain the feature importance; S43: For each sample identified as high-risk, calculate its SHAP dependency graph and interaction graph, and quantify the positive or negative contribution of each feature to the risk value of the sample. S5: Generate multi-layered intelligent management and control strategies.
2. The method for dynamic assessment and intelligent control of highway traffic safety risks as described in claim 1, characterized in that, In S1, multi-source data perception and feature engineering are established as follows: Data Acquisition: Using drone aerial photography, roadside LiDAR and / or high-definition cameras, collect micro-trajectory data of vehicles on highways. The vehicle micro-trajectory data includes frame number, time, vehicle ID, coordinates, vehicle type and lane number. Feature extraction: Calculate key kinematic features, including velocity, acceleration, jerk, lateral distance between the vehicle center and the left and right lane lines, and vehicle direction angle; Data cleaning: Remove outliers and noise, and perform standardization.
3. The method for dynamic assessment and intelligent control of highway traffic safety risks as described in claim 1, characterized in that, The three-dimensional risk labeling system in S2 includes spatial invasiveness, movement severity, and behavioral urgency.
4. The method for dynamic assessment and intelligent control of highway traffic safety risks as described in claim 3, characterized in that, The formula for calculating spatial invasiveness is: ; in, The distance beyond the boundary. This is the lateral offset. Lane width, This refers to the width of the vehicle body; The severity of exercise is determined by classifying it into three levels: low speed, medium speed, and high speed, based on speed distribution and speed limit. The method for judging the urgency of a behavior is based on the acceleration distribution, which is divided into three levels: stable, fluctuating, and urgent.
5. The method for dynamic assessment and intelligent control of highway traffic safety risks as described in claim 1, characterized in that, The method for generating multi-layered intelligent management and control strategies in S5 is as follows: Based on the model prediction results and SHAP analysis results, implement differentiated control measures: Real-time graded early warning: For high-risk situations, point-to-point high-priority early warnings are sent to specific vehicles via roadside units; For medium-risk cases, continuous monitoring will be conducted, and the vehicle's advanced driver assistance system will be activated to issue lane departure or collision warnings. Dynamic speed limits and guidance: Based on the risk concentration of road segments, the variable speed limit signs are dynamically adjusted, and specific guidance information is released for "slow speed anomalies" identified by SHAP. Resource scheduling based on risk heatmaps: Real-time generation of road network risk heatmaps to guide the advance deployment of police forces and obstacle removal equipment to high-risk areas; Multi-scenario collaborative optimization: For congestion scenarios and multi-truck scenarios, light control is triggered in advance; for accident scenarios and debris spill scenarios, emergency lane opening or forced speed reduction is automatically triggered based on real-time risk level. Enabling autonomous driving: Transmitting SHAP interpretation results to autonomous vehicles to assist their decision-making.