Vehicle trajectory generation method and device

Through the adversarial learning training generator, real multi-vehicle trajectory and generation of multi-vehicle trajectory are used to generate multi-vehicle trajectory that conforms to real data, solving the problem of inaccurate generation of multi-vehicle trajectory in the existing technology, and improving the accuracy and authenticity of multi-vehicle trajectory.

CN114065870BActive Publication Date: 2025-08-19UNIV OF SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111404830.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-24
Publication Date
2025-08-19
Estimated Expiration
2041-11-24

AI Technical Summary

Technical Problem

The existing vehicle trajectory generation method can only generate bicycle trajectories, and fail to consider the interaction between the generated trajectory and surrounding vehicles, resulting in inaccurate generation of multi-vehicle trajectories.

Method used

The generator is trained using adversarial learning, using real multi-vehicle trajectories and generating multi-vehicle trajectories, and training is carried out through classification discriminators and regression discriminators to generate multi-vehicle trajectories that meet the real data, and using multi-vehicle position conditions and Gaussian process sampling to generate multi-vehicle trajectories.

Benefits of technology

The accuracy and authenticity of multi-vehicle trajectory generation are improved, and the generated multi-vehicle trajectory conforms to the spatial and temporal interaction characteristics in real data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114065870B_ABST
    Figure CN114065870B_ABST
Patent Text Reader

Abstract

The present invention provides a vehicle trajectory generation method. The method passes real multi-vehicle trajectories and generated multi-vehicle trajectories obtained based on multi-vehicle position conditions to a classification discriminator to obtain a first logit vector and a first eigenvector. The classification discriminator is trained using adversarial learning based on the first logit vector. The real multi-vehicle trajectories and generated multi-vehicle trajectories are passed to a regression discriminator to obtain a second logit vector and a second eigenvector. The regression discriminator is trained based on the second logit vector. A generator is trained using adversarial learning based on the first and second eigenvectors and the first and second logit vectors to obtain a target generator. The multi-vehicle position conditions and Gaussian process sampling are passed to the target generator to obtain a target multi-vehicle trajectory. In this process, the generator is trained based on the multi-vehicle position conditions and the adversarial algorithm. The target multi-vehicle trajectory can generate multi-vehicle trajectories with the same distribution as the real data, thereby improving the accuracy and authenticity of the multi-vehicle trajectory generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a vehicle trajectory generation method and device. Background Art

[0002] With the continuous advancement of mechanization and intelligence, intelligent driving has gradually become a research hotspot. In intelligent driving research, large numbers of vehicle trajectories are required for the design and verification of driving algorithms, as well as for the analysis and study of driving behavior. However, collecting large numbers of vehicle trajectories not only requires expensive equipment and complex trajectory processing steps, but also requires privacy considerations. Therefore, it is necessary to generate multi-vehicle trajectories.

[0003] The existing vehicle trajectory generation process can only generate single-vehicle trajectories without considering the interaction between the generated trajectory and surrounding vehicles, resulting in inaccurate generation of multi-vehicle trajectories. Summary of the Invention

[0004] In view of this, the present invention provides a vehicle trajectory generation method and device to solve the problem that the existing vehicle trajectory generation process can only generate a single vehicle trajectory, does not consider the interaction between the generated trajectory and surrounding vehicles, and leads to inaccurate generation of multiple vehicle trajectories. The specific solution is as follows:

[0005] A vehicle trajectory generation method, comprising:

[0006] During training, multiple vehicle position conditions and Gaussian process samples are obtained, and the multiple vehicle position conditions and Gaussian process samples are passed to a generator to generate multiple vehicle trajectories;

[0007] Acquire real multi-vehicle trajectories, pass the real multi-vehicle trajectories and the generated multi-vehicle trajectories to a classification discriminator to obtain a first logit vector and a first feature vector, and train the classification discriminator using adversarial learning based on the first logit vector;

[0008] During training, the real multi-vehicle trajectory and the generated multi-vehicle trajectory are passed to a regression discriminator to obtain a second logit vector and a second feature vector, and the regression discriminator is trained using an adversarial learning method based on the second logit vector;

[0009] During training, the generator is trained using adversarial learning based on the first eigenvector, the second eigenvector, the first logit vector, and the second logit vector to obtain a target generator;

[0010] After the training is completed, the multi-vehicle position conditions and the Gaussian process sampling are passed to the target generator to obtain the target multi-vehicle trajectory.

[0011] The above method optionally passes the multi-vehicle position conditions and the Gaussian process sampling to a generator to generate multi-vehicle trajectories, including:

[0012] The multi-vehicle position conditions are encoded based on the MLP to generate initial hidden states of forward sequential expression and reverse sequential expression;

[0013] The initial hidden state and the Gaussian process sampling are subjected to MLP encoding and the result is passed through a bidirectional GRU to obtain a forward sequential expression and a reverse sequential expression;

[0014] Transforming the time series features of the Gaussian process sampled after MLP encoding based on the forward sequential expression and the reverse sequential expression to obtain a time series encoding set;

[0015] Subtracting the temporal codes from the temporal code set to obtain a relative code set, performing an MLP transform and then an average pooling operation on the relative codes in the relative code set to obtain a target relative code set;

[0016] The target relative code set and the temporal code set are concatenated and then subjected to MLP encoding to obtain the generated multi-vehicle trajectory.

[0017] The above method optionally includes obtaining real multi-vehicle trajectories, passing the real multi-vehicle trajectories and the generated multi-vehicle trajectories to a classification discriminator to obtain a first logit vector and a first eigenvector, including:

[0018] Sequentially encode the real multi-vehicle trajectory and the generated multi-vehicle trajectory based on MLP encoding and bidirectional GRU;

[0019] Determining multi-vehicle relative trajectories based on the actual multi-vehicle trajectories and the generated multi-vehicle trajectories;

[0020] The relative trajectories of the multiple vehicles are encoded into a spatial relationship based on MLP encoding and average pooling operations;

[0021] A first logit vector and a first eigenvector are determined based on the sequential encoding and the spatial relationship encoding.

[0022] The above method optionally passes the real multi-vehicle trajectory and the generated multi-vehicle trajectory to a regression discriminator to obtain a second logit vector and a second feature vector, including:

[0023] Select a target vehicle, and extract a historical trajectory and a future trajectory of the target vehicle from the real multi-vehicle trajectory and the generated multi-vehicle trajectory;

