A trajectory prediction method and device based on a diffusion attention model

By combining a diffusion attention model with a graph neural network and an initial leap diffusion model, the endpoint location of the trajectory is directly predicted, which solves the problem of insufficient trajectory prediction accuracy in existing technologies and achieves higher prediction accuracy and robustness, making it suitable for applications such as traffic route planning and autonomous driving.

CN119313703BActive Publication Date: 2025-11-07ZHEJIANG UNIV +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411307041.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-11-07
Estimated Expiration
2044-09-19

AI Technical Summary

Technical Problem

Existing trajectory prediction methods struggle to effectively capture the complex spatiotemporal relationships within trajectory data, resulting in low prediction accuracy, especially when the data space is sparse and the prediction time is long.

Method used

A diffusion attention model-based approach is adopted, which combines graph neural networks, attention models, and an initial leap diffusion model. By constructing multiple training models, potential features in historical trajectories are extracted and the endpoint position is directly predicted, thereby reducing error accumulation.

Benefits of technology

It improves the accuracy and robustness of trajectory prediction, better handles long-term dependencies and global contextual information, and solves the problem of low accuracy in existing technologies. It is applicable to fields such as traffic route planning, behavior pattern analysis and autonomous driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313703B_ABST
    Figure CN119313703B_ABST
Patent Text Reader

Abstract

The application can better process long-term dependence and global context information in trajectory data by using a graph neural network, an attention model and an initial diffusion model, thereby improving the accuracy and robustness of trajectory prediction and solving the problem of low precision of the prior art in data sparse space and long-time prediction. Based on the technical means of deep learning, potential features in the historical trajectory are extracted by using neural network models such as a diffusion model and a graph neural network, so that the possible future trajectories of the same person can be predicted, which can play an important role in related downstream tasks such as traffic path planning, behavior pattern analysis, logistics planning and automatic driving, and has great value.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of trajectory prediction, and particularly relates to a trajectory prediction method and device based on a diffusion attention model. BACKGROUND

[0002] In the field of machine learning and deep learning, trajectory prediction refers to predicting the possible future movement path or destination location based on past movement trajectory data. This is of great significance in fields such as autonomous driving, intelligent traffic management, and logistics planning. Traditional trajectory prediction methods are mainly based on statistical or rule-based models, but these methods often struggle to capture the complex spatio-temporal relationships in trajectory data, resulting in low prediction accuracy.

[0003] In recent years, with the development of deep learning technology, neural network-based trajectory prediction methods have gradually become a research hotspot. Among them, the attention mechanism is widely used to improve the model's processing ability for sequence data. Through the attention mechanism, the model can learn the dependency between different time steps, thus better understanding the spatio-temporal features in trajectory data.

[0004] The invention patent application with publication number CN117635658A discloses a multi-target tracking trajectory association method based on a graph neural network model, which constructs a dataset for training a graph neural network model composed of four types of trajectory types. This dataset enables the network to learn various condition patterns when targets move, so that it can still be associated when the trajectory is obscured or missed. The use of a graph neural network model can fully aggregate the target information of multiple frames before and after, expressing the potential association between targets and targets. When there is an identity switching problem with existing trajectories, the network can find the location of the truncation and indicate whether the two trajectories need to be spliced together. This invention uses the same graph neural network to process trajectory truncation and trajectory splicing, reducing the number of times the trajectory association model is trained and eliminating the need to input fixed trajectory lengths to the graph neural network. However, the prediction accuracy of the method disclosed in this patent needs to be further improved.

[0005] Diffusion models are commonly used models in the field of machine learning, which can predict future states by simulating the diffusion process of information in space and time. Diffusion models perform well in capturing spatio-temporal correlations, but have certain challenges in handling long-term dependencies and global contextual information.

[0006] The patent application with the publication number CN117237475A discloses a vehicle traffic trajectory generation method and device based on a diffusion generation model, which relates to the technical fields of traffic scene generation and autonomous driving. The method includes: for any brand-new trajectory-free map scene to be generated, obtaining pure noise according to the number of trajectories to be generated and the time span required by the trajectories, and taking the pure noise as an initial center position and an initial speed; inputting the initial center position and the initial speed into a trained noise prediction network; obtaining predicted center position noise and relative position noise according to the initial center position, the initial speed and the noise prediction network, and then obtaining the vehicle traffic trajectory of the map scene. The application can generate longer and more complete driving trajectories close to the real distribution in different scenes, enrich the existing data set, provide data support for the training of the autonomous driving trajectory prediction model and the evaluation of the large-scale autonomous driving system, and improve the reliability and accuracy of the autonomous driving decision algorithm. However, the trajectory prediction accuracy of the method disclosed in the patent still needs to be improved. SUMMARY

