Vehicle trajectory prediction method, electronic device, and storage medium

By constructing an enhanced adjacency matrix and using graph convolutional networks and Transformer models, the problem of inaccurate vehicle trajectory prediction in complex traffic scenarios is solved, and higher accuracy vehicle trajectory prediction is achieved.

CN122365052APending Publication Date: 2026-07-10SHIJIAZHUANG TIEDAO UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHIJIAZHUANG TIEDAO UNIV
Filing Date
2026-04-03
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing trajectory prediction algorithms cannot accurately predict the future trajectory of vehicles in complex traffic scenarios, especially at urban intersections, resulting in poor prediction accuracy.

Method used

An enhanced adjacency matrix is ​​constructed, spatial interaction features of vehicles are extracted through a graph convolutional network, and temporal dependency features are captured using a Transformer model to generate predicted trajectories.

Benefits of technology

It improves the accuracy and reliability of vehicle trajectory prediction, especially in complex traffic scenarios, and can better predict the future motion state of vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122365052A_ABST
    Figure CN122365052A_ABST
Patent Text Reader

Abstract

This invention provides a vehicle trajectory prediction method, electronic device, and storage medium, relating to the field of autonomous driving technology. The method includes: acquiring the historical trajectories of each vehicle within a target area and constructing an enhanced adjacency matrix based on these trajectories; extracting spatial interaction features of each vehicle based on the enhanced adjacency matrix; determining the temporal dependency features of each vehicle based on these spatial interaction features; and obtaining the predicted trajectory of each vehicle based on these temporal dependency features. This invention constructs an enhanced adjacency matrix to fully explore the interaction relationships between vehicles; extracts spatial interaction features and integrates dynamic interaction information between vehicles, enhancing the representation ability of the spatial structure of complex traffic scenarios; extracts temporal dependency features to capture the long-term evolutionary patterns of vehicle driving behavior; and finally generates predicted trajectories based on the temporal dependency features. This enables reasonable reasoning and accurate prediction of the future motion state of vehicles, improving the reliability and accuracy of trajectory prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of autonomous driving technology, and in particular to a vehicle trajectory prediction method, electronic device, and storage medium. Background Technology

[0002] With the rapid development of autonomous driving perception, computer vision, and artificial intelligence technologies, autonomous driving has moved from theory to commercial application. Accurately predicting the future trajectories of surrounding vehicles is a key capability for achieving safe and efficient planning and decision-making. Similar to human drivers continuously observing surrounding traffic dynamics, autonomous driving systems need to integrate motion information from nearby traffic participants to generate safe driving strategies. At urban intersections, traffic flow patterns are complex, interactions are frequent, and uncertainties are greater, resulting in richer variations in vehicle trajectories, further increasing the difficulty of prediction. Therefore, simultaneously characterizing the spatial correlations and temporal dependencies between vehicles within the same framework, and learning representative trajectory patterns, is a core issue in improving the safety and traffic efficiency of autonomous driving.

[0003] Current technologies typically employ physical model-based methods, machine learning-based methods, and interaction-oriented deep learning methods for trajectory prediction. However, these methods are unable to handle the complex maneuvering behaviors resulting from strong interactions in complex scenarios such as intersections, leading to poor prediction accuracy. Summary of the Invention

[0004] This invention provides a vehicle trajectory prediction method, electronic device, and storage medium to solve the problems of insufficient accuracy and inaccurate prediction in existing trajectory prediction algorithms.

[0005] In a first aspect, embodiments of the present invention provide a vehicle trajectory prediction method, comprising: Obtain the historical trajectories of each vehicle within the target area, and construct an enhanced adjacency matrix based on the historical trajectories of each vehicle; Based on the enhanced adjacency matrix, the spatial interaction features of each vehicle are extracted; Based on the spatial interaction characteristics of each vehicle, the temporal dependence characteristics of each vehicle are determined. Based on the time-dependent characteristics of each vehicle, the predicted trajectory of each vehicle is obtained.

[0006] In a second aspect, embodiments of the present invention provide an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the vehicle trajectory prediction method as described in the first aspect or any possible implementation of the first aspect.

[0007] Thirdly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the vehicle trajectory prediction method as described in the first aspect or any possible implementation thereof.

