Probability model analysis method for secondary accident of over-limit transport vehicle

By constructing a Bayesian optimized random forest model combined with a logistic regression model, the problem of high accuracy and high interpretability of secondary accidents involving oversized and overweight transport vehicles was solved. This enabled high-precision prediction of secondary accidents and analysis of influencing factors, supporting traffic management decisions.

CN121456848APending Publication Date: 2026-02-03QINGHAI PROVINCIAL COMM CONSTR MANAGEMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511631347.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing technologies lack high-precision and highly interpretable probabilistic models for secondary accidents involving oversized and overweight vehicles, resulting in insufficient predictive accuracy in traffic safety management and making it difficult to support scientific decision-making.

Method used

We constructed a Bayesian-optimized random forest model combined with a logistic regression model and the SHAP interpretation framework. Through data standardization, feature selection, and hyperparameter tuning, we analyzed the probability of secondary accidents involving overloaded transport vehicles.

Benefits of technology

It achieves high-precision prediction of secondary accidents, provides quantitative analysis of key influencing factors, supports the decision-making of traffic management departments, and reduces the incidence of secondary accidents involving oversized and overweight vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121456848A_ABST
    Figure CN121456848A_ABST
Patent Text Reader

Abstract

The invention discloses a probability model analysis method for a secondary accident of an over-limit transport vehicle, and the method comprises the following steps: obtaining traffic accident related data, including numerical data and classification data; inputting the data into a trained over-limit transport vehicle secondary accident probability model, wherein the model is constructed by combining a random forest model after Bayesian optimization with a logistic regression model; and carrying out influence analysis on a model prediction result through an SHAP interpretation framework. According to the method, the interpretability of logistic regression and the nonlinear modeling capability of the random forest are fused, and the model precision is improved by combining Bayesian optimization, so that accurate prediction of the secondary accident probability of the over-limit transport vehicle and quantitative analysis of key influence factors are realized, the blank of model research in the field is filled up, and the method has a wide application prospect. And a scientific basis is provided for traffic safety management and accident prevention.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of traffic data analysis, and in particular to a probability model analysis method for secondary accidents of over-limit transport vehicles. BACKGROUND

[0002] Over-limit transport vehicles are prone to secondary accidents after traffic accidents due to their high load, large volume, poor maneuverability, and other characteristics, resulting in serious personnel casualties and property losses. Existing researches are mostly focused on traffic accident prediction of ordinary vehicles or risk factor analysis for large transport, such as risk identification based on WSR method, dynamic rollover prediction, and blockchain supervision mode, lacking a specialized probability model for secondary accidents of over-limit transport vehicles. In addition, traditional statistical models perform poorly in handling nonlinear relationships, while machine learning models have strong fitting ability but poor interpretability, making it difficult to apply in actual traffic management.

[0003] In the prior art, the logistic regression model has high interpretability but limited modeling ability for nonlinear relationships; the random forest model can effectively handle complex feature interactions, but is easily affected by hyperparameter settings and lacks intuitive explanation of the prediction results. For example, Liu Zengqing et al. used the CRITIC method and entropy weight method to combine weighting to improve the accuracy of traffic accident prediction, constructed an ES-ARIMA-BP neural network combination prediction model, and analyzed the monthly distribution of traffic accidents in Xinjiang Uygur Autonomous Region.

[0004] Dong Wanqing, Zhao Zirong, Liao Huimin, etc. based on multi-source traffic big data, constructed a data-driven multi-granularity, multi-perspective spatio-temporal topology graph, designed a traffic accident risk prediction model based on dynamic spatio-temporal graph network, and realized accurate prediction of road section-level traffic accident risk.

[0005] Pan Yiyong et al. combined oversampling technology and Bayesian network to improve the Catboost algorithm to predict the severity of traffic accidents. Peijie Wu, Tianyi Chen, etc. integrated spatio-temporal cubes and machine learning techniques to propose a city planning accident risk identification model to improve the accuracy of accident risk prediction. The model uses an XGBoost classifier to predict risk patterns and is verified in a case study in Manhattan, New York City.

[0006] Atumo E et al. evaluated Michigan interstate highway accident hotspots using spatial statistics and random forest methods. Getis-Ord statistics were used to identify accident hotspots, and random forest methods were used to predict hotspots in 2018 based on data from 2010 to 2017, with an accuracy of 76.7%, recall rate of 74%, and F-score of 70%. The clustering of accidents showed spatial dependence of high-value and low-value property loss accidents.

[0007] In addition, the existing method does not consider the operation characteristics and accident mechanism specific to the over-limit transport vehicle, resulting in insufficient prediction accuracy and difficulty in supporting precise traffic safety decisions. Therefore, there is an urgent need for an over-limit transport vehicle secondary accident probability analysis method with high accuracy and strong explanation. SUMMARY

