A long-tail accident scene generation method based on a physical information generative adversarial network

CN122655909BActive Publication Date: 2026-09-29JILIN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611107354.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-09-29
Estimated Expiration
2046-07-24

AI Technical Summary

Technical Problem

该方法能够减少模型对大量长尾事故场景数据的依赖,但单独使用物理信息神经网络时,输出常偏向满足约束的一组确定性轨迹,难以充分描述同一事故类型下的多种合理变化

Benefits of technology

[0106]1)本发明以少量真实事故场景作为原型,通过对道路条件、车辆初始状态、动作时刻和目标碰撞条件进行扰动采样,并结合随机向量批量生成长尾事故场景,从而扩充事故场景样本数量,缓解真实事故数据采集困难、复现风险高及标注成本高的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122655909B_ABST
    Figure CN122655909B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of automatic driving scene generation, and specifically relates to a long-tail accident scene generation method based on a physical information generative adversarial network. The present application takes a small amount of real accident scenes as prototypes, samples vehicle initial states, road conditions and target collision conditions around the prototypes; a condition generator and a condition discriminator are constructed, the generator simultaneously serving as a physical information neural network, and outputting continuous state trajectories and control amounts of multiple traffic participants; real trajectory supervision, adversarial loss, kinematics residual error, road boundary, control range, target first collision and diversity constraints are combined for training; and finally, physical screening and similarity deduplication are performed to form a long-tail accident scene database. The present application can construct a long-tail accident scene database with rich quantity and diversity, improve the adaptability and driving safety of an automatic driving vehicle to long-tail accidents, and help the industrialization landing of the automatic driving vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of autonomous driving scene generation technology, specifically a long-tail accident scene generation method based on physical information generation adversarial networks. Background Technology

[0002] The training, verification, and safety assessment of autonomous driving systems require not only conventional road scenarios, but also low-probability, high-risk scenarios such as rear-end collisions, lane-change side collisions, intersection collisions, and multi-vehicle continuous collisions. These are often referred to as long-tail accident scenarios, characterized by their low frequency of occurrence, high data collection costs, realistic reproduction of dangers, and significant differences in the number of samples between different accident types. Relying solely on real-road data collection often makes it difficult to obtain sufficient data on similar accidents.

[0003] Existing methods for generating accident scenarios mainly include parametric simulation and data-driven generation. Manual parametric simulation requires setting road conditions, vehicle positions, speeds, driving actions, and collision times item by item. This method is inefficient when there are many parameters and lacks realism in the accident scenarios. Generative adversarial networks (GANs) can learn scene distributions from data and generate different results through random inputs. However, ordinary GANs typically require a large number of training samples. Under the condition of small samples in long-tailed accident scenarios, the training process is prone to oscillations, easily resulting in different random inputs generating approximately the same trajectory.

[0004] On the other hand, relying solely on generative adversarial networks to determine whether a trajectory closely approximates real data cannot guarantee that vehicle movement conforms to basic laws. The generated results may exhibit issues such as position jumps, discontinuities in speed and heading, driving off the road, acceleration exceeding the vehicle's capabilities, or collisions before a specified time. If unreasonable results are only removed after generation, the proportion of effective scenarios will be reduced, and it will be difficult to stably control the target collision vehicle, collision time, and collision pattern.

[0005] Physical information neural networks (PINs) can simultaneously incorporate vehicle motion equations, road boundaries, and a small number of real trajectories into their training. When real observations are available, the network is constrained by the actual data; when no observations are available, the network outputs the vehicle motion equations and boundary conditions. This method reduces the model's reliance on large amounts of long-tailed accident scenario data. However, when using a PSN alone, the output often tends to favor a set of deterministic trajectories that satisfy the constraints, making it difficult to fully describe the various reasonable variations under the same accident type.

[0006] Therefore, it is necessary to combine the diverse generative capabilities of Generative Adversarial Networks (GANs) with the physical constraint capabilities of Physical Information Neural Networks (PINs). GANs are responsible for learning the trajectory features and overall distribution of real-world scenarios, while PINs ensure that the generated trajectories conform to vehicle motion, road range, and target collision requirements. Stable adversarial training and diverse constraints reduce training instability under small sample conditions, thereby constructing a rich and diverse long-tail accident scenario database. Summary of the Invention

[0007] To address the aforementioned issues, this invention proposes a long-tail accident scene generation method based on a physical information generative adversarial network (GAN). This method uses a small number of real-world accident scenarios as prototypes, sampling vehicle initial states, road conditions, and target collision conditions around these prototypes. A GAN consisting of a condition generator and a condition discriminator is constructed, where the condition generator also functions as a physical information neural network, outputting continuous state trajectories and control variables for multiple traffic participants. Joint training is performed using real trajectory supervision, adversarial loss, vehicle kinematic residuals, road boundaries, control range, target first collision, and diversity constraints. Finally, the generated results are physically filtered and deduplicated based on similarity to form a long-tail accident scene database. This invention enables the construction of a rich and diverse long-tail accident scene database, improving the adaptability of autonomous vehicles to long-tail accident scenarios, enhancing their driving safety in the real world, and facilitating their industrialization.

[0008] The technical solution of this invention is described below in conjunction with the accompanying drawings:

[0009] This invention provides a method for generating long-tailed incident scenarios based on physical information generative adversarial networks, including:

[0010] S1. Construct a set of small-sample long-tailed accident prototypes and unify the scene representation;

[0011] Read road boundary, lane center line, vehicle size and multi-vehicle trajectory data, complete time synchronization, coordinate unification and anomaly removal, and form a standardized prototype set;

[0012] S2. Establish candidate scenario conditions and random input;

[0013] Perturbation sampling is performed on road curvature, lane width, initial position and speed, action and collision time to eliminate invalid conditions and configure random vectors and accident labels for candidate conditions;

[0014] S3. Construct a physical information condition generator;

[0015] Input the normalized time, candidate scene conditions, random vector and vehicle number features into the generator, and output the state increment, acceleration and front wheel angle. Combine the initial state to obtain the continuous state trajectory; combine the vehicle's state and control variables to form a scene sequence.

[0016] S4. Construct a conditional discriminator and conduct stable adversarial training;

[0017] The state sequence, control sequence, relative motion features, candidate conditions, and accident labels are input into the discriminator, which outputs a authenticity score. The generator and discriminator are optimized alternately using distance-based adversarial loss and gradient penalty.

[0018] S5. Add physical and accident constraints to generator training;

[0019] Automatic differentiation is used to calculate the residuals of the vehicle's motion equations, and constraints are imposed on road boundaries, speed, acceleration, and front wheel steering angle.

[0020] S6. Batch generate candidate scenes and build a database;

[0021] The generator generates scenes in batches, checks road range, kinematic errors, control exceedances, collisions and accident types, retains valid samples, and finally builds a long-tail accident scene database.

[0022] Furthermore, the specific method of S1 is as follows:

[0023] S11. Establish a set of accident prototypes;

[0024] Let the set of small-sample accident prototypes be as shown in equation (1):

[0025]

[0026] In the formula, A set of accident prototypes; For the first A prototype of the accident; For accident prototype index; The number of prototypes of the accident; For the first The prototype's road geometry and drivable area; For the first The observation trajectories of all traffic participants in the prototype; For the first Accident type identifier for each prototype; and For the first The target collision vehicle number in the prototype; For the first The moment of the first collision of the prototype;

[0027] S12, Define vehicle status and control variables;

[0028] No. The car in physical time The state vector and control vector are shown in equation (2):

[0029]

[0030] In the formula, For the first The car in physical time The state vector; Index for vehicles; and These are the longitudinal and lateral coordinates of the vehicle's center, respectively. For vehicle speed; This refers to the vehicle's heading angle; For the first The car in physical time The control vector; It is longitudinal acceleration; Front wheel steering angle; superscript Transpose of a vector;

[0031] The prototype data is synchronized in time, checked for outliers, and has its coordinates unified. The tangential direction of the road centerline is used as the longitudinal direction, and the normal direction is used as the lateral direction. Missing time points are filled in using an interpolation method that maintains speed continuity. Observation points that exceed the vehicle's capacity are marked. Only reliable observation intervals are used for data supervision.

[0032] Furthermore, the specific method of S2 is as follows:

[0033] S21. Generate candidate conditions based on the accident prototype;

[0034] No. In the candidate scenario, the first The conditional parameters are generated according to equation (3):

[0035]

[0036] In the formula, For the first In the candidate scenario, the first Unrestricted sampled values ​​of each parameter; Candidate parameters are limited to the physical range; Indexing candidate scenes; For conditional parameter index; The first selected accident prototype Each parameter value; For the first The candidate scenario is in the Sampled values ​​in each parameter dimension, and ; For the first The perturbation amplitude allowed by each parameter; and The first The physical lower limit and physical upper limit of each parameter; when When it exceeds the allowable range, Take the nearest boundary value;

[0037] The candidate condition vectors include road curvature, lane width, number of vehicles, vehicle size, initial position of each vehicle, initial speed, initial heading angle, start time of action, target collision vehicle pair and the first collision time of the target. The sampling adopts the Latin hypercube method to ensure that a limited number of candidate conditions uniformly cover the allowable range. After sampling, a pre-check is performed to remove conditions with overlapping initial states, vehicles located outside the road, and target collision time earlier than the start time of action.

[0038] S22. Configure random vectors and accident type conditions;

[0039] Each candidate condition is configured with a random vector. Random vectors do not directly represent a physical quantity, but are used to control trajectory details, including changes in braking intensity, lane change speed, and subtle differences when approaching the collision point. Accident Types By inputting discrete labels into the generator and discriminator, the same network can generate collision scenarios such as rear-end collisions, lane change side collisions, or intersection conflicts.

[0040] Furthermore, the specific method of S3 is as follows:

[0041] S31. Construct a physical information condition generator;

[0042] The generator's input / output and initial state mapping is shown in equation (4):

[0043]

[0044] In the formula, For physical information condition generator; These are the generator parameters; Normalized time; For the first A conditional vector for each candidate scenario; For the first A random vector of candidate scenarios; For the first Vehicle identification number characteristics; The state increment output by the generator; To generate control variables; This is the generated state; This is the initial state for sampling; Physical time; For scene duration;

[0045] The generator uses a time-coded multilayer perceptron. Time, road conditions, vehicle conditions, accident type, and random vectors are encoded and concatenated before being input into a shared hidden layer. The shared hidden layer learns the motion patterns that different vehicles follow. The vehicle number feature is used to distinguish the initial state and task of each vehicle. The output provides the state increment, acceleration, and front wheel angle, enabling the network to calculate continuous states at any time position.

[0046] S32. Form a complete scene sequence;

[0047] For a unified sampling time set, the generated states and control variables of each vehicle are combined into a scene sequence in chronological order. When the number of vehicles is less than the maximum number of channels, empty channels are ignored using an effective vehicle mask. When the number of vehicles changes, the number of effective vehicles is recorded in the condition vector. Position, velocity, angle, acceleration, and time are normalized according to preset scales, and then restored to actual physical units after generation.

[0048] Furthermore, the specific method of S4 is as follows:

[0049] S41. Construct a condition discriminant;

[0050] The discriminator gives a realism score for the complete scene sequence, as shown in Equation (5):

[0051]

[0052] In the formula, For the first The authenticity score for each scenario; For conditional discriminators; These are the parameters for the discriminator; For the first The state sequence of all vehicles in a given scenario; For the first The control sequence of all vehicles in a given scenario; For the first Conditional vectors for each scenario; For the first Accident type identification for each scenario;

[0053] S42. Employ distance-based adversarial training and gradient penalty;

[0054] The discriminator loss is shown in equation (6):

[0055]

[0056] In the formula, For discriminator loss; To generate a scene; This is a real accident scenario; The discrimination criteria consist of candidate conditions and accident types; For conditional discriminators; To take the average of the training batches; The weights are used for gradient penalty. The interpolated scene between the real scene and the generated scene; To calculate the gradient for the interpolation scenario; It is a norm 2;

[0057] The adversarial loss of the generator is shown in equation (7):

[0058]

[0059] In the formula, For the generator's adversarial loss; For conditional discriminators; To generate a scene; As a condition for judgment; This is to take the average of the generated scene batches.

[0060] Furthermore, the specific method of S5 is as follows:

[0061] S51. Establish vehicle kinematic constraints;

[0062] The motion of the vehicle is described using a kinematic bicycle model, as shown in equation (8):

[0063]

[0064] In the formula, and The first The derivatives of the vehicle's longitudinal and lateral coordinates with respect to time; For the first The speed of the vehicle; For the first The vehicle's heading angle; This is the derivative of velocity with respect to time. It is longitudinal acceleration; This is the derivative of the heading angle with respect to time. For the first The wheelbase of the vehicle; The steering angle of the front wheels; , and Trigonometric functions;

[0065] The derivative of the state with respect to time is generated using automatic differentiation, and physical checkpoints are placed within the scene time range; the kinematic loss is shown in equation (9):

[0066]

[0067] In the formula, For kinematic loss; The number of scenes in a training batch; The number of physical checkpoints for each scene; For scene indexing; For physical checkpoint index; For the first Number of valid vehicles in each scenario; Index for vehicles; For the first One normalization check moment; For the fourth equation of motion in equation (8), in the th... The first scenario, the first Vehicles and times The residual vector at the location; It is a norm 2;

[0068] S52. Establish a small amount of real trajectory supervision;

[0069] The real trajectory supervision loss is shown in Equation (10):

[0070]

