Method and device for generating simulation scene of autonomous vehicle

By acquiring and processing road information and dynamic data, determining the scene complexity and calculating the action reward function, generating a simulated scenario of strong adversarial vehicle trajectory, solving the problem of insufficient description of vehicle interaction behavior in the prior art and improving the autonomous driving vehicle training effect and driving safety.

CN119129378APending Publication Date: 2024-12-13BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411091531.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing simulation scenario construction of autonomous driving vehicles is difficult to fully describe the vehicle interaction behavior, making it difficult to generate simulation scenarios that meet the training needs of autonomous driving vehicles, especially in edge scenarios under extreme conditions.

Method used

By obtaining road information and dynamic data of autonomous driving vehicles, we determine the static and dynamic complexity of the scene, calculate the action reward function, and adjust the driving trajectory to generate a simulated scene with strong confrontational vehicle trajectory.

Benefits of technology

The quantification and adjustment of the multi-vehicle interaction process is realized, the interaction and confrontation of simulation scenarios are improved, the needs of training for autonomous driving vehicles are met, and the safety and stability during driving are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119129378A_ABST
    Figure CN119129378A_ABST
Patent Text Reader

Abstract

The invention provides a method and a device for generating a simulation scene of an automatic driving vehicle, and belongs to the technical field of automatic driving. The method comprises the following steps: acquiring road information of a target scene and dynamic data of an autonomous vehicle; determining the static complexity of a target scene based on the road information; determining the total complexity of the target scene based on the static complexity and the dynamic data; based on the total complexity, calculating to obtain an action reward function of the autonomous vehicle; and adjusting the driving track of the autonomous vehicle based on the action reward function to obtain a simulation scene with a highly antagonistic vehicle track. According to the scheme, the multi-vehicle interaction behavior can be trained by using the global information in the scene, and a simulation scene which better conforms to vehicle-vehicle interaction and confrontation in a real scene is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of autonomous driving technology, and in particular to a method and device for generating an autonomous driving vehicle simulation scene. Background Art

[0002] In order to ensure the safety and stability of autonomous vehicles during driving, all-round, multi-angle scenario-based testing and verification are required, especially for edge scenarios that are difficult to simulate under extreme conditions. In the current testing of autonomous vehicles, simulation testing of strong interactions between vehicles in scenarios such as traffic intersections is an extremely important part.

[0003] In real life, vehicle driving scenarios are often extremely complex due to the interactivity of vehicles and different road environments. The existing simulation scenario construction cannot fully describe the interactive behavior of traffic vehicles, which makes it difficult to generate simulation scenarios that meet the needs of autonomous driving vehicle training.

[0004] Based on this, there is an urgent need for a method and device for generating an autonomous driving vehicle simulation scene to solve the above technical problems. Summary of the invention

[0005] The embodiments of the present invention provide a method and device for generating a simulation scene for an autonomous driving vehicle, which can generate a simulation scene that meets the training needs of the autonomous driving vehicle.

[0006] In a first aspect, an embodiment of the present invention provides a method for generating a simulation scene of an autonomous driving vehicle, comprising:

[0007] Obtain road information of the target scene and dynamic data of the autonomous driving vehicle;

[0008] Based on the road information, determining the static complexity of the target scene;

[0009] Determining the total complexity of the target scene based on the static complexity and the dynamic data;

[0010] Based on the total complexity, an action reward function of the autonomous driving vehicle is calculated;

[0011] The driving trajectory of the autonomous driving vehicle is adjusted based on the action reward function to obtain a simulation scenario with a highly adversarial vehicle trajectory.

[0012] In a second aspect, an embodiment of the present invention further provides a device for generating a simulation scene of an autonomous driving vehicle, comprising:

[0013] An acquisition module, used to obtain road information of the target scene and dynamic data of the autonomous driving vehicle;

[0014] A first determination module, configured to determine the static complexity of a target scene based on the road information;