[0008] To solve the above technical problems, the present application provides a probability model analysis method for secondary accidents of over-limit transport vehicles, comprising the following steps: Step S1, obtaining relevant data of traffic accidents; Step S2, inputting the relevant data into the trained over-limit transport vehicle secondary accident probability model, wherein the over-limit transport vehicle secondary accident probability model is constructed by combining a Bayesian optimized random forest model with a logistic regression model; Step S3, obtaining the impact analysis of the model prediction.

[0009] Further, the relevant data in step S1 includes numerical data and classification data, wherein the numerical data includes traffic flow, average speed, traffic density, congestion diffusion range, lane changing frequency and sudden braking proportion; the classification data includes environmental factor data and driver information data, wherein the environmental factor data includes road conditions, weather conditions, lighting conditions and temperature; and the driver information data includes vehicle type, driver's driving age, fatigue degree and distraction degree.

[0010] Further, the step S2 of constructing the over-limit transport vehicle secondary accident probability model comprises the following steps: Step S210, constructing a training set and a test set; preprocessing the relevant data, including data standardization and feature variable screening, and then dividing the processed relevant data into a training set and a test set; Step S220, establishing a logistic regression model; linearly combining the feature variables, and using a logistic function to output the linear combination result as a probability value between 0 and 1; Step S230, establishing a random forest model; selecting a decision tree as a base model, adjusting the decision tree using grid search, establishing a random forest model, and then optimizing the random forest model using Bayesian optimization.

[0011] Further, the step S210 comprises the following steps: Step S211, data standardization; performing Z-score standardization processing on the relevant data after processing the extreme values and missing values; Step S212, feature variable screening; performing relationship assumption between the standardized data, deleting irrelevant data, converting non-numerical classification data into numerical data, and then screening out data closely related to over-limit transport vehicles as feature variables through a decision tree; Step S213: Divide the data into training and test sets. The processed data is divided into training and test sets. The training set is used for model training and parameter estimation, and the test set is used to evaluate the model's performance.

[0012] Furthermore, the formula for calculating the Z-score standardization mentioned in step S211 is as follows: , Where x is the original data point, It is the mean of the dataset. It is the standard deviation of the dataset.

[0013] Furthermore, the specific method for the relationship hypothesis described in step S212 is as follows: calculate the chi-square statistic and degrees of freedom respectively, find the corresponding p-value based on the chi-square statistic and degrees of freedom to determine the significance level. If the p-value is less than the significance level, reject the null hypothesis and consider that there is a significant relationship between the variables; if the p-value is greater than the significance level, the null hypothesis cannot be rejected and consider that there is no significant relationship between the variables.

[0014] Furthermore, the significance level is typically 0.05.

[0015] Furthermore, the logical function mentioned in step S220 is the sigmoid function, and the formula for the linear combination is: , in, Indicates that, given characteristic variables In the case of the event That is, the probability of a secondary accident occurring; The term represents the intercept, and e represents the natural constant. The regression coefficients of each feature variable, i.e., a certain feature variable The degree and direction of the impact on the probability of an event occurring.

[0016] Furthermore, step S220 also includes cross-validation testing of the logistic regression model.

[0017] Furthermore, the adjustments made to the decision tree in step S230 using grid search include: adjusting the number of optimal decision trees, adjusting the maximum depth, and adjusting the minimum sample split.

[0018] Furthermore, step S230 also includes a random forest model test.

[0019] Furthermore, in step S230, the Bayesian optimization is transformed into hyperparameter optimization, including: S1. Given a hyperparameter space, randomly initialize a set of hyperparameter vectors; S2, substitute the hyperparameter vector into the prior model, select the next most potential sampling point according to a specific sampling strategy; S3, run the model at the selected sampling point and observe the value of the objective function, and include the observation result in the current evaluation point set; S4, update the prior model to the posterior model by means of Bayesian inference with the new observation result; S5, set the maximum number of iterations in the algorithm, if the number of iterations reaches the maximum number of iterations, stop iteration, select the optimal evaluation point from the evaluation point set, otherwise repeat S3 and S4.

[0020] Further, in step S3, the influence analysis of model prediction is performed by the method of SHAP explanation framework.

[0021] Further, the SHAP explanation framework is: , Wherein, is a certain characteristic variable, is an original variable, is an explanation model, M is the number of input characteristic variables, represents the constant value of the model when all characteristics are missing, represents the SHAP value of the i-th characteristic.

[0022] Compared with the prior art, the advantages and effects of the present application are as follows: 1. The present application firstly constructs a special probability model for secondary accidents of over-limit transportation vehicles, combines the advantages of logistic regression and random forest, realizes high-precision prediction and quantitative analysis of key influence factors, and promotes the refinement and perfection of the traffic accident research system.

[0023] 2. The present application optimizes the hyperparameters of the random forest model by Bayesian optimization, significantly improves the prediction accuracy and stability; combined with the SHAP framework, the model output is visualized and explained, and the influence direction and degree of each feature on the accident probability are clear, which supports scientific decision-making.

