An autonomous driving scene risk assessment method fusing diffusion model and random forest

By fusing diffusion models and random forests, traffic scenario samples are generated and a risk assessment model is constructed. This solves the problems of complexity and data scarcity in risk assessment in autonomous driving scenarios, enabling early identification and high-precision assessment of potential risks and providing stable risk signal support.

CN121233964BActive Publication Date: 2026-07-31HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HARBIN INST OF TECH
Filing Date
2025-10-15
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing risk assessment methods for autonomous driving scenarios struggle to handle the complex nonlinear relationships between multi-dimensional continuous indicators, fail to effectively identify potential risks inherent in the scenario itself even when the system has not malfunctioned, and lack data for high-risk safety-critical scenarios, leading to an imbalance in the assessment focus and making it prone to misjudgments at critical moments.

Method used

By integrating diffusion models and random forests, a traffic scenario sample dataset is generated through a conditional generation distribution model. Minimum collision time and minimum headway are introduced as risk indicators. Continuous risk quantification indicators of exposure and severity are constructed. The mapping relationship between exposure and severity and risk labels is learned using a random forest model to achieve risk assessment.

Benefits of technology

It enables early identification and warning of potential risks in autonomous driving, constructs a quantifiable risk model, improves the assessment performance of safety-critical scenarios, outputs accurate and reliable risk signals, and ensures that decision-making logic is transparent and credible.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121233964B_ABST
    Figure CN121233964B_ABST
Patent Text Reader

Abstract

This invention relates to a risk assessment method for autonomous driving scenarios that integrates a diffusion model and a random forest, belonging to the field of autonomous driving control technology. It aims to address the problem of early identification and warning of potential risks in autonomous driving. Based on traffic scenario states, this invention improves the diffusion model by introducing conditional variables to obtain a conditionally generated distribution model, generating a traffic scenario sample dataset. Minimum collision time and minimum headway are set as key risk indicators to generate risk labels for each generated traffic scenario sample. Continuous risk quantification indicators conforming to functional safety standards are constructed as exposure and severity, and a training dataset is built. A random forest model is used to construct a risk assessment model, which is then trained using the training dataset. The training objective is to learn the mapping relationship between exposure, severity, and risk labels, resulting in a well-trained risk assessment model. A multi-dimensional evaluation index system is used to evaluate the performance of the risk assessment model, thus achieving risk assessment for autonomous driving scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of autonomous driving control technology, specifically relating to a method for risk assessment of autonomous driving scenarios that integrates diffusion models and random forests. Background Technology

[0002] Risk assessment technologies for autonomous driving scenarios have evolved through various approaches. Early and fundamental solutions were primarily based on physical rules and safe distance models, classifying risks by setting fixed thresholds. Among these, the most classic metrics are Time-to-Collision (TC) and Time Headway (THW). The concept of TTC, first proposed by Haywar, quantifies the remaining time for two vehicles to collide while maintaining their current state of motion, and it remains widely used. Building upon this, Mobileye's Responsibility-Sensitive Safety (RSS) model offers a more sophisticated rule-based approach. It defines, through formalized mathematical formulas, the minimum safe distance an autonomous vehicle should maintain to avoid a collision, providing a verifiable basis for safety decisions.

[0003] With the rise of data-driven approaches, traditional machine learning techniques such as random forests have also been applied to risk classification. Pateld et al. developed a risk rating model based on the random forest algorithm, studying how to predict risk levels under different driving conditions by processing vehicle sensor data and converting it into mathematical features. Zhao et al. proposed a traffic accident risk prediction algorithm combining deep convolutional neural networks and random forests. The framework includes a feature extractor and a classifier: first, a deep convolutional neural network is used to automatically learn key features from the data; then, a random forest composed of multiple decision trees is used to output probability values ​​representing the degree of risk. Gu et al. used a geographic random forest, effectively capturing the differences in the impact of risk factors in different geographical regions by establishing local regression equations. Wang et al. used a random forest model to quantify the importance of each risk factor on the severity of traffic accidents, comparing and analyzing the differences in key risk factors when the responsible parties in an accident are the driver and the vulnerable road user.