[0007] The application provides a trajectory prediction method based on a diffusion attention model, which can accurately predict trajectories.

[0008] The application provides a trajectory prediction method based on a diffusion attention model, which includes:

[0009] A first training model is constructed, the first training model includes an initial leap diffusion model, a graph neural network model and an attention model, the initial leap diffusion model includes a pre-trained diffusion denoising module and a trajectory initializer, the pre-trained diffusion denoising module is obtained by pre-training historical trajectory data, the historical trajectory data and the current trajectory data are input into the graph neural network model and the attention model to obtain current trajectory features and global features, the current trajectory data is input into the initial leap diffusion model to obtain an initial predicted current trajectory, the initial predicted current trajectory, the current trajectory features and the global features are fused to obtain recovered trajectory data, the first training model is trained based on the loss of the recovered trajectory data and real trajectory data to obtain a recovery model, and the current trajectory data is input into the recovery model to obtain final recovered trajectory data;

[0010] A second training model is constructed, the second training model includes a gated recurrent unit and a linear layer, the final recovered trajectory data, the historical trajectory data and the current trajectory data are input into the gated recurrent unit, the features output by the gated recurrent unit are mapped to the prediction space of the terminal position through the linear layer to obtain the predicted coordinate data of the terminal position, the second training model is trained based on the loss of the predicted coordinate data of the terminal position and real coordinate data to obtain a terminal prediction model, and the final recovered trajectory data, the historical trajectory data and the current trajectory data are input into the terminal prediction model to obtain trajectory data with a terminal;

[0011] constructing a third training model, the third training model comprising a first leap diffusion model sharing parameters with the trained initial leap diffusion model, inputting the historical trajectory data, the current trajectory data and the trajectory data with endpoints into the first leap diffusion model to obtain a predicted trajectory, training the third training model based on a loss of the predicted trajectory and the real trajectory data to obtain a trajectory prediction model;

[0012] In application, the sparse current trajectory is sequentially input into the recovery model, the endpoint prediction model and the trajectory prediction model to obtain the final predicted trajectory data.

[0013] Preferably, the historical trajectory data and the current trajectory data are input into the graph neural network model and the attention model to obtain the current trajectory feature and the global feature, comprising:

[0014] The historical trajectory data and the current trajectory data are input into the graph neural network model, the feature information of the historical trajectory data and the current trajectory data is extracted through the graph neural network and the time sequence embedding to obtain the trajectory features at different time points, and the global feature is extracted from the trajectory features at different time points through the mixed attention mechanism and the linear layer of the attention model.

[0015] Preferably, the current trajectory data is input into the initial leap diffusion model to obtain an initial predicted current trajectory, comprising:

[0016] The current trajectory data is input into the trajectory initializer to obtain the variance, the mean and the sample distribution information of the current trajectory data, the initialized trajectory data is constructed using the variance, the mean and the sample distribution information of the current trajectory data, and the initialized trajectory data is input into the pre-trained diffusion denoising module for denoising to obtain the predicted trajectory.

[0017] Preferably, the trajectory initializer comprises three groups of parallel encoders, each group of encoders comprising a spatial encoder and a time encoder, and the current trajectory data is input into the three groups of parallel encoders respectively to obtain the variance, the mean and the sample distribution information of the current trajectory data.

[0018] Preferably, the first group of encoders comprises a first spatial encoder and a first time encoder, the first spatial encoder is composed of a first gated recurrent unit and a first linear fully connected network, the first time encoder is composed of a second gated recurrent unit and a second linear fully connected network, and the output of the first spatial encoder and the output of the first time encoder are added to obtain the variance of the current trajectory data.

[0019] The second group of encoders comprises a second spatial encoder and a second temporal encoder, the second spatial encoder is composed of a third gated recurrent unit and a third linear fully connected network, the second temporal encoder is composed of a fourth gated recurrent unit and a fourth linear fully connected network, and the output of the second spatial encoder and the output of the second temporal encoder are added to obtain the mean value of the current trajectory data;