[0071] In the formula, Loss is monitored for the actual trajectory; A set of reliable observation indexes; For reliable observation quantity; For accident prototype index; Index for vehicles; Index for observation time; This is the weight matrix for the state dimension; For the generator in the first The prototype, the first Vehicles and times The generation state at that location; To correspond to the actual state; It is a norm 2;

[0072] S53. Establish road and state range constraints;

[0073] The road boundary loss is shown in equation (11):

[0074]

[0075] In the formula, Loss due to road boundary; For the number of batch scenarios; This refers to the number of physical checkpoints. For scene indexing; For checkpoint index; For the first Number of valid vehicles in each scenario; Index for vehicles; It is a linear rectified function; The safety margin between the vehicle's center and the road boundary; For the first The road in each scene has a signed distance function, which is positive inside the road, zero at the boundary, and negative outside the road; To generate the vehicle's center position; For normalization check timing;

[0076] For any restricted physical quantity, a two-sided over-limit penalty is applied, as shown in equation (12):

[0077]

[0078] In the formula, physical quantity Bilateral boundary crossing penalties; The speed, acceleration, and front wheel angle to be checked; This is the lower limit of allowable limits; This is the maximum allowed limit; It is a linear rectified function; when When within the allowable range, The penalty is zero; the average penalty for all vehicles and inspection times is taken to obtain the state and control range loss. ;

[0079] S54. Establish the first collision constraint for the target;

[0080] The vehicle is approximated as an oriented ellipse with longitudinal and lateral dimensions, and the separation between the two vehicles is shown in equation (13):

[0081]

[0082] In the formula, For vehicles With vehicles At physical moment The amount of separation; and Index for vehicles; This represents the longitudinal component of the relative position of the two vehicles in the average heading direction; This represents the lateral component of the relative position of the two vehicles along the average heading normal. The combined longitudinal dimension is determined by the lengths of the two vehicles; The combined lateral dimension is determined by the widths of the two vehicles; It is the square root; when The two cars separated at that time. When the two vehicles came into contact, The two vehicles overlapped.

[0083] The initial collision loss of the target is shown in Equation (14):

[0084]

[0085] In the formula, Loss due to collision with the target; and To specify the vehicle number involved in the collision; The moment of collision with the target; The separation amount of the target vehicle pair at the target time; For the target vehicle in The penalty for maintaining separation previously; Penalties for non-target vehicles to maintain safe separation;

[0086] in, Calculations are performed at several pre-collision inspection points, when the separation distance of the target vehicle is less than a preset value. Punishment will be imposed at that time; Calculations were performed at all physical checkpoints, when the separation amount of the non-target vehicle pair was less than the safety value. Punishment will be imposed at that time;

[0087] S55. Establish diversity constraints;

[0088] Pairs of random vectors are drawn from the same candidate condition, and the diversity loss is calculated as shown in Equation (15):

[0089]

[0090] In the formula, For the loss of diversity; The number of random vector pairs; For a set of pairs; and For scene indexing; It is a linear rectified function; The difference coefficient is a random vector. and These are two random vectors under the same candidate condition; It is a norm 2; The trajectory difference coefficient; The average position and velocity distance of the two sets of generated trajectories; and Generate a corresponding state sequence;

[0091] S56. Construct the overall training objective for the generator;

[0092] The total loss of the generator is shown in equation (16):

[0093]

[0094] In the formula, This represents the total loss of the generator; To combat the losses; Loss is monitored for the actual trajectory; For kinematic loss; Loss due to road boundary; Loss of state and control range; The initial collision loss to the target; Losses due to accident type; For the loss of diversity; For the smoothing loss of acceleration and rotation angle changes; , , , , , , , and These are the non-negative weights corresponding to the loss.

[0095] Furthermore, the specific method of S6 is as follows:

[0096] S61, Batch generation and physical filtering;

[0097] After training, scenarios are generated in batches for different candidate conditions and random vectors; The valid identifiers for each generated scene are shown in Equation (17):

[0098]

[0099] In the formula, For the first A valid identifier for each generated scene, take Indicates validity, take Indicates invalid; For indicator functions; For kinematic error; This refers to the error caused by the road crossing the boundary. For state and control exceeding the limit error; For target collision error; Error due to accident type; , , , and These are the allowable thresholds for the corresponding errors; All conditions must be met simultaneously;

[0100] The screening is conducted in order of increasing complexity: first check the initial state, road range and control variables, then check the kinematic errors, and finally check the target collision, premature collision, non-target collision and accident type.

[0101] S62. Perform similarity deduplication;

[0102] The combined distance between the two valid scenarios is shown in Equation (18):

[0103]

[0104] In the formula, For the first The first scenario and the first The overall distance between each scene; and For scene indexing; For trajectory distance weights; Distance weights are conditional parameters; Distance weight at the moment of collision; The number of vehicles included in the comparison; To standardize the number of sampling times; Index for vehicles; For sampling time index; The normalized scale for location distance; and For the first of the two scenarios The car at any time Location; and This is the normalization condition vector; and This marks the moment of the first collision between the two scenarios; For scene duration; It is a norm 2; It is the absolute value;

[0105] The beneficial effects of this invention are as follows:

[0106] 1) This invention uses a small number of real accident scenarios as prototypes. By perturbing and sampling road conditions, vehicle initial state, action time and target collision conditions, and combining random vectors to generate long-tailed accident scenarios in batches, the number of accident scenario samples is expanded, which alleviates the problems of difficulty in collecting real accident data, high risk of reproduction and high labeling cost.

[0107] 2) This invention combines a condition generator with physical information constraints, and introduces constraints on vehicle kinematic residuals, road boundaries, states and control ranges during the training process to improve the continuity, physical executability and road range compliance of the generated trajectory.

[0108] 3) This invention guides designated vehicles to make their first contact at the target time by constraining the first collision of the target vehicle, and suppresses early collisions and collisions with non-target vehicles, so that the generated scenario is more in line with the preset accident type and accident evolution conditions.

[0109] 4) This invention uses Latin hypercube sampling to improve the coverage uniformity of the candidate condition space, and encourages different random vectors to generate different trajectory results through diversity loss, thereby improving the diversity of generated scenarios in terms of initial state, motion process, collision time and contact position, and supporting the generation of conditions for multiple accident types.

[0110] 5) This invention employs distance-based adversarial loss and gradient penalty, which helps improve the stability of adversarial training under small sample conditions; combined with real trajectory supervision and physical residual constraints, the generated results take into account both the authenticity of accident trajectories and physical rationality.

[0111] 6) This invention eliminates scenarios that do not meet the preset requirements through physical screening and reduces duplicate samples through similarity deduplication; the constructed database contains data such as road, vehicle status, control variables, accident types, collision information, authenticity scores and physical errors, which can be used for closed-loop simulation testing of autonomous driving decision-making, planning and control modules, and provide data support for algorithm training and safety assessment in long-tail risk scenarios. Attached Figure Description

[0112] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0113] Figure 1 This is a flowchart of the present invention;

[0114] Figure 2 Generate adversarial network architecture diagrams from physical information;