[0024] 3. The model output of the present application can provide decision support for transportation management departments such as over-limit transportation vehicle supervision, route planning, rescue resource allocation, effectively reduce the secondary accident rate of over-limit transportation vehicles, and improve the road safety level.

[0025] The above description is only a summary of the technical scheme of the present application, in order to more clearly understand the technical means of the present application, so as to implement according to the content of the specification, and in order to make the above content and other purposes, characteristics and advantages of the present application more obvious and easy to understand, the following will detail the preferred embodiments of the present application with the help of the drawings.

[0026] The above and other objects, advantages and features of the present application will become more apparent from the following detailed description of specific embodiments of the present application, when taken in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor on the basis of these drawings. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual proportions.

[0028] wherein: Figure 1 Flow chart of the probability model analysis method for secondary accidents of the oversize transport vehicle of the present application; Figure 2 Chi-square test chart of characteristic variables of the probability model analysis method for secondary accidents of the oversize transport vehicle of the present application; Figure 3 Random forest feature importance chart of the probability model analysis method for secondary accidents of the oversize transport vehicle of the present application; Figure 4 Schematic diagram of decision tree principle of the probability model analysis method for secondary accidents of the oversize transport vehicle of the present application; Figure 5 Schematic diagram of random forest model principle of the probability model analysis method for secondary accidents of the oversize transport vehicle of the present application; Figure 6 ROC curve and AUC area statistical chart of logistic regression model of the probability model analysis method for secondary accidents of the oversize transport vehicle of the present application; Figure 7 ROC curve and AUC area statistical chart of random forest model of the probability model analysis method for secondary accidents of the oversize transport vehicle of the present application; Figure 8 SHAP explanation framework chart of the probability model analysis method for secondary accidents of the oversize transport vehicle of the present application; Figure 9 SHAP example scatter plot of the driving age of the driver on the influence degree of the model of the probability model analysis method for secondary accidents of the oversize transport vehicle of the present application; Figure 10 Bayesian optimization random forest model SHAP bar chart of the probability model analysis method for secondary accidents of the oversize transport vehicle of the present application; Figure 11A SHAP scatter plot of the Bayesian optimized random forest model of the probability model analysis method for secondary accident probability of an oversize transport vehicle of the present application; Figure 12 A SHAP scatter plot of the driver's driving age, rescue arrival time, weather condition, and load ratio of the probability model analysis method for secondary accident probability of an oversize transport vehicle of the present application; Figure 13 A confusion matrix heat map of the random forest model of the probability model analysis method for secondary accident probability of an oversize transport vehicle of the present application. DETAILED DESCRIPTION

[0029] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. In the following description, specific details such as specific configurations and components are provided only to help a comprehensive understanding of the embodiments of the present application. Therefore, those skilled in the art should understand that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. In addition, in order to be clear and concise, the description of known functions and structures is omitted in the embodiments.

[0030] It should be understood that the "one embodiment" or "the embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "one embodiment" or "the embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner.

[0031] In addition, reference numerals and / or letters can be repeated in different examples in the present application. Such repetition is for the purpose of simplification and clarity, and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0032] The term "and / or" herein is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that there are three cases of A alone, B alone, and A and B together. The term "and" herein is a description of another association relationship of the associated objects, which means that there can be two relationships, for example, A and B can mean that there are two cases of A alone and A and B together. In addition, the characters " / " herein generally represent an "or" relationship between the associated objects before and after the " / ".

[0033] The term "at least one" is merely used to describe a corresponding relationship of associated objects, and indicates that three relationships can exist, for example, at least one of A and B can represent three cases of A existing alone, A and B existing together, and B existing alone.

[0034] It should also be noted that, in this document, relationship terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion.

[0035] Embodiment 1 This embodiment introduces a probability model analysis method for secondary accidents of oversize transport vehicles.

[0036] Please refer to Figure 1 , as shown in Figure 1 , the flowchart of the probability model analysis method for secondary accidents of oversize transport vehicles of the present application.

[0037] Step S1, obtaining relevant data of traffic accidents; Step S2, inputting the relevant data into the trained secondary accident probability model of oversize transport vehicles, wherein the secondary accident probability model of oversize transport vehicles is constructed by combining a Bayesian optimized random forest model with a logistic regression model; Step S3, obtaining the impact analysis predicted by the model.

[0038] Technical effects of this embodiment: by constructing a complete model analysis process, the whole chain processing from data collection, model training to result interpretation is realized, and a standardized and reusable method framework is provided for the probability analysis of secondary accidents of oversize transport vehicles.

[0039] Embodiment 2 Based on embodiment 1, this embodiment discloses a further design of step S1 of the probability model analysis method for secondary accidents of oversize transport vehicles.

[0040] Further, the relevant data in step S1 includes numerical data and classification data.

[0041] Further, the numerical data includes traffic flow, average speed, traffic density, congestion diffusion range, lane changing frequency, and sudden braking proportion.