[0024] The historical trajectory and the future trajectory are encoded based on MLP to obtain a first code and a second code;

[0025] Calculating the relative trajectory of the historical trajectory and the historical trajectories of other surrounding vehicles, and performing an MLP encoding and average pooling operation on the relative trajectory to obtain a third encoding;

[0026] The first code, the second code, and the third code are concatenated to determine a second logit vector and a second eigenvector based on the FC layer.

[0027] Optionally, the above method trains the generator using adversarial learning based on the first eigenvector and the second eigenvector to obtain a target generator, including:

[0028] Determining a classification discriminator loss function matched to the generator based on the first logit vector;

[0029] Determining a regression discriminator loss function matched to the generator based on the second logit vector;

[0030] Determine a generator loss function based on the first eigenvector, the second eigenvector, the first logit vector, and the second logit vector;

[0031] Based on the back-propagation algorithm, the classification discriminator loss function, the regression discriminator loss function and the generator loss function are made to reach Nash equilibrium to obtain the target generator.

[0032] A vehicle trajectory generating device, comprising:

[0033] A first generation module is configured to obtain multi-vehicle position conditions and Gaussian process samples during training, and pass the multi-vehicle position conditions and the Gaussian process samples to a generator to generate multi-vehicle trajectories;

[0034] a first training module, configured to obtain real multi-vehicle trajectories, pass the real multi-vehicle trajectories and the generated multi-vehicle trajectories to a classification discriminator to obtain a first logit vector and a first feature vector, and train the classification discriminator using adversarial learning based on the first logit vector;

[0035] a second training module, configured to, during training, pass the real multi-vehicle trajectories and the generated multi-vehicle trajectories to a regression discriminator to obtain a second logit vector and a second feature vector, and train the regression discriminator using adversarial learning based on the second logit vector;

[0036] A third training module is configured to train the generator using adversarial learning based on the first eigenvector and the second eigenvector to obtain a target generator during training;

[0037] The second generation module is used to pass the multi-vehicle position conditions and the Gaussian process sampling to the target generator to obtain target multi-vehicle trajectories after the training is completed.

[0038] In the above device, optionally, the first generating module includes:

[0039] A first generating unit is configured to generate initial hidden states of a forward sequential expression and a reverse sequential expression based on the multi-vehicle position condition using MLP encoding;

[0040] A first transformation unit is configured to perform a bidirectional GRU on the results of the MLP encoding of the initial hidden state and the Gaussian process sampling to obtain a forward sequential expression and a reverse sequential expression;

[0041] A second transformation unit is configured to transform the time series features of the Gaussian process sampled after MLP encoding based on the forward sequential expression and the reverse sequential expression to obtain a time series code set;

[0042] a transform and pooling unit, configured to subtract the temporal codes from the temporal code set to obtain a relative code set, perform an MLP transform on the relative codes in the relative code set, and then perform an average pooling operation to obtain a target relative code set;

[0043] The first encoding unit is configured to concatenate the target relative code set and the temporal code set and then perform MLP encoding to obtain the generated multi-vehicle trajectory.

[0044] In the above device, optionally, the first training module includes:

[0045] A second generating unit is configured to sequentially encode the real multi-vehicle trajectories and the generated multi-vehicle trajectories based on MLP encoding and bidirectional GRU;

[0046] a first determining unit, configured to determine a multi-vehicle relative trajectory based on the real multi-vehicle trajectory and the generated multi-vehicle trajectory;

[0047] A third generating unit is configured to obtain a spatial relationship encoding of the relative trajectories of the multiple vehicles based on MLP encoding and average pooling operations;

[0048] The second determining unit is configured to determine a first logit vector and a first eigenvector based on the sequential coding and the spatial relationship coding.

[0049] In the above device, optionally, the second training module includes:

[0050] An extraction unit is used to select a target vehicle and extract a historical trajectory and a future trajectory of the target vehicle from the real multi-vehicle trajectory and the generated multi-vehicle trajectory;

[0051] A second encoding unit, configured to obtain a first code and a second code by encoding the historical trajectory and the future trajectory based on MLP;

[0052] an encoding and pooling unit, configured to calculate a relative trajectory between the historical trajectory and the historical trajectories of other surrounding vehicles, and obtain a third encoding by performing MLP encoding and average pooling operations on the relative trajectory;

[0053] The third determining unit is configured to concatenate the first code, the second code, and the third code and determine a second logit vector and a second eigenvector based on an FC layer.

[0054] Optionally, the third training module of the above device includes:

[0055] a fourth determining unit, configured to determine a classification discriminator loss function matched with the generator based on the first logit vector;

[0056] a fifth determining unit, configured to determine a regression discriminator loss function matched with the generator based on the second logit vector;

[0057] a sixth determining unit, configured to determine a generator loss function based on the first eigenvector, the second eigenvector, the first logit vector, and the second logit vector;

[0058] A seventh determination unit is configured to achieve a Nash equilibrium among the classification discriminator loss function, the regression discriminator loss function, and the generator loss function based on a back-propagation algorithm to obtain the target generator.

[0059] Compared with the prior art, the present invention has the following advantages:

[0060] The present invention provides a vehicle trajectory generation method and device, comprising: passing real multi-vehicle trajectories and generated multi-vehicle trajectories obtained based on multi-vehicle position conditions to a classification discriminator to obtain a first logit vector and a first eigenvector, and training the classification discriminator using adversarial learning based on the first logit vector; passing the real multi-vehicle trajectories and the generated multi-vehicle trajectories to a regression discriminator to obtain a second logit vector and a second eigenvector, and training the regression discriminator based on the second logit vector; training a generator using adversarial learning based on the first eigenvector, the second eigenvector, the first logit vector, and the second logit vector to obtain a target generator; and passing the multi-vehicle position conditions and Gaussian process sampling to the target generator to obtain a target multi-vehicle trajectory. In the above process, the target generator is trained based on the multi-vehicle position conditions and the adversarial algorithm. The target multi-vehicle trajectory can generate multi-vehicle trajectories with the same distribution as the real data, thereby improving the accuracy and authenticity of the multi-vehicle trajectory generation. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0062] Figure 1 This is a structural block diagram of a vehicle trajectory generation method disclosed in an embodiment of the present application;

