A driving scene risk assessment method and system based on multi-factor dynamic fusion

By employing a multi-factor dynamic fusion-based risk assessment method for driving scenarios, combined with hierarchical perception and parametric attention detection, the detection accuracy and inference speed are optimized. This approach solves the risk assessment problem of intelligent unmanned driving systems in complex traffic environments, enabling efficient and accurate risk identification and real-time deployment.

CN122049845BActive Publication Date: 2026-06-23QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
Filing Date
2026-04-17
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing intelligent autonomous driving systems struggle to adapt to dynamic changes in complex traffic environments, especially in low-visibility weather conditions where perception accuracy decreases, leading to increased errors in target detection and trajectory prediction. This affects the reliability and stability of risk assessment, and existing methods have high computational overhead, making them unsuitable for real-time deployment.

Method used

A driving scenario risk assessment method based on multi-factor dynamic fusion is adopted. It combines hierarchical perception, parametric attention target detection, and multi-scale deep feature learning with weather classification, visibility information, and individual target risk to conduct risk assessment. A lightweight risk assessment architecture is constructed, and parametric channels and spatial attention mechanisms are used to optimize detection accuracy and inference speed. Risk decision-making is achieved through multi-scale deep feature extraction and ensemble learning.

Benefits of technology

It improves the accuracy and robustness of driving risk identification in complex environments, meets the real-time deployment requirements of in-vehicle systems, and achieves efficient risk assessment under low visibility conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122049845B_ABST
    Figure CN122049845B_ABST
Patent Text Reader

Abstract

The application discloses a kind of driving scene risk assessment method and system based on multi-factor dynamic fusion, it is related to intelligent unmanned driving and traffic safety technical field.The method includes the following steps: obtaining vehicle video under different weather conditions, the environment stratified perception is carried out to vehicle video, and target tracking and trajectory prediction are carried out based on the attention target detection mechanism without parameter;Based on target detection result and corresponding scene feature, the multi-factor dynamic fusion algorithm is used to quantify the various risks in driving scene;Using the risk decision model based on multi-scale deep feature learning, weather classification result, visibility information, scene feature and individual target risk are risk assessed, and risk grade prediction result is obtained.The application can combine weather stratified perception, trajectory dynamic modeling and multi-factor adaptive fusion and other technologies to carry out lightweight risk assessment in driving scene, to improve the accuracy, robustness and real-time performance of driving risk identification in complex environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent unmanned driving and traffic safety technology, and in particular to a method and system for risk assessment of driving scenarios based on multi-factor dynamic fusion. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] Current risk assessment methods in intelligent autonomous driving systems mostly rely on fixed weights or single models, which are insufficient to adapt to the dynamic changes in complex traffic environments. Especially in low visibility weather conditions such as rain and fog, perception accuracy decreases significantly, leading to increased errors in target detection and trajectory prediction, thereby affecting the reliability of overall risk assessment.

[0004] In complex traffic environments, existing multi-module fusion methods generally lack effective dynamic weight adjustment mechanisms, making it difficult to adaptively adjust according to changes in the importance of various risk factors in different scenarios. Regarding trajectory modeling, most methods do not adequately consider the interaction relationships between traffic participants, resulting in insufficient stability of prediction results in complex scenarios.

[0005] In addition, some methods have complex model structures and high computational overhead. In order to adapt to different driving environments, additional parameters and computational loads are introduced or complex transformations are performed to improve model evaluation accuracy, which is not conducive to the real-time deployment and engineering application of vehicle systems. Summary of the Invention

[0006] To address the shortcomings of existing technologies, the purpose of this invention is to provide a driving scenario risk assessment method and system based on multi-factor dynamic fusion. This method and system can combine technologies such as weather layered perception, trajectory dynamic modeling, and multi-factor adaptive fusion to conduct lightweight risk assessment in driving scenarios, thereby improving the accuracy, robustness, and real-time performance of driving risk identification in complex environments.

[0007] To achieve the above objectives, the present invention is implemented through the following technical solution:

[0008] The first aspect of this invention provides a driving scenario risk assessment method based on multi-factor dynamic fusion, comprising the following steps:

[0009] The system acquires in-vehicle videos under different weather conditions, performs environmental layer perception on the in-vehicle videos, obtains weather classification results and visibility information, and performs target tracking and trajectory prediction based on a parameter-free attention target detection mechanism to obtain target detection results and corresponding scene features.

[0010] Based on the target detection results and corresponding scene features, a multi-factor dynamic fusion algorithm is used to quantify various risks in driving scenarios to obtain individual target risks.

[0011] A risk decision-making model based on multi-scale deep feature learning is used to assess the risks of weather classification results, visibility information, scene features, and individual target risks, and to obtain risk level prediction results.

[0012] Furthermore, the specific steps for performing environmental layer perception on the vehicle-mounted video to obtain weather classification results and visibility information, and for target tracking and trajectory prediction based on a parameter-free attention-based target detection mechanism, are as follows:

[0013] Weather condition recognition is performed on vehicle-mounted video using a weather-layered perception network to obtain weather classification results;

[0014] The degree of fog degradation in images in vehicle video is evaluated using a hybrid threshold degradation judgment method, and corresponding defogging strategies are executed according to the degree of fog degradation to obtain visibility information;

[0015] A parameterless attention-based target detection mechanism is used to enhance the feature representation of the dehazed image, resulting in parameterless attention-based target detection features.

[0016] We utilize the OC-SORT framework combined with a motion prediction model to track and predict the trajectory of target detection features without parameter attention.

[0017] Furthermore, the parameterless attention-based target detection mechanism is used to enhance the feature representation of the dehazed image, and the specific steps to obtain parameterless attention-based target detection features are as follows:

[0018] The parameterless channel attention module enhances important channels and suppresses redundant channels, generating parameterless channel attention weights solely through statistical calculations.

[0019] The spatial attention module is used to highlight the central region of the image, and the spatial attention weights are obtained.

[0020] The parameterless channel attention weights and spatial attention weights are fused together.

[0021] Furthermore, based on the target detection results and corresponding scene features, the specific steps for quantifying various risks in driving scenarios using a multi-factor dynamic fusion algorithm are as follows:

[0022] Filter the target detection results, corresponding scene features, and tracking data to generate a target sequence;

[0023] Distance estimation is performed based on the filtered target sequence;

[0024] Vehicle dynamics modeling based on vehicle driving status;

[0025] A risk calculation model is constructed based on vehicle dynamics modeling and distance estimation, and the risk of individual targets is calculated.

[0026] Furthermore, the specific steps for using a risk decision-making model based on multi-scale deep feature learning to assess the risk of weather classification results, visibility information, scene features, and individual target risks are as follows:

[0027] Feature engineering was performed to enhance the 10 original features, including weather classification results, visibility information, scene features, and individual target risks.

[0028] A multi-scale deep feature extraction network is used to extract driving risk features from feature-engineered and enhanced features.

[0029] The extracted driving risk features are cross-validated and ensemble-learned.

[0030] Furthermore, the specific steps for cross-validation and ensemble learning of the extracted driving risk features are as follows:

[0031] The extracted driving risk features are combined with the features enhanced by feature engineering to form a fusion feature matrix;

[0032] Construct a base model and train it using a K-fold cross-validation strategy;

[0033] Generate predicted probabilities using the trained base model;

[0034] Construct a meta-feature matrix based on the predicted probabilities of the base model;

[0035] The meta-learner is used to perform feature fusion analysis on the meta-feature matrix to obtain the risk level prediction result;

[0036] The risk level prediction results are analyzed and corrected.

[0037] A second aspect of the present invention provides a driving scenario risk assessment system based on multi-factor dynamic fusion, comprising:

[0038] The layered perception module is configured to acquire vehicle video under different weather conditions, perform environmental layered perception on the vehicle video, obtain weather classification results and visibility information, and perform target tracking and trajectory prediction based on a parameterless attention target detection mechanism to obtain target detection results and corresponding scene features.

[0039] The risk quantification module is configured to quantify various risks in a driving scenario based on target detection results and corresponding scene features using a multi-factor dynamic fusion algorithm to obtain individual target risks.

[0040] The risk decision module is configured to use a risk decision model based on multi-scale deep feature learning to assess the risks of weather classification results, visibility information, scene features, and individual target risks, and obtain risk level prediction results.

[0041] A third aspect of the present invention provides a computer-readable storage medium storing a computer program adapted to be loaded by a processor and executed the steps of the driving scenario risk assessment method based on multi-factor dynamic fusion as described in the first aspect of the present invention.

[0042] A fourth aspect of the present invention provides a computer device comprising:

[0043] A processor, adapted to execute computer programs;

[0044] A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the driving scenario risk assessment method based on multi-factor dynamic fusion as described in the first aspect of the present invention.

[0045] A fifth aspect of the present invention provides a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in the multi-factor dynamic fusion-based driving scenario risk assessment method described in the first aspect of the present invention.

[0046] The above one or more technical solutions have the following beneficial effects:

[0047] This invention discloses a method and system for driving scenario risk assessment based on multi-factor dynamic fusion, and provides a lightweight driving scenario risk assessment architecture based on multi-factor dynamic weight fusion. This architecture constructs a technical framework of "layered perception—multi-module multi-factor dynamic fusion—multi-scale deep feature decision-making—risk classification." The layered perception module outputs weather classification results, visibility information, and scene features, while the safety risk field calculation module outputs individual target risks. These four components are fused to form 10-dimensional original risk features, achieving dynamic weight fusion and adaptive risk assessment of multi-dimensional risk factors, meeting the real-time deployment requirements of in-vehicle systems.