[0115] Figure 3 The method of this invention generates the trajectory result diagram for scenario 1;

[0116] Figure 4 The trajectory result diagram for scenario 2 is generated by the method of the present invention. Detailed Implementation

[0117] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0118] Example 1

[0119] See Figure 1 and Figure 2 This embodiment provides a method for generating long-tailed incident scenarios based on physical information generative adversarial networks, including the following steps:

[0120] S1. Construct a small sample long-tailed accident prototype set and unify the scene representation.

[0121] The system reads road boundaries, lane centerlines, vehicle dimensions, and multi-vehicle trajectory data from accident scenarios. It performs time synchronization, coordinate unification, and anomaly checks on different scenarios, and records the accident type, target collision vehicle pair, and the time of the first collision to form a standardized accident prototype set. The specific method is as follows:

[0122] S11. Establish a set of accident prototypes;

[0123] Let the set of small-sample accident prototypes be as shown in equation (1):

[0124]

[0125] In the formula, A set of accident prototypes; For the first A prototype of the accident; For accident prototype index; The number of prototypes of the accident; For the first The prototype's road geometry and drivable area; For the first The observation trajectories of all traffic participants in the prototype; For the first Accident type identifier for each prototype; and For the first The target collision vehicle number in the prototype; For the first The moment of the first collision of the prototype;

[0126] S12, Define vehicle status and control variables;

[0127] No. The car in physical time The state vector and control vector are shown in equation (2):

[0128]

[0129] In the formula, For the first The car in physical time The state vector; Index for vehicles; and These are the longitudinal and lateral coordinates of the vehicle's center, respectively. For vehicle speed; This refers to the vehicle's heading angle; For the first The car in physical time The control vector; It is longitudinal acceleration; Front wheel steering angle; superscript Indicates vector transpose;

[0130] The prototype data is synchronized in time, checked for outliers, and has its coordinates unified. The tangential direction of the road centerline is used as the longitudinal direction, and its normal direction is used as the lateral direction. Missing time points are filled in using an interpolation method that maintains speed continuity. Observation points that clearly exceed the vehicle's capacity are marked. Only reliable observation intervals are used for data supervision.

[0131] S2. Establish candidate scenario conditions and random input.

[0132] Based on the selected accident prototype, parameters such as road curvature, lane width, vehicle initial position, initial speed, action start time, and target collision time are perturbed and sampled. Invalid conditions such as initial overlap and vehicle crossing the boundary are eliminated. A random vector and accident type identifier are configured for each set of candidate conditions. The specific method is as follows:

[0133] S21. Generate candidate conditions based on the accident prototype;

[0134] No. In the candidate scenario, the first The conditional parameters are generated according to equation (3):

[0135]

[0136] In the formula, For the first In the candidate scenario, the first Unrestricted sampled values ​​of each parameter; Candidate parameters are limited to the physical range; Indexing candidate scenes; For conditional parameter index; The first selected accident prototype Each parameter value; For the first The candidate scenario is in the Sampled values ​​in each parameter dimension, and ; For the first The perturbation amplitude allowed by each parameter; and The first The physical lower limit and physical upper limit of each parameter. When When it exceeds the allowable range, Take the nearest boundary value;

[0137] The candidate condition vector includes road curvature, lane width, number of vehicles, vehicle size, initial position of each vehicle, initial speed, initial heading angle, start time of action, target collision vehicle pair and the first collision time of the target. The sampling adopts the Latin hypercube method to ensure that the limited number of candidate conditions uniformly cover the allowable range. After sampling, a pre-check is performed to remove conditions with overlapping initial states, vehicles located outside the road, and target collision time earlier than the start time of action.

[0138] S22. Configure random vectors and accident type conditions;

[0139] Each candidate condition is configured with a random vector. Random vectors do not directly represent a physical quantity, but are used to control trajectory details, including changes in braking intensity, lane change speed, and subtle differences when approaching the collision point. Accident Types By inputting discrete labels into the generator and discriminator, the same network can generate collision scenarios such as rear-end collisions, lane change side collisions, or intersection conflicts.

[0140] S3. Construct a physical information condition generator.

[0141] The generator inputs normalized time, candidate scene conditions, random vectors, and vehicle number features to output the state increment, acceleration, and front wheel angle of each vehicle, and obtains continuous state trajectories based on the sampled initial states. Then, it combines the states and control variables of each vehicle in a unified time sequence to form a complete scene sequence. The specific method is as follows:

[0142] S31. Construct a physical information condition generator;

[0143] The generator's input / output and initial state mapping is shown in equation (4):

[0144]

[0145] In the formula, For physical information condition generator; These are the generator parameters; Normalized time; For the first A conditional vector for each candidate scenario; For the first A random vector of candidate scenarios; For the first Vehicle identification number characteristics; The state increment output by the generator; To generate control variables; This is the generated state; This is the initial state for sampling; Physical time; For scene duration;

[0146] The generator uses a time-coded multilayer perceptron. Time, road conditions, vehicle conditions, accident type, and random vectors are encoded and concatenated before being input into a shared hidden layer. The shared hidden layer learns the motion patterns that different vehicles follow. The vehicle number feature is used to distinguish the initial state and task of each vehicle. The output provides the state increment, acceleration, and front wheel angle, enabling the network to calculate continuous states at any time position.

[0147] In this invention, the physical information neural network is not a second network independent of the generator, but is realized through the generator structure and physical loss. The generator receives realism feedback from the discriminator on the one hand, and physical feedback from the vehicle motion equation and road conditions on the other hand. This retains the random generation capability of the generative adversarial network, while making the random results subject to clear physical constraints.

[0148] S32. Form a complete scene sequence;

[0149] For a unified set of sampling times, the generated states and control variables of each vehicle are combined into a scene sequence in chronological order. When the number of vehicles is less than the maximum number of channels, empty channels are ignored using an effective vehicle mask. When the number of vehicles changes, the number of effective vehicles is recorded in the conditional vector. To avoid training imbalance caused by different units, position, velocity, angle, acceleration, and time are normalized according to preset scales, and then restored to the actual physical units after generation.

[0150] S4. Construct a condition discriminator and conduct stable adversarial training.

[0151] The complete state sequence, control sequence, vehicle relative motion features, candidate scene conditions, and accident type identifier are input into the discriminator, which outputs a scene authenticity score. Distance-based adversarial loss and gradient penalty are used to alternately train the generator and discriminator to improve training stability under small sample conditions. The specific method is as follows:

[0152] S41. Construct a condition discriminator.

[0153] The discriminator gives a realism score for the complete scene sequence, as shown in Equation (5):

[0154]