[0008] This invention provides a vehicle trajectory prediction method, an electronic device, and a storage medium. The vehicle trajectory prediction method includes: acquiring the historical trajectories of each vehicle within a target area and constructing an enhanced adjacency matrix based on these historical trajectories; extracting spatial interaction features of each vehicle based on the enhanced adjacency matrix; determining the temporal dependency features of each vehicle based on these spatial interaction features; and obtaining the predicted trajectory of each vehicle based on these temporal dependency features. This invention constructs an enhanced adjacency matrix to fully explore the interaction relationships between vehicles; extracts spatial interaction features based on the enhanced adjacency matrix and integrates dynamic interaction information between vehicles to enhance the representation ability of the spatial structure of complex traffic scenarios; extracts temporal dependency features based on the spatial interaction features to capture the long-term evolution law of vehicle driving behavior; and finally generates the predicted trajectory based on the temporal dependency features. This enables reasonable reasoning and accurate prediction of the future motion state of vehicles, improving the reliability and accuracy of trajectory prediction. Attached Figure Description

[0009] Figure 1 This is a flowchart illustrating the implementation of a vehicle trajectory prediction method provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the vehicle trajectory prediction device provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0010] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0011] See Figure 1 The diagram illustrates a flowchart of a vehicle trajectory prediction method provided by an embodiment of the present invention, which is described in detail below: The above-mentioned vehicle trajectory prediction methods include: S101: Obtain the historical trajectory of each vehicle within the target area, and construct an enhanced adjacency matrix based on the historical trajectory of each vehicle; This application simplifies the vehicle into a point model described by its position and kinematic state, thereby improving modeling efficiency and avoiding interference from differences in vehicle shape.

[0012] Let the observation period be The historical trajectories of each vehicle within the target area are recorded as follows:

[0013] in, For the first The historical trajectory of Taiwanese vehicles. This represents the number of vehicles within the target area.

[0014] Every moment The vehicle status is defined as:

[0015] in, For the first The vehicle status at any given time.

[0016] For example, vehicle status may include: position, speed, acceleration, and heading angle. Defined as:

[0017] in, The first Taiwan vehicles at time The position (x-axis, y-axis), velocity, acceleration, and heading angle at that time.

[0018] Based on the constructed vehicle point model, this application constructs an enhanced adjacency matrix to mine the spatiotemporal correlation features between vehicles.

[0019] In one possible implementation, S101 may include: S1011: Construct a vehicle spatial interaction graph for each time step based on the historical trajectory of each vehicle; wherein, each vertex of the vehicle spatial interaction graph represents the vehicle state of each vehicle at the corresponding time step, and the edge features of the vehicle spatial interaction graph are the differences between the vehicle states of two adjacent vertices at the corresponding time step; the vehicle state includes: position, speed, acceleration, and heading angle.

[0020] The graph structure is a topological relationship composed of nodes and edges. To characterize the influence of surrounding vehicles on the trajectory of the target vehicle, this application constructs a vehicle spatial interaction graph during the observation period. The interaction of vehicles in a traffic scene depends not only on their spatial position but also on the coordination of their motion states (e.g., vehicles with synchronized speeds and consistent heading angles have a more significant interaction effect). Therefore, this application uses vehicle states (position, speed, acceleration, heading angle) as vertices of the graph, comprehensively covering the spatial and motion attributes of vehicles; and uses the state difference between adjacent vertices as edge features to quantify the differences between two vehicles in spatial distance and motion trends (e.g., a small speed difference indicates synchronized driving rhythm, and a small heading angle difference indicates consistent driving direction), thereby accurately characterizing the intensity and pattern of spatial interaction between vehicles at a single moment.

[0021] Specifically, define each moment. The vehicle space interaction diagram is as follows:

[0022] in, For a moment Vehicle space interaction diagram at that time.

[0023] Vehicle space interaction diagram at each moment Defined as:

[0024] in, These are the vertex set (vehicle node set) and the edge feature set, respectively.

[0025] The edge features not only include the distance between vehicles, but also introduce multidimensional kinematic relative quantities to more realistically reflect the strength of mutual influence, which can be defined as:

[0026] edge features For vehicles With vehicles The relative position, speed difference, acceleration difference, and heading angle difference.

[0027] S1012: For any given time, the edge features of the vehicle space interaction graph at that time form the interaction edge feature set at that time; the interaction edge feature set at that time is preprocessed to obtain the preprocessed interaction edge feature set at that time.

[0028] To filter out data noise, this application preprocesses the interaction edge feature set to preserve the real interaction patterns between vehicles and improve the reliability of subsequent feature fusion.