[0015] A second determination module, configured to determine the total complexity of the target scene based on the static complexity and the dynamic data;

[0016] A calculation module, configured to calculate an action reward function of the autonomous driving vehicle based on the total complexity;

[0017] An adjustment module is used to adjust the driving trajectory of the autonomous driving vehicle based on the action reward function to obtain a simulation scenario with a highly adversarial vehicle trajectory.

[0018] In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any embodiment of this specification is implemented.

[0019] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method described in any embodiment of this specification.

[0020] The embodiment of the present invention provides a method and device for generating a simulation scene of an autonomous driving vehicle. First, the road information and vehicle information in the target scene are obtained; then, the static complexity modeling of the simulation scene is completed according to the road information, and the dynamic complexity modeling of the simulation scene is completed according to the vehicle information. Then, the overall complexity model is obtained according to the static complexity and dynamic complexity, and finally, the model is trained according to a preset function to obtain a simulation scene library with multi-vehicle interaction trajectories. The method quantifies the scene complexity and couples the scene complexity calculated in real time with the multi-vehicle interaction model, thereby realizing the generation of simulation scenes that meet the needs of autonomous driving training, thereby improving the safety and stability of autonomous driving vehicles during driving. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 is a flow chart of a method for generating a simulation scene of an autonomous driving vehicle provided by an embodiment of the present invention;

[0023] Figure 2It is a structural diagram of a device for generating a simulation scene of an autonomous driving vehicle provided by an embodiment of the present invention;

[0024] Figure 3 is a hardware architecture diagram of a computer device provided by an embodiment of the present invention;

[0025] Figure 4 It is a schematic diagram of static complexity quantification provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0027] As mentioned above, in the process of constructing simulation scenes, the existing technology has poor interactivity between vehicles and the scenes are relatively simple, which leads to a large difference between the simulation scenes and the actual traffic scenes, making it difficult to obtain good simulation results.

[0028] Based on this, the concept of the present invention is to influence and adjust the multi-vehicle interaction process by quantifying the complexity of the scene, so as to obtain a multi-vehicle trajectory with strong interactivity and confrontation.

[0029] The specific implementation of the above concept is described below.

[0030] Please refer to Figure 1 , an embodiment of the present invention provides a method for generating a simulation scene of an autonomous driving vehicle, the method comprising:

[0031] Step 100, obtaining road information of a target scene and dynamic data of an autonomous driving vehicle;

[0032] Step 102, determining the static complexity of the target scene based on the road information;

[0033] Step 104, determining the total complexity of the target scene based on the static complexity and the dynamic data;

[0034] Step 106, calculating the action reward function of the autonomous driving vehicle based on the total complexity;

[0035] Step 108, adjusting the driving trajectory of the autonomous driving vehicle based on the action reward function to obtain a simulation scenario with a highly adversarial vehicle trajectory.

[0036] In the embodiment of the present invention, the road information and vehicle information in the target scene are first obtained; then the static complexity modeling of the simulation scene is completed according to the road information, and the dynamic complexity modeling of the simulation scene is completed according to the vehicle information, and then the overall complexity model is obtained according to the static complexity and dynamic complexity, and finally the model is trained according to the preset function to obtain a simulation scene library with multi-vehicle interaction trajectories. This method quantifies the scene complexity and couples the scene complexity calculated in real time with the multi-vehicle interaction model, thereby achieving the generation of simulation scenes that meet the needs of autonomous driving training, thereby improving the safety and stability of autonomous driving vehicles during driving.

[0037] Described below Figure 1 How the various steps are performed.

[0038] First, with respect to step 100, road information of the target scene and dynamic data of the autonomous driving vehicle are obtained.

