A freeway weaving area accident risk early warning method based on large model inference and trajectory precursor
Patent Information
- Application Number
- CN202610792528.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-03
- Publication Date
- 2026-10-30
AI Technical Summary
同时,本发明进一步面向高速公路路侧实时应用场景,将事故风险识别模型部署于计算平台,以实现交织区事故风险的在线识别、实时预警和主动管控,解决解决现有交织区事故风险识别过度依赖单一替代安全指标、难以刻画事故前动态演化过程、难以区分追尾事故与换道事故机理差异的问题
[0067]有益效果:与现有技术相比,本发明具有如下显著优点:通过融合基础风险特征、换道行为特征、大模型推理前兆和二维合成前兆等多层次特征,克服了传统单一替代安全指标难以刻画事故前动态演化过程的缺陷,显著提升了对交织区事故风险的识别精度。采用非事故、追尾事故、换道事故三分类输出,能够有效区分纵向跟驰冲突主导的追尾事故与横向换道冲突主导的换道事故,便于针对不同事故机理采取差异化预警和管控措施。大模型仅用于从交通安全文献和事故机理中归纳生成可解释的自然语言前兆规则,并将其转化为可计算的轨迹特征,而非直接作为事故判别器。这使得前兆变量具有明确的物理含义,便于工程人员理解和部署。构建了从微观车辆行为、时空交互到宏观交通流状态的三类推理前兆,并结合二维相对运动的合成指标,能够完整反映事故前由正常扰动向高风险失稳演化的全过程。将事故风险识别模型部署于高速公路路侧计算平台,与视频、雷达或车路协同感知设备连接,实现低时延的轨迹前兆计算、风险类别判别和分级预警输出,并可联动可变限速、车道诱导、匝道控制等主动安全管控设备。
Smart Images