[0004] However, the scarcity of data for high-risk, security-critical scenarios leads to a severe imbalance in training data. To address this issue, researchers have begun employing advanced generative models to create highly realistic data for these critical scenarios. Among them, the diffusion model proposed by Ho et al. generates data by progressively denoising from pure noise. Its generated samples demonstrate excellent quality and diversity, providing valuable training data covering a wide range of edge scenarios for risk assessment models, thus compensating for the lack of real-world data. This model has become a mainstream algorithm in recent years.

[0005] The existing risk assessment methods for autonomous driving systems have the following limitations: they mostly use methods based on simple rules or thresholds, which are difficult to handle the complex nonlinear relationships between multi-dimensional continuous indicators, resulting in insufficient mapping accuracy from continuous perception signals to discrete safety levels; they are not sensitive to safety-critical high-risk scenarios that account for a small proportion of the data, resulting in an unbalanced assessment focus and a tendency to misjudge at critical moments; and they cannot effectively identify potential risks inherent in the scenario itself even when the system has not failed, lacking forward-looking early warning capabilities. Summary of the Invention

[0006] The problem this invention aims to solve is to achieve early identification and warning of potential risks in autonomous driving, and proposes a risk assessment method for autonomous driving scenarios that integrates diffusion models and random forests.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] A risk assessment method for autonomous driving scenarios that integrates diffusion models and random forests includes the following steps:

[0009] S1. Based on the traffic scenario state, improve the diffusion model, introduce conditional variables, obtain the conditional generation distribution model, and generate a traffic scenario sample dataset;

[0010] S2. Set the minimum collision time and minimum headway as key risk indicators, quantify the risk level of the traffic scenario samples generated in step S1, and generate a risk label for each generated traffic scenario sample.

[0011] S3. Construct a continuous risk quantification index that conforms to functional safety standards, including exposure and severity. Calculate the exposure and severity of each generated traffic scenario sample. Then, based on exposure and severity as input features and risk labels as output features, construct a training dataset.

[0012] S4. Construct a risk assessment model using a random forest model. Use the training dataset obtained in step S3 to train the risk assessment model. The training objective is to learn the mapping relationship between exposure, severity and risk labels, and obtain a well-trained risk assessment model.

[0013] S5. Use a multi-dimensional evaluation index system to evaluate the performance of the risk assessment model, and conduct risk assessment for autonomous driving scenarios based on the trained risk assessment model.

[0014] Furthermore, the specific implementation method of step S1 includes the following steps:

[0015] S1.1. The initial traffic scene state without added noise is collected as follows: ,in, The state dimension is represented, including vehicle position, speed, acceleration, and interaction topology;

[0016] S1.2. Based on the traffic scene state obtained in step S1.1, simulation is performed using a diffusion model. The diffusion process includes a forward diffusion stage and a reverse generation stage. In the forward diffusion stage, noise is added to the initial traffic scene state to obtain a traffic scene state sequence. In the reverse generation stage, a parameterized model is trained based on the obtained traffic scene state sequence to learn and reverse the noise addition step in the diffusion process. ,in, For the traffic scenario state at step t-1, Let T represent the traffic scene state at step t, where T is the total number of steps.

[0017] S1.3. Introduce condition variables into the parameterized model obtained in step S1.2. The condition variables include traffic density, initial vehicle speed, and intersection type, resulting in the introduction of condition variables. To extend the parameterized model and achieve a conditional generation distribution model that allows for controllability of the generated scene. Generate a traffic scene sample dataset.

[0018] Furthermore, the specific implementation method of step S2 includes the following steps:

[0019] S2.1. Based on the traffic scene sample dataset obtained in step S1, take the prediction window. The minimum collision time within the range is taken as the minimum collision time. Prediction window The minimum headway within the range is taken as the minimum headway. The expression is:

[0020]

[0021]

[0022] in, The remaining time before a collision occurs, given the target vehicle's current route and speed difference; min is a function for minimizing this value. The time interval required for the front of one vehicle to reach the position of the front of the vehicle in front in a continuous flow of traffic.