[0063] Figure 2 A flow chart of a vehicle trajectory generation method disclosed in an embodiment of the present application;

[0064] Figure 3 This is a structural block diagram of a generator disclosed in an embodiment of the present application;

[0065] Figure 4 A structural diagram of a classification discriminator disclosed in an embodiment of the present application;

[0066] Figure 5 This is a structural diagram of a regression discriminator disclosed in an embodiment of the present application;

[0067] Figure 6 A structural block diagram of a vehicle trajectory prediction model disclosed in an embodiment of the present application;

[0068] Figure 7 This is a structural block diagram of a vehicle trajectory generation device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0069] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0070] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

[0071] The present invention discloses a method and device for generating vehicle trajectories, which are applied to the process of generating multi-vehicle trajectories. Existing trajectory generation methods either fall within the scope of trajectory planning, fail to incorporate real-world trajectory data, or fail to reflect the spatiotemporal interaction characteristics between multiple vehicles. To generate trajectories that conform to the spatiotemporal interaction characteristics of multiple vehicles in real-world data, the present invention proposes using adversarial learning to train a generative model. The generative model is a neural network model that takes as input preset distribution samples and conditional data and outputs the trajectories of multiple vehicles in a scene. During the training process, the model learns the spatiotemporal interaction characteristics of multiple vehicles in real-world data, allowing the trained generative model to generate multi-vehicle trajectories similar to real-world data in actual use. This model can be applied to applications such as vehicle trajectory prediction, target tracking, simulator construction, data compression, data augmentation, and anomaly detection.

[0072] This method uses existing vehicle trajectory data to train a generative model. Once the training is stable, the generative model can generate multi-vehicle trajectories of a certain duration based on the relative positions of multiple vehicles, while maintaining similar spatiotemporal characteristics to the training trajectory data. This generative model, for the first time, enables the generation of multi-vehicle trajectories that reflect the spatiotemporal interactions found in real-world multi-vehicle motion scenarios. This addresses the problem of existing vehicle trajectory generation techniques failing to reflect the inter-vehicle interactions found in real-world data. The method can be used for scientific research and practical applications involving model training, algorithm validation, and simulation platform development.

[0073] In the embodiment of the present invention, the overall structural diagram of the method is as follows: Figure 1As shown, the generative model is trained using real multi-vehicle trajectory data and adversarial learning technology. During training, the generator, classification discriminator and regression discriminator are used to learn in an adversarial learning manner, wherein the generator, classification discriminator and regression discriminator are three neural networks. Adversarial learning is a training method based on game theory, which achieves the goal by designing a suitable minimum-maximum game. Based on adversarial learning, researchers proposed GAN (Generative Adversarial Network) to train the generative model. GAN includes a generator and a discriminator. In the present invention, the input of the generator is multi-vehicle position conditions and Gaussian process sampling, and its output is to generate multi-vehicle trajectories. Its purpose is to make the discriminator unable to distinguish between the generated trajectories and the real trajectories, while the discriminator is responsible for distinguishing the multi-vehicle trajectories, and its purpose is to correctly distinguish between the generated trajectories and the real trajectories. Since the two purposes are contradictory, it constitutes a maximum-minimum problem, that is, a game. When the Nash equilibrium is reached, the trajectory generated by the generator will be similar to the real trajectory. Here, both the classification discriminator and the regression discriminator are discriminators, but they discriminate trajectories from different perspectives. The classification discriminator takes as input the real multi-vehicle trajectories and the generated multi-vehicle trajectories, and outputs per-vehicle logits and per-vehicle features. The regression discriminator takes as input the generated multi-vehicle trajectories and the real multi-vehicle trajectories, and outputs the overall logits and overall features. Once training is stable, the generator alone can be used to generate multi-vehicle trajectories based on vehicle position conditions and Gaussian process sampling. To ensure that the generated multi-vehicle trajectories conform to the spatiotemporal interaction characteristics of the real trajectories, the regression discriminator and the classification discriminator represent and learn these spatiotemporal interaction characteristics from multiple perspectives, ensuring that the multi-vehicle trajectories generated by the generator, under the influence of the discriminator, have the same spatiotemporal interaction characteristics as the real multi-vehicle trajectories.

[0074] The execution process of the method is as follows Figure 2 As shown, the steps include:

[0075] S101, during training, obtaining multi-vehicle position conditions and Gaussian process samples, and passing the multi-vehicle position conditions and the Gaussian process samples to a generator to generate multi-vehicle trajectories;

[0076] In the embodiment of the present invention, the schematic diagram of the generator is as follows Figure 3 As shown, the input of the generator is divided into two parts, one part is the sampling of the preset Gaussian process The other part is the multi-vehicle position condition (C1, C2, ..., C n), the two inputs are first encoded by MLP. In order to transform the temporal characteristics of Gaussian process sampling, a bidirectional GRU (Gated Recurrent Unit) unit is used. GRU is a neural network structure that can express temporal characteristics. In the bidirectional GRU-cell unit, the encoded multi-vehicle position conditions are set as the initial hidden states of the forward sequential expression and the reverse sequential expression, thereby transforming the temporal characteristics of the Gaussian process sampling after MLP encoding. and the encoding after backward transformation Perform average AVE to obtain the time series coding set The code is obtained by integrating the position conditions of multiple vehicles through time series transformation by Gaussian process. Its meaning is the time series code that integrates the relative position conditions of vehicles. In order to encode the spatial relative relationship of the generated multi-vehicle trajectories, the time series codes are subtracted pairwise to obtain the relative code set. The relative code set is transformed by MLP. Since each vehicle has a relative code calculation with other vehicles, it needs to go through AVG POOL, that is, an average operation. The target relative code set after AVG POOL is concatenated with the temporal code set (CAT), and then transformed by MLP to generate multi-vehicle trajectories. By transforming the temporal and spatial relationships, this generation process not only integrates the relative positional relationships of the vehicles in the input conditions, but also transforms the temporal and spatial relationships of the input Gaussian process sampling. Under the supervision of the loss function, the generated multi-vehicle trajectories have consistent spatiotemporal interaction characteristics with the real multi-vehicle trajectories. Let G(g) represent the function of the GRU network and M(g) represent the MLP unit. The specific calculation process can be formulated as follows:

[0077]

[0078]

[0079]

[0080]

[0081]