[0048] This invention also proposes a lightweight object detection method based on parameterless attention enhancement. This method embeds parameterless channel attention and spatial attention mechanisms into the YOLOv8n backbone network: parameterless channel attention dynamically generates weights based on the global mean of the feature map, and parameterless spatial attention generates a spatial weight map based on a Gaussian center prior. Neither introduces additional learnable parameters, thus achieving an optimized balance between detection accuracy and inference speed while maintaining the same number of model parameters.

[0049] This invention extracts 64-dimensional high-dimensional features through a multi-scale deep feature extraction network (Risk-feat-net) and uses a stacking ensemble learning framework for risk decision-making, ultimately achieving four-level risk classification. This improves the accuracy and robustness of risk classification without requiring high-performance GPUs.

[0050] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 This is a flowchart of the driving scenario risk assessment method based on multi-factor dynamic fusion in Embodiment 1 of the present invention;

[0053] Figure 2 This is the overall architecture for multi-scale deep feature risk decision-making in Embodiment 1 of the present invention;

[0054] Figure 3 This is a diagram of the Risk-feat-net network structure in Embodiment 1 of the present invention. Detailed Implementation

[0055] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used in these embodiments have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0056] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0057] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0058] Example 1:

[0059] Embodiment 1 of the present invention provides a driving scenario risk assessment method based on multi-factor dynamic fusion, such as... Figure 1 As shown, it includes the following steps:

[0060] S1: Acquire vehicle-mounted videos under different weather conditions, perform environmental layer perception on the vehicle-mounted videos, obtain weather classification results and visibility information, and perform target tracking and trajectory prediction based on a parameter-free attention target detection mechanism to obtain target detection results and corresponding scene features.

[0061] In one specific implementation, the layered perception stage undertakes the data perception and preprocessing functions of the driving scenario risk classification system. Through the collaborative work of four sub-modules—environmental layered perception, image dehazing enhancement, target detection and tracking, and trajectory prediction—it outputs multi-dimensional risk indicators, providing a data foundation for subsequent risk calculation and classification. The environmental layered perception sub-module employs an 18-layer Residual Network with 18 layers (ResNet-18) and a Convolutional Block Attention Module (CBAM) weather layered perception network to identify weather conditions in vehicle-mounted videos and output low, medium, and high risk levels. The hybrid threshold degradation judgment and differentiated dehazing sub-module integrates the Otsu thresholding method and an adaptive thresholding method to accurately assess the degree of image fog degradation. Differentiated dehazing strategies are implemented for different degradation scenarios—contrast-limited adaptive histogram equalization (CLAHE) is used for large-area degradation, while global histogram equalization (HE) is used for localized degradation, to achieve targeted image enhancement and restoration. The parameterless attention-based target detection submodule employs an improved YOLOv8n detector, enhancing feature representation through a parameterless attention mechanism. This improves the accuracy of model predictions and the robustness of target detection under complex weather conditions with zero additional parameters. The enhanced OC-SORT tracking and trajectory prediction submodule is based on the Observation-Centric SORT (OC-SORT) algorithm. It achieves global long-range feature extraction by jointly modeling trajectory temporal features and long-range dependencies using LSTM and Transformer, and incorporates particle filtering for more robust probabilistic state estimation.

[0062] Specifically, the following steps are included:

[0063] S11: Use a weather layered perception network to identify weather conditions in vehicle-mounted video and obtain weather classification results.

[0064] In one specific implementation, a weather hierarchical perception network combining ResNet-18 and CBAM attention mechanism is used to identify weather conditions in vehicle-mounted videos, outputting low, medium, and high risk levels to provide environmental parameter input for subsequent risk assessment. Specifically, ResNet18 is used as the backbone network, initialized with pre-trained weights from a large-scale image recognition dataset (ImageNet). The input image size is 224×224 pixels. CBAM modules are embedded after four residual layers (Layer 1 to Layer 4), and the feature maps are enhanced sequentially through channel attention and spatial attention submodules. A new classification head is constructed by replacing the original fully connected layers of ResNet-18. The first layer compresses the 512-dimensional features to 256 dimensions. After ReLU activation and Dropout processing, the output layer is mapped to 3 dimensions, corresponding to the three weather categories. The recognition result of this step is normalized and used as one-dimensional risk feature in the 10-dimensional original risk features of the hierarchical perception and safety risk field.

[0065] In this embodiment, the three weather categories are divided into three risk levels: high risk, medium risk, and low risk.

[0066] Specifically:

[0067] Because roads are slippery and visibility is low during high-risk weather such as heavy rain and fog, the probability of traffic accidents is very high. Therefore, this embodiment classifies such traffic scenarios as high-risk.

[0068] In this embodiment, light rain, light fog, and darkness are classified as medium-risk levels.

[0069] This embodiment classifies high-visibility weather conditions such as sunny, cloudy, and overcast days into low-risk levels.

[0070] S12: The degree of fog degradation in the image of the vehicle video is evaluated by using the hybrid threshold degradation judgment method, and the corresponding defogging strategy is executed according to the degree of fog degradation to obtain visibility information.

[0071] In one specific implementation, the hybrid threshold degradation determination method of this embodiment integrates the Otsu global threshold and adaptive threshold methods to accurately assess the degree of image fog degradation. Differentiated dehazing strategies are implemented for different degradation scenarios, and the enhanced image is output to the target detection module. The differentiated dehazing strategy consists of two parts: fast dehazing and button dehazing. Button dehazing is a deep learning method, characterized by good dehazing quality but slow speed. Fast dehazing is an image processing method, characterized by fast processing speed. In this embodiment, fast dehazing is performed if no button is pressed, and button dehazing is performed when a button is pressed.

[0072] S13: The dehazed image is enhanced with a parameterless attention-based target detection mechanism to obtain parameterless attention-based target detection features.

[0073] In one specific implementation, this embodiment receives video frames after dehazing image enhancement processing, uses an improved YOLOv8n detector, enhances feature representation through a parameterless attention mechanism, improves model prediction accuracy and target detection robustness under complex weather conditions with zero additional parameters, and outputs scene features to the safety field risk calculation module.

[0074] S131: Based on the parameterless channel attention module (StatChannelAttention), important channels are enhanced and redundant channels are suppressed. Parameterless channel attention weights are generated solely through statistical calculation.

[0075] In one specific implementation, given a feature map First, calculate the global mean for each channel:

[0076] (1).

[0077] In the formula, Indicates the input feature map; , , These represent the number of channels, height, and width, respectively. Representing batch size, it is the most fundamental dimensional parameter in deep learning; This represents the global mean of the c-th channel; Indicates the height direction index; Indicates the width direction index; It represents the set of real numbers.

[0078] The mean is then mapped to weights using the Sigmoid function:

[0079] (2).

[0080] In the formula, σ represents the attention weight of the c-th channel; σ represents the Sigmoid activation function.

[0081] The final output is:

[0082] .

[0083] in, This represents the final output of the channel attention module.

[0084] This process requires no parameter learning; the computational cost is only the mean and sigmoid.

[0085] S132: Use the Gaussian Spatial Attention module to highlight the central region of the image and obtain spatial attention weights. This is suitable for scenarios where the target often appears in the center of the image (such as surveillance and autonomous driving).

[0086] In one specific implementation, a Gaussian center prior is used to generate the spatial weight map. Let the feature map size be... The coordinates of the center point are For each position Calculate its squared Euclidean distance to the center:

[0087] (3).

[0088] In the formula, Indicates position Distance to the center point; , The coordinates are the center coordinates of the feature map.

[0089] The weights are defined by the Gaussian function:

[0090] (4).

[0091] In the formula, Indicates position Spatial weights; To control the decay rate, this module is set to 1.0.

[0092] The weight graph is expanded to have the same shape as the input and then multiplied element-wise with the input. This module requires no parameters, and the weights can be pre-computed to speed up inference.

[0093] S133: Fuse the parameterless channel attention weights and spatial attention weights.

[0094] In one specific implementation, by embedding the aforementioned parameterless channel attention and spatial attention into the feature extraction layer (layer 21) of the YOLOv8n backbone network, the attention weights are dynamically calculated only during forward propagation without introducing additional learnable parameters, thereby achieving an optimized balance between detection accuracy and inference speed while keeping the number of model parameters unchanged.

[0095] S14: Using the OC-SORT framework combined with a motion prediction model to track and predict the trajectory of target detection features without parameter attention.

[0096] In one specific implementation, this embodiment uses the OC-SORT framework as its foundation. A motion prediction model combining LSTM and Transformer models the temporal features and long-range dependencies of the trajectory. Particle filtering is used to achieve probabilistic state estimation, and the tracking results and scene features are output to the safety field risk calculation module. Specifically, the LSTM and Transformer joint motion prediction model maps the target's historical trajectory to the feature space through an embedding layer. A Transformer encoder extracts long-range dependency features, which are then temporally modeled by the LSTM network to output displacement prediction values. Particle filtering state estimation maintains a particle filter for each tracked target, performing particle initialization, prediction, weight update, and state estimation to output the final tracking result. Scene feature extraction calculates seven normalized scene features per frame, with feature values ​​mapped to the [0,1] interval, as shown in Table 1.