[0039] In the embodiment of the present invention, the road information includes the latitude and longitude information of the road and the physical properties of the road, such as the width of the road, the height of the curb at the edge of the road, and the lane indicator lines on the road surface, etc.; the dynamic data includes the position coordinates, vehicle speed, acceleration and vehicle direction of the autonomous driving vehicle, etc. By obtaining these data and combining them with the preset neural network, the subsequent complexity calculation process can be carried out.

[0040] Then, for step 102 , the static complexity of the target scene is determined based on the road information.

[0041] In an embodiment of the present invention, the static complexity is determined by the following steps: encoding the road information to obtain a vector matrix of the road information; wherein the vector matrix includes a node feature matrix and an adjacency matrix; performing dimensionality reduction processing on the vector matrix to obtain implicit features of the vector matrix; reconstructing the implicit features to obtain a reconstructed adjacency matrix; and calculating the static complexity based on the reconstructed adjacency matrix.

[0042] Specifically, if Figure 4 As shown, the road information obtained in the previous step is first converted into a form of road features that can be accepted by the neural network. Then, this embodiment uses one-hot encoding to convert the road features into vectors, and uses a graph neural network to process the converted input vectors, thereby establishing a model for calculating the static complexity of the scene, wherein the scene static map is defined as:

[0043] G=(v,ε,A)

[0044] Among them, v is a node, ε is an edge, and A is an adjacency matrix, which is an n×n matrix, where n is the number of road nodes in the map. The elements in the matrix indicate whether there is an edge between the nodes, and the edge indicates the relationship between the nodes.

[0045] Furthermore, X is the input node feature matrix, where X∈R N×F is the basic unit in the graph, N represents the number of nodes in the graph, F is the number of features of each node, and node features refer to the attributes or feature vectors of each node. This embodiment uses a graph variational autoencoder (GCN) to reconstruct the original input from the extracted implicit representation, allowing the model to sample from the learned distribution to obtain implicit embeddings; and then reconstruct the original graph using the obtained implicit embeddings. The graph variational autoencoder can be defined as:

[0046] Z=GCN(X,A)

[0047] This formula regards GCN as a function, and then takes the node feature matrix X and adjacency matrix A of the static map as input, inputs them into the GCN function, and outputs Z∈R N×f , Z represents the implicit features of the nodes extracted by the GCN network, which is further expressed as follows:

[0048]

[0049] Where W 0 , W 1 These are the parameters of the neural network to be learned; ReLU is a nonlinear activation function.

[0050] It is worth noting that the graph variational autoencoder uses the inner product as a decoder to reconstruct the original graph data, that is, the map data:

[0051]

[0052] in, is the reconstructed (normalized) adjacency matrix.

[0053] The goal of the above graph variational autoencoder is to make the reconstructed adjacency matrix as similar as possible to the original adjacency matrix. Therefore, two losses need to be used to train the model during the reconstruction training process: reconstruction loss and KL divergence loss. The reconstruction loss is used to measure the ability of the model to reconstruct the information of the edge. The adjacency matrix predicted using the binary cross entropy loss is The difference between the actual adjacency matrix A and the KL divergence loss is used to ensure that the implicit representation of the model conforms to a certain preset distribution (such as normal distribution). Combining these two parts of the loss, the total loss for GCN model training is as follows:

[0054] TotalLoss=ReconLoss+λ×KLLoss

[0055] After obtaining the reconstructed adjacency matrix, the node features of each node are calculated using the following formula:

[0056]

[0057] Where W (l) are the parameters of the neural network to be learned; is the node feature of node i in layer l.

[0058] That is to say, firstly, the node feature H (l) Perform a linear transformation, which transforms the node features in the map to have an appropriate dimension and learns new features from the data; then the normalized adjacency matrix Multiplying with the linearly transformed features allows nodes to obtain information about their neighboring nodes, helping each node understand its context in the map. Finally, a nonlinear activation function ReLU is applied to introduce nonlinearity, ensuring that the complexity model can capture the nonlinear characteristics of static map data, enabling it to learn complex patterns from map data.