[0082] S102: Acquire real multi-vehicle trajectories, pass the real multi-vehicle trajectories and the generated multi-vehicle trajectories to a classification discriminator to obtain a first logit vector and a first eigenvector, and train the classification discriminator using adversarial learning based on the first logit vector;

[0083] In the embodiment of the present invention, real multi-vehicle trajectories are obtained, wherein the real multi-vehicle trajectories can be obtained from a preset data set or a specified location. In the embodiment of the present invention, the method for obtaining the real multi-vehicle trajectories is not specifically limited.

[0084] Furthermore, the real multi-vehicle trajectory and the generated multi-vehicle trajectory are passed to the classification discriminator to obtain the first logit vector and the first eigenvector. First, the real multi-vehicle trajectory is processed. For the convenience of description and without loss of generality, the vehicle trajectory prediction is taken as an example. The influence of surrounding vehicles is often considered with the target vehicle to be predicted as the center. Note that there are n vehicles in the scene. For vehicle j = 1, 2, ..., n, the coordinate sequence is first processed. (The coordinate sequence refers to the sequential sequence of vehicle coordinates at each moment from 1 to t, that is, ) for centralization Then normalize in is the target vehicle at the current time t h coordinates of

[0085] The specific processing process of the classification discriminator is as follows: the real multi-vehicle trajectory and the trajectory of each vehicle in the generated multi-vehicle trajectory are first encoded using MLP, and then the temporal characteristics contained therein are forward encoded using bidirectional GRU. cdf and reverse coding G cdb , and sum the forward and reverse codes to get Then average and obtain the sequential code that can comprehensively express the temporal characteristics Where j represents vehicle j. To express the spatial interaction relationship between vehicles, the coordinates of the vehicles in the input multi-vehicle trajectory are first subtracted from each other, and then encoded using MLP. Since each vehicle is encoded relative to other vehicles, it is necessary to perform AVG POOL, that is, perform an average operation, to obtain the encoding of the spatial relationship between vehicle j and other vehicles. By concatenating the sequential coding and spatial relationship coding and passing through the FC layer, the first feature vector expressing the comprehensive spatiotemporal interaction characteristics of vehicle j can be obtained. The feature passes through an FC layer again to obtain the logit output of vehicle j. It represents the possible distribution of the vehicle in k+1 categories. Let G(g) represent the function of the GRU network, M(g) represent the MLP unit, and FC(g) represent the FC layer. The calculation process can be formulated as

[0086]

[0087]

[0088]

[0089]

[0090]

[0091] Furthermore, the discriminator is first trained for each batch of real trajectory data, where batch is a term in neural network training. Since training the complete data set requires a large amount of memory, only a part of the data is randomly taken for network training each time the network is trained. These data are called a batch, and the classification discriminator is trained. When training the classification discriminator, the parameters of the regression discriminator and the generator are fixed. Similarly, when training the regression discriminator, the parameters of the classification discriminator and the generator are fixed. In each batch, the generator is trained once every time the regression discriminator and the classification discriminator are trained a certain number of times. When training the generator, the parameters of the other two discriminators are fixed. Among them, the specific structures of the classification discriminator are as follows. Figure 4 As shown. MLP is a multi-layer perceptron, which is a neural network structure that contains multiple linear layers and nonlinear activation functions between layers, thereby forming a nonlinear mapping to achieve feature extraction and expression. FC is a fully connected layer, AVG POOL is an average pooling operation, and CAT is a concatenation operation. The input of the classification discriminator is the real multi-vehicle trajectory. and generate multi-vehicle trajectories (The generated multi-vehicle trajectory is the output of the generator), j = 1, 2, ..., n. Correspondingly, the classification discriminator is used for each of the trajectories Output the first logit vector and the first eigenvector. The regression discriminator outputs the first logit vector and the first eigenvector for all trajectories of all n vehicles. The classifier loss function is a semi-supervised loss function. Specifically, if there are k possible categories for each vehicle, and the k+1th category is defined as the category of the generated trajectory. Then the corresponding loss function of the classification discriminator is

[0092] L cd =L s +L us (11)

[0093] in,

[0094]

[0095]

[0096] In the loss function, x,y~p data(x, y) refers to the joint distribution of input and output in the real data, x~G refers to the distribution of x obeying the generator, E x~G log[p(y=k+1|x)] refers to the expected calculation, which represents the expected probability that the input x, that is, the trajectory, belongs to the k+1th category. Specifically, this formula is the expected probability that the generated trajectory is classified as the generated trajectory. s Refers to the expected probability that the true trajectory belongs to its true category, L us It refers to the expected probability that the true trajectory is not the generated trajectory and the generated trajectory is the generated trajectory. In the network, the expectation is to average the output of the sample. Specifically,

[0097]

[0098]

[0099] in, It represents the first logit vector of the output of the classification discriminator corresponding to the true trajectory of vehicle i, which represents the distribution of the true trajectory of vehicle i on the k true categories. The components in the output logit vector corresponding to the generated trajectory. G(z) refers to the output of the generator and D(x) refers to the output of the discriminator. cd In the process, L s and L us will be minimized, the classification discriminator will use the back propagation algorithm to adjust its own network parameters so that L s Minimize, that is, correctly classify the true trajectory into its true category; at the same time make L us Minimize, that is, do not classify the real trajectory into the category of the generated trajectory, and correctly classify the generated trajectory as the generated trajectory. However, due to the adversarial part in the generator loss function, when the Nash equilibrium is reached, the classification discriminator will not be able to achieve correct classification and can only confuse the real trajectory and the generated trajectory. At this time, the temporal and spatial characteristics of the generated trajectory and the real trajectory are aligned.

[0100] S103, during training, passing the real multi-vehicle trajectory and the generated multi-vehicle trajectory to a regression discriminator to obtain a second logit vector and a second feature vector, and training the regression discriminator using adversarial learning based on the second logit vector;

[0101] In the embodiment of the present invention, after the training S102 for each batch of data is completed, the real multi-vehicle trajectory and the generated multi-vehicle trajectory are passed to the regression discriminator to obtain the second logit vector and the second feature vector, wherein the structural block diagram of the regression discriminator is as follows: Figure 5As shown, the specific calculation process of the regression discriminator is: selecting a target vehicle, wherein the selection can be set based on experience or specific circumstances. In the embodiment of the present invention, the specific selection rules are not limited.