[0023] S2.2. Setting based on and Risk classification standards for autonomous driving scenarios based on indicators:

[0024] High-risk standard is <1.5s or <0.8s;

[0025] The medium risk standard is 1.5. <3.0s or 0.8< 1.5s;

[0026] Low risk standard is ≥3.0s or ≥1.5s;

[0027] If any of the above indicators meets the high-risk criteria, the whole situation is judged as high-risk; otherwise, if any of the indicators meets the medium-risk criteria, the whole situation is judged as medium-risk; all other situations are judged as low-risk.

[0028] S2.3. Based on the autonomous driving scenario risk classification standard in step S2.2, generate risk labels for the traffic scenario samples obtained in step S1. The expression is:

[0029] .

[0030] Furthermore, the specific implementation method of step S3 includes the following steps:

[0031] S3.1. Based on the Responsibility Sensitive Safety Model (RSS), the minimum safe distance is introduced to calculate exposure. Minimum safe distance... Defined as:

[0032]

[0033] in, They represent the vehicle itself and the vehicle in front of it respectively. The speed of time, Indicates the reaction time of the driver or autonomous driving system. These represent the maximum deceleration of the vehicle and the vehicle in front, respectively.

[0034] Then the exposure level is obtained. The calculation formula is:

[0035]

[0036] in, Indicates the longitudinal distance between the vehicle and the vehicle in front. The minimum safe distance calculated for RSS;

[0037] S3.2. Using collision kinetic energy loss as a severity index, the total amount of mechanical energy converted into structural deformation and heat during the collision process is characterized, and the results at time points are calculated for vehicles 1 and 2. Predicted total kinetic energy loss for:

[0038]

[0039]

[0040] in, For vehicle 1 at time The velocity component along the expected collision direction, For the mass of vehicle 1, For vehicle 2 at time The velocity component along the expected collision direction, For the mass of vehicle 2, To reduce quality;

[0041] Then the severity is obtained. The calculation formula is:

[0042] ;

[0043] S3.3. Construct a training dataset based on exposure and severity as input features and risk labels as output features. ,in, The total number of samples, For the first Exposure and severity of each sample.

[0044] Furthermore, in step S4, a random forest model is used to construct the mapping relationship between exposure, severity, and risk labels. The cross-entropy loss function is used for training.

[0045] According to claim 5, the method for detecting distributed out-of-network traffic data based on the calculation of likelihood ratio is characterized in that: the multi-dimensional evaluation index system in step S5 includes accuracy, F1 score and confusion matrix.

[0046] The beneficial effects of this invention are:

[0047] This invention presents a risk assessment method for autonomous driving scenarios that integrates diffusion models and random forests. It is a novel, quantifiable risk modeling approach built upon functional safety standards. The qualitative concept of risk (risk = exposure × severity) from the international standard ISO 26262 is precisely defined mathematically. A risk model with clear physical meaning and computability is established, providing a unified and reliable theoretical foundation for risk assessment.

[0048] This invention presents a risk assessment method for autonomous driving scenarios that integrates a conditional diffusion model and a random forest. The method utilizes a conditional diffusion model to generate safety-critical scenarios in a targeted manner. To address the long-tail problem of scarce high-risk training data, it innovatively applies a conditional diffusion model to generate various extreme and dangerous driving scenarios in a targeted and realistic way by controlling parameters such as traffic density and speed.

[0049] This invention presents a risk assessment method for autonomous driving scenarios that integrates diffusion models and random forests, constructing a closed-loop assessment method that integrates generation, evaluation, and interpretation. It integrates scenario generation, automated risk labeling, model training, and validation. A highly interpretable random forest model is used for risk level mapping, ensuring transparent and reliable decision-making logic, and ultimately outputting accurate, reliable, and traceable dynamic risk signals.

[0050] The present invention describes a method for risk assessment of autonomous driving scenarios using a fusion diffusion model and a random forest, which achieves high-precision and interpretable risk level assessment. The fusion diffusion model generates safety-critical samples, constructs scenario risk indicators based on safety standards, and uses a random forest to map continuous scenario risk indicators to discrete risk levels, especially improving the assessment performance of safety-critical samples. Ultimately, it provides stable and reliable risk signals for the vehicle decision-making system, enabling early identification and warning of potential risks. Attached Figure Description