[0097] It is important to note that conventional OC-SORT or its variants (such as DeepSORT and BoT-SORT) typically rely on Kalman filtering based on the linear Gaussian assumption for motion prediction, or simply introduce a constant-speed / constant-speed model. This embodiment uses LSTM and Transformer joint modeling as the core of motion prediction, supplemented by particle filtering as a probability estimation bridge. This architecture breaks OC-SORT's dependence on the linear motion assumption and represents a deeply customized enhancement design for complex dynamic scenes. Specifically, it includes the following steps:

[0098] S141: Basic trajectory management and data association based on OC-SORT.

[0099] In one specific implementation, this embodiment uses OC-SORT as the skeleton of the overall tracking framework and performs the following basic operations:

[0100] S1411: Detection association and ID maintenance.

[0101] The Hungarian algorithm is used to match the detection box of the current frame with the historical trajectory. It is responsible for the allocation, maintenance and life cycle management of target IDs (transient, confirmed and lost states).

[0102] S1412: Generation of historical trajectory sequences.

[0103] For each confirmed target, extract the trajectory point sequence (e.g., normalized center coordinates) of consecutive historical frames as the standardized input for the subsequent joint prediction model.

[0104] S142: Displacement prediction is performed using a motion prediction model that combines LSTM and Transformer.

[0105] In one specific implementation, this step is intended to replace the original Kalman filter state transition step in OC-SORT, and the specific collaborative process is as follows:

[0106] S1421: Feature space mapping.

[0107] The target historical trajectory sequence cached by OC-SORT is mapped to a high-dimensional feature space through an embedding layer to enhance nonlinear expressive power.

[0108] S1422: Long-range dependency extraction (Transformer encoder).

[0109] By using a multi-head self-attention mechanism to process embedded features, long-range correlation features across time steps in the trajectory sequence (such as the overall trend of lane-changing behavior) can be captured.

[0110] S1423: Temporal Modeling and Output (LSTM Network).

[0111] The global context vector output by the Transformer is input into the LSTM, and its gating mechanism is used to perform fine modeling of short-term temporal fluctuations (such as sudden braking or steering). Finally, the mean and uncertainty variance of the target's displacement prediction in the next frame are output.

[0112] S143: Perform particle filtering probabilistic state estimation and tracking result correction on the displacement prediction results.

[0113] In one specific implementation, since the predictions from LSTM and Transformer outputs are nonlinear and cannot be directly written into the linear covariance matrix of OC-SORT, a particle filter is introduced as a bridging hub:

[0114] S1431: Particle initialization and prediction.

[0115] A particle set is maintained for each target. During the prediction phase, the mean and variance of the displacement prediction output from step two are used as motion priors to drive the state transition of each particle (by applying random perturbations).

[0116] S1432: Weight update and association interface.

[0117] The weighted average position of the particle set is calculated and used as the predicted bounding box for the OC-SORT data association stage (Hungarian matching). After a successful match, the particle weights are updated using the actual observed positions.

[0118] S1433: State estimation and backhaul.

[0119] Particles are resampled to prevent degradation, and the weighted average is used as the final target tracking state, which is then fed back to OC-SORT for trajectory buffer updates in the next frame.

[0120] Table 1. Features of 7 Normalized Scenes

[0121]

[0122] S2: Based on the target detection results and corresponding scene features, a multi-factor dynamic fusion algorithm is used to quantify various risks in the driving scenario to obtain individual target risks.

[0123] In one specific implementation, the safety field risk calculation stage undertakes the multi-dimensional risk quantification and dynamic assessment functions of the driving scenario risk classification system. It integrates target attributes, spatial location, motion state, and vehicle dynamics information to output individual target risks, providing a quantitative basis for subsequent risk classification and early warning decisions. This stage adopts a multi-factor hierarchical fusion architecture, acquiring target detection and tracking data, and sequentially performing distance estimation, vehicle dynamics analysis, and risk calculation to generate individual target risks. This enables end-to-end processing from perceived input to risk quantification.

[0124] Specifically, the following steps are included:

[0125] S21: Filter the target detection results and corresponding scene features and tracking data to generate a target sequence.

[0126] In one specific implementation, the system receives the target detection results and corresponding scene features output by YOLOv8n, with a confidence threshold of 0.25. To focus on key risk sources, only seven preset categories (pedestrians, bicycles, cars, motorcycles, buses, and trucks) are retained. After detection, the six targets with the largest bounding box areas are sorted and retained to reduce computational load. The system also receives the tracking results output by OC-SORT and employs a position prediction and nearest neighbor matching strategy. Each target stores its center point coordinates and velocity vector. In a new frame, the current position is predicted by superimposing the position and velocity from the previous frame. The Euclidean distance to the center of the detection box is calculated. If the distance is less than the dynamically adjusted threshold, a match is successful, the target is updated, and the velocity is recalculated. Otherwise, the target is considered a new target. If a target fails to match for five consecutive frames, it is deleted to maintain the timeliness of the tracking list.

[0127] S22: Perform distance estimation based on the filtered target sequence.

[0128] In one specific implementation, distance is the most direct indicator of collision risk. The dashcam is installed in the center of the windshield with its optical axis parallel to the ground. It utilizes the pinhole imaging principle to establish a mapping from image coordinates to actual distance. Let the camera focal length be f, the optical center height from the ground be H, the actual target height be h, and the target's bottom ordinate be... The horizon's vertical coordinate is The screen height is Define the normalized height factor. ∈[0,1]:

[0129] (5).

[0130] in, Corresponding to the horizon (infinity), The corresponding bottom of the screen (closest point). The basic distance estimation formula is:

[0131] (6).

[0132] in, Based on the distance, , However, a single geometric model cannot guarantee ranging accuracy at both near and far distances simultaneously. Therefore, a hybrid distance estimator is employed, based on the target's normalized longitudinal position. Adaptive selection strategy:

[0133] Distant target ( The above geometric model is used. The pixel height of distant targets changes slowly, and the geometric model, through normalization factor filtering, can output a stable distance, avoiding drastic fluctuations caused by pixel jitter.

[0134] Nearby target ( ): Employing a pixel-based similar triangle method:

[0135] (7).

[0136] Nearby targets occupy more pixels, and changes in their bottom position are sensitive to distance. This method is more accurate than the geometric model and responds faster.

[0137] Middle area ( The above two results are fused using linear interpolation to achieve a smooth transition and avoid boundary jumps. This hybrid strategy achieves complementary accuracy at near and far distances, maintaining high ranging robustness throughout the 3m~50m range.

[0138] S23: Vehicle dynamics modeling based on vehicle driving status.

[0139] In one specific implementation, velocity is a key indicator for assessing collision energy, but its estimation is significantly affected by detection frame jitter, perspective distortion, and tracking noise. Therefore, a multi-level optimization process is designed to extract stable and robust velocities from the continuous frame displacements of the tracking module. Later, a GPS module will be integrated to obtain real vehicle speed, acceleration, and other information.

[0140] S231: Calculate instantaneous pixel velocity.

[0141] The OC-SORT tracker outputs the center point coordinates (x, y) of each target in the image plane. This is calculated by dividing the Euclidean distance between two adjacent frames by the time interval. (Determined by frame rate, for example, at 30fps) ), to obtain instantaneous pixel velocity :

[0142] (8).

[0143] in, They represent the first Time and Moment value, They represent the first Time and Moment value.

[0144] S232: Perform Kalman filtering to smooth the instantaneous pixel velocity column.

[0145] To suppress detection box jitter and tracking noise, a Kalman filter is established for the position sequence of each target, with the state vector being... The filtered velocity components are output through a prediction-update mechanism. This leads to the smoothed pixel speed.

[0146] S233: Perform adaptive perspective correction on the smoothed pixel speed.

[0147] Due to perspective, targets with the same actual velocity in an image appear to have slower pixel velocity at a distance and faster pixel velocity at a closer distance. This is based on the target's bottom ordinate. Dynamically adjust the conversion factor (the bottom factor is 3 times that of the top factor) to convert pixel speed into actual speed. (m / s):

[0148] (9).

[0149] in, This is a correction factor that increases linearly with the bottom coordinate.

[0150] S234: Perform outlier detection and removal and exponential smoothing on the actual speed.

[0151] Speed ​​limits (15 m / s for bicycles, 45 m / s for cars, and 40 m / s for motorcycles) and acceleration constraints (±10 m / s²) are set according to the target category, and the rate of change of speed is detected: if the current speed deviates from the historical average by more than 50%, it is considered an outlier and replaced with the speed of the previous frame. The speed sequence after the above processing is post-processed using an exponentially weighted moving average (α=0.3) to obtain the final stable relative vehicle speed v used for risk calculation.

[0152] S24: Construct a risk calculation model based on vehicle dynamics modeling and distance estimation, and calculate the risk of individual targets.

[0153] In one specific implementation, individual target risk is composed of a weighted average of five factors, with each weight dynamically and adaptively adjusted according to the scenario:

[0154] (10).

[0155] In the formula, , , , , The corresponding adaptive weight coefficients satisfy ∑w=1. As one of the 10-dimensional original risk feature vectors, it is input into the subsequent multi-scale deep feature and ensemble learning risk decision model.

[0156] quality coefficient (Vehicle-Target). Different mass coefficients are assigned based on the target type to reflect the differences in collision energy: 0.2 for trucks / buses, 0.13 for cars, 0.12 for motorcycles / bicycles, and 0.14 for pedestrians.

[0157] Distance risk (Vehicle-Target). The target distance d (meters) is estimated based on formulas (6) and (7), and a segmented threshold definition is adopted. Considering that the risk at close range has a more direct impact on safety, a finer granularity is used for close range and a coarser granularity is used for distant range to avoid over-warning:

[0158] .

[0159] Speed ​​risk (Vehicle - Target). The stable speed v (in m / s) is obtained using the above multi-level optimization process. The speed risk is defined as:

[0160] (11).

[0161] in Values ​​are assigned according to category: 45 m / s for cars, 40 m / s for motorcycles, and 15 m / s for bicycles. A stable vehicle speed v is obtained using the above speed calculation process, and risk levels are then classified based on the speed magnitude.

[0162] .

[0163] Collision time risk (Vehicle - Target). Collision Time TTC = Relative Distance ÷ Relative Speed.

[0164] Collision time (TTC) is calculated based on relative distance and relative velocity, using segmented thresholds:

[0165] .

[0166] Behavioral risk (Target-Target). Behavioral risk is used to assess the potential threats arising from target-target interactions (such as rear-end collisions, lateral movement, chain collisions, etc.), compensating for the risks of side-vehicle conflicts that cannot be directly perceived from the perspective of the vehicle itself. It is defined as follows:

[0167] (12).

[0168] Calculation process: For all detected targets in the current frame, sort them by the Intersection over Union (IoU) of the detection boxes, select the 3 targets with the largest overlapping area (if less than 3, take all), and for each pair of targets (i,j), calculate the comprehensive collision risk score. Take all The maximum value, then through Constrained to the [0,1] interval, ultimately mapped to the required [0,0.2] sub-risk range (to be supplemented later).

[0169] Overall Collision Score formula:

[0170] (13).

[0171] in , , , The adaptive weighting coefficients for the corresponding items are dynamically controlled by five specified scene input factors; , , , The four basic sub-factors are defined as follows:

[0172] Distance factor This is used to measure the pixel distance between the centers of two targets; the closer the distance, the higher the risk.

[0173] (14).

[0174] in, Let be the pixel distance between the centers of target i and target j. The collision distance threshold is taken as... =100 pixels

[0175] Value range: [0,1], the closer the distance, the higher the value. The closer it is to 1.

[0176] velocity factor It is used to consider the ratio of the average speed of two targets to the maximum reference speed; the faster the speed, the higher the risk.

[0177] (15).

[0178] in, , For the goal , The speed modulus. For the maximum reference speed, take =30m / s, value range: [0,1], the faster the speed... The closer it is to 1.

[0179] Angle factor Angle used to measure the direction of motion of two targets ∈[0°,180°], both the same direction and the opposite direction will increase the risk.

[0180] (16).

[0181] in, It is the dot product of the velocity vectors of the two targets. The angle between the directions of motion of the two targets. Angle factor. Value range: [0,1], the closer the included angle is to 0° (same-direction rear-end collision) or 180° (opposite-direction collision), the better. The closer it is to 1.

[0182] Orientation factor It is used to determine whether two targets are moving towards each other and is a direct precursor to a collision.

[0183] .

[0184] Judgment condition: Let the angle between the vector pointing from target i to target j and the velocity direction of target i be θ. The angle between the vector pointing from target j to target i and the velocity direction of target j is... ,when <30° and When the angle is less than 30°, it is determined that they are moving towards each other. Orientation factor. Value range: {0,1}, 1 when moving towards each other, 0 otherwise.

[0185] It is important to note that the adaptive weighting coefficients... , , , The result is obtained through an adaptive dynamic control scheme. The specific steps are as follows:

[0186] First, design the objectives.

[0187] Depend on (Pedestrian density) (Vehicle density) (Animal existence) (Traffic facilities exist) (Vehicle speed) 5 scene factors, 4 weight coefficients dynamically adjusted. To ensure... ,make ∈[0,1], ultimately ∈[0,1], and then mapped to the required sub-risk range of [0,0.2]. The weights of corresponding risk factors are automatically strengthened in different scenarios (e.g., strengthening the orientation / angle factor at intersections, and strengthening the speed factor at highways).

[0188] Then, input preprocessing is performed.

[0189] Normalize the vehicle speed to unify its dimensions:

[0190] (17).

[0191] in, The speed limit thresholds for roads are: 60 km / h = 16.67 m / s for urban roads and 120 km / h = 33.33 m / s for highways.

[0192] Normalized road speed limit threshold ∈ [0,1], the faster the speed, the closer the value is to 1. Internal adaptive weights are calculated and strictly satisfy the constraints. .

[0193] Step 1: Calculate the original weights driven by the scene factors.

[0194] .

[0195] in, This indicates the distance factor weight, primarily based on pedestrian and vehicle density, intersections, and vehicle speed. The weighting factor is angle-based, with intersection vehicle speed as the primary factor. Orientation factor weights, with pedestrians, animals, and intersections as the primary factors. The weighting factor is based on speed, with vehicle speed and vehicle density as the primary factors.

[0196] Step 2: Weight normalization (to ensure the sum is 1).

[0197] (18)

[0198] .

[0199] in, for , , , The sum, , , , Normalized , , , .

[0200] After normalization, guarantee :

[0201] , .

[0202] The higher the scene factor, the higher the corresponding weight will be (e.g., intersection). At the same time, the weights of α / β / γ increase simultaneously; high speed (At that time, the δ weight is significantly increased)

[0203] Ultimately mapped to the [0, 0.2] sub-risk range

[0204] Will Linearly compressing ∈[0,1] to [0,0.2] strictly satisfies the sub-risk value constraint, therefore a linear mapping is added after formula (12):

[0205] (19).

[0206] Equivalent to:

[0207] (20).

[0208] More specifically, in this embodiment, the model uses five types of driving scenario perception features as input for adaptive weight calculation, and the parameters are defined as follows:

[0209] Pedestrian density represents the density of pedestrians within the perception range, with a value range of [0,1].

[0210] Vehicle density represents the density of motor vehicles and non-motor vehicles within the sensing range, with a value range of [0,1].

[0211] Animal presence flag: 1 when an animal is detected, 0 when no animal is detected.

[0212] The value is 1 when traffic facilities such as traffic lights and parking signs are detected, and 0 when they are not detected.

[0213] Real-time speed of the vehicle, in km / h or m / s.

[0214] The model constructs 5 sub-risks across five dimensions, comprehensively covering risk sources in driving scenarios. All sub-risks have values ​​ranging from [0, 0.2].

[0215] Basic risks are inherent collision risks determined by the type of target (pedestrians, motor vehicles, non-motor vehicles, etc.).

[0216] Distance risk, the approach risk determined by the relative distance between the vehicle and the risky target;

[0217] Speed ​​risk, the risk of kinetic energy collision determined by the vehicle's speed;

[0218] Collision time risk, the level of urgency risk determined by the time to collision;

[0219] Behavioral risk refers to the uncertainty risk caused by target interaction behavior and unexpected obstacles (animals, transportation facilities).

[0220] Adaptive weights enable dynamic allocation of risk factors. Both the original and normalized weights range from [0,1], and the normalized weights satisfy the constraint that the sum of the weights is 1.

[0221] Basic risk adaptive weighting, regulation Contribution to total risk;

[0222] : Distance risk adaptive weight, regulation Contribution to total risk;

[0223] Speed ​​risk adaptive weighting, regulation Contribution to total risk;

[0224] Collision time risk adaptive weight, adjustment Contribution to total risk;

[0225] Adaptive weighting of behavioral risk for regulation Contribution to total risk.

[0226] By fusing multi-dimensional sub-risks using dynamic adaptive weights, the total risk value for individuals taking values ​​in the range [0,1] is obtained. The calculation formula is as follows:

[0227] (twenty one).

[0228] It achieves adaptive risk assessment that changes in real time with the driving scenario; the higher the value, the higher the driving risk.

[0229] The original adaptive weights are calculated based on the above settings to ensure the rationality of the initial weight values.

[0230] First, preprocessing of the input parameters is performed. To ensure consistent units and weight calculations, the driving speed is normalized:

[0231] .

[0232] In the formula: The normalized velocity has a value range of [0,1]. This represents the current road speed limit threshold.

[0233] Then, based on the input features, the original adaptive weights corresponding to the five sub-risks are calculated respectively:

[0234] (1) Basic risk original weights.

[0235] By combining all scene features, a smooth activation of weights is achieved through the Sigmoid function:

[0236] (twenty two),

[0237] (twenty three).

[0238] in, Basic risk weighting factor, The original weights for basic risk.

[0239] (2) Distance risk original weight.

[0240] Pedestrian and vehicle density are the core driving factors:

[0241] .

[0242] in, This represents the original weight of distance risk.

[0243] (3) Original weight of speed risk.

[0244] Integrating normalized speed and traffic facility constraints:

[0245] .

[0246] in, The original weights for speed risk.

[0247] (4) Collision time risk original weight.

[0248] Coupling density and velocity characteristics, and enhancing urgency response through the Sigmoid function:

[0249] (twenty four),

[0250] (25).

[0251] in, Collision time weighting factor The original weights for collision time risk.

[0252] (5) Original weights of behavioral risk.

[0253] Focusing on sudden risk factors such as animals and transportation facilities:

[0254] (26).

[0255] in, The original weights for behavioral risk.

[0256] To avoid imbalance caused by excessive weighting and to ensure a reasonable proportion of risk contribution, the original weights are normalized to meet the following requirements. constraint:

[0257] (27).

[0258] A dynamic weighted summation method is used to integrate multi-dimensional sub-risks to obtain the final individual total risk value:

[0259] (28).

[0260] in, The total original risk weight, This represents the individual's total risk value.

[0261] In summary, this embodiment constructs an individual risk assessment model for driving scenarios based on multi-factor dynamic adaptive weights, using pedestrian density ( ), vehicle density ( Animals have binary identifiers ( Traffic facilities have dual-value signs ( Using vehicle speed (v) as the core perception input dimensions, it enables accurate and dynamic assessment of individual risks in driving scenarios.

[0262] In the model input preprocessing stage, the vehicle's speed is standardized using a normalization method, and the normalization formula is defined as follows: ,in, To determine the speed limit threshold for the corresponding road, this preprocessing operation unifies the numerical range of speed characteristics, laying the data foundation for subsequent weight allocation and risk calculation.

[0263] In the dynamic weight allocation stage, the original weights corresponding to each sub-risk indicator are adaptively calculated based on the normalized speed characteristics and multi-dimensional perception information. This model decomposes the individual risks of driving scenarios into... Basic risks Distance risk, Speed ​​risk Collision time risk The five sub-risk indicators for behavioral risk are all uniformly constrained to the range of [0, 0.2] to ensure the consistency of the quantification of sub-risk values.

[0264] For each sub-risk, a differentiated adaptive allocation strategy is designed based on the calculation of its original weight:

[0265] Basic risk weights are derived by fusing multi-dimensional perceptual features and calculating the basic risk weight factors using the Sigmoid activation function. This leads to the derivation of the original weights of basic risks. The adaptive representation of basic risks is now available.

[0266] Original distance risk weights: Based on the distribution characteristics of pedestrian and vehicle density, the original distance risk weights are calculated. The adaptive allocation accurately reflects the impact of the spatial distance between people and vehicles on risks.

[0267] Original weights for speed risk: Coupled normalized vehicle speed With transportation infrastructure factors Construct the original weights for speed risk This reflects the combined effect of speed status and road traffic facility constraints on risk.

[0268] Collision time risk original weights: Constructing collision time weight factors by combining pedestrian / vehicle density characteristics and speed information. And thus obtain To characterize the risk weight adaptability in the collision time dimension.

[0269] Original weights for behavioral risks: Focusing on the characteristic factors of sudden risks, complete the original weights for behavioral risks. The adaptive adjustment highlights the differentiated allocation of risk weights in emergency scenarios.

[0270] To ensure the rationality and constraint of weight allocation, the model introduces an adaptive normalization threshold mechanism. First, the sum of all original weights is calculated. Then, through the normalization formula The original weights are normalized to obtain the final result. The dynamic adaptive weights of the constraints, i.e., the basic risk weights. Distance risk weight Speed ​​risk weight Collision time risk weight With behavioral risk weights This enables adaptive matching of weight allocation that changes in real time with the driving scenario.

[0271] In the risk fusion and assessment phase, based on the aforementioned dynamic adaptive weights, the five sub-risk indicators are weighted and fused to obtain the final individual total risk value with a value range of [0,1]. This assessment model, through dynamic adaptive adjustment of weights, enables real-time dynamic assessment of individual risk changes in driving scenarios, providing quantitative support for risk decision-making and safety control in autonomous driving systems.

[0272] S3: Utilize a risk decision-making model based on multi-scale deep feature learning to assess the risks of weather classification results, visibility information, scene features, and individual target risks, and obtain risk level prediction results.

[0273] In one specific implementation, the dynamic weighted risk assessment and grading stage undertakes the multi-dimensional risk feature fusion and level classification functions of the driving scenario risk grading system. Through a three-level architecture of feature engineering enhancement, multi-scale deep feature extraction, and ensemble learning fusion, it achieves end-to-end mapping from raw risk data to four risk levels, providing quantitative basis for driving decisions. This stage adopts a hierarchical architecture of "feature preprocessing—deep extraction—ensemble fusion," specifically including: Level 1: Feature engineering enhancement module; Level 2: Multi-scale deep feature extraction network (Risk-feat-net); Level 3: Cross-validation Stacking ensemble learning module. The overall architecture is as follows: Figure 2 As shown, the original 10-dimensional risk features are enhanced and expanded to 64 dimensions. After oversampling using the Synthetic Minority Oversampling Technique (SMOTE), high-dimensional features are extracted through a multi-scale deep feature extraction network (Risk-feat-net). Finally, the risk level is output through Stacking ensemble learning.

[0274] The specific steps are as follows:

[0275] S31: Enhance the original 10-dimensional features, including weather classification results, visibility information, scene features, and individual target risk, through feature engineering.

[0276] In one specific implementation, 10-dimensional raw risk features are received from hierarchical perception and a security risk field. Feature engineering enhancement and standardization processing are performed to generate 40-dimensional enhanced features adapted to the deep network. In this embodiment, the 10-dimensional raw risk features include three weather classification results (normalized 0-1), visibility information, i.e., the degree of image fog degradation (normalized 0-1), scene features, i.e., the 7 scene features in Table 1 (normalized 0-1), and individual target risk (normalized 0-1).

[0277] The feature engineering enhancement formula is:

[0278] (29).

[0279] In the formula, This represents a 10-dimensional original risk feature vector; This represents a 40-dimensional enhanced feature matrix, which includes original features, statistical features (mean, standard deviation, maximum, minimum, and range), interaction features (products and sums of features), and squared features.

[0280] The specific enhancements include:

[0281] Statistical characteristics (5 dimensions):

[0282] ,

[0283] ,

[0284] (30).

[0285] in, The mean vector representing the features of the training set; This represents the total number of features, which is 5 in this case. Indicates the first One original risk characteristic, subscript This represents the first 5 dimensions of the "original 10-dimensional features"; The standard deviation vector representing the features of the training set; The most significant original risk characteristic, This represents the minimum original risk characteristic.

[0286] Interactive features (20 dimensions): The product and sum of pairwise combinations of the first 5 dimensions of features.

[0287] (31).

[0288] in, and Represents the first of the original 10-dimensional features The and the first One characteristic.

[0289] Squared features (5 dimensions): The squares of the first 5 features:

[0290] (32).

[0291] in, Indicates the first of the 5 features The square of each feature.

[0292] Feature standardization:

[0293] (33).

[0294] In the formula, The mean vector representing the features of the training set; The standard deviation vector representing the features of the training set; This represents the standardized feature, with a mean of 0 and a standard deviation of 1.

[0295] S32: Use a multi-scale deep feature extraction network (Risk-feat-net) to extract driving risk features from the feature-engineered features.

[0296] In one specific implementation, Risk-feat-net is an improved residual convolutional neural network specifically designed for driving risk feature extraction. Its network structure is as follows: Figure 3 As shown.

[0297] In the feature input stage, the fused 10-dimensional original risk features are Z-score standardized and feature-engineered to extract statistical features, interaction features, and squared terms, expanding the feature dimension to 40 dimensions. After dimensionality transformation, the input data is first subjected to channel upscaling and nonlinear mapping through a 1×1 convolutional layer, increasing the feature dimension to 64 dimensions, and then processed by batch normalization and ReLU activation function.

[0298] To enhance the depth and robustness of feature extraction, the network employs a three-level residual block structure. Each residual block consists of two 1×1 convolutional layers and batch normalization, with skip connections enabling stable gradient propagation and feature reuse. An efficient channel attention module is embedded during residual feature extraction. This module obtains channel dimension statistics through global average pooling and adaptively generates channel weights via one-dimensional convolution, thereby enhancing critical risk channels and suppressing irrelevant features.

[0299] Subsequently, the network introduces a multi-head self-attention mechanism, using a Transformer encoder to model the global dependencies of the feature sequence. After reshaping the feature map into a sequence form, it is processed by two layers of Transformer encoders. Each encoder layer contains a multi-head self-attention module and a feedforward neural network. Layer normalization and residual connections ensure training stability, enabling in-depth mining of long-range interaction relationships between features.

[0300] After global average pooling and Dropout regularization, the features are mapped to 64 dimensions through a fully connected layer, and then processed by batch normalization and ReLU activation to finally output 64-dimensional high-dimensional deep features. This deep feature is concatenated with the original 40-dimensional enhanced features to form a 104-dimensional fusion feature, which serves as the input to the subsequent ensemble learning decision module, achieving dual enhancement of the feature layer and the decision layer.

[0301] Specifically, it includes the following structure:

[0302] Input format reconstruction layer:

[0303] (34).

[0304] In the formula, This indicates adding a dimension to the channel dimension; This represents the input features after dimensional expansion, with dimensions of (Batch×1×40).

[0305] 1D Convolution and Residual Block Feature Extraction Layer:

[0306] A three-layer 1D convolutional stacked structure is adopted, with the number of channels successively increasing from 32 to 64 to 128. Each layer is followed by batch normalization (BN) and ReLU activation.

[0307] (35).

[0308] in, This is the feature output after one convolutional layer. This is the ReLU activation function.

[0309] Introducing residual connections to solve the vanishing gradient problem in deep networks:

[0310] (36).

[0311] In the formula, This represents a 1D convolution operation, with the number of output channels increasing from 32 to 64 to 128; BN represents batch normalization. This represents the main branch of the residual block (two convolutions + BN). This indicates a skip branch (identity mapping or 1×1 convolution); This represents the output characteristics after residual connection.

[0312] High-efficiency ECA channel attention-weighted layer:

[0313] An ECA attention mechanism is introduced to achieve adaptive recalibration of feature channels, enabling the network to focus on key risk feature dimensions.

[0314] Adaptive convolution kernel size calculation:

[0315] (37).

[0316] Channel attention weight generation:

[0317] (38),

[0318] (39).

[0319] In the formula, C=128 is the number of channels; γ=2, b=1 are hyperparameters; k=7 is the adaptively calculated convolution kernel size; Indicates global average pooling; express Activation function; Indicates channel attention weights; This represents the characteristics after ECA weighting.

[0320] Transformer global feature extraction layer:

[0321] Integrating a Transformer encoder, this method utilizes a multi-head self-attention mechanism to capture long-distance dependencies between feature sequences and extract high-dimensional semantic features.

[0322] (40).

[0323] In the formula, This indicates that the data is transposed to (Batch × seq_len × channels) format; This represents a 2-layer Transformer encoder with 4 attention heads and a model dimension of 128. This represents the global features output by the Transformer.

[0324] Deep feature output layer:

[0325] The 128-dimensional features are mapped to 64-dimensional deep features using a fully connected layer:

[0326] (41).

[0327] In the formula, This represents the 128-dimensional feature after adaptive average pooling. , This is the weight matrix of the fully connected layer; , For bias terms; The discard rate was 0.3%. This represents the final output 64-dimensional depth features.

[0328] S33: Perform cross-validation and ensemble learning on the extracted driving risk features.

[0329] In one specific implementation, to achieve multi-granularity information complementarity, the abstract features extracted by the multi-scale deep feature extraction network are horizontally concatenated with the original input features to form a fused feature matrix. This allows for the mining of complex nonlinear interaction relationships between risk factors. The probability-weighted fusion mechanism significantly improves the model's classification robustness and generalization performance on boundary samples. Finally, a K-fold cross-validation stacking ensemble strategy is used for risk level classification.

[0330] S331: The extracted driving risk features are combined with the features enhanced by feature engineering to form a fused feature matrix.

[0331] In one specific implementation, 40-dimensional enhancement features and 64-dimensional depth features are concatenated to form a fused feature matrix:

[0332] Feature splicing:

[0333] (42).

[0334] In the formula, This indicates concatenation along the feature dimension; This represents the combined features, with a dimension of (Batch×104).

[0335] S332: Construct a base model and train it using a K-fold cross-validation strategy.

[0336] In one specific implementation, a 5-fold cross-validation strategy is used to train four heterogeneous base learners, corresponding to: Random Forest (RF), Extreme Gradient Boosting (XGBoost), Light Gradient Boosting Machine (LightGBM), and Categorical Boosting (CatBoost), respectively. This effectively avoids information leakage: the training set is divided into 5 subsets; 4 subsets are used for training and 1 subset for validation each time; the process is repeated 5 times to ensure that each subset serves as a validation set; and the predicted probabilities of all validation sets are collected as meta-features.

[0337] It should be noted that the training set for this embodiment is derived from publicly available data. This embodiment constructs a scenario risk dataset containing 60,000 samples, each sample being a 10-dimensional original risk feature vector containing scenario features, weather level, visibility information, and individual target risk. A joint training strategy using real-world collected data and physically constrained generated data is employed. Specifically, 20,000 data points are from the TRA public dataset; the remaining 20,000 data points are from video and image captures of actual road driving scenarios. The extraction process involves: extracting frames at 1 frame / second from videos recorded by vehicle-mounted cameras; using a hierarchical perception and enhanced tracking module to extract target position, speed, category, and environmental information from each frame; calculating individual target risk based on the safety risk field formula; and finally combining these into a 10-dimensional vector, supplemented by manual annotation for risk level labeling. The other 20,000 data points are generated based on vehicle dynamics models and traffic flow theory, effectively covering extreme boundary cases and rare driving scenarios. The dataset is divided into a stratified sampling method: 64% training set, 16% validation set, and 20% test set, ensuring consistent distribution across categories.

[0338] S333: Generate predicted probabilities using the trained base model.

[0339] In one specific implementation, the predicted probabilities for each category are output through four pre-trained base models:

[0340] (43),

[0341] (44),

[0342] (45)

[0343] (46).

[0344] In the formula, As a standard method for classification models, , , , These represent the predicted probability vectors output by the four base models, each with a dimension of (Batch×4) (four risk levels). , , , These represent the predicted probability vectors output by four different heterogeneous base learners: Random Forest, Extreme Gradient Boosting, Lightweight Gradient Boosting Machine, and Categorical Gradient Boosting.

[0345] S334: Construct the meta-feature matrix based on the predicted probabilities of the base model.

[0346] In one specific implementation, the predicted probabilities of the four base models are concatenated into a meta-feature matrix:

[0347] (47).

[0348] In the formula, This represents the meta-feature matrix, with dimensions of (Batch×16) (4 base models × 4 class probabilities).

[0349] S335: Use a meta-learner to perform feature fusion analysis on the meta-feature matrix to obtain the risk level prediction result.

[0350] In one specific implementation, the meta-feature matrix is ​​input into a pre-trained LightGBM meta-learner, which outputs the final risk level prediction result and the confidence probability of each category:

[0351] (48)

[0352] (49).

[0353] In the formula, This indicates the LightGBM meta-learner; The risk level label indicates the predicted risk level (0-3, corresponding to no risk, low risk, medium risk, and high risk). This represents the prediction probability vector for each category, with a dimension of (Batch×4).

[0354] Through experimental comparison of XGBoost, LightGBM, Random Forest, and CatBoost, LightGBM's meta-learner, based on a histogram-based decision tree splitting algorithm, exhibits linear time complexity when processing high-dimensional sparse meta-features and is less prone to overfitting compared to deep networks. Its leaf-wise growth strategy, combined with a multi-class objective function, accurately captures the non-linear interaction patterns between the predicted probabilities of the base models. Furthermore, it supports class weight adjustment and early stopping mechanisms, enabling rapid convergence on a small number of meta-feature samples and effectively balancing the bias-variance tradeoff of the ensemble model.

[0355] S336: Analyze and correct the risk level prediction results.

[0356] In one specific implementation method, the risk level calculation formula is as follows:

[0357] (50).

[0358] Confidence level calculation formula:

[0359] (51).

[0360] Detailed probability calculation formula:

[0361] (52).

[0362] In the formula, This indicates a label mapping (0 → no risk, 1 → low risk, 2 → medium risk, 3 → high risk). Indicates the first Level risk label; confidence level is the highest category probability value. This indicates taking the maximum value.

[0363] Formula for correcting ambiguous samples:

[0364] When the difference between the highest probability and the second-highest probability is less than 0.1, the base model voting mechanism is activated:

[0365] (53).

[0366] In the formula, They represent , , , The final prediction result for the input sample, The mode operation takes the risk level that appears most frequently among the predictions of the four base models as the final output. .

[0367] To better illustrate the superiority of the above method, the following experiment was conducted:

[0368] This embodiment constructs a scenario risk dataset containing 60,000 samples. Each sample is a 10-dimensional original risk feature vector, including scenario features, weather level, visibility information, and individual target risk. A joint training strategy of real-world data collection and physically constrained data generation is adopted. 20,000 data points are from the TRA public dataset; the remaining 20,000 data points are from video and image captures of actual road driving scenarios. The extraction process is as follows: frames are extracted at 1 frame / second from videos recorded by vehicle-mounted cameras. For each frame, a hierarchical perception and enhanced tracking module is used to extract target position, speed, category, and environmental information. Individual target risk is then calculated based on the safety risk field formula, and finally combined into a 10-dimensional vector, supplemented by manual annotation for risk level labeling. The other 20,000 data points are generated based on vehicle dynamics models and traffic flow theory, effectively covering extreme boundary cases and rare driving scenarios. The dataset is divided into a stratified sampling method: 64% training set, 16% validation set, and 20% test set, ensuring consistent distribution across categories.

[0369] To verify the effectiveness of the proposed method, this embodiment designed a rigorous comparative experimental framework: all comparative models, including seven baseline methods such as Random Forest, XGBoost, LightGBM, CatBoost, Gradient Boosting, SVM, and MLP, as well as the proposed enhanced Stacking model, were trained and evaluated under identical training / validation / test data partitions. A fixed random seed (random_state=42) was used to ensure the reproducibility of the results. Furthermore, ablation experiments were conducted to progressively verify the independent contributions of feature engineering, SMOTE imbalance handling, multi-scale deep feature extraction networks, and the Stacking integration modules. The McNemar test was used to perform statistical significance analysis on performance differences (p<0.05 was considered significant). Experimental results show that, under unified hardware and data conditions, this method achieves significant improvements in key indicators such as accuracy, F1 score, and minority class recall compared to traditional baseline models, providing reliable technical validation data for traffic risk prediction tasks.

[0370] 1. Overall performance comparison and analysis.

[0371] (1) Explanation of evaluation indicators:

[0372] To comprehensively evaluate the classification performance of the method in this embodiment, accuracy, macro-average F1 score (F1-Macro), and training time are used as evaluation metrics, defined as follows:

[0373] Accuracy: This refers to the proportion of samples correctly predicted by the model out of the total number of samples, reflecting the overall classification performance of the model. The calculation formula is:

[0374] (54).

[0375] In this system, TP represents true positives, TN represents true negatives, FP represents false positives, and FN represents false negatives. Accuracy is intuitive and easy to understand, making it one of the most commonly used evaluation metrics for classification tasks.

[0376] F1-Macro score: First, the F1 score for each class is calculated, then the arithmetic mean is taken over all classes. This comprehensively reflects the model's balanced performance in multi-class classification tasks. The calculation formula is:

[0377] (55).

[0378] in, The total number of categories, For the first The F1 score for each category. Compared to accuracy, F1-Macro is more robust to class imbalance and can more comprehensively evaluate the model's ability to identify risks at various levels.

[0379] Training Time: This refers to the time (in seconds) required for the model to complete the fit on the training set, reflecting the model's training efficiency and computational complexity. Comparing models under the same hardware environment allows for an objective evaluation of their practicality and deployment costs.

[0380] (2) Performance comparison with mainstream machine learning models.

[0381] To verify the effectiveness of the method in this embodiment, several mainstream machine learning models were selected as baselines for comparison, including Multilayer Perceptron (MLP), Random Forest (RF), XGBoost, Gradient Boosting, LightGBM, CatBoost, and Support Vector Machine (SVM). All comparison models were trained and tested on the same dataset and hardware environment. Accuracy, F1-Macro, and training time were used as evaluation metrics. The comparison results are shown in Table 2.

[0382] Table 2. Performance comparison with mainstream machine learning models and statistical significance test

[0383]

[0384] (3) Performance comparison analysis.

[0385] The proposed method achieved an accuracy of 84.57% and an F1-Macro score of 0.8459 on the test set, representing improvements of 3.39 percentage points and 0.0333 respectively compared to the baseline random forest model (accuracy 81.18%, F1-Macro 0.8126), with relative improvements of 4.18% and 4.10%. In comparison with seven mainstream machine learning models, the proposed method ranked first in overall performance, significantly outperforming advanced algorithms such as Multilayer Perceptron (MLP, 79.43%, 0.7954), LightGBM (82.88%, 0.8291), XGBoost (82.43%, 0.8246), and CatBoost (83.48%, 0.8351), and even surpassing the gradient boosting model (82.73%, 0.8279), which also employs an ensemble learning strategy. This fully validates the effectiveness and superiority of the proposed risk decision-making model that integrates multi-scale deep features and ensemble learning decision trees.

[0386] In terms of training efficiency, ensemble tree models such as Random Forest, LightGBM, and CatBoost all exhibit high training efficiency (training time less than 2 seconds), while MLP and SVM have relatively longer training times. Although the method in this embodiment has a training time of 233.01 seconds, its core modules all have high computational efficiency, and the overall architecture has good practicality and deployment feasibility.

[0387] (4) Statistical significance test.

[0388] To further verify the reliability of the performance improvement of the method in this embodiment, the McNemar paired test was used to perform statistical significance analysis on the proposed model and each comparison model. The McNemar test is suitable for comparing pairwise classification results. The test statistic was calculated by constructing a four-fold contingency table, which follows a chi-square distribution with 1 degree of freedom. The results are shown in Table 3. The p-value represents the probability of observing the current difference or a more extreme difference under the null hypothesis (no significant difference in the performance of the two models). The significance level was set to α=0.05. When p<0.05, the difference was considered statistically significant, and when p<0.001, the difference was considered extremely significant.

[0389] Table 3. Results of statistical significance test

[0390]

[0391] The significance test results show that the p-values ​​of the proposed method compared with random forest, XGBoost, and LightGBM are all less than 0.0001, far below the significance level of 0.05. These results demonstrate that the performance difference between the proposed method and mainstream models is statistically significant, and the performance improvement is not due to random fluctuations. This verifies the stability, repeatability, and significant superiority of the proposed method in classification tasks.

[0392] 2. Analysis of the contribution of ablation experiments.

[0393] (1) Explanation of evaluation indicators.

[0394] To quantitatively evaluate the contribution of each module to the model performance, accuracy and the macro-average F1 score (F1-Macro) are used as evaluation metrics, defined as follows:

[0395] Accuracy: This refers to the proportion of samples correctly predicted by the model out of the total number of samples, reflecting the overall classification performance of the model. The calculation formula is:

[0396] (56).

[0397] In this system, TP represents true positives, TN represents true negatives, FP represents false positives, and FN represents false negatives. Accuracy metrics are intuitive and easy to understand, and are suitable for classification tasks with relatively balanced class distributions.

[0398] F1-Macro score: First, the F1 score for each class is calculated, then the arithmetic mean is taken over all classes. This comprehensively reflects the model's balanced performance in multi-class classification tasks. The calculation formula is:

[0399] (57).

[0400] in, The total number of categories, For the first The F1 score for each category. Compared to accuracy, F1-Macro is more robust to class imbalance and can more comprehensively evaluate the model's ability to identify risks at various levels.

[0401] (2) Ablation experiment design.

[0402] To quantitatively evaluate the contribution of each core module in the method of this embodiment to the final performance, a series of ablation experiments were designed. Random Forest (RF) was used as the baseline model, and feature engineering, SMOTE oversampling, a multi-scale deep feature extraction network (Risk-feat-net), and a Stacking ensemble module were gradually introduced. The accuracy and F1-Macro metric were recorded for each configuration, and the module contribution was calculated. The ablation experiment results are shown in Table 4.

[0403] Table 4. Ablation Experiment Results

[0404]

[0405] (4) Analysis of experimental results.

[0406] The feature engineering module expands the original 10-dimensional features to 40 dimensions by constructing statistical, interactive, and multinomial features, improving the model accuracy from 74.28% to 81.18% and the F1-Macro from 0.7431 to 0.8126, contributing a performance improvement of 6.90 percentage points. This result demonstrates that feature expansion has a significant effect on improving the model's expressive power.

[0407] The SMOTE oversampling module, introduced based on feature engineering, did not further improve accuracy on class-balanced experimental data (remaining at 81.18%), and the F1-Macro score remained unchanged. However, in real-world class-imbalanced scenarios, this module still holds significant value in improving minority class recognition capabilities and helps enhance the model's generalization ability.

[0408] The multi-scale deep feature extraction network (Risk-feat-net) module further introduces 64-dimensional deep features, improving the accuracy to 81.27% and the F1-Macro to 0.8131, representing improvements of 0.09 percentage points and 0.0005 respectively compared to the previous configuration. Although the improvement is limited, it verifies the good complementarity between deep features and handcrafted features, enabling the capture of implicit nonlinear patterns in the original features and providing richer feature representations for subsequent ensemble learning.

[0409] The Stacking ensemble module employs 5-fold cross-validation to generate meta-features and uses LightGBM as the meta-learner, significantly improving accuracy from 81.27% to 84.57% and F1-Macro from 0.8131 to 0.8459, contributing a significant improvement of 3.30 percentage points, for a cumulative improvement of 10.29 percentage points. These results demonstrate that the multi-model probabilistic fusion strategy can effectively reduce the prediction bias of a single model and fully leverage the advantages of each base learner, which is a key factor in the performance improvement of the method in this embodiment.

[0410] 3. Performance balance analysis of each category.

[0411] To thoroughly evaluate the identification capabilities of the method in this embodiment across different risk categories, precision, recall, and F1 score are used as evaluation metrics to conduct a fine-grained analysis of the model's classification performance across each risk category.

[0412] (1) Explanation of evaluation indicators:

[0413] Precision: The proportion of samples that the model predicts as positive actually being positive, reflecting the accuracy of the model's predictions. The calculation formula is:

[0414] (58).

[0415] in For a real example, These are false positives. Higher precision indicates a lower false alarm rate.

[0416] Recall: The proportion of samples that are actually positive that are correctly identified by the model, reflecting the model's ability to detect positive samples. The calculation formula is:

[0417] Recall (59).

[0418] in These are false negatives. A higher recall rate indicates a lower false negative rate.

[0419] F1 Score: The harmonic mean of precision and recall, comprehensively reflecting the model's classification performance. The calculation formula is:

[0420] (60).

[0421] The F1 score can balance precision and recall, and is suitable for scenarios with imbalanced class distribution.

[0422] The performance indicators for each risk category are shown in Table 5.

[0423] Table 5. Performance Indicators for Each Risk Category

[0424]

[0425] (2) Results Analysis:

[0426] As shown in Table 3, the method in this embodiment exhibits balanced and excellent classification performance across all four risk categories. Precision, recall, and F1 score for all categories remain above 84%, indicating that the model does not show significant class bias and has good identification ability for all risk levels.

[0427] Specifically, the indicators for the risk-free category all reached over 86%, showing the most stable performance; the F1 scores for the low-risk and medium-risk categories were 85.32% and 84.86% respectively, both at a high level; the high-risk category, as the most critical identification target in traffic risk warning, achieved a recall rate of 84.00%, a precision rate of 85.02%, and an F1 score of 84.51%, indicating that the model can effectively identify high-risk samples and meet the core requirement of "balanced identification" of high-risk samples in practical applications.

[0428] Overall, the method in this embodiment achieved average precision, recall, and F1 score of 85.25%, 85.13%, and 85.19% across all categories, respectively. These indicators are well-balanced and excellent, fully demonstrating the stability and effectiveness of the model in multi-class classification tasks.

[0429] To address the challenges of dynamic coupling of risk factors in complex driving scenarios and the complexity and difficulty in real-time deployment of traditional risk assessment methods, this embodiment proposes a lightweight driving scenario risk assessment method based on multi-factor dynamic weight fusion. First, a technical framework of "layered perception—multi-module multi-factor dynamic fusion—multi-scale deep feature decision-making—risk classification" is constructed. The layered perception module outputs weather classification and visibility information, which, combined with the individual target risk output by the safety risk field module, forms a 10-dimensional original risk feature, achieving dynamic weight adaptive fusion of multi-dimensional risk factors. Second, to solve the problem of introducing additional parameters and computational overhead through attention mechanisms, a parameterless attention-enhanced lightweight target detection method is proposed. Parameterless channel attention and spatial attention mechanisms are embedded in the YOLOv8n backbone network, with weights dynamically generated based on global mean statistics of feature maps and Gaussian center priors, respectively. This achieves an optimized balance between detection accuracy and inference speed without increasing model parameters. Finally, addressing the challenges of complex nonlinear mappings of multidimensional features and the difficulty of traditional single models in capturing feature interactions, a risk decision-making model integrating multi-scale deep features and ensemble learning decision trees is designed. Feature engineering enhances the aforementioned 10-dimensional original risk features to 40 dimensions, followed by the extraction of 64-dimensional high-dimensional features via a multi-scale deep feature extraction network. These 64-dimensional features, combined with the enhanced 40-dimensional features, constitute a 104-dimensional concatenated feature set. A Stacking ensemble learning framework is used for meta-feature training, and finally, the meta-learner LightGBM achieves four-level risk classification. Experimental results show that, while maintaining lightweight characteristics, this method achieves an accuracy of 84.57% on the test set, a 3.39 percentage point improvement compared to the baseline random forest model (81.18%). It ranks first among eight mainstream machine learning models, including Logistic Regression, LightGBM, XGBoost, and CatBoost, effectively improving the accuracy and robustness of risk assessment in complex traffic scenarios and meeting the real-time deployment requirements of in-vehicle systems.

[0430] Example 2:

[0431] Embodiment 2 of the present invention provides a driving scenario risk assessment system based on multi-factor dynamic fusion, comprising:

[0432] The layered perception module is configured to acquire vehicle video under different weather conditions, perform environmental layered perception on the vehicle video, obtain weather classification results and visibility information, and perform target tracking and trajectory prediction based on a parameterless attention target detection mechanism to obtain target detection results and corresponding scene features.

[0433] The risk quantification module is configured to quantify various risks in a driving scenario based on target detection results and corresponding scene features using a multi-factor dynamic fusion algorithm to obtain individual target risks.

[0434] The risk decision module is configured to use a risk decision model based on multi-scale deep feature learning to assess the risks of weather classification results, visibility information, scene features, and individual target risks, and obtain risk level prediction results.

[0435] Example 3:

[0436] Embodiment 3 of the present invention provides a computer-readable storage medium storing a computer program adapted for loading by a processor and executing the steps of the driving scenario risk assessment method based on multi-factor dynamic fusion as described in Embodiment 1 of the present invention.

[0437] Example 4:

[0438] Embodiment 4 of the present invention provides a computer device, the device comprising:

[0439] A processor, adapted to execute computer programs;

[0440] A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the steps in the driving scenario risk assessment method based on multi-factor dynamic fusion as described in Embodiment 1 of the present invention.

[0441] Example 5:

[0442] Embodiment 5 of the present invention provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in the multi-factor dynamic fusion-based driving scenario risk assessment method described in Embodiment 1 of the present invention.

[0443] The steps and methods involved in Examples 2, 3, 4 and 5 above correspond to those in Example 1. For specific implementation methods, please refer to the relevant description section of Example 1.

[0444] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0445] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data processing device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, an optical medium, or a semiconductor medium, etc.

[0446] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A driving scenario risk assessment method based on multi-factor dynamic fusion, characterized in that, Includes the following steps: The system acquires in-vehicle videos under different weather conditions, performs environmental layer perception on the in-vehicle videos, obtains weather classification results and visibility information, and performs target tracking and trajectory prediction based on a parameter-free attention target detection mechanism to obtain target detection results and corresponding scene features. Specifically, the weather layer perception network is used to identify weather conditions in in-vehicle videos to obtain weather classification results. The degree of fog degradation in images in vehicle video is evaluated using a hybrid threshold degradation judgment method, and corresponding defogging strategies are executed according to the degree of fog degradation to obtain visibility information; A parameterless attention-based target detection mechanism is used to enhance the feature representation of the dehazed image, resulting in parameterless attention-based target detection features. Specifically, a channel attention module based on no learning parameters strengthens important channels and suppresses redundant channels, generating parameterless channel attention weights solely through statistical calculation. A spatial attention module is used to highlight the central region of the image, resulting in spatial attention weights. Finally, the parameterless channel attention weights and spatial attention weights are fused together. The OC-SORT framework, combined with a motion prediction model, is used to track and predict the trajectory of target detection features without parameter attention. Based on the target detection results and corresponding scene features, a multi-factor dynamic fusion algorithm is used to quantify various risks in driving scenarios to obtain individual target risks. Specifically, scene features and tracking data are screened to generate target sequences. Distance estimation is performed based on the filtered target sequence; Vehicle dynamics modeling based on vehicle driving status; A risk calculation model is constructed based on vehicle dynamics modeling and distance estimation, and the risk of individual targets is calculated. A risk decision-making model based on multi-scale deep feature learning is used to assess the risks of weather classification results, visibility information, scene features, and individual target risks, and to obtain risk level prediction results.

2. The driving scenario risk assessment method based on multi-factor dynamic fusion as described in claim 1, characterized in that, The specific steps for conducting risk assessment on weather classification results, visibility information, scene features, and individual target risks using a risk decision-making model based on multi-scale deep feature learning are as follows: Feature engineering was performed to enhance the 10 original features, including weather classification results, visibility information, scene features, and individual target risks. A multi-scale deep feature extraction network is used to extract driving risk features from feature-engineered and enhanced features. The extracted driving risk features are cross-validated and ensemble-learned.

3. The driving scenario risk assessment method based on multi-factor dynamic fusion as described in claim 2, characterized in that, The specific steps for cross-validation and ensemble learning of the extracted driving risk features are as follows: The extracted driving risk features are combined with the features enhanced by feature engineering to form a fusion feature matrix; Construct a base model and train it using a K-fold cross-validation strategy; Generate predicted probabilities using the trained base model; Construct a meta-feature matrix based on the predicted probabilities of the base model; The meta-learner is used to perform feature fusion analysis on the meta-feature matrix to obtain the risk level prediction result; The risk level prediction results are analyzed and corrected.

4. A driving scenario risk assessment system based on multi-factor dynamic fusion, characterized in that, include: The hierarchical perception module is configured to acquire vehicle-mounted videos under different weather conditions, perform environmental hierarchical perception on the vehicle-mounted videos, obtain weather classification results and visibility information, and perform target tracking and trajectory prediction based on a parameterless attention target detection mechanism to obtain target detection results and corresponding scene features. Specifically, the weather hierarchical perception network is used to identify the weather conditions of the vehicle-mounted videos to obtain weather classification results. The degree of fog degradation in images in vehicle video is evaluated using a hybrid threshold degradation judgment method, and corresponding defogging strategies are executed according to the degree of fog degradation to obtain visibility information; A parameterless attention-based target detection mechanism is used to enhance the feature representation of the dehazed image, resulting in parameterless attention-based target detection features. Specifically, a channel attention module based on no learning parameters strengthens important channels and suppresses redundant channels, generating parameterless channel attention weights solely through statistical calculation. A spatial attention module is used to highlight the central region of the image, resulting in spatial attention weights. Finally, the parameterless channel attention weights and spatial attention weights are fused together. The OC-SORT framework, combined with a motion prediction model, is used to track and predict the trajectory of target detection features without parameter attention. The risk quantification module is configured to quantify various risks in driving scenarios based on target detection results and corresponding scene features using a multi-factor dynamic fusion algorithm to obtain individual target risks. Specifically, it filters scene features and tracking data to generate target sequences. Distance estimation is performed based on the filtered target sequence; Vehicle dynamics modeling based on vehicle driving status; A risk calculation model is constructed based on vehicle dynamics modeling and distance estimation, and the risk of individual targets is calculated. The risk decision module is configured to use a risk decision model based on multi-scale deep feature learning to assess the risks of weather classification results, visibility information, scene features, and individual target risks, and obtain risk level prediction results.

5. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the driving scenario risk assessment method based on multi-factor dynamic fusion as described in any one of claims 1-3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded by a processor and executed as described in any one of claims 1-3, the method for assessing driving scenarios based on multi-factor dynamic fusion.

7. A computer device, characterized in that, include: A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the driving scenario risk assessment method based on multi-factor dynamic fusion as described in any one of claims 1-3.