[0102] First, the historical trajectory of the target vehicle is extracted from the multi-vehicle trajectory Future trajectory of the target vehicle And calculate the difference between the historical trajectory of the target vehicle and the surrounding vehicles i (relative trajectory) i=1,K,n; the historical trajectory and future trajectory of the target vehicle are first encoded by MLP as the first encoding and the second code The relative trajectory is then encoded into a third encoding by another MLP and average pooling operation By concatenating the three codes (CAT) and passing through an FC layer, we can obtain the second feature vector F representing the spatiotemporal dependency relationship of multiple vehicles in the scene. rd , after passing through an FC layer, the second logit vector (logits) L can be obtained rd , which represents the degree of realism of the scene composed of multiple vehicle trajectories. According to a similar representation method, the process can be formulated as

[0103]

[0104] Furthermore, the regression discriminator training loss function is

[0105]

[0106] The two parts correspond to the distance between the expected logit of the real multi-vehicle trajectory and 1, and the distance between the expected logit of the generated multi-vehicle trajectory and 0 (which can be understood as the cross entropy loss function, the loss between the expected logit of the real trajectory and the label 1, and the loss between the expected logit of the generated trajectory and the label 0). Unlike the classification discriminator, which identifies each trajectory in the generated multi-vehicle trajectory and thus needs to classify each trajectory into different categories, the regression discriminator identifies the spatiotemporal dependency of the traffic scene composed of multiple trajectories. Therefore, the output logit represents the authenticity of the entire scene. The closer it is to 1, the more real it is. In the process of minimizing the loss function, the regression discriminator uses the backpropagation algorithm to adjust its own network parameters, trying to D(x) in the equation tends to 1, and -E z~noise D(G(z)) in log(1-D(G(z))) tends to 0. In other words, it tries to make the output logit of the real multi-vehicle trajectory as close to 1 as possible, identifying it as true, and at the same time, it tries to make the output logit of the generated multi-vehicle trajectory as close to 0 as possible, identifying it as false. However, due to the adversarial term -E in the generator loss functionz~noise logD(G(z)) (the generator minimizes this loss and attempts to make D(G(z)) approach 1). Neither the generator loss nor the loss in the regression discriminator can achieve the optimal result. When the game reaches Nash equilibrium, D(x) and D(G(z)) will be equal to 0.5, which means that it is impossible to distinguish the spatiotemporal interaction characteristics contained in the generated trajectory and the real trajectory.

[0107] S104: During training, the generator is trained using adversarial learning based on the first eigenvector, the second eigenvector, the first logit vector, and the second logit vector to obtain a target generator;

[0108] In the embodiment of the present invention, after the training S103 for each batch of data is completed, adversarial learning is used for training based on the first eigenvector, the second eigenvector, the first logit vector, and the second logit vector. The specific training process is as follows:

[0109] like Figure 3 As shown, the input of the generator includes multiple vehicle position conditions (C1, C2, ..., C n ) and m Gaussian process samples generated for each of the n vehicles The loss function is divided into two parts, corresponding to the classification discriminator and the regression discriminator, specifically L g =L gcd +L grd ,in,

[0110]

[0111] The part corresponding to the classification discriminator, where D(g) represents the output logit of the classification discriminator, that is, the first logit vector,

[0112]

[0113] The part corresponding to the regression discriminator, where f(x) represents the output of the middle layer of the network, that is, the first and second feature vectors of the output, see Figure 4 and Figure 5 The features in , the rest of the parameters have the same meaning as above, where D(g) represents the output logit of the regression discriminator, i.e. the second logit vector. d L cg and L grd In , the loss function can be divided into two parts, Represents the distance between the feature vectors of the multi-vehicle trajectories generated by the generator and the feature vectors of the real multi-vehicle trajectories. By minimizing this term, the spatiotemporal characteristics of the generated multi-vehicle trajectories can be made close to the real multi-vehicle trajectories, which can accelerate the convergence speed and stabilize the convergence process. z~noise logD(G(z)) represents the logit of the multi-vehicle trajectories generated by the generator after passing through the discriminator, which characterizes the authenticity of the generated trajectories. In the process of minimizing this term using the backpropagation algorithm, the generator will try to adjust its own network parameters so that the generated trajectories’ identification output logitD(G(z)) in the discriminator is maximized, that is, it tends to 1. However, due to the adversarial part in the discriminator’s minimization loss function, z~noise log(1-D(G(z))). In this part, the discriminator attempts to adjust its parameters so that the output logitD(G(z)) of the generated trajectories approaches 0. This is the game of game, also known as the minimax game. When the game reaches a Nash equilibrium, that is, when it finally converges to stability, D(G(z)) will be approximately 0.5. At the same time, the discriminator's output logitD(x) for the real multi-vehicle trajectories is also approximately 0.5, indicating that the spatiotemporal interaction characteristics of the multi-vehicle trajectories generated by the generator are consistent with those of the real multi-vehicle trajectories. This results in the target generator, which outputs multi-vehicle trajectories that the discriminator cannot distinguish.

[0114] S105: After the training is completed, the multi-vehicle position conditions and the Gaussian process sampling are passed to the target generator to obtain the target multi-vehicle trajectory.

[0115] In an embodiment of the present invention, after the target generator is determined, the multi-vehicle position conditions and the Gaussian process sampling are passed to the target generator to obtain target multi-vehicle trajectories, wherein the target multi-vehicle trajectories can be applied to applications such as vehicle trajectory prediction, target tracking, simulator construction, data compression, data expansion, and anomaly detection.

[0116] The present invention provides a vehicle trajectory generation method, comprising: passing real multi-vehicle trajectories and generated multi-vehicle trajectories obtained based on multi-vehicle position conditions to a classification discriminator to obtain a first logit vector and a first eigenvector, and training the classification discriminator using adversarial learning based on the first logit vector; passing the real multi-vehicle trajectories and the generated multi-vehicle trajectories to a regression discriminator to obtain a second logit vector and a second eigenvector, and training the regression discriminator based on the second logit vector; training a generator using adversarial learning based on the first eigenvector, the second eigenvector, the first logit vector, and the second logit vector to obtain a target generator; and passing the multi-vehicle position conditions and Gaussian process sampling to the target generator to obtain a target multi-vehicle trajectory. In the above process, the target generator is trained based on the multi-vehicle position conditions and the adversarial algorithm, and the target multi-vehicle trajectory can generate multi-vehicle trajectories with the same distribution as the real data, thereby improving the accuracy and authenticity of the multi-vehicle trajectory generation.