[0042] Further, the classification data includes environmental factor data and driver information data, the environmental factor data includes road conditions, weather conditions, lighting conditions, and temperature; and the driver information data includes vehicle type, driver's driving age, fatigue degree, and distraction degree.

[0043] Technical effects of the embodiment: By clearly defining the types and specific indicators of numerical data and categorical data, the comprehensiveness and representativeness of model input data are ensured, covering multi-dimensional influencing factors such as traffic flow characteristics, environmental factors, and driver behavior, and improving the real-world applicability of the model.

[0044] Embodiment 3 Based on Embodiment 1 or 2, the present embodiment discloses a further design of step S2 of the probability model analysis method of the secondary accident of the oversize transport vehicle.

[0045] Further, the construction of the secondary accident probability model of the oversize transport vehicle in step S2 includes the following steps: Step S210, constructing a training set and a test set; preprocessing the relevant data, including data standardization and feature variable screening, and then dividing the processed relevant data into a training set and a test set; Step S220, establishing a logistic regression model; linearly combining the feature variables, and using a logistic function to output the result of the linear combination as a probability value between 0 and 1; Step S230, establishing a random forest model; selecting a decision tree as a base model, adjusting the decision tree using grid search, establishing a random forest model, and then optimizing the random forest model using Bayesian optimization.

[0046] (1) Constructing a training set and a test set Further, the step S210 includes the following steps: Step S211, data standardization; performing Z-score standardization processing on the relevant data after processing the extreme values and missing values; Step S212, feature variable screening; making relationship assumptions between the standardized data, deleting irrelevant data, and converting categorical data that are not numerical data into numerical data; then selecting data closely related to the oversize transport vehicle as feature variables through decision tree screening; Step S213, dividing the training set and the test set; dividing the processed data into a training set and a test set, the training set is used for model training and parameter estimation, and the test set is used for evaluating the performance of the model.

[0047] Further, the calculation formula of the Z-score in step S211 is: where x is the original data point, is the mean of the data set, is the standard deviation of the data set.

[0048] Furthermore, the specific method for the relationship hypothesis described in step S212 is as follows: calculate the chi-square statistic and degrees of freedom respectively, find the corresponding p-value based on the chi-square statistic and degrees of freedom to determine the significance level. If the p-value is less than the significance level, reject the null hypothesis and consider that there is a significant relationship between the variables; if the p-value is greater than the significance level, the null hypothesis cannot be rejected and consider that there is no significant relationship between the variables.

[0049] Furthermore, the formula for calculating the chi-square statistic is as follows: Where O is the observed frequency and E is the expected frequency, This relates to contingency tables. A contingency table is a table used to simultaneously display the distribution of observed data for two or more categorical variables. Its main purpose is to preliminarily examine whether there is a correlation between these variables. In a contingency table, the expected frequency of the cell in the i-th row and j-th column is... The row total is the sum of the frequencies of all observations in the i-th row of the contingency table, the column total is the sum of the frequencies of all observations in the j-th column of the contingency table, and the total number of samples is the sum of the frequencies of all observations in the entire contingency table.

[0050] Furthermore, the formula for calculating the degrees of freedom is: The number of rows represents the number of categories of the row variables in the contingency table, and the number of columns represents the number of categories of the column variables in the contingency table.

[0051] Furthermore, the significance level is typically 0.05.

[0052] Please refer to Figure 2 As shown, Figure 2 The chi-square test plot shows the characteristic variables of the probability model analysis method for secondary accidents involving oversized transport vehicles in this application. It can be seen that congestion spread, weather conditions, lighting conditions, and driver distraction are significantly related to secondary accidents. However, data such as traffic flow and average vehicle speed, which seem closely related to secondary accidents in reality, are not significantly correlated with them.

[0053] Then, a random forest model was used to conduct correlation analysis on the accident. One hundred decision trees were selected, and variables closely related to oversized transport vehicles were screened out. Redundant variables that contributed little to the model's predictive ability were removed to improve the model's prediction accuracy and reduce computational resource consumption, ensuring the efficiency and accuracy of subsequent model building.

[0054] Please refer to Figure 3 As shown, Figure 3The random forest feature importance chart of the probability model analysis method of the secondary accident of the over-limit transport vehicle of the present application can be seen. The higher the importance score of the final output, the greater the influence of the feature on the prediction result. According to the table output, select the data above the importance of 0.04, including the load ratio, the proportion of emergency braking, the traffic density, the flow, the congestion diffusion range, the average speed, the accident duration, the temperature, the rescue arrival time, the driver's driving age, the accident location, and the temporary control measures. 12 characteristic variables, combined with the previous weather conditions, light conditions and driver distraction degree, a total of 15 factors as characteristic variables for related modeling.