Figure CN123016715A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of highway safety early warning technology, specifically to a method for early warning of accident risks in highway weaving areas based on large model inference and trajectory precursors. Background Technology
[0002] Highway weaving zones consist of vehicles traveling straight on the main line, merging vehicles, and merging vehicles. Within a limited space, vehicles simultaneously engage in merging, merging, continuous lane changes, following vehicle deceleration, and the propagation of speed disturbances. Compared to basic road sections, the accident risk in weaving zones is no longer solely manifested as longitudinal following vehicle conflicts, but rather as the combined result of longitudinal speed differences, lateral lane-changing conflicts, insufficient target lane clearance, and local traffic flow disturbances. Actual accident types include rear-end collisions caused by the propagation of traffic shocks, deceleration of the preceding vehicle, and delayed reaction of the following vehicle, as well as lane-changing accidents caused by forced lane changes, insufficient lateral clearance, and insufficient reaction time of vehicles in the target lane.
[0003] Existing safety assessment studies of weaving zones typically use traditional alternative safety indicators such as TTC, THW, PET, and DRAC to characterize the severity of traffic conflicts. While these indicators have clear physical meaning, they still have the following shortcomings: First, a single alternative safety indicator usually only describes the severity of the conflict at a certain moment, making it difficult to depict the evolutionary chain of risk from disturbance, accumulation, abrupt change, to instability in the seconds to minutes before an accident occurs. Second, traditional vehicle indicators often focus on local relative motion, making it difficult to simultaneously absorb multi-level information such as lane-changing position, lane-changing intensity, traffic density, upstream and downstream speed differences, and duration of conflict exposure. Third, weaving zone accident types are significantly heterogeneous; rear-end collisions and lane-changing accidents have different precursor mechanisms. If only a binary classification of accidents and non-accidents is used, it is difficult to test the ability of the precursor system to identify different accident formation processes. Fourth, existing indicators are mostly derived from human experience or traditional alternative conflict theories, lacking a method to systematically expand and screen accident precursor variables from traffic safety literature, accident mechanisms, and trajectory data. Summary of the Invention
[0004] Purpose of the Invention: The purpose of this invention is to provide a method for early warning of accident risks in highway weaving areas based on large-scale model inference and trajectory precursors. By constructing a multi-level accident precursor system and a three-classification risk identification model, the accuracy, interpretability, and engineering application value of accident risk identification are improved. Furthermore, this invention is geared towards real-time application scenarios on highway roadsides, deploying the accident risk identification model on a computing platform to achieve online identification, real-time early warning, and proactive control of accident risks in weaving areas. This addresses the problems of existing methods for identifying accident risks in weaving areas that over-rely on single alternative safety indicators, struggle to depict the dynamic evolution process before an accident, and fail to distinguish the mechanistic differences between rear-end collisions and lane-changing accidents.
[0005] Technical Solution: The present invention provides a method for early warning of accident risks in highway weaving areas based on large model inference and trajectory precursors, comprising the following steps:
[0006] Step 1: Obtain vehicle trajectory data, accident annotation data, road geometry design data, and traffic flow status data of the highway weaving area. The vehicle trajectory data shall include at least vehicle number, timestamp, longitudinal position, lateral position, longitudinal speed, lateral speed, and acceleration. The accident annotation data shall include at least the time of the accident, the type of accident, and the vehicle number involved in the accident.
[0007] Step 2: Construct accident samples and non-accident samples, where the accident samples use the time of the accident as the time anchor, and the non-accident samples use the time of minimum distance collision as the pseudo anchor. Reconstruct the sample-level time series within a unified pre-accident time window according to a fixed time step.
[0008] Step 3: Extract basic risk features and lane-changing behavior features based on the sample-level time series. The basic risk features include longitudinal position, lateral position, longitudinal speed, lateral speed, acceleration, relative speed, headway, headway time, collision avoidance deceleration, and time to collision. The lane-changing behavior features include lane-changing intensity, median merging position, median merging position, merging-out ratio, median longitudinal speed, median lateral speed, median front vehicle clearance, and median rear vehicle clearance.
[0009] Step 4: Construct an accident precursor variable library based on the literature knowledge reasoning of the large model, standardize and name the natural language risk rules output by the large model according to three categories: micro behavior, spatiotemporal interaction and macro traffic flow, and convert each natural language rule into an executable trajectory feature calculation rule;
[0010] Step 5: Construct a synthetic accident precursor based on the relative displacement, relative velocity, and relative acceleration of the vehicle in two-dimensional space. The synthetic accident precursor includes velocity-displacement alignment, two-dimensional minimum prediction distance, equal lateral alignment longitudinal margin, reachability-lifetime ratio, intersection angle flux, risk potential energy, risk potential energy growth rate, lateral-longitudinal response correlation, two-dimensional shutdown energy density, and short-term conflict duty cycle.
[0011] Step 6: Perform time window statistical aggregation, correlation screening, and redundancy filtering on the candidate precursors obtained in Steps 3-5 to obtain key accident precursor features;
[0012] Step 7: Input the key accident precursor features into the accident risk identification model, and output the probability and category of whether the weaving zone sample belongs to a non-accident, rear-end collision, or lane change accident.
[0013] Step 8: Deploy the accident risk identification model on the computing platform. The computing platform receives real-time vehicle trajectory data uploaded by the weaving zone sensing device, updates key accident precursor features online, and generates corresponding risk warning information based on the probability and category of the non-accident, rear-end collision, or lane change accident.
[0014] Furthermore, the unified pre-accident time window mentioned in step 2 is constructed as follows: Let the accident occurrence time of the accident sample be... The pseudo-anchor points for non-accident samples are The unified anchor point is ,but:
[0015]
[0016] in, The length of the pre-accident time window, The time step is used; the short-time trajectory window used for accident risk identification is preferably selected. , The pseudo-anchor point for non-accident samples is determined by the minimum TTC time:
[0017]
[0018] Furthermore, the lane-changing intensity mentioned in step 3 is determined by the number of independent lane-changing maneuvers within the sample and the effective observation duration:
[0019]
[0020] in, For lane changing intensity, This represents the total number of independent lane-changing maneuvers identified within the sample. For effective observation duration.
[0021] Furthermore, the median of the inflow location, the median of the outflow location, and the inflow-outflow ratio mentioned in step 3 are calculated according to the following formula:
[0022]
[0023]
[0024] in, and The first The longitudinal position when merging lane changes and merging lane changes occur. and These represent the number of lane changes for outbound and inbound transfers, respectively.
[0025] Furthermore, the median longitudinal velocity, median lateral velocity, median front clearance, and median rear clearance mentioned in step 3 are calculated according to the following formula:
[0026]
[0027]
[0028] in, The direction is longitudinal, The direction is transverse to the road; and The first The longitudinal and lateral velocities at each observation time. and These refer to the gaps between the target vehicle and the vehicles in front and behind it.
[0029] Furthermore, TTC, THW, and DRAC mentioned in step 3 are conventional definitions of traditional alternative safety indicators, where the headway, time to collision, and collision avoidance deceleration can be calculated as follows:
[0030]
[0031]
[0032]
[0033] in, The distance between the front and rear of the following vehicle. For the speed of the following vehicle, The speed of the vehicle in front. For closing velocity, To prevent extremely small positive numbers with a denominator of zero; when the vehicle pair does not exhibit a tendency to close the range, The maximum preset value can be selected based on the safety status. Set to 0 or process according to the preset safety value.
[0034] Furthermore, in step 5, the vehicle is set With vehicles At any moment The relative displacement, relative velocity, and relative acceleration are respectively:
[0035]
[0036] The velocity-displacement alignment and the two-dimensional minimum prediction distance are calculated according to the following formulas:
[0037]
[0038]
[0039] in, This indicates that the relative directions of motion of the two vehicles are approaching each other. This represents the minimum two-dimensional prediction distance for vehicle pairs within the prediction time domain.
[0040] Furthermore, the equal lateral alignment longitudinal margin, reachability-life ratio, and risk potential energy mentioned in step 5 are calculated according to the following formula:
[0041]
[0042]
[0043]
[0044]
[0045]
[0046] in, The smaller the value, the less safety margin there is in the vertical alignment. This indicates that vehicles changing lanes are having difficulty entering the target gap in time; This represents the approximate risk potential energy normalized to the square of the distance.
[0047] Furthermore, the intersection angle flux, risk potential energy growth rate, lateral-longitudinal response correlation, two-dimensional shutdown energy density, and short-term conflict duty cycle mentioned in step 5 are calculated according to the following formulas:
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054] in, Used to indicate the intensity of oblique intersection; Used to characterize the growth trend of risk potential energy over time; Used to measure the correlation and time delay between the lateral motion of a lane-changing vehicle and the longitudinal braking response of a vehicle in the target lane; Used to represent the approximate energy density along the vehicle line direction; Used to represent the duty cycle of short-term conflicts where the predicted nearest distance is below a threshold.
[0055] Furthermore, the statistical aggregation and correlation screening described in step 6 are performed as follows: for any candidate precursor time series... Construct statistical aggregation vectors:
[0056]
[0057] Redundancy filtering was performed using Spearman's rank correlation coefficient.
[0058]
[0059] in, For the first The difference between the ranks of two variables for each sample The sample size is used to determine the number of precursors. When the absolute value of the correlation coefficient between two candidate precursors is greater than the preset threshold, only precursor variables that are more correlated with the accident label or have stronger single-indicator discrimination ability are retained.
[0060] Furthermore, the accident risk identification model described in step 7 is a gradient boosting decision tree model, and the model's additive update form is as follows:
[0061]
[0062] in, This is a feature vector representing a key precursor to an accident. For the first A tree of return, The learning rate is used; the model output is:
[0063]
[0064] in, Indicates no accident. Indicates a rear-end collision. This indicates a lane-changing accident.
[0065] The present invention discloses a highway weaving zone accident risk identification system based on large model inference and trajectory precursors, comprising a data acquisition module, a sample time series construction module, a basic risk feature extraction module, a large model inference precursor construction module, a synthetic precursor calculation module, a key precursor screening module, an accident risk identification module, a computing platform, and an early warning output module. The data acquisition module acquires trajectory, accident, road geometry, and traffic flow state data. The sample time series construction module constructs a unified pre-accident time series of accident and non-accident samples. The basic risk feature extraction module calculates lane-changing behavior characteristics and traditional alternative safety indicators. The large model inference precursor construction module transforms the traffic safety risk rules output by the large model into computable features. The synthetic precursor calculation module calculates two-dimensional relative motion synthetic indicators. The key precursor screening module performs correlation screening and redundancy filtering. The accident risk identification module outputs categories for non-accident, rear-end collision, or lane-changing accidents.
[0066] Furthermore, the computing platform is set up in the roadside edge computing equipment, roadside unit or traffic control unit in the highway weaving area, and communicates with video detectors, millimeter-wave radar detectors, lidar detectors or vehicle-road cooperative perception equipment to complete vehicle trajectory processing, real-time calculation of accident precursors, identification of accident risk categories and output of early warning results on the roadside.
[0067] Beneficial Effects: Compared with existing technologies, this invention has the following significant advantages: By integrating multi-level features such as basic risk characteristics, lane-changing behavior characteristics, large-model inference precursors, and two-dimensional synthetic precursors, it overcomes the shortcomings of traditional single alternative safety indicators in depicting the dynamic evolution process before an accident, significantly improving the accuracy of identifying accident risks in weaving zones. Employing a three-category output—non-accident, rear-end collision, and lane-changing accident—it can effectively distinguish between rear-end collisions dominated by longitudinal following conflicts and lane-changing accidents dominated by lateral lane-changing conflicts, facilitating differentiated early warning and control measures for different accident mechanisms. The large model is only used to summarize interpretable natural language precursor rules from traffic safety literature and accident mechanisms, and transform them into computable trajectory features, rather than directly serving as an accident discriminator. This gives precursor variables clear physical meaning, facilitating understanding and deployment by engineers. Three types of inference precursors, ranging from microscopic vehicle behavior and spatiotemporal interaction to macroscopic traffic flow states, are constructed and combined with a two-dimensional relative motion synthetic indicator, which can fully reflect the entire process of evolution from normal disturbance to high-risk instability before an accident. The accident risk identification model is deployed on the roadside computing platform of the highway and connected to video, radar or vehicle-road cooperative perception equipment to achieve low-latency trajectory precursor calculation, risk category identification and graded early warning output, and can be linked with active safety management equipment such as variable speed limit, lane guidance and ramp control. Attached Figure Description
[0068] Figure 1 This is a flowchart of the present invention;
[0069] Figure 2 This is a schematic diagram illustrating the construction of sample anchor points and pre-accident time windows according to the present invention. Accident samples should be plotted in the diagram at the time of accident occurrence. As anchor points, non-accident samples are based on the minimum TTC time. Use pseudo-anchor points and label short-time trajectory windows. Step length And lane change evolution windows of 30, 20, 15, 10, 5, 3 and 1 minute;
[0070] Figure 3 This is a schematic diagram of the multi-level accident precursor indicator system of the present invention. The diagram should be divided into three layers: the first layer is basic risk and lane-changing behavior characteristics, including... , The first layer consists of three types of precursors: TTC, THW, DHW, and DRAC; the second layer consists of precursors for large-scale model inference, including three categories: micro-behavior, spatiotemporal interaction, and macro-traffic flow; the third layer consists of two-dimensional synthetic precursors, including... , , , and wait;
[0071] Figure 4 This is a schematic diagram of the precursor to the synthesis of two-dimensional relative motion according to the present invention. The diagram should include the lane-changing vehicle, the target lane vehicle, and the relative displacement. Relative velocity Relative acceleration Longitudinal distance Horizontal distance The lateral alignment point and the predicted minimum distance are used to explain the physical meaning of the synthetic precursor;
[0072] Figure 5 This is a schematic diagram of the training and output structure of the accident risk identification model of the present invention. The diagram should depict candidate feature statistical aggregation, Spearman redundancy filtering, key precursor input, GBDT iterative training, and three types of probability output. , and . Detailed Implementation
[0073] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0074] like Figure 1 As shown, this embodiment of the invention provides a method for early warning of accident risks in highway weaving areas based on large model inference and trajectory precursors, including the following steps:
[0075] S1 acquires high-precision vehicle trajectory data, accident annotation data, road geometry design data, and traffic flow status data for highway weaving zones. Vehicle trajectory data includes vehicle number, timestamp, longitudinal position, lateral position, longitudinal speed, lateral speed, acceleration, lane number, and vehicle length and width; accident annotation data includes the time of accident, accident type, accident vehicle number, and accident spatial location; road geometry design data includes weaving zone type, weaving length, merging nose position, diverging nose position, lane number changes, and ramp locations.
[0076] S2, construct a unified pre-accident time series for both accident and non-accident samples. Accident samples use the accident occurrence time as the anchor point, while non-accident samples use the minimum TTC time as a pseudo-anchor point. The unified time window is defined as:
[0077]
[0078] in, The time when the accident occurred. The smallest TTC pseudo-anchor point for non-accident samples. For window length, This is the sampling step size. For short-term risk identification of vehicles, the preferred step size is... , For sample-level lane change evolution analysis, lane change behavior evolution characteristics can be further calculated using windows of 30, 20, 15, 10, 5, 3 and 1 minute before the accident.
[0079] S3, extract lane-changing behavior characteristics and basic alternative safety indicators. Lane-changing intensity is defined as:
[0080]
[0081] The typical longitudinal position for merging and merging lane changes is defined as follows:
[0082]
[0083] The remittance-to-inflow ratio is defined as:
[0084]
[0085] Longitudinal speed, lateral speed, and front-to-rear clearance are calculated using the median.
[0086]
[0087] In this invention, Direction indicates the longitudinal direction of the road. The direction indicates the lateral direction of the road. When the gap between vehicles in front and behind shrinks synchronously within a short window before the accident, and the lane-changing intensity or merging ratio suddenly increases, it indicates that the acceptable gap in the target lane has decreased, and the risk of lateral lane-changing conflicts has increased.
[0088] For vehicle pairs, TTC, THW, and DRAC use the conventional definitions of traditional alternative safety indicators. The headway, time to collision, and collision avoidance deceleration can be defined as follows:
[0089]
[0090]
[0091] in, For the speed of the following vehicle, The speed of the vehicle in front. For the distance between the front of the car, For closing velocity, It is a very small positive number. When Lower and When the value increases, it indicates that the following vehicle needs to brake harder to avoid a rear-end collision, thus increasing the likelihood of a rear-end collision.
[0092] S4. Construct a large-scale model for inferring early warning signs. This large-scale model does not directly output accident risk judgments, but rather is used to summarize traffic safety literature knowledge, accident mechanisms in weaving zones, and trajectory patterns to generate interpretable, computable, and quantifiable natural language rules for candidate early warning signs. The output of the large-scale model is then subjected to synonym merging, standardized naming, and computational script mapping to form three types of inferential early warning signs:
[0093] First, there are micro-behavioral precursors used to characterize vehicle-level behaviors such as following, braking, speed difference, aggression, lane change duration, minimum clearance, and lane change decision triggering, including minimum TTC, 5th percentile of TTC, proportion of TTC below threshold, minimum vehicle spacing, aggressive lane change rate, aggression variance, conflict zone exposure time, and lane change decision threshold time.
[0094] Second, the spatiotemporal interaction precursors are used to characterize the degree of interaction exposure of multiple vehicles in time and space, including lane-changing frequency per unit time, synchronous conflict lane-changing ratio, average dwell time in the weaving zone, the proportion of time when TTC is below the threshold, changes in risk field strength, weaving maneuver rate in the first 100m and forced lane-changing rate in the last 100m.
[0095] Thirdly, macroscopic traffic flow precursors are used to describe the deterioration of local traffic conditions before an accident, including average speed, average density, upstream and downstream speed difference, speed standard deviation, flow rate variation, density per lane, weaving / non-weaving flow density ratio, regional speed variance, and congestion risk index.
[0096] S5, constructing a precursor to the synthesis of two-dimensional relative motion. Assume the vehicle... and vehicles At any moment The relative displacement, relative velocity, and relative acceleration are respectively:
[0097]
[0098] Velocity-displacement alignment is defined as:
[0099]
[0100] when When the relative velocity of the two vehicles is in the opposite direction to the relative displacement, it indicates that the two vehicles are approaching each other.
[0101] The two-dimensional minimum prediction distance is defined as:
[0102]
[0103] Compared to using only longitudinal TTC, this indicator can characterize the oblique convergence and two-dimensional spatial approximation during lane changing in the weaving zone.
[0104] The vertical margin for horizontal alignment is defined as:
[0105]
[0106]
[0107] in, The predicted time when the two vehicles are closest to being aligned laterally. For safety longitudinal margin; when A smaller value indicates insufficient longitudinal spacing between the lane-changing vehicle and the target lane vehicle when they are laterally aligned.
[0108] The reachability-lifetime ratio is defined as:
[0109]
[0110]
[0111] when When the time required for a lane-changing vehicle to complete a lateral merge exceeds the time the target gap can be maintained, the risk of the target gap not being reached increases.
[0112] The intersection angle flux is defined as:
[0113]
[0114] When two vehicles meet at a high speed at a large angle and are relatively close together An increase indicates a higher risk of lateral conflict.
[0115] Risk potential energy is defined as:
[0116]
[0117] The risk potential growth rate is defined as:
[0118]
[0119] The lateral-longitudinal response correlation is defined as:
[0120]
[0121] in, This indicates the lateral speed of vehicles changing lanes. Indicates that vehicles in the target lane are delayed. The longitudinal acceleration after a lane change. This metric measures the intensity and time delay of the longitudinal braking of the target vehicle triggered by the lane change maneuver.
[0122] The two-dimensional shut-off energy density is defined as:
[0123]
[0124]
[0125] Short-term conflict duty cycle is defined as:
[0126]
[0127] in, To predict the minimum distance threshold, The larger the value, the higher the proportion of vehicles that are in a short-term conflict state within the pre-accident window.
[0128] S6. Perform key precursor screening. Construct a unified sample-level feature vector from basic risk characteristics, lane-changing behavior characteristics, large-model inference precursors, and synthetic precursors. Extract statistics such as minimum, maximum, mean, standard deviation, quantiles, duration, and cumulative amount within the time window.
[0129]
[0130] Relevance screening was performed using Spearman's rank correlation coefficient.
[0131]
[0132] When the two candidate precursors satisfy At that time, it was considered that there was strong redundancy between the two, and variables with higher correlation to accident labels or higher single-indicator AUC were retained.
[0133] S7, Construct an accident risk identification model. Input the selected key precursors into the gradient boosting decision tree model. Let the... The model after rounds of iterations is ,but:
[0134]
[0135] For a three-class classification task, the model output is:
[0136]
[0137] in, Indicates no accident. Indicates a rear-end collision. This indicates a lane-changing accident. Compared to the accident / non-accident binary classification, this tri-classification task can further verify whether the precursor system has the ability to distinguish between longitudinal conflict-dominated accidents and lateral conflict-dominated accidents.
[0138] S8. The trained accident risk identification model is deployed to the roadside edge AI computing unit. The edge AI computing unit receives vehicle trajectory and traffic flow status data output from video detectors, radar detectors, or vehicle-to-infrastructure (V2I) sensing devices. Following the aforementioned steps, it calculates key accident precursor features in real time and calls the accident risk identification model to output risk categories for non-accident, rear-end collision, or lane-change accidents. When the probability of a rear-end collision or lane-change accident exceeds a preset threshold, corresponding graded warning information is output, and it can be linked to variable speed limits, lane guidance, ramp control, driver information prompts, or V2I warning devices.
[0139] Taking a highway weaving area as the research object, vehicle trajectory data output by video or radar equipment is collected, and vehicle number association, coordinate unification, trajectory smoothing, and outlier cleaning are completed. Let the data coordinates be... The direction is longitudinal, The direction is transverse to the road. For each vehicle, the following trajectory sequence is obtained:
[0140]
[0141] For accident samples, the accident time is manually labeled. As anchor points; for non-accident samples, vehicle pairs that match the accident samples in terms of spatial location, time period attributes, and traffic flow status are extracted, and the minimum TTC time is used as the anchor point. As pseudo-anchor points, a short-time trajectory time window is constructed for any sample:
[0142]
[0143] Meanwhile, to characterize the changes in lane-changing behavior on a minute-by-minute scale before the accident, a lane-changing evolution window is constructed:
[0144]
[0145] Identify independent lane-changing maneuvers within the weaving zone. If a vehicle's lateral position crosses a lane line or its lane number changes, record the lane-changing start time, lane-changing end time, lane-changing direction, and longitudinal position where the lane change occurs. Calculate the lane-changing intensity for each sample:
[0146]
[0147] Calculate the median position for both merging and merging lane changes:
[0148]
[0149] The above indicators were repeatedly calculated within different minute windows before the accident to obtain the time evolution sequence:
[0150]
[0151] When a significant increase in lane-changing intensity, a decrease in longitudinal speed, or a contraction in the gap between vehicles in front or behind occurs within a short window before an accident, it is considered a candidate precursor to a sudden change in traffic conditions.
[0152] Subsequently, alternative safety indicators are calculated for the accident vehicle pair or candidate vehicle pair. Let the rear vehicle be... The car in front is Then, it is calculated according to the conventional definition of traditional alternative safety indicators:
[0153]
[0154]
[0155]
[0156] in, This refers to the length of the vehicle in front. If... If the following vehicle is not relatively close to the preceding vehicle, it can be handled as a safe situation.
[0157] For vehicles changing lanes and vehicles in the target lane, first construct two-dimensional relative motion variables:
[0158]
[0159]
[0160]
[0161] Then calculate the two-dimensional minimum prediction distance:
[0162]
[0163] like continuously below the threshold This indicates that the two vehicles maintain a near-collision spatial relationship within the short-term prediction time domain. Further calculation of the short-term conflict duty cycle is needed:
[0164]
[0165] For the precursor rule of "an abnormal increase in the time vehicles spend in the weaving zone," which is summarized by the large model, it is transformed into a calculable indicator:
[0166]
[0167] The precursor rule "the duration of the TTC below the threshold increases" is transformed into:
[0168]
[0169] The precursor rule of "duration of speed fluctuation" can be transformed into:
[0170]
[0171] For the precursor rule of "variance of jerkiness", first calculate the longitudinal or lateral jerkiness:
[0172]
[0173] Next, calculate the variance within the window:
[0174]
[0175] Statistical aggregation of all candidate precursors within a short-term event window:
[0176]
[0177] Form a feature matrix for all samples:
[0178]
[0179] Spearman correlation coefficient and single-indicator AUC are used to screen variables, prioritizing the retention of precursors that have a stronger relationship with accident labels and lower redundancy with other variables. In a preferred embodiment, key variables include DRAC, TTC, relative speed, DHW, and THW from the basic risk indicators, as well as weaving zone dwell time, lane change decision threshold time, equal lateral alignment longitudinal margin, jerk variance, reachability-life ratio, flow rate variation, 5th percentile of TTC, conflict zone exposure time, minimum vehicle spacing, and upstream / downstream flow difference from the large model inference and synthetic precursors.
[0180] The tri-class classification model is then trained using gradient boosting decision trees. The additive update form of the model is as follows:
[0181]
[0182] The model outputs three types of probabilities:
[0183]
[0184] in, This represents the probability of a non-accident. This represents the probability of a rear-end collision. This represents the probability of a lane-changing accident. The warning category is initially determined based on the highest probability:
[0185]
[0186] when When the value exceeds a preset threshold, a longitudinal following risk warning is triggered; when When the risk exceeds a preset threshold, a lateral lane-changing conflict warning is triggered; other situations are judged as normal or low-risk. Based on the warning results, further linkage with variable speed limits, ramp control, lane guidance, driver information prompts, or vehicle-to-infrastructure (V2I) cooperative warning devices can be implemented to achieve proactive safety management in weaving areas. In actual deployment, the trained accident risk identification model can be packaged into an edge inference program and deployed in the weaving area road computing platform. The computing platform is connected to video detectors, radar detectors, or V2I cooperative sensing devices to receive vehicle trajectory data and traffic flow status data in real time, and completes trajectory updates, accident precursor calculations, risk category discrimination, and warning result output online. Thus, this invention can achieve rapid identification and low-latency warning of weaving area accident risks on the roadside without relying on remote cloud real-time computing.
Claims
1. A method for early warning of accident risks in highway weaving areas based on large model inference and trajectory precursors, characterized in that, Includes the following steps: Step 1: Obtain vehicle trajectory data, accident annotation data, road geometry design data, and traffic flow status data for the highway weaving zone; Step 2: Construct a unified pre-accident time series using the time of the accident or the minimum distance collision time of non-accident samples as anchor points; Step 3: Extract basic risk features and lane-changing behavior features based on time series data; Using a large model, we reason about traffic safety literature knowledge and the accident mechanism in weaving areas, generating three types of interpretable precursor rules: micro-behavior, spatiotemporal interaction, and macro-traffic flow. We then transform natural language rules into executable trajectory feature calculation rules. Step 4: Based on the relative displacement, relative velocity, and relative acceleration of the vehicles in two-dimensional space, construct a synthetic accident precursor to characterize the risk of oblique intersection and two-dimensional space approach. Step 5: Perform time window statistical aggregation, correlation screening, and redundancy filtering on all obtained candidate precursors to obtain key accident precursor features; Step 6: Input the key accident precursor features into the accident risk identification model, and output the probability and category of whether the interlacing zone sample belongs to a non-accident, rear-end collision, or lane change accident. Step 7: Deploy the accident risk identification model on the computing platform, receive real-time vehicle trajectory data, update key accident precursor features online, and generate corresponding risk warning information.
2. The method for early warning of accident risks in highway weaving areas based on large model inference and trajectory precursors as described in claim 1, characterized in that, Step 2 is as follows: For accident samples, the time of the accident is used as the unified anchor point; for non-accident samples, the time of minimum distance collision is used as the pseudo anchor point; within the pre-accident time window, the sample-level time series is reconstructed according to a fixed time step, where the short-time trajectory window is used for risk identification and the longer time window is used for lane-changing behavior evolution analysis.
3. The method for early warning of accident risks in highway weaving areas based on large model inference and trajectory precursors as described in claim 1, characterized in that, In step 3, the large model is only used as a tool for generating precursor rules and summarizing knowledge, and is not directly used for accident identification. The natural language risk rules output by the large model are merged with synonyms, standardized naming and mapping of calculation scripts to form quantitative candidate accident precursors, including three categories: micro-behavioral precursors, spatiotemporal interaction precursors and macro-traffic flow precursors.
4. The method for early warning of accident risks in highway weaving areas based on large model inference and trajectory precursors as described in claim 1, characterized in that, In step 4, the synthetic accident precursors include: velocity-displacement alignment, which characterizes the consistency between the relative velocity direction and the relative displacement direction of the two vehicles; two-dimensional minimum prediction distance based on the parabolic motion assumption in the prediction time domain; equal lateral alignment longitudinal margin, which measures the longitudinal safety margin when lateral alignment is achieved; reachability-lifetime ratio, which determines whether the lane-changing vehicle can enter the target gap in time; intersection angle flux, which describes the intensity of the oblique intersection of the two vehicles; risk potential energy, which characterizes the approach risk normalized by the square of the distance; risk potential energy growth rate, which characterizes the trend of risk potential energy growth over time; lateral-longitudinal response correlation, which measures the correlation between the lateral motion of the lane-changing vehicle and the longitudinal braking response of the target lane vehicle; two-dimensional closing energy density, which describes the approach energy density along the vehicle connection direction; and short-term conflict duty cycle, which represents the proportion of time when the predicted nearest distance is below a threshold.
5. The method for early warning of accident risks in highway weaving areas based on large model inference and trajectory precursors according to claim 1, characterized in that, Step 5 is as follows: For any candidate precursor time series, construct a statistical aggregation vector containing the minimum, maximum, mean, standard deviation, quantile, and cumulative amount; use Spearman rank correlation coefficient for redundancy filtering, and when the absolute value of the correlation coefficient between two candidate precursors is greater than the preset threshold, only the precursor variables that are more correlated with the accident label or have stronger single-indicator discrimination ability are retained.
6. The method for early warning of accident risks in highway weaving areas based on large model inference and trajectory precursors according to claim 1, characterized in that, In step 6, the accident risk identification model is a gradient boosting decision tree model, which adopts an additive update form. After the model output is processed by the Softmax function, three types of probabilities are obtained: no accident, rear-end collision, or lane change accident. Among them, rear-end collision corresponds to the accident type dominated by longitudinal following conflict, and lane change accident corresponds to the accident type dominated by lateral lane change conflict.
7. The method for early warning of accident risks in highway weaving areas based on large model inference and trajectory precursors according to claim 1, characterized in that, In step 7, the computing platform is set in the roadside edge computing device, roadside unit or traffic control unit in the highway weaving area, and is connected to video detectors, millimeter-wave radar detectors, lidar detectors or vehicle-road cooperative perception devices. It is used to complete vehicle trajectory processing, real-time calculation of accident precursors, identification of accident risk categories and output of early warning results on the roadside, and can be linked with variable speed limit, lane guidance, ramp control, driver information prompts or vehicle-road cooperative early warning devices.
8. The method for early warning of accident risks in highway weaving areas based on large model inference and trajectory precursors according to claim 1, characterized in that, Lane-changing behavior characteristics include: lane-changing intensity determined by the number of independent lane-changing maneuvers within the sample and the effective observation duration; median longitudinal position when merging lane-changing and merging lane-changing occur; merging-merging ratio determined by the ratio of merging-out lane-changing to merging-in lane-changing; and median longitudinal speed, median lateral speed, median front clearance, and median rear clearance.
9. The method for early warning of accident risks in highway weaving areas based on large model inference and trajectory precursors according to claim 1, characterized in that, Basic risk characteristics include vehicle frontage, vehicle headway, time to collision, and collision avoidance deceleration. When there is no tendency for the vehicle to close, the time to collision is set to the maximum value of the preset safe condition, and the collision avoidance deceleration is set to zero or processed according to the preset safe value.
10. A highway weaving zone accident risk early warning system based on large model inference and trajectory precursors, characterized in that, include: Data acquisition module: used to acquire trajectory, accident, road geometry, and traffic flow status data; Sample time series construction module: used to construct a unified pre-accident time series with the accident occurrence time or minimum distance collision time as the anchor point; Basic risk feature extraction module: used to calculate lane-changing behavior characteristics and traditional alternative safety indicators; Large Model Inference Precursor Construction Module: Used to transform the traffic safety risk rules output by the large model into computable features, and the large model does not directly output accident risk judgments; Synthetic precursor calculation module: used to calculate synthetic accident precursors based on the relative displacement, relative velocity, and relative acceleration of vehicle pairs in two-dimensional space; Key precursor screening module: used for time window statistical aggregation, correlation screening and redundancy filtering of candidate precursors; Accident risk identification module: used to output the probability and category of non-accident, rear-end collision, or lane change accident; Computing platform: Located on the roadside and connected to the sensing devices, it is used to calculate precursor features online and call the accident risk identification module; Early warning output module: used to generate corresponding graded early warning information based on the accident risk category.