A vehicle collision risk calculation method, device, equipment and storage medium
Patent Information
- Application Number
- CN202611254000.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]本申请提供一种车辆碰撞风险计算方法、装置、设备及计算机可读存储介质,解决了现有后向碰撞预警系统因缺乏轨迹曲率特征显式提取与利用而无法准确评估弯道场景碰撞风险的问题
本发明一种车辆碰撞风险计算方法、装置、设备及存储介质中通过获取本车及后方目标车的行驶数据,并基于恒定转弯率与速度模型CTRV进行轨迹建模生成未来轨迹点,特别是通过三次多项式拟合所述未来轨迹点以提取目标轨迹曲率特征,实现了针对目标运动状态的精细化轨迹表征与曲率量化;该方法有效结合了本车行驶数据与所述目标轨迹曲率特征计算碰撞风险值,防止了因传统直线模型假设导致的轨迹失真及碰撞时间估算错误,解决了现有后向碰撞预警系统因缺乏轨迹曲率特征显式提取与利用而无法准确评估弯道场景碰撞风险的问题,显著提升了车辆在复杂道路几何条件下的碰撞风险判定精度与主动安全控制指令的生成可靠性。
Smart Images

Figure CN122990967A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle collision detection technology, specifically to a method, apparatus, device, and storage medium for calculating vehicle collision risk. Background Technology
[0002] Existing methods for calculating vehicle collision risk typically rely on the assumption of linear motion of the target or simple center point prediction, using Euclidean distance to calculate collision time. However, in scenarios where the target is traveling on a curve or traversing laterally, existing methods lack explicit extraction and utilization of the target's trajectory curvature features, resulting in an inability to accurately reconstruct the target's actual travel path. This limitation in trajectory modeling means that collision risk assessment depends solely on straight-line distance rather than the actual path length, ignoring the geometric fit between the target's trajectory and the collision area boundary. This can easily lead to errors in collision time estimation, resulting in false alarms or missed alarms in warning systems and reducing the reliability of active safety systems in complex road conditions. Summary of the Invention
[0003] This application provides a method, apparatus, device, and computer-readable storage medium for calculating vehicle collision risk, which solves the problem that existing rear collision warning systems cannot accurately assess collision risk in curve scenarios due to the lack of explicit extraction and utilization of trajectory curvature features.
[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows: In a first aspect, embodiments of this application provide a method for calculating vehicle collision risk, including: Obtain driving data for this vehicle and target vehicles behind it; Based on the driving data of the target vehicle behind, trajectory modeling is performed using the constant turning rate and speed model CTRV to generate the future trajectory points of the target vehicle behind. The curvature features of the target trajectory are extracted by fitting the future trajectory points with a cubic polynomial. The collision risk value is calculated by combining the vehicle's driving data with the curvature characteristics of the target trajectory, and control commands are generated based on the collision risk value.
[0005] Based on the above technical solution, the trajectory modeling based on the constant turning rate and speed model CTRV includes: Construct a state vector containing position, velocity, heading angle, and angular velocity; The state vector is updated using the driving data to predict the future trajectory points of the target vehicle behind.
[0006] Based on the above technical solution, the step of extracting the curvature features of the target trajectory by fitting the future trajectory points with a cubic polynomial includes: Fit the predicted future trajectory points to a cubic polynomial curve; The curvature value of the cubic polynomial curve at each trajectory point is calculated and used as the curvature feature of the target trajectory.
[0007] Based on the above technical solution, the calculation of the collision risk value by combining the vehicle's driving data with the curvature characteristics of the target trajectory includes: Dynamic adjustment of the integral step size based on the curvature characteristics of the target trajectory; With the adjusted integral step size, the relative motion parameters of the target vehicle behind are integrated to obtain the collision risk value.
[0008] Based on the above technical solution, the step of integrating the relative motion parameters of the target vehicle behind includes: Calculation of arc length arrival time based on numerical integration using the composite Simpson's rule; Establish a hierarchical response strategy to generate control commands of different levels based on the arrival time of the arc length; The different levels of control commands include triggering in-vehicle alert sounds, flashing warnings on the instrument panel, and actively applying braking force.
[0009] Based on the above technical solution, the method further includes: Identify the current road segment scene based on the curvature features of the target trajectory; If the current road segment is identified as a curve, the collision risk value is calculated using an adaptive calculation step size, which is dynamically adjusted according to the curvature characteristics of the target trajectory. If the current road segment is identified as a straight road, the collision risk value is calculated using a preset fixed calculation step size; At the exit of the curve, the adaptive calculation step size is gradually switched to the preset fixed calculation step size.
[0010] Based on the above technical solution, the method further includes: Record historical data on collision risk values during cornering. The correspondence between the curvature features of the target trajectory and the collision risk calculation step size is optimized based on the historical data. The corresponding relationships include sharp curve levels, medium curve levels, and gentle curve levels; The collision risk calculation step size includes an adaptive calculation step size for curve scenarios and a preset fixed calculation step size for straight road scenarios.
[0011] Secondly, embodiments of this application provide a vehicle collision risk calculation system, including: The data acquisition module is used to acquire driving data of the vehicle itself and target vehicles behind it; The trajectory modeling module is used to perform trajectory modeling based on the driving data of the target vehicle behind, using the constant turning rate and speed model CTRV, and to generate the future trajectory points of the target vehicle behind. The feature extraction module is used to extract the curvature features of the target trajectory by fitting the future trajectory points with a cubic polynomial; The risk management module is used to calculate the collision risk value by combining the vehicle's driving data with the curvature characteristics of the target trajectory, and to generate control commands based on the collision risk value.
[0012] Thirdly, embodiments of this application provide a vehicle collision risk calculation device, which includes a processor, a memory, and a vehicle collision risk calculation program stored in the memory and executable by the processor. When the vehicle collision risk calculation program is executed by the processor, it implements the steps of the vehicle collision risk calculation method as described in the first aspect.
[0013] Fourthly, embodiments of this application provide a computer-readable storage medium storing a vehicle collision risk calculation program, wherein when the vehicle collision risk calculation program is executed by a processor, it implements the steps of the vehicle collision risk calculation method as described in the first aspect.
[0014] Compared with the prior art, the advantages of the present invention are as follows: This invention discloses a vehicle collision risk calculation method, apparatus, device, and storage medium. It acquires driving data of the vehicle itself and a target vehicle behind it, and generates future trajectory points based on a constant turning rate and speed model (CTRV). Specifically, it extracts the target trajectory curvature features by fitting the future trajectory points with a cubic polynomial, achieving refined trajectory representation and curvature quantification for the target's motion state. This method effectively combines the vehicle's driving data with the target trajectory curvature features to calculate the collision risk value, preventing trajectory distortion and collision time estimation errors caused by traditional straight-line model assumptions. It solves the problem that existing rear-end collision warning systems cannot accurately assess collision risks in curved scenarios due to the lack of explicit extraction and utilization of trajectory curvature features, significantly improving the accuracy of collision risk determination and the reliability of active safety control command generation under complex road geometry conditions. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0016] Figure 1This is a flowchart illustrating an embodiment of a vehicle collision risk calculation method, apparatus, device, and storage medium of the present invention. Figure 2 This is a schematic diagram of the hardware structure in an embodiment of a vehicle collision risk calculation method, apparatus, device, and storage medium of the present invention. Detailed Implementation
[0017] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0018] First, some of the technical terms used in this application will be explained to help those skilled in the art understand this application.
[0019] CTRV model: Constant Turn Rate and Velocity model, a vehicle kinematics prediction model that assumes the target maintains a constant speed and turning angular velocity over a short period of time. It is suitable for describing the straight-line or circular turning motion of a vehicle and is the core algorithmic basis for generating future trajectory points in this scheme.
[0020] Adaptive step size: A numerical integration strategy that dynamically adjusts the minimum unit of the integration interval based on the rate of change of the integrand (such as the curvature of the trajectory); it uses a small step size in regions of rapid change to ensure accuracy, and a large step size in regions of smooth change to improve efficiency, thus balancing computational accuracy and computational power consumption.
[0021] Composite Simpson's rule: A numerical integration method that divides the integration interval into an even number of subintervals and approximates the integrand using a quadratic polynomial. Compared with the trapezoidal rule, it has higher algebraic accuracy and is used in this scheme to accurately calculate the arc length of the curve trajectory.
[0022] Trajectory curvature characteristics: Geometric quantities describing the curvature of the target motion trajectory, including curvature value, radius of curvature, and rate of change of curvature; used to quantify the geometric attributes of road scenes (such as sharp curves, gentle curves, and straight roads), and are the basis for adjusting the integral step size in this scheme.
[0023] TTC: Time To Collision, refers to the time required for a target object to travel at its current speed to collide with the vehicle. In this scheme, it is derived from the precisely calculated arc length of a curve rather than the straight-line distance, and is used to assess the rear collision risk level.
[0024] Yaw rate: The angular velocity of a vehicle rotating around its vertical axis, reflecting the vehicle's steering rate; in this scheme, it is used as a threshold for distinguishing between linear and circular motion modes in the CTRV model. Vehicle collision risk calculation needs to cover various scenarios, including straight-ahead and curved roads, and achieve rear-end collision warning based on target trajectory prediction and collision time estimation. Traditional methods rely on linear motion model assumptions and Euclidean distance calculations, employing a fixed-step numerical integration strategy. This approach suffers from problems such as trajectory prediction distortion leading to underestimation of time-to-collision (TTC) in curved scenarios, difficulty in balancing calculation accuracy at sharp curves with efficiency on straight roads with a fixed step size, and a lack of adaptive judgment mechanisms based on trajectory geometric features. Therefore, this application proposes a vehicle collision risk calculation method, apparatus, device, and storage medium.
[0025] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0026] In a first aspect, embodiments of this application provide a method for calculating vehicle collision risk.
[0027] In one embodiment, reference is made to Figure 1 , Figure 1 This is a flowchart illustrating the vehicle collision risk calculation method used in this application. Figure 1 As shown, a method for calculating vehicle collision risk includes: S1. Obtain driving data of this vehicle and the target vehicle behind it; S2. Based on the driving data of the target vehicle behind, perform trajectory modeling based on the constant turning rate and speed model CTRV to generate the future trajectory points of the target vehicle behind. S3. Extract the curvature features of the target trajectory by fitting future trajectory points using a cubic polynomial; S4. Calculate the collision risk value by combining the vehicle's driving data with the curvature characteristics of the target trajectory, and generate control commands based on the collision risk value.
[0028] In this embodiment, by acquiring the driving data of the vehicle itself and the target vehicle behind it, and performing trajectory modeling based on the CTRV model, the problem of the traditional straight-line model failing in curved scenarios is solved. Curvature features are extracted through cubic polynomial fitting, achieving a refined representation of the target's motion state. The collision risk value is calculated by combining the curvature features, avoiding false alarms or missed alarms caused by trajectory estimation errors. The core of this method lies in incorporating the target's curvilinear motion characteristics into the risk calculation system, ensuring the accuracy of collision time (TTC) estimation in curved scenarios. If sensor data is temporarily lost, interpolation compensation can be performed using data from the previous cycle to ensure process continuity.
[0029] Furthermore, in one embodiment, acquiring driving data of the vehicle and a target vehicle behind it includes: collecting state information of the target behind it using at least one sensor selected from millimeter-wave radar, camera, or lidar; the state information includes position, speed, heading angle, and yaw rate; wherein, millimeter-wave radar is suitable for all-weather detection of target distance and speed, camera is suitable for identifying target type and heading angle, and lidar is suitable for high-precision contour detection; multi-sensor fusion can improve the robustness of data acquisition, and if a single sensor is affected by environmental interference, it can switch to data from other sensors or fused data.
[0030] In this embodiment, driving data is collected using multiple sensors, addressing the performance degradation of a single sensor under adverse weather or lighting conditions. Millimeter-wave radar offers strong penetration, while cameras provide rich semantic information; their fusion complements each other's strengths and weaknesses. This approach ensures the accuracy of the input data, providing a reliable foundation for subsequent trajectory modeling. For vehicles with lower configurations, only millimeter-wave radar can be used, with algorithms compensating for heading angle information to suit the needs of different cost models.
[0031] Furthermore, in one embodiment, the method further includes: Identify the current road segment scene based on the curvature features of the target trajectory; If the current road segment is identified as a curve, an adaptive calculation step size is used to calculate the collision risk value. The adaptive calculation step size is dynamically adjusted according to the curvature characteristics of the target trajectory. If the current road segment is identified as a straight road, the collision risk value is calculated using a preset fixed calculation step size; At the exit of the curve, the adaptive calculation step size is gradually switched to the preset fixed calculation step size.
[0032] In this embodiment, by switching the calculation mode through scene recognition, the unnecessary computational overhead that might arise from uniformly using an adaptive step size across all scenes is resolved. A fixed step size maximizes efficiency on straight sections, while an adaptive step size maximizes accuracy on curved sections. This approach achieves a dynamic balance between efficiency and accuracy. If there are ambiguities in scene recognition, a smooth transition function can be used to gradually adjust the step size to ensure system stability.
[0033] Furthermore, in one embodiment, the method further includes: Record historical data on collision risk values during cornering. Optimize the correspondence between the curvature characteristics of the target trajectory and the step size for calculating collision risk based on historical data; The corresponding relationships include sharp curve levels, medium curve levels, and gentle curve levels; The collision risk calculation step size includes an adaptive calculation step size for curve scenarios and a preset fixed calculation step size for straight road scenarios.
[0034] In this embodiment, parameters are optimized using historical data, solving the problem that fixed thresholds cannot adapt to all vehicles or driving habits. The system has self-learning capabilities, continuously improving its judgment accuracy over time. This approach extends the system's lifespan and applicability. If data privacy is restricted, parameters can be updated locally without uploading to the cloud, ensuring user data security.
[0035] Furthermore, in one embodiment, trajectory modeling based on the constant turning rate and speed model CTRV includes: Construct a state vector containing position, velocity, heading angle, and angular velocity; The state vector is updated using driving data to predict the future trajectory points of the target vehicle behind.
[0036] In this embodiment, the CTRV model distinguishes between linear and circular motion, solving the trajectory distortion problem caused by the traditional method's assumption that the target always moves in a straight line. The introduction of yaw rate ω as a criterion enables adaptive identification of the target's steering intention. This approach conforms to vehicle kinematics principles and significantly improves the prediction accuracy of future trajectory points. If the target is in a complex lane-changing process, the CV (constant velocity) or CA (constant acceleration) model can be switched as an alternative to increase the model's adaptability.
[0037] Furthermore, in one embodiment, the curvature features of the target trajectory are extracted by fitting future trajectory points using a cubic polynomial, including: The predicted future trajectory points are fitted to a cubic polynomial curve; specifically, the least squares method is used for fitting to minimize the sum of squared errors between the predicted trajectory points and the fitted curve. This method effectively smooths trajectory jitter caused by sensor noise, ensuring that the extracted curvature features truly reflect the target's motion trend, providing a reliable basis for subsequent step size adjustments. The curvature values of the cubic polynomial curve at each trajectory point are calculated as the target trajectory curvature features.
[0038] In this embodiment, cubic polynomial fitting solves the problem of curvature calculation difficulties caused by the discontinuity of discrete trajectory points; the least squares method effectively filters out high-frequency noise and avoids abrupt changes in curvature characteristics. This method ensures the stability of the subsequent step size adjustment basis. If the trajectory points are sparse, spline interpolation can also be used for smoothing to adapt to sensor data with different sampling frequencies.
[0039] Furthermore, in one embodiment, calculating the collision risk value by combining the vehicle's driving data with the curvature characteristics of the target trajectory includes: Dynamic adjustment of the integral step size based on the curvature characteristics of the target trajectory; With the adjusted integral step size, the relative motion parameters of the target vehicle behind are integrated to obtain the collision risk value.
[0040] Specifically, the collision risk value is calculated based on the spatial relationship between the target vehicle's future trajectory and the pre-defined rear collision area of the vehicle. The pre-defined rear collision area is a rectangular or polygonal area centered on the rear bumper of the vehicle, extending rearward by a pre-defined distance (e.g., 3 meters) and laterally by a pre-defined width (e.g., the width of the vehicle plus a safety margin). When the target vehicle's arc length trajectory, calculated based on the adaptive step size, enters this area and the TTC (Tracking Tolerance) is less than the threshold, a collision risk is determined to exist.
[0041] In this embodiment, by dynamically adjusting the integration step size based on curvature, the problems of insufficient accuracy at sharp curves and wasted computing power at straight sections are solved. Refining the step size at sharp curves ensures the accuracy of arc length calculation, while coarsening the step size at gentle curves improves the system's real-time performance. This method achieves optimal allocation of computing resources. For more complex scenarios, the number of step size levels can be increased to achieve finer resource control.
[0042] Furthermore, in one embodiment, the relative motion parameters of the rear target vehicle are integrated and calculated, including: Calculation of arc length arrival time based on numerical integration using the composite Simpson's rule; Establish a hierarchical response strategy to generate control commands of different levels based on the arc length arrival time; Different levels of control commands include triggering in-vehicle alert sounds, flashing warnings on the instrument panel, and actively applying braking force.
[0043] In this embodiment, the arc length is calculated using the composite Simpson's rule, solving the problem of low accuracy in traditional trapezoidal integrals. Combined with an adaptive step size, the arc length estimation error during sharp turns is further reduced. This method ensures the accuracy and reliability of the mathematical foundation for collision time calculation. If the processor has extremely high computing power, other high-precision quadrature methods can also be used to further pursue ultimate accuracy.
[0044] Furthermore, in one embodiment, the process of curve modeling and path curvature calculation for the target trajectory is as follows: 101. Curve modeling of the target trajectory.
[0045] The sensors acquire the status information of the target behind: position (x0, y0), velocity v, heading angle ψ, and yaw rate ω.
[0046] The CTRV (Constant Turn Rate and Velocity) model is used to predict the trajectory of the target in time interval t[0,T]. When |ω|< When (linear motion), the formula 1 for linear motion in the CTRV model is: ; ; in, , Represents: the predicted position coordinates of the target at time t; , Indicates: the initial position coordinates of the target; Indicates: the target's speed; Indicates: the target's heading angle; Indicates: Prediction time, range ∈[0,T]; cos,sin represent the trigonometric functions cosine and sine.
[0047] When |ω|≥ When (circular motion), the formula 2 for the CTRV model - circular motion is: ; ; Where ω represents the target's yaw rate; The minimum threshold value is used to determine whether the motion is a straight line or a curve. The other symbols have the same meaning as those in the linear motion formula.
[0048] The discrete trajectory points are fitted to a cubic polynomial curve using the least squares method. Formula 3 for fitting the cubic polynomial curve is as follows: ; Where y(x) represents the ordinate of the fitted curve when the x-coordinate is x; , , , denoted as: the polynomial coefficients obtained by least squares fitting; x represents: the x-coordinate of the trajectory point.
[0049] 102. Path curvature calculation.
[0050] Based on the cubic polynomial curve y(x) mentioned above, its first derivative is given by formula 4: ; in, It represents the first derivative of y(x) with respect to x.
[0051] Formula 5 for the second derivative is: ; in, Let y(x) represent the second derivative of y(x) with respect to x.
[0052] Formula 6 for calculating the curvature of the path at point x is: ; Used to describe the degree of curvature of a curve at a certain point.
[0053] Formula 7 for the radius of curvature R(x) is: ; The curvature integral represents the cumulative curvature of the entire path and is used for overall feature evaluation. Formula 8 for the curvature integral is: ; in, This represents the integral value of the total curvature. , The x-coordinates represent the start and end points of the integration interval.
[0054] The curvature features output in this embodiment will serve as the basis for subsequent adaptive step size control. This embodiment solves the problems of being unable to quantify the degree of trajectory curvature and the discontinuity of discrete points through detailed modeling and curvature calculation formulas; it provides multi-dimensional feature information such as the radius of curvature and the integral of curvature, providing a precise basis for subsequent adaptive step size. This method transforms geometric features into calculable numerical values, realizing the mapping between the mathematical model and the physical scene. If computational resources are limited, the finite difference method can also be used to approximate the curvature, sacrificing a small amount of accuracy for increased computational speed.
[0055] Furthermore, in one embodiment, the specific calculation process for adaptive step size control is as follows: 201. Curvature Feature Extraction: Within the integration interval [a, b], calculate the maximum, minimum, and average values of curvature. Formula 9 for the statistical features of curvature is: ; in, Indicates the maximum curvature within the interval; [a,b] represents the average curvature within the interval; [a,b] represents the current integration interval.
[0056] Formula 10, which defines the rate of change of curvature, is as follows: ; This is used to identify regions where curvature changes rapidly. Here, dk represents the minute change in curvature, that is, how much the curvature of the trajectory changes when the target vehicle moves a small distance along the track. dx represents the minute change in position, that is, the minute distance the target vehicle moves along the track.
[0057] 202. An adaptive step-size generation strategy divides the integration interval [a, b] into N sub-intervals, with the step size Δ for each sub-interval being... Based on the curvature characteristics of this interval, Formula 11 of the piecewise step size strategy is: ; in, Indicates the first The sampling step size of each sub-interval; Indicates the first The radius of curvature at each point; < For a preset radius of curvature threshold (e.g.) =5m, =10m), < < For the corresponding sampling step size, the above Δ The step size classification can be increased in number as needed.
[0058] 203. Curve length calculation: Based on adaptive step size control, the arc length is calculated numerically for each sub-interval using the composite Simpson's rule.
[0059] The integral formula for arc length, 12, is: ; in .
[0060] Dividing the above integration interval into n equal subintervals (n = step, which must be an even number), Formula 13 of the composite Simpson's rule is as follows: ; in The above adaptive step size is mapped to the value of n in each sub-interval, realizing fine integration in the high curvature region and coarse integration in the low curvature region. The key parameter mapping and sub-interval number mapping formula 14 is as follows: ; in and The minimum / maximum number of subintervals is preset for the system, used to balance accuracy and computational examples. Indicates the first The number of subintervals in a given region. Indicates the first The length of each region.
[0061] In this embodiment, curvature-based adaptive step size control enables a reasonable allocation of computing resources, resolving the contradiction between accuracy and efficiency in fixed-step numerical integration. Compared to fixed-step integration, this invention effectively reduces computational load and improves computational accuracy at sharp curves, meeting the real-time computational requirements for active safety in vehicle-mounted embedded systems with limited computing power. It avoids missed detections caused by large arc length calculation deviations due to excessively coarse step sizes, as well as wasted computing power due to excessively fine step sizes.
[0062] Furthermore, in one embodiment, the specific process for determining collision risk based on precise arc length is as follows: 301. Precise collision time calculation: Calculate the collision event based on kinematic equation 15. ; in The arc length is obtained from the precise calculation above. The combined lateral and longitudinal velocity of the target. This refers to Time To Collision; Larc represents the arc length calculated precisely using Simpson's Law. Collision time calculated based on the actual path length is more accurate than that calculated using straight-line distance.
[0063] 302. Graded Risk Assessment: This invention achieves a tiered response to rear-collision risk by setting a first threshold and a second threshold. When the time to collision (TTC) is less than the first threshold, an in-vehicle warning sound and a flashing warning on the instrument panel are triggered; when the TTC is less than the second threshold, braking force is actively applied. This graded strategy avoids false triggering due to premature intervention while ensuring timely response in emergency situations. In this embodiment, precise arc length calculation reduces the TTC estimation error of the target during sharp turns, effectively lowering the probability of false alarms or missed alarms. This method overcomes the limitations of binary judgment in traditional schemes, achieving continuous risk assessment based on the actual path length. The hierarchical strategy avoids false triggering caused by premature intervention while ensuring timely response in emergency situations, improving the driving experience and system reliability.
[0064] Secondly, embodiments of this application provide a vehicle collision risk calculation system, including: The data acquisition module is used to acquire driving data of the vehicle itself and target vehicles behind it; The trajectory modeling module is used to perform trajectory modeling based on the driving data of the target vehicle behind, using the constant turning rate and speed model CTRV, and to generate the future trajectory points of the target vehicle behind. The feature extraction module is used to extract the curvature features of the target trajectory by fitting future trajectory points with a cubic polynomial. The risk management module is used to calculate the collision risk value by combining the vehicle's driving data with the curvature characteristics of the target trajectory, and to generate control commands based on the collision risk value.
[0065] In this embodiment, the systematic implementation of vehicle collision risk calculation is achieved through the collaborative work of the data acquisition module, trajectory modeling module, feature extraction module, and risk control module. This system solves the problem of lacking hardware support for method implementation, and its modular design clarifies the responsibilities of each functional unit, ensuring the streamlined execution of data collection, modeling, extraction, and control. If the system is deployed in the cloud, the modules can also operate in a distributed manner, as long as the communication latency meets real-time requirements.
[0066] Furthermore, in one embodiment, the data acquisition module is specifically used to: collect the state information of the target behind by at least one of millimeter-wave radar, camera, or lidar; the state information includes position, velocity, heading angle, and yaw rate; wherein, millimeter-wave radar is suitable for all-weather detection of target distance and velocity, camera is suitable for identifying target type and heading angle, and lidar is suitable for high-precision contour detection; multi-sensor fusion can improve the robustness of data acquisition, and if a single sensor is affected by environmental interference, it can switch to other sensor data or fused data.
[0067] In this embodiment, multiple sensors are configured through the data acquisition module, solving the problem of performance degradation of a single sensor under adverse weather or lighting conditions. The module supports sensor switching and fusion, ensuring the accuracy of the input data. This approach provides a reliable foundation for subsequent trajectory modeling. If the vehicle configuration is low, the module can also be configured to receive only millimeter-wave radar data and compensate for the heading angle information through internal algorithms to adapt to the needs of different cost models.
[0068] Furthermore, in one embodiment, the risk management module is also used to: identify the current road segment scenario based on the curvature features of the target trajectory; if the current road segment is identified as a curve scenario, then an adaptive calculation step size is used to calculate the collision risk value; if the current road segment is identified as a straight road scenario, then a preset fixed calculation step size is used to calculate the collision risk value; at the curve exit, the adaptive calculation step size is gradually switched to the preset fixed calculation step size to avoid calculation jitter caused by sudden changes in step size.
[0069] In this embodiment, scene recognition switching is performed through a risk management module, which solves the problem of unnecessary computational overhead that may result from uniformly adopting an adaptive step size across all scenes. The module maximizes efficiency on straightaways and maximizes accuracy on curves, dynamically balancing efficiency and accuracy. If there are ambiguities in scene recognition, the module can also use a smooth transition function to gradually adjust the step size to ensure the stability of the system state.
[0070] Furthermore, in one embodiment, the risk management module is also used to: record historical data of collision risk values during cornering; optimize the correspondence between the curvature features of the target trajectory and the collision risk calculation step size based on the historical data; the correspondence includes sharp corner level, medium corner level and gentle corner level; wherein the collision risk calculation step size includes an adaptive calculation step size in the cornering scenario and a preset fixed calculation step size in the straight road scenario.
[0071] In this embodiment, the risk management module records and optimizes historical data, solving the problem that fixed thresholds cannot adapt to all vehicles or driving habits. The module has self-learning capabilities, continuously improving its accuracy over time. This approach extends the system's lifespan and applicability. If data privacy is restricted, the module can also update parameters locally without uploading to the cloud, ensuring user data security.
[0072] Furthermore, in one embodiment, the trajectory modeling module is specifically used to: construct a state vector containing position, velocity, heading angle, and angular velocity; update the state vector using driving data to predict the future trajectory points of the target vehicle behind; distinguish between linear motion and circular motion modes, wherein the yaw rate is used to determine whether it is a straight line or a turn; if the target is in a complex lane change process, it can also switch to a constant speed model or a constant acceleration model as an alternative.
[0073] In this embodiment, the trajectory modeling module incorporates a CTRV model, solving the trajectory distortion problem caused by the traditional method's assumption that the target always moves in a straight line. The module can adaptively identify the target's steering intention, conforming to vehicle kinematics principles. This approach significantly improves the prediction accuracy of future trajectory points. If the target is in a complex lane-changing process, the module can also switch to other motion models as alternatives to increase the model's adaptability.
[0074] Furthermore, in one embodiment, the feature extraction module is specifically used to: fit the predicted future trajectory points into a cubic polynomial curve; specifically, the least squares method is used for fitting to minimize the sum of squared errors between the predicted trajectory points and the fitted curve; this method can effectively smooth the trajectory jitter caused by sensor noise and ensure that the extracted curvature features truly reflect the target's motion trend; if the noise is large, a weighted least squares method can also be used to give higher weights to recent data points to improve the real-time performance of the fitting.
[0075] In this embodiment, a feature extraction module performs polynomial fitting, solving the problem of curvature calculation difficulties caused by the discontinuity of discrete trajectory points. The module incorporates a least squares algorithm, which effectively filters out high-frequency noise. This approach ensures the stability of the subsequent step size adjustment basis. If the trajectory points are sparse, the module can also use spline interpolation for smoothing to adapt to sensor data with different sampling frequencies.
[0076] Furthermore, in one embodiment, the risk management module is specifically used to: dynamically adjust the integration step size based on the path curvature characteristics of the target trajectory; the specific strategy is: divide the integration interval into N sub-intervals, and the step size of each sub-interval is determined by the curvature radius of that interval; when the curvature radius is less than a first threshold, the minimum step size is used, and when the curvature radius is greater than a second threshold, the maximum step size is used; if the scenario is complex, the number of step size levels can also be increased to achieve more refined resource control.
[0077] In this embodiment, the risk management module dynamically adjusts the integration step size, solving the problems of insufficient accuracy at sharp curves and wasted computing power at straight sections when the step size is fixed. The module refines the step size at sharp curves and coarseens it at gentle curves, optimally allocating computing resources. This method achieves optimal allocation of computing resources. If the scenario is complex, the module can also increase the number of step size levels to achieve more refined resource control.
[0078] Furthermore, in one embodiment, the risk management module is also used to: calculate the arc length numerically for each sub-interval using the composite Simpson's rule under the adjusted integration step size; map the adaptive step size to the number of sub-intervals in each sub-interval to achieve fine integration in high curvature regions and coarse integration in low curvature regions; the key parameter mapping is used to balance accuracy and computing power, and if the processor computing power is extremely strong, the Gauss-Cronrod quadrature method can also be used.
[0079] In this embodiment, the risk management module employs a compound Simpson's law to address the low accuracy issue of traditional trapezoidal integrals. Furthermore, the module combines adaptive step size to further reduce the arc length estimation error of the target during sharp turns. This approach ensures the accuracy and reliability of the mathematical foundation for collision time calculation. If the processor has extremely high computing power, the module can also employ other high-precision quadrature methods to further pursue ultimate accuracy.
[0080] Furthermore, in one embodiment, the trajectory modeling module and the feature extraction module are also used to perform curve modeling and path curvature calculation processes for the target trajectory: 101. Curve modeling of the target trajectory.
[0081] The sensors acquire the status information of the target behind: position (x0, y0), velocity v, heading angle ψ, and yaw rate ω.
[0082] The CTRV (Constant Turn Rate and Velocity) model is used to predict the trajectory of the target in time interval t[0,T]. When |ω|< When (linear motion), the formula 1 for linear motion in the CTRV model is: ; ; in, , Represents: the predicted position coordinates of the target at time t; , Indicates: the initial position coordinates of the target; Indicates: the target's speed; Indicates: the target's heading angle; Indicates: Prediction time, range ∈[0,T]; cos,sin represent the trigonometric functions cosine and sine.
[0083] When |ω|≥ When (circular motion), the formula 2 for the CTRV model - circular motion is: ; ; Where ω represents the target's yaw rate; The minimum threshold value is used to determine whether the motion is a straight line or a curve. The other symbols have the same meaning as those in the linear motion formula.
[0084] The discrete trajectory points are fitted to a cubic polynomial curve using the least squares method. Formula 3 for fitting the cubic polynomial curve is as follows: ; Where y(x) represents the ordinate of the fitted curve when the x-coordinate is x; , , , denoted as: the polynomial coefficients obtained by least squares fitting; x represents: the x-coordinate of the trajectory point.
[0085] 102. Path curvature calculation.
[0086] Based on the cubic polynomial curve y(x) mentioned above, its first derivative is given by formula 4: ; in, It represents the first derivative of y(x) with respect to x.
[0087] Formula 5 for the second derivative is: ; in, Let y(x) represent the second derivative of y(x) with respect to x.
[0088] Formula 6 for calculating the curvature of the path at point x is: ; Used to describe the degree of curvature of a curve at a certain point.
[0089] Formula 7 for the radius of curvature R(x) is: ; The curvature integral represents the cumulative curvature of the entire path and is used for overall feature evaluation. Formula 8 for the curvature integral is: ; in, This represents the integral value of the total curvature. , The x-coordinates represent the start and end points of the integration interval.
[0090] The curvature features output in this embodiment will serve as the basis for subsequent adaptive step size control. In this embodiment, detailed modeling and curvature calculation are performed through the trajectory modeling module and feature extraction module, solving the problems of the inability to quantify the degree of trajectory curvature and the discontinuity of discrete points. The module provides multi-dimensional feature information such as the radius of curvature and the integral of curvature, providing a precise basis for subsequent adaptive step size. This method transforms geometric features into calculable values, realizing the mapping between the mathematical model and the physical scene. If computational resources are limited, the module can also use the finite difference method to approximate the curvature, sacrificing a small amount of accuracy for increased computational speed.
[0091] Furthermore, in one embodiment, the risk management module is also used to perform the specific calculation process for adaptive step size control: 201. Curvature Feature Extraction: Within the integration interval [a, b], calculate the maximum, minimum, and average values of curvature. Formula 9 for the statistical features of curvature is: ; in, Indicates the maximum curvature within the interval; [a,b] represents the average curvature within the interval; [a,b] represents the current integration interval.
[0092] Formula 10, which defines the rate of change of curvature, is as follows: ; This is used to identify regions where curvature changes rapidly. Here, dk represents the minute change in curvature, that is, how much the curvature of the trajectory changes when the target vehicle moves a small distance along the track. dx represents the minute change in position, that is, the minute distance the target vehicle moves along the track.
[0093] 202. An adaptive step-size generation strategy divides the integration interval [a, b] into N sub-intervals, with the step size Δ for each sub-interval being... Based on the curvature characteristics of this interval, Formula 11 of the piecewise step size strategy is: ; in, Indicates the first The sampling step size of each sub-interval; Indicates the first The radius of curvature at each point; < For a preset radius of curvature threshold (e.g.) =5m, =10m), < < For the corresponding sampling step size, the above Δ The step size classification can be increased in number as needed.
[0094] 203. Curve length calculation: Based on adaptive step size control, the arc length is calculated numerically for each sub-interval using the composite Simpson's rule.
[0095] The integral formula for arc length, 12, is: ; in .
[0096] Dividing the above integration interval into n equal subintervals (n = step, which must be an even number), Formula 13 of the composite Simpson's rule is as follows: ; in The above adaptive step size is mapped to the value of n in each sub-interval, realizing fine integration in the high curvature region and coarse integration in the low curvature region. The key parameter mapping and sub-interval number mapping formula 14 is as follows: ; in and The minimum / maximum number of subintervals is preset for the system, used to balance accuracy and computational examples. Indicates the first The number of subintervals in a given region. Indicates the first The length of each region.
[0097] In this embodiment, curvature-based adaptive step size control enables a reasonable allocation of computing resources, resolving the contradiction between accuracy and efficiency in fixed-step numerical integration. Compared to fixed-step integration, this invention effectively reduces computational load and improves computational accuracy at sharp curves, meeting the real-time computational requirements for active safety in vehicle-mounted embedded systems with limited computing power. It avoids missed detections caused by large arc length calculation deviations due to excessively coarse step sizes, as well as wasted computing power due to excessively fine step sizes.
[0098] Furthermore, in one embodiment, the risk management module is also used to perform a collision risk assessment process based on precise arc length: 301. Precise collision time calculation: Calculate the collision event based on kinematic equation 15. ; in The arc length is obtained from the precise calculation above. The combined lateral and longitudinal velocity of the target. This refers to Time To Collision; Larc represents the arc length calculated precisely using Simpson's Law. Collision time calculated based on the actual path length is more accurate than that calculated using straight-line distance.
[0099] 302. Graded Risk Assessment: This invention achieves a tiered response to rear-collision risk by setting a first threshold and a second threshold. When the time to collision (TTC) is less than the first threshold, an in-vehicle warning sound and a flashing warning on the instrument panel are triggered; when the TTC is less than the second threshold, braking force is actively applied. This graded strategy avoids false triggering due to premature intervention while ensuring timely response in emergency situations. In this embodiment, the risk management module performs precise collision risk assessment, solving the problem of false alarms caused by underestimating collision time due to straight-line distance estimation. The module also reduces estimation errors for targets during sharp turns through precise arc length calculation. This module supports continuous risk assessment rather than simple binary judgment, effectively reducing the probability of false alarms or missed alarms. The tiered strategy avoids premature intervention leading to false triggers while ensuring timely response in emergency situations, improving the driving experience and system reliability.
[0100] The functions of each module in the above-mentioned vehicle collision risk calculation system correspond to the steps in the above-mentioned vehicle collision risk calculation method embodiment, and their functions and implementation processes will not be described in detail here.
[0101] Thirdly, embodiments of this application provide a vehicle collision risk calculation device, which can be a personal computer (PC), laptop computer, server, or other device with data processing capabilities.
[0102] Reference Figure 2 , Figure 2 This is a schematic diagram of the hardware structure of the vehicle collision risk calculation device involved in the embodiments of this application. In the embodiments of this application, the vehicle collision risk calculation device may include a processor, a memory, a communication interface, and a communication bus.
[0103] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.
[0104] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces used for interconnecting components within the vehicle collision risk calculation device, as well as interfaces used for interconnecting the vehicle collision risk calculation device with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.
[0105] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0106] The processor can be a general-purpose processor, which can call the vehicle collision risk calculation program stored in the memory and execute the vehicle collision risk calculation method provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the vehicle collision risk calculation program is called can refer to the various embodiments of the vehicle collision risk calculation method of this application, and will not be repeated here.
[0107] Those skilled in the art will understand that Figure 2 The hardware structure shown does not constitute a limitation of this application and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0108] Fourthly, embodiments of this application also provide a computer-readable storage medium.
[0109] The present application provides a computer-readable storage medium storing a vehicle collision risk calculation program, wherein when the vehicle collision risk calculation program is executed by a processor, it implements the steps of the vehicle collision risk calculation method described above.
[0110] The method implemented when the vehicle collision risk calculation program is executed can be referred to in various embodiments of the vehicle collision risk calculation method of this application, and will not be repeated here.
[0111] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0112] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or devices. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.
[0113] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.
[0114] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0115] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.
[0116] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.
[0117] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for calculating vehicle collision risk, characterized in that, include: Obtain driving data for this vehicle and target vehicles behind it; Based on the driving data of the target vehicle behind, trajectory modeling is performed using the constant turning rate and speed model CTRV to generate the future trajectory points of the target vehicle behind. The curvature features of the target trajectory are extracted by fitting the future trajectory points with a cubic polynomial. The collision risk value is calculated by combining the vehicle's driving data with the curvature characteristics of the target trajectory, and control commands are generated based on the collision risk value.
2. The vehicle collision risk calculation method as described in claim 1, characterized in that, The trajectory modeling based on the constant turning rate and speed model CTRV includes: Construct a state vector containing position, velocity, heading angle, and angular velocity; The state vector is updated using the driving data to predict the future trajectory points of the target vehicle behind.
3. The vehicle collision risk calculation method as described in claim 1, characterized in that, The step of fitting the future trajectory points with a cubic polynomial to extract the curvature features of the target trajectory includes: Fit the predicted future trajectory points to a cubic polynomial curve; The curvature value of the cubic polynomial curve at each trajectory point is calculated and used as the curvature feature of the target trajectory.
4. The vehicle collision risk calculation method as described in claim 1, characterized in that, The calculation of the collision risk value by combining the vehicle's driving data with the curvature characteristics of the target trajectory includes: Dynamic adjustment of the integral step size based on the curvature characteristics of the target trajectory; With the adjusted integral step size, the relative motion parameters of the target vehicle behind are integrated to obtain the collision risk value.
5. The vehicle collision risk calculation method as described in claim 4, characterized in that, The integral calculation of the relative motion parameters of the target vehicle behind includes: Calculation of arc length arrival time based on numerical integration using the composite Simpson's rule; Establish a hierarchical response strategy to generate control commands of different levels based on the arrival time of the arc length; The different levels of control commands include triggering in-vehicle alert sounds, flashing warnings on the instrument panel, and actively applying braking force.
6. The vehicle collision risk calculation method as described in claim 4, characterized in that, The method further includes: Identify the current road segment scene based on the curvature features of the target trajectory; If the current road segment is identified as a curve, the collision risk value is calculated using an adaptive calculation step size, which is dynamically adjusted according to the curvature characteristics of the target trajectory. If the current road segment is identified as a straight road, the collision risk value is calculated using a preset fixed calculation step size; At the exit of the curve, the adaptive calculation step size is gradually switched to the preset fixed calculation step size.
7. The vehicle collision risk calculation method as described in claim 1, characterized in that, The method further includes: Record historical data on collision risk values during cornering. The correspondence between the curvature features of the target trajectory and the collision risk calculation step size is optimized based on the historical data. The corresponding relationships include sharp curve levels, medium curve levels, and gentle curve levels; The collision risk calculation step size includes an adaptive calculation step size for curve scenarios and a preset fixed calculation step size for straight road scenarios.
8. A vehicle collision risk calculation system, characterized in that, include: The data acquisition module is used to acquire driving data of the vehicle itself and target vehicles behind it; The trajectory modeling module is used to perform trajectory modeling based on the driving data of the target vehicle behind, using the constant turning rate and speed model CTRV, and to generate the future trajectory points of the target vehicle behind. The feature extraction module is used to extract the curvature features of the target trajectory by fitting the future trajectory points with a cubic polynomial; The risk management module is used to calculate the collision risk value by combining the vehicle's driving data with the curvature characteristics of the target trajectory, and to generate control commands based on the collision risk value.
9. A vehicle collision risk calculation device, characterized in that, The vehicle collision risk calculation device includes a processor, a memory, and a vehicle collision risk calculation program stored in the memory and executable by the processor, wherein when the vehicle collision risk calculation program is executed by the processor, it implements the steps of the vehicle collision risk calculation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a vehicle collision risk calculation program, wherein when the vehicle collision risk calculation program is executed by a processor, it implements the steps of the vehicle collision risk calculation method as described in any one of claims 1 to 7.