[0029] In one possible implementation, S1012 may include: 1. Zero-padding the edge features of the interaction edge feature set at this moment to obtain an intermediate feature set, so that the number of edge features in the intermediate feature set is the preset number; The number of vehicles in the target area changes dynamically at different times, resulting in a variable number of edge features in the interaction feature set. Therefore, this application employs zero-padding of edge features. By supplementing the feature set with fewer than a preset number of edges with zero edge features, the number of edges in the intermediate feature set at all times is unified to the preset value, achieving dimensional alignment. This ensures that the feature set at each time point has a consistent input dimension during subsequent processing, avoiding computational interruptions or model adaptation problems caused by differences in the number of edges.

[0030] For example, the preset number can be 27, meaning the uniform number of vehicles is 27. When there are actually no 27 vehicles in the target area, zeros are used to fill the vertices and edge features to ensure that all samples have uniform dimensions. Specifically, the value of the preset number can also be set according to the actual application requirements; no specific limitation is made here.

[0031] 2. Sparsify the intermediate feature set to obtain the preprocessed interaction edge feature set at this time.

[0032] The interactions between vehicles vary in strength: some interactions are accidental encounters, constituting redundant noise; others are continuous collaborations, which are more critical for traffic pattern analysis. Therefore, to reduce computational overhead and suppress the impact of noise, this application sparsifies the intermediate feature set, setting a large number of weak interaction edge features to zero, resulting in a highly sparse interaction edge feature set that significantly reduces computational load; it also effectively suppresses noise interference, improving computational accuracy.

[0033] In summary, this application employs zero-padding and sparsification for preprocessing to ensure batch processing consistency, support parallel computing, avoid variable-length input problems, effectively reduce computational load, and improve the accuracy of subsequent calculations.

[0034] In one possible implementation, sparsification of the intermediate feature set to obtain the preprocessed interaction edge feature set at that time step may include: (1) For any side feature in the middle feature set, aggregate the feature values ​​of each dimension of the side feature to obtain the scalar strength of the side feature; The multi-dimensional values ​​of edge features (position difference, velocity difference, acceleration difference, heading angle difference) are aggregated into a scalar (e.g., through weighted summation, Euclidean distance calculation, attention weight fusion, etc.), and this scalar is used to represent the "interaction strength"—the smaller the scalar, the weaker the interaction; the larger the scalar, the stronger the interaction.

[0035] (2) Sort the edge features in the intermediate feature set in ascending order of scalar strength to form a feature sequence; (3) Set all feature values ​​of each dimension of the edge features of the previous preset proportion in the feature sequence to zero, and add them to the preprocessed interaction edge feature set at that time. (4) Add the edge features of the remaining proportion in the feature sequence to the preprocessed interaction edge feature set at this time; wherein the sum of the preset proportion and the remaining proportion is 1.

[0036] After sorting by scalar strength from smallest to largest, all weak interaction edge features of the first preset proportion are set to zero, and only the strong interaction edge features of the remaining proportion are retained. Through thresholding, noisy interactions are filtered out to highlight the core interaction relationships.

[0037] For example, the preset ratio is 20%, which means filtering out 20% of the weak scalar strength edge features and retaining the remaining 80% of the edge features. This reduces the interference of weakly correlated or irrelevant interactions on the prediction, so that the enhanced adjacency matrix generated based on the preprocessed interaction edge feature set can more clearly depict the "interaction relationship of the core vehicle group".

[0038] S1013: Based on the enhanced adjacency mechanism, the enhanced adjacency matrix is ​​obtained according to the preprocessed interaction edge feature set at each time step.

[0039] Traditional adjacency matrices use only "0 / 1" to represent whether a connection is made, failing to reflect the strength and pattern differences in interactions. This application employs an enhanced adjacency mechanism to adaptively weight the adjacency matrix, transforming the preprocessed edge feature set at each time step into an enhanced adjacency matrix that adapts to the scene.

[0040] This application's enhanced adjacency matrix integrates multi-dimensional correlation strength values ​​of "position difference, velocity difference, acceleration difference, and heading angle difference," accurately distinguishing between two types of interactions: spatially close but with unrelated motion trends, and spatially close and with coordinated motion, thus avoiding misjudgment. Simultaneously, the interaction edge feature sets at different times preserve the temporal dynamics of the interaction. Through the enhanced adjacency mechanism, multi-time feature aggregation is achieved, and the final matrix simultaneously carries both spatial interaction patterns and temporal stability information, providing richer input for downstream tasks.