[0117] Furthermore, in the above training process, the training order of the generator, classification discriminator, and regression discriminator is not limited and can be any order. Repeated training is required between the three to finally obtain a target generator that meets the requirements. Using the target generator as a generation model, with multi-vehicle position conditions and Gaussian process sampling as conditions, the target multi-vehicle trajectory that meets the conditions can be generated.

[0118] One embodiment of this system is to generate vehicle trajectories on the US-101 public dataset. The specific implementation process includes the following steps:

[0119] Since the US-101 dataset contains a large number of trajectories, without loss of generality, we take the data from the first time period, that is, the vehicle trajectory data recorded from 7:50 to 8:05 in the morning, and take the cases where the number of surrounding vehicles is 3 and 4. We perform preprocessing, split the vehicle trajectory duration into 8.0s, and split the training set, validation set, and test set into a ratio of 7:1:2, and perform data normalization.

[0120] The generator is trained as described above, using the Adam optimizer with a batch_size of 200 and a learning rate of γ = 0.0001.

[0121] In order to verify that the generated trajectory maintains the spatiotemporal interaction characteristics between vehicles in the real data, the TSTR and TRTR methods are used to verify the application of vehicle trajectory prediction. TRTR (Train on Real, Test on Real) refers to training on real data and testing the trajectory prediction performance on real data. TSTR (Train on Synthetic, Test on Real) refers to training on generated data and testing the trajectory prediction performance on real data. If the RMSE (Root Mean Square Error) performance of TSTR is close to that of TRTR, it can be said that the vehicle-to-vehicle interaction relationship in the generated data is consistent with that in the real data. The model used to achieve the target vehicle trajectory prediction is as follows: Figure 6 As shown, the historical trajectory of the target vehicle and surrounding vehicles is used to predict the future trajectory of the target vehicle. The input of this model is the historical trajectory of the target vehicle. and the relative coordinates of the target vehicle and surrounding vehicles That is, the trajectory is subtracted. Use the LSTM layer to represent the historical trajectory The temporal relationship contained in the target vehicle is extracted using MLP and AVG POOL. The two are concatenated to represent the temporal and spatial interaction characteristics of the target vehicle and surrounding vehicles, which is the encoder stage. The concatenated encoding is passed through the LSTM network (a temporal relationship expression network, similar to the GRU, so they can be replaced with each other) and the MLP network to output the predicted future trajectory of the target vehicle. This stage is called decoder. Let LSTM(g) represent the LSTM network. The process can be formulated as

[0122]

[0123]

[0124]

[0125] The training loss function of the network is the RMSE error between the predicted trajectory and the actual trajectory of the target vehicle. That is, if a BS size batch of data is trained, at time t, the predicted trajectory is The corresponding true trajectory is The loss function at this moment is

[0126]

[0127] In actual implementation, the relative position condition of the vehicle C i ,i=1,K,n is divided into C i =(C xi ,C yi ), where Cxi There are three possible values: -1 means the vehicle is in the left lane of the target vehicle, 0 means it is in the same lane as the target vehicle, and 1 means it is in the right lane of the target vehicle. yi Indicates the proximity of the vehicle to the target on the y-axis (usually the direction of the lane). Gaussian process sampling uses RBF kernel, firstly divides [0,3] evenly into t h +t f Step 2, get the multidimensional mean vector

[0128]

[0129] The mean vector is used to calculate the RBF kernel matrix, which serves as the covariance matrix of the multidimensional Gaussian distribution. The two are combined as the parameters of the multidimensional Gaussian distribution for sampling to obtain Gaussian process sampling. Since Gaussian process sampling can be implemented in various ways and the generator only requires a fixed prior sampling, as long as the Gaussian process sampling method and parameters are fixed, they can be used as input to the generator.

[0130] As shown in Table 1, although the performance of TSTR is slightly inferior to that of TRTR, the difference is not large. It can be considered that the generated multi-vehicle trajectory data maintains the vehicle-to-vehicle interaction relationship in the real multi-vehicle trajectory data.

[0131] Table 1 Comparison of RMSE (m) errors between TSTR and TRTR in the US-101 dataset

[0132] Prediction time (s) TRTR TSTR 1.0 0.87 0.90 2.0 2.01 2.06 3.0 3.47 3.59 4.0 5.29 5.53 5.0 7.52 7.90

[0133] Based on the above-mentioned method for generating a vehicle trajectory, an embodiment of the present invention provides a device for generating a vehicle trajectory. The structural block diagram of the device is as follows: Figure 7 Shown, including:

[0134] A first generating module 201 , a first training module 202 , a second training module 203 , a third training module 204 and a second generating module 205 .

[0135] in,

[0136] The first generation module 201 is configured to obtain multi-vehicle position conditions and Gaussian process samples during training, and pass the multi-vehicle position conditions and the Gaussian process samples to a generator to generate multi-vehicle trajectories;

[0137] The first training module 202 is configured to obtain real multi-vehicle trajectories, pass the real multi-vehicle trajectories and the generated multi-vehicle trajectories to a classification discriminator to obtain a first logit vector and a first feature vector, and train the classification discriminator using adversarial learning based on the first logit vector;

[0138] The second training module 203 is configured to, during training, pass the real multi-vehicle trajectories and the generated multi-vehicle trajectories to a regression discriminator to obtain a second logit vector and a second feature vector, and train the regression discriminator using adversarial learning based on the second logit vector;

[0139] The third training module 204 is configured to train the generator using adversarial learning based on the first feature vector and the second feature vector to obtain a target generator during training;

[0140] The second generation module 205 is used to pass the multi-vehicle position conditions and the Gaussian process sampling to the target generator to obtain target multi-vehicle trajectories after training is completed.