[0155] In the formula, For the first The authenticity score for each scenario; For conditional discriminators; These are the parameters for the discriminator; For the first The state sequence of all vehicles in a given scenario; For the first The control sequence of all vehicles in a given scenario; For the first Conditional vectors for each scenario; For the first The system identifies accident types for each scenario. The discriminator employs a network structure that combines temporal feature extraction with multi-vehicle interaction fusion. First, the trajectory features of vehicles at each sampling time, such as state, control variables, relative distance, relative speed, and lane departure, are encoded and concatenated with normalized time encoding, conditional vectors, and accident type encoding. Then, a shared temporal feature extraction layer extracts the motion evolution features of each vehicle before and after the accident, and a vehicle interaction aggregation layer fuses the relative motion relationships between different vehicles. For scenarios where the number of vehicles is less than the maximum number of lanes, an effective vehicle mask is used to block empty vehicle lanes to avoid invalid data from participating in feature calculation. After feature aggregation in the time and vehicle dimensions, the obtained scenario-level features are input into a multilayer perceptron, which outputs a continuous score representing the authenticity of the entire scenario. The discriminator learns the temporal motion patterns commonly found in real accident scenarios through shared parameters and determines whether the generated trajectory matches the specified road conditions, vehicle conditions, and accident task through conditional vectors and accident type identifiers.

[0156] S42. Employ distance-based adversarial training and gradient penalty;

[0157] The discriminator loss is shown in equation (6):

[0158]

[0159] In the formula, For discriminator loss; To generate a scene; This is a real accident scenario; The discrimination criteria consist of candidate conditions and accident types; For conditional discriminators; To take the average of the training batches; The weights are used for gradient penalty. The interpolated scene between the real scene and the generated scene; To calculate the gradient for the interpolation scenario; It is a norm 2;

[0160] Equation (6) adopts distance-based adversarial training; the discriminator increases the score of the real scene and decreases the score of the generated scene. Gradient penalty is used to limit the discriminator from changing too quickly, thereby reducing the training oscillation of ordinary generative adversarial networks under small sample conditions; each time the generator is updated, the discriminator is updated several times first to keep the realism evaluation stable.

[0161] The adversarial loss of the generator is shown in equation (7):

[0162]

[0163] In the formula, For the generator's adversarial loss; For conditional discriminators; To generate a scene; As a condition for judgment; To average the generated scene batches. Minimize It will improve the realism score of the generated scene, making the generated trajectory closer to real accident data in terms of overall trend.

[0164] S5. Add physical and accident constraints during generator training.

[0165] Automatic differentiation is used to calculate the residuals of the vehicle's motion equations, and constraints are imposed on road boundaries, velocity, acceleration, and front wheel steering angle. Simultaneously, the vehicle is required to make its first contact at the target time to avoid premature collisions and non-target collisions. By combining real trajectory supervision, diversity constraints, and control smoothing constraints, the generated results possess realism, physical plausibility, and diversity. The specific method is as follows:

[0166] S51. Establish vehicle kinematic constraints;

[0167] The motion of the vehicle is described using a kinematic bicycle model, as shown in equation (8):

[0168]

[0169] In the formula, and The first The derivatives of the vehicle's longitudinal and lateral coordinates with respect to time; For the first The speed of the vehicle; For the first The vehicle's heading angle; This is the derivative of velocity with respect to time. It is longitudinal acceleration; This is the derivative of the heading angle with respect to time. For the first The wheelbase of the vehicle; The steering angle of the front wheels; , and Trigonometric functions;

[0170] The derivative of the state with respect to time is generated using automatic differentiation, and physical checkpoints are placed within the scene time range; the kinematic loss is shown in equation (9):

[0171]

[0172] In the formula, For kinematic loss; The number of scenes in a training batch; The number of physical checkpoints for each scene; For scene indexing; For physical checkpoint index; For the first Number of valid vehicles in each scenario; Index for vehicles; For the first One normalization check moment; For the fourth equation of motion in equation (8), in the th... The first scenario, the first Vehicles and times The residual vector at the location; It is a 2-norm.

[0173] Physical checkpoints do not require actual measurements; their purpose is to check whether the trajectory satisfies the equation of motion between observation points. Checkpoints cover the entire scene time period. Therefore, a small amount of actual data is used to determine the main motion trend, and the vehicle motion equation is used to supplement the constraints of unobserved time periods.

[0174] S52. Establish a small amount of real trajectory supervision;

[0175] The real trajectory supervision loss is shown in Equation (10):

[0176]

[0177] In the formula, Loss is monitored for the actual trajectory; A set of reliable observation indexes; For reliable observation quantity; For accident prototype index; Index for vehicles; Index for observation time; This is the weight matrix for the state dimension; For the generator in the first The prototype, the first Vehicles and times The generation state at that location; To correspond to the actual state; It is a 2-norm.

[0178] The loss is calculated only at reliable observation times of real samples, and it is not required that each time point be labeled. To avoid the generator simply copying a certain prototype trajectory, the batch of real samples should be drawn evenly among different prototypes and combined with different candidate conditions and random vectors.

[0179] S53. Establish road and state range constraints.

[0180] The road boundary loss is shown in equation (11):

[0181]

[0182] In the formula, Loss due to road boundary; For the number of batch scenarios; This refers to the number of physical checkpoints. For scene indexing; For checkpoint index; For the first Number of valid vehicles in each scenario; Index for vehicles; It is a linear rectified function; The safety margin between the vehicle's center and the road boundary; For the first The road in each scene has a signed distance function, which is positive inside the road, zero at the boundary, and negative outside the road; To generate the vehicle's center position; This is the time for normalization checks.

[0183] For any restricted physical quantity, a two-sided over-limit penalty is applied, as shown in equation (12):

[0184]

[0185] In the formula, physical quantity Bilateral boundary crossing penalties; The speed, acceleration, and front wheel angle to be checked; This is the lower limit of allowable limits; This is the maximum allowed limit; It is a linear rectified function. When When within the allowable range, The value is zero. The average penalty across all vehicles and inspection times is used to obtain the state and control range loss. .

[0186] S54. Establish the first collision constraint for the target;

[0187] To facilitate continuous training, the vehicle is approximated as an oriented ellipse with longitudinal and lateral dimensions. The separation between the two vehicles is shown in equation (13):

[0188]

[0189] In the formula, For vehicles With vehicles At physical moment The amount of separation; and Index for vehicles; This represents the longitudinal component of the relative position of the two vehicles in the average heading direction; This represents the lateral component of the relative position of the two vehicles along the average heading normal. The combined longitudinal dimension is determined by the lengths of the two vehicles; The combined lateral dimension is determined by the widths of the two vehicles; It is the square root. When The two cars separated at that time. When the two vehicles came into contact, The two vehicles collided.

[0190] The initial collision loss of the target is shown in Equation (14):

[0191]

[0192] In the formula, Loss due to collision with the target; and To specify the vehicle number involved in the collision; The moment of collision with the target; The separation amount of the target vehicle pair at the target time; For the target vehicle in The penalty for maintaining separation previously; Penalties for non-target vehicles to maintain safe separation.

