Trajectory prediction model training method, target trajectory prediction method, computing device and computer readable storage medium
By using the data enhancement model in the trajectory prediction model to generate diversified sample data, a closed-loop system is formed, which solves the problem of reduced model prediction accuracy caused by distribution deviation and improves the accuracy and robustness of trajectory prediction.
Patent Information
- Application Number
- CN202410581596.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-10
- Publication Date
- 2024-09-10
AI Technical Summary
In the existing technology, due to the distribution shift problem, the accuracy of model prediction is reduced, making it difficult to generate real traffic flow simulation and trajectory prediction.
By determining the sample driving data and label driving data of the sample object, the data enhancement model is used to generate the sample enhanced driving data, and it is input into the trajectory prediction model for training to form a closed-loop system, and the training model is updated to reduce distribution deviation.
The prediction performance and robustness of the trajectory prediction model are improved, the adaptability to environmental changes is enhanced, and the risk of performance degradation caused by distribution shifts is reduced.
Smart Images

Figure CN118626778A
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of unmanned driving and intelligent transportation technology, and in particular to a trajectory prediction model training method, a target trajectory prediction method, a computing device, and a computer-readable storage medium. Background Art
[0002] Traffic flow simulation is very important for testing autonomous driving. The methods commonly used in academia are reinforcement learning and imitation learning. Reinforcement learning uses artificially designed rewards to enable the model to learn a driving strategy. However, generally speaking, artificially designed rewards are difficult to match the hidden rewards of real people driving, so the traffic flow simulation generated by the driving strategy learned by reinforcement learning is difficult to be realistic.
[0003] The imitation learning method uses real expert driving data as training data. The training model learns a driving strategy, which is more realistic. However, since the distribution of test data generated by the trained model is different from the distribution of real expert training data, there is a distribution shift problem. When the trained model predicts the vehicle's trajectory, the prediction accuracy is reduced. Summary of the invention
[0004] In view of this, an embodiment of this specification provides a trajectory prediction model training method. One or more embodiments of this specification also relate to a trajectory prediction model training method device, a target trajectory prediction method, a target trajectory prediction device, a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects existing in the prior art that the model prediction accuracy is reduced due to distribution offset.
[0005] According to a first aspect of an embodiment of this specification, a trajectory prediction model training method is provided, comprising:
[0006] Determine sample driving data and label driving data of multiple sample objects;
[0007] Inputting the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object;
[0008] Inputting the sample enhanced driving data of each sample object into a trajectory prediction model to obtain the sample predicted driving data of each sample object;
[0009] According to the sample predicted driving data and the labeled driving data, the trajectory prediction model is updated and trained, and according to the sample predicted driving data and the sample driving data, the data enhancement model is updated and trained;
[0010] Continue to execute the step of inputting the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object until the preset end condition is met, and train to obtain the trajectory prediction model.
[0011] According to a second aspect of an embodiment of this specification, a target trajectory prediction method is provided, including:
[0012] Determine the historical driving data of the target object;
[0013] The historical driving data is input into a trajectory prediction model to obtain predicted driving data of the target object, wherein the trajectory prediction model is trained by the above-mentioned trajectory prediction model training method.
[0014] According to a third aspect of an embodiment of this specification, a trajectory prediction model training device is provided, comprising:
[0015] A determination module, configured to determine sample driving data and label driving data of a plurality of sample objects;
[0016] An input module is configured to input the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object;
[0017] An acquisition module is configured to input the sample enhanced driving data of each sample object into a trajectory prediction model to obtain the sample predicted driving data of each sample object;
[0018] A first training module is configured to update and train the trajectory prediction model according to the sample predicted driving data and the labeled driving data, and to update and train the data enhancement model according to the sample predicted driving data and the sample driving data;
[0019] The second training module is configured to continue to execute the step of inputting the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object until the preset end condition is met, and the trajectory prediction model is obtained by training.
[0020] According to a fourth aspect of an embodiment of this specification, a target trajectory prediction device is provided, including:
[0021] A determination module configured to determine historical driving data of a target object;
[0022] The acquisition module is configured to input the historical driving data into a trajectory prediction model to obtain the predicted driving data of the target object, wherein the trajectory prediction model is trained by the above-mentioned trajectory prediction model training method.
[0023] According to a fifth aspect of an embodiment of this specification, a computing device is provided, including:
[0024] Memory and processor;
[0025] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above-mentioned trajectory prediction model training method and target trajectory prediction method are implemented.
[0026] According to a sixth aspect of an embodiment of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the above-mentioned trajectory prediction model training method and target trajectory prediction method are implemented.
[0027] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned trajectory prediction model training method and target trajectory prediction method.
[0028] The trajectory prediction model training method provided by an embodiment of the present specification determines the sample driving data and the label driving data of multiple sample objects, and inputs the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object, thereby expanding the coverage of the training data, and using the trajectory prediction model according to the sample enhanced driving data to obtain the sample predicted driving data of each sample object, and updating the training trajectory prediction model according to the sample predicted driving data and the label driving data, and updating the training data enhancement model according to the sample predicted driving data and the sample driving data, so that the joint training between the trajectory prediction model and the data enhancement model forms a closed-loop system, and the learning feedback guidance data of the trajectory prediction model The enhanced model more effectively generates samples that help improve prediction performance, and the diversified data provided by the data enhancement model further helps the trajectory prediction model learn more robust prediction strategies; as the number of iterations increases, each cycle not only adjusts the trajectory prediction model according to the prediction error, but also helps the data enhancement model gradually approach the distribution of real-world data. By continuously using enhanced samples to enhance driving data for training, the trajectory prediction model can learn more extensive and complex driving data, thereby improving the prediction accuracy on unseen data, and improving the trajectory prediction model's ability to adapt to environmental changes, making the trajectory prediction model more robust when facing new scenarios or noisy data, and reducing the risk of performance degradation due to distribution shift. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a scene schematic diagram of a trajectory prediction model training method provided by an embodiment of this specification;
[0030] Figure 2 is a flow chart of a trajectory prediction model training method provided by an embodiment of this specification;
[0031] Figure 3 It is a schematic diagram of a processing process of a trajectory prediction model training method provided by an embodiment of this specification;
[0032] Figure 4 is a flow chart of a target trajectory prediction method provided by an embodiment of this specification;
[0033] Figure 5 It is a structural schematic diagram of a trajectory prediction model training device provided by an embodiment of this specification;
[0034] Figure 6 is a schematic diagram of the structure of a target trajectory prediction device provided by an embodiment of this specification;
[0035] Figure 7 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0036] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0037] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0038] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0039] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0040] First, the terms involved in one or more embodiments of this specification are explained.
[0041] VAE: Variational Auto-Encoder, a generative model based on deep learning, which uses the variational inference principle to learn the potential representation of data (hidden variables) and can generate new data samples based on these hidden variables. VAE consists of two parts: encoder and decoder; the encoder maps the input data to a low-dimensional, continuous probability distribution (usually assumed to be a multivariate Gaussian distribution), which describes the uncertainty of the data in the latent space; the decoder is responsible for sampling from the latent variable space, decoding these latent variables back to the original data space, and generating samples that are similar to but not exactly the same as the input data.
[0042] LQR: Linear Quadratic Regulator, a model-based classical control theory method, is used to design the optimal state feedback controller for linear systems. It is aimed at systems with linear dynamic characteristics and aims to minimize a quadratic performance indicator that comprehensively considers the system state deviation, control input cost, and possible external disturbance effects. The core idea of LQR is to find a set of feedback gain matrices by solving a linear matrix inequality (LMI) or Lagrange equation so that the expected value of the performance indicator in the infinite time interval in the future is minimized.
[0043] In this specification, a trajectory prediction model training method is provided. One or more embodiments of this specification also involve a trajectory prediction model training method device, a target trajectory prediction method, a target trajectory prediction device, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.
[0044] See also Figure 1 , Figure 1 A schematic diagram of a scenario of a trajectory prediction model training method provided according to an embodiment of the present specification is shown.
[0045] Specifically, the trajectory prediction model training method is implemented by applying the terminal device 102 and the server 104. The terminal device 102 is used to send sample driving data and labeled driving data of multiple sample objects to the server 104. For example, the sample driving data and labeled driving data of a sample object are taken as an example for explanation. For example, the sample driving data of the sample object includes the sample historical driving trajectory from historical time step 1 to historical time step 10, and the sample driving environment data corresponding to the sample historical driving trajectory; the labeled driving data of the sample object includes the driving trajectory of 5 time steps after historical time step 10.
[0046] The trajectory prediction model and the data enhancement model are trained in the server 104. First, the sample driving data of the sample object is input into the data enhancement model to obtain the sample enhanced driving data of the sample object; the sample enhanced driving data is input into the trajectory prediction model, and the sample predicted driving data is predicted by using the trajectory prediction model, so as to train the trajectory prediction model according to the predicted sample predicted driving data and the label driving data; and when the sample predicted driving data is obtained, the data enhancement model can be trained according to the sample predicted driving data, and when the data enhancement model is also trained with the sample driving data, the data enhancement model can be trained to reconstruct the sample driving data and the sample predicted driving data, so as to expand the distribution of the sample driving data.
[0047] Continue to input the sample driving data of the sample object into the data enhancement model to obtain the sample enhanced driving data of the sample object until the number of cycles reaches a preset number threshold, and train to obtain the trajectory prediction model.
[0048] On the basis of the trajectory prediction model obtained through training, the historical trajectory of the vehicle is obtained through the terminal side device 102, and the historical driving data of the vehicle is determined according to the historical trajectory of the vehicle and the driving environment data corresponding to the historical trajectory, and the historical driving data of the vehicle is sent to the server 104, so that the trajectory prediction model in the server 104 makes a prediction based on the input historical driving data, outputs the predicted trajectory of the vehicle, and obtains the driving environment data corresponding to the predicted trajectory, determines the predicted driving data according to the predicted trajectory of the vehicle and the driving environment data corresponding to the predicted trajectory, and returns the predicted driving data to the terminal side device 102; and displays the predicted trajectory in the terminal side device 102.
[0049] The end-side device 102 may include a browser, an APP (Application), or a web application such as an H5 (Hyper Text Markup Language 5, version 5 of Hypertext Markup Language) application, or a light application (also known as a mini-program, a lightweight application) or a cloud application, etc. The end-side device may be based on the software development kit (SDK, Software Development Kit) of the corresponding service provided by the server, such as based on the real-time communication (RTC, Real Time Communication) SDK development and acquisition. The end-side device may be deployed in an electronic device and needs to rely on the device to run or some APPs in the device to run. The electronic device may have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications may also be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0050] Server 104 can be understood as a server that provides various services, including physical servers and cloud servers, such as a server that provides communication services to multiple clients, a server for background training that provides support for models used on clients, and a server that processes data sent by clients. It should be noted that server 104 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. Server 104 can also be a server for a distributed system, or a server combined with a blockchain. Server 104 can also be a cloud server for basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content De l ivery Network), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0051] It is worth noting that the trajectory prediction model training method provided in the embodiments of this specification can be executed by the server 104. In other embodiments of this specification, the text processing model can be deployed in the terminal device 102, so that the terminal device 102 can also have similar functions as the server 104, thereby executing the trajectory prediction model training method provided in the embodiments of this specification; in other embodiments, the trajectory prediction model training method provided in the embodiments of this specification can also be executed jointly by the terminal device 102 and the server 104.
[0052] The trajectory prediction model training method provided in the embodiments of the present specification obtains sample driving data of a sample object and corresponding sample enhanced driving data through a data enhancement model, thereby obtaining sample predicted driving data of the sample object based on the expanded sample enhanced driving data and utilizing the trajectory prediction model; and in the case of updating the training data enhancement model through the sample predicted driving data and the sample driving data, the trained data enhancement model can model the distribution of both the sample driving data and the sample predicted driving data, thereby expanding the distribution of the sample driving data and solving the problem of distribution offset.
[0053] See also Figure 2 , Figure 2 A flowchart of a trajectory prediction model training method provided by an embodiment of the present specification is shown, which specifically includes the following steps.
[0054] Step 202: Determine sample driving data and label driving data of multiple sample objects.
[0055] Among them, the sample object can be understood as an individual unit in the training data set. The training data in the training data set is the data of the sample object. The data of the sample object is used for model training. The data of the sample object includes its sample driving data and labeled driving data. The sample object can be a vehicle, pedestrian, etc. In practical applications, the sample object can be understood as a vehicle driven by a real expert.
[0056] The sample driving data can be understood as the data information of the sample object during the actual driving process. The sample driving data may include the position, speed, acceleration, driving direction, timestamp and other data of the sample object. The sample driving data can be collected by sensing equipment, vehicle-mounted equipment, etc., and is not limited here.
[0057] Labeled driving data can be understood as the label data corresponding to the training data. The labeled driving data is the known correct result data compared to the sample driving data. In the trajectory prediction scenario, the labeled driving data is the position or trajectory of the sample object in the future after the sample driving data, which is used as reference data for training the trajectory prediction model.
[0058] Specifically, multiple sample objects are determined, and actual driving data (such as vehicle driving trajectory, vehicle type, traffic light status of the driving road, vehicle speed change, etc.) is collected for each sample object; sample driving data and label driving data are determined from the actual driving data.
[0059] For example, taking the sample object as a vehicle controlled by a real expert (driver), when the vehicle controlled by the real expert travels for a period of time, the driving data of the vehicle during this period is collected; when the vehicle travels from 14:00 to 15:00, the driving data between 14:00 and 14:30 is determined as the sample driving data, and the driving data between 14:30 and 15:00 is determined as the label driving data.
[0060] Step 204: input the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object.
[0061] Among them, the data enhancement model can be understood as a generative model, which can perform a series of transformation operations on the original data to obtain additional and diversified data, and these transformed data can still retain the core features of the original data, so the transformed data is similar to the original data; in practical applications, the data enhancement model can be a VAE model or a GAN (Generative Adversarial Network) model.
[0062] The sample enhanced driving data may be understood as transformed data obtained by inputting the sample driving data into a data enhancement model, wherein encoding and decoding processing may be performed on the sample driving data in the data enhancement model.
[0063] Specifically, the data enhancement model is used to perform a series of transformations on the sample driving data of each sample object to generate a series of new, mutated sample enhanced driving data. The enhanced sample enhanced driving data maintains information content similar to that of the sample driving data.
[0064] Through the data enhancement model, the diversity of sample driving data can be increased, helping the trajectory prediction model to learn a wider range of driving data and reduce dependence on specific data distribution, thereby improving the prediction ability of the trajectory prediction model when facing unseen data or distribution shifts.
[0065] In one or more embodiments of this specification, the sample historical driving trajectory is coded and decoded in the data enhancement model to obtain the enhanced historical driving trajectory corresponding to the sample historical driving trajectory, so as to reasonably obtain the sample enhanced driving data of the sample object. The specific implementation method is as follows:
[0066] The sample driving data includes a sample historical driving trajectory and sample driving environment data corresponding to the sample historical driving trajectory, and the sample historical driving trajectory is determined by the position of the sample object at a historical preset time step;
[0067] The step of inputting the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object includes:
[0068] Inputting the sample historical driving trajectory and sample driving environment data of each sample object into the data enhancement model;
[0069] Using the data enhancement model to perform encoding and decoding processing on the sample historical driving trajectory to obtain an enhanced historical driving trajectory of the sample historical driving trajectory;
[0070] According to the enhanced historical driving trajectory and the sample driving environment data, the sample enhanced driving data of each sample object is obtained.
[0071] Among them, the sample historical driving trajectory can be understood as the driving trajectory obtained by the sample object driving at the historical preset step length. The historical driving trajectory may include location points, timestamps and other information; among them, the historical preset time step length can be set according to actual conditions, and the time step length can also be set according to actual conditions. For example, the time step length is set to 0.4 seconds, and the historical preset time step length is 10 time steps, which is not limited here.
[0072] In actual applications, when collecting driving data of sample objects, the position of the sample objects can be collected once at an interval of one time step. For example, when the time step is 0.4 seconds, the position of the sample objects is collected once at an interval of 0.4 seconds. When the historical preset time step is 10 time steps, the historical driving trajectory of the sample is determined based on the collected positions of the sample objects in 10 time steps.
[0073] The sample driving environment data can be understood as the driving environment information of the sample object during the driving process. The sample driving environment data may include attribute information of the sample object and driving environment information, wherein the attribute information of the sample object includes but is not limited to the object type (such as vehicle type information of the vehicle), object size, etc.; the driving environment information includes but is not limited to the position of future path points near the sample object, the width of the road corresponding to the future path points, the traffic light status of the sample object's current driving road, the destination location and other information.
[0074] The enhanced historical driving trajectory can be understood as the data obtained after data enhancement of the sample historical driving trajectory; wherein, data enhancement is achieved through a data enhancement model; the sample enhanced driving data can be understood as the enhanced data obtained by combining the enhanced historical driving trajectory with the original sample driving environment data. The sample enhanced driving data not only retains the key features of the original sample driving data, but also introduces additional variability through enhancement processing, so that when the trajectory prediction model is trained using the sample enhanced driving data, the trajectory prediction model can be exposed to more diverse scenarios during the training process, thereby improving the ability to handle complex or edge cases.
[0075] Specifically, taking the data augmentation model as a VAE model as an example, the VAE model includes a VAE encoder and a VAE decoder. The sample historical driving trajectory and sample driving environment data of each sample object are input into the VAE model, and the VAE encoder is used to obtain the latent variable distribution of the sample historical driving trajectory. Then, a latent variable is sampled from the latent variable distribution using the reparameterization method. The VAE decoder reconstructs the distribution of the sample historical driving trajectory based on the sampled latent variables and the sample driving environment data to obtain the enhanced historical driving trajectory after enhancement; the sample enhanced driving data of the sample object is obtained according to the enhanced historical driving trajectory and the sample driving environment data.
[0076] The trajectory prediction model training method provided in the embodiments of this specification, by inputting sample historical driving trajectories and sample driving environment data into the data enhancement model, using an encoder and a decoder to encode and decode the sample historical driving trajectories, generates richer and more varied sample enhanced driving data, and uses the sample enhanced driving data as training data, which can improve the accuracy and generalization ability of the trajectory prediction model in predicting driving behavior.
[0077] Step 206: input the sample enhanced driving data of each sample object into a trajectory prediction model to obtain the sample predicted driving data of each sample object.
[0078] Among them, the trajectory prediction model can be understood as an algorithm or neural network model used to predict the future driving trajectory of an object; the trajectory prediction model is based on the enhanced historical driving trajectory of the sample enhanced driving data and the sample driving environment data, and learns the regularity of the object's movement, with the purpose of predicting the object's driving trajectory in the future preset time step.
[0079] The sample predicted driving data can be understood as the sample predicted driving trajectory of the sample object output by the trajectory prediction model and the sample predicted driving environment data corresponding to the sample predicted driving trajectory; when the sample enhanced driving data is input into the trajectory prediction model, the trajectory prediction model will output the sample predicted driving data of each sample object, including the predicted position coordinate sequence, time series and corresponding driving environment data, etc., reflecting the trajectory prediction model's estimate of how the sample object will travel in the future.
[0080] Specifically, the sample enhanced driving data of each sample object is taken as input, and the trajectory prediction model is used to perform prediction to obtain sample predicted driving data. By learning the characteristics of the existing sample enhanced driving data, the trajectory prediction model can make accurate predictions on the sample predicted driving data of each sample object. This is of great significance for applications such as intelligent transportation systems, path planning of self-driving cars, and traffic congestion management. It can help the system predict and respond to potential traffic conditions in advance, and improve efficiency and safety.
[0081] In one or more embodiments of this specification, when the sample enhanced driving data is input into the trajectory prediction model, the strategy network layer in the trajectory prediction model is used to determine the sample position distribution of the sample object, thereby determining the sample predicted driving trajectory according to the sample position distribution. The specific implementation method is as follows:
[0082] The sample enhanced driving data includes the enhanced historical driving trajectory and the sample driving environment data;
[0083] The step of inputting the sample enhanced driving data of each sample object into a trajectory prediction model to obtain the sample predicted driving data of each sample object includes:
[0084] Inputting the enhanced historical driving trajectory of each sample object and the sample driving environment data into the trajectory prediction model;
[0085] Determine the sample position distribution of each sample object at a future preset time step by using the strategy network layer in the trajectory prediction model, wherein the historical preset time step is equal to the future preset time step;
[0086] Determining a sample predicted driving trajectory of each sample object according to the sample position distribution;
[0087] Determining sample predicted driving environment data corresponding to the sample predicted driving trajectory according to the sample predicted driving trajectory;
[0088] The sample predicted driving data of each sample object is obtained according to the sample predicted driving trajectory and the sample predicted driving environment data.
[0089] Among them, the strategy network layer is used to determine the future position distribution of the sample object based on the enhanced historical driving trajectory; the future preset time step can be understood as the future time period length of the trajectory predicted by the trajectory prediction model, for example, the trajectory prediction model predicts the sample predicted driving trajectory for the next 10 time steps.
[0090] The sample position distribution can be understood as the probability distribution of the positions where the sample objects may appear in a certain period of time in the future predicted by the trajectory prediction model. The sample position distribution is a probability space, which reflects the possibility of each position point becoming a part of the driving trajectory; the sample predicted driving trajectory can be understood as the driving trajectory of the sample object predicted based on the position distribution, and the sample object drives based on the sample predicted driving trajectory; the sample predicted driving environment data can be understood as the driving environment data in the future driving process that is inferred according to the predicted sample predicted driving trajectory; the sample predicted driving data can be understood as the comprehensive information data that integrates the predicted sample predicted driving trajectory and the sample predicted driving environment data, that is, the sample predicted driving data provides each sample object with a detailed driving situation prediction in the future period, including the position and the accompanying environmental conditions.
[0091] Specifically, the enhanced historical driving trajectory and sample driving environment data of each sample object are taken as input and input into the trajectory prediction model. The strategy network layer in the trajectory prediction model predicts the position distribution of each sample object within a preset time step in the future by learning the enhanced historical driving trajectory and sample driving environment data. The preset time step in the future here is equal to the historical time step used to train the model, ensuring that the predicted time scale is consistent with the training data, which is convenient for model understanding and prediction.
[0092] In practical applications, the output of the strategy network layer is not a single trajectory point, but a sample position distribution, that is, the probability distribution of the possible position of each sample object in each time step in the future. Based on the sample position distribution, sample position points with higher probability can be selected and connected to form a sample predicted driving trajectory corresponding to the sample object; according to the predicted sample predicted driving trajectory, the sample predicted driving environment data that may be encountered on the sample predicted driving trajectory is estimated, such as traffic flow, traffic light status of the driving road, etc., to provide more comprehensive information support for the prediction, and the sample predicted driving trajectory and the sample predicted driving environment data are combined to generate the final sample predicted driving data.
[0093] The trajectory prediction model training method provided in the embodiments of this specification determines the sample position distribution of each sample object through the strategy network layer of the trajectory prediction model, so as to reasonably and accurately predict the sample prediction driving data of each sample object based on the sample position distribution.
[0094] In one or more embodiments of this specification, the sample position points can be reasonably determined based on the sample position distribution, and the sample predicted driving trajectory of the sample object can be determined by projecting the sample position points onto the associated road of the sample object. The specific implementation method is as follows:
[0095] Determining the sample predicted driving trajectory of each sample object according to the sample position distribution includes:
[0096] Determine each sample location point from the sample location distribution, and project each sample location point to an associated road of each sample object;
[0097] The sample predicted driving trajectory of each sample object is determined according to the sample position points projected onto the associated road.
[0098] Among them, the sample position point can be understood as a position point determined from the sample position distribution, and the sample object acts based on the sample position point, such as selecting a position point with a higher probability as the sample position point, which is used to determine the sample predicted driving trajectory based on the position point; the associated road can be understood as the actual road related to the driving of the sample object. The sample object can enter the associated road from the current driving road through the actual route, and the associated road is a road that is closer to the sample position point.
[0099] Specifically, position points with higher probabilities are selected from the sample position distribution as sample position points on the predicted trajectory, and the selected sample position points are projected onto the actual road, thereby ensuring that the predicted sample predicted driving trajectory conforms to the actual road layout, rather than being randomly distributed in open areas, ensuring that each sample position point can be correctly projected onto the nearest or most reasonable road; thereby connecting these sample position points projected onto the associated roads to form a sample predicted driving trajectory of the sample object, making the sample predicted driving trajectory a continuous driving path trajectory that conforms to road logic.
[0100] The trajectory prediction model training method provided in the embodiments of this specification selects reasonable sample position points from the predicted sample position distribution, and constructs an accurate and practically applicable sample predicted driving trajectory by accurately mapping these sample position points to corresponding associated roads.
[0101] In one or more embodiments of this specification, after determining the sample position points projected to the associated road, the trajectory adjustment layer of the trajectory prediction model is used to accurately connect these sample position points to obtain a smooth sample predicted driving trajectory. The specific implementation method is as follows:
[0102] The step of determining the sample predicted driving trajectory of each sample object according to the sample position point projected onto the associated road comprises:
[0103] The trajectory adjustment layer of the trajectory prediction model is used to connect the sample position points projected onto the associated road to determine the sample predicted driving trajectory of each sample object.
[0104] The trajectory adjustment layer is used to connect the sample position points when the sample position points are predicted to form a continuous and smooth sample predicted driving trajectory.
[0105] Specifically, after determining the sample position points projected to the associated road, the trajectory adjustment layer of the trajectory prediction model is used to smoothly connect these logical sample position points to form a sample predicted driving trajectory of the sample object, so that the sample object can be updated to the first sample position point of the sample predicted driving trajectory.
[0106] The trajectory prediction model training method provided in the embodiments of this specification processes the sample position points projected to the associated roads through the trajectory adjustment layer to ensure that they are aligned with the actual roads, and connects these sample position points in a reasonable manner to accurately determine the specific trajectory of the sample object's future travel.
[0107] In one or more embodiments of this specification, when there are multiple sample objects, when predicting the trajectory of each sample object, it is necessary to consider the associated sample objects associated with the sample object, so as to ensure that the sample predicted driving trajectories of each sample object are accurate and do not conflict with each other. The specific implementation method is as follows:
[0108] The step of inputting the sample enhanced driving data of each sample object into a trajectory prediction model to obtain the sample predicted driving data of each sample object includes:
[0109] Inputting the sample enhanced driving data of each sample object into the trajectory prediction model;
[0110] In the trajectory prediction model, determining, according to the multiple sample objects, associated sample objects of each sample object;
[0111] According to the sample enhanced driving data of each sample object, the sample enhanced driving data of the associated sample objects of each sample object, and the relative position between each sample object and its associated sample object, the sample predicted driving data of each sample object is obtained through attention mechanism processing.
[0112] Among them, the associated sample objects of each sample object can be understood as the sample objects associated with a certain sample object. In the prediction process of the trajectory prediction model, the trajectory prediction model identifies other sample objects that may interact or influence the behavior of the current sample object. For example, when a certain sample object is sample object a, sample object b adjacent to sample object a is the associated sample object of sample object a, and the driving trajectory of sample object b will affect the driving trajectory of sample object a.
[0113] Specifically, when there are multiple sample objects, the sample enhanced driving data of each sample object is input into the trajectory prediction model. The trajectory prediction model comprehensively considers the enhanced driving data of a single sample object, the driving data of related sample objects, and the relative position information between them, and integrates them through the attention mechanism to obtain the prediction result of the future driving trajectory of each sample object. The prediction of the trajectory prediction model is not only based on the enhanced driving data behavior of a single sample object, but also incorporates the dynamic influence of the surrounding environment and related sample objects. Therefore, it is closer to the complexity of the real world.
[0114] In practical applications, taking the sample object as a vehicle as an example, the traffic system can be simulated by constructing a graph, with each vehicle as a node of the graph and the edges as the relative positions between vehicles; when the VAE encoder, decoder, and policy network layer are constructed according to the enhanced graph attention network, the policy network layer uses the attention mechanism to simulate the interaction between vehicles and adjacent vehicles, aggregate the information of adjacent nodes (adjacent vehicles) and edges (relative positions between vehicles), and thus obtain the sample predicted driving data of each sample object.
[0115] The trajectory prediction model training method provided in the embodiments of this specification utilizes the attention mechanism of the trajectory prediction model to interactively analyze the sample enhanced driving data of each sample object, the sample enhanced driving data of each sample object's associated sample objects, and the relative position between each sample object and its associated sample objects, thereby improving the prediction accuracy of the trajectory prediction model for sample predicted driving trajectories in complex traffic environments.
[0116] Step 208: Update and train the trajectory prediction model based on the sample predicted driving data and the labeled driving data, and update and train the data enhancement model based on the sample predicted driving data and the sample driving data.
[0117] Specifically, based on the loss between the sample predicted driving data and the labeled driving data, the model parameters of the trajectory prediction model are updated so that the trajectory prediction model is closer to the actual driving trajectory in future predictions, and the data enhancement model can be trained by inputting the sample predicted driving data into the data enhancement model.
[0118] In practical applications, the sample predicted driving data includes a sample predicted driving trajectory, the labeled driving data includes a labeled driving trajectory, and the time step of the sample predicted driving trajectory partially or completely overlaps with the time step of the labeled driving trajectory;
[0119] The updating and training of the trajectory prediction model according to the sample predicted driving data and the label driving data includes:
[0120] The trajectory prediction model is updated and trained according to the sample predicted driving trajectory and the labeled driving trajectory.
[0121] Specifically, the labeled driving data is used as a training label for the trajectory prediction model training. When the trajectory prediction model is used to predict the trajectory, the training trajectory prediction model is updated based on the loss function between the sample predicted driving trajectory of the sample predicted driving data and the labeled driving trajectory in the labeled driving data.
[0122] In practical applications, when determining the loss function between the sample predicted driving trajectory and the label driving trajectory, it is necessary to ensure the consistency of the time steps of the sample predicted driving trajectory and the label driving trajectory for calculating the loss function.
[0123] For example, when the actual driving data of sample object 1 is collected, the actual driving trajectories of sample object 1 for 18 time steps are collected, and the actual driving trajectories of the first 10 time steps of the 18 time steps are used as the sample historical driving trajectory, and correspondingly, the actual driving trajectories of the last 8 time steps can be used as the label driving trajectory; when the sample historical driving trajectory is 10 time steps, the trajectory prediction model can predict the sample predicted driving trajectory for the next 10 time steps; and since the label driving trajectory is 8 time steps, the first 8 time steps are selected from the sample predicted driving trajectory of 10 time steps, and the negative log-likelihood loss function is calculated using the label driving trajectory of 8 time steps and the sample predicted driving trajectory of 8 time steps, and the training trajectory prediction model is updated.
[0124] Of course, when the actual driving trajectory of sample object 2 is 20 time steps, the actual driving trajectory of the first 10 time steps of the 20 time steps is used as the sample historical driving trajectory, and the actual driving trajectory of the last 10 time steps is used as the label driving trajectory; in this case, the sample predicted driving trajectory of the next 10 time steps and the label driving trajectory of the 10 time steps can be directly used to update the training trajectory prediction model.
[0125] When the actual driving trajectory of the sample object 3 is 25 time steps, the actual driving trajectory of the first 10 time steps of the 25 time steps is used as the sample historical driving trajectory, and the actual driving trajectory of the last 15 time steps is used as the label driving trajectory. In this case, the trajectory prediction model can be used to obtain the sample predicted driving trajectory of the next 10 time steps based on the sample historical driving trajectory, and the trajectory corresponding to the first 10 time steps of the 15 time steps is determined as the label driving trajectory, so as to update the training trajectory prediction model according to the label driving trajectory of 10 time steps and the sample predicted driving trajectory of 10 time steps.
[0126] The trajectory prediction model training method provided in the embodiments of this specification can accurately compare the overlapping parts of the labeled driving trajectory and the sample predicted driving trajectory by determining the overlapping time steps of the labeled driving trajectory and the sample predicted driving trajectory, thereby improving the accuracy of the trajectory prediction model prediction.
[0127] In one or more embodiments of this specification, the data enhancement model is updated and trained based on the sample predicted driving trajectory and the sample driving data, so that the data enhancement model models the probability distribution of the sample driving data and the sample predicted driving trajectory, thereby expanding the distribution of the sample driving data. The specific implementation method is as follows:
[0128] The sample predicted driving data includes a sample predicted driving trajectory, and the sample driving data includes a sample historical driving trajectory;
[0129] The updating and training of the data enhancement model according to the sample predicted driving data and the sample driving data includes:
[0130] Inputting the sample predicted driving data and the sample driving data into the data enhancement model;
[0131] Using the data enhancement model, obtaining an enhanced predicted driving trajectory corresponding to the sample predicted driving trajectory and an enhanced historical driving trajectory corresponding to the sample historical driving trajectory;
[0132] The data enhancement model is updated and trained according to the enhanced predicted driving trajectory, the sample predicted driving trajectory, the enhanced historical driving trajectory, and the sample historical driving trajectory.
[0133] Specifically, the sample predicted driving data and the sample driving data are input into the data enhancement model, and the data enhancement model is used to obtain the enhanced predicted driving trajectory corresponding to the sample predicted driving trajectory and the enhanced historical driving trajectory corresponding to the sample historical driving trajectory. The specific implementation can be referred to the above embodiment, which will not be repeated here.
[0134] When the data augmentation model can model both the sample predicted driving data and the sample driving data at the same time, the same set of data augmentation model network parameters (i.e., the same encoder and decoder structure and weights) is used to process these two types of state data from different sources but with overlapping features, so that the data augmentation model can learn a latent space that can simultaneously accommodate the behavioral characteristics of the sample driving data and the sample predicted driving data. Thus, a new state representation can be generated by decoding in the latent space, which can not only approach the sample driving data, but also explore the possible states that the sample predicted driving data may reach, thereby expanding the distribution of the sample driving data and solving the problem of distribution offset, thereby promoting the improvement of the prediction accuracy of the trajectory prediction model.
[0135] The predicted trajectory prediction method provided in the embodiments of this specification, by training the data enhancement model with enhanced predicted driving trajectory and sample predicted driving trajectory, can enable the data enhancement model to learn the distribution of sample predicted driving data, achieve distribution expansion of sample driving data, and solve the problem of distribution offset.
[0136] In one or more embodiments of this specification, the encoding and decoding processing of the trajectory prediction model helps the data enhancement model capture the high-order features and potential laws in the sample predicted driving trajectory and the sample historical driving trajectory, and the enhanced historical driving trajectory obtained by decoding is more realistic. The specific implementation method is as follows:
[0137] The method of using the data enhancement model to obtain an enhanced predicted driving trajectory corresponding to the sample predicted driving trajectory and an enhanced historical driving trajectory corresponding to the sample historical driving trajectory includes:
[0138] Using the data enhancement model, encoding the sample predicted driving trajectory and the sample historical driving trajectory to obtain the latent variable distribution corresponding to the sample predicted driving trajectory and the latent variable distribution corresponding to the sample historical driving trajectory;
[0139] According to the latent variable distribution corresponding to the sample predicted driving trajectory, the enhanced predicted driving trajectory is obtained through decoding processing of the data enhancement model;
[0140] According to the latent variable distribution corresponding to the sample historical driving trajectory, the enhanced historical driving trajectory is obtained through decoding processing of the data enhancement model.
[0141] Among them, the latent variable distribution can be understood as the probability distribution of low-dimensional space data. The data augmentation model learns the distribution of high-dimensional data and maps it to a low-dimensional latent space (latent space), so that the latent variables can represent a certain implicit pattern of the original data. This implicit pattern may contain some important features or structural information.
[0142] Specifically, the data augmentation model is composed of an encoder-decoder. The encoder of the data augmentation model encodes the sample predicted driving trajectory and the sample historical driving trajectory respectively. Each trajectory data is converted into a probability distribution (latent variable distribution) in a latent space. The probability distribution reflects the key characteristics and uncertainty of the trajectory data. The decoder of the data augmentation model performs a decoding process. For the latent variable distribution corresponding to the sample predicted driving trajectory, decoding generates an enhanced predicted driving trajectory. Similarly, based on the latent variable distribution corresponding to the sample historical driving trajectory, an enhanced historical driving trajectory is generated. Decoding is not just a simple reconstruction of the original data, but can generate new and diverse trajectory variants based on the learned probability distribution.
[0143] The generated enhanced predicted driving trajectory and enhanced historical driving trajectory not only contain the characteristics of the original data, but also introduce changes through slight perturbations in the latent variable space, increasing the diversity of the data set; this is particularly beneficial for training machine learning models, because diverse data can reduce overfitting and improve the model's generalization ability on unseen data.
[0144] The trajectory prediction model training method provided in the embodiments of this specification not only realizes the effective compression and representation of driving trajectory data, but also generates new and diversified trajectory data through sampling of latent variable distribution, which can be used to further improve the training quality and robustness of the trajectory prediction model.
[0145] In one or more embodiments of this specification, by updating the encoder of the data enhancement model, it is able to learn a potential space that can simultaneously contain the sample predicted driving trajectory and the sample historical driving trajectory, thereby expanding the distribution of the sample historical driving trajectory. The specific implementation method is as follows:
[0146] After obtaining the latent variable distribution corresponding to the sample predicted driving trajectory and the latent variable distribution corresponding to the sample historical driving trajectory, the method further includes:
[0147] The encoder for training the data enhancement model is updated according to the latent variable distribution corresponding to the sample predicted driving trajectory and the latent variable distribution corresponding to the sample historical driving trajectory.
[0148] In practical applications, when the latent variable distribution corresponding to the sample predicted driving trajectory and the latent variable distribution corresponding to the sample historical driving trajectory are obtained, the encoder of the training data enhancement model is updated by calculating the relative entropy loss between the two distributions. Thus, the encoder of the data enhancement model can be used to make the latent variable distribution corresponding to the sample historical driving trajectory cover the latent variable distribution corresponding to the sample predicted driving trajectory.
[0149] In one or more embodiments of the present specification, after obtaining the sample predicted driving data of each sample object, the method further includes:
[0150] storing the sample predicted driving data of each sample object into a target buffer;
[0151] The updating and training of the trajectory prediction model according to the sample predicted driving data and the label driving data includes:
[0152] Selecting target sample predicted driving data from the sample predicted driving data in the target buffer, wherein the number of the target sample predicted driving data is less than or equal to the number of the sample predicted driving data;
[0153] The trajectory prediction model is updated and trained according to the target sample predicted driving data and the labeled driving data.
[0154] Among them, the target buffer can be understood as a temporary storage area for temporarily storing and accumulating data; the target sample predicted driving data can be understood as the selected training data for training the data enhancement model.
[0155] Specifically, the sample predicted driving data of different sample objects are collected and stored in a specific target buffer, which acts as a temporary data storage area for subsequent processing and model training. Before updating the training trajectory prediction model, a part of the sample predicted driving data can be selected from the target buffer by random sampling as the target sample predicted driving data. These target sample predicted driving data are used together with the known labeled driving data (i.e., the actual driving trajectory data) to update and train the trajectory prediction model. The labeled driving data is equivalent to the "label" in supervised learning, which is used to compare and adjust the prediction output to reduce the prediction error.
[0156] The trajectory prediction model training method provided in the embodiments of this specification stores the sample prediction driving data of each sample object in the target buffer, and can randomly sample in the target buffer to obtain the target sample prediction driving data, thereby reducing the consumption of computing resources and training time while ensuring the training quality, and effectively improving the training efficiency of the model training.
[0157] Step 210: Continue to execute the step of inputting the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object until the preset end condition is met, and the trajectory prediction model is obtained by training.
[0158] In one or more embodiments of the present specification, the step of continuing to input the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object until a preset end condition is met, and training to obtain the trajectory prediction model includes:
[0159] Continue to execute the step of inputting the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object until the model training times reaches a preset times threshold, and the trajectory prediction model is obtained by training.
[0160] The preset number of times threshold can be set according to actual conditions and is not limited here.
[0161] When the model reaches a certain preset number of times, stop training the trajectory prediction model to obtain a trained trajectory prediction model; otherwise, continue to input the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object.
[0162] A trajectory prediction model training method provided by an embodiment of the present specification determines sample driving data and label driving data of multiple sample objects, and inputs the sample driving data of each sample object into a data enhancement model to obtain sample enhanced driving data of each sample object, thereby expanding the coverage of training data. By updating the training trajectory prediction model and the data enhancement model, the joint training between the trajectory prediction model and the data enhancement model forms a closed-loop system. The learning feedback of the trajectory prediction model guides the data enhancement model to more effectively generate samples that help improve the prediction performance, and the diversified data provided by the data enhancement model further helps the trajectory prediction model learn a more robust prediction strategy. As the number of iterations increases, each cycle not only adjusts the trajectory prediction model according to the prediction error, but also helps the data enhancement model gradually approach the distribution of real-world data. By continuously using the enhanced sample enhanced driving data for training, the trajectory prediction model can learn more extensive and complex driving data, thereby improving the prediction accuracy on unseen data, improving the adaptability of the trajectory prediction model to environmental changes, and making the trajectory prediction model more robust when facing new scenes or noisy data, thereby reducing the risk of performance degradation due to distribution shift.
[0163] See also Figure 3 , Figure 3 A schematic diagram of a processing process of a trajectory prediction model training method provided by an embodiment of the present specification is shown, which specifically includes the following steps.
[0164] The expert data is input into the VAE model; wherein the expert data can be understood as the sample driving data in the above embodiment, and the VAE model can be understood as the data enhancement model in the above embodiment.
[0165] In practical applications, the vehicle state can be understood as the sample driving data in the above embodiment. The vehicle state of each vehicle includes two parts, the historical trajectory and the scenario state (i.e., the sample driving environment data in the above embodiment). The historical trajectory can be composed of the position of the vehicle in the past 10 time steps, and the scenario state includes the vehicle type of the vehicle, the position of nearby future path points and the corresponding road width, the traffic light status of the road it is traveling on, and the destination position; and by converting the vehicle state of each vehicle into their respective coordinate systems, the subsequent learner strategy model can learn a strategy that is invariant to spatial transformations.
[0166] Specifically, expert data, i.e., vehicle motion trajectory data in the real world, is collected. By selecting a "current time point" in the vehicle motion trajectory, the position 10 time steps before the current time point is determined as the historical trajectory, and the situational state of the vehicle at the time point is determined according to the time point corresponding to the historical trajectory position point, and the position 10 time steps after the current time point is used as the real future trajectory; wherein the expert data includes the historical trajectories and situational states of multiple vehicles.
[0167] By inputting expert data into the VAE model, it is enabled to learn the intrinsic distribution of the expert data. Specifically, in the VAE model, the encoder and decoder process the historical trajectories of multiple vehicles to obtain multiple enhanced historical trajectories similar to the historical trajectories (i.e., the enhanced historical driving trajectories in the above embodiment); wherein the VAE model is able to learn the low-dimensional representation (latent space) of the data and regenerate similar new data from the low-dimensional representation, thereby ensuring that the enhanced historical trajectory is similar to the historical trajectory.
[0168] Utilize VAE model to obtain enhanced expert status.
[0169] Specifically, based on the scenario state and the enhanced historical state, the enhanced expert state (ie, the sample enhanced driving data in the above embodiment) of each vehicle in the expert data is obtained.
[0170] Obtain learner data using the learner strategy model.
[0171] Specifically, for the enhanced expert state of each vehicle, an enhanced expert state is sampled from the VAE (as training data) and input into the policy network, and the policy network is used to predict the future position distribution of the vehicle in the next 10 time steps, which is expressed as , assuming it to be the product of a multivariate Gaussian distribution; in practical applications, each vehicle is not directly updated to the predicted position, but several post-processing steps are applied to process the predicted future position distribution to obtain better authenticity; for example, sampling is performed from the future position distribution, each sampled position is projected onto the nearest road, and the projected trajectory is smoothed using a linear quadratic regulator (LQR) to obtain a predicted trajectory for the next 10 time steps; and each vehicle can be updated to the first position of the smoothed trajectory; when the enhanced expert state (as training data) is input into the policy network, the real future trajectory (as a training label) needs to be input into the policy network as well, so as to train the learner policy model according to the predicted trajectory and the real future trajectory.
[0172] The predicted trajectory of the vehicle and the situational state corresponding to each time step of the predicted trajectory are recorded and saved in a playback buffer (i.e., the target buffer in the above embodiment). When the traffic flow is actually simulated, the learner strategy model is run in a closed-loop manner starting at a random time of the training data set, such as cyclically training the learner strategy model 50 times, and the predicted trajectories and situational states of multiple vehicles in each of the 50 cycles are saved in the playback buffer. At the 50th time, the learner data is randomly sampled from the playback buffer, such as data obtained by randomly sampling 8 training times; after the learner data is sampled, the playback buffer is cleared.
[0173] Input the expert data and learner data into VAE to train the VAE model.
[0174] In practical applications, in order to ensure that the real future trajectory can be used as the predicted trajectory of the enhanced expert state, the enhanced expert state needs to be similar to the original expert state. For example, to ensure this similarity, the same VAE model is used to model the expert state and learner state distributions; when the distribution of scenario states is more difficult to model but exhibits a smaller distribution shift, the VAE model reconstructs the historical trajectory distribution based on the scenario state, rather than the distribution of all states of the vehicle (including historical trajectories and scenario states). For each expert state or learner state, the VAE encoder is used to obtain the latent variable distribution, and then the reparameterization technique is applied to sample a latent variable from this distribution. Based on the sampled latent variable distribution and scenario state, the VAE decoder is used to reconstruct the distribution of historical trajectories.
[0175] Specifically, after obtaining the learner data, the learner data and the expert data are input into the VAE model together, the VAE model is used to simultaneously model the distribution of the learner data and the real expert data, the encoder of the VAE model is used to obtain the latent variable distribution z, and the relative entropy loss between the learner data and the real expert data latent variable distribution z is calculated, so that the VAE model is trained to reconstruct the expert data and the learner data, thereby realizing the expansion of the training data distribution.
[0176] The decoder of the VAE model is used to sample from the latent variable distribution z to reconstruct the original data (learner data and real expert data), and the VAE model is trained by calculating the reconstruction loss between the generated data and the original data.
[0177] Train to obtain the learner strategy model.
[0178] Specifically, an enhanced expert state is obtained through the trained VAE model, and the enhanced expert state is input into the learner strategy model to obtain a predicted trajectory. The learner strategy model is trained according to the predicted trajectory and the actual future trajectory. In practical applications, the learner strategy model can be trained by calculating the negative logarithmic probability loss of the predicted trajectory and the actual future trajectory. When the number of training steps reaches a step threshold (for example, one million steps), the model training is terminated to obtain a trained learner strategy model.
[0179] The trajectory prediction model training method provided in the embodiments of this specification solves the problem of distribution deviation caused by the difference between the distribution of test data generated by the learned model and the distribution of real expert training data by expanding the expert training data to cover the test data. It can ensure that the vehicle predicted trajectory is close to the future trajectory of the real expert data, and ensure the accuracy of the vehicle predicted trajectory.
[0180] See also Figure 4 , Figure 4 A flow chart of a target trajectory prediction method provided by an embodiment of the present specification is shown, which specifically includes the following steps.
[0181] Step 402: Determine the historical driving data of the target object.
[0182] Step 404: input the historical driving data into a trajectory prediction model to obtain predicted driving data of the target object, wherein the trajectory prediction model is trained by the above-mentioned trajectory prediction model training method.
[0183] The step of inputting the historical driving data into a trajectory prediction model to obtain predicted driving data of the target object includes:
[0184] Determine the target position distribution of the target object at a preset time step in the future by using the strategy network layer of the trajectory prediction model;
[0185] A target driving trajectory of the target object is determined according to the target position distribution.
[0186] Determining the target driving trajectory of the target object according to the target position distribution includes:
[0187] Determine each target location point from the target location distribution, and project each target location point to an associated road of the target object;
[0188] The target driving trajectory of the target object is determined according to the target position point projected onto the associated road.
[0189] The step of determining the target driving trajectory of the target object according to the target position point projected onto the associated road includes:
[0190] The target location points projected onto the associated roads are connected using the trajectory adjustment layer of the trajectory prediction model to determine the target driving trajectory of the target object.
[0191] For the specific implementation, please refer to the above embodiments, which will not be described in detail here.
[0192] The target trajectory prediction method provided in the embodiments of this specification effectively predicts the future driving trajectory of the target object through a refined and intelligent method, which not only enhances the scientificity and accuracy of the prediction, but also optimizes the smoothness of the driving trajectory, making the predicted trajectory more consistent with the actual driving behavior.
[0193] Corresponding to the above method embodiment, this specification also provides a trajectory prediction model training device embodiment, Figure 5 FIG. 1 is a schematic diagram showing the structure of a trajectory prediction model training device provided by an embodiment of the present specification. Figure 5 As shown, the device comprises:
[0194] A determination module 502 is configured to determine sample driving data and label driving data of a plurality of sample objects;
[0195] An input module 504 is configured to input the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object;
[0196] An acquisition module 506 is configured to input the sample enhanced driving data of each sample object into a trajectory prediction model to obtain the sample predicted driving data of each sample object;
[0197] A first training module 508 is configured to update and train the trajectory prediction model according to the sample predicted driving data and the labeled driving data, and update and train the data enhancement model according to the sample predicted driving data and the sample driving data;
[0198] The second training module 510 is configured to continue to execute the step of inputting the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object until the preset end condition is met, and the trajectory prediction model is obtained by training.
[0199] Optionally, the input module 504 is further configured to:
[0200] The sample historical driving trajectory and sample driving environment data of each sample object are input into the data enhancement model.
[0201] Using the data enhancement model to perform encoding and decoding processing on the sample historical driving trajectory to obtain an enhanced historical driving trajectory of the sample historical driving trajectory;
[0202] According to the enhanced historical driving trajectory and the sample driving environment data, the sample enhanced driving data of each sample object is obtained.
[0203] Optionally, the obtaining module 506 is further configured to:
[0204] Inputting the enhanced historical driving trajectory of each sample object and the sample driving environment data into the trajectory prediction model;
[0205] Determine the sample position distribution of each sample object at a future preset time step by using the strategy network layer in the trajectory prediction model, wherein the historical preset time step is equal to the future preset time step;
[0206] Determining a sample predicted driving trajectory of each sample object according to the sample position distribution;
[0207] Determining sample predicted driving environment data corresponding to the sample predicted driving trajectory according to the sample predicted driving trajectory;
[0208] The sample predicted driving data of each sample object is obtained according to the sample predicted driving trajectory and the sample predicted driving environment data.
[0209] Optionally, the obtaining module 506 is further configured to:
[0210] Determine each sample location point from the sample location distribution, and project each sample location point to an associated road of each sample object;
[0211] The sample predicted driving trajectory of each sample object is determined according to the sample position points projected onto the associated road.
[0212] Optionally, the obtaining module 506 is further configured to:
[0213] The trajectory adjustment layer of the trajectory prediction model is used to connect the sample position points projected onto the associated road to determine the sample predicted driving trajectory of each sample object.
[0214] Optionally, the first training module 508 is further configured to:
[0215] The trajectory prediction model is updated and trained according to the sample predicted driving trajectory and the labeled driving trajectory.
[0216] Optionally, the first training module 508 is further configured to:
[0217] Inputting the sample predicted driving data and the sample driving data into the data enhancement model;
[0218] Using the data enhancement model, obtaining an enhanced predicted driving trajectory corresponding to the sample predicted driving trajectory and an enhanced historical driving trajectory corresponding to the sample historical driving trajectory;
[0219] The data enhancement model is updated and trained according to the enhanced predicted driving trajectory, the sample predicted driving trajectory, the enhanced historical driving trajectory, and the sample historical driving trajectory.
[0220] Optionally, the first training module 508 is further configured to:
[0221] Using the data enhancement model, encoding the sample predicted driving trajectory and the sample historical driving trajectory to obtain the latent variable distribution corresponding to the sample predicted driving trajectory and the latent variable distribution corresponding to the sample historical driving trajectory;
[0222] According to the latent variable distribution corresponding to the sample predicted driving trajectory, the enhanced predicted driving trajectory is obtained through decoding processing of the data enhancement model;
[0223] According to the latent variable distribution corresponding to the sample historical driving trajectory, the enhanced historical driving trajectory is obtained through decoding processing of the data enhancement model.
[0224] Optionally, the first training module 508 is further configured to:
[0225] The encoder for training the data enhancement model is updated according to the latent variable distribution corresponding to the sample predicted driving trajectory and the latent variable distribution corresponding to the sample historical driving trajectory.
[0226] The device further comprises:
[0227] The storage module is configured to store the sample predicted driving data of each sample object into a target buffer.
[0228] Optionally, the first training module 508 is further configured to:
[0229] Selecting target sample predicted driving data from the sample predicted driving data in the target buffer, wherein the number of the target sample predicted driving data is less than or equal to the number of the sample predicted driving data;
[0230] The trajectory prediction model is updated and trained according to the target sample predicted driving data and the labeled driving data.
[0231] Optionally, the obtaining module 506 is further configured to:
[0232] Inputting the sample enhanced driving data of each sample object into the trajectory prediction model;
[0233] In the trajectory prediction model, determining, according to the plurality of sample objects, associated sample objects of each sample object;
[0234] According to the sample enhanced driving data of each sample object, the sample enhanced driving data of the associated sample objects of each sample object, and the relative position between each sample object and its associated sample object, the sample predicted driving data of each sample object is obtained through attention mechanism processing.
[0235] Optionally, the second training module 510 is further configured to:
[0236] Continue to execute the step of inputting the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object until the model training times reaches a preset times threshold, and the trajectory prediction model is obtained by training.
[0237] A trajectory prediction model training device provided by an embodiment of the present specification determines sample driving data and label driving data of multiple sample objects, and inputs the sample driving data of each sample object into a data enhancement model to obtain the sample enhanced driving data of each sample object, thereby expanding the coverage of the training data. By updating the training trajectory prediction model and the data enhancement model, the joint training between the trajectory prediction model and the data enhancement model forms a closed-loop system. The learning feedback of the trajectory prediction model guides the data enhancement model to more effectively generate samples that help improve the prediction performance, and the diversified data provided by the data enhancement model further helps the trajectory prediction model learn a more robust prediction strategy. As the number of iterations increases, each cycle not only adjusts the trajectory prediction model according to the prediction error, but also helps the data enhancement model gradually approach the distribution of real-world data. By continuously using the enhanced sample enhanced driving data for training, the trajectory prediction model can learn more extensive and complex driving data, thereby improving the prediction accuracy on unseen data, improving the adaptability of the trajectory prediction model to environmental changes, and making the trajectory prediction model more robust when facing new scenes or noisy data, thereby reducing the risk of performance degradation due to distribution shift.
[0238] The above is a schematic scheme of a trajectory prediction model training device of this embodiment. It should be noted that the technical scheme of the trajectory prediction model training device and the technical scheme of the above-mentioned trajectory prediction model training method belong to the same concept, and the details not described in detail in the technical scheme of the trajectory prediction model training device can be referred to the description of the technical scheme of the above-mentioned trajectory prediction model training method.
[0239] Corresponding to the above method embodiment, this specification also provides a target trajectory prediction device embodiment, Figure 6 FIG. 2 shows a schematic diagram of a target trajectory prediction device provided by an embodiment of the present specification. Figure 6 As shown, the device comprises:
[0240] A determination module 602 is configured to determine historical driving data of a target object;
[0241] The acquisition module 604 is configured to input the historical driving data into a trajectory prediction model to obtain the predicted driving data of the target object, wherein the trajectory prediction model is trained by the above-mentioned trajectory prediction model training method.
[0242] Optionally, the obtaining module 604 is further configured to:
[0243] Determine the target position distribution of the target object at a preset time step in the future by using the strategy network layer of the trajectory prediction model;
[0244] A target driving trajectory of the target object is determined according to the target position distribution.
[0245] Optionally, the obtaining module 604 is further configured to:
[0246] Determine each target location point from the target location distribution, and project each target location point to an associated road of the target object;
[0247] The target driving trajectory of the target object is determined according to the target position point projected onto the associated road.
[0248] Optionally, the obtaining module 604 is further configured to:
[0249] The target location points projected onto the associated roads are connected using the trajectory adjustment layer of the trajectory prediction model to determine the target driving trajectory of the target object.
[0250] The target trajectory prediction device provided in the embodiments of this specification effectively predicts the future driving trajectory of the target object through a refined and intelligent method, which not only enhances the scientificity and accuracy of the prediction, but also optimizes the smoothness of the driving trajectory, making the predicted trajectory more consistent with the actual driving behavior.
[0251] The above is a schematic scheme of a target trajectory prediction device of this embodiment. It should be noted that the technical scheme of the target trajectory prediction device and the technical scheme of the target trajectory prediction method described above belong to the same concept, and the details not described in detail in the technical scheme of the target trajectory prediction device can be referred to the description of the technical scheme of the target trajectory prediction method described above.
[0252] Figure 7 The block diagram of a computing device 700 according to an embodiment of the present specification is shown. The components of the computing device 700 include but are not limited to a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and the database 750 is used to store data.
[0253] The computing device 700 also includes an access device 740 that enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of network interface, wired or wireless (e.g., a network interface card (NIC)), such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, and a Near Field Communication (NFC).
[0254] In one embodiment of the present specification, the above components of the computing device 700 and Figure 7 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 7 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0255] The computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 700 may also be a mobile or stationary server.
[0256] Among them, the processor 720 is used to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the above-mentioned trajectory prediction model training method and target trajectory prediction method.
[0257] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computing device embodiment, since it is basically similar to the trajectory prediction model training method and the target trajectory prediction method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the trajectory prediction model training method and the target trajectory prediction method embodiment.
[0258] An embodiment of the present specification also provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above-mentioned trajectory prediction model training method and target trajectory prediction method when executed by a processor.
[0259] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computer-readable storage medium embodiment, since it is basically similar to the trajectory prediction model training method and the target trajectory prediction method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the trajectory prediction model training method and the target trajectory prediction method embodiment.
[0260] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned trajectory prediction model training method and target trajectory prediction method.
[0261] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the above-mentioned trajectory prediction model training method and target trajectory prediction method belong to the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the above-mentioned trajectory prediction model training method and target trajectory prediction method.
[0262] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0263] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0264] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0265] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0266] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. A trajectory prediction model training method, include: Determine sample driving data and label driving data of multiple sample objects; Inputting the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object; Inputting the sample enhanced driving data of each sample object into a trajectory prediction model to obtain the sample predicted driving data of each sample object; According to the sample predicted driving data and the labeled driving data, the trajectory prediction model is updated and trained, and according to the sample predicted driving data and the sample driving data, the data enhancement model is updated and trained; Continue to execute the step of inputting the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object until the preset end condition is met, and train to obtain the trajectory prediction model.
2. According to the trajectory prediction model training method of claim 1, the sample driving data includes a sample historical driving trajectory and sample driving environment data corresponding to the sample historical driving trajectory, and the sample historical driving trajectory is determined by the position of the sample object at a historical preset time step; The step of inputting the sample driving data of each sample object into the data enhancement model to obtain the sample enhanced driving data of each sample object includes: Inputting the sample historical driving trajectory and sample driving environment data of each sample object into the data enhancement model; Using the data enhancement model to perform encoding and decoding processing on the sample historical driving trajectory to obtain an enhanced historical driving trajectory of the sample historical driving trajectory; According to the enhanced historical driving trajectory and the sample driving environment data, the sample enhanced driving data of each sample object is obtained.
3. The trajectory prediction model training method according to claim 2, wherein the sample enhanced driving data comprises the enhanced historical driving trajectory and the sample driving environment data; The step of inputting the sample enhanced driving data of each sample object into a trajectory prediction model to obtain the sample predicted driving data of each sample object includes: Inputting the enhanced historical driving trajectory of each sample object and the sample driving environment data into the trajectory prediction model; Determine the sample position distribution of each sample object at a future preset time step by using the strategy network layer in the trajectory prediction model, wherein the historical preset time step is equal to the future preset time step; Determining a sample predicted driving trajectory of each sample object according to the sample position distribution; Determining sample predicted driving environment data corresponding to the sample predicted driving trajectory according to the sample predicted driving trajectory; The sample predicted driving data of each sample object is obtained according to the sample predicted driving trajectory and the sample predicted driving environment data.
4. The trajectory prediction model training method according to claim 1, wherein the sample predicted driving data comprises a sample predicted driving trajectory, and the sample driving data comprises a sample historical driving trajectory; The updating and training of the data enhancement model according to the sample predicted driving data and the sample driving data includes: Inputting the sample predicted driving data and the sample driving data into the data enhancement model; Using the data enhancement model, obtaining an enhanced predicted driving trajectory corresponding to the sample predicted driving trajectory and an enhanced historical driving trajectory corresponding to the sample historical driving trajectory; The data enhancement model is updated and trained according to the enhanced predicted driving trajectory, the sample predicted driving trajectory, the enhanced historical driving trajectory, and the sample historical driving trajectory.
5. The trajectory prediction model training method according to claim 4, wherein the data enhancement model is used to obtain an enhanced predicted driving trajectory corresponding to the sample predicted driving trajectory and an enhanced historical driving trajectory corresponding to the sample historical driving trajectory. include: Using the data enhancement model, encoding the sample predicted driving trajectory and the sample historical driving trajectory to obtain the latent variable distribution corresponding to the sample predicted driving trajectory and the latent variable distribution corresponding to the sample historical driving trajectory; According to the latent variable distribution corresponding to the sample predicted driving trajectory, the enhanced predicted driving trajectory is obtained through decoding processing of the data enhancement model; According to the latent variable distribution corresponding to the sample historical driving trajectory, the enhanced historical driving trajectory is obtained through decoding processing of the data enhancement model.
6. The trajectory prediction model training method according to claim 1 or 3, after obtaining the sample prediction driving data of each sample object, further include: storing the sample predicted driving data of each sample object into a target buffer; The updating and training of the trajectory prediction model according to the sample predicted driving data and the label driving data includes: Selecting target sample predicted driving data from the sample predicted driving data in the target buffer, wherein the number of the target sample predicted driving data is less than or equal to the number of the sample predicted driving data; The trajectory prediction model is updated and trained according to the target sample predicted driving data and the labeled driving data.
7. The trajectory prediction model training method according to claim 1, wherein the sample enhanced driving data of each sample object is input into the trajectory prediction model to obtain the sample predicted driving data of each sample object, include: Inputting the sample enhanced driving data of each sample object into the trajectory prediction model; In the trajectory prediction model, determining, according to the plurality of sample objects, associated sample objects of each sample object; According to the sample enhanced driving data of each sample object, the sample enhanced driving data of the associated sample objects of each sample object, and the relative position between each sample object and its associated sample object, the sample predicted driving data of each sample object is obtained through attention mechanism processing.
8. A target trajectory prediction method, include: Determine the historical driving data of the target object; The historical driving data is input into a trajectory prediction model to obtain predicted driving data of the target object, wherein the trajectory prediction model is obtained by training using any one of the trajectory prediction model training methods of claims 1-7.
9. A computing device, include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium storing a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Vehicle track prediction model training method and device, equipment and storage medium
CN116401549A
Method and system for developing autonomous vehicle training simulations
US20230030474A1
Cited By
Trajectory prediction model training method, trajectory prediction model prediction method and storage medium
CN118779584A
Task execution method and device, storage medium and electronic equipment
CN119206538A
Crowd travel rhythm prediction method and device based on transfer learning
CN119647660A
