Vehicle trajectory prediction model training method and device, equipment and storage medium
By constructing a vehicle trajectory prediction model and training the trajectory prediction network using vehicle state data, the problem of unconsidered interactions in vehicle trajectory prediction is solved, achieving higher prediction reliability and accuracy.
Patent Information
- Application Number
- CN202310368938.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-07
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2043-04-07
AI Technical Summary
Existing vehicle trajectory prediction methods fail to fully consider the interactions between vehicles, resulting in relatively simplistic prediction results that are difficult to describe the uncertainty of vehicle trajectory predictions, thus reducing the reliability and accuracy of the predictions.
By selecting the target vehicle from among all vehicles, identifying neighboring candidate vehicles, and constructing real trajectory sequences and historical state sequences using vehicle state data, these are input into a pre-built trajectory prediction network model for training. This fully reflects the interaction between vehicles and improves the accuracy of model training.
This approach enables accurate training of the vehicle trajectory prediction model, improving the reliability and accuracy of predictions and avoiding the low accuracy and singular results caused by an overly simplistic training set.
Smart Images

Figure CN116401549B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicle trajectory prediction, in particular to a vehicle trajectory prediction model training method and device, equipment and a storage medium. BACKGROUND
[0002] In recent years, intelligent driving has become a new research field of applying intelligence. For intelligent vehicles, correct motion planning and behavior decision not only depend on the accurate positioning of the intelligent vehicles to the surrounding vehicles, but also depend on the accurate prediction of the future trajectories of the surrounding vehicles. However, in complex traffic scenarios, the interaction between vehicles leads to the uncertainty of driving intention, so that the future trajectory of the vehicle has the characteristics of multi-modal, which greatly increases the difficulty of the intelligent vehicle to predict the future trajectory of the surrounding vehicle.
[0003] The existing vehicle trajectory prediction methods mainly include methods based on physical models, methods based on driving intention and methods based on interaction, etc. However, the existing vehicle trajectory prediction methods ignore the mutual influence between vehicles and do not fully consider the interaction between vehicles, so the predicted trajectory result is relatively single and it is difficult to describe the uncertainty of the predicted trajectory of the vehicle, and the credibility and accuracy of the vehicle trajectory prediction are low. SUMMARY
[0004] The present application provides a vehicle trajectory prediction model training method, device, equipment and storage medium to improve the credibility and accuracy of vehicle trajectory prediction.
[0005] According to an aspect of the present application, a vehicle trajectory prediction model training method is provided, the method comprising:
[0006] Obtaining vehicle state data of each driving vehicle in a preset driving area in a preset time period;
[0007] Selecting any driving vehicle as a target driving vehicle from the driving vehicles; wherein, other driving vehicles except the target driving vehicle are reference driving vehicles;
[0008] According to the position distance between each reference driving vehicle and the target driving vehicle, determining a candidate driving vehicle adjacent to the target driving vehicle from the reference driving vehicles;
[0009] According to the vehicle state data corresponding to the target driving vehicle and the candidate driving vehicle respectively, determining a real trajectory sequence of the target driving vehicle in a preset future observation period, and determining a first historical state sequence and a second historical state sequence of the target driving vehicle in a preset historical observation period;
[0010] The first historical state sequence, the second historical state sequence and the real trajectory sequence corresponding to the target driving vehicle are input into a pre-constructed trajectory prediction network model, the trajectory prediction network model is model trained, and a target vehicle trajectory prediction model is obtained, which is used for predicting a vehicle driving trajectory.
[0011] According to another aspect of the present application, a vehicle trajectory prediction model training device is provided, the device comprising:
[0012] A state data acquisition module is configured to acquire vehicle state data of each driving vehicle in a preset driving area within a preset time period.
[0013] A target vehicle determination module is configured to select any driving vehicle as a target driving vehicle from the driving vehicles.
[0014] A candidate vehicle determination module is configured to determine a candidate driving vehicle adjacent to the target driving vehicle from the reference driving vehicles according to a position distance between each reference driving vehicle and the target driving vehicle.
[0015] A state sequence determination module is configured to determine a real trajectory sequence of the target driving vehicle in a preset future observation period and determine a first historical state sequence and a second historical state sequence of the target driving vehicle in a preset historical observation period according to vehicle state data corresponding to the target driving vehicle and the candidate driving vehicle.
[0016] A prediction model training module is configured to input the first historical state sequence, the second historical state sequence and the real trajectory sequence corresponding to the target driving vehicle into a pre-constructed trajectory prediction network model, model train the trajectory prediction network model, and obtain a target vehicle trajectory prediction model for predicting a vehicle driving trajectory.
[0017] According to another aspect of the present application, an electronic device is provided, the electronic device comprising:
[0018] at least one processor; and
[0019] a memory in communication with the at least one processor; wherein
[0020] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the vehicle trajectory prediction model training method according to any one of the embodiments of the present application.
[0021] According to another aspect of the present application, a computer readable storage medium is provided, which stores computer instructions for causing a processor to implement the vehicle trajectory prediction model training method according to any of the embodiments of the present application when executed.
[0022] The technical scheme of the embodiment of the present application selects any driving vehicle as a target driving vehicle and determines reference driving vehicles from the driving vehicles, determines candidate driving vehicles adjacent to the target driving vehicle according to the position distance between each reference driving vehicle and the target driving vehicle, determines the real trajectory sequence of the target driving vehicle according to the vehicle state data corresponding to the target driving vehicle and the candidate driving vehicle, and determines the first historical state sequence and the second historical state sequence of the target driving vehicle, thereby realizing accurate construction of the sample training set for training the vehicle trajectory prediction model, fully reflecting the interaction between vehicles in the sample training set, avoiding the situation that the vehicle trajectory prediction model training accuracy is low and the trajectory result is single due to the over-singleness of the sample training set, inputting the first historical state sequence, the second historical state sequence and the real trajectory sequence into the pre-constructed trajectory prediction network model to train the trajectory prediction network model, and obtaining the target vehicle trajectory prediction model, thereby realizing the training accuracy of the trajectory prediction network model and improving the prediction credibility and accuracy of the subsequent vehicle trajectory prediction.
[0023] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0025] Figure 1 is a flowchart of a vehicle trajectory prediction model training method according to the first embodiment of the present application;
[0026] Figure 2A is a flowchart of a vehicle trajectory prediction model training method according to the second embodiment of the present application;
[0027] Figure 2B is a model structure diagram of a trajectory prediction network model according to the second embodiment of the present application;
[0028] Figure 2C is a model structure schematic diagram of a trajectory prediction test network model provided according to Embodiment Two of the present application;
[0029] Figure 3 is a structure schematic diagram of a vehicle trajectory prediction model training device provided according to Embodiment Three of the present application;
[0030] Figure 4 is a structure schematic diagram of an electronic device for implementing a vehicle trajectory prediction model training method. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] Embodiment One
[0034] Figure 1 A flowchart of a vehicle trajectory prediction model training method provided for Embodiment One of the present application, the present embodiment can be applicable to training a vehicle trajectory prediction model and using the trained model to predict the vehicle trajectory. The method can be executed by a vehicle trajectory prediction model training device, which can be realized in the form of hardware and / or software, and can be configured in an electronic device. The method specifically includes:
[0035] S110, obtaining vehicle state data of each driving vehicle in a preset driving area in a preset time period.
[0036] The preset time period and the preset driving area can be preset by a related technical person. The driving vehicle can be a vehicle appearing in the preset time period and the preset driving area. The vehicle state data can include a lateral position, a longitudinal position, a driving speed, and a yaw angle of the vehicle.
[0037] For example, vehicle state data of all driving vehicles in the same preset driving area can be collected at a preset time.
[0038] S120, selecting any driving vehicle as a target driving vehicle from the driving vehicles; wherein, other driving vehicles except the target driving vehicle are reference driving vehicles.
[0039] For example, any driving vehicle can be selected as a target driving vehicle from the driving vehicles, and other driving vehicles except the target driving vehicle are reference driving vehicles. Therefore, each driving vehicle can be a target driving vehicle.
[0040] S130, determining a candidate driving vehicle adjacent to the target driving vehicle from the reference driving vehicles according to a position distance between each reference driving vehicle and the target driving vehicle.
[0041] For example, all reference driving vehicles appearing in a circular range with a preset radius distance from the centroid of the target driving vehicle can be determined as candidate driving vehicles adjacent to the target driving vehicle. The preset radius distance can be preset by a related technical person according to actual needs, for example, the preset radius distance can be 30 meters.
[0042] S140, determining a real trajectory sequence of the target driving vehicle in a preset future observation period and determining a first historical state sequence and a second historical state sequence of the target driving vehicle in a preset historical observation period according to vehicle state data corresponding to the target driving vehicle and the candidate driving vehicle.
[0043] The preset future observation period and the preset historical observation period can be preset by a related technical person according to actual needs.
[0044] For example, data corresponding to a period time of the preset future observation period can be extracted from the vehicle state data of the target driving vehicle as a real trajectory sequence in the preset future observation period; data corresponding to a period time of the preset historical observation period can be extracted from the vehicle state data of the target driving vehicle as a first historical state sequence in the preset historical observation period; and data corresponding to a period time of the preset historical observation period can be extracted from the vehicle state data of the candidate driving vehicle as a second historical state sequence in the preset historical observation period.
[0045] In an optional embodiment, according to the vehicle state data corresponding to the target driving vehicle and the candidate driving vehicle respectively, the real trajectory sequence of the target driving vehicle in the preset future observation period is determined, and the first historical state sequence and the second historical state sequence of the target driving vehicle in the preset historical observation period are determined, including: constructing the first historical state sequence of the target driving vehicle in the preset historical observation period according to the vehicle state data of the target driving vehicle; selecting a target candidate vehicle matching the preset historical observation period from the candidate driving vehicles adjacent to the target driving vehicle; constructing the historical state sequence of the target candidate vehicle in the preset historical observation period according to the vehicle state data of the target candidate vehicle, and taking the historical state sequence of the target candidate vehicle as the second historical state sequence of the target driving vehicle; constructing the real trajectory sequence of the target driving vehicle in the preset future observation period according to the vehicle state data of the target driving vehicle.
[0046] For example, for the extraction of the first historical state sequence, the time length of the preset historical observation period can be defined as T obs , and the first historical state sequence can be defined as S tar . It should be noted that any driving vehicle can be the target driving vehicle, and any driving vehicle as the target driving vehicle corresponds to the corresponding first historical state sequence, second historical state sequence and real trajectory sequence. Accordingly, tar in the first historical state sequence S tar can represent the target driving vehicle, and the first historical state sequence S tar is represented as follows:
[0047]
[0048] wherein, t∈{1,2,…,T obs is the vehicle state data of the target driving vehicle at time t; represents the lateral position of the target driving vehicle tar at time t; represents the longitudinal position of the target driving vehicle tar at time t; represents the driving speed of the target driving vehicle tar at time t; represents the yaw angle of the target driving vehicle tar at time t.
[0049] For example, the candidate driving vehicle matching the preset historical observation period is selected from the candidate driving vehicles adjacent to the target driving vehicle as the target candidate vehicle. For example, if T obsIf there are N candidate driving vehicles in the time range, the N candidate driving vehicles are taken as target candidate vehicles. According to the vehicle state data of the target candidate vehicles, a historical state sequence Nbrs of the target candidate vehicles in a preset historical observation time period is constructed, and the representation of the historical state sequence Nbrs of the target candidate vehicles is as follows:
[0050]
[0051] wherein, i∈{1,2,…,N} is the historical state sequence of the i th target candidate vehicle; j∈{1,2,…,T obs is the vehicle state data of the target candidate vehicle i at time j; wherein, represents the lateral position of the target candidate vehicle i at time j; represents the longitudinal position of the target candidate vehicle i at time j; represents the driving speed of the target candidate vehicle i at time j; represents the yaw angle of the target candidate vehicle i at time j.
[0052] Exemplarily, the historical state sequence Nbrs of the target candidate vehicle is taken as the second historical state sequence of the target driving vehicle.
[0053] Exemplarily, for the extraction of the real trajectory sequence, the time length of the preset future observation time period can be defined as T pred , and the real trajectory sequence Truth of the target driving vehicle tar is obtained:
[0054]
[0055] wherein, k∈{1,2,…,T pred is the real position information in the vehicle state data of the target driving vehicle at time T obs +k.
[0056] S150, the first historical state sequence, the second historical state sequence and the real trajectory sequence corresponding to the target driving vehicle are input into the pre-constructed trajectory prediction network model, the model training of the trajectory prediction network model is performed, and the target vehicle trajectory prediction model is obtained, which is used for predicting the vehicle driving trajectory.
[0057] wherein, the trajectory prediction network model can be pre-set by a related technical person, for example, the trajectory prediction network model can be an existing neural network model. Optionally, the trajectory prediction network model can also be pre-constructed by a related technical person.
[0058] Exemplarily, the first historical state sequence, the second historical state sequence and the real trajectory sequence corresponding to the target running vehicle are input into the pre-constructed trajectory prediction network model, the preset trajectory prediction network model is subjected to model training, the model parameters are iteratively updated, and when the model reaches the preset model convergence requirement, the training of the trajectory prediction network model is completed, and the target vehicle trajectory prediction model is obtained.
[0059] It should be noted that the target vehicle trajectory prediction model is used for accurate prediction of the vehicle running trajectory, and specifically, the vehicle state data of a target to-be-tested vehicle to be predicted can be input into the target vehicle trajectory prediction model, and the target vehicle trajectory prediction model outputs position information of a trajectory that the target to-be-tested vehicle is most likely to run in the future.
[0060] The technical scheme of the embodiment of the present application selects any running vehicle as a target running vehicle and determines a reference running vehicle from each running vehicle, determines a candidate running vehicle adjacent to the target running vehicle according to the position distance between each reference running vehicle and the target running vehicle, determines a real trajectory sequence of the target running vehicle according to the vehicle state data corresponding to the target running vehicle and the candidate running vehicle, and determines a first historical state sequence and a second historical state sequence of the target running vehicle, thereby realizing accurate construction of a sample training set for training a vehicle trajectory prediction model, fully reflecting the interaction between vehicles in the sample training set, avoiding the situation that the vehicle trajectory prediction model training accuracy is low and the trajectory result is relatively single due to the over-singleness of the sample training set, inputting the first historical state sequence, the second historical state sequence and the real trajectory sequence into a pre-constructed trajectory prediction network model, training the trajectory prediction network model, and obtaining a target vehicle trajectory prediction model, thereby realizing the training accuracy of the trajectory prediction network model and improving the prediction credibility and accuracy of the subsequent vehicle trajectory prediction.
[0061] Embodiment two
[0062] Fig. 2 is a flowchart of a vehicle trajectory prediction model training method provided by the embodiment two of the present application, which is optimized and improved on the basis of the above technical schemes.
[0063] Further, the trajectory prediction network model comprises an input encoding module, a spatial attention module connected to the output end of the input encoding module, a driving intention learning module connected to the output end of the spatial attention module, and an output decoding module connected to the output end of the driving intention learning module.
[0064] Further, the step of "inputting the first historical state sequence, the second historical state sequence and the real trajectory sequence corresponding to the target driving vehicle into the pre-constructed trajectory prediction network model, training the trajectory prediction network model, and obtaining the target vehicle trajectory prediction model" is further refined as "inputting the first historical state sequence, the second historical state sequence and the real trajectory sequence into an input encoding module for sequence encoding processing to obtain a first state encoding sequence, a second state encoding sequence and a real trajectory encoding sequence; determining a feature fusion encoding parameter of the target driving vehicle based on a spatial attention module and a driving intention learning module according to the first state encoding sequence and the second state encoding sequence; determining a time domain fusion encoding parameter of the target driving vehicle based on the driving intention learning module according to the feature fusion encoding parameter and the real trajectory encoding sequence; determining a driving intention vector parameter based on the driving intention learning module according to the time domain fusion encoding parameter; determining a driving intention output parameter based on an output decoding module according to the driving intention vector parameter and the feature fusion encoding parameter; and adjusting the weight parameters in the input encoding module, the spatial attention module, the driving intention learning module and the output decoding module according to the driving intention output parameter, respectively, until a preset training end condition is met, to obtain the target vehicle trajectory prediction model." This perfects the model structure of the trajectory prediction network model and the model training method of the trajectory prediction network model. It should be noted that the parts not described in detail in the embodiments of the present application can be referred to the descriptions of other embodiments.
[0065] As shown in Figure 2A , the method comprises the following specific steps:
[0066] S210, obtaining vehicle state data of each driving vehicle in a preset driving area within a preset time period.
[0067] S220, selecting any driving vehicle as a target driving vehicle from the driving vehicles; wherein, the other driving vehicles except the target driving vehicle are reference driving vehicles.
[0068] S230, determining a candidate driving vehicle adjacent to the target driving vehicle from the reference driving vehicles according to the position distance between each reference driving vehicle and the target driving vehicle.
[0069] S240, determining a real trajectory sequence of the target driving vehicle in a preset future observation period and determining a first historical state sequence and a second historical state sequence of the target driving vehicle in a preset historical observation period according to the vehicle state data corresponding to the target driving vehicle and the candidate driving vehicle, respectively.
[0070] It should be noted that the trajectory prediction network model for trajectory prediction can be constructed in advance by a person skilled in the art. The trajectory prediction network model constructed in advance can include an input encoding module, a spatial attention module connected to the output end of the input encoding module, a driving intention learning module connected to the output end of the spatial attention module, and an output decoding module connected to the output end of the driving intention learning module. The module structures and functions of different modules are different.
[0071] S250, input the first historical state sequence, the second historical state sequence and the real trajectory sequence into the input encoding module in the pre-constructed trajectory prediction network model for sequence encoding processing to obtain the first state encoding sequence, the second state encoding sequence and the real trajectory encoding sequence.
[0072] The input encoding module can be a module for encoding the input sequence data, and the input encoding module can include an encoder corresponding to the number of input sample features, and each encoder can be composed of a GRU (gated recurrent unit).
[0073] For example, the first historical state sequence, the second historical state sequence and the real trajectory sequence can be input into the corresponding encoders in the input encoding module for encoding processing by the GRU. The first historical state sequence, the second historical state sequence and the real trajectory sequence of the target driving vehicle tar are represented by S tar , Nbrs and Truth tar respectively. The encoders in the input encoding module are used to encode S tar , Nbrs and Truth tar respectively:
[0074]
[0075]
[0076]
[0077] wherein h tar ∈R 1×32 is the first state encoding sequence obtained after encoding the target driving vehicle; Encoder1 is an encoder for encoding the first historical state sequence S tar ; Encoder1 is composed of a GRU, the input feature number of the GRU in Encoder1 is four, which are horizontal position feature, longitudinal position feature, driving speed feature and yaw angle feature, and the hidden feature number is 32. The sequence length is T obs , the number of layers is 1, and the weight parameter is bias parameters are
[0078] wherein h nbrs = [h 1 ,h 1 ,…,h N ]∈R N×32 is a second state encoding sequence obtained after encoding the target vehicle to travel. Encoder2 is an encoder for encoding the second historical state sequence h nbrs ; the Encoder2 is composed of a gated recurrent unit GRU, the input feature number of the GRU in the Encoder2 is four, which are the lateral position feature, the longitudinal position feature, the travel speed feature and the yaw angle feature, and the hidden feature number is 32. The sequence length is T obs , the number of layers is 1 layer, and the weight parameter is bias parameters are
[0079] wherein F tar ∈R 1×128 is a real trajectory encoding sequence obtained after encoding the target vehicle to travel. Encoder3 is an encoder for encoding the real trajectory sequence Truth tar ; the Encoder3 is composed of a gated recurrent unit GRU; the input feature number of the GRU in the Encoder3 is two, which are the real lateral position feature and the real longitudinal position feature of the target vehicle to travel, and the hidden feature number is 128. The sequence length is T pred , the number of layers is 1 layer, and the weight parameter is bias parameters are
[0080] S260, according to the first state encoding sequence and the second state encoding sequence, based on the spatial attention module and the driving intention learning module in the trajectory prediction network model constructed in advance, the feature fusion encoding parameters of the target vehicle to travel are determined.
[0081] wherein the spatial attention module is used to determine the attention allocated to each target candidate vehicle according to the first state encoding sequence and the second state encoding sequence, so as to perform feature interaction and fusion on the target vehicle to travel and the target candidate vehicle.
[0082] In an optional embodiment, the feature fusion encoding parameter of the target vehicle is determined based on the spatial attention module and the driving intention learning module according to the first state encoding sequence and the second state encoding sequence, including: determining the interaction feature sequence of the target vehicle based on the preset normalization function in the spatial attention module according to the first state encoding sequence and the second state encoding sequence; determining the feature fusion encoding parameter of the target vehicle based on the preset concatenation function in the driving intention learning module according to the first state encoding sequence and the interaction feature sequence.
[0083] For example, the spatial attention module can determine the attention weight of the target vehicle to each target candidate vehicle by using the first state encoding sequence h tar and the second state encoding sequence h nbrs . The determination method of the attention weight of the target vehicle to each target candidate vehicle is as follows:
[0084] α nbrs =softmax(h tar e h nbrs );
[0085] wherein, α nbrs =[α 1 ,α 2 ,…,α n ]∈R N×1 stores the attention weight of the target vehicle to all target candidate vehicles; softmax() is a preset normalization function in the spatial attention module; e represents the dot product operation between vectors.
[0086] For example, the attention weight is assigned to the corresponding target candidate vehicle, and finally the interaction feature sequence att nbrs ∈R 1×32 of the target vehicle is obtained.
[0087] att nbrs =α nbrs ×h nbrs .
[0088] For example, the driving intention learning module uses a preset concatenation function to concatenate the first state encoding sequence h tar and the interaction feature sequence att nbrs to obtain the feature fusion encoding parameter H between the first state encoding sequence and the interaction feature sequence of the target vehicle, wherein the determination method of the feature fusion encoding parameter H can be as follows:
[0089] H=concat(h tar ,att nbrs ;2);
[0090] wherein H∈R 1×64 , concat(H tar , att nbrs ); 2) represents concatenating h tar and att nbrs in the second dimension.
[0091] S270, according to the feature fusion encoding parameter and the real trajectory encoding sequence, determining the time domain fusion encoding parameter of the target running vehicle based on the driving intention learning module.
[0092] For example, the driving intention learning module concatenates the feature fusion encoding parameter H and the real trajectory encoding sequence to obtain the time domain fusion encoding parameter T of the target running vehicle, wherein the determination method of the time domain fusion encoding parameter T can be as follows:
[0093] T=concat(H,F tar ); 2);
[0094] wherein T∈R 1×19 2, concat(H,F tar ); 2) represents concatenating H and F tar in the second dimension.
[0095] S280, determining the driving intention vector parameter based on the time domain fusion encoding parameter and the driving intention learning module.
[0096] wherein at least two fully connected layers can be deployed in the driving intention learning module, the time domain fusion encoding parameter and the feature fusion encoding parameter are respectively taken as the input of the corresponding fully connected layer, the weight parameter of the corresponding fully connected layer is trained, the output result of the fully connected layer is obtained, and the output result is determined as the driving intention vector parameter.
[0097] In an optional embodiment, determining the driving intention vector parameter based on the time domain fusion encoding parameter and the driving intention learning module comprises: determining a first preset driving intention probability based on a first preset network structure in the driving intention learning module according to the time domain fusion encoding parameter; determining a first target driving intention distribution based on a preset classification distribution function in the driving intention learning module according to the first preset driving intention probability; and performing vector sampling processing on the first target driving intention distribution in a preset dimension to obtain the driving intention vector parameter in the preset dimension.
[0098] wherein the first preset network structure can be a fully connected layer network structure. For example, the time domain fusion encoding parameter can be input into the fully connected layer network structure to obtain the first preset driving intention probability. The determination method of the first preset driving probability q is as follows:
[0099]
[0100] wherein q = [π1, π2, …, π K ] ∈ R 1×K , K ∈ {1, 2, …, 15} is a probability vector, each element in the probability vector is a probability value, K is a hyperparameter set by considering, corresponding to the driving intention in K; φ is an embedding function of the full connection layer network structure; is a weight parameter of the full connection layer network structure, is a bias parameter of the full connection layer.
[0101] Illustratively, according to the first preset driving intention probability q, the first target driving intention distribution is determined based on the preset classification distribution function in the driving intention learning module. Wherein, the classification distribution function can be preset by the relevant technical personnel, for example, the classification distribution function can be OneHot (one-hot encoding).
[0102] Specifically, a OneHot classification distribution Q (Z q |T) with q as the probability can be created, that is, the first target driving intention distribution, denoted as Z q : Cat (π1, π2, …, π K ), wherein Cat () is a preset classification distribution function. wherein, wherein, d ∈ {1, 2, …, K}.
[0103] Illustratively, the first target driving intention distribution Q (Z q |T) is subjected to vector sampling processing under a preset dimension, to obtain a driving intention vector parameter of a preset dimension. Specifically, the preset dimension is set to be a K-dimensional unit matrix, a vector is sampled from Q (Z q |T), and the sampled vector is taken as the driving intention vector parameter; wherein I K×K is a preset K-dimensional unit matrix.
[0104] S290, according to the driving intention vector parameter and the feature fusion encoding parameter, based on the output decoding module in the pre-constructed trajectory prediction network model, determine the driving intention output parameter.
[0105] Illustratively, the driving intention vector parameter and the feature fusion encoding parameter H can be spliced to obtain the target fusion feature between the historical state feature, the interaction feature and the driving intention vector of the target driving vehicle. Wherein, the determination method of the target fusion feature D is as follows:
[0106]
[0107] where D∈R K×(K+64) , represents the H and are spliced in the second dimension.
[0108] wherein the output decoding module can include at least one decoder for decoding the input parameters, such as the target fusion feature. The decoder is composed of a gated recurrent unit GRU. Exemplarily, the decoding manner of the output module to the target fusion feature D can be as follows:
[0109]
[0110] wherein, Decoder is a decoder for decoding the target fusion feature D; the decoder is composed of a gated recurrent unit GRU, the input feature number of the GRU in the decoder is K+64, the hidden feature number is 32, and the sequence length is the time length T of the preset future observation period pred , the number of layers is 1 layer, is the weight parameter of the decoder, is the bias parameter of the decoder.
[0111] Exemplarily, assuming the predicted trajectory The lateral and longitudinal position coordinates of the target vehicle at each prediction time l∈{1,2,…,T pred} obey a bivariate Gaussian mixture distribution, which is composed of K independent bivariate Gaussian distributions, and h D is respectively passed through three fully connected layers to obtain three output parameters, i.e., driving intention output parameters. Among them, the three driving intention output parameters are represented by μ D , σ D and cor D . Among them, the determination manner of the driving intention output parameters μ D , σ D and cor D is as follows:
[0112]
[0113]
[0114]
[0115] wherein, represents the mean sequence of the lateral and longitudinal coordinates of the K independent bivariate Gaussian distributions of the predicted trajectory; can represent an embedding function of a fully connected layer, It can represent a fully connected layer Weight parameters; It can represent a fully connected layer The bias parameters.
[0116] in, This represents the variance sequence of the independent bivariate Gaussian distributions of the predicted trajectory K. It can represent the embedding function of a fully connected layer. It can represent a fully connected layer Weight parameters; It can represent a fully connected layer The bias parameters.
[0117] in, This represents the sequence of correlation coefficients between the x and y axes of the independent binary Gaussian distributions of the predicted trajectory K. It can represent the embedding function of a fully connected layer. It can represent a fully connected layer Weight parameters; It can represent a fully connected layer The bias parameters.
[0118] S2100. Based on the driving intention output parameters, adjust the weight parameters in the input encoding module, spatial attention module, driving intention learning module, and output encoding module respectively until the preset training termination condition is met, and obtain the target vehicle trajectory prediction model.
[0119] like Figure 2B The diagram shows the model structure of a trajectory prediction network. The input encoding module contains corresponding encoders, each composed of a gated recurrent unit (GRU). The first historical state sequence S of the target vehicle is processed. tar The second historical state sequence Nbrs and the true trajectory sequence Truth tar The input is fed into the GRU of the corresponding encoder for encoding. This yields the first historical state sequence S. tar The first state encoded sequence h after encoding tar The second state encoding sequence h after encoding the second historical state sequence Nbrs nbrs and the true trajectory sequence Truth tar Encoded sequence F of the true trajectory tar The spatial attention module encodes the first state sequence h. tar Second historical state sequence h nbrs Feature fusion is performed to obtain the interactive feature sequence att nbrs The interaction feature sequence att is processed by the driving intention learning module. nbrsand the first state encoding sequence h tar The splicing is performed to obtain the feature fusion encoding parameter H, and the feature fusion encoding parameter H and the real trajectory encoding sequence F tar The splicing is performed to obtain the time domain fusion encoding parameter T. Through the preset full connection layer network structure in the driving intention learning module, the feature fusion encoding parameter H and the time domain fusion encoding parameter T are respectively input into the corresponding full connection layer to obtain the corresponding preset driving probability p and q respectively. The preset driving probability q is sampled to obtain the driving intention vector parameter The feature fusion encoding parameter H is spliced and input into the output decoding module. After the decoding operation of the output decoding module, the decoded parameter h D is input into three full connection layers to obtain the driving intention output parameter μ D , σ D and cor D output by the three full connection layers respectively.
[0120] It should be noted that in the model training process of the trajectory prediction network model, the weight parameters and bias parameters involved in the input encoding module, the spatial attention module, the driving intention learning module and the output encoding module are updated and iterated in the training process to continuously adjust and optimize the model until the set training end condition is met, and the training of the trajectory prediction network model is ended. The training end condition can be that the set iteration threshold is reached. To further improve the training accuracy of the trajectory prediction model, the training end condition can be further optimized.
[0121] In an optional embodiment, according to the driving intention output parameter, the weight parameters in the input encoding module, the spatial attention module, the driving intention learning module and the output encoding module are adjusted until the preset training end condition is met, and a target vehicle trajectory prediction model is obtained, including: determining a second preset driving intention probability based on the second preset network structure in the driving intention learning module according to the feature fusion encoding parameter; determining a second target driving intention distribution based on the preset classification distribution function in the driving intention learning module according to the second preset driving intention probability; determining the dispersion between the first target driving intention distribution and the second target driving intention distribution; determining a target loss value according to the dispersion, the driving intention output parameter and the first preset driving intention probability; adjusting the weight parameters in the input encoding module, the spatial attention module, the driving intention learning module and the output encoding module according to the driving intention output parameter until the target loss value meets the preset loss value judgment condition, and obtaining the target vehicle trajectory prediction model.
[0122] The second preset network structure can be a fully connected layer network structure. For example, the feature fusion encoding parameter is input into the fully connected layer network structure to obtain the second preset driving intention probability.
[0123] The determination manner of the second preset driving intention probability p can be as follows:
[0124]
[0125] H is a feature fusion encoding parameter, K is a probability vector, each element of the probability vector is a probability value, K is a hyperparameter set by a person skilled in the art, and corresponds to a driving intention in K; φ is an embedding function of the fully connected layer network structure; is a weight parameter of the fully connected layer network structure, is a bias parameter of the fully connected layer.
[0126] For example, according to the second preset driving intention probability p, a second target driving intention distribution is determined based on a preset classification distribution function in the driving intention learning module. The classification distribution function can be preset by a person skilled in the art, for example, the classification distribution function can be OneHot (one-hot encoding).
[0127] Specifically, a OneHot classification distribution P(Z p |H) with p as a probability can be created, that is, the second target driving intention distribution is Cat() is a preset classification distribution function. wherein, wherein, c is an integer in the set {1, 2, …, K}.
[0128] For example, a dispersion between the first target driving intention distribution and the second target driving intention distribution is determined, and the determination manner of the dispersion can be as follows:
[0129] M = KL(Q(Z q |T) || P(Z p |H));
[0130] wherein, KL is a KL divergence (Kullback-Leibler divergence) function, used to calculate the KL divergence between Q(Z q |T) and P(Z p |H).
[0131] For example, the target loss value is determined according to the dispersion, the driving intention output parameter and the first preset driving intention probability. The specific determination manner of the target loss value Loss is as follows:
[0132] Loss = M - logP(Truth tar | μ D , σ D , cor D , q);
[0133] Wherein, M is the KL dispersion, -logP(Truth tar | μ D , σ D , cor D , q) is used to represent the negative log-likelihood function between the target vehicle future real trajectory and the predicted trajectory. Wherein, Truth tar represents the real trajectory sequence of the target vehicle; μ D , σ D , cor D is the driving intention output parameter, and q is the first preset driving intention probability.
[0134] For example, whether the preset loss value judgment condition is met is judged according to the target loss value, so as to obtain the target vehicle trajectory prediction model. For example, if the target loss value reaches the set loss value threshold, it can be considered that the preset loss value judgment condition is met, the model iteration training is terminated, and the target vehicle trajectory prediction model is obtained. Optionally, the Adam optimizer can be used to train the weight parameters and the bias parameters in the model during the training process of the trajectory prediction model, the learning rate can be set to 0.0001, when the target loss value reaches the minimum value (or the set loss value threshold), the corresponding weight parameters and the bias parameters are saved, and the target vehicle trajectory prediction model is obtained.
[0135] The technical scheme of the embodiment inputs the first historical state sequence, the second historical state sequence and the real trajectory sequence into an input encoding module for sequence encoding processing to obtain a first state encoding sequence, a second state encoding sequence and a real trajectory encoding sequence; determines a feature fusion encoding parameter of the target driving vehicle based on a spatial attention module and a driving intention learning module according to the first state encoding sequence and the second state encoding sequence; determines a time domain fusion encoding parameter of the target driving vehicle based on the driving intention learning module according to the feature fusion encoding parameter and the real trajectory encoding sequence; determines a driving intention vector parameter based on the driving intention learning module according to the time domain fusion encoding parameter; determines a driving intention output parameter based on an output decoding module according to the driving intention vector parameter and the feature fusion encoding parameter; adjusts the weight parameters in the input encoding module, the spatial attention module, the driving intention learning module and the output decoding module according to the driving intention output parameter respectively until a preset training end condition is met, and obtains a target vehicle trajectory prediction model. The above technical scheme improves the model training accuracy of the trajectory prediction model, so that a more accurate target vehicle trajectory prediction model can be obtained, thereby improving the prediction accuracy of the subsequent vehicle trajectory prediction using the target vehicle trajectory prediction model, and improving the prediction credibility and accuracy of the subsequent vehicle trajectory prediction.
[0136] It should be noted that, in order to further improve the target vehicle trajectory prediction model, a network model for testing can also be constructed in advance. As shown in a model structure diagram of a trajectory prediction test network model. Figure 2C The trajectory prediction test network model includes four module structures, namely an input encoding module, a spatial attention module, a driving intention judgment module and an output decoding module.
[0137] During testing, the input encoding module encodes the first historical state sequence S tar and the historical state sequence Nbrs using an encoder to obtain a first state encoding sequence h tar ∈R 1×32 and a second state encoding sequence h nbrs ∈R N×32 .
[0138] During testing, the spatial attention module takes the first state encoding sequence h ta r and the second state encoding sequence h nbrs as module input parameters, and the specific operation steps are the same as those of the spatial attention module in the training network model. This embodiment will not be repeated here. Finally, an interaction feature sequence att nbrs ∈R 1×32 is obtained.
[0139] During testing, the driving intention judgment module uses the first state encoding sequence htar and interaction feature sequence att nbrs determine the driving intention of the target driving vehicle. The first state encoding sequence h tar and interaction feature sequence att nbrs concatenate to obtain the fusion encoding parameter H∈R 1×64 ; H is passed through a fully connected layer to obtain create a OneHot classification distribution P(Z p |H) with a probability of p, denoted as where Cat() is a preset classification distribution function. where where c∈{1,2,...,K}. According to the maximum probability value in p sample the corresponding vector p in P(Z denote the index of the maximum probability value as index, then The vector corresponds to the most likely driving intention of the target driving vehicle. Concatenate H and to obtain the fusion feature parameter G:
[0140]
[0141] where G∈R 1×(K+64) , is the concatenation of H and in the second dimension.
[0142] During testing, the output decoding module decodes the fusion feature parameter G using the decoder to obtain the decoded feature parameter h G :
[0143]
[0144] where Decoder is a decoder composed of a gated recurrent unit GRU. The input feature number of GRU in the decoder is K+64, the hidden feature number is 32, the sequence length is T pred , the number of layers is 1 layer, is the weight parameter of the decoder, and is the bias parameter of the decoder.
[0145] The feature parameter h G is passed through a fully connected layer to obtain μ G :
[0146]
[0147] wherein, is a predicted trajectory subject to a binary Gaussian mixture distribution a sequence of mean values of horizontal and vertical coordinates of the predicted trajectory; is an embedding function of a fully connected layer, is a weight parameter of the fully connected layer, is a bias parameter of the fully connected layer.
[0148] It should be noted that when the vehicle driving trajectory is predicted using the target vehicle trajectory prediction model, the weight parameter and the bias parameter obtained at the end of the model training are imported into the network during the test, the first historical state sequence S tar and the second historical state sequence Nbrs are input, and the network model can output a sequence of mean values of horizontal and vertical coordinates μ G of the trajectory most likely to be driven by the target driving vehicle in the future.
[0149] Embodiment Three
[0150] Figure 3 is a structural schematic diagram of a vehicle trajectory prediction model training device provided by the third embodiment of the present application. The vehicle trajectory prediction model training device provided by the embodiment of the present application can be applied to the case of training a vehicle trajectory prediction model and using the trained model to predict a vehicle trajectory. The vehicle trajectory prediction model training device can be realized in the form of hardware and / or software, as shown in the figure, and specifically includes a state data acquisition module 301, a target vehicle determination module 302, a candidate vehicle determination module 303, a state sequence determination module 304, and a prediction model training module 305. Among them, Figure 3
[0151] The state data acquisition module 301 is configured to acquire vehicle state data of each driving vehicle in a preset driving area within a preset time period.
[0152] The target vehicle determination module 302 is configured to select any driving vehicle as a target driving vehicle from the driving vehicles; wherein, other driving vehicles except the target driving vehicle are reference driving vehicles.
[0153] The candidate vehicle determination module 303 is configured to determine a candidate driving vehicle adjacent to the target driving vehicle from the reference driving vehicles according to the position distance between each of the reference driving vehicles and the target driving vehicle.
[0154] The state sequence determination module 304 is configured to determine a real trajectory sequence of the target driving vehicle in a preset future observation period according to vehicle state data corresponding to the target driving vehicle and the candidate driving vehicle respectively, and determine a first historical state sequence and a second historical state sequence of the target driving vehicle in a preset historical observation period.
[0155] The prediction model training module 305 is configured to input the first historical state sequence, the second historical state sequence and the real trajectory sequence corresponding to the target driving vehicle into a pre-constructed trajectory prediction network model, train the trajectory prediction network model, and obtain a target vehicle trajectory prediction model for predicting a vehicle driving trajectory.
[0156] The technical scheme of the embodiment of the application selects any driving vehicle as a target driving vehicle and determines a reference driving vehicle from each driving vehicle, determines a candidate driving vehicle adjacent to the target driving vehicle according to a position distance between each reference driving vehicle and the target driving vehicle, determines a real trajectory sequence of the target driving vehicle according to vehicle state data corresponding to the target driving vehicle and the candidate driving vehicle respectively, and determines a first historical state sequence and a second historical state sequence of the target driving vehicle, thereby realizing accurate construction of a sample training set for training a vehicle trajectory prediction model, fully reflecting the interaction between vehicles in the sample training set, avoiding the situation that the vehicle trajectory prediction model training accuracy is low and the trajectory result is relatively single due to the over-singleness of the sample training set, inputting the first historical state sequence, the second historical state sequence and the real trajectory sequence into a pre-constructed trajectory prediction network model to train the trajectory prediction network model, and obtaining a target vehicle trajectory prediction model, thereby realizing the training accuracy of the trajectory prediction network model and improving the prediction credibility and accuracy of the vehicle trajectory prediction.
[0157] Optionally, the trajectory prediction network model comprises an input encoding module, a spatial attention module connected to an output end of the input encoding module, a driving intention learning module connected to an output end of the spatial attention module, and an output decoding module connected to an output end of the driving intention learning module.
[0158] Optionally, the prediction model training module 305 comprises:
[0159] The encoding sequence determination unit is configured to input the first historical state sequence, the second historical state sequence and the real trajectory sequence into the input encoding module for sequence encoding processing to obtain a first state encoding sequence, a second state encoding sequence and a real trajectory encoding sequence.
[0160] The feature encoding parameter determination unit is configured to determine a feature fusion encoding parameter of the target vehicle based on the spatial attention module and the driving intention learning module according to the first state encoding sequence and the second state encoding sequence.
[0161] The time domain encoding parameter determination unit is configured to determine a time domain fusion encoding parameter of the target vehicle based on the driving intention learning module according to the feature fusion encoding parameter and the real trajectory encoding sequence.
[0162] The intention vector parameter determination unit is configured to determine a driving intention vector parameter based on the driving intention learning module according to the time domain fusion encoding parameter.
[0163] The intention output parameter determination unit is configured to determine a driving intention output parameter based on the output decoding module according to the driving intention vector parameter and the feature fusion encoding parameter.
[0164] The weight parameter adjustment unit is configured to adjust weight parameters in the input encoding module, the spatial attention module, the driving intention learning module and the output decoding module respectively according to the driving intention output parameter until a preset training end condition is met, so as to obtain a target vehicle trajectory prediction model.
[0165] Optionally, the feature encoding parameter determination unit comprises:
[0166] The interaction feature sequence determination subunit is configured to determine an interaction feature sequence of the target vehicle based on a preset normalization function in the spatial attention module according to the first state encoding sequence and the second state encoding sequence.
[0167] The feature encoding parameter determination subunit is configured to determine the feature fusion encoding parameter of the target vehicle based on a preset splicing function in the driving intention learning module according to the first state encoding sequence and the interaction feature sequence.
[0168] Optionally, the intention vector parameter determination unit comprises:
[0169] The first intention probability determination subunit is configured to determine a first preset driving intention probability based on a first preset network structure in the driving intention learning module according to the time domain fusion encoding parameter.
[0170] The first intention distribution determination subunit is configured to determine a first target driving intention distribution based on a preset classification distribution function in the driving intention learning module according to the first preset driving intention probability.
[0171] An intention vector parameter determination subunit is configured to perform vector sampling processing on the first target driving intention distribution in a preset dimension to obtain a driving intention vector parameter in the preset dimension.
[0172] Optionally, the weight parameter adjustment unit comprises:
[0173] A second intention probability determination subunit is configured to determine a second preset driving intention probability based on a second preset network structure in the driving intention learning module according to the feature fusion encoding parameter.
[0174] A second intention distribution determination subunit is configured to determine a second target driving intention distribution based on a preset classification distribution function in the driving intention learning module according to the second preset driving intention probability.
[0175] A dispersion determination subunit is configured to determine a dispersion between the first target driving intention distribution and the second target driving intention distribution.
[0176] A target loss value determination subunit is configured to determine a target loss value according to the dispersion, the driving intention output parameter and the first preset driving intention probability.
[0177] A weight parameter adjustment subunit is configured to adjust weight parameters in the input encoding module, the spatial attention module, the driving intention learning module and the output encoding module according to the driving intention output parameter until the target loss value meets a preset loss value judgment condition, so as to obtain a target vehicle trajectory prediction model.
[0178] Optionally, the state sequence determination module 304 comprises:
[0179] A first state sequence determination unit is configured to construct a first historical state sequence of the target driving vehicle in a preset historical observation time period according to vehicle state data of the target driving vehicle.
[0180] A target candidate vehicle selection unit is configured to select a target candidate vehicle matching the preset historical observation time period from candidate driving vehicles adjacent to the target driving vehicle.
[0181] A second state sequence determination unit is configured to construct a historical state sequence of the target candidate vehicle in a preset historical observation time period according to vehicle state data of the target candidate vehicle, and take the historical state sequence of the target candidate vehicle as a second historical state sequence of the target driving vehicle.
[0182] A real trajectory sequence construction unit is configured to construct a real trajectory sequence of the target vehicle within a preset future observation time period according to vehicle state data of the target vehicle.
[0183] The vehicle trajectory prediction model training apparatus provided by the embodiments of the present application can execute the vehicle trajectory prediction model training method provided by any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0184] Embodiment four
[0185] Figure 4 A structural schematic diagram of an electronic device 40 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.
[0186] As shown in Figure 4 The electronic device 40 includes at least one processor 41, and a memory, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., which is communicatively connected to the at least one processor 41, wherein the memory stores a computer program that can be executed by the at least one processor. The processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or loaded from the storage unit 48 into the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0187] Various components in the electronic device 40 are connected to the I / O interface 45, including an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, a speaker, etc.; a storage unit 48, such as a magnetic disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunications networks.
[0188] The processor 41 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, and the like. The processor 41 performs various methods and processes described above, such as the vehicle trajectory prediction model training method.
[0189] In some embodiments, the vehicle trajectory prediction model training method can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded onto the RAM 43 and executed by the processor 41, one or more steps of the vehicle trajectory prediction model training method described above can be performed. Alternatively, in other embodiments, the processor 41 can be configured to perform the vehicle trajectory prediction model training method by any other suitable means, such as by means of firmware.
[0190] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0191] Computer programs used to implement the methods of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed by the processor of the machine, implements the functions / acts specified in the flowcharts and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0192] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0193] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0194] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0195] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0196] It should be understood that the various forms of flow shown above can be reordered, added to, or have steps deleted. For example, the steps described in the present application can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, which are not limited herein.
[0197] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for training a vehicle trajectory prediction model, characterized in that, The method comprises: acquiring vehicle state data of each driving vehicle in a preset driving area within a preset time period; selecting any driving vehicle as a target driving vehicle from the driving vehicles, wherein the other driving vehicles except the target driving vehicle are reference driving vehicles; determining a candidate driving vehicle adjacent to the target driving vehicle from the reference driving vehicles according to the position distance between each reference driving vehicle and the target driving vehicle; determining a real trajectory sequence of the target driving vehicle in a preset future observation period and determining a first historical state sequence and a second historical state sequence of the target driving vehicle in a preset historical observation period according to the vehicle state data corresponding to the target driving vehicle and the candidate driving vehicle respectively; the trajectory prediction network model comprises an input encoding module, a spatial attention module connected to the output end of the input encoding module, a driving intention learning module connected to the output end of the spatial attention module, and an output decoding module connected to the output end of the driving intention learning module; inputting the first historical state sequence, the second historical state sequence and the real trajectory sequence into the input encoding module for sequence encoding processing to obtain a first state encoding sequence, a second state encoding sequence and a real trajectory encoding sequence; determining a feature fusion encoding parameter of the target driving vehicle based on the spatial attention module and the driving intention learning module according to the first state encoding sequence and the second state encoding sequence; determining a time domain fusion encoding parameter of the target driving vehicle based on the driving intention learning module according to the feature fusion encoding parameter and the real trajectory encoding sequence; determining a driving intention vector parameter based on the driving intention learning module according to the time domain fusion encoding parameter; determining a driving intention output parameter based on the output decoding module according to the driving intention vector parameter and the feature fusion encoding parameter; adjusting the weight parameters in the input encoding module, the spatial attention module, the driving intention learning module and the output decoding module respectively according to the driving intention output parameter until a preset training end condition is met to obtain a target vehicle trajectory prediction model for predicting the vehicle driving trajectory.
2. The method of claim 1, wherein, The method comprises: determining an interaction feature sequence of the target driving vehicle based on a preset normalization function in the spatial attention module according to the first state encoding sequence and the second state encoding sequence; determining the feature fusion encoding parameter of the target driving vehicle based on a preset splicing function in the driving intention learning module according to the first state encoding sequence and the interaction feature sequence.
3. The method of claim 1, wherein, The method comprises: determining a driving intention vector parameter based on the driving intention learning module according to the time domain fusion encoding parameter. According to the time domain fusion encoding parameter, a first preset driving intention probability is determined based on a first preset network structure in the driving intention learning module; According to the first preset driving intention probability, a first target driving intention distribution is determined based on a preset classification distribution function in the driving intention learning module; The first target driving intention distribution is subjected to vector sampling processing under a preset dimension to obtain a driving intention vector parameter of the preset dimension.
4. The method of claim 3, wherein, According to the driving intention output parameter, the weight parameters in the input encoding module, the spatial attention module, the driving intention learning module, and the output decoding module are adjusted respectively until a preset training end condition is met, to obtain a target vehicle trajectory prediction model, including: According to the time domain fusion encoding parameter, a first preset driving intention probability is determined based on a first preset network structure in the driving intention learning module; According to the first preset driving intention probability, a first target driving intention distribution is determined based on a preset classification distribution function in the driving intention learning module; The discrete degree between the first target driving intention distribution and the second target driving intention distribution is determined; According to the discrete degree, the driving intention output parameter, and the first preset driving intention probability, a target loss value is determined; According to the driving intention output parameter, the weight parameters in the input encoding module, the spatial attention module, the driving intention learning module, and the output decoding module are adjusted respectively until the target loss value meets a preset loss value judgment condition, to obtain a target vehicle trajectory prediction model.
5. The method according to any one of claims 1 to 4, characterized in that, According to the vehicle state data corresponding to the target running vehicle and the candidate running vehicle respectively, a real trajectory sequence of the target running vehicle in a preset future observation period is determined, and a first historical state sequence and a second historical state sequence of the target running vehicle in a preset historical observation period are determined, including: According to the vehicle state data of the target running vehicle, a first historical state sequence of the target running vehicle in a preset historical observation period is constructed; From the candidate running vehicles adjacent to the target running vehicle, a target candidate vehicle matching the preset historical observation period is selected; According to the vehicle state data of the target candidate vehicle, a historical state sequence of the target candidate vehicle in a preset historical observation period is constructed, and the historical state sequence of the target candidate vehicle is taken as the second historical state sequence of the target running vehicle; According to the vehicle state data of the target running vehicle, a real trajectory sequence of the target running vehicle in a preset future observation period is constructed.
6. A vehicle trajectory prediction model training apparatus, characterized by, Including: A state data acquisition module is configured to acquire vehicle state data of each running vehicle in a preset driving area in a preset time period; A target vehicle determination module is configured to select any running vehicle as a target running vehicle from the running vehicles; wherein, other running vehicles except the target running vehicle are reference running vehicles; The candidate vehicle determination module is configured to determine, from the reference vehicles, a candidate vehicle adjacent to the target vehicle according to a position distance between each of the reference vehicles and the target vehicle; The state sequence determination module is configured to determine a real trajectory sequence of the target vehicle in a preset future observation period and determine a first historical state sequence and a second historical state sequence of the target vehicle in a preset historical observation period according to vehicle state data corresponding to the target vehicle and the candidate vehicle respectively; The prediction model training module is configured to input the first historical state sequence, the second historical state sequence and the real trajectory sequence corresponding to the target vehicle into a pre-constructed trajectory prediction network model, train the trajectory prediction network model, and obtain a target vehicle trajectory prediction model for predicting a vehicle driving trajectory. The trajectory prediction network model comprises an input encoding module, a spatial attention module connected to an output end of the input encoding module, a driving intention learning module connected to an output end of the spatial attention module, and an output decoding module connected to an output end of the driving intention learning module. The prediction model training module comprises: An encoding sequence determination unit configured to input the first historical state sequence, the second historical state sequence and the real trajectory sequence into the input encoding module for sequence encoding processing to obtain a first state encoding sequence, a second state encoding sequence and a real trajectory encoding sequence; A feature encoding parameter determination unit configured to determine a feature fusion encoding parameter of the target vehicle based on the spatial attention module and the driving intention learning module according to the first state encoding sequence and the second state encoding sequence; A time domain encoding parameter determination unit configured to determine a time domain fusion encoding parameter of the target vehicle based on the driving intention learning module according to the feature fusion encoding parameter and the real trajectory encoding sequence; An intention vector parameter determination unit configured to determine a driving intention vector parameter based on the driving intention learning module according to the time domain fusion encoding parameter; An intention output parameter determination unit configured to determine a driving intention output parameter based on the output decoding module according to the driving intention vector parameter and the feature fusion encoding parameter; A weight parameter adjustment unit configured to adjust weight parameters in the input encoding module, the spatial attention module, the driving intention learning module and the output decoding module respectively according to the driving intention output parameter until a preset training end condition is met, and obtain a target vehicle trajectory prediction model.
7. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the vehicle trajectory prediction model training method in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing the processor to implement the vehicle trajectory prediction model training method in any one of claims 1-5 when executed.
Citation Information
Patent Citations
Trajectory prediction model training method and device, trajectory prediction method and device, equipment and medium
CN114021080A
Vehicle driving track prediction method and device, automobile and storage medium
CN114872730A