[0193] in, Calculations are performed at several pre-collision inspection points, when the separation distance of the target vehicle is less than a preset value. Punishment will be imposed at that time; Calculations were performed at all physical checkpoints, when the separation amount of the non-target vehicle pair was less than the safety value. Punishment will be imposed at that time.

[0194] S55. Establish diversity constraints;

[0195] To prevent different random vectors from generating approximately the same trajectory, pairs of random vectors are extracted from the same candidate condition, and the diversity loss is calculated, as shown in Equation (15):

[0196]

[0197] In the formula, For the loss of diversity; The number of random vector pairs; For a set of pairs; and For scene indexing; It is a linear rectified function; The difference coefficient is a random vector. and These are two random vectors under the same candidate condition; It is a norm 2; The trajectory difference coefficient; The average position and velocity distance of the two sets of generated trajectories; and Generate the corresponding state sequence.

[0198] When the difference between two random vectors is large while the difference in the generated trajectories is too small, Equation (15) imposes a penalty. This constraint only encourages reasonable differences within the allowable range. The generated trajectory still needs to simultaneously satisfy vehicle motion, road, and collision conditions, so it will not generate unreasonable motion in order to increase the difference.

[0199] S56. Construct the overall training objective for the generator;

[0200] The total loss of the generator is shown in equation (16):

[0201]

[0202] In the formula, This represents the total loss of the generator; To combat the losses; Loss is monitored for the actual trajectory; For kinematic loss; Loss due to road boundary; Loss of state and control range; The initial collision loss to the target; Losses due to accident type; For the loss of diversity; For the smoothing loss of acceleration and rotation angle changes; , , , , , , , and These are the non-negative weights corresponding to the loss.

[0203] S6. Batch generate candidate scenes and build a database;

[0204] The trained generator is used to generate scenes in batches under different candidate conditions and random vectors. Conditions such as road range, kinematic error, control exceedance, target collision, and accident type are checked sequentially. Valid scenes that meet the requirements are retained, and similarity deduplication is performed based on trajectory, condition parameters, and collision time to ultimately form a long-tailed accident scene database. The specific method is as follows:

[0205] S61, Batch generation and physical filtering.

[0206] After training, scenarios are generated in batches based on different candidate conditions and random vectors. The valid identifiers for each generated scene are shown in Equation (17):

[0207]

[0208] In the formula, For the first A valid identifier for each generated scene, take Indicates validity, take Indicates invalid; For indicator functions; For kinematic error; This refers to the error caused by the road crossing the boundary. For state and control exceeding the limit error; For target collision error; Error due to accident type; , , , and These are the allowable thresholds for the corresponding errors; This means that all conditions must be met simultaneously;

[0209] The screening is conducted in order of increasing complexity: first check the initial state, road range, and control variables; then check the kinematic errors; and finally check the target collision, premature collision, non-target collision, and accident type.

[0210] S62. Perform similarity deduplication;

[0211] The combined distance between the two valid scenarios is shown in Equation (18):

[0212]

[0213] In the formula, For the first The first scenario and the first The overall distance between each scene; and For scene indexing; For trajectory distance weights; Distance weights are conditional parameters; Distance weight at the moment of collision; The number of vehicles included in the comparison; To standardize the number of sampling times; Index for vehicles; For sampling time index; The normalized scale for location distance; and For the first of the two scenarios The car at any time Location; and This is the normalization condition vector; and This marks the moment of the first collision between the two scenarios; For scene duration; It is a norm 2; It is an absolute value.

[0214] when When the deduplication threshold is less than 1, only scenarios with smaller physical errors or higher accuracy scores are retained. Deduplication is performed within the same accident type and the same number of vehicles. Each record in the database includes at least the road boundary, lane center line, vehicle type and size, candidate conditions, random vector, complete state sequence, control sequence, accident type, target collision vehicle pair, first collision time, collision relative speed, accuracy score, and various physical errors.

[0215] In summary, this invention uses a small number of real-world accident scenarios as prototypes, sampling the initial state of the vehicle, road conditions, and target collision conditions around these prototypes. It constructs a generative adversarial network (GAN) consisting of a condition generator and a condition discriminator, where the condition generator also functions as a physical information neural network, outputting continuous state trajectories and control variables for multiple traffic participants. Joint training is performed using real trajectory supervision, adversarial loss, vehicle kinematic residuals, road boundaries, control range, initial target collision, and diverse constraints. Finally, the generated results undergo physical filtering and similarity deduplication to form a long-tail accident scenario database. This invention can construct a rich and diverse long-tail accident scenario database, improving the adaptability of autonomous vehicles to long-tail accident scenarios, enhancing their driving safety in the real world, and facilitating their industrialization.

[0216] Example 2

[0217] This embodiment selects a small number of coordinate-aligned lane change side collision accident clips as prototypes. Each clip includes the road boundary, lane centerline, and the positions, speeds, and heading angles of 3 to 6 vehicles within 8 seconds before the accident, with a uniform output time interval of 0.1 seconds. A perturbation range of ±20% is set for the initial vehicle speed, ±30% for the longitudinal distance, and ±0.8 seconds for the lane change start time. The target collision time is set between 4 and 7.5 seconds, and Latin hypercube is used to generate candidate conditions. Each set of candidate conditions is configured with a 16-dimensional standard normal random vector to generate different braking and lane change details.

[0218] The physical information generator employs 8 hidden layers, each with 128 neurons, using the hyperbolic tangent function as the activation function. The discriminator uses 5 hidden layers, each with 128 neurons, and incorporates relative distance, relative speed, and lane departure as inputs. Each scene has 200 physical checkpoints, with 40% of these checkpoints located within 1.5 seconds of the target collision. The permissible vehicle speed range is set to 0 to 35 meters per second, the permissible longitudinal acceleration range is set to -8 to 4 meters per second squared, and the permissible front wheel steering angle range is set to -0.35 to 0.35 radians.

[0219] The first training phase uses only real trajectory, kinematics, road, and range loss to pre-train the generator. The second phase incorporates adversarial training with 5 discriminator updates corresponding to 1 generator update, and the gradient penalty weight is set to 10. The third phase introduces constraints on target collision, accident type, and diversity. The generation phase requires that the normalized kinematic mean square error be no greater than 0.001, the road boundary deviation be no greater than 0.05 meters, the target collision time error be no greater than 0.1 seconds, and there be no vehicle overlap before the target time. By changing the candidate conditions and random vectors, similar accident scenarios with different initial speeds, vehicle spacing, lane change times, collision times, and contact positions can be generated.