[0041] Specifically, edge features are mapped to Query / Key / Value through multi-head attention, and interaction weights are obtained through Softmax learning, quantifying relative importance (e.g., closer / faster vehicles receive higher weights), thereby forming an enhanced adjacency matrix that dynamically changes with the scene.

[0042] The formula for calculating linear projection is:

[0043]

[0044] , in, , , For a linear layer, W represents trainable parameters. Preprocessed interaction edge feature set The formula for attention calculation is:

[0045] The enhanced adjacency matrix is ​​then expressed as:

[0046] in, This is the calculated attention weight matrix.

[0047] For example, the number of heads in multi-head attention can be 8, or it can be determined according to the actual application scenario, and there is no specific limitation here.

[0048] The enhanced adjacency matrix is ​​a dynamic matrix reconstructed at each time step. It explicitly considers the dynamic changes in relative distance, speed, acceleration, and heading angle between vehicles, captures time-varying interactions, adjusts as the scene evolves, and quantifies the interaction intensity. The enhanced adjacency matrix can be represented as... The element represents the influence weight between vehicles, which is generated by self-attention weighting through the preprocessed interaction edge feature set.

[0049] S102: Extract the spatial interaction features of each vehicle based on the enhanced adjacency matrix; This application aggregates neighborhood information based on an enhanced adjacency matrix.

[0050] In one possible implementation, S102 may include: S1021: Based on the enhanced adjacency matrix, a graph convolutional network (GCN) is used to aggregate neighborhood information of node features to obtain the spatial interaction features of each vehicle.

[0051] This application employs a graph convolutional network (GCN) to aggregate neighborhood information for node features. The update form of the l-th layer GCN is as follows:

[0052] in, For the first Hidden node features output by layer GCN For learnable parameter matrix, As the activation function, after After obtaining GCN layer Each node represents the interaction effects of its multi-hop neighborhood, which are used for subsequent temporal modeling.

[0053] This application employs a multi-layered GCN, which can capture indirect interactions, enhance the modeling capabilities for complex scenarios such as congestion propagation and queuing, and better reflect the interaction logic of real traffic scenarios.

[0054] S103: Determine the temporal dependence characteristics of each vehicle based on the spatial interaction characteristics of each vehicle; In one possible implementation, S103 may include: S1031: Based on the spatial interaction characteristics of each vehicle, the Transformer model is used to extract the temporal dependency of driving behavior and obtain the temporal dependency characteristics of each vehicle. In the Transformer model, a mask matrix is ​​added to the multi-head self-attention of the decoder.

[0055] This application adopts the Transformer model, which relies on a self-attention mechanism to effectively capture long-range dependencies across time steps, thereby characterizing the evolution of vehicle driving behavior over time.

[0056] The encoder of the Transformer model, for Overlaying positional encoding enables the model to perceive temporal order; subsequently, multi-head self-attention is used to extract multi-dimensional temporal dependencies, and residual connections and layer normalization (Add & Norm) are used to stabilize training; then, a feedforward network (FNN) is used to enhance the nonlinear representation, resulting in the encoder output. .

[0057] The decoder uses the trajectory representation from the previous prediction step and the encoder output. As input, mask self-attention guarantees in prediction Only when used The previous information is then fused with the historical time series representation and the current prediction state through multi-head cross-attention.

[0058] At the same time, a mask matrix is ​​added to the decoder to prevent future leakage and zero-padding interference during the preprocessing process.

[0059] S104: Based on the time-dependent characteristics of each vehicle, the predicted trajectory of each vehicle is obtained.

[0060] In one possible implementation, S104 may include: S1041: A linear mapping layer is used to map the time-dependent features of each vehicle into two-dimensional trajectory coordinate features; S1042: Perform inverse normalization on the two-dimensional trajectory coordinate features to obtain the predicted trajectory of each vehicle.

[0061] The decoder output of the Transformer model outputs the time-dependent features of each vehicle, which correspond to the latent space representation of each prediction step. Finally, these features are mapped to two-dimensional trajectory coordinates through a linear layer and then inversely normalized to obtain the predicted trajectory.

[0062] In one possible implementation, after S104, the above method may further include: S105: Calculate the loss function based on the predicted trajectory of each vehicle, and optimize the model parameters through backpropagation; Loss functions can include:

[0063]

[0064]

