A highway traffic situation intelligent early warning method
By constructing a violation-accident causal network and scenario probability model, and combining it with the contribution analysis of environmental factors, an intelligent early warning method for highway traffic situation is generated. This method solves the problems of insufficient early warning accuracy and poor timeliness in existing technologies, and realizes dynamic visualization and accurate assessment of risks.
Patent Information
- Application Number
- CN202511676241.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-11-17
AI Technical Summary
Existing highway traffic situation early warning schemes fail to reflect real-time risk changes, ignore individual vehicle behavior differences, and lack multi-source data fusion mechanisms, resulting in insufficient early warning accuracy, poor timeliness, and a lack of spatial visualization capabilities.
By constructing a violation-accident causal network, the individual risk of vehicles is quantified. A comprehensive risk index is generated by combining scenario probability and random forest model. The contribution of environmental factors is analyzed by using SHAP value and a spatial gridded regression model is established to form a dynamic and visualized risk map.
It has enabled vehicle risk assessment to leap from static to dynamic, from micro to macro, and from digital to spatial, significantly improving the accuracy and real-time nature of early warnings and providing full-chain decision support for highway safety management.
Smart Images

Figure CN121122029B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of big data analytics, specifically to an intelligent early warning method for highway traffic conditions. Background Technology
[0002] Existing highway traffic situation early warning schemes rely on static assessment methods based on single historical accident statistics, which cannot reflect real-time risk changes and ignore the differences in individual vehicle behavior. Furthermore, traditional models neglect the dynamic correlation between environmental factors and accident types, leading to inaccurate calculations of the contribution of real-time elements such as weather and traffic flow. The lack of a multi-source data fusion mechanism creates information silos between vehicle basic risks, scenario characteristics, and environmental factors, ultimately resulting in insufficient early warning accuracy, poor timeliness, and a lack of spatial visualization capabilities. Summary of the Invention
[0003] To address the aforementioned technical problems, an intelligent early warning method for highway traffic conditions is provided. This technical solution solves the problems described above.
[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0005] A method for intelligent early warning of highway traffic conditions includes:
[0006] S1. Based on the back-end database of the highway license plate recognition system, obtain the historical traffic violation records of the target vehicle, analyze the causal relationship between the target vehicle's violations and traffic accident types, and quantify the basic risk coefficients of the target vehicle for each type of traffic accident.
[0007] S2. Based on the historical traffic accident record database of highways, analyze the correlation and fitting between the prior risk probability of historical traffic accident types under several known scenarios and the basic risk coefficient of each traffic accident type of the target vehicle, and generate a comprehensive risk index of each traffic accident type of the target vehicle under several known scenarios.
[0008] S3. Determine the comprehensive risk index of environmental factors in each scenario and the various traffic accident types of target vehicles under known scenarios, establish a dynamic quantitative function for the local contribution of environmental factors in each scenario, assign the real-time environmental factor contribution weights to each scenario of the highway and the basic risk coefficients of various traffic accident types of target vehicles, and perform weighted regression analysis of traffic accident types in each scenario to generate a real-time traffic accident risk map of each scenario of the highway.
[0009] Preferably, step S1 specifically includes:
[0010] Based on the target vehicle’s historical traffic violation records, the historical traffic violation records of the target vehicle are extracted using the unit time as the observation window and the historical traffic violation records of the target vehicle as the observation object.
[0011] Based on the historical traffic violation record time series data of the target vehicle, according to the timestamp of the historical traffic violation record, the description of the violation behavior and the description of the traffic accident type of the target vehicle are marked and substituted into one-hot encoding to generate the violation behavior vector and the traffic accident type vector of the target vehicle, thus obtaining the traffic violation behavior vector sequence and the traffic accident type vector sequence of the target vehicle.
[0012] Based on the traffic violation behavior vector sequence of the target vehicle, the violation frequency characteristics, violation verification degree characteristics, and violation behavior pattern characteristics of the traffic violation behavior vector are statistically analyzed to construct a structured feature dataset of the traffic violation behavior vector of the target vehicle.
[0013] Based on the traffic accident type vector sequence of the target vehicle, determine the label data of each traffic accident and build a traffic accident type vector label dataset for the target vehicle.
[0014] Based on the structured feature dataset of traffic violation vectors of target vehicles and the vector label dataset of traffic accident types of target vehicles, a wide table of violation behavior-accident type of target vehicles is constructed. The accident type of target vehicles is used as a node and the violation behavior of target vehicles is used as a child node. The chi-square test is used to verify the significant correlation between the violation behavior and the accident type of target vehicles as an edge, and an undirected network graph of violation behavior-accident type of target vehicles is constructed.
[0015] Using the exponential decay function, we calculate the independent occurrence weighted count and joint occurrence weighted count of each target vehicle's violation-accident type in the undirected network graph of the target vehicle's violation-accident type within the observation window;
[0016] Based on the independent and joint occurrence weighted counts of each target vehicle's violation-accident type, calculate the advantage ratio and relative risk between the violation child node and the accident type parent node in the undirected network graph of the target vehicle's violation-accident type;
[0017] Based on the relative risk and advantage ratio between the target vehicle's violation sub-node and the accident type parent node, the association strength and direction of the edges between the violation sub-node and the accident type parent node are determined. Weights and directions are assigned to each edge of the undirected network graph of the target vehicle's violation-accident type, resulting in a directed weighted network graph of the target vehicle's violation-accident type, thus determining the causal relationship between the target vehicle's violation and the traffic accident type.
[0018] Preferably, step S1 further includes:
[0019] Based on the causal relationship between the target vehicle's violation and the type of traffic accident, the violation sub-nodes within the current observation window of the target vehicle's violation-accident type directed weighted network graph are extracted to construct the target vehicle's current violation state vector.
[0020] Based on linear regression, the traffic accident type parent node is connected to the violation behavior child node in the current observation window. The edge weights of each child node pointing to the parent node and the violation behavior indicator function of the target vehicle are obtained. According to forward propagation, the basic risk coefficients of each traffic accident type of the target vehicle are calculated and initialized.
[0021] Based on the current violation status vector of the target vehicle within the current observation window, the weighted frequency of each traffic accident type within the current observation window is calculated according to the exponential decay function. Substituted into the Sigmoid frequency amplification function, the risk amplification coefficient of each traffic accident type for the target vehicle is generated.
[0022] The basic risk coefficients for each type of traffic accident of the target vehicle are compensated by using the risk amplification coefficients for each type of traffic accident of the target vehicle, thus obtaining the basic risk coefficients for each type of traffic accident of the target vehicle.
[0023] Preferably, step S2 specifically includes:
[0024] Based on the historical traffic accident record database of highways, multi-dimensional feature data of historical traffic accidents are extracted according to the time dimension, space dimension and environment dimension, and feature sequences under several scenarios of historical traffic accidents on highways are constructed.
[0025] Standardization processing is performed on the feature sequences of several scenarios of historical traffic accidents on highways.
[0026] Based on Naive Bayes, we verify the prior probability of each historical traffic accident type relative to the total number of traffic accidents in the feature sequences of several scenarios of historical traffic accidents on highways.
[0027] Based on the prior occurrence probability of each historical traffic accident type relative to the total number of traffic accidents in the feature sequences of several scenarios of historical traffic accidents on highways, we verify the likelihood ratio of each feature in each scenario relative to each historical traffic accident type relative to the total number of traffic accidents.
[0028] For each given scenario, the likelihood ratio of the feature relative to each historical traffic accident type relative to the total number of traffic accidents is multiplied to obtain the comprehensive likelihood ratio of the feature relative to each historical traffic accident type relative to the total number of traffic accidents.
[0029] Based on the prior probability of each historical traffic accident type relative to the total number of traffic accidents in the feature sequence of several scenarios of historical traffic accidents on highways, and the comprehensive likelihood ratio of each feature in each scenario relative to each historical traffic accident type relative to the total number of traffic accidents, the posterior risk probability of historical traffic accident types in several known scenarios is calculated.
[0030] Preferably, step S2 further includes:
[0031] Based on the basic risk coefficients of each traffic accident type of the target vehicle, the prior probability of each historical traffic accident type relative to the total number of traffic accidents in the feature sequence of several scenarios of historical traffic accidents on highways, and the posterior risk probability of historical traffic accident types in several known scenarios, a combined feature vector of target vehicle-scenario-accident type is constructed.
[0032] Based on random forest, a decision tree random forest is built for each traffic accident type in various scenarios. The feature vector of the target vehicle-scenario-accident type combination is used as input. The maximum impurity reduction value is split according to the exhaustive search algorithm to generate a comprehensive risk index of each traffic accident type of the target vehicle in several known scenarios.
[0033] Preferably, step S3 specifically includes:
[0034] Identify the environmental factors for each scenario; the environmental factors for each scenario include: meteorological factors, traffic flow factors, and road surface condition factors;
[0035] Using the SHAP value game algorithm, when the comprehensive risk index prediction value of the target vehicle under a given known scenario is obtained from the decision tree random forest for each traffic accident type in each scenario, the contribution value of environmental factors in each scenario to the prediction value is extracted. A local contribution dynamic quantification function of environmental factors in each scenario is constructed, and the real-time environmental factor contribution weights are assigned to each scenario of the highway.
[0036] Preferably, step S3 specifically includes:
[0037] Step S3 also includes:
[0038] The contribution weights of real-time environmental factors in various scenarios on highways are normalized.
[0039] The highway road network is acquired and divided into spatial grids. The basic risk coefficients of each traffic accident type for all target vehicles in each grid segment cell are calculated as independent variables. The average comprehensive risk index of each traffic accident type for all target vehicles in each grid segment cell is used as the dependent variable. The contribution weight of real-time environmental factors in each grid segment cell is used as the regression coefficient of the corresponding feature. A weighted least squares regression model is established to generate real-time traffic accident risk values for each scenario in each segment cell of the highway road network.
[0040] The real-time traffic accident risk values of each scenario in each segment cell of the highway network are weighted and summed to obtain the total real-time traffic accident risk value of each scenario in each segment cell of the highway network.
[0041] Based on the preset risk level color scale table, and using heat map drawing tools, the total real-time traffic accident risk value of each scenario in each segment cell of the highway network is mapped to the corresponding highway network, thus obtaining a real-time traffic accident risk map of each scenario on the highway.
[0042] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0043] This invention proposes an intelligent early warning scheme for highway traffic conditions. It quantifies individual vehicle risk by constructing a violation-accident causal network, generates a comprehensive risk index by combining scenario probability and a random forest model, analyzes the contribution of environmental factors using SHAP values, and establishes a spatial gridded regression model, ultimately forming a dynamic and visualized risk map. This method achieves a leap in vehicle risk assessment from static to dynamic, from micro to macro, and from digital to spatial, significantly improving the accuracy and real-time performance of early warnings, and providing full-chain decision support for highway safety management. Attached Figure Description
[0044] Figure 1 This is a flowchart of an intelligent early warning method for highway traffic conditions. Detailed Implementation
[0045] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0046] Reference Figure 1 As shown, a method for intelligent early warning of highway traffic conditions includes:
[0047] S1. Based on the back-end database of the highway license plate recognition system, obtain the historical traffic violation records of the target vehicle, analyze the causal relationship between the target vehicle's violations and traffic accident types, and quantify the basic risk coefficients of the target vehicle for each type of traffic accident.
[0048] Step S1 specifically includes:
[0049] Based on the target vehicle’s historical traffic violation records, the historical traffic violation records of the target vehicle are extracted using the unit time as the observation window and the historical traffic violation records of the target vehicle as the observation object.
[0050] Based on the historical traffic violation record time series data of the target vehicle, according to the timestamp of the historical traffic violation record, the description of the violation behavior and the description of the traffic accident type of the target vehicle are marked and substituted into one-hot encoding to generate the violation behavior vector and the traffic accident type vector of the target vehicle, thus obtaining the traffic violation behavior vector sequence and the traffic accident type vector sequence of the target vehicle.
[0051] Based on the traffic violation behavior vector sequence of the target vehicle, the violation frequency characteristics, violation verification degree characteristics, and violation behavior pattern characteristics of the traffic violation behavior vector are statistically analyzed to construct a structured feature dataset of the traffic violation behavior vector of the target vehicle.
[0052] As a further development, the violation pattern characteristics are derived by converting the number of each violation type into a proportion of the total number of violations, thereby determining the vehicle's violation preferences.
[0053] Based on the traffic accident type vector sequence of the target vehicle, determine the label data of each traffic accident and build a traffic accident type vector label dataset for the target vehicle.
[0054] Based on the structured feature dataset of traffic violation vectors of target vehicles and the vector label dataset of traffic accident types of target vehicles, a wide table of violation behavior-accident type of target vehicles is constructed. The accident type of target vehicles is used as a node and the violation behavior of target vehicles is used as a child node. The chi-square test is used to verify the significant correlation between the violation behavior and the accident type of target vehicles as an edge, and an undirected network graph of violation behavior-accident type of target vehicles is constructed.
[0055] Using the exponential decay function, the independent occurrence weighted count and joint occurrence weighted count of each target vehicle's violation-accident type in the undirected network graph of the target vehicle's violation-accident type within the observation window are calculated as follows:
[0056]
[0057] in, The weighted count is calculated based on the combined occurrence of violation A and accident type B of the target vehicle. The set of time windows in which a target vehicle commits violation A and causes accident type B. The weighted count of independent occurrences of violation type A for the target vehicle, without occurrence of accident type B. The set of time windows in which the target vehicle committed a violation A but no accident occurred. The weighted count of independent occurrences of accident type B for target vehicle without violation A is calculated. The set of time windows during which the target vehicle did not commit violation A but experienced accident type B. The weighted count is based on the independent occurrence of the target vehicle not exhibiting violation type A and not exhibiting accident type B. This is the set of time windows during which the target vehicle did not commit any violation (A) or experience any accident of type B. It is a natural constant. The decay rate of the exponential function, The interval between the i-th observation window and the current time;
[0058] Based on the independent and joint occurrence weighted counts of each target vehicle's violation-accident type, the advantage ratio and relative risk between the violation child nodes and the accident type parent nodes in the undirected network graph of the target vehicle's violation-accident type are calculated as follows:
[0059]
[0060] in, This represents the advantage ratio between the target vehicle's violation behavior child nodes and the accident type parent nodes in the undirected network graph of the target vehicle's violation behavior-accident type. The relative risk between the target vehicle's violation behavior child node and the accident type parent node in the undirected network graph of the target vehicle's violation behavior-accident type;
[0061] Based on the relative risk and advantage ratio between the target vehicle's violation sub-node and the accident type parent node, the association strength and direction of the edges between the violation sub-node and the accident type parent node are determined. Weights and directions are assigned to each edge of the undirected network graph of the target vehicle's violation-accident type, resulting in a directed weighted network graph of the target vehicle's violation-accident type, thus determining the causal relationship between the target vehicle's violation and the traffic accident type.
[0062] Step S2 also includes:
[0063] Based on the causal relationship between the target vehicle's violation and the type of traffic accident, the violation sub-nodes within the current observation window of the target vehicle's violation-accident type directed weighted network graph are extracted to construct the target vehicle's current violation state vector.
[0064] Based on linear regression, the parent nodes of traffic accident types are connected to the child nodes of violations within the current observation window. The edge weights of each child node pointing to its parent node and the violation indication function of the target vehicle are obtained. By forward propagation, the basic risk coefficients of each traffic accident type for the target vehicle are calculated and initialized as follows:
[0065]
[0066] Based on the initialization of the basic risk coefficient for the j-th traffic accident type of the target vehicle. Let the edge weight be the edge connecting the k-th violation child node to the j-th accident type parent node. The k-th violation in the current violation state vector C of the target vehicle;
[0067] Based on the current violation status vector of the target vehicle within the current observation window, the weighted frequency of each traffic accident type within the current observation window is calculated using the exponential decay function. This weighted frequency is then substituted into the Sigmoid frequency amplification function to generate the risk amplification coefficient for each traffic accident type of the target vehicle, as follows:
[0068]
[0069] in, The weighted frequency of the j-th traffic accident type for the target vehicle within the i-th observation window. γ represents the time decay weight, and γ is the decay rate at short-term frequencies. For the observation window index, This is the weighted frequency risk amplification factor for the j-th traffic accident type of the target vehicle within the i-th observation window. For maximum magnification intensity, This is the frequency sensitivity threshold;
[0070] As further content, Maximum amplification intensity is a hyperparameter that controls the upper limit of the penalty. The final risk amplification factor ranges from 1 to (1 + α). = 1.0, then the risk factor of a car with an extremely high accident frequency can be magnified to a maximum of 1 + 1.0 = 2.0 times the original value. Frequency sensitivity threshold, which is the trigger threshold, is set when a vehicle's frequency sensitivity threshold is reached. When the frequency is below β, the accident frequency is considered to be within an acceptable normal range. When it exceeds β, the risk amplification mechanism starts, and the actual setting value depends on the technicians in the field to set during actual deployment, and no specific limitation is made here.
[0071] Use the risk amplification coefficients of various traffic accident types of the target vehicle to compensate the basic risk coefficients of various traffic accident types of the initialized target vehicle, and obtain the basic risk coefficients of various traffic accident types of the target vehicle. The method is as follows:
[0072]
[0073] Among them, is the basic risk coefficient of the jth traffic accident type of the target vehicle in the ith observation window;
[0074] When in use, combine the content in the above steps:
[0075] As a further content, by constructing a violation-accident causal network diagram, the historical behavior data is transformed into weighted causal associations. Use the exponential decay function to quantify the timeliness of behavior, and through the relative risk weighting and frequency amplification mechanism, dynamically calculate the interpretable and traceable basic risk coefficients of vehicle accident types, realizing accurate risk quantification, real-time status assessment and transparent origin tracing of causes, and providing a direct decision-making basis for highway proactive safety management.
[0076] As an embodiment of step S1:
[0077] Text description of the implementation example
[0078] Taking a truck with a license plate of Beijing AXXXXX as an example, demonstrate the implementation process of this scheme:
[0079] Background: The traffic management department needs to evaluate the current accident risk of this truck to decide whether to conduct key monitoring or safety reminders on it.
[0080] Step 1: Data extraction and network diagram construction.
[0081] The system extracts the historical data of this vehicle in the past 24 months from the database.
[0082] After analysis, construct the violation-accident causal network diagram of this vehicle. It shows in the diagram:
[0083] The edge weight (relative risk) of the speeding behavior pointing to the rear-end collision accident is 2.5.
[0084] The edge weight of the fatigue driving behavior pointing to the rear-end collision accident is 1.8.
[0085] The edge weight of the speeding behavior pointing to the rollover accident is 2.0.
[0086] The correlation between fatigue driving and rollover accidents is not significant, so there is no edge connection.
[0087] Step 2: Calculate the current risk coefficient
[0088] Obtain the current status: The system found that the vehicle had 1 speeding record and no fatigue driving record in the most recent month (the current observation window). Therefore, its current violation status vector is: {Speeding: 1, Fatigue driving: 0}.
[0089] Forward propagation calculation (initialize risk):
[0090] Initialize the rear-end collision risk = (2.5 × 1) + (1.8 × 0) = 2.5
[0091] Initialize the rollover risk = (2.0 × 1) + (0 × 0) = 2.0
[0092] Frequency amplification compensation:
[0093] The system checks the vehicle's history and finds that it has had 1 rear-end collision accident in the past 3 months. According to the exponential decay and Sigmoid function calculations, the rear-end collision risk amplification factor = 1.3.
[0094] The vehicle has no rollover history, so the rollover risk amplification factor = 1.0.
[0095] Calculate the final basic risk coefficient:
[0096] The final rear-end collision risk coefficient = 2.5 × 1.3 = 3.25
[0097] The final rollover risk coefficient = 2.0 × 1.0 = 2.0
[0098] Output and decision:
[0099] The system generates a risk assessment report: The current rear-end collision risk level of the truck with license plate number Jing AXXXXX is high (coefficient 3.25), and the rollover risk level is medium (coefficient 2.0). The main reason for the high rear-end collision risk is the recent speeding behavior and the vehicle's rear-end collision accident history.
[0100] S2. Based on the historical traffic accident record database on highways, analyze the prior risk probabilities of historical traffic accident types in several known scenarios and correlate and fit them with the basic risk coefficients of each traffic accident type of the target vehicle to generate the comprehensive risk indices of each traffic accident type of the target vehicle in several known scenarios;
[0101] Step S2 specifically includes:
[0102] Based on the historical traffic accident record database of highways, multi-dimensional feature data of historical traffic accidents are extracted according to the time dimension, space dimension and environment dimension, and feature sequences under several scenarios of historical traffic accidents on highways are constructed.
[0103] Standardization processing is performed on the feature sequences of several scenarios of historical traffic accidents on highways.
[0104] Based on Naive Bayes, we verify the prior probability of each historical traffic accident type relative to the total number of traffic accidents in the feature sequences of several scenarios of historical traffic accidents on highways.
[0105] Based on the prior occurrence probability of each historical traffic accident type relative to the total number of traffic accidents in the feature sequences of several scenarios of historical traffic accidents on highways, we verify the likelihood ratio of each feature in each scenario relative to each historical traffic accident type relative to the total number of traffic accidents.
[0106] For each given scenario, the likelihood ratio of the feature relative to each historical traffic accident type relative to the total number of traffic accidents is multiplied to obtain the comprehensive likelihood ratio of the feature relative to each historical traffic accident type relative to the total number of traffic accidents.
[0107] Based on the prior probability of each historical traffic accident type relative to the total number of traffic accidents in the feature sequences of several scenarios of historical traffic accidents on highways, and the comprehensive likelihood ratio of each feature in each scenario relative to each historical traffic accident type relative to the total number of traffic accidents, the posterior risk probability of historical traffic accident types in several known scenarios is calculated as follows:
[0108]
[0109] in, Given the known posterior risk probability of the j-th traffic accident type in the S-th scenario, Let be the prior probability of occurrence of the j-th historical traffic accident type relative to the total number of traffic accidents in the feature sequence of several scenarios of historical traffic accidents on highways. Given the features of the S-th scenario, let's consider the likelihood ratio of each historical traffic accident type (j-th) relative to the total number of traffic accidents. Given the v-th feature in the S-th scenario, the total number of accidents of type j. Given the v-th feature in the S-th scene;
[0110] Step S2 also includes:
[0111] Based on the basic risk coefficients of each traffic accident type of the target vehicle, the prior probability of each historical traffic accident type relative to the total number of traffic accidents in the feature sequence of several scenarios of historical traffic accidents on highways, and the posterior risk probability of historical traffic accident types in several known scenarios, a combined feature vector of target vehicle-scenario-accident type is constructed.
[0112] Based on random forest, a decision tree random forest is built for each traffic accident type in various scenarios. The feature vector of the target vehicle-scenario-accident type combination is used as input. The maximum impurity reduction value is split according to the exhaustive search algorithm to generate a comprehensive risk index of each traffic accident type of the target vehicle in several known scenarios.
[0113] Combining the steps above:
[0114] As a further development, based on the construction of vehicle-scene feature vectors, multi-dimensional risk factors are integrated through a random forest algorithm, and node splitting is performed using the maximum impurity reduction criterion to generate a scenario-based comprehensive risk index for traffic accident types. This achieves precise coupling between macro-level scenario risks and micro-level vehicle behavior, significantly improving the accuracy and practicality of risk assessment and providing a quantitative decision-making basis for proactive safety management on highways.
[0115] As an example of step S2:
[0116] Take the Zhejiang section of the Shanghai-Kunming Expressway as an example.
[0117] First, the data preprocessing stage. The system extracts accident data for this road section from the past three years and constructs a scene feature sequence including dimensions such as time period (night), weather (rain), and road section (bridge). After standardization, the prior probability of a rear-end collision in the night-rain-bridge scenario is calculated to be 0.18. The likelihood ratio matrix shows that the likelihood ratio of rainfall to rear-end collisions is 2.3, night driving is 1.8, and bridge sections are 1.5, with a comprehensive likelihood ratio of 6.21, increasing the posterior risk probability to 0.42.
[0118] Next, the feature engineering stage. For the truck with license plate number Zhejiang AXXXXX, the system obtains its basic risk coefficient of rear-end collision (2.1), and combines it with data such as the posterior probability of the scene (0.42) and the prior probability (0.18) to construct a feature vector containing 12 dimensions. Key features include vehicle risk coefficient, posterior probability of the scene, weather likelihood ratio, and time likelihood ratio.
[0119] Finally, in the model prediction stage, the feature vector is input into the trained rear-end collision random forest model. After feature splitting through multiple decision trees (one decision tree first splits based on the scenario posterior probability > 0.35, then based on the vehicle risk coefficient > 1.8), the final integrated output is a rear-end collision comprehensive risk index of 7.2 for the vehicle in the current scenario. Based on this, the system generates a risk warning, prompting the road administration department to increase patrol density on the bridge section during rainy nights and to implement real-time monitoring of the truck.
[0120] S3. Determine the comprehensive risk index of environmental factors in each scenario and the various traffic accident types of target vehicles under known scenarios, establish a dynamic quantitative function for the local contribution of environmental factors in each scenario, assign the real-time environmental factor contribution weight of each scenario of the highway to the basic risk coefficient of each traffic accident type of the target vehicle, conduct weighted regression analysis of traffic accident types in each scenario, and generate a real-time traffic accident risk map of each scenario of the highway.
[0121] Step S3 specifically includes:
[0122] Identify the environmental factors for each scenario; the environmental factors for each scenario include: meteorological factors, traffic flow factors, and road surface condition factors;
[0123] Using the SHAP value game algorithm, when the comprehensive risk index prediction value of each traffic accident type of the target vehicle in a given known scenario is extracted from the decision tree random forest of each traffic accident type in each scenario, the contribution value of environmental factors in each scenario to the prediction value is extracted. A local contribution dynamic quantification function of environmental factors in each scenario is constructed, and the real-time environmental factor contribution weights are assigned to each scenario of the highway.
[0124] Step S3 also includes:
[0125] The contribution weights of real-time environmental factors in various scenarios on highways are normalized.
[0126] The highway road network is acquired and divided into spatial grids. The basic risk coefficients of each traffic accident type for all target vehicles in each grid segment cell are calculated as independent variables. The average comprehensive risk index of each traffic accident type for all target vehicles in each grid segment cell is used as the dependent variable. The contribution weight of real-time environmental factors in each grid segment cell is used as the regression coefficient of the corresponding feature. A weighted least squares regression model is established to generate real-time traffic accident risk values for each scenario in each segment cell of the highway road network.
[0127] The real-time traffic accident risk values of each scenario in each segment cell of the highway network are weighted and summed to obtain the total real-time traffic accident risk value of each scenario in each segment cell of the highway network.
[0128] Based on the preset risk level color scale table, and using heat map drawing tools, the total real-time traffic accident risk value of each scenario in each segment cell of the highway network is mapped to the corresponding highway network, thus obtaining a real-time traffic accident risk map of each scenario on the highway.
[0129] Combining the steps above:
[0130] As a further development, based on the SHAP value to quantify the risk contribution of environmental factors, a dynamic and visualized traffic accident risk map is generated by integrating real-time environmental data with basic vehicle risk coefficients through a spatial gridded weighted regression model. This achieves accurate quantification of environmental risks, precise calculation of spatial risks, and intuitive panoramic risk display, providing real-time spatial decision support for the comprehensive safety management of highways.
[0131] Take the Hebei section of the Beijing-Hong Kong-Macau Expressway as an example.
[0132] Environmental factor contribution analysis stage. The system extracts the random forest model of the rear-end collision accident on this road section. Through SHAP value calculation, it is found that the SHAP contribution value of the current rainfall intensity (15mm / h) is +2.1, the contribution value of visibility (800 meters) is +1.8, and the contribution value of traffic flow (2800 vehicles / h) is +1.2. After normalization, the real-time environmental weight vector [0.41, 0.35, 0.24] is obtained.
[0133] Spatial grid modeling stage. The road segment is divided into 500-meter grid units. For the grid from K125+500 to K126+000: the average basic rear-end collision risk coefficient of 32 vehicles in this grid is 2.8, and the average comprehensive risk index is 6.9. A weighted regression equation is established with environmental weights [0.41, 0.35, 0.24], and the rear-end collision risk value of this grid is calculated to be 7.3.
[0134] Multi-accident type fusion stage. Simultaneously calculate the rollover risk value of 4.2 and the collision risk value of 5.6 for this grid, and weight them according to the severity of the accident (weights 0.5, 0.3, 0.2) to obtain a comprehensive total risk value of 6.1.
[0135] Finally, the risk map generation stage. According to the preset color scale (red: ≥8, orange: 6-8, yellow: 4-6, green: <4), this grid is displayed as an orange warning. The 256 grids of the entire road section together form a real-time risk heat map, showing that the K125-K130 section has formed a continuous orange high-risk zone. The command center immediately deployed increased patrols in this area and activated variable speed limit control.
[0136] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A method for intelligent early warning of highway traffic conditions, characterized in that, include: S1. Based on the back-end database of the highway license plate recognition system, obtain the historical traffic violation records of the target vehicle, analyze the causal relationship between the target vehicle's violations and traffic accident types, and quantify the basic risk coefficients of the target vehicle for each type of traffic accident. S2. Based on the historical traffic accident record database of highways, analyze the correlation and fitting between the prior risk probability of historical traffic accident types under several known scenarios and the basic risk coefficients of various traffic accident types of the target vehicle, and generate a comprehensive risk index for various traffic accident types of the target vehicle under several known scenarios, specifically including: Based on the historical traffic accident record database of highways, multi-dimensional feature data of historical traffic accidents are extracted according to the time dimension, space dimension and environment dimension, and feature sequences under several scenarios of historical traffic accidents on highways are constructed. Standardization processing is performed on the feature sequences of several scenarios of historical traffic accidents on highways. Based on Naive Bayes, we verify the prior probability of each historical traffic accident type relative to the total number of traffic accidents in the feature sequences of several scenarios of historical traffic accidents on highways. Based on the prior occurrence probability of each historical traffic accident type relative to the total number of traffic accidents in the feature sequences of several scenarios of historical traffic accidents on highways, we verify the likelihood ratio of each feature in each scenario relative to each historical traffic accident type relative to the total number of traffic accidents. For each given scenario, the likelihood ratio of the feature relative to each historical traffic accident type relative to the total number of traffic accidents is multiplied to obtain the comprehensive likelihood ratio of the feature relative to each historical traffic accident type relative to the total number of traffic accidents. Based on the prior probability of each historical traffic accident type relative to the total number of traffic accidents in the feature sequence of several scenarios of historical traffic accidents on highways, and the comprehensive likelihood ratio of each feature in each scenario relative to each historical traffic accident type relative to the total number of traffic accidents, calculate the posterior risk probability of historical traffic accident types in several known scenarios. Step S2 further includes: Based on the basic risk coefficients of each traffic accident type of the target vehicle, the prior probability of each historical traffic accident type relative to the total number of traffic accidents in the feature sequence of several scenarios of historical traffic accidents on highways, and the posterior risk probability of historical traffic accident types in several known scenarios, a combined feature vector of target vehicle-scenario-accident type is constructed. Based on random forest, a decision tree random forest is built for each traffic accident type in various scenarios. The target vehicle-scenario-accident type combination feature vector is used as input. The maximum impurity reduction value is split according to the exhaustive search algorithm to generate a comprehensive risk index for each traffic accident type of the target vehicle in several known scenarios. S3. Determine the comprehensive risk index of environmental factors in each scenario and the various traffic accident types of target vehicles under known scenarios, establish a dynamic quantitative function for the local contribution of environmental factors in each scenario, assign the real-time environmental factor contribution weights to each scenario of the highway and the basic risk coefficients of various traffic accident types of target vehicles, and perform weighted regression analysis of traffic accident types in each scenario to generate a real-time traffic accident risk map of each scenario of the highway.
2. The intelligent early warning method for highway traffic conditions according to claim 1, characterized in that, Step S1 specifically includes: Based on the target vehicle’s historical traffic violation records, the historical traffic violation records of the target vehicle are extracted using the unit time as the observation window and the historical traffic violation records of the target vehicle as the observation object. Based on the historical traffic violation records of the target vehicle, the descriptions of the violation behavior and the traffic accident type are labeled according to the timestamps of the historical traffic violation records. These are then substituted into one-hot encoding to generate the violation behavior vector and the traffic accident type vector of the target vehicle, resulting in the target vehicle's traffic violation behavior vector sequence and traffic accident type vector sequence. Based on the traffic violation behavior vector sequence of the target vehicle, the violation frequency characteristics, violation verification degree characteristics, and violation behavior pattern characteristics of the traffic violation behavior vector are statistically analyzed to construct a structured feature dataset of the traffic violation behavior vector of the target vehicle. Based on the traffic accident type vector sequence of the target vehicle, determine the label data of each traffic accident and build a traffic accident type vector label dataset for the target vehicle. Based on the structured feature dataset of traffic violation vectors of target vehicles and the vector label dataset of traffic accident types of target vehicles, a wide table of violation behavior-accident type of target vehicles is constructed. The accident type of target vehicles is used as a node and the violation behavior of target vehicles is used as a child node. The chi-square test is used to verify the significant correlation between the violation behavior and the accident type of target vehicles as an edge, and an undirected network graph of violation behavior-accident type of target vehicles is constructed. Using the exponential decay function, we calculate the independent occurrence weighted count and joint occurrence weighted count of each target vehicle's violation-accident type in the undirected network graph of the target vehicle's violation-accident type within the observation window; Based on the independent and joint occurrence weighted counts of each target vehicle's violation-accident type, calculate the advantage ratio and relative risk between the violation child node and the accident type parent node in the undirected network graph of the target vehicle's violation-accident type; Based on the relative risk and advantage ratio between the target vehicle's violation sub-node and the accident type parent node, the association strength and direction of the edges between the violation sub-node and the accident type parent node are determined. Weights and directions are assigned to each edge of the undirected network graph of the target vehicle's violation-accident type, resulting in a directed weighted network graph of the target vehicle's violation-accident type, thus determining the causal relationship between the target vehicle's violation and the traffic accident type.
3. The intelligent early warning method for highway traffic conditions according to claim 2, characterized in that, Step S1 also includes: Based on the causal relationship between the target vehicle's violation and the type of traffic accident, the violation sub-nodes within the current observation window of the target vehicle's violation-accident type directed weighted network graph are extracted to construct the target vehicle's current violation state vector. Based on linear regression, the parent nodes of traffic accident types are connected to the child nodes of violations within the current observation window. The edge weights of each child node pointing to the parent node and the violation indication function of the target vehicle are obtained. The basic risk coefficients of each traffic accident type of the target vehicle are calculated according to the forward propagation. Based on the current violation status vector of the target vehicle within the current observation window, the weighted frequency of each traffic accident type within the current observation window is calculated according to the exponential decay function. Substituted into the Sigmoid frequency amplification function, the risk amplification coefficient of each traffic accident type for the target vehicle is generated. The basic risk coefficients for each type of traffic accident of the target vehicle are compensated by using the risk amplification coefficients for each type of traffic accident of the target vehicle, thus obtaining the basic risk coefficients for each type of traffic accident of the target vehicle.
4. The intelligent early warning method for highway traffic conditions according to claim 3, characterized in that, Step S3 specifically includes: Identify the environmental factors for each scenario; the environmental factors for each scenario include: meteorological factors, traffic flow factors, and road surface condition factors; Using the SHAP value game algorithm, when the comprehensive risk index prediction value of the target vehicle under a given known scenario is obtained from the decision tree random forest for each traffic accident type in each scenario, the contribution value of environmental factors in each scenario to the prediction value is extracted. A local contribution dynamic quantification function of environmental factors in each scenario is constructed, and the real-time environmental factor contribution weights are assigned to each scenario of the highway.
5. The intelligent early warning method for highway traffic conditions according to claim 4, characterized in that, Step S3 also includes: The contribution weights of real-time environmental factors in various scenarios on highways are normalized. The highway road network is acquired and divided into spatial grids. The basic risk coefficients of each traffic accident type for all target vehicles in each grid segment cell are calculated as independent variables. The average comprehensive risk index of each traffic accident type for all target vehicles in each grid segment cell is used as the dependent variable. The contribution weight of real-time environmental factors in each grid segment cell is used as the regression coefficient of the corresponding feature. A weighted least squares regression model is established to generate real-time traffic accident risk values for each scenario in each segment cell of the highway road network. The real-time traffic accident risk values of each scenario within each segment cell of the highway network are weighted and summed to obtain the total real-time traffic accident risk value of each scenario within each segment cell of the highway network. According to the preset risk level color table, the total real-time traffic accident risk value of each scenario within each segment cell of the highway network is mapped to the corresponding highway network using a heat map drawing tool to obtain the real-time traffic accident risk map of each scenario of the highway.
Citation Information
Patent Citations
Method, apparatus and system for predicting risk of traffic accident
CN108154681A
Traffic accident risk real-time assessment method and system
CN117809458A