[0220] Scene 1 generated after training, as shown Figure 3 Scenario 2, for example Figure 4As shown in the figure, the trajectory color gradually transitions from cyan to purplish-red, representing the evolution of the vehicle's state over time. Scenario 1 involves 4 vehicles, with complex longitudinal and lateral movement relationships. Some vehicles maintain stable movement within their lanes, while the target vehicle gradually approaches adjacent vehicles through continuous lateral movement, forming a clear convergence trend at the end of the trajectory. Scenario 2 also involves 4 vehicles, with the target vehicle exhibiting a similar process of gradually shifting from its original lane to an adjacent lane. However, compared to Scenario 1, the starting position of the lane change, the magnitude of the lateral displacement, and the conflict area are different. The trajectories in both scenarios are generally continuous and smooth, without obvious positional jumps or unreasonable broken lines. Furthermore, different vehicles maintain differentiated movement trends, indicating that the proposed method can generate similar accident scenarios with different numbers of vehicles, initial distances, lane-changing processes, and conflict locations while satisfying basic motion continuity, demonstrating a certain degree of scenario diversity.

[0221] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for generating long-tailed incident scenarios based on physical information generative adversarial networks, characterized in that, include: S1. Construct a set of small-sample long-tailed accident prototypes and unify the scene representation; Read road boundary, lane center line, vehicle size and multi-vehicle trajectory data, complete time synchronization, coordinate unification and anomaly removal, and form a standardized prototype set; S2. Establish candidate scenario conditions and random input; Perturbation sampling is performed on road curvature, lane width, initial position and speed, action and collision time to eliminate invalid conditions and configure random vectors and accident labels for candidate conditions; S3. Construct a physical information condition generator; Input the normalized time, candidate scene conditions, random vector and vehicle number features into the generator, and output the state increment, acceleration and front wheel angle. Combine the initial state to obtain the continuous state trajectory; combine the vehicle's state and control variables to form a scene sequence. S4. Construct a conditional discriminator and conduct stable adversarial training; The state sequence, control sequence, relative motion features, candidate conditions, and accident labels are input into the discriminator, which outputs a authenticity score. The generator and discriminator are optimized alternately using distance-based adversarial loss and gradient penalty. S5. Add physical and accident constraints to generator training; Automatic differentiation is used to calculate the residuals of the vehicle's motion equations, and constraints are imposed on road boundaries, speed, acceleration, and front wheel steering angle. S6. Generate candidate scenes in batches and build a database; The generator generates scenes in batches, checks road range, kinematic errors, control exceedances, collisions and accident types, retains valid samples, and finally builds a long-tail accident scene database.

2. The method for generating long-tailed incident scenarios based on physical information generative adversarial networks according to claim 1, characterized in that, The specific method of S1 is as follows: S11. Establish a set of accident prototypes; Let the set of small-sample accident prototypes be as shown in equation (1): In the formula, A set of accident prototypes; For the first A prototype of the accident; For accident prototype index; The number of prototypes of the accident; For the first The prototype's road geometry and drivable area; For the first The observation trajectories of all traffic participants in the prototype; For the first Accident type identifier for each prototype; and For the first The target collision vehicle number in the prototype; For the first The moment of the first collision of the prototype; S12, Define vehicle status and control variables; No. The car in physical time The state vector and control vector are shown in equation (2): In the formula, For the first The car in physical time The state vector; Index for vehicles; and These are the longitudinal and lateral coordinates of the vehicle's center, respectively. For vehicle speed; This refers to the vehicle's heading angle; For the first The car in physical time The control vector; It is longitudinal acceleration; Front wheel steering angle; superscript Transpose of a vector; The prototype data is synchronized in time, checked for outliers, and has its coordinates unified. The tangential direction of the road centerline is used as the longitudinal direction, and the normal direction is used as the lateral direction. Missing time points are filled in using an interpolation method that maintains speed continuity. Observation points that exceed the vehicle's capacity are marked. Only reliable observation intervals are used for data supervision.

3. The method for generating long-tailed incident scenarios based on physical information generative adversarial networks according to claim 1, characterized in that, The specific method of S2 is as follows: S21. Generate candidate conditions based on the accident prototype; No. In the candidate scenario, the first The conditional parameters are generated according to equation (3): In the formula, For the first In the candidate scenario, the first Unrestricted sampled values ​​of each parameter; Candidate parameters are limited to the physical range; Indexing candidate scenes; For conditional parameter index; The first selected accident prototype Each parameter value; For the first The candidate scenario is in the Sampled values ​​in each parameter dimension, and ; For the first The perturbation amplitude allowed by each parameter; and The first The physical lower limit and physical upper limit of each parameter; when When it exceeds the allowable range, Take the nearest boundary value; The candidate condition vectors include road curvature, lane width, number of vehicles, vehicle size, initial position of each vehicle, initial speed, initial heading angle, start time of action, target collision vehicle pair and the first collision time of the target. The sampling adopts the Latin hypercube method to ensure that a limited number of candidate conditions uniformly cover the allowable range. After sampling, a pre-check is performed to remove conditions with overlapping initial states, vehicles located outside the road, and target collision time earlier than the start time of action. S22. Configure random vectors and accident type conditions; Each candidate condition is configured with a random vector. Random vectors do not directly represent a physical quantity, but are used to control trajectory details, including changes in braking intensity, lane change speed, and subtle differences when approaching the collision point; accident types. By inputting discrete labels into the generator and discriminator, the same network can generate collision scenarios such as rear-end collisions, lane change side collisions, or intersection conflicts.

4. The method for generating long-tailed incident scenarios based on physical information generative adversarial networks according to claim 1, characterized in that, The specific method of S3 is as follows: S31. Construct a physical information condition generator; The generator's input / output and initial state mapping is shown in equation (4): In the formula, For physical information condition generator; These are the generator parameters; Normalized time; For the first A conditional vector for each candidate scenario; For the first A random vector of candidate scenarios; For the first Vehicle identification number characteristics; The state increment output by the generator; To generate control variables; This is the generated state; This is the initial state for sampling; Physical time; For scene duration; The generator uses a time-coded multilayer perceptron. Time, road conditions, vehicle conditions, accident type, and random vectors are encoded and concatenated before being input into a shared hidden layer. The shared hidden layer learns the motion patterns that different vehicles follow. The vehicle number feature is used to distinguish the initial state and task of each vehicle. The output provides the state increment, acceleration, and front wheel angle, enabling the network to calculate continuous states at any time position. S32. Form a complete scene sequence; For a unified set of sampling times, the generated states and control variables of each vehicle are combined into a scene sequence in chronological order. When the number of vehicles is less than the maximum number of channels, empty channels are ignored using an effective vehicle mask. When the number of vehicles changes, the number of effective vehicles is recorded in the condition vector. Position, speed, angle, acceleration and time are normalized according to preset scales, and then restored to the actual physical units after generation.