[0059] In order to determine the measure of static complexity, this embodiment introduces a norm for determination, that is, the larger the norm, the more complex the scene. By calculating the L2 norm of each node feature and taking the average value, a scalar value, that is, the static complexity of the scene, is obtained. The specific formula is as follows:

[0060]

[0061] In the formula, C s is the static complexity.

[0062] For step 104, based on the static complexity and dynamic data, determine the total complexity of the target scene

[0063] The existing technology often only uses the dynamic data of the vehicle to complete the construction of the simulation scene, which greatly affects the authenticity and practicality of the simulation scene. Therefore, the embodiment of the present invention adopts the method of adding static complexity as an additional feature of the vehicle trajectory, that is, adding it to the characteristics of each trajectory input by the dynamic complexity model, and inputting it into the encoder together with the original dynamic data to calculate the dynamic complexity. The result is the total complexity that includes both road information and dynamic data.

[0064] In an embodiment of the present invention, the total complexity is determined by the following process: merging the static complexity and dynamic data to obtain an extended vector sequence of the target scene; wherein the extended vector sequence is provided with a position code for characterizing the interactive state of the trajectory of the autonomous driving vehicle; the matrix obtained by converting the extended vector sequence is input into a preset encoder to obtain an output matrix; the extended vector sequence and the output matrix are reconstructed to obtain a reconstructed matrix; based on the reconstructed matrix, the total complexity of the target scene is calculated.

[0065] Specifically, the static complexity of each node obtained above is combined with the original dynamic data to form an extended feature vector The extended vector is then input into a preset Transformer neural network with an attention mechanism to learn the temporal and spatial associations between adjacent vehicles, thereby better capturing interaction information. The Transformer network generates a new representation based on the vehicle state information in this vector, including the interaction features between vehicles, encodes the input sequence through the Transformer encoder, and uses the Transformer decoder to decode the encoded output with the original input before encoding, and finally reconstructs the input sequence.

[0066] For example, taking the intersection scenario as an example, there are T vehicles in a time step, and the expansion vector of each vehicle obtained by the above process is Then merge these T vectors into an extended vector sequence S:

[0067]

[0068] Since the order of sequence S reflects the driving order of vehicles and their relative positions on the road, introducing position encoding and adding a time-step-related feature to the trajectory data can help the Transformer network understand the interaction between vehicle trajectories at different time steps. That is, adding sequence S to position encoding P gives:

[0069] S′=S+P

[0070] Then the new trajectory sequence S′ with position encoding added is input into the Transformer network. The three different weight matrices provided by the encoder of the Transformer network convert the new trajectory sequence into Query (Q), Key (K) and Value (V) matrices, and the three matrices are calculated as follows:

[0071]

[0072] Use the Transformer encoder block to perform nonlinear transformation and feature extraction on the output of the self-attention layer:

[0073] FFNOutput=ReLU(AttentionOutput W 1 +b 1 )W 2 +b 2

[0074] Finally, we get an output matrix of shape (T, d′), where d′ is the output of the last encoder layer. The output of the encoder layer is used as the input of the next encoder layer, so as to pass and extract higher-level feature representations layer by layer. Set the output of the last encoder layer to O encoder , the decoder receives the encoder output O encoder And the new trajectory sequence S′ as input, generating a reconstruction matrix O:

[0075] O = dynamic_decoder(O encoder ,S′)

[0076] The mean square error (MSE) is used as the loss function to adjust the error between the training reconstruction matrix and the original output matrix to minimize the reconstruction loss. After the training is completed, the L2 norm of each time step is calculated according to the reconstruction matrix and the average value is taken. t is the output of the encoder at time t, and the total complexity of the scene is C total for:

[0077]

[0078] With respect to step 106 , the action reward function of the autonomous driving vehicle is calculated based on the total complexity.