[0141] The present invention provides a vehicle trajectory generation device, comprising: passing real multi-vehicle trajectories and generated multi-vehicle trajectories obtained based on multi-vehicle position conditions to a classification discriminator to obtain a first logit vector and a first eigenvector, and training the classification discriminator using adversarial learning based on the first logit vector; passing the real multi-vehicle trajectories and generated multi-vehicle trajectories to a regression discriminator to obtain a second logit vector and a second eigenvector, and training the regression discriminator based on the second logit vector; training a generator using adversarial learning based on the first eigenvector, the second eigenvector, the first logit vector, and the second logit vector to obtain a target generator; and passing the multi-vehicle position conditions and Gaussian process sampling to the target generator to obtain a target multi-vehicle trajectory. In the above process, the target generator is trained based on the multi-vehicle position conditions and the adversarial algorithm, and the target multi-vehicle trajectory can generate multi-vehicle trajectories with the same distribution as the real data, thereby improving the accuracy and authenticity of the multi-vehicle trajectory generation.

[0142] In the embodiment of the present invention, the first generating module 201 includes:

[0143] A first generation unit 206 , a first transformation unit 207 , a second transformation unit 208 , a transformation and pooling unit 209 and a first encoding unit 210 .

[0144] in,

[0145] The first generating unit 206 is configured to generate initial hidden states of forward sequential expression and reverse sequential expression based on the multi-vehicle position condition based on MLP encoding;

[0146] The first transformation unit 207 is configured to perform a bidirectional GRU on the result of MLP encoding of the initial hidden state and the Gaussian process sampling to obtain a forward sequential expression and a reverse sequential expression;

[0147] The second transform unit 208 is configured to transform the time series features of the Gaussian process sampled after MLP encoding based on the forward sequential expression and the reverse sequential expression to obtain a time series code set;

[0148] The transformation and pooling unit 209 is configured to subtract the temporal codes in the temporal code set to obtain a relative code set, perform MLP transformation on the relative codes in the relative code set, and then perform an average pooling operation to obtain a target relative code set;

[0149] The first encoding unit 210 is configured to concatenate the target relative code set and the temporal code set and then perform MLP encoding to obtain the generated multi-vehicle trajectory.

[0150] In this embodiment of the present invention, the first training module 202 includes:

[0151] a second generating unit 211 , a first determining unit 212 , a third generating unit 213 , and a second determining unit 214 .

[0152] in,

[0153] The second generating unit 211 is configured to sequentially encode the real multi-vehicle trajectories and the generated multi-vehicle trajectories based on MLP encoding and bidirectional GRU;

[0154] The first determining unit 212 is configured to determine relative multi-vehicle trajectories based on the actual multi-vehicle trajectories and the generated multi-vehicle trajectories;

[0155] The third generating unit 213 is configured to obtain a spatial relationship code for the relative trajectories of the multiple vehicles based on MLP coding and average pooling operations;

[0156] The second determining unit 214 is configured to determine a first logit vector and a first eigenvector based on the sequential coding and the spatial relationship coding.

[0157] In this embodiment of the present invention, the second training module 203 includes:

[0158] extraction unit 215 , a second encoding unit 216 , an encoding and pooling unit 217 and a third determination unit 218 .

[0159] in,

[0160] The extraction unit 215 is used to select a target vehicle and extract the historical trajectory and future trajectory of the target vehicle from the real multi-vehicle trajectory and the generated multi-vehicle trajectory;

[0161] The second encoding unit 216 is configured to obtain a first code and a second code by encoding the historical trajectory and the future trajectory based on MLP;

[0162] The encoding and pooling unit 217 is used to calculate the relative trajectory of the historical trajectory and the historical trajectories of other surrounding vehicles, and obtain a third code based on the relative trajectory based on MLP encoding and average pooling operation;

[0163] The third determining unit 218 is configured to concatenate the first code, the second code, and the third code and determine a second logit vector and a second eigenvector based on the FC layer.

[0164] In this embodiment of the present invention, the third training module 204 includes:

[0165] a fourth determining unit 219 , a fifth determining unit 220 , a sixth determining unit 221 , and a seventh determining unit.

[0166] in,

[0167] The fourth determining unit 219 is configured to determine a classification discriminator loss function that matches the generator based on the first logit vector;

[0168] The fifth determining unit 220 is configured to determine a regression discriminator loss function that matches the generator based on the second logit vector;

[0169] The sixth determining unit 221 is used to determine a generator loss function based on the first eigenvector, the second eigenvector, the first logit vector, and the second logit vector;

[0170] The seventh determining unit 222 is configured to enable the classification discriminator loss function, the regression discriminator loss function, and the generator loss function to reach a Nash equilibrium based on a back-propagation algorithm to obtain the target generator.

[0171] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on its device embodiment. Since it is basically similar to the method embodiment, the description is relatively simple. For relevant matters, please refer to the partial description of the method embodiment.

[0172] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0173] For the convenience of description, the above device is described as being divided into various units according to their functions. Of course, when implementing the present invention, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0174] From the above description of the embodiments, it can be seen that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus the necessary general-purpose hardware platform. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of 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 various embodiments of the present invention or certain parts of the embodiments.

[0175] The above is a detailed introduction to the vehicle trajectory generation method and device provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only intended to help understand the method and core concept of the present invention. At the same time, for those skilled in the art, based on the concept of the present invention, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A vehicle trajectory generation method, characterized in that: include: During training, multiple vehicle position conditions and Gaussian process samples are obtained, and the multiple vehicle position conditions and Gaussian process samples are passed to a generator to generate multiple vehicle trajectories; Acquire real multi-vehicle trajectories, pass the real multi-vehicle trajectories and the generated multi-vehicle trajectories to a classification discriminator to obtain a first logit vector and a first feature vector, and train the classification discriminator using adversarial learning based on the first logit vector; the first logit vector represents the distribution of the real trajectory of each vehicle across multiple real categories; During training, the real multi-vehicle trajectories and the generated multi-vehicle trajectories are passed to a regression discriminator to obtain a second logit vector and a second feature vector, and the regression discriminator is trained using an adversarial learning method based on the second logit vector; the second logit vector represents the degree of realism of the scene formed by the trajectories of all vehicles; During training, the generator is trained using adversarial learning based on the first eigenvector, the second eigenvector, the first logit vector, and the second logit vector to obtain a target generator; After the training is completed, the multi-vehicle position conditions and the Gaussian process sampling are passed to the target generator to obtain the target multi-vehicle trajectory; Obtaining real multi-vehicle trajectories, passing the real multi-vehicle trajectories and the generated multi-vehicle trajectories to a classification discriminator to obtain a first logit vector and a first eigenvector, including: Sequentially encode the real multi-vehicle trajectory and the generated multi-vehicle trajectory based on MLP encoding and bidirectional GRU; Determining multi-vehicle relative trajectories based on the actual multi-vehicle trajectories and the generated multi-vehicle trajectories; The relative trajectories of the multiple vehicles are encoded into a spatial relationship based on MLP encoding and average pooling operations; Determining a first logit vector and a first eigenvector based on the sequential coding and the spatial relationship coding; The real multi-vehicle trajectory and the generated multi-vehicle trajectory are passed to the regression discriminator to obtain a second logit vector and a second feature vector, including: Select a target vehicle, and extract a historical trajectory and a future trajectory of the target vehicle from the real multi-vehicle trajectory and the generated multi-vehicle trajectory; The historical trajectory and the future trajectory are encoded based on MLP to obtain a first code and a second code; Calculating the relative trajectory of the historical trajectory and the historical trajectories of other surrounding vehicles, and performing an MLP encoding and average pooling operation on the relative trajectory to obtain a third encoding; The first code, the second code, and the third code are concatenated to determine a second logit vector and a second eigenvector based on the FC layer.