[0020] The third group of encoders comprises a third spatial encoder and a third temporal encoder, the third spatial encoder is composed of a fifth gated recurrent unit and a fifth linear fully connected network, the third temporal encoder is composed of a sixth gated recurrent unit and a sixth linear fully connected network, and the output of the third spatial encoder and the output of the third temporal encoder are added to obtain the sample distribution information of the current trajectory data.

[0021] Preferably, the predicted coordinate data of the end point is obtained by mapping the features output by the gated recurrent unit to the prediction space of the end point position through a linear layer, wherein the linear layer is a full neural network with dropout.

[0022] Preferably, the diffusion denoising module is pre-trained using historical trajectory data, which comprises a noise adding process and a denoising process.

[0023] The noise adding process is to add Gaussian noise to the historical trajectory data multiple times for disturbance.

[0024] The denoising process is to denoise the noise-added historical trajectory data through a neural network, and the pre-trained diffusion denoising module is obtained by training the neural network based on the loss of the predicted trajectory data obtained by denoising and the real historical trajectory data.

[0025] In another aspect, the application also provides a trajectory prediction device based on a diffusion attention model, comprising a memory and one or more processors, the memory stores executable code, and the one or more processors execute the executable code to implement the trajectory prediction method based on the diffusion attention model.

[0026] Compared with the prior art, the application has the following advantages:

[0027] The application utilizes a graph neural network, an attention model and an initial leap diffusion model, can better handle long-term dependencies and global context information in trajectory data, thereby improving the accuracy and robustness of trajectory prediction, and solving the problem of low precision of the prior art in data sparse space and long-term prediction. Based on the technical means of deep learning, the application extracts potential features in historical trajectories by using diffusion models, graph neural networks and other neural network models, thereby predicting possible future trajectories, and can play an important role in related downstream tasks such as traffic path planning, behavior pattern analysis, logistics planning and autonomous driving, and has great value.

[0028] This invention employs a scheme that directly predicts the endpoint in advance, avoiding the problem of error accumulation that occurs during stepwise prediction. This means that the model directly outputs the position of the endpoint, rather than predicting the position step by step, thereby reducing the possibility of error propagation and more effectively capturing the features and patterns of the entire sequence. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 A flowchart illustrating a trajectory prediction method based on a diffusion attention model, provided as a specific embodiment of the present invention;

[0031] Figure 2 The flowchart illustrates a trajectory prediction method based on a diffusion attention model, as provided in a specific embodiment of the present invention. Detailed Implementation

[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0033] This invention provides a trajectory prediction method based on a diffusion attention model. The method includes three stages: trajectory recovery, endpoint prediction, and trajectory prediction. The specific process is as follows: Figure 1 and Figure 2 As shown, it includes:

[0034] Step (1): Trajectory recovery stage, train the first training model to obtain the recovery model, and obtain the final recovered trajectory data through the recovery model:

[0035] The first training model includes an initial diffusion model, a graph neural network model and an attention model, the initial diffusion model includes a pre-trained diffusion denoising module and a trajectory initializer 1, the pre-trained diffusion denoising module is obtained by training the diffusion denoising module by using historical trajectory data, that is, the diffusion denoising module 1, the historical trajectory data and the current trajectory data are used as inputs, the graph neural network of the graph neural network model and the time sequence embedding, and the hybrid attention of the attention model are used to obtain the current trajectory feature and the global feature respectively.

[0036] Meanwhile, the initial prediction current trajectory is obtained by inputting the current trajectory data into the initial diffusion model, the initial prediction current trajectory, the current trajectory feature and the global feature are fused to obtain the recovered trajectory data, and the first training model is trained based on the loss of the recovered trajectory data and the real trajectory data to obtain a recovery model, and the final recovered trajectory data is obtained by inputting the current trajectory data into the recovery model.

[0037] In a specific embodiment, the pre-trained diffusion denoising module is obtained by training the diffusion denoising module by using historical trajectory data, including:

[0038] Input data, the historical trajectory data is read by using the diffusion model.

[0039] The noise adding process adds random Gaussian noise of appropriate size to the original trajectory data for disturbance, simulates the uncertainty in the real world, and increases the robustness and generalization ability of the model.