[0065] in, For loss function, For existence mask, The total number of vehicles. The observation period; Based on the loss function, For a moment The weight of the position, For hyperparameters; For error masking, For vehicles At any moment True coordinates With predicted coordinates The Euclidean distance between them This is a preset threshold.

[0066] During the model training phase, the loss function is calculated, and backpropagation is performed to optimize the model parameters.

[0067] To address the characteristics of multi-vehicle trajectory prediction at intersections, the loss function incorporates a mask mechanism to mitigate the impact of padding on the loss / gradient. The loss function consists of three parts: Mask-weighted mean square error (MSE): Calculates the coordinate error between the predicted trajectory and the true trajectory, but through the mask matrix. Virtual nodes with zero padding are masked (only when the vehicle actually exists). =1, otherwise 0), ensuring that only the trajectory error of the actual vehicle participates in the loss calculation; at the same time, time weighting is introduced. Differential importance is assigned to errors at different times (e.g., higher weight is given to recent prediction errors).

[0068] Large error penalty term (Miss Rate, MR): Preset threshold (For example, 2m), when the Euclidean distance between the predicted point and the true point exceeds the threshold at a certain moment, that moment is marked as a missed detection. =1), considered a large error, and weighted accordingly. (For example, 5) Amplify the penalty for such errors to encourage the model to focus on optimizing difficult prediction moments (such as lane changes and avoidance moments at intersections).

[0069] By combining the mask-weighted MSE with the MR penalty term, and eliminating the influence of differences in the number of vehicles in different samples through normalized mask loss, the final loss function is formed. .

[0070] The mask matrix design in this application ensures that "zero-filled virtual nodes" do not participate in loss calculation and gradient update, avoiding the interference of occupancy noise introduced by dynamic changes in the number of vehicles on the model's learning stability, and improving training stability and the targeted nature of parameter optimization. The Miss Rate penalty term, through "threshold filtering + weight amplification," allows the model to focus on critical moments with large prediction errors (such as sudden braking at intersections and emergency lane changes), avoiding the model only fitting simple car-following scenarios while ignoring complex interactions, and significantly improving prediction accuracy in high-uncertainty scenarios.

[0071] The above method will be described in detail below with reference to specific embodiments.

[0072] 1. Loss Function Using the above loss function, =2m, =5. To evaluate the feasibility of predicting trajectories without using map priors, the evaluation phase additionally introduces drivable area consistency (DAC) and trajectory point missing rate (MR). Map data is not used in the training phase; the map is only used in the evaluation phase to determine whether a trajectory falls within a drivable area.

[0073] 2. Evaluation Indicators ADE: The average Euclidean distance between the predicted trajectory and the actual trajectory across all prediction time steps; FDE: The Euclidean distance between the predicted endpoint and the actual endpoint; DAC: The percentage of predicted trajectories that fall within the drivable area (higher is better); MR: If the distance between a predicted point and the actual point in a frame exceeds 2 m, then the point is marked as missed, and MR is the percentage of missed points (lower is better).

[0074]

[0075]

[0076] in, and Representing vehicles At any moment The actual coordinates and predicted coordinates of the location This indicates the prediction time domain.

[0077]

[0078]

[0079] in, This represents the total number of ground real-value trajectory points in all inputs, while This indicates the number of missed trajectory points.

[0080] This application reports ADE / FDE[13.1] in different prediction time domains from 1 to 5 s; the generalization experiment uses the first 2 s as the observation input and the last 3 s as the prediction output.

[0081] 3. Comparative Experiment The vehicle trajectory prediction method of this application is compared with representative baseline methods. Single-vehicle prediction is compared with CS-LSTM, GRIP, and MSTF; multi-vehicle prediction is compared with HDGT. Table 1 summarizes the ADE / FDE of different prediction time domains from 1s to 5s. The method of this application achieves lower errors in both types of tasks.

[0082] Table 1. Comparison of the method of this application with existing technologies.

[0083] As shown in Table 1, in single-vehicle prediction, the method in this application reduces the average ADE / FDE by 47% / 41%, 30% / 24%, and 13% / 12% respectively compared with CS-LSTM / GRIP / MSTF; in multi-vehicle prediction, it reduces the average ADE / FDE by 14% / 12% compared with HDGT, showing better prediction performance.