5. The method for generating long-tailed incident scenarios based on physical information generative adversarial networks according to claim 1, characterized in that, The specific method of S4 is as follows: S41. Construct a condition discriminant; The discriminator gives a realism score for the complete scene sequence, as shown in Equation (5): In the formula, For the first The authenticity score for each scenario; For conditional discriminators; These are the parameters for the discriminator; For the first The state sequence of all vehicles in a given scenario; For the first The control sequence of all vehicles in a given scenario; For the first Conditional vectors for each scenario; For the first Accident type identification for each scenario; S42. Employ distance-based adversarial training and gradient penalty; The discriminator loss is shown in equation (6): In the formula, For discriminator loss; To generate a scene; This is a real accident scenario; The discrimination criteria consist of candidate conditions and accident types; For conditional discriminators; To take the average of the training batches; The weights are used for gradient penalty. The interpolated scene between the real scene and the generated scene; To calculate the gradient for the interpolation scenario; It is a 2-norm; The adversarial loss of the generator is shown in equation (7): In the formula, For the generator's adversarial loss; For conditional discriminators; To generate a scene; As a condition for judgment; This is to take the average of the generated scene batches.

6. The method for generating long-tailed incident scenarios based on physical information generative adversarial networks according to claim 1, characterized in that, The specific method of S5 is as follows: S51. Establish vehicle kinematic constraints; The motion of the vehicle is described using a kinematic bicycle model, as shown in equation (8): In the formula, and The first The derivatives of the vehicle's longitudinal and lateral coordinates with respect to time; For the first The speed of the vehicle; For the first The vehicle's heading angle; This is the derivative of velocity with respect to time. It is longitudinal acceleration; This is the derivative of the heading angle with respect to time. For the first The wheelbase of the vehicle; The steering angle of the front wheels; , and Trigonometric functions; The derivative of the state with respect to time is generated using automatic differentiation, and physical checkpoints are placed within the scene time range; the kinematic loss is shown in equation (9): In the formula, For kinematic loss; The number of scenes in a training batch; The number of physical checkpoints for each scene; For scene indexing; For physical checkpoint index; For the first Number of valid vehicles in each scenario; Index for vehicles; For the first One normalization check moment; For the fourth equation of motion in equation (8), in the th... The first scenario, the first Vehicles and times The residual vector at the location; It is a 2-norm; S52. Establish a small amount of real trajectory supervision; The real trajectory supervision loss is shown in Equation (10): In the formula, Loss is monitored for the actual trajectory; A set of reliable observation indexes; For reliable observation quantity; For accident prototype index; Index for vehicles; Index for observation time; This is the weight matrix for the state dimension; For the generator in the first The prototype, the first Vehicles and times The generation state at that location; To correspond to the actual state; It is a 2-norm; S53. Establish road and state range constraints; The road boundary loss is shown in equation (11): In the formula, Loss due to road boundary; For the number of batch scenarios; This refers to the number of physical checkpoints. For scene indexing; For checkpoint index; For the first Number of valid vehicles in each scenario; Index for vehicles; It is a linear rectified function; The safety margin between the vehicle's center and the road boundary; For the first The road in each scene has a signed distance function, which is positive inside the road, zero at the boundary, and negative outside the road; To generate the vehicle's center position; For normalization check timing; For any restricted physical quantity, a two-sided over-limit penalty is applied, as shown in equation (12): In the formula, physical quantity Bilateral boundary crossing penalties; The speed, acceleration, and front wheel angle to be checked; This is the lower limit of allowable limits; This is the maximum allowed limit; It is a linear rectified function; when When within the allowable range, The penalty is zero; the average penalty for all vehicles and inspection times is taken to obtain the state and control range loss. ; S54. Establish the first collision constraint for the target; The vehicle is approximated as an oriented ellipse with longitudinal and lateral dimensions, and the separation between the two vehicles is shown in equation (13): In the formula, For vehicles With vehicles At physical moment The amount of separation; and Index for vehicles; This represents the longitudinal component of the relative position of the two vehicles in the average heading direction; This represents the lateral component of the relative position of the two vehicles along the average heading normal. The combined longitudinal dimension is determined by the lengths of the two vehicles; The combined lateral dimension is determined by the widths of the two vehicles; It is the square root; when The two cars separated at that time. When the two vehicles came into contact, The two vehicles overlapped. The initial collision loss of the target is shown in Equation (14): In the formula, Loss due to collision with the target; and To specify the vehicle number involved in the collision; The moment of collision with the target; The separation amount of the target vehicle pair at the target time; For the target vehicle in The penalty for maintaining separation previously; Penalties for non-target vehicles to maintain safe separation; in, Calculations are performed at several pre-collision inspection points, when the separation distance of the target vehicle is less than a preset value. Punishment will be imposed at that time; Calculations were performed at all physical checkpoints, when the separation amount of the non-target vehicle pair was less than the safety value. Punishment will be imposed at that time; S55. Establish diversity constraints; Pairs of random vectors are drawn from the same candidate condition, and the diversity loss is calculated as shown in Equation (15): In the formula, For the loss of diversity; The number of random vector pairs; For a set of pairs; and For scene indexing; It is a linear rectified function; The difference coefficient is a random vector. and These are two random vectors under the same candidate condition; It is a 2-norm; The trajectory difference coefficient; The average position and velocity distance of the two generated trajectories; and Generate a corresponding state sequence; S56. Construct the overall training objective for the generator; The total loss of the generator is shown in equation (16): In the formula, This represents the total loss of the generator; To combat the losses; Loss is monitored for the actual trajectory; For kinematic loss; Loss due to road boundary; Loss of state and control range; The initial collision loss to the target; Losses due to accident type; For the loss of diversity; For the smoothing loss of acceleration and rotation angle changes; , , , , , , , and These are the non-negative weights corresponding to the loss.

7. The method for generating long-tailed incident scenarios based on physical information generative adversarial networks according to claim 1, characterized in that, The specific method of S6 is as follows: S61, Batch generation and physical filtering; After training, scenarios are generated in batches for different candidate conditions and random vectors; The valid identifiers for each generated scene are shown in Equation (17): In the formula, For the first A valid identifier for each generated scene, take Indicates validity, take Indicates invalid; For indicator functions; For kinematic error; This refers to the error caused by the road crossing the boundary. For state and control over-limit errors; For target collision error; Error due to accident type; , , , and These are the allowable thresholds for the corresponding errors; All conditions must be met simultaneously; The screening is conducted in order of increasing complexity: first check the initial state, road range and control variables, then check the kinematic errors, and finally check the target collision, premature collision, non-target collision and accident type. S62. Perform similarity deduplication; The combined distance between the two valid scenarios is shown in Equation (18): In the formula, For the first The first scenario and the first The overall distance between each scene; and For scene indexing; For trajectory distance weights; Distance weights are conditional parameters; Distance weight at the moment of collision; The number of vehicles included in the comparison; To standardize the number of sampling times; Index for vehicles; For sampling time index; The normalized scale for location distance; and For the first of the two scenarios The car at any time Location; and This is the normalization condition vector; and This marks the moment of the first collision between the two scenarios; For scene duration; It is a 2-norm; It is an absolute value.

Citation Information

Patent Citations

  • Multi-driving-style high-risk automatic driving cut-in scene test method and system

    CN121387751A

  • Automatic driving high-risk test scene generation method and device and storage medium

    CN121834227A