[0055] (2) Establish a logistic regression model Further, the logistic function in step S220 is a sigmoid function, and the formula of the linear combination is: wherein, represents the probability of the event , i.e. the probability of the secondary accident, under the given characteristic variable . represents the intercept term, e represents the natural constant, is the regression coefficient of each characteristic variable, i.e. the influence degree and direction of a certain characteristic variable on the probability of the event.

[0056] Further, the step S220 further includes a cross-validation test of the logistic regression model.

[0057] (3) Establish a random forest model First, define heavy vehicles as over-limit transport vehicles, and then find the rules according to the characteristic variables of heavy vehicles such as accident duration, rescue arrival time, and driver age, to distinguish whether small and medium-sized vehicles meet the same characteristics. The processed data is divided into a training set and a test set, usually in the proportion of 70% and 30% or 80% and 20%. The training set is used for model training and parameter estimation, and the test set is used to evaluate the performance of the model.

[0058] The trained model is evaluated using the test set data, and the commonly used evaluation indicators include accuracy, recall rate, F1 value, etc. The accuracy reflects the proportion of samples predicted correctly by the model; the recall rate represents the proportion of samples that actually occurred secondary accidents and were correctly predicted by the model; the F1 value is the harmonic mean of accuracy and recall, considering the performance of both. According to Table 1-2 below, the accuracy is evaluated, where 0 represents small and medium-sized vehicles, and 1 represents heavy vehicles. The number of samples with label 0 is 120, and the number of samples with label 1 is only 42, with a ratio of about 2:1. Due to the small number of samples that did not occur secondary accidents, the logistic regression model "ignores" these samples. Moreover, accuracy will fail when the sample is imbalanced. Even if the model predicts all samples as the majority class, it can still achieve a high overall accuracy, but the recall rate and precision of the minority class will be very low, making the model ineffective for prediction.

[0059] Table 1: Logistic Regression Accuracy Output Table To address the problem of insufficient secondary accident samples, oversampling (SMOTE) can be used to expand the minority class samples. SMOTE is an oversampling technique for handling class imbalance in datasets. Its main idea is to generate synthetic samples for the minority class to expand the number and improve the model's learning ability for the minority class. Specifically, in the feature space of the minority class samples, new "virtual" samples are generated by interpolation, making the minority class samples more balanced and densely distributed, and reducing the gap with the majority class sample size. Compared with random oversampling, the new samples generated by SMOTE are more diverse, reducing the risk of overfitting while preserving the original distribution characteristics of the data.

[0060] Table 2: SMOTE Logistic Regression Accuracy Output Table Random forest model does not need to extract feature values manually to some extent, due to its unique algorithm design and characteristics: through random subspace strategy, each decision tree randomly selects a feature subset for splitting when growing, which can automatically explore feature importance and potential combinations, and increase the diversity of base models to reduce the risk of overfitting; as a base model, decision trees can directly handle nonlinear relationships of original features without relying on manual feature transformation like linear models, and are flexible in handling categorical features. However, due to the need for model comparison, the same feature variables as the logistic regression model are used. Grid search (GridSearchCV) is used to adjust the optimal number of trees (n_estimators): 150; the maximum depth (max_depth) is adjusted to None; and the minimum sample split (min_samples_split) is adjusted to 2. Table 3: Random Forest Model Accuracy Output Table Similarly, the accuracy is low due to the small number of "no" samples, so the "no" samples of the model are also subjected to SMOTE processing.

[0061] Table 4 SMOTE after random forest model accuracy output table Please refer to Tables 3-4, which shows that after SMOTE processing of the samples that did not experience secondary accidents, the precision, recall, and F1-score averages of the random forest model are higher than those of the logistic regression model.

[0062] Please refer to Figure 4 , Figure 4 is a schematic diagram of the decision tree principle of the probability model analysis method of the over-limit transportation vehicle secondary accident of the present application; further, the decision tree in step S230 is a machine learning algorithm that makes decisions by constructing a tree structure; each node of the decision tree represents a judgment condition of a feature, each branch corresponds to a decision result, and the leaf node presents the final classification or regression value.

[0063] Further, the grid search in step S230 constructs a grid on the basis of the set super parameter value range and step length; the value interval and step length of the super parameter determine the density of the grid, and each grid point corresponds to a unique parameter value combination. Then, the algorithm will evaluate the parameter combination according to the predetermined evaluation standard, search each grid point, and further optimize the parameters through dynamic adjustment of the search range and step length, and select the best parameter combination according to the evaluation index after model training.

[0064] Please refer to Figure 5 , Figure 5 is a schematic diagram of the random forest model principle of the probability model analysis method of the over-limit transportation vehicle secondary accident of the present application; further, the random forest model in step S230 establishes multiple decision trees by randomly selecting feature variables and integrates their outputs to perform classification or regression tasks, thereby enhancing the accuracy and stability of the model and reducing the possibility of overfitting of a single decision tree. Through multiple rounds of training, a sequence of training models is obtained in each round using different training sets , and after a simple majority voting method, the final classification decision is obtained, and the formula is: where H(x) is the prediction result of the ensemble model for sample x, that is, the class Y with the most votes will be the final classification decision, x is a test sample (input instance), Y is the possible class label, and k is the number of base classifiers, the base classifier, is a indicator function, representing the prediction result of the i-th base classifier on sample x, when The value of the function is 1 when the candidate Y is equal to the value of the function, otherwise 0.