[0040] The denoising process is used to process the trajectory data after adding noise to reduce the influence of noise, the denoising process uses a neural network, the network is trained to learn how to remove Gaussian noise in the trajectory, learns the distribution information of the trajectory data, and makes the model learn effective patterns, so that the network can accurately capture the features and patterns of the trajectory, thereby obtaining the diffusion denoising module 1.

[0041] The diffusion model (Diffusion Models) is a kind of generative model based on deep learning technology, which is usually used to model complex data distribution. The essence of the diffusion model is to make the network learn the latent data distribution of the trajectory data, and the training and inference of the diffusion model includes forward diffusion process, backward denoising process, calculation of loss function and other processes.

[0042] In a specific embodiment, the initial prediction current trajectory is obtained by inputting the current trajectory data into the initial diffusion model, including:

[0043] The current trajectory data is input into the trajectory initializer to obtain variance, mean and sample distribution information of the current trajectory data, the variance, mean and sample distribution information of the current trajectory data are used to construct initialized trajectory data, and the initialized trajectory data is input into the pre-trained diffusion denoising module for denoising to obtain predicted trajectory.

[0044] In a specific embodiment, the trajectory initializer 1 provided in the application includes three groups of parallel encoders, each group of encoders including a spatial encoder and a temporal encoder, and the current trajectory data is input into the three groups of parallel encoders to obtain variance, mean and sample distribution information of the current trajectory data, respectively.

[0045] The first group of encoders includes a first spatial encoder and a first temporal encoder, the first spatial encoder is composed of a first gated recurrent unit and a first linear fully connected network, the first temporal encoder is composed of a second gated recurrent unit and a second linear fully connected network, and the output of the first spatial encoder and the output of the first temporal encoder are added to obtain the variance of the current trajectory data; the feature information of the trajectory data is extracted by using the gated recurrent unit, and then the linear fully connected network is used to perform a regression task to predict and estimate the variance of the trajectory data.

[0046] The second group of encoders provided in the application includes a second spatial encoder and a second temporal encoder, the second spatial encoder is composed of a third gated recurrent unit and a third linear fully connected network, the second temporal encoder is composed of a fourth gated recurrent unit and a fourth linear fully connected network, and the output of the second spatial encoder and the output of the second temporal encoder are added to obtain the mean of the current trajectory data; the feature information of the trajectory data is extracted by using the gated recurrent unit, and then the linear fully connected network is used to perform a regression task to predict and estimate the mean of the trajectory data.

[0047] The third group of encoders provided in the application includes a third spatial encoder and a third temporal encoder, the third spatial encoder is composed of a fifth gated recurrent unit and a fifth linear fully connected network, the third temporal encoder is composed of a sixth gated recurrent unit and a sixth linear fully connected network, and the output of the third spatial encoder and the output of the third temporal encoder are added to obtain the sample distribution information of the current trajectory data. The feature information of the trajectory data is extracted by using the gated recurrent unit, and then the linear fully connected network is used to perform a regression task to predict and estimate the sample distribution information of the trajectory data.

[0048] The first, second, third, fourth, and fifth gated recurrent unit provided in the present application is a variant of a recurrent neural network (RNN) designed to solve the long-term dependency problem. The internal structure of the gated recurrent unit includes a reset gate, an update gate, a candidate hidden state, a current hidden state, and the like. The design of the gated recurrent unit enables it to effectively capture and utilize long-term dependencies in sequences without adding too many parameters. Compared with traditional recurrent neural networks, the gated recurrent unit has stronger modeling capability and less computational complexity.

[0049] In a specific embodiment, the present application inputs historical trajectory data and current trajectory data into a graph neural network model and an attention model to obtain current trajectory features and global features, including:

[0050] The first branch inputs the historical trajectory and the current trajectory into the graph neural network model and performs time series embedding to extract feature information in the trajectory data. The feature information is input into a hybrid attention layer, and finally a linear layer is used for regression to obtain global features, i.e., the recovered trajectory one.

[0051] The second branch inputs the current trajectory data into the trajectory initializer 1 to perform a trajectory recovery task to obtain an initialized trajectory, and then passes through the diffusion denoising module 1 to obtain a denoised trajectory two.

[0052] The trajectory one, the trajectory two, and the current trajectory features are integrated to obtain the final recovered trajectory.

[0053] Step (2): End point prediction stage, training a second training model to obtain an end point prediction model, inputting the final recovered trajectory data, historical trajectory data, and current trajectory data into the end point prediction model to obtain trajectory data with an end point:

[0054] The present application constructs a second training model, which includes a spatio-temporal encoder, which is a gated recurrent unit (GRU), and an end point detector, which is a linear layer. The present application inputs the final recovered trajectory data, the historical trajectory data, and the current trajectory data into the gated recurrent unit for feature extraction, thereby capturing the time dependency and sequence patterns in the data. The gated recurrent unit controls the flow of information through the update gate and the reset gate, which helps the model better understand the long-term dependencies in the sequence data and alleviates the gradient vanishing problem.

[0055] Then, the feature output by the gated recurrent unit is mapped to the prediction space of the end point position through a linear layer to obtain the predicted coordinate data of the end point, the prediction space being a two-dimensional space for predicting the x and y coordinates of the end point, and a second training model is trained based on the loss of the predicted coordinate data and the real coordinate data of the end point to obtain an end point prediction model, and the trajectory data after final recovery, the historical trajectory data and the current trajectory data are input into the end point prediction model to obtain the trajectory data with the end point.

[0056] In a specific embodiment, the linear layer is implemented using a fully connected neural network with dropout; the output of the gated recurrent unit is mapped to the prediction space of the end point position by connecting a linear layer. The linear layer is a fully connected neural network with dropout, and the dropout technique can randomly discard a portion of neurons during training, which helps to prevent overfitting and improve the generalization ability of the model.

[0057] The scheme of directly predicting the end point in advance avoids the problem of error accumulation when predicting step by step. This means that the model directly outputs the position of the end point, rather than predicting the position of each step, thereby reducing the possibility of error propagation and enabling more effective capture of features and patterns in the entire sequence.

[0058] In a specific embodiment, the final recovered trajectory data, the historical trajectory data and the current trajectory data are input into the gated recurrent unit for feature extraction, including:

[0059] Data input: The final recovered trajectory data, the historical trajectory data and the current trajectory data are input into the GRU model as time series data. These data may contain position coordinates (such as latitude and longitude), speed, acceleration and other information.

[0060] Initialization of hidden state: Before processing the sequence data, the GRU needs to initialize its hidden state. The hidden state is used to store information during sequence processing and serves as one of the inputs for the next time step.

[0061] Time step processing:

[0062] For each time step in the input sequence, the GRU performs the following operations:

[0063] Receive input: Receive the trajectory data of the current time step (which may include the final recovered, historical and current data points) and the hidden state of the previous time step.

[0064] Update gate calculation: Calculate the value of the update gate through a fully connected layer (using a sigmoid activation function). The update gate determines the mixing ratio of new information (input of the current time step) and old information (hidden state of the previous time step).

[0065] Reset gate computation: The value of the reset gate is computed by a fully connected layer (with sigmoid activation function) as well. The reset gate decides how much of the hidden state from the previous time step needs to be ignored in order to better incorporate the input from the current time step.

[0066] Candidate hidden state computation: The candidate hidden state is computed by another fully connected layer (with tanh activation function) using the input from the current time step and the previous time step hidden state adjusted by the reset gate.

[0067] Hidden state update: The hidden state for the current time step is computed based on the value of the update gate, the candidate hidden state, and the hidden state from the previous time step.

[0068] Feature extraction: After processing the entire input sequence, the sequence of hidden states from the GRU can be considered as the feature representation of the trajectory data. These features capture key information such as the shape of the trajectory, changes in velocity, acceleration patterns, etc., which are crucial for subsequent trajectory prediction.

[0069] Step (3): Trajectory prediction phase, training the third training module to obtain a trajectory prediction model:

[0070] A third training model is constructed, the third training model includes a first leap diffusion model shared with the parameters of the trained initial leap diffusion model, the historical trajectory data, the current trajectory data and the trajectory data with the terminal are input into the first leap diffusion model to obtain the predicted trajectory, and the third training model is trained based on the loss of the predicted trajectory and the real trajectory data to obtain a trajectory prediction model.

[0071] Among them, the first leap diffusion model provided by the application includes a trajectory initializer 2 and a diffusion denoising module 2, the trajectory initializer 1 shares parameters with the trajectory initializer 2, and the diffusion denoising module 1 and the diffusion denoising module 2 share parameters.

[0072] Among them, the application uses the Adam optimizer to train the above three stage models in turn in stages.