[0079] In an embodiment of the present invention, the reward function obtained by the vehicle in the simulation environment is designed in combination with the scene complexity. Complexity is used as an important indicator to guide the intelligent agent in the scene to conduct efficient and interactive exploration. The reward function is coupled with the complexity, and its calculation directly depends on the value of the scene complexity.

[0080] Specifically, the reward function is designed from two perspectives: global and local, including four aspects: global reward, complex action reward, bad interaction reward, and good interaction reward. Among them, the reward function considered by the global reward focuses on the changes in the entire environment (scene), sets the complexity itself as part of the reward, and multiplies the scene complexity by a factor to get the global reward R s :

[0081] R s =C total×γ

[0082] In the formula, γ is the influence coefficient of complexity on the reward function, which can be determined in experiments.

[0083] For local rewards, it is necessary to convert the real-time scene complexity into reward weights and penalty weights, and enlarge or reduce the local rewards based on the complexity weights, where the reward weight w reward :

[0084] w reward =log(C r +ε)+1

[0085] Penalty weight w penalty is a linear function that decreases as complexity increases, also encouraging autonomous vehicles to explore and perform actions at higher complexity:

[0086] w penalty =1-C r

[0087] The reward function for local considerations focuses on the interactions of intelligent agents and is defined from three aspects: rewarding complex action attempts (process), penalizing bad interactions, and rewarding effective interactions (results).

[0088] The reward based on complex actions is: if the autonomous vehicle attempts to perform complex actions (such as lane change attempts or overtaking attempts), it will receive a fixed action reward. Assume that the autonomous vehicle at time t 1 and t 2 (t 2 >t 1 ) are P t1 and P t2 , the first autonomous vehicle is p A , the speed is v A , the second autonomous vehicle is p B , the speed is v B , Lane change is defined by observing the position change of the intelligent driving vehicle and the position of the lane line. Overtaking involves the relative position and speed of the two agents, which are specifically defined as follows:

[0089]

[0090] In the formula, action c Complex actions for vehicles, including lane change actions 1 and overtaking action 2 ,in:

[0091]

[0092] If the autonomous vehicle has performed an adverse interaction, such as a collision, veer off the road, deviate from the intended route, or drive in the wrong direction, it will be penalty To punish the autonomous vehicle, the bad interaction reward R b Defined as:

[0093]

[0094] In the formula, event b Adverse interaction events.

[0095] If the task performed by the autonomous vehicle includes effective interaction or reaching the task goal, then according to w reward Get task rewards, that is, good interaction rewards R v Defined as:

[0096]

[0097] In the above formula, the distance and relative acceleration between autonomous vehicles are defined as indicators of effective interaction. The distance d between autonomous vehicle i and its nearest autonomous vehicle j is ij The position coordinates x of the autonomous driving vehicle i ,y i To calculate, use the Euclidean distance:

[0098]

[0099] In order to avoid mistaking two vehicles traveling side by side as being in effective interaction, an additional judgment condition is introduced, namely the relative direction θ of the vehicles. To distinguish vehicles that are close to each other just because they are traveling side by side from vehicles that are actually interacting, the angle between the direction vectors of the two vehicles should be less than a set threshold:

[0100]

[0101] Where v is the speed of the autonomous vehicle.

[0102] Total reward function R o That is:

[0103] R o =R s +R c +R b +R v

[0104] With respect to step 108 , the driving trajectory of the autonomous driving vehicle is adjusted based on the action reward function to obtain a simulation scenario with a highly adversarial vehicle trajectory.

[0105] In an embodiment of the present invention, a simulation scenario is determined by the following process: obtaining the real-time vehicle action of the autonomous driving vehicle; when the real-time vehicle action is a good interaction, using the action reward function to perform positive feedback adjustment on the real-time vehicle action to obtain a first adjustment result; when the real-time vehicle action is a bad interaction, using the action reward function to perform negative feedback adjustment on the real-time vehicle action to obtain a second adjustment result; calculating the first adjustment result and the second adjustment result to obtain an adjustment gradient value; when the adjustment gradient value is less than a preset convergence threshold, outputting a simulation scenario with a highly adversarial vehicle trajectory.