[0065] Further, the number of optimal decision trees, the maximum depth and the minimum sample split are adjusted using the grid search in step S230.

[0066] Further, the key of the Bayesian optimization algorithm in step S230 is to establish a probability model of the objective function, and continuously optimize the model combined with existing observations to provide a basis for the determination of subsequent sampling points. The method of the algorithm to find the optimal solution is to explore and utilize the information of the objective function, so that it can optimize better under limited samples. Compared with the grid search, it can avoid inefficiency by intelligently selecting sampling points. When solving the problem of global parameter optimization of a black box, the Bayesian optimization algorithm can also fully utilize the iterative optimization of experimental results to continuously improve the confidence of the black box function and the quality of the parameter combination, and obtain the next set of parameter combinations with high event probability, and finally realize the optimization of global parameters. The basic process of the algorithm in hyperparameter optimization includes: S1, randomly initialize a set of hyperparameter vectors in the given hyperparameter space; S2, substitute the hyperparameter vector into the prior model, and select the next most potential sampling point according to a specific sampling strategy; S3, run the model at the selected sampling point and observe the value of the objective function, and include the observation result into the current evaluation point set; S4, update the prior model to the posterior model by using Bayesian inference with the new observation result; S5, set the maximum number of iterations in the algorithm, if the number of iterations reaches the maximum number, stop iteration, select the optimal evaluation point from the evaluation point set, otherwise repeat S3 and S4.

[0067] (4) Effect verification Please refer to Figures 6-7 , Figure 6 The ROC curve and AUC area statistical diagram of the logistic regression model of the probability model analysis method of the secondary accident of the over-limit transportation vehicle, Figure 7 The ROC curve and AUC area statistical diagram of the random forest model of the probability model analysis method of the secondary accident of the over-limit transportation vehicle; the reliability of the logistic regression model is evaluated through the working characteristic curve (ROC curve) and the area under the curve (AUC). The AUC area of the random forest model is 0.74, which is greater than the AUC area of 0.62 of the logistic regression model, indicating that the model is reliable.

[0068] Further, step S230 also includes random forest model testing.

[0069] Technical effects of the embodiment: Through the data standardization, feature selection and model optimization steps, the convergence speed and prediction accuracy of the model are effectively improved; the SMOTE oversampling technology is combined to solve the sample imbalance problem, and the recognition ability of the model to minority class samples is enhanced.

[0070] Embodiment 4 Based on embodiment 3, the embodiment discloses a further design of the step S3 of the probability model analysis method of the over-limit transportation vehicle secondary accident.

[0071] Further, the influence of the model prediction is analyzed by the method of the SHAP explanation framework in step S3.

[0072] Further, the SHAP explanation framework is: , Wherein, is a certain feature variable, is an original variable, is an explanation model, M is the number of input feature variables, represents the constant value of the model when all features are missing, represents the SHAP value of the i-th feature.

[0073] The SHAP value can reflect the influence degree of each feature and intuitively present its positive or negative effect. Please refer to Figure 8 , Figure 8 is the SHAP explanation framework diagram of the probability model analysis method of the over-limit transportation vehicle secondary accident; it can be seen that Ф1, Ф2 and Ф3 will increase the SHAP value, which indicates that these factors will have a positive impact on the output variable. On the contrary, Ф4 will have a negative impact on the output variable.

[0074] Please refer to Figure 9 , Figure 9 is the SHAP example scatter plot of the influence degree of the driver's driving age on the model of the probability model analysis method of the over-limit transportation vehicle secondary accident; it can be seen that SHAP can quantize and intuitively show the influence degree of the driver's driving age on the model, and deeply analyze and quantize the influence of each feature on the predicted value in size and direction. The cooperative game theory basis ensures reliable and consistent explanation.

[0075] Please refer to Figures 10-12 , Figure 10The Bayesian optimization random forest model SHAP column chart of the probability model analysis method of the secondary accident of the over-limit transportation vehicle of the present application can be seen that the average influence size of the features on the model output is sorted, and the horizontal axis represents the absolute value mean of the SHAP value. The driver's driving age has the greatest influence on the model output, followed by weather conditions, load ratio, rescue arrival time, etc.

[0076] Figure 11 The Bayesian optimization random forest model SHAP scatter plot of the probability model analysis method of the secondary accident of the over-limit transportation vehicle of the present application; it shows the specific influence direction and degree of each feature. The horizontal axis is the SHAP value, which represents the influence size and direction of the feature on the model output. The SHAP value distribution of the driver's driving age is wide, indicating that the driving age has a great influence on the model output, and the influence direction depends on the specific value of the driving age. The SHAP value distribution range of the weather condition is wide, indicating that the weather condition has a complex and significant influence on the model output. Other features such as load ratio, rescue arrival time, etc. also have certain influence, but relatively small.