[0073] The Adam optimizer used in the present application adopts the Adam optimization algorithm, which is a gradient descent optimization algorithm that can be used to train deep neural networks. It combines the features of momentum optimization and adaptive learning rate adjustment, can automatically adjust the learning rate during training, and has good convergence performance. The core idea of the Adam optimizer is to maintain two momentum estimates: the first moment estimate (mean) and the second moment estimate (variance) of the gradient. Specifically, it calculates the first moment estimate (i.e., the mean of the gradient) and the second moment estimate (i.e., the mean of the square of the gradient) of the gradient for each parameter. Then, by adaptively applying the learning rate to the update of each parameter, parameters with large gradients have smaller update steps than parameters with small gradients. The update rule of the Adam optimizer includes a momentum term and an adaptive learning rate term. The momentum term is similar to the momentum in the momentum optimization algorithm, which helps to accelerate convergence and escape local optima; the adaptive learning rate term adjusts the learning rate of each parameter according to the first moment estimate and the second moment estimate of the parameter, making the training process more stable and having better convergence. The Adam optimizer combines the advantages of momentum optimization and adaptive learning rate adjustment, and can achieve good results in deep learning tasks.

[0074] Step (4): In application, the sparse current trajectory is input into the recovery model, the endpoint prediction model and the trajectory prediction model in turn to obtain the final predicted trajectory data.

[0075] The present application based on the diffusion attention model can better handle the long-term dependencies and global context information in the trajectory data, thereby improving the accuracy and robustness of trajectory prediction, solving the problem of low precision of the prior art in sparse data space and long-term prediction. Based on the technical means of deep learning, the present application uses neural network models such as diffusion models and graph neural networks to extract potential features in historical trajectories, thereby predicting possible future trajectories, and can play an important role in related downstream tasks such as traffic path planning, behavior pattern analysis, logistics planning and autonomous driving, and has great value.

[0076] The present application also provides a trajectory prediction device based on a diffusion attention model, comprising a memory and one or more processors, the memory storing executable code, and the one or more processors executing the executable code to implement the trajectory prediction method based on the diffusion attention model.

[0077] Table 1 Comparison with benchmark models on the 1 / 2 randomly sparse sampled NBA SportVU dataset

[0078]

[0079] Table 2 Ablation experiments on the 1 / 2 randomly sparse sampled NBA SportVU dataset.

[0080]

[0081] Table 1 Comparison with the baseline model on the 1 / 2 randomly sparse sampled NBA SportVU dataset. Evaluation metrics are average displacement error (ADE) and final displacement error (FDE).

[0082] Table 2 Ablation experiments on the 1 / 2 randomly sparse sampled NBA SportVU dataset. Evaluation metrics are ADE and FDE (ADE / FDE). In the table, Cross denotes cross-attention, Hybrid denotes hybrid attention, Diff denotes diffusion model branch. SharePara denotes diffusion model shared parameters between trajectory prediction stage and trajectory recovery stage. It can be seen from Table 1 and Table 2 that the method provided by the present application has good prediction effect.

Claims

1. A trajectory prediction method based on a diffusion attention model, characterized in that, The application relates to a trajectory prediction method and device. The first training model is constructed, the first training model comprises an initial leap diffusion model, a graph neural network model and an attention model, the initial leap diffusion model comprises a pre-trained diffusion denoising module and a trajectory initializer, the pre-trained diffusion denoising module is obtained by pre-training historical trajectory data, the historical trajectory data and current trajectory data are input into the graph neural network model and the attention model to obtain current trajectory features and global features, the current trajectory data is input into the initial leap diffusion model to obtain an initial predicted current trajectory, the initial predicted current trajectory, the current trajectory features and the global features are fused to obtain recovered trajectory data, the first training model is trained based on the loss of the recovered trajectory data and real trajectory data to obtain a recovery model, and the current trajectory data is input into the recovery model to obtain final recovered trajectory data; The second training model is constructed, the second training model comprises a gated recurrent unit and a linear layer, the final recovered trajectory data, the historical trajectory data and the current trajectory data are input into the gated recurrent unit, the features output by the gated recurrent unit are mapped to a prediction space of a terminal position through the linear layer to obtain predicted coordinate data of the terminal, the second training model is trained based on the loss of the predicted coordinate data of the terminal and real coordinate data to obtain a terminal prediction model, and the final recovered trajectory data, the historical trajectory data and the current trajectory data are input into the terminal prediction model to obtain trajectory data with a terminal; The third training model is constructed, the third training model comprises a first leap diffusion model sharing parameters with the initial leap diffusion model, the historical trajectory data, the current trajectory data and the trajectory data with the terminal are input into the first leap diffusion model to obtain a predicted trajectory, and the third training model is trained based on the loss of the predicted trajectory and real trajectory data to obtain a trajectory prediction model. In application, sparse current trajectory data is sequentially input into the recovery model, the terminal prediction model and the trajectory prediction model to obtain final predicted trajectory data.