[0051] Figure 1 This is a flowchart of a risk assessment method for autonomous driving scenarios that combines a fusion diffusion model and a random forest, as described in this invention. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention; that is, the described specific embodiments are merely a part of the embodiments of the invention, and not all of them. The components of the specific embodiments of the invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations, and the invention may also have other embodiments.

[0053] Therefore, the following detailed description of specific embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected specific embodiments of the invention. All other specific embodiments obtained by those skilled in the art based on these specific embodiments without inventive effort are within the scope of protection of this invention.

[0054] To further understand the invention's content, features, and effects, the following specific embodiments are provided, along with accompanying drawings. Figure 1 Detailed explanation is as follows:

[0055] Example 1:

[0056] A risk assessment method for autonomous driving scenarios that integrates diffusion models and random forests includes the following steps:

[0057] S1. Based on the traffic scenario state, improve the diffusion model, introduce conditional variables, obtain the conditional generation distribution model, and generate a traffic scenario sample dataset;

[0058] Furthermore, to train the risk assessment model and ensure that the training data can cover typical safety-critical scenarios of vehicle interaction, including scenarios of sudden vehicle intrusion, scenarios of sudden braking of the vehicle in front, scenarios of intersection conflict, and scenarios of overtaking and lane changing, a simulation method based on a diffusion model is used to generate safety-critical samples.

[0059] Furthermore, the specific implementation method of step S1 includes the following steps:

[0060] S1.1. The initial traffic scene state without added noise is collected as follows: ,in, The state dimension is represented, including vehicle position, speed, acceleration, and interaction topology;

[0061] S1.2. Based on the traffic scene state obtained in step S1.1, simulation is performed using a diffusion model. The diffusion process includes a forward diffusion stage and a reverse generation stage. In the forward diffusion stage, noise is added to the initial traffic scene state to obtain a traffic scene state sequence. In the reverse generation stage, a parameterized model is trained based on the obtained traffic scene state sequence to learn and reverse the noise addition step in the diffusion process. ,in, For the traffic scenario state at step t-1, Let T represent the traffic scene state at step t, where T is the total number of steps.

[0062] Furthermore, the diffusion model can generate traffic state sequences with complex spatiotemporal dependencies from random noise through progressive denoising, thus constructing safety-critical scenarios.

[0063] In the positive diffusion process, real-world scenarios Noise is gradually added to obtain the sequence. The expression is:

[0064]

[0065] in, For conditional distribution, For noise intensity hyperparameter, It is the identity matrix. When At that time, the sample distribution approximates the standard Gaussian distribution. .

[0066] During the reverse generation stage, the parameterized model is trained. Stepwise noise reduction:

[0067]

[0068] in, and These represent the mean and variance of the neural network output, respectively. Given initial noise... Realistic traffic scenes can be generated through backsampling. .

[0069] S1.3. Introduce condition variables into the parameterized model obtained in step S1.2. The condition variables include traffic density, initial vehicle speed, and intersection type, resulting in the introduction of condition variables. To extend the parameterized model and achieve a conditional generation distribution model that allows for controllability of the generated scene. This generates a traffic scenario sample dataset. Specifically, it generates a distribution model based on the above conditions, starts from random noise, performs T-step back sampling, and finally generates a large number of diverse and realistic traffic scenario states, achieving controllable sampling of risk attributes.

[0070] S2. Set the minimum collision time and minimum headway as key risk indicators, quantify the risk level of the traffic scenario samples generated in step S1, and generate a risk label for each generated traffic scenario sample.

[0071] Furthermore, the specific implementation method of step S2 includes the following steps:

[0072] S2.1. Based on the traffic scene sample dataset obtained in step S1, take the prediction window. The minimum collision time within the range is taken as the minimum collision time. Prediction window The minimum headway within the range is taken as the minimum headway. The expression is:

[0073]

[0074]