[0106] Specifically, this embodiment trains the semi-cooperative and semi-competitive multi-vehicle interaction model through the MADDPG algorithm, maximizes the global expected return by designing multiple actor-critic frameworks, and designs 6 fully connected layers for the four actor-critic networks. The ReLU activation function is used between the fully connected layers, and the output layer uses the activation function tanh to limit the output to a specific range to adapt to the continuous action space. Training includes sampling vehicle actions in a multi-vehicle interaction environment, executing these actions, and then observing the next state and reward obtained by the vehicle, and feedback adjustment of the autonomous driving vehicle based on the classification of the vehicle action. These adjustment experiences include the vehicle state before adjustment, the action set, the reward set, and the vehicle state after adjustment, which together constitute a four-tuple stored in the experience playback buffer.

[0107] Furthermore, a batch of actor and critic networks of training vehicles are randomly sampled, where the actor network is used to update the vehicle action, and the critic network evaluates the expected reward of taking a specific action behavior based on the adjusted vehicle action and updates the parameter θ of the actor network. The goal of the actor is to maximize this expected reward. In other words, when the action is expected to be performed by the vehicle, the vehicle is adjusted with positive feedback to increase the probability of the action being performed again, which is the first adjustment result; when the action is not expected to be performed by the vehicle, the vehicle is adjusted with negative feedback to reduce the probability of the action being performed again, which is the second adjustment result. The gradient value of the adjustment strategy is calculated for each adjustment result using the following formula:

[0108]

[0109] In the formula, θ i represents the parameters of the actor network of the i-th vehicle in the scene; E is the expected value; x represents the state set, which contains the state information of all vehicles; a represents the action set, which contains the actions of all vehicles.

[0110] When the gradient value is less than the preset convergence threshold, the vehicle's action and driving state have basically met the driving requirements in the actual environment. Then, feedback adjustment will be performed on the vehicle, and the vehicle's action will no longer change significantly. At the same time, the neural network's adjustment strategy for the vehicle's action will no longer be updated. By outputting this scene, a simulation scene with a highly adversarial vehicle trajectory can be obtained.

[0111] Please refer to Figure 2 , an embodiment of the present invention provides a device for generating a simulation scene of an autonomous driving vehicle, the device comprising:

[0112] An acquisition module 200 is used to acquire road information of a target scene and dynamic data of an autonomous driving vehicle;

[0113] A first determination module 202, configured to determine the static complexity of a target scene based on road information;

[0114] A second determination module 204, configured to determine the total complexity of the target scene based on the static complexity and the dynamic data;

[0115] A calculation module 206 is used to calculate an action reward function of the autonomous driving vehicle based on the total complexity;

[0116] The adjustment module 208 is used to adjust the driving trajectory of the autonomous driving vehicle based on the action reward function to obtain a simulation scenario with a strong adversarial vehicle trajectory.

[0117] In an embodiment of the present invention, when the first determination module 202 determines the static complexity of the target scene based on road information, it is specifically used to perform the following operations: encode the road information to obtain a vector matrix of the road information; wherein the vector matrix includes a node feature matrix and an adjacency matrix; perform dimensionality reduction processing on the vector matrix to obtain implicit features of the vector matrix; reconstruct the implicit features to obtain a reconstructed adjacency matrix; and calculate the static complexity based on the reconstructed adjacency matrix.

[0118] In the embodiment of the present invention, the static complexity is calculated by the following formula:

[0119] Z=GCN(X,A)

[0120]

[0121] In the formula, X is the node feature matrix; A is the adjacency matrix; Z is the hidden feature; ReLU is the nonlinear activation function; W 0 , W 1 and W (l) These are the parameters of the neural network to be learned; is the node feature of node i in layer l; C sis the static complexity.