[0077] Figure 12 The SHAP scatter plot of the driver's driving age, rescue arrival time, weather condition, and load ratio of the probability model analysis method of the secondary accident of the over-limit transportation vehicle of the present application; positive numbers indicate an influence on not having a secondary accident, and negative numbers indicate an influence on having a secondary accident; the larger the value, the more relevant it is to whether a secondary accident occurs. The driver's driving age SHAP chart can be seen that the greater the driving age, the less likely a secondary accident will occur, which may indicate that experienced drivers can handle the situation properly to reduce the likelihood of a secondary accident after an accident. The rescue arrival time SHAP chart can be seen that the shorter the rescue arrival time, the higher the likelihood of not having a secondary accident, and a short rescue time can better handle the scene to reduce secondary accidents. In the weather condition, 0 is heavy rain, 1 is light rain, 2 is foggy, 3 is snowy, and 4 is sunny. As can be seen from the weather condition SHAP chart, the likelihood of not having a secondary accident is high under sunny conditions, and foggy and snowy conditions can affect the occurrence of secondary accidents. As can be seen from the load ratio SHAP chart, the huge load ratio of the over-limit vehicle basically increases the likelihood of a secondary accident.

[0078] The technical effect of the present embodiment: the SHAP explanation framework is introduced to realize transparent analysis of the model prediction results, and the contribution and action direction of each feature (such as driver's driving age, weather condition, load ratio, etc.) to the secondary accident probability are intuitively displayed, providing specific basis for risk prevention and control.

[0079] Embodiment 5 Based on Embodiment 3, the present embodiment discloses a further design of the cross-validation test of the logistic regression model of the probability model analysis method of the secondary accident of the over-limit transportation vehicle.

[0080] Cross-validation is a typical model validation method. Its principle is to divide the data set into training set and test set repeatedly without repetition to build a logistic regression model, and to comprehensively evaluate the model. The model established in this study adopts five-fold cross-validation method. The specific steps are as follows: (1) Randomly divide the data set after data processing into five subsets of similar size; (2) Each time select one subset as the test subset, and the remaining four subsets as the training subset to establish the logistic regression model and conduct training and prediction, and generate accuracy results; (3) Repeat the two steps five times to ensure that all subsets are rotated as test subsets, and then output the accuracy of the five prediction results and data processing to evaluate the accuracy and fluctuation of the model.

[0081] Through cross-validation, the evaluation bias caused by different data set division methods can be effectively avoided, and the model performance evaluation is more stable. In this study, 600 data are divided into five groups, and each data set contains 120 data. In the first division, one of the test sets is selected, and the other four are used as the training set to establish the logistic regression model for accuracy analysis; in the second division, 600 data are randomly divided into five groups to establish the logistic regression model for accuracy analysis. In this way, the performance of the model on different data subsets is comprehensively investigated.

[0082] The average of cross-validation score is 0.57, which indicates that the average accuracy of the model on different validation sets is about 57%. The standard deviation of cross-validation score is 0.03, indicating that the performance of the model on different validation sets is relatively stable and has small fluctuations, but the model accuracy is low.

[0083] Technical effect of this embodiment: Through five-fold cross-validation, the stability of the logistic regression model is evaluated, and the stability of the model on different data subsets is determined, providing a verification basis for model selection and optimization.

[0084] Example 6 Based on Example 3, this embodiment discloses a further design of the random forest model test for the probability model analysis method of the secondary accident of the over-limit transportation vehicle.

[0085] Please refer to Figure 13 , Figure 13The confusion matrix heat map of the random forest model of the probability model analysis method of the secondary accident of the over-limit transportation vehicle of the present application. The 5-fold cross-validation accuracy score is [0.53, 0.65, 0.65, 0.77, 0.75], the average accuracy is 0.67, and the standard deviation of the cross-validation accuracy score is about 0.09. The standard deviation reflects the degree of dispersion of the data, and the value indicates that the accuracy scores of the cross-validation are relatively dispersed, and the performance of the model on different data subsets fluctuates to a certain extent.

[0086] The confusion matrix is used for testing. The confusion matrix is especially suitable for binary and multi-classification problems. It intuitively shows the matching of the model prediction results and the true labels in the form of a table, helps to analyze the classification ability of the model on different categories, and identifies the patterns of classification errors. It can intuitively show the classification errors: through the non-diagonal elements to locate the class pairs that the model is easy to confuse and handle the class imbalance, avoid relying only on accuracy, and analyze the classification ability of the model to the minority class through precision and recall to provide direction for model optimization.

[0087] For samples with true class "No", 53 are correctly predicted, accounting for 74%; 19 are incorrectly predicted as "Yes", accounting for 26%. For samples with true class "Yes", 52 are correctly predicted, accounting for 65%; 28 are incorrectly predicted as "No", accounting for 35%.

[0088] After the establishment of the logistic regression model and the establishment of the random forest model, it can be concluded that the random forest model has better ability in secondary accident prediction.

[0089] Technical effects of the present embodiment: comprehensive testing of the random forest model using the confusion matrix and cross-validation, further parameter optimization combined with Bayesian optimization, significantly improving the model accuracy and generalization ability, and ensuring its reliability in complex traffic scenarios.

[0090] The above only describes the preferred embodiments of the present application, and does not limit the protection scope of the present application, and the present application can be variously changed and varied. Any change, modification, replacement, integration and parameter change of the embodiments within the spirit and principles of the present application fall within the protection scope of the claims of the present application.

Claims

1. A probabilistic model analysis method for secondary accidents involving oversized transport vehicles, characterized in that, Includes the following steps: Step S1: Obtain relevant data on traffic accidents; Step S2: Input the relevant data into the trained probability model of secondary accidents of oversized transport vehicles. The probability model of secondary accidents of oversized transport vehicles is constructed by combining a Bayesian optimized random forest model with a logistic regression model. Step S3: Obtain the impact analysis of the model prediction.

2. The probability model analysis method for secondary accidents involving oversized transport vehicles according to claim 1, characterized in that, The relevant data mentioned in step S1 includes numerical data and categorical data. The numerical data includes traffic flow, average vehicle speed, traffic density, congestion spread range, lane change frequency, and emergency braking ratio. The categorical data includes environmental factor data and driver information data. The environmental factor data includes road conditions, weather conditions, lighting conditions, and temperature. The driver information data includes vehicle type, driver experience, fatigue level, and distraction level.

3. The probability model analysis method for secondary accidents involving oversized transport vehicles according to claim 1, characterized in that, Step S2 involves constructing a secondary accident probability model for oversized transport vehicles, which includes the following steps: Step S210: Construct training and test sets; preprocess the relevant data, including data standardization and feature variable selection, and then divide the processed relevant data into training and test sets; Step S220: Establish a logistic regression model; perform a linear combination of the feature variables, and use a logistic function to output the result of the linear combination as a probability value between 0 and 1; Step S230: Establish a random forest model; select a decision tree as the base model, use grid search to adjust the decision tree, establish a random forest model, and then use Bayesian optimization to fine-tune the random forest model.

4. The probability model analysis method for secondary accidents involving oversized transport vehicles according to claim 3, characterized in that, Step S210 includes the following steps: Step S211: Data standardization; Perform Z-score standardization on the relevant data after handling extreme values ​​and missing values; Step S212: Feature variable selection; make relationship assumptions between the standardized data, delete irrelevant data, and convert non-numerical categorical data into numerical data; then use decision trees to select data closely related to oversized transport vehicles as feature variables. Step S213: Divide the data into training and test sets. The processed data is divided into training and test sets. The training set is used for model training and parameter estimation, and the test set is used to evaluate the model's performance.

5. The probability model analysis method for secondary accidents involving oversized transport vehicles according to claim 4, characterized in that, The formula for calculating the Z-score standardization mentioned in step S211 is as follows: , Where x is the original data point, It is the mean of the dataset. It is the standard deviation of the dataset.

6. The probability model analysis method for secondary accidents involving oversized transport vehicles according to claim 3 or 4, characterized in that, The specific method for the relationship hypothesis in step S212 is as follows: calculate the chi-square statistic and degrees of freedom respectively, find the corresponding p-value based on the chi-square statistic and degrees of freedom to determine the significance level. If the p-value is less than the significance level, reject the null hypothesis and consider that there is a significant relationship between the variables; if the p-value is greater than the significance level, the null hypothesis cannot be rejected and consider that there is no significant relationship between the variables.

7. The probability model analysis method for secondary accidents involving oversized transport vehicles according to claim 6, characterized in that, The significance level is typically 0.

05.

8. The probability model analysis method for secondary accidents involving oversized transport vehicles according to claim 7, characterized in that, The logical function mentioned in step S220 is the sigmoid function, and the formula for the linear combination is: , in, Indicates that, given characteristic variables In the case of the event That is, the probability of a secondary accident occurring; The term represents the intercept, and e represents the natural constant. The regression coefficients of each feature variable, i.e., a certain feature variable The degree and direction of the impact on the probability of an event occurring.

9. The probability model analysis method for secondary accidents involving oversized transport vehicles according to claim 1, characterized in that, In step S3, the impact of the model predictions is analyzed using the SHAP interpretation framework.

10. The probability model analysis method for secondary accidents involving oversized transport vehicles according to claim 9, characterized in that, The SHAP interpretation framework is as follows: , in, For a certain characteristic variable, For original variables, To explain the model, M is the number of input feature variables. This represents the constant value of the model when all features are missing. The SHAP value represents the i-th feature.