2. The method according to claim 1, characterized in that Passing the multi-vehicle position conditions and the Gaussian process sampling to a generator to generate multi-vehicle trajectories includes: The multi-vehicle position conditions are encoded based on the MLP to generate initial hidden states of forward sequential expression and reverse sequential expression; The initial hidden state and the Gaussian process sampling are subjected to MLP encoding and the result is passed through a bidirectional GRU to obtain a forward sequential expression and a reverse sequential expression; Transforming the time series features of the Gaussian process sampled after MLP encoding based on the forward sequential expression and the reverse sequential expression to obtain a time series encoding set; Subtracting the temporal codes from the temporal code set to obtain a relative code set, performing an MLP transform and then an average pooling operation on the relative codes in the relative code set to obtain a target relative code set; The target relative code set and the temporal code set are concatenated and then subjected to MLP encoding to obtain the generated multi-vehicle trajectory.

3. The method according to claim 1, characterized in that Training the generator using adversarial learning based on the first eigenvector, the second eigenvector, the first logit vector, and the second logit vector to obtain a target generator includes: Determining a classification discriminator loss function matched to the generator based on the first logit vector; Determining a regression discriminator loss function matched to the generator based on the second logit vector; Determine a generator loss function based on the first eigenvector, the second eigenvector, the first logit vector, and the second logit vector; Based on the back-propagation algorithm, the classification discriminator loss function, the regression discriminator loss function and the generator loss function are made to reach Nash equilibrium to obtain the target generator.

4. A vehicle trajectory generating device, characterized in that: include: A first generation module is configured to obtain multi-vehicle position conditions and Gaussian process samples during training, and pass the multi-vehicle position conditions and the Gaussian process samples to a generator to generate multi-vehicle trajectories; a first training module configured to obtain real multi-vehicle trajectories, pass the real multi-vehicle trajectories and the generated multi-vehicle trajectories to a classification discriminator to obtain a first logit vector and a first feature vector, and train the classification discriminator using adversarial learning based on the first logit vector; the first logit vector represents the distribution of each vehicle's real trajectory across multiple real categories; a second training module, configured to, during training, pass the real multi-vehicle trajectories and the generated multi-vehicle trajectories to a regression discriminator to obtain a second logit vector and a second feature vector, and train the regression discriminator using adversarial learning based on the second logit vector; the second logit vector represents the degree of realism of the scene formed by the trajectories of all vehicles; A third training module is configured to train the generator using adversarial learning based on the first eigenvector and the second eigenvector to obtain a target generator during training; A second generation module is configured to, after training is completed, pass the multi-vehicle position conditions and the Gaussian process sampling to the target generator to obtain a target multi-vehicle trajectory; The first training module includes: A second generating unit is configured to sequentially encode the real multi-vehicle trajectories and the generated multi-vehicle trajectories based on MLP encoding and bidirectional GRU; a first determining unit, configured to determine a multi-vehicle relative trajectory based on the real multi-vehicle trajectory and the generated multi-vehicle trajectory; A third generating unit is configured to obtain a spatial relationship encoding of the relative trajectories of the multiple vehicles based on MLP encoding and average pooling operations; a second determining unit, configured to determine a first logit vector and a first eigenvector based on the sequential coding and the spatial relationship coding; The second training module includes: An extraction unit is used to select a target vehicle and extract a historical trajectory and a future trajectory of the target vehicle from the real multi-vehicle trajectory and the generated multi-vehicle trajectory; A second encoding unit, configured to obtain a first code and a second code by encoding the historical trajectory and the future trajectory based on MLP; an encoding and pooling unit, configured to calculate a relative trajectory between the historical trajectory and the historical trajectories of other surrounding vehicles, and obtain a third encoding by performing MLP encoding and average pooling operations on the relative trajectory; The third determining unit is configured to concatenate the first code, the second code, and the third code and determine a second logit vector and a second eigenvector based on an FC layer.

5. The device according to claim 4, characterized in that The first generation module includes: A first generating unit is configured to generate initial hidden states of a forward sequential expression and a reverse sequential expression based on the multi-vehicle position condition using MLP encoding; A first transformation unit is configured to perform a bidirectional GRU on the results of the MLP encoding of the initial hidden state and the Gaussian process sampling to obtain a forward sequential expression and a reverse sequential expression; A second transformation unit is configured to transform the time series features of the Gaussian process sampled after MLP encoding based on the forward sequential expression and the reverse sequential expression to obtain a time series code set; a transform and pooling unit, configured to subtract the temporal codes from the temporal code set to obtain a relative code set, perform an MLP transform on the relative codes in the relative code set, and then perform an average pooling operation to obtain a target relative code set; The first encoding unit is configured to concatenate the target relative code set and the temporal code set and then perform MLP encoding to obtain the generated multi-vehicle trajectory.

6. The device according to claim 4, characterized in that The third training module includes: a fourth determining unit, configured to determine a classification discriminator loss function matched with the generator based on the first logit vector; a fifth determining unit, configured to determine a regression discriminator loss function matched with the generator based on the second logit vector; a sixth determining unit, configured to determine a generator loss function based on the first eigenvector, the second eigenvector, the first logit vector, and the second logit vector; A seventh determination unit is configured to achieve a Nash equilibrium among the classification discriminator loss function, the regression discriminator loss function, and the generator loss function based on a back-propagation algorithm to obtain the target generator.