[0122] In an embodiment of the present invention, when the second execution module 204 determines the total complexity of the target scene based on static complexity and dynamic data, it is specifically used to perform the following operations: merging the static complexity and dynamic data to obtain an extended vector sequence of the target scene; wherein the extended vector sequence is provided with a position code for characterizing the interactive state of the trajectory of the autonomous driving vehicle; inputting the matrix obtained by converting the extended vector sequence into a preset encoder to obtain an output matrix; reconstructing the extended vector sequence and the output matrix to obtain a reconstructed matrix; and calculating the total complexity of the target scene based on the reconstructed matrix.

[0123] In the embodiment of the present invention, the total complexity is calculated by the following formula:

[0124]

[0125] S′=S+P

[0126] O = dynamic_decoder(O encoder ,S′)

[0127]

[0128] Where, d i is dynamic data; S′ is the extended vector sequence; T is the number of autonomous driving vehicles; P is the position code; O encoder is the output matrix of the encoder output; O t is the reconstruction matrix at time t; C total is the total complexity.

[0129] In the embodiment of the present invention, the action reward function is calculated by the following formula:

[0130] R o =R s +R c +R b +R v

[0131] R s =C total ×γ

[0132]

[0133] w reward =log(C total +ε)+1

[0134] w penalty =1-C total

[0135] In the formula, Ro is the total reward; R s is the global reward; R c Reward for complex actions; R b is the bad interaction reward; R v is the reward for good interaction; γ is the influence coefficient of complexity on the reward function; w reward is the reward weight; w penalty is the penalty weight.

[0136] In an embodiment of the present invention, when the adjustment module 205 adjusts the driving trajectory of the autonomous driving vehicle based on the action reward function to obtain a simulation scene with a strongly adversarial vehicle trajectory, it is specifically used to perform the following operations: obtain the real-time vehicle action of the autonomous driving vehicle; when the real-time vehicle action is a good interaction, use the action reward function to perform positive feedback adjustment on the real-time vehicle action to obtain a first adjustment result; when the real-time vehicle action is a bad interaction, use the action reward function to perform negative feedback adjustment on the real-time vehicle action to obtain a second adjustment result; calculate the first adjustment result and the second adjustment result to obtain an adjustment gradient value; when the adjustment gradient value is less than a preset convergence threshold, output a simulation scene with a strongly adversarial vehicle trajectory.

[0137] It should be noted that the device for generating the simulation scene of an autonomous driving vehicle provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device for generating the simulation scene of an autonomous driving vehicle provided in the above embodiment and the method for generating the simulation scene of an autonomous driving vehicle belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0138] The embodiment of the present application also provides a computer device, please refer to Figure 3 The computer device includes a processor and a memory, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the method for generating an autonomous driving vehicle simulation scene provided by the above-mentioned method embodiments.

[0139] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the method for generating an autonomous driving vehicle simulation scene provided by the above-mentioned method embodiments.

[0140] An embodiment of the present application also provides a computer program product, which includes a computer program. A processor of a computer device reads the computer program from a computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method for generating an autonomous driving vehicle simulation scene as described in any of the above embodiments.

[0141] For the convenience of description, the above system or device is described by dividing it into various modules or units according to its functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0142] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0143] Finally, it should be noted that, in this article, relational terms such as first, second, third and fourth are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0144] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for generating a simulation scene for an autonomous driving vehicle, It is characterized in that include: Obtain road information of the target scene and dynamic data of the autonomous driving vehicle; Based on the road information, determining the static complexity of the target scene; Determining the total complexity of the target scene based on the static complexity and the dynamic data; Based on the total complexity, an action reward function of the autonomous driving vehicle is calculated; The driving trajectory of the autonomous driving vehicle is adjusted based on the action reward function to obtain a simulation scenario with a highly adversarial vehicle trajectory.