[0075] in, The remaining time before a collision occurs, given the target vehicle's current route and speed difference; min is a function for minimizing this value. The time interval required for the front of one vehicle to reach the position of the front of the vehicle in front in a continuous flow of traffic.

[0076] Furthermore, Time-To-Collision (TTC) represents the remaining time before a collision occurs between the vehicle and the vehicle in front or the target vehicle while maintaining their current path and speed difference. TTC is expressed as:

[0077]

[0078] in, , Representing vehicles Position and velocity, Indicates the length of the vehicle. The lower the value, the higher the risk of a collision.

[0079] Time headway (THW) represents the time interval required for the front of one vehicle to reach the position of the front of the vehicle in front in a continuous flow of traffic.

[0080]

[0081] in, The longitudinal distance between the vehicle and the vehicle in front. This represents the current speed of the vehicle.

[0082] Furthermore, the actual risk level of each traffic scenario is divided into three categories: low, medium, and high.

[0083] S2.2. Setting based on and Risk classification standards for autonomous driving scenarios based on indicators:

[0084] High-risk standard is <1.5s or <0.8s;

[0085] The medium risk standard is 1.5. <3.0s or 0.8< 1.5s;

[0086] Low risk standard is ≥3.0s or ≥1.5s;

[0087] If any of the above indicators meets the high-risk criteria, the whole situation is judged as high-risk; otherwise, if any of the indicators meets the medium-risk criteria, the whole situation is judged as medium-risk; all other situations are judged as low-risk.

[0088] S2.3. Based on the autonomous driving scenario risk classification standard in step S2.2, generate risk labels for the traffic scenario samples obtained in step S1. The expression is:

[0089] .

[0090] S3. Construct a continuous risk quantification index that conforms to functional safety standards, including exposure and severity. Calculate the exposure and severity of each generated traffic scenario sample. Then, based on exposure and severity as input features and risk labels as output features, construct a training dataset.

[0091] Furthermore, the specific implementation method of step S3 includes the following steps:

[0092] S3.1. Based on the Responsibility Sensitive Safety Model (RSS), the minimum safe distance is introduced to calculate exposure. Minimum safe distance... Defined as:

[0093]

[0094] in, They represent the vehicle itself and the vehicle in front of it respectively. The speed of time, Indicates the reaction time of the driver or autonomous driving system. These represent the maximum deceleration of the vehicle and the vehicle in front, respectively.

[0095] Then the exposure level is obtained. The calculation formula is:

[0096]

[0097] in, Indicates the longitudinal distance between the vehicle and the vehicle in front. The minimum safe distance calculated for RSS;

[0098] Exposures are used to measure the likelihood of a potential hazardous event occurring. A real-time exposure metric is achieved by introducing a minimum safe distance based on RSS (Rapid Safety Sense). RSS considers vehicle speed, acceleration, maximum braking capacity, and the reaction time of the driver or autonomous driving system, accurately describing the vehicle's safety margin under longitudinal collision constraints, thus reflecting the likelihood of a potential hazardous event occurring in the current state. At that time, exposure This indicates that the vehicle is in a safe condition; when At that time, exposure The higher the value, the closer the vehicle is to danger and the higher the degree of exposure.

[0099] S3.2. Using collision kinetic energy loss as a severity index, the total amount of mechanical energy converted into structural deformation and heat during the collision process is characterized, and the results at time points are calculated for vehicles 1 and 2. Predicted total kinetic energy loss for:

[0100]

[0101]

[0102] in, For vehicle 1 at time The velocity component along the expected collision direction, For the mass of vehicle 1, For vehicle 2 at time The velocity component along the expected collision direction, For the mass of vehicle 2, To reduce quality;

[0103] Then the severity is obtained. The calculation formula is:

[0104] ;

[0105] Furthermore, severity is used to measure the degree of personal injury that a potentially hazardous event may cause. It measures the degree of personal injury based on the level of energy loss that would occur if the potentially hazardous event were to happen. This is to overcome the limitations of traditional collision severity indicators. Limitations of not being able to reflect differences in mass distribution and energy absorption mean that collision kinetic energy loss is used as a severity indicator, directly characterizing the total amount of mechanical energy converted into structural deformation, heat, etc., during the collision process. In vehicle collision studies, the collision can usually be approximated as a completely inelastic process, in which case the kinetic energy loss reaches its maximum value. The higher the value, the more energy the vehicle needs to dissipate, and the stronger the impact on potential occupants, resulting in a higher degree of severity.