[0084] 4. Driving Behavior Analysis The visualization results show that in car-following behavior, the method of this application can accurately predict the coordinated changes in vehicle speed and headway; in lane-changing scenarios, the method of this application can not only predict the trajectory of lane-changing vehicles, but also reasonably predict the deceleration response of vehicles in adjacent lanes; in avoidance / conflict resolution scenarios, the method of this application can identify intentions such as acceleration or deceleration, and provide avoidance trends consistent with the actual trajectory.

[0085] 5. Vehicle Interaction Intensity Analysis To verify the effect of the enhanced adjacency mechanism on characterizing the interaction strength, this application compares four adjacency configurations: Model 1 (uniform weight), Model 2 (distance only), Model 3 (distance + velocity) with the present application (distance + velocity + acceleration + heading angle). Table 2 shows the ADE / FDE from 1s to 5s and the MR and DAC at 5s.

[0086] Table 2. Performance Comparison of Models under Different Adjacency Configurations

[0087] As shown in Table 2, the method of this application achieves the lowest ADE / FDE in all prediction time domains, while having the lowest MR and the highest DAC. This indicates that multidimensional kinematic factors help to more accurately characterize the interaction strength and improve the feasibility of prediction.

[0088] 6. Generalization ability analysis In ramp merging and roundabout scenarios, a 2-second observation and 3-second prediction setting was used to evaluate the generalization ability. Table 3 shows the ADE / FDE values. The method in this application can reproduce the deceleration and merging behavior caused by multi-vehicle interaction well in the ramp scenario; in the roundabout scenario, it can provide reasonable predictions for behaviors such as exiting, driving within the roundabout, and entering.

[0089] Table 3 Generalization Ability Analysis Table

[0090] 7. Structural ablation experiment Structural ablation experiments show that when the Transformer has only 1-2 layers, the model is prone to underfitting; 3-4 layers achieve a better balance between parameter scale and expressive power. Without GCN (i.e., without enhanced adjacency interactions), model performance significantly decreases (e.g., ADE / FDE for 3-layer and 4-layer encoder-decoder are 1.03 / 1.78 and 0.98 / 1.69, respectively). Adding one GCN improves model performance (e.g., 0.48 / 1.01 or 0.45 / 0.92); the most significant performance improvement is seen with two GCN layers (0.21 / 0.56 or 0.22 / 0.54), indicating that multi-hop interaction modeling is crucial for intersection prediction.

[0091] Therefore, this application adopts a structure of 2-layer GCN + 4-layer Transformer.

[0092] In summary, the vehicle trajectory prediction method provided in this application comprehensively considers the influence of historical motion characteristics and multi-vehicle spatiotemporal interactions on future trajectories. This method incorporates multiple factors, including relative distance, velocity, acceleration, and heading angle, into the interaction weight model by enhancing the adjacency graph convolutional network; and employs a Transformer encoder-decoder structure to model the temporal dependencies of vehicle motion, supporting parallel multi-agent prediction. The above method outperforms baseline methods such as CS-LSTM, GRIP, MSTF, and HDGT in both single-vehicle and multi-vehicle tasks, and its effectiveness is verified in interaction strength, generalization evaluation, and structural ablation experiments.

[0093] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0094] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.

[0095] Figure 2A schematic diagram of the vehicle trajectory prediction device provided in an embodiment of the present invention is shown. For ease of explanation, only the parts related to the embodiment of the present invention are shown, and are described in detail below: like Figure 2 As shown, the vehicle trajectory prediction device includes: The adjacency matrix construction module 21 is used to obtain the historical trajectory of each vehicle in the target area and construct an enhanced adjacency matrix based on the historical trajectory of each vehicle. The first feature extraction module 22 is used to extract the spatial interaction features of each vehicle based on the enhanced adjacency matrix. The second feature extraction module 23 is used to determine the time dependence features of each vehicle based on the spatial interaction features of each vehicle. The trajectory prediction module 24 is used to obtain the predicted trajectory of each vehicle based on the time dependence characteristics of each vehicle.

[0096] In one possible implementation, the adjacency matrix construction module 21 may include: The spatial interaction graph construction unit is used to construct the vehicle spatial interaction graph at each time point based on the historical trajectory of each vehicle. Each vertex of the vehicle spatial interaction graph represents the vehicle state of each vehicle at the corresponding time point, and the edge features of the vehicle spatial interaction graph are the differences between the vehicle states of two adjacent vertices at the corresponding time point. The vehicle state includes: position, speed, acceleration, and heading angle. The preprocessing unit is used to form an interaction edge feature set for each edge feature of the vehicle space interaction graph at any given time; and to preprocess the interaction edge feature set at that time to obtain the preprocessed interaction edge feature set at that time. The adjacency matrix output unit is used to obtain the enhanced adjacency matrix based on the preprocessed interaction edge feature set at each time step, using the enhanced adjacency mechanism.