2. The trajectory prediction method based on the diffusion attention model according to claim 1, characterized in that, The historical trajectory data and the current trajectory data are input into the graph neural network model and the attention model to obtain current trajectory features and global features, which comprises the following steps: The historical trajectory data and the current trajectory data are input into the graph neural network model, feature information of the historical trajectory data and the current trajectory data is extracted through a graph neural network and a time sequence embedding to obtain trajectory features at different time points, and global features are extracted from the trajectory features at different time points through a hybrid attention mechanism of the attention model and a linear layer. 3.The trajectory prediction method based on the diffusion attention model according to claim 1, wherein, The current trajectory data is input into the initial leap diffusion model to obtain an initial predicted current trajectory, which comprises the following steps: The current trajectory data is input into the trajectory initializer to obtain variance, mean and sample distribution information of the current trajectory data, the variance, the mean and the sample distribution information of the current trajectory data are used to construct initialized trajectory data, and the initialized trajectory data is input into the pre-trained diffusion denoising module for denoising to obtain a predicted trajectory.

4. The trajectory prediction method based on the diffusion attention model according to claim 3, characterized in that, The trajectory initializer includes three groups of parallel encoders, each group of encoders including a spatial encoder and a temporal encoder, and the current trajectory data is input into the three groups of parallel encoders respectively to obtain variance, mean and sample distribution information of the current trajectory data.

5. The diffusion attention model based trajectory prediction method according to claim 4, characterized in that, The first group of encoders includes a first spatial encoder and a first temporal encoder, the first spatial encoder being composed of a first gated recurrent unit and a first linear fully connected network, the first temporal encoder being composed of a second gated recurrent unit and a second linear fully connected network, and the output of the first spatial encoder and the output of the first temporal encoder being added to obtain the variance of the current trajectory data; The second group of encoders includes a second spatial encoder and a second temporal encoder, the second spatial encoder being composed of a third gated recurrent unit and a third linear fully connected network, the second temporal encoder being composed of a fourth gated recurrent unit and a fourth linear fully connected network, and the output of the second spatial encoder and the output of the second temporal encoder being added to obtain the mean of the current trajectory data; The third group of encoders includes a third spatial encoder and a third temporal encoder, the third spatial encoder being composed of a fifth gated recurrent unit and a fifth linear fully connected network, the third temporal encoder being composed of a sixth gated recurrent unit and a sixth linear fully connected network, and the output of the third spatial encoder and the output of the third temporal encoder being added to obtain the sample distribution information of the current trajectory data.

6. The diffusion attention model based trajectory prediction method of claim 1, wherein, The features output by the gated recurrent unit are mapped to the prediction space of the end point position through a linear layer to obtain the predicted coordinate data of the end point, wherein the linear layer is a full neural network with dropout.

7. The diffusion attention model based trajectory prediction method of claim 1, wherein, The historical trajectory data is pre-trained to obtain a diffusion denoising module, and the diffusion denoising module includes a noise adding process and a denoising process. The noise adding process is to add Gaussian noise to the historical trajectory data multiple times for disturbance. The denoising process is to denoise the historical trajectory data with noise through a neural network, and the neural network is trained based on the loss of the predicted trajectory data obtained by denoising and the real historical trajectory data to obtain the pre-trained diffusion denoising module.

8. A trajectory prediction apparatus based on a diffusion attention model, characterized by, The memory stores executable code, and the one or more processors execute the executable code to implement the trajectory prediction method based on the diffusion attention model in any one of claims 1-7.

Citation Information

Patent Citations

  • Vehicle traffic track generation method and device based on diffusion generation model

    CN117237475A

  • Multi-target tracking trajectory association method based on graph neural network

    CN117635658A

  • Pedestrian trajectory prediction method based on topological graph structure and deep self-attention network

    CN115082896A

  • Vehicle trajectory prediction method and system based on decoupling graph diffusion neural network

    CN118569307A