[0106] S3.3. Construct a training dataset based on exposure and severity as input features and risk labels as output features. ,in, The total number of samples, For the first Exposure and severity of each sample.

[0107] According to functional safety standards, risks It is defined as a combination of the probability of damage occurring and the severity of that damage. This can be abstracted as:

[0108]

[0109] in, Indicates exposure level, Indicates severity, express and arrive The potential mapping relationship between them has an unknown analytical form, and it is only assumed that it is a monotonic function.

[0110] S4. Construct a risk assessment model using a random forest model. Use the training dataset obtained in step S3 to train the risk assessment model. The training objective is to learn the mapping relationship between exposure, severity and risk labels, and obtain a well-trained risk assessment model.

[0111] Furthermore, in step S4, a random forest model is used to construct the mapping relationship between exposure, severity, and risk labels. The cross-entropy loss function is used for training.

[0112] Furthermore, given the low input dimensionality and the importance of model interpretability, a random forest model was chosen to ensure both interpretability and computational efficiency. The cross-entropy loss function was used during training, with the expression:

[0113]

[0114] in, The model predicts the first... The probability that a sample belongs to class c. This is the indicator function. The final output is a risk label and a risk probability vector.

[0115] S5. Use a multi-dimensional evaluation index system to evaluate the performance of the risk assessment model, and conduct risk assessment for autonomous driving scenarios based on the trained risk assessment model.

[0116] Furthermore, the multi-dimensional evaluation index system in step S5 includes accuracy, F1 score, and confusion matrix.

[0117] Furthermore, accuracy represents the overall prediction accuracy of the model, and is defined as:

[0118]

[0119] in, The category predicted by the model.

[0120] For each category Precision and recall are defined as follows:

[0121]

[0122] in, Categories The number of true positives, false positives, and false negatives. Then the F1 score is:

[0123] ;

[0124] The confusion matrix is ​​denoted by matrix elements. Indicates the true label is And the prediction is The number of samples, then the confusion matrix It can intuitively reflect the confusion between different risk levels.

[0125] This invention provides a high-precision and interpretable risk level assessment method for autonomous driving scenarios. It generates scarce high-risk safety-critical scenario samples through a diffusion model and integrates a random forest model to accurately map continuous scenario indicators designed based on safety standards to discrete risk levels. This improves the assessment performance of safety-critical samples and ultimately provides stable and reliable risk signals for the vehicle decision-making system, enabling early identification and warning of potential risks.

[0126] It should be noted that relational terms such as "first" and "second" are used merely 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. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0127] Although this application has been described above with reference to specific embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of this application. In particular, as long as there is no structural conflict, the features in the specific embodiments disclosed in this application can be combined with each other in any way. The lack of an exhaustive description of these combinations in this specification is merely for the sake of brevity and resource conservation. Therefore, this application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. An autonomous driving scene risk assessment method fusing diffusion model and random forest, characterized in that, Includes the following steps: S1. Based on the traffic scenario state, improve the diffusion model, introduce conditional variables, obtain the conditional generation distribution model, and generate a traffic scenario sample dataset; The specific implementation method of step S1 includes the following steps: S1.

1. The initial traffic scene state without added noise is collected as follows: ,in, The state dimension is represented, including vehicle position, speed, acceleration, and interaction topology; S1.

2. Based on the traffic scene state obtained in step S1.1, simulation is performed using a diffusion model. The diffusion process includes a forward diffusion stage and a reverse generation stage. In the forward diffusion stage, noise is added to the initial traffic scene state to obtain a traffic scene state sequence. In the reverse generation stage, a parameterized model is trained based on the obtained traffic scene state sequence to learn and reverse the noise addition step in the diffusion process. ,in, For the traffic scenario state at step t-1, Let T represent the traffic scene state at step t, where T is the total number of steps. S1.