2. The method according to claim 1, It is characterized in that The determining the static complexity of the target scene based on the road information includes: Encoding the road information to obtain a vector matrix of the road information; wherein the vector matrix includes a node feature matrix and an adjacency matrix; Performing dimensionality reduction processing on the vector matrix to obtain implicit features of the vector matrix; Reconstructing the latent features to obtain a reconstructed adjacency matrix; The static complexity is calculated based on the reconstructed adjacency matrix.

3. The method according to claim 2, It is characterized in that The static complexity is calculated by the following formula: Z=GCN(X,A) Where X is the node feature matrix; A is the adjacency matrix; Z is the latent feature; ReLU is a nonlinear activation function; W 0 , W 1 and W (l) These are the parameters of the neural network to be learned; is the node feature of node i in layer l; C s is the static complexity.

4. The method according to claim 2, It is characterized in that The determining the total complexity of the target scene based on the static complexity and the dynamic data includes: The static complexity and the dynamic data are combined to obtain an extended vector sequence of the target scene; wherein the extended vector sequence is provided with a position code for characterizing the interactive state of the trajectory of the autonomous driving vehicle; Inputting the matrix obtained by converting the extended vector sequence into a preset encoder to obtain an output matrix; Reconstructing the extended vector sequence and the output matrix to obtain a reconstructed matrix; Based on the reconstruction matrix, the total complexity of the target scene is calculated.

5. The method according to claim 4, It is characterized in that The total complexity is calculated by the following formula: S′=S+P O=dynamic_decoder(O encoder ,S′) Where, d i is dynamic data; S ′ is the extended vector sequence; T is the number of autonomous driving vehicles; P is the position code; O encoder is the output matrix of the encoder output; O t is the reconstruction matrix at time t; C total is the total complexity.

6. The method according to claim 5, It is characterized in that The action reward function is calculated by the following formula: R o =R s +R c +R b +R v R s =C total ×γ R c =∑ actions action c R b =-(∑ events event b )×w penalty R v =2×(∑ interactions interaction v )×w reward w reward =log(C total +e)+1 w penalty =1-C total In the formula, R o is the total reward; R s is the global reward; R c Reward for complex actions; R b is the bad interaction reward; R v is the reward for good interaction; γ is the influence coefficient of complexity on the reward function; w reward is the reward weight; w penalty is the penalty weight.

7. The method according to claim 5, It is characterized in that The step of adjusting the driving trajectory of the autonomous driving vehicle based on the action reward function to obtain a simulation scenario with a strong adversarial vehicle trajectory includes: Obtaining real-time vehicle motion of the autonomous driving vehicle; When the real-time vehicle action is a good interaction, using the action reward function to perform positive feedback regulation on the real-time vehicle action to obtain a first regulation result; When the real-time vehicle action is a bad interaction, using the action reward function to perform negative feedback regulation on the real-time vehicle action to obtain a second regulation result; Calculating the first adjustment result and the second adjustment result to obtain an adjustment gradient value; When the adjustment gradient value is less than a preset convergence threshold, the simulation scene with the strong adversarial vehicle trajectory is output.

8. A device for generating a simulation scene of an autonomous driving vehicle, It is characterized in that include: An acquisition module, used to obtain road information of the target scene and dynamic data of the autonomous driving vehicle; A first determination module, configured to determine the static complexity of a target scene based on the road information; A second determination module, configured to determine the total complexity of the target scene based on the static complexity and the dynamic data; A calculation module, configured to calculate an action reward function of the autonomous driving vehicle based on the total complexity; An adjustment module is used to adjust the driving trajectory of the autonomous driving vehicle based on the action reward function to obtain a simulation scenario with a highly adversarial vehicle trajectory.

9. A computer device, It is characterized in that The computer device includes a memory and a processor, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to implement the steps of any one of the methods described in claims 1-7.

10. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.