[0097] In one possible implementation, the preprocessing unit may include: The zero-padding sub-unit is used to perform zero-padding of the interaction edge feature set at this moment to obtain an intermediate feature set, so that the number of edge features in the intermediate feature set is a preset number. The sparse processing subunit is used to perform sparsification processing on the intermediate feature set to obtain the preprocessed interaction edge feature set at that time.

[0098] In one possible implementation, the sparse processing subunit can be specifically used for: 1. For any side feature in the intermediate feature set, aggregate the feature values ​​of each dimension of the side feature to obtain the scalar strength of the side feature; 2. Sort the edge features in the intermediate feature set in ascending order of scalar strength to form a feature sequence; 3. Set all feature values ​​of each dimension of the edge features in the feature sequence of the first preset proportion to zero, and add them to the preprocessed interaction edge feature set at this time. 4. Add the edge features of the remaining proportion in the feature sequence to the preprocessed interaction edge feature set at this time; where the sum of the preset proportion and the remaining proportion is 1.

[0099] In one possible implementation, the first feature extraction module 22 may include: The neighborhood information aggregation unit is used to aggregate neighborhood information of node features based on the enhanced adjacency matrix and a graph convolutional network to obtain the spatial interaction features of each vehicle.

[0100] In one possible implementation, the second feature extraction module 23 may include: The temporal dependency extraction unit is used to extract the temporal dependency of driving behavior based on the spatial interaction characteristics of each vehicle and the Transformer model to obtain the temporal dependency characteristics of each vehicle. In the Transformer model, a mask matrix is ​​added to the multi-head self-attention of the decoder.

[0101] In one possible implementation, the above-described apparatus may further include: The parameter optimization module is used to calculate the loss function based on the predicted trajectory of each vehicle and optimize the model parameters through backpropagation. Loss functions can include:

[0102]

[0103]

[0104] in, For loss function, For existence mask, The total number of vehicles. The observation period; Based on the loss function, For a moment The weight of the position, For hyperparameters; For error masking, For vehicles At any moment True coordinates With predicted coordinates The Euclidean distance between them This is a preset threshold.

[0105] In one possible implementation, the trajectory prediction module 24 may include: The mapping unit is used to map the time-dependent features of each vehicle into two-dimensional trajectory coordinate features using a linear mapping layer; The inverse normalization unit is used to inverse normalize the two-dimensional trajectory coordinate features to obtain the predicted trajectory of each vehicle.

[0106] Figure 3 This is a schematic diagram of the electronic device 3 provided in an embodiment of the present invention. Figure 3 As shown, the electronic device 3 of this embodiment includes a processor 30 and a memory 31. The memory 31 stores a computer program 32. When the processor 30 executes the computer program 32, it implements the steps in the various method embodiments described above. Alternatively, when the processor 30 executes the computer program 32, it implements the functions of each module / unit in the various device embodiments described above.

[0107] For example, computer program 32 may be divided into one or more modules / units, which are stored in memory 31 and executed by processor 30 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 32 in electronic device 3.

[0108] Electronic device 3 may include, but is not limited to, processor 30 and memory 31. Those skilled in the art will understand that... Figure 3 This is merely an example of electronic device 3 and does not constitute a limitation on electronic device 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 3 may also include input / output devices, network access devices, buses, etc.

[0109] The processor 30 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0110] The memory 31 can be an internal storage unit of the electronic device 3, such as a hard disk or memory of the electronic device 3. The memory 31 can also be an external storage device of the electronic device 3, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 3. Furthermore, the memory 31 can include both internal and external storage units of the electronic device 3. The memory 31 is used to store the computer program 32 and other programs and data required by the electronic device 3. The memory 31 can also be used to temporarily store data that has been output or will be output.

[0111] For the sake of simplicity and clarity, only the above-described functional modules / units are used as examples. In practical applications, the functions described above can be assigned to different functional modules / units as needed. These modules / units can be implemented in hardware, software, or a combination of both.

[0112] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the methods described in the above-described method embodiments.

[0113] This invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the methods described in the above-described method embodiments.

[0114] Computer programs include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0115] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.