3. Introduce condition variables into the parameterized model obtained in step S1.

2. The condition variables include traffic density, initial vehicle speed, and intersection type, resulting in the introduction of condition variables. To extend the parameterized model and achieve a conditional generation distribution model that allows for controllability of the generated scene. Generate a traffic scene sample dataset; S2. Set the minimum collision time and minimum headway as key risk indicators, quantify the risk level of the traffic scenario samples generated in step S1, and generate a risk label for each generated traffic scenario sample. S3. Construct a continuous risk quantification index that conforms to functional safety standards, including exposure and severity. Calculate the exposure and severity of each generated traffic scenario sample. Then, based on exposure and severity as input features and risk labels as output features, construct a training dataset. The specific implementation method of step S3 includes the following steps: S3.

1. Based on the Responsibility Sensitive Safety Model (RSS), the minimum safe distance is introduced to calculate exposure. Minimum safe distance... Defined as: in, They represent the vehicle itself and the vehicle in front of it respectively. The speed of time, Indicates the reaction time of the driver or autonomous driving system. These represent the maximum deceleration of the vehicle and the vehicle in front, respectively. Then the exposure level is obtained. The calculation formula is: in, Indicates the longitudinal distance between the vehicle and the vehicle in front. The minimum safe distance calculated for RSS; S3.

2. Using collision kinetic energy loss as a severity index, the total amount of mechanical energy converted into structural deformation and heat during the collision process is characterized, and the results at time points are calculated for vehicles 1 and 2. Predicted total kinetic energy loss for: in, For vehicle 1 at time The velocity component along the expected collision direction, For the mass of vehicle 1, For vehicle 2 at time The velocity component along the expected collision direction, For the mass of vehicle 2, To reduce quality; Then the severity is obtained. The calculation formula is: ; S3.

3. Construct a training dataset based on exposure and severity as input features and risk labels as output features. ,in, The total number of samples, For the first Exposure and severity of each sample; S4. Construct a risk assessment model using a random forest model. Use the training dataset obtained in step S3 to train the risk assessment model. The training objective is to learn the mapping relationship between exposure, severity and risk labels, and obtain a well-trained risk assessment model. S5. Use a multi-dimensional evaluation index system to evaluate the performance of the risk assessment model, and conduct risk assessment for autonomous driving scenarios based on the trained risk assessment model.

2. The method for risk assessment of autonomous driving scenarios by fusing diffusion models and random forests according to claim 1, characterized in that: The specific implementation method of step S2 includes the following steps: S2.

1. Based on the traffic scene sample dataset obtained in step S1, take the prediction window. The minimum collision time within the range is taken as the minimum collision time. Prediction window The minimum headway within the range is taken as the minimum headway. The expression is: in, The remaining time before a collision occurs, given the target vehicle's current route and speed difference; min is a function for minimizing this value. The time interval required for the front of one vehicle to reach the position of the front of the vehicle in front in a continuous flow of traffic. S2.

2. Setting based on and Risk classification standards for autonomous driving scenarios based on indicators: High-risk standard is <1.5s or <0.8s; The medium risk standard is 1.

5. <3.0s or 0.8< 1.5s; Low risk standard is ≥3.0s or ≥1.5s; If any of the above indicators meets the high-risk criteria, the whole situation is judged as high-risk; otherwise, if any of the indicators meets the medium-risk criteria, the whole situation is judged as medium-risk; all other situations are judged as low-risk. S2.

3. Based on the autonomous driving scenario risk classification standard in step S2.2, generate risk labels for the traffic scenario samples obtained in step S1. The expression is: 。 3. The method for risk assessment of autonomous driving scenarios by fusing diffusion model and random forest as described in claim 2, characterized in that: In step S4, a random forest model is used to construct the mapping relationship between exposure, severity, and risk labels. The cross-entropy loss function is used for training.

4. The method for risk assessment of autonomous driving scenarios by fusing diffusion model and random forest as described in claim 3, characterized in that: The multi-dimensional evaluation index system in step S5 includes accuracy, F1 score and confusion matrix.