Trajectory prediction method fusing traffic state and driving style and related equipment
By integrating trajectory prediction methods with traffic state and driving style, combining historical trajectory and cluster analysis, and optimizing prediction models, the problem of low trajectory prediction accuracy in the existing technology is solved, and the prediction accuracy in complex traffic environments is improved. Model performance.
Patent Information
- Application Number
- CN202411235118.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-09-04
AI Technical Summary
The existing vehicle trajectory prediction methods have low accuracy in complex driving situations, especially at intersections and roundabouts, which fail to effectively consider driving mode and environmental factors, resulting in insufficient prediction accuracy.
Using a trajectory prediction method that integrates traffic state and driving style, the driving style is clustered and analyzed by obtaining the historical trajectory of the target vehicle and its adjacent vehicles, combining traffic state with prediction model for trajectory prediction, and optimizing the model through prediction loss function to improve the prediction accuracy.
Improve the accuracy and model performance of trajectory prediction, allowing vehicle trajectories to be predicted more accurately in complex traffic environments, enhancing road safety and operational efficiency.
Smart Images

Figure CN119091628A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of traffic technology, and in particular to a trajectory prediction method and related equipment integrating traffic status and driving style. Background Art
[0002] Predicting the paths of multiple targets in complex driving situations, especially at intersections and roundabouts, involves dynamic interactions of vehicles and other entities, resulting in dense groups of agents, varying speeds, and environmental obstacles. To enhance the decision-making process in interactive driving environments, the emergence of vehicle-to-vehicle (V2V) communication systems has opened up new possibilities for predicting and regulating the trajectories of multiple entities. Compared to traditional trajectory prediction methods, the advantages of V2V include real-time accuracy, robustness, wider coverage, and enhanced vehicle coordination. With V2V technology, vehicles can share information and synchronize their actions, thereby improving road safety and operational efficiency.
[0003] Previous researchers proposed trajectory prediction based on interactive perception with the help of V2V technology, but they did not consider various driving modes and driving environments at the same time. In addition, drivers of the same category may show different reactions in different driving environments. It can be seen that the existing vehicle trajectory prediction methods have the problem of low trajectory prediction accuracy. Summary of the invention
[0004] The present application provides a trajectory prediction method and related equipment integrating traffic status and driving style, which can solve the problem of low accuracy of trajectory prediction.
[0005] In a first aspect, an embodiment of the present application provides a trajectory prediction method integrating traffic conditions and driving style, the trajectory prediction method comprising:
[0006] Acquire historical trajectories of multiple target vehicles and historical trajectories of multiple neighboring vehicles of each target vehicle; the historical trajectory of the target vehicle includes trajectory data of the target vehicle at multiple historical moments, and the trajectory data includes vehicle speed, acceleration, vehicle distance to each neighboring vehicle, and collision time;
[0007] For each neighboring vehicle, the neighboring vehicles are clustered based on their historical trajectories to obtain their driving styles; the driving style is used to describe the driving conditions of the neighboring vehicles at all historical moments;
[0008] The traffic state of each target vehicle is obtained according to the historical trajectories of all target vehicles; the traffic state is used to describe the movement status of all neighboring vehicles of the target vehicle at the last historical moment;
[0009] According to the traffic status of all target vehicles and the driving styles of all neighboring vehicles, the prediction model is used to predict the trajectory of each target vehicle to obtain multiple predicted trajectories of each target vehicle;
[0010] A prediction loss function is constructed using all prediction trajectories, and the prediction model is trained using the prediction loss function to obtain the final prediction model; the prediction loss function is used to describe the accuracy of all prediction trajectories;
[0011] The final prediction model is used to predict the trajectory of the vehicle to be predicted, and the final predicted trajectory of the vehicle to be predicted is obtained.
[0012] In a second aspect, an embodiment of the present application provides a trajectory prediction device integrating traffic conditions and driving style, comprising:
[0013] An acquisition module, which acquires historical trajectories of multiple target vehicles and historical trajectories of multiple neighboring vehicles of each target vehicle; the historical trajectory of the target vehicle includes trajectory data of the target vehicle at multiple historical moments, and the trajectory data includes vehicle speed, acceleration, vehicle distance to each neighboring vehicle, and collision time;
[0014] The clustering module clusters neighboring vehicles based on their historical trajectories to obtain the driving styles of neighboring vehicles. The driving styles are used to describe the driving conditions of neighboring vehicles at all historical moments.
[0015] The traffic status acquisition module acquires the traffic status of each target vehicle based on the historical trajectories of all target vehicles; the traffic status is used to describe the movement status of all neighboring vehicles of the target vehicle at the last historical moment;
[0016] A first trajectory prediction module predicts the trajectory of each target vehicle using a prediction model according to the traffic status of all target vehicles and the driving styles of all neighboring vehicles, thereby obtaining multiple predicted trajectories of each target vehicle;
[0017] The construction module uses all the predicted trajectories to construct the prediction loss function, and uses the prediction loss function to train the prediction model to obtain the final prediction model; the prediction loss function is used to describe the accuracy of all predicted trajectories;
[0018] The second trajectory prediction module uses the final prediction model to perform trajectory prediction on the vehicle to be predicted to obtain a final predicted trajectory of the vehicle to be predicted.
[0019] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned trajectory prediction method integrating traffic conditions and driving style when executing the above-mentioned computer program.
[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the above-mentioned trajectory prediction method integrating traffic conditions and driving style.
[0021] The above solution of the present application has the following beneficial effects:
[0022] In an embodiment of the present application, by obtaining historical trajectories of multiple target vehicles and historical trajectories of multiple neighboring vehicles of each target vehicle, and then for each neighboring vehicle, respectively, the neighboring vehicles are clustered based on the historical trajectories of the neighboring vehicles to obtain the driving style of the neighboring vehicles, and then the traffic status of each target vehicle is obtained according to the historical trajectories of all target vehicles, and then the trajectory of each target vehicle is predicted by using a prediction model based on the traffic status of all target vehicles and the driving style of all neighboring vehicles to obtain the predicted trajectory of each target vehicle, and then a prediction loss function is constructed using all the predicted trajectories, and the prediction model is trained using the prediction loss function to obtain a final prediction model, and finally the historical trajectory to be predicted of the vehicle to be predicted is obtained, and based on the historical trajectory to be predicted, the final prediction model is used to perform prediction to obtain the final predicted trajectory of the vehicle to be predicted. Among them, the driving style of the neighboring vehicles of the target vehicle is obtained, the driving conditions of the neighboring vehicles of the target vehicle can be analyzed, the traffic status of the target vehicle is obtained based on the historical trajectory, the authenticity of the traffic status is improved, the trajectory is predicted according to the real driving style and traffic status, the driving conditions of the neighboring vehicles of the target vehicle and the movement conditions of the neighboring vehicles are taken into account, and the accuracy of the predicted trajectory is improved. The prediction model is trained based on the predicted trajectory with high accuracy, which can improve the prediction performance of the prediction model, thereby effectively improving the accuracy of trajectory prediction when the prediction model is used for trajectory prediction.
[0023] Other beneficial effects of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0025] Figure 1 A flow chart of a trajectory prediction method integrating traffic conditions and driving style provided in an embodiment of the present application;
[0026] Figure 2 A schematic diagram of a driving style provided in an embodiment of the present application;
[0027] Figure 3 A schematic diagram of feature importance scores provided in one embodiment of the present application;
[0028] Figure 4 A schematic diagram of trajectory prediction performance of a Transformer model provided in one embodiment of the present application;
[0029] Figure 5 A schematic diagram of trajectory prediction performance of a GAN model provided in one embodiment of the present application;
[0030] Figure 6 A schematic diagram of trajectory prediction performance of a CAVE model provided in one embodiment of the present application;
[0031] Figure 7 A schematic diagram of the structure of a trajectory prediction device integrating traffic status and driving style provided in one embodiment of the present application;
[0032] Figure 8 A schematic diagram of the structure of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0033] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0034] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0035] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0036] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0037] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0038] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0039] In response to the problem of low accuracy of existing trajectory prediction, an embodiment of the present application provides a trajectory prediction method that integrates traffic status and driving style. The trajectory prediction method obtains historical trajectories of multiple target vehicles and historical trajectories of multiple neighboring vehicles of each target vehicle, and then clusters the neighboring vehicles based on the historical trajectories of the neighboring vehicles for each neighboring vehicle to obtain the driving style of the neighboring vehicles. The traffic status of each target vehicle is obtained according to the historical trajectories of all target vehicles. The trajectory of each target vehicle is predicted by using a prediction model based on the traffic status of all target vehicles and the driving style of all neighboring vehicles to obtain the predicted trajectory of each target vehicle. A prediction loss function is then constructed using all the predicted trajectories, and the prediction model is trained using the prediction loss function to obtain a final prediction model. Finally, the historical trajectory to be predicted of the vehicle to be predicted is obtained, and the final prediction model is used to perform prediction based on the historical trajectory to be predicted to obtain the final predicted trajectory of the vehicle to be predicted. Among them, the driving style of the neighboring vehicles of the target vehicle is obtained, the driving conditions of the neighboring vehicles of the target vehicle can be analyzed, the traffic status of the target vehicle is obtained based on the historical trajectory, the authenticity of the traffic status is improved, the trajectory is predicted according to the real driving style and traffic status, the driving conditions of the neighboring vehicles of the target vehicle and the movement conditions of the neighboring vehicles are taken into account, and the accuracy of the predicted trajectory is improved. The prediction model is trained based on the predicted trajectory with high accuracy, which can improve the prediction performance of the prediction model, thereby effectively improving the accuracy of trajectory prediction when the prediction model is used for trajectory prediction.
[0040] Next, the trajectory prediction method integrating traffic conditions and driving style provided in this application is exemplified.
[0041] like Figure 1 As shown, the trajectory prediction method integrating traffic status and driving style provided in this application includes the following steps:
[0042] Step 11, obtaining historical trajectories of multiple target vehicles and historical trajectories of multiple neighboring vehicles of each target vehicle.
[0043] The target vehicle is a vehicle with real trajectory data. The historical trajectory of the target vehicle includes the trajectory data of the target vehicle at multiple historical moments. The trajectory data includes the vehicle speed, acceleration, the distance between each neighboring vehicle and the collision time. The historical trajectory of the neighboring vehicle includes the trajectory data of the neighboring vehicle at multiple historical moments.
[0044] In some embodiments of the present application, the historical trajectories of multiple target vehicles and the historical trajectories of multiple neighboring vehicles of each target vehicle can be obtained by accessing public vehicle trajectory datasets, such as rounD and INTERACTION datasets.
[0045] It should be noted that in order to improve the diversity and reliability of driving style recognition, statistical indicators such as the minimum, maximum, average and standard deviation (STD) of the features are used. The obtained trajectory data includes 18 dimensions, as shown in Table 1.
[0046]
[0047] Table 1
[0048] Among them, Speed STD represents the speed standard deviation, Mean speed represents the speed mean, AccelerationSTD represents the acceleration standard deviation, Mean acceleration represents the acceleration mean, Min space headway represents the minimum headway, Max space headway represents the maximum headway, Mean space headway represents the average headway, Space headway STD represents the headway standard deviation, Minjerk represents the minimum acceleration rate, Maxjerk represents the maximum acceleration rate, Meanjerk represents the average acceleration rate, Jerk STD represents the acceleration rate standard deviation, Min TTC represents the minimum collision time, and Proportionof "TTC<3s" represents the proportion of collision time less than 3 seconds.
[0049] Excluding the minimum and maximum speed and acceleration as well as the maximum TTC and time-to-collision standard deviation (TTC STD) aims to distinguish driving styles, as these indicators tend to show similarities among drivers and cannot fully represent the diversity of driving styles.
[0050] Step 12: clustering each neighboring vehicle based on its historical trajectory to obtain the driving style of the neighboring vehicle.
[0051] The above driving styles are used to describe the driving conditions of neighboring vehicles at all historical moments, such as conservative, smooth, aggressive, etc.
[0052] In some embodiments of the present application, the step of clustering neighboring vehicles based on historical trajectories of neighboring vehicles to obtain driving styles of neighboring vehicles is specifically as follows:
[0053] In the first step, based on the historical trajectories of neighboring vehicles, the distribution model is used to calculate the probability density of neighboring vehicles belonging to each Gaussian distribution.
[0054] Multiple Gaussian distributions correspond to multiple driving styles one by one.
[0055] It should be noted that the distribution model calculates the probability density of neighboring vehicles belonging to each Gaussian distribution as N(x|μr ,∑ r ), where N(x|μ r ,∑ r ) represents the probability density of the neighboring vehicle belonging to the rth Gaussian distribution, μ k represents the mean of the rth Gaussian distribution, ∑ r represents the covariance matrix of the rth Gaussian distribution, and x represents the historical trajectories of neighboring vehicles.
[0056] In the second step, all probability densities are used to optimize the distribution model to obtain the final distribution model, and the final probability density of neighboring vehicles belonging to each Gaussian distribution is calculated based on the final distribution model.
[0057] First, the total probability density of neighboring vehicles is calculated based on all probability densities.
[0058] Specifically, through the formula:
[0059]
[0060] Calculate the total probability density p(x) of neighboring vehicles.
[0061] Among them, π k represents the mixing coefficient of the rth Gaussian distribution, N(x|μ r ,∑ r ) represents the probability density of the neighboring vehicle belonging to the rth Gaussian distribution, μ k represents the mean of the rth Gaussian distribution, Σ r represents the covariance matrix of the rth Gaussian distribution, R represents the number of Gaussian distributions, and x represents the historical trajectories of neighboring vehicles.
[0062] Then, it is determined whether the total probability density of neighboring vehicles is greater than a preset probability density.
[0063] If yes, the distribution model is taken as the final distribution model.
[0064] Otherwise, the mixing coefficients, mean and covariance matrix in the distribution model are adjusted, and the step of calculating the probability density of neighboring vehicles belonging to each Gaussian distribution using the distribution model based on the historical trajectories of neighboring vehicles is returned.
[0065] Finally, the final probability density of neighboring vehicles belonging to each Gaussian distribution is calculated based on the final distribution model.
[0066] Specifically, based on the historical trajectories of neighboring vehicles, the final probability density is used to calculate the final probability density of neighboring vehicles belonging to each Gaussian distribution.
[0067] The third step is to obtain the final Gaussian distribution to which the neighboring vehicles belong based on all final probability densities, and use the driving style corresponding to the final Gaussian distribution as the driving style of the neighboring vehicles.
[0068] Specifically, the final probability density describes the probability that the neighboring vehicle belongs to the Gaussian distribution. The final Gaussian distribution to which the neighboring vehicle belongs is obtained according to all probabilities. For example, if the final probability density corresponding to the first Gaussian distribution is 0.2, it means that the probability that the neighboring vehicle belongs to the first Gaussian distribution is 0.2. If the final probability density corresponding to the second Gaussian distribution is 0.3, it means that the probability that the neighboring vehicle belongs to the first Gaussian distribution is 0.3. That is, when selecting the final Gaussian distribution, the first Gaussian distribution has a probability of 0.2 to be selected, and the second Gaussian distribution has a probability of 0.3 to be selected. According to the probability of all Gaussian distributions being selected, one Gaussian distribution is selected from all Gaussian distributions as the final Gaussian distribution of the neighboring vehicle.
[0069] Exemplarily, the final Gaussian distribution to which the neighboring vehicle belongs is the second Gaussian distribution, and the driving style corresponding to the second Gaussian distribution is conservative, then the driving style of the neighboring vehicle is conservative.
[0070] It should be noted that when this step is used to obtain the driving style of the neighboring vehicle, data is transmitted between the target vehicle and the neighboring vehicle through V2V technology, so that the target vehicle obtains the trajectory data of the neighboring vehicle over a period of time, and obtains the driving style of the neighboring vehicle through the algorithm of the above steps.
[0071] It is worth mentioning that obtaining the driving style of the neighboring vehicles of the target vehicle can analyze the driving conditions of the neighboring vehicles of the target vehicle, and further study the influence of the driving conditions of the neighboring vehicles on the trajectory of the target vehicle.
[0072] The above driving style is illustrated below with reference to a specific example.
[0073] The data performance of the three driving styles (conservative, smooth, and aggressive) is shown in Table 2.
[0074]
[0075]
[0076] Table 2
[0077] Among them, SH represents the headway distance, SH Min represents the minimum headway distance, SH Mean represents the mean headway distance, SH Max represents the maximum headway distance, SH STD represents the standard deviation of the headway distance, Speed STD represents the speed standard deviation, SHMin represents the minimum headway distance, SH Mean represents the mean headway distance, TTC Min represents the minimum collision time, and TTC<3s represents the proportion of collision time less than 3 seconds.
[0078] Each driving style has various driving indicators related to speed, acceleration, jerk, headway and time to collision (TTC). These indicators illustrate the fundamental differences and characteristics of each driving style.
[0079] The distribution of the three driving styles is as follows Figure 2 As shown in the figure, the horizontal axis represents the minimum collision time TTC Min, the vertical axis represents the average speed Speed Mean, and the vertical axis represents the average acceleration rate JerkMean. Figure 2 The middle dot indicates a cautious (i.e. conservative) driving style, the triangular dot indicates a smooth driving style, and the square dot indicates an aggressive driving style.
[0080] Depend on Figure 2 As can be seen, lower average speeds are characteristic of cautious drivers, demonstrating careful acceleration behavior. Their driving is smooth, as relatively low jitter indicators indicate that they accelerate and change lanes cautiously, tending to maintain safe distances and avoid close encounters. Smooth drivers show a smooth transition between cautious and aggressive, with higher average speeds and moderate speed changes compared to conservative drivers. Their acceleration is slightly more confident but still controlled, as reflected by lower jitter means and standard deviations, indicating that their transitions are smoother than aggressive drivers but less cautious than conservative drivers. Head-to-head distances and smaller TTC minimums and the proportion of TTCs less than 3 seconds indicate that they tend to shorten the distance to other vehicles while maintaining a moderate safety margin. Aggressive drivers have significantly higher average speeds and fewer speed changes, indicating that they tend to drive quickly. Their acceleration rate indicators indicate sudden and frequent changes in speed or direction, highlighting a more dynamic and potentially unpredictable driving style. Aggressive drivers maintain closer head-to-head distances, have the lowest TTC minimums, and have a higher frequency of TTCs less than 3 seconds, indicating a higher risk of close encounters or collisions due to reduced reaction time and safe distances.
[0081] In some embodiments of the present application, the feature importance of each dimension of the trajectory data mentioned in step 11 can be calculated using random forest to evaluate the importance of each dimension in distinguishing driving styles. The calculation of feature importance in the random forest model is based on the reduction of node impurity when the feature is used for segmentation, which is summarized in all trees in the forest. For a given feature Xi , its importance can be estimated by calculating the average reduction in impurity across all trees where the feature is used for segmentation. The reduction in impurity can be calculated using the following formula:
[0082]
[0083] Among them, I(parent) is the impurity measure of the parent node, N left and N right are the number of samples of the left and right child nodes, I(left) and I(right) are the impurities of the left and right child nodes, and N is the number of samples of the parent node. i The overall importance of is calculated by calculating the ΔI(X i ,T) are summed and averaged.
[0084]
[0085] Among them, N T is the cumulative number of trees in the random forest ensemble.
[0086] The features (i.e., the dimensional data corresponding to the trajectory data) are ranked according to their importance scores. This ranking helps identify the most influential features. Multiple features with high scores can be used as final features to participate in the calculation of this step, reducing the computational complexity of this step and improving computational efficiency.
[0087] The feature importance scores obtained are as follows Figure 3 As shown in the figure, the horizontal axis represents the feature, the vertical axis represents the feature importance score, Jerk Max represents the maximum acceleration rate, TTC Min represents the minimum collision time, Speed Mean represents the average speed, Jerk Mean represents the average acceleration rate, TTC<3s represents the proportion of collision time less than 3 seconds, Jerk STD represents the standard deviation of acceleration rate, JerkMin represents the minimum acceleration rate, SH Max represents the maximum headway, SH STD represents the standard deviation of headway, ACC Mean represents the average acceleration, Speed STD represents the standard deviation of speed, SH Min represents the minimum headway, SH Mean represents the average headway, and ACC STD represents the standard deviation of acceleration.
[0088] It can be seen that the features are sorted by their importance scores, with “Jerk Max” being the most important, followed by “TTC Min”, “Speed Mean”, and so on, and finally “ACC STD”, which is the least important of the listed features.
[0089] By understanding which driving behaviors are most indicative of risky driving, V2V systems can develop more nuanced safety protocols. These safety protocols may involve alerting drivers to potential hazards or automatically adjusting vehicle operations to prevent accidents. With a deep understanding of the most influential driving behaviors, V2V communications can be combined with predictive models that anticipate driver behavior. This capability can improve traffic flow and reduce collisions by proactively adjusting the driving strategies of nearby vehicles. In addition, V2V technology can use these insights to provide real-time feedback to drivers, suggesting adjustments to driving style to improve safety and efficiency.
[0090] Step 13, obtaining the traffic status of each target vehicle according to the historical trajectories of all target vehicles.
[0091] The above traffic state is used to describe the movement status of all neighboring vehicles of the target vehicle at the last historical moment.
[0092] Specifically, for each target vehicle, the intersection where the target vehicle is located is determined based on the trajectory data of the target vehicle at the last historical moment, and the entire intersection is divided into multiple spatiotemporal regions based on the stop or yield signs of each lane at the intersection. At a specific time step t, the traffic graph G is used t To represent the traffic conditions in the space-time region. The spatial position of the graph is represented by a set of vertices Represented by , where each vertex represents a road user at a certain point in time (i.e., the target vehicle and the target vehicle's neighboring vehicles). The relationship between road users is represented by a set of undirected weighted edges E t Indicates. Two road users v i and v j The distance between If satisfied That is, the Euclidean distance between them is less than the threshold μ, and there will be an edge link between them. In order to determine the change in the relationship between road users and their neighboring vehicles, the traffic graph G corresponding to each time step t t In this paper, a symmetric adjacency matrix A is calculated. t .
[0093]
[0094] Distance function Denotes that at time t, any two road users v i and v jThe interaction between them. A decaying exponential function is used so that distant road users are given lower weights and nearby road users are given higher weights. Each road user will pay more attention to the road users around him to avoid traffic collisions. A convolutional neural network (CNN) is used to extract features from the adjacency matrix of the traffic graph, and then sent as input to two gated recurrent units (GRU). Finally, the output of the GRU is classified using an algorithm that can be classified (such as random forests and K-means clustering), and the spatiotemporal information in the traffic graph (i.e., the spatial positions of road users and the dynamic changes in their relationships) is classified into one of multiple traffic states (such as aggregation, neutrality, and dispersion), and the traffic state of the target vehicle is obtained.
[0095] It is worth mentioning that the historical trajectory provides real information of the target vehicle. The traffic status of the target vehicle is obtained based on the historical trajectory, which improves the authenticity of the traffic status.
[0096] Step 14: According to the traffic status of all target vehicles and the driving styles of all neighboring vehicles, the prediction model is used to predict the trajectory of each target vehicle to obtain multiple predicted trajectories of each target vehicle.
[0097] The above-mentioned predicted trajectory includes predicted trajectory data of the target vehicle at multiple prediction moments.
[0098] In some embodiments of the present application, the step of performing trajectory prediction for each target vehicle using a prediction model according to the traffic status of all target vehicles and the driving styles of all neighboring vehicles to obtain the predicted trajectory of each target vehicle includes:
[0099] In the first step, the historical feature sequence is calculated based on the historical trajectories of all target vehicles, and the latent code of each target vehicle is generated according to the historical feature sequence.
[0100] Specifically, through the formula:
[0101] C=Agent Aware Attention(Q,K,V)+[E1,E2,...E n ]
[0102]
[0103] Q=K=V=[E1,E2...,E n ]
[0104] Calculate the historical feature sequence C;
[0105] Among them, Agent Aware Attention (Q, K, V) represents the encoding vector, E1 represents the historical trajectory of the first target vehicle, E2 represents the historical trajectory of the second target vehicle, and E n represents the historical trajectory of the nth target vehicle, softmax() represents the activation function, A represents the attention score matrix, which is used to calculate the importance weight of the input vector, M represents the mask, Q self represents the predicted query vector, Q other represents other query vectors, K self Denotes the prediction key vector, K other represents the prediction key vector, Q represents the query vector, K represents the key vector, and V represents the value vector. and Both represent the prediction projection weights, and All represent other projection weights.
[0106] Then, the historical feature sequences are sampled to obtain multiple potential code sets {Z (1) ,Z (2) ,…,Z (K) Each potential code set includes the 32-dimensional potential code of each target vehicle. For each target vehicle, the 32-dimensional potential codes corresponding to the target vehicle in all potential code sets are integrated to obtain the potential code of the target vehicle. n represents the nth target vehicle.
[0107] In the second step, for each target vehicle, multiple predicted trajectories of the target vehicle are obtained based on the target vehicle's latent code, traffic status, and the corresponding driving styles of all neighboring vehicles.
[0108] Specifically, the target vehicle’s latent code, traffic status, and all corresponding driving styles are integrated to obtain an enhanced latent code S represents the traffic state of the nth target vehicle, and D represents the driving style of all neighboring vehicles of the nth target vehicle. Then the enhanced latent code is input into a decoder (such as a Transformer decoder) to obtain a predicted trajectory including the predicted trajectory data of the target vehicle at multiple prediction moments. It should be noted that in the enhanced latent code of the target vehicle, the latent code of the target vehicle Including 32-dimensional potential codes corresponding to K target vehicles, the number of predicted trajectories obtained in this step is The number of 32-dimensional latent codes in is also K, that is, each target vehicle has K predicted trajectories.
[0109] It can be understood that the above process of calculating the historical adjustment sequence and obtaining the predicted trajectory is the operation process of the prediction model.
[0110] It is worth mentioning that trajectory prediction is performed based on actual driving style and traffic conditions, taking into account the driving conditions of the target vehicle's neighboring vehicles and the movement conditions of the neighboring vehicles, which effectively improves the accuracy of trajectory prediction and provides high-accuracy training data for the training of the prediction model in subsequent steps.
[0111] Step 15, construct a prediction loss function using all prediction trajectories, and use the prediction loss function to train the prediction model to obtain the final prediction model.
[0112] The above prediction loss function is used to describe the accuracy of all predicted trajectories.
[0113] Specifically, the prediction loss function is:
[0114]
[0115] Among them, L sampler represents the value of the prediction loss function, represents the kth predicted trajectory set, Y represents all true trajectories, N represents the number of target vehicles, KL represents the divergence, r θ Indicated in Gaussian sampling distribution on , represents the enhanced latent code of the nth target vehicle in the kth predicted trajectory set, X represents the historical trajectory of the nth target vehicle, and p θ represents the conditional Gaussian prior, z n represents the overall potential code of the nth target vehicle, K represents the last set of predicted trajectories, represents the k1th predicted trajectory set, represents the k2th predicted trajectory set, σ d Represents the scaling parameter.
[0116] In some embodiments of the present application, the above-mentioned step of training the prediction model using the prediction loss function to obtain the final prediction model is specifically as follows:
[0117] Determine whether the predicted loss function is less than the preset value of the loss function.
[0118] If yes, the prediction model is taken as the final prediction model.
[0119] Otherwise, adjust the parameters in the prediction model, and return to the step of using the prediction model to predict the trajectory of each target vehicle according to the driving styles and traffic conditions of all target vehicles to obtain the predicted trajectory of each target vehicle.
[0120] Exemplarily, the preset value of the loss function is 1.5, and the value of the loss function is 3.8, which is greater than the preset value of the loss function. The parameters of the prediction model are adjusted, and the step of using the prediction model to predict the trajectory of each target vehicle based on the driving style and traffic conditions of all target vehicles to obtain the predicted trajectory of each target vehicle is returned. At this time, the value of the loss function is 1.2, which is less than the preset value of the loss function. The prediction model at this time is used as the final prediction model.
[0121] It is worth mentioning that by constructing a loss function and using the loss function to optimize the prediction model, the performance of the prediction model can be improved and the performance of the prediction model can meet expectations.
[0122] Step 16, using the final prediction model to predict the trajectory of the vehicle to be predicted, to obtain the final predicted trajectory of the vehicle to be predicted.
[0123] The above-mentioned vehicle to be predicted is a vehicle whose trajectory needs to be predicted.
[0124] Specifically, the historical trajectory of the vehicle to be predicted and the historical trajectories of multiple neighboring vehicles of the vehicle to be predicted are obtained, the driving styles of the neighboring vehicles are obtained, the traffic status of the vehicle to be predicted is obtained according to the historical trajectory of the vehicle to be predicted, and then the trajectory of the vehicle to be predicted is predicted using the final prediction model according to the traffic status and all driving styles to obtain the final predicted trajectory of the vehicle to be predicted at the future moment.
[0125] It is worth mentioning that by obtaining the driving style of the target vehicle's neighboring vehicles, the driving conditions of the target vehicle's neighboring vehicles can be analyzed, and the traffic status of the target vehicle can be obtained based on the historical trajectory, which improves the authenticity of the traffic status. Trajectory prediction is performed according to the actual driving style and traffic status, and the driving conditions of the target vehicle's neighboring vehicles and the movement conditions of the neighboring vehicles are taken into account to improve the accuracy of the predicted trajectory. Training the prediction model based on the predicted trajectory with high accuracy can improve the prediction performance of the prediction model, thereby effectively improving the accuracy of trajectory prediction when the prediction model is used for trajectory prediction.
[0126] In some embodiments of the present application, the above prediction model may also be based on a generative adversarial network (GAN). Specifically, the encoder in the generator is first used to obtain the hidden states of all target vehicles, and the formula is:
[0127]
[0128] Calculate the hidden state P i .
[0129] Among them, PM() represents pooling, represents the hidden state of the i-th target vehicle at time t-1, represents the hidden state of the Nth target vehicle at time t, represents the hidden state of the i-th target vehicle at time t, represents the position embedding of the i-th target vehicle at time t, represents the horizontal coordinate of the i-th target vehicle at time t, Represents the ordinate of the i-th target vehicle at time t, LSTM e () indicates an encoder.
[0130] Then use the decoder in the generator to decode the hidden state and get the predicted trajectory of each target vehicle, through the formula:
[0131]
[0132]
[0133] Calculate the predicted trajectory of the i-th target vehicle
[0134] Among them, γ o () and γ d () are all multi-layer perceptrons with ReLU activation, represents the decoder input of the i-th target vehicle, LSTM d represents the decoder, S represents the traffic state of the i-th target vehicle, and D i represents the driving styles of all neighboring vehicles of the i-th target vehicle, and z represents a latent variable that conforms to the standard normal distribution.
[0135] Finally, the discriminator is used to distinguish the true trajectory from the predicted trajectory. The input it processes either represents the true trajectory (expressed as [X i ,Y i ]), or predicted trajectories representing the same structure. The efficiency of the discriminator depends on the ability of its LSTM encoder to analyze and interpret trajectory sequence data, taking into account the dynamics of traffic conditions and interactions between multiple vehicles. The intelligence of the discriminator is continuously developed through training, enabling it to identify trajectories that do not conform to expected traffic flow patterns and vehicle interactions as "fake". This learning process is guided by two key components. The adversarial loss measures the ability of the discriminator to distinguish between real trajectories and those forged by the generator. It penalizes the discriminator when it incorrectly labels a real trajectory as a fake trajectory or vice versa. The diversity loss mainly affects the generator to diversify its output, while indirectly affecting the evaluation criteria of the discriminator by encouraging the generation of diverse but reasonable trajectories.
[0136] The above prediction model can also be a model based on a conditional variational autoencoder (CVAE, ConvolutionalVariationalAutoencoder), which represents each target vehicle as a node and encodes it using a long short-term memory model (LSTM, Long Short Term Memory) with 8 hidden layers. The LSTM captures the position data of the target vehicle during the entire observation period, thereby generating a node history. The interactions between target vehicles are represented by edges. When the target vehicles approach, edges are established between them. Each edge is also encoded using LSTM to generate an interaction history.
[0137] Based on the node history, interaction history, traffic status, and all corresponding driving styles of the target vehicle, a comprehensive representation vector of the target vehicle is obtained. Finally, the predicted trajectory of the target vehicle is obtained based on the comprehensive representation vector. Specifically, the formula is:
[0138]
[0139]
[0140]
[0141]
[0142] Get the predicted trajectory of the i-th target vehicle
[0143] Among them, GMM() represents Gaussian mixture model, GRU() represents gated recurrent unit, and e i represents the comprehensive representation vector, z represents the latent variable, S represents the traffic state of the i-th target vehicle, D represents the driving style of all neighboring vehicles of the i-th target vehicle, and f i represents the distribution parameter, represents the trajectory generation code of the i-th target vehicle, C i represents the class of the i-th target vehicle, X i The horizontal coordinate of the position of the i-th target vehicle, Y i represents the ordinate of the position of the i-th target vehicle, represents the interaction history of the i-th target vehicle, represents the node history of the i-th target vehicle.
[0144] The three prediction models given are evaluated, and the evaluation results are shown in Table 3.
[0145]
[0146]
[0147] Table 3
[0148] Among them, DS-GAN represents a GAN model considering driving style, TS-GAN represents a GAN model considering traffic status, TSD-GAN represents a GAN model considering driving style and traffic status, DS-CVAE represents a CVAE model considering driving style, TS-CVAE represents a CVAE model considering traffic status, TSD-CVAE represents a CVAE model considering driving style and traffic status, DS-Transformer represents a Transformer model considering driving style, TS-Transformer represents a Transformer model considering traffic status, TSD-Transformer represents a Transformer model considering driving style and traffic status (i.e., the prediction model given in step 14), minADE1 represents the minimum average displacement error when the sampling value is 1, minFDE1 represents the minimum final displacement error when the sampling value is 1, minFDE5 represents the minimum average displacement error when the sampling value is 5, minFDE5 represents the minimum final displacement error when the sampling value is 5, minADE 10 Indicates the minimum average displacement error when the sampling value is 10, minFDE 10 Indicates the minimum final displacement error when the sampling value is 10, minADE 20 Indicates the minimum average displacement error when the sampling value is 20, minFDE 20 Indicates the minimum final displacement error when the sampling value is 20, KDENLL 20 It represents the negative log-likelihood based on kernel density estimation when the sampling value is 20.
[0149] As can be seen, the TSD-Transformer architecture performs well in models that take into account traffic conditions and driving style. This integration improves the prediction accuracy for large sample sizes and improves the overall accuracy of the predicted trajectory.
[0150] The above prediction model is used to perform trajectory prediction in various scenarios, and the evaluation results are shown in Table 4.
[0151]
[0152] Table 4
[0153] Among them, CHN Roundabout LN is a roundabout in China, DEU Roundabout OF is a roundabout in Germany, USA Roundabout EP is a roundabout EP in the United States, USA Roundabout FT is a roundabout FT in the United States, USA Roundabout SR is a roundabout SR in the United States, and ITRA (Interaction-aware Trajectory Prediction with Relational Attention) is an interaction-aware trajectory prediction model based on relational attention.
[0154] It can be seen that TSD-Transformer shows the best performance in most cases. These results show that in roundabout situations characterized by multiple merging and diverging behaviors, incorporating traffic status and driving style can significantly improve the trajectory prediction accuracy of the model. In addition, the proposed TSD-Transformer model also shows excellent performance compared to the ITRA model, highlighting its effectiveness in complex traffic situations. This highlights the potential benefits of incorporating traffic status and driving style into trajectory prediction models, which can provide more accurate and reliable predictions in multi-entry and multi-exit environments.
[0155] Ablation studies incorporate traffic states and driving styles into various components of the model framework and use minADE1 / minFDE1 and minADE 20 / minFDE 20 The indicators are evaluated to determine the best structure to improve trajectory prediction accuracy. The ablation study results of the TSD-GAN model are shown in Table 5.
[0156]
[0157] Table 5
[0158] The ablation experimental results of TSD-CVAE are shown in Table 6.
[0159]
[0160]
[0161] Table 6 The ablation experiment results of the TSD-Transformer model are shown in Table 7.
[0162]
[0163] Table 7
[0164] In Tables 5, 6, and 7, √ indicates that traffic conditions and driving styles are taken into consideration, and × indicates that traffic conditions and driving styles are not taken into consideration.
[0165] It can be seen that by integrating traffic status and driving style into the prediction model, the model can fully grasp the complexity of real-world driving conditions, thereby improving the accuracy and reliability of trajectory prediction.
[0166] Figure 4 The trajectory prediction performance of the Transformer model based on driving style, traffic conditions, and the combination of the two is compared. The horizontal axis represents the horizontal axis position, the vertical axis represents the vertical axis position, and the three curves are the historical trajectory, future trajectory, and predicted trajectory. Figure 4 a is the trajectory prediction comparison of DS-Transformer, Figure 4 b is the trajectory prediction comparison of TS-Transformer, Figure 4 c is the trajectory prediction comparison of TSD-Transformer. Figure 5 The trajectory prediction performance of the GAN model based on driving style, traffic conditions, and the combination of the two is compared. The horizontal axis represents the horizontal axis position, the vertical axis represents the vertical axis position, and the three curves are the historical trajectory, future trajectory, and predicted trajectory. Figure 5 a is the trajectory prediction comparison of DS-GAN, Figure 5 b is the trajectory prediction comparison of TS-GAN, Figure 5 c is the trajectory prediction comparison of TSD-GAN. Figure 6 The trajectory prediction performance of the CAVE model based on driving style, traffic conditions, and the combination of the two is compared. The horizontal axis represents the horizontal axis position, the vertical axis represents the vertical axis position, and the three curves are the historical trajectory, future trajectory, and predicted trajectory. Figure 6 a is the trajectory prediction comparison of DS-CAVE, Figure 6 b is the trajectory prediction comparison of TS-CAVE, Figure 6 c is the trajectory prediction comparison of TSD-CAVE.
[0167] It can be seen that considering both traffic conditions and driving style together can produce better predictions than considering only one of them. The convex hull area produced by the combined method is smaller, indicating that the predicted trajectory is closer to the ground truth trajectory.
[0168] The following is an exemplary description of the trajectory prediction device that integrates traffic conditions and driving styles provided in the present application.
[0169] like Figure 7 As shown, an embodiment of the present application provides a trajectory prediction device integrating traffic status and driving style, and the trajectory prediction device 700 integrating traffic status and driving style includes:
[0170] The acquisition module 701 acquires historical trajectories of multiple target vehicles and historical trajectories of multiple neighboring vehicles of each target vehicle; the historical trajectories of the target vehicle include trajectory data of the target vehicle at multiple historical moments, and the trajectory data include vehicle speed, acceleration, vehicle distance to each neighboring vehicle, and collision time;
[0171] The clustering module 702 clusters the neighboring vehicles based on their historical trajectories to obtain the driving styles of the neighboring vehicles. The driving styles are used to describe the driving conditions of the neighboring vehicles at all historical moments.
[0172] Traffic status acquisition module 703, acquires the traffic status of each target vehicle according to the historical trajectories of all target vehicles; the traffic status is used to describe the movement status of all neighboring vehicles of the target vehicle at the last historical moment;
[0173] A first trajectory prediction module 704 performs trajectory prediction for each target vehicle using a prediction model according to the traffic status of all target vehicles and the driving styles of all neighboring vehicles, thereby obtaining multiple predicted trajectories for each target vehicle;
[0174] Construction module 705, using all predicted trajectories to construct a prediction loss function, and using the prediction loss function to train the prediction model to obtain a final prediction model; the prediction loss function is used to describe the accuracy of all predicted trajectories;
[0175] The second trajectory prediction module 706 uses the final prediction model to perform trajectory prediction on the vehicle to be predicted, and obtains a final predicted trajectory of the vehicle to be predicted.
[0176] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0177] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0178] like Figure 8 As shown, an embodiment of the present application provides a terminal device. The terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 8 Only one processor is shown in the figure), a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100, wherein the processor D100 implements the steps of any of the above-mentioned method embodiments when executing the computer program D102.
[0179] Specifically, when the processor D100 executes the computer program D102, it obtains the historical trajectories of multiple target vehicles and the historical trajectories of multiple neighboring vehicles of each target vehicle, and then clusters the neighboring vehicles based on the historical trajectories of the neighboring vehicles for each neighboring vehicle to obtain the driving style of the neighboring vehicles, and then obtains the traffic status of each target vehicle based on the historical trajectories of all target vehicles, and then uses the prediction model to predict the trajectory of each target vehicle based on the traffic status of all target vehicles and the driving style of all neighboring vehicles to obtain the predicted trajectory of each target vehicle, and then uses all the predicted trajectories to construct a prediction loss function, and uses the prediction loss function to train the prediction model to obtain a final prediction model, and finally obtains the historical trajectory to be predicted of the vehicle to be predicted, and uses the final prediction model to perform prediction based on the historical trajectory to be predicted to obtain the final predicted trajectory of the vehicle to be predicted. Among them, the driving style of the neighboring vehicles of the target vehicle is obtained, the driving conditions of the neighboring vehicles of the target vehicle can be analyzed, the traffic status of the target vehicle is obtained based on the historical trajectory, the authenticity of the traffic status is improved, the trajectory is predicted according to the real driving style and traffic status, the driving conditions of the neighboring vehicles of the target vehicle and the movement conditions of the neighboring vehicles are taken into account, and the accuracy of the predicted trajectory is improved. The prediction model is trained based on the predicted trajectory with high accuracy, which can improve the prediction performance of the prediction model, thereby effectively improving the accuracy of trajectory prediction when the prediction model is used for trajectory prediction.
[0180] The processor D100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0181] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may also be an external storage device of the terminal device D10, such as a plug-in hard disk, a smart memory card (SMC, SmartMedia Card), a secure digital (SD, Secure Digital) card, a flash card (Flash Card), etc. equipped on the terminal device D10. Further, the memory D101 may also include both an internal storage unit of the terminal device D10 and an external storage device. The memory D101 is used to store an operating system, an application program, a boot loader (BootLoader), data and other programs, such as the program code of the computer program, etc. The memory D101 may also be used to temporarily store data that has been output or is to be output.
[0182] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0183] An embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0184] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium that can carry the computer program code to the trajectory prediction method device / terminal device that integrates traffic status and driving style. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0185] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0186] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0187] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A trajectory prediction method integrating traffic status and driving style, characterized in that: include: Acquire historical trajectories of multiple target vehicles and historical trajectories of multiple neighboring vehicles of each of the target vehicles; the historical trajectories of the target vehicles include trajectory data of the target vehicles at multiple historical moments, and the trajectory data include vehicle speed, acceleration, vehicle distance to each neighboring vehicle, and collision time; For each of the neighboring vehicles, clustering the neighboring vehicles based on the historical trajectories of the neighboring vehicles to obtain the driving styles of the neighboring vehicles; the driving styles are used to describe the driving conditions of the neighboring vehicles at all historical moments; Obtaining the traffic state of each target vehicle according to the historical trajectories of all target vehicles; the traffic state is used to describe the movement status of all neighboring vehicles of the target vehicle at the last historical moment; According to the traffic status of all target vehicles and the driving styles of all neighboring vehicles, a prediction model is used to predict the trajectory of each target vehicle to obtain multiple predicted trajectories of each target vehicle; Constructing a prediction loss function using all predicted trajectories, and training the prediction model using the prediction loss function to obtain a final prediction model; the prediction loss function is used to describe the accuracy of all predicted trajectories; The final prediction model is used to predict the trajectory of the vehicle to be predicted, so as to obtain the final predicted trajectory of the vehicle to be predicted.
2. The trajectory prediction method according to claim 1, characterized in that: The clustering of the neighboring vehicles based on the historical trajectories of the neighboring vehicles to obtain the driving styles of the neighboring vehicles includes: Based on the historical trajectory of the neighboring vehicle, a probability density of the neighboring vehicle belonging to each Gaussian distribution is calculated using a distribution model; multiple Gaussian distributions correspond to multiple driving styles one by one; Optimizing the distribution model using all probability densities to obtain a final distribution model, and calculating the final probability density of the neighboring vehicle belonging to each Gaussian distribution based on the final distribution model; A final Gaussian distribution to which the neighboring vehicle belongs is obtained according to all final probability densities, and the driving style corresponding to the final Gaussian distribution is used as the driving style of the neighboring vehicle.
3. The trajectory prediction method according to claim 2, characterized in that: The method of optimizing the distribution model by using all probability densities to obtain a final distribution model includes: Calculate the total probability density of the neighboring vehicles based on all probability densities; Determining whether the total probability density of the neighboring vehicles is greater than a preset probability density; If yes, the distribution model is used as the final distribution model; Otherwise, the mixing coefficient, mean and covariance matrix in the distribution model are adjusted, and the step of calculating the probability density of the neighboring vehicle belonging to each Gaussian distribution using the distribution model based on the historical trajectory of the neighboring vehicle is returned.
4. The trajectory prediction method according to claim 3, characterized in that: The calculating the total probability density of the neighboring vehicles according to all probability densities comprises: By formula: Calculate the total probability density p(x) of the neighboring vehicles; Among them, π k represents the mixing coefficient of the rth Gaussian distribution, N(x|μ r ,∑ r ) represents the probability density that the neighboring vehicle belongs to the rth Gaussian distribution, μ k represents the mean of the rth Gaussian distribution, ∑ r represents the covariance matrix of the rth Gaussian distribution, R represents the number of Gaussian distributions, and x represents the historical trajectory of the neighboring vehicle.
5. The trajectory prediction method according to claim 1, characterized in that: The method of predicting the trajectory of each target vehicle using a prediction model according to the traffic status of all target vehicles and the driving styles of all neighboring vehicles to obtain the predicted trajectory of each target vehicle includes: Calculating a historical feature sequence based on the historical trajectories of all target vehicles, and generating a potential code for each target vehicle according to the historical feature sequence; For each target vehicle, a plurality of predicted trajectories of the target vehicle are obtained based on the potential code, traffic status and driving styles of all corresponding neighboring vehicles of the target vehicle.
6. The trajectory prediction method according to claim 5, characterized in that: The historical feature sequence is calculated based on the historical trajectories of all target vehicles, including: By formula: C=Agent Aware Attention(Q,K,V)+[E1,E2,…,E n ] Q=K=V=[E1,E2,…,E n ] Calculate the historical feature sequence C; Among them, Agent Aware Attention (Q, K, V) represents the encoding vector, E1 represents the historical trajectory of the first target vehicle, E2 represents the historical trajectory of the second target vehicle, and E n represents the historical trajectory of the nth target vehicle, softmax() represents the activation function, A represents the attention score matrix, M represents the mask, Q self represents the predicted query vector, Q other represents other query vectors, K self Denotes the prediction key vector, K other represents the prediction key vector, Q represents the query vector, K represents the key vector, and V represents the value vector. and Both represent the prediction projection weights, and All represent other projection weights.
7. The trajectory prediction method according to claim 1, characterized in that: The prediction loss function is: Among them, L sampler represents the value of the prediction loss function, represents the kth predicted trajectory set, Y represents all true trajectories, N represents the number of target vehicles, KL represents the divergence, r θ Indicated in Gaussian sampling distribution on , represents the enhanced latent code of the nth target vehicle in the kth predicted trajectory set, X represents the historical trajectory of the nth target vehicle, and p θ represents the conditional Gaussian prior, z n represents the overall potential code of the nth target vehicle, K represents the last set of predicted trajectories, represents the k1th predicted trajectory set, represents the k2th predicted trajectory set, σ d Represents the scaling parameter.
8. The trajectory prediction method according to claim 7, characterized in that: The method of training the prediction model using the prediction loss function to obtain a final prediction model includes: Determine whether the predicted loss function is less than a preset loss function value; If yes, the prediction model is used as the final prediction model; Otherwise, the parameters in the prediction model are adjusted, and the step of performing trajectory prediction on each of the target vehicles using the prediction model according to the driving styles and traffic conditions of all the target vehicles is returned to obtain the predicted trajectory of each of the target vehicles.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the trajectory prediction method integrating traffic status and driving style as described in any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the trajectory prediction method integrating traffic conditions and driving styles as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Traffic signal reinforcement learning control method and device considering multiple types of driving styles
CN117275240A
Vehicle track prediction and behavior decision-making method and system considering driving style
CN118306403A
Vehicle track prediction method and device, medium and equipment
CN118535939A
Coordinated control for automated driving on connected automated highways
US20220114885A1
Cited By
Interactive trajectory prediction method and system considering driving style uncertainty
CN119705498A
Transform-GNN-based driving style and traffic density combined identification method
CN120561874A
A joint recognition method of driving style and traffic density based on Transformer-GNN
CN120561874B
Driving control method and apparatus, and vehicle
WO2026207739A1