[0116] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A vehicle trajectory prediction method, characterized in that, include: Obtain the historical trajectories of each vehicle within the target area, and construct an enhanced adjacency matrix based on the historical trajectories of each vehicle; Based on the enhanced adjacency matrix, the spatial interaction features of each vehicle are extracted; Based on the spatial interaction characteristics of each vehicle, the temporal dependence characteristics of each vehicle are determined. Based on the time-dependent characteristics of each vehicle, the predicted trajectory of each vehicle is obtained.

2. The vehicle trajectory prediction method according to claim 1, characterized in that, The construction of the enhanced adjacency matrix based on the historical trajectories of each vehicle includes: Based on the historical trajectories of each vehicle, a vehicle spatial interaction graph is constructed for each time moment; wherein, each vertex of the vehicle spatial interaction graph represents the vehicle state of each vehicle at the corresponding time moment, and the edge feature of the vehicle spatial interaction graph is the difference between the vehicle states of two adjacent vertices at the corresponding time moment; the vehicle state includes: position, speed, acceleration, and heading angle. For any given time, the edge features of the vehicle space interaction graph at that time form the interaction edge feature set for that time; the interaction edge feature set at that time is preprocessed to obtain the preprocessed interaction edge feature set for that time. Based on the enhanced adjacency mechanism, the enhanced adjacency matrix is ​​obtained according to the preprocessed interaction edge feature set at each time step.

3. The vehicle trajectory prediction method according to claim 2, characterized in that, The preprocessing of the interaction edge feature set at that moment to obtain the preprocessed interaction edge feature set at that moment includes: The interaction edge feature set at that moment is zero-padded with edge features to obtain an intermediate feature set, such that the number of edge features in the intermediate feature set is a preset number; The intermediate feature set is sparsified to obtain the preprocessed interaction edge feature set at that time.

4. The vehicle trajectory prediction method according to claim 3, characterized in that, The process of sparsifying the intermediate feature set to obtain the preprocessed interaction edge feature set at that time includes: For any side feature in the intermediate feature set, the feature values ​​of each dimension of the side feature are aggregated and calculated to obtain the scalar strength of the side feature. The edge features in the intermediate feature set are sorted in ascending order of scalar strength to form a feature sequence; Set all feature values ​​of each dimension of the edge features in the feature sequence of the first preset proportion to zero, and add them to the preprocessed interaction edge feature set at that time. The edge features of the remaining proportion in the feature sequence are added to the preprocessed interaction edge feature set at the time point; wherein the sum of the preset proportion and the remaining proportion is 1.

5. The vehicle trajectory prediction method according to any one of claims 1 to 4, characterized in that, The step of extracting spatial interaction features of each vehicle based on the enhanced adjacency matrix includes: Based on the enhanced adjacency matrix, a graph convolutional network is used to aggregate neighborhood information of node features to obtain the spatial interaction features of each vehicle.

6. The vehicle trajectory prediction method according to any one of claims 1 to 4, characterized in that, The step of determining the temporal dependence characteristics of each vehicle based on the spatial interaction characteristics of each vehicle includes: Based on the spatial interaction characteristics of each vehicle, the Transformer model is used to extract the temporal dependency of driving behavior, and the temporal dependency characteristics of each vehicle are obtained. In this process, a mask matrix is ​​added to the multi-head self-attention of the decoder in the Transformer model.

7. The vehicle trajectory prediction method according to claim 6, characterized in that, After obtaining the predicted trajectory of each vehicle based on its time-dependent characteristics, the method further includes: The loss function is calculated based on the predicted trajectory of each vehicle, and the model parameters are optimized by backpropagation. The loss function includes: in, Let the loss function be... For existence mask, The total number of vehicles. The observation period; Based on the loss function, For a moment The weight of the position, For hyperparameters; For error masking, For vehicles At any moment True coordinates With predicted coordinates The Euclidean distance between them This is a preset threshold.

8. The vehicle trajectory prediction method according to any one of claims 1 to 4, characterized in that, The step of obtaining the predicted trajectory of each vehicle based on the time-dependent characteristics of each vehicle includes: A linear mapping layer is used to map the time-dependent features of each vehicle into two-dimensional trajectory coordinate features; The two-dimensional trajectory coordinate features are inversely normalized to obtain the predicted trajectories of each vehicle.

9. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the vehicle trajectory prediction method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the vehicle trajectory prediction method as described in any one of claims 1 to 8.