Trajectory prediction method and device based on distraction attention model

By combining diffusion attention model, graph neural network and initial leap-through diffusion model, the trajectory end point position is directly predicted, which solves the problem of low trajectory prediction accuracy in the existing technology, and achieves higher trajectory prediction accuracy and robustness , suitable for multiple downstream tasks.

CN119313703AActive Publication Date: 2025-01-14ZHEJIANG UNIV +1
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art is difficult to effectively capture the complex spatio-temporal relationships and long-term dependencies in trajectory data in trajectory prediction, resulting in low prediction accuracy, especially when the data space is sparse and the accuracy is insufficient when the data space is predicted for a long time.

Method used

Using a trajectory prediction method based on diffusion attention model, combining the initial leap-through diffusion model, graph neural network and attention model, the trajectory features are extracted through the pre-trained diffusion denoising module and the trajectory initializer, fuse the global features, and directly predict the end point position. To reduce error accumulation, improve the accuracy and robustness of trajectory prediction.

Benefits of technology

It significantly improves the accuracy and robustness of trajectory prediction, can better handle long-term dependence and global context information in trajectory data, reduces error propagation, and is suitable for fields such as traffic path planning, behavioral pattern analysis and autonomous driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313703A_ABST
    Figure CN119313703A_ABST
Patent Text Reader

Abstract

According to the method, the graph neural network, the attention model and the initial leap-over diffusion model are utilized, long-term dependency and global context information in the trajectory data can be better processed, and therefore the accuracy and robustness of trajectory prediction are improved, and the problems that in the prior art, data space is sparse, and precision is not high during long-term prediction are solved. The method is based on the technical means of deep learning, utilizes neural network models such as a diffusion model and a graph neural network to extract potential features in historical trajectories, predicts possible follow-up trajectories in the future, can play an important role in related downstream tasks such as traffic path planning, behavior pattern analysis, logistics planning and automatic driving, and has a wide application prospect. The method has great value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of trajectory prediction, and in particular relates to a trajectory prediction method and device based on a diffuse attention model. Background Art

[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 regularized models, but these methods often have difficulty capturing the complex spatiotemporal relationships in trajectory data, resulting in low prediction accuracy.

[0003] In recent years, with the development of deep learning technology, trajectory prediction methods based on neural networks have gradually become a research hotspot. Among them, the attention mechanism is widely used to improve the model's ability to process sequence data. Through the attention mechanism, the model can learn the dependencies between different time steps, thereby better understanding the spatiotemporal characteristics 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, and constructs a data set composed of four trajectory types for training a graph neural network model. The data set enables the network to learn various situation patterns when the target moves, so that it can still be associated when the trajectory is blocked or missed. The use of a graph neural network model can fully aggregate the target information of multiple frames before and after, and express the potential association between targets. When an existing trajectory has an identity switching problem, the network can find the truncation position and an indication of whether the two trajectories need to be spliced ​​together. The present invention uses the same graph neural network to process trajectory truncation and trajectory splicing, which reduces the number of training times for the trajectory association model and removes the restriction of inputting a fixed trajectory length into the graph neural network. However, the prediction accuracy of the method disclosed in this patent needs to be further improved.

[0005] The diffusion model is a commonly used model in the field of machine learning that can predict future states by simulating the diffusion process of information in space and time. The diffusion model performs well in capturing spatiotemporal correlations, but has certain challenges in dealing with long-term dependencies and global context information.

[0006] The invention patent application with publication number CN117237475A discloses a vehicle traffic trajectory generation method and device based on a diffusion generation model, which involves the fields of traffic scene generation technology and autonomous driving technology. It includes: for any new trackless map scene where the trajectory is to be generated, pure noise is obtained according to the number of trajectories required to be generated in the map scene and the time span required for the trajectory, and the pure noise is used as the initial center position and initial speed; the initial center position and initial speed are input into the trained noise prediction network; according to the initial center position, initial speed and noise prediction network, the predicted center position noise and relative position noise are obtained, and then the vehicle traffic trajectory of the map scene is obtained. The present invention can generate longer and complete driving trajectories that are close to the real distribution in different scenes, enrich the existing data sets, provide data support for autonomous driving trajectory prediction model training and large-scale autonomous driving system evaluation, and improve the reliability and accuracy of autonomous driving decision algorithms. However, the trajectory prediction accuracy of the method disclosed in the patent still needs to be improved. Summary of the invention

[0007] The present invention provides a trajectory prediction method based on a diffuse attention model, which can accurately predict the trajectory.

[0008] The present invention provides a trajectory prediction method based on a diffuse attention model, comprising:

[0009] Constructing a first training model, the first training model includes an initial leap-forward diffusion model, a graph neural network model and an attention model, the initial leap-forward 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 the current trajectory features and the global features, the current trajectory data is input into the initial leap-forward diffusion model to obtain the initial predicted current trajectory, the initial predicted current trajectory, the current trajectory features and the global features are fused to obtain the restored trajectory data, the first training model is trained based on the loss of the restored trajectory data and the true trajectory data to obtain the restoration model, and the current trajectory data is input into the restoration model to obtain the final restored trajectory data;

[0010] Constructing a second training model, the second training model includes a gated recurrent unit and a linear layer, inputting the final restored trajectory data, the historical trajectory data, and the current trajectory data into the gated recurrent unit, mapping the features output by the gated recurrent unit to the prediction space of the endpoint position through the linear layer to obtain the predicted coordinate data of the endpoint, training the second training model based on the loss of the predicted coordinate data and the true coordinate data of the endpoint to obtain the endpoint prediction model, and inputting the final restored trajectory data, the historical trajectory data, and the current trajectory data into the endpoint prediction model to obtain the trajectory data with the endpoint;

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

[0012] When applied, 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 features and global features, including:

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

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

[0016] The current trajectory data is input into the trajectory initializer to obtain the 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 the initialized trajectory data. The initialized trajectory data is then input into the pre-trained diffusion denoising module for denoising to obtain the predicted trajectory.

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

[0018] Preferably, 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;

[0019] The second group of encoders 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 is added to the output of the second temporal encoder to obtain the mean value of the current trajectory data;

[0020] The third group of encoders 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 sample distribution information of the current trajectory data.

[0021] Preferably, 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 off-line.

[0022] Preferably, using historical trajectory data to pre-train the diffusion denoising module includes a denoising process and a denoising process;

[0023] The noise adding process is: adding Gaussian noise to the historical trajectory data multiple times to disturb it;

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

[0025] On the other hand, the present invention also provides a trajectory prediction device based on a diffuse attention model, comprising a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the trajectory prediction method based on the diffuse attention model.

[0026] Compared with the prior art, the present invention has the following beneficial effects:

[0027] The present invention utilizes graph neural networks, attention models, and initial leapfrog diffusion models to better process 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 accuracy in existing technologies when data space is sparse and long-term prediction is not accurate. The present invention is based on deep learning techniques, and utilizes diffusion models, graph neural networks, and other neural network models to extract potential features from historical trajectories, thereby predicting possible future peer trajectories. It 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] The present invention adopts a solution of directly predicting the end point in advance, avoiding the error accumulation problem caused by step-by-step prediction. This means that the model directly outputs the position of the end point instead of gradually predicting the position of each step, thereby reducing the possibility of error propagation and more effectively capturing the characteristics and patterns of the entire sequence. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0030] Figure 1 A flowchart of a trajectory prediction method based on a diffuse attention model provided in a specific embodiment of the present invention;

[0031] Figure 2 A flowchart of a trajectory prediction method based on a diffuse attention model is provided for a specific embodiment of the present invention. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] The specific embodiment of the present invention provides a trajectory prediction method based on a diffuse attention model, which includes three stages: trajectory recovery, endpoint prediction and trajectory prediction. The specific process is as follows: Figure 1 and Figure 2 As shown, including:

[0034] Step (1): In the trajectory recovery phase, the first training model is trained to obtain a recovery model, and the final recovered trajectory data is obtained through the recovery model:

[0035] A first training model is constructed, which includes an initial leap-forward diffusion model, a graph neural network model and an attention model. The initial leap-forward diffusion model includes a pre-trained diffusion denoising module and a trajectory initializer 1. The present application uses historical trajectory data to train the diffusion denoising module to obtain a pre-trained diffusion denoising module, namely, the diffusion denoising module 1. The historical trajectory data and the current trajectory data are used as input. The present application uses the graph neural network and time series embedding of the graph neural network model, and the mixed attention of the attention model to obtain the current trajectory features and global features respectively.

[0036] At the same time, the current trajectory data of the present application is input into the initial leap-forward diffusion model to obtain the initial predicted current trajectory, the initial predicted current trajectory, the current trajectory features and the global features are fused to obtain the restored trajectory data, the first training model is trained based on the loss of the restored trajectory data and the true trajectory data to obtain the restoration model, and the current trajectory data is input into the restoration model to obtain the final restored trajectory data.

[0037] In a specific embodiment, the present application uses historical trajectory data to train a diffusion denoising module to obtain a pre-trained diffusion denoising module, including:

[0038] Input data, use the diffusion model to read historical trajectory data.

[0039] In the noise adding process, random Gaussian noise of appropriate size is added to the original trajectory data multiple times to perturb it, simulating the uncertainty in the real world to increase the robustness and generalization ability of the model.

[0040] The denoising process processes the noisy trajectory data to reduce the impact of noise. The denoising process uses a neural network to train the network to learn how to remove Gaussian noise in the trajectory and learn the distribution information of the trajectory data, so that the model can learn effective patterns and the network can accurately capture the characteristics and patterns of the trajectory, thereby obtaining a diffusion denoising module 1.

[0041] Among them, the diffusion model is a generative model based on deep learning technology, which is usually used to model complex data distribution. The essence of the diffusion model is to let the network learn the potential data distribution of trajectory data. The training and reasoning of the diffusion model include forward diffusion process, reverse denoising process, and calculation of loss function.

[0042] In a specific embodiment, the current trajectory data is input into the initial leap-forward diffusion model to obtain the initial predicted current trajectory, including:

[0043] The current trajectory data is input into the trajectory initializer to obtain the 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 the initialized trajectory data. The initialized trajectory data is then input into the pre-trained diffusion denoising module for denoising to obtain the predicted trajectory.

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

[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 gated recurrent unit is used to extract feature information of the trajectory data, and then the linear fully connected network is used for regression tasks to predict and estimate the variance of the trajectory data;

[0046] The second group of encoders provided in the present 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, 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 gated recurrent unit is used to extract feature information of the trajectory data, 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 present application includes a third spatial encoder and a third temporal encoder, wherein the third spatial encoder is composed of a fifth gated cyclic unit and a fifth linear fully connected network, and the third temporal encoder is composed of a sixth gated cyclic 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 gated cyclic unit is used to extract the feature information of the trajectory data, and then the linear fully connected network is used to perform the regression task to predict and estimate the sample distribution information of the trajectory data.

[0048] Among them, the first, second, third, fourth, and fifth gated recurrent units provided in this application are variants of a recurrent neural network (RNN) designed to solve the problem of long-term dependencies. The interior of the gated recurrent unit includes structures such as a reset gate, an update gate, a candidate hidden state, and a current hidden state. The design of the gated recurrent unit enables it to effectively capture and utilize long-term dependencies in a sequence without adding too many parameters. Compared with traditional recurrent neural networks, the gated recurrent unit has stronger modeling capabilities 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 from the trajectory data. The feature information is input into the hybrid attention layer, and finally a linear layer is used for regression to obtain the global feature, that is, the restored trajectory one.

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

[0052] Integrate the features of trajectory one, trajectory two and the current trajectory to obtain the final restored trajectory.

[0053] Step (2): In the endpoint prediction phase, the second training model is trained to obtain an endpoint prediction model, and the final restored trajectory data, historical trajectory data, and current trajectory data are input into the endpoint prediction model to obtain trajectory data with the endpoint:

[0054] The present application constructs a second training model, which includes a spatiotemporal encoder, which is a gated recurrent unit (GRU), and an endpoint detector, which is a linear layer. The present application inputs the final restored trajectory data, historical trajectory data, and current trajectory data into the gated recurrent unit for feature extraction, thereby capturing the temporal dependencies and sequence patterns in the data. The gated recurrent unit controls the flow of information by updating gates and resetting gates, which helps the model better understand the long-term dependencies in the sequence data and alleviates the gradient vanishing problem.

[0055] Then, the features output by the gated recurrent unit are mapped to the prediction space of the endpoint position through a linear layer to obtain the predicted coordinate data of the endpoint. The prediction space is a two-dimensional space used to predict the x and y coordinates of the endpoint. The second training model is trained based on the loss of the predicted coordinate data and the true coordinate data of the endpoint to obtain the endpoint prediction model. The final restored trajectory data, historical trajectory data and current trajectory data are input into the endpoint prediction model to obtain the trajectory data with the endpoint.

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

[0057] The solution of directly predicting the end point in advance avoids the error accumulation problem caused by step-by-step prediction. This means that the model directly outputs the position of the end point instead of gradually predicting the position of each step, thereby reducing the possibility of error propagation and more effectively capturing the characteristics and patterns of the entire sequence.

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

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

[0060] Initialize hidden state: Before processing sequence data, 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 does the following:

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

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

[0065] Reset gate calculation: The reset gate value is calculated through the fully connected layer (using the sigmoid activation function). The reset gate determines how much of the hidden state of the previous time step needs to be ignored in order to better combine the input of the current time step.

[0066] Candidate hidden state calculation: Using the input of the current time step and the hidden state of the previous time step adjusted by the reset gate, the candidate hidden state is calculated through another fully connected layer (using the tanh activation function).

[0067] Hidden state update: Calculate the hidden state of the current time step based on the value of the update gate and the candidate hidden state, as well as the hidden state of the previous time step.

[0068] Feature extraction: After processing the entire input sequence, the hidden state sequence of GRU can be regarded as the feature representation of the trajectory data. These features capture key information such as the shape, speed change, acceleration pattern of the trajectory, etc., which are crucial for subsequent trajectory prediction.

[0069] Step (3): In the trajectory prediction stage, the third training module is trained to obtain a trajectory prediction model:

[0070] A third training model is constructed, wherein the third training model includes a first leap diffusion model that shares parameters with the trained initial leap diffusion model, historical trajectory data, current trajectory data, and trajectory data with endpoints 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 the real trajectory data to obtain a trajectory prediction model.

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

[0072] Among them, this application uses the Adam optimizer to train the models of the above three stages in sequence.

[0073] The Adam optimizer used in this 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 characteristics 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: first-order moment estimation (mean) and second-order moment estimation (variance). Specifically, it calculates the first-order moment estimation (i.e., the mean of the gradient) and the second-order moment estimation (i.e., the mean of the square of the gradient) of each parameter. Then, by adaptively applying the learning rate to the update of each parameter, the parameters with large gradients have a smaller update step size relative to the parameters with small gradients. The update rule of the Adam optimizer includes a momentum term and an adaptive learning rate term. Among them, the momentum term is similar to the momentum in the momentum optimization algorithm, which helps to accelerate convergence and get rid of the local optimal point; the adaptive learning rate term adjusts the learning rate of each parameter according to the first-order moment estimation and the second-order moment estimation of the parameter, so that the training process is more stable and has 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): When applied, 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.

[0075] This application is based on the diffuse attention model, which can better handle the long-term dependencies and global context information in the trajectory data, thereby improving the accuracy and robustness of trajectory prediction, and solving the problem of low accuracy of the existing technology in sparse data space and long-term prediction. The present invention is based on the technical means of deep learning, using diffusion models, graph neural networks and other neural network models to extract potential features in historical trajectories, thereby predicting possible future peer trajectories, which 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 diffuse attention model, comprising a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the trajectory prediction method based on the diffuse attention model.

[0077] Table 1 Comparison with the baseline model on the NBASportVU dataset with 1 / 2 random sparse sampling

[0078]

[0079] Table 2 Ablation experiments performed on the NBA SportVU dataset with 1 / 2 random sparse sampling.

[0080]

[0081] Table 1. Comparison with the baseline model on the NBA SportVU dataset with 1 / 2 random sparse sampling. The evaluation indicators are average displacement error (ADE) and final displacement error (FDE).

[0082] Table 2 shows the ablation experiment conducted on the NBASportVU dataset with 1 / 2 random sparse sampling. The evaluation indicators are ADE and FDE (ADE / FDE). In the table, Cross represents cross attention, Hybrid represents hybrid attention, and Diff represents diffusion model branch. SharePara represents the shared parameters of the diffusion model in the trajectory prediction stage and the trajectory recovery stage. It can be seen from Tables 1 and 2 that the method provided by the present invention has a good prediction effect.

Claims

1. A trajectory prediction method based on a diffuse attention model, characterized in that: include: Constructing a first training model, the first training model includes an initial leap-forward diffusion model, a graph neural network model and an attention model, the initial leap-forward 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 the current trajectory features and the global features, the current trajectory data is input into the initial leap-forward diffusion model to obtain the initial predicted current trajectory, the initial predicted current trajectory, the current trajectory features and the global features are fused to obtain the restored trajectory data, the first training model is trained based on the loss of the restored trajectory data and the true trajectory data to obtain the restoration model, and the current trajectory data is input into the restoration model to obtain the final restored trajectory data; Constructing a second training model, the second training model includes a gated recurrent unit and a linear layer, inputting the final restored trajectory data, the historical trajectory data, and the current trajectory data into the gated recurrent unit, mapping the features output by the gated recurrent unit to the prediction space of the endpoint position through the linear layer to obtain the predicted coordinate data of the endpoint, training the second training model based on the loss of the predicted coordinate data and the true coordinate data of the endpoint to obtain the endpoint prediction model, and inputting the final restored trajectory data, the historical trajectory data, and the current trajectory data into the endpoint prediction model to obtain the trajectory data with the endpoint; Constructing a third training model, the third training model including a first leap diffusion model that shares parameters with the trained initial leap diffusion model, inputting historical trajectory data, current trajectory data, and trajectory data with endpoints into the first leap diffusion model to obtain a predicted trajectory, and training the third training model based on the loss of the predicted trajectory and the real trajectory data to obtain a trajectory prediction model; When applied, 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.

2. The trajectory prediction method based on the diffuse attention model according to claim 1 is 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 the current trajectory features and global features, including: The historical trajectory data and the current trajectory data are input into the graph neural network model, and the feature information of the historical trajectory data and the current trajectory data is extracted through the graph neural network and time series embedding to obtain the trajectory features at different times. The global features are extracted from the trajectory features at different times through the hybrid attention mechanism and linear layer of the attention model.

3. The trajectory prediction method based on the diffuse attention model according to claim 1, characterized in that: Input the current trajectory data into the initial leapfrog diffusion model to obtain the initial predicted current trajectory, including: The current trajectory data is input into the trajectory initializer to obtain the 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 the initialized trajectory data. The initialized trajectory data is then input into the pre-trained diffusion denoising module for denoising to obtain the predicted trajectory.

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

5. The trajectory prediction method based on the diffuse attention model according to claim 4 is characterized in that: The first group of encoders includes a first spatial encoder and a first temporal encoder, wherein the first spatial encoder is composed of a first gated recurrent unit and a first linear fully connected network, and 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 second group of encoders 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 is added to the output of the second temporal encoder to obtain the mean of the current trajectory data; The third group of encoders includes a third spatial encoder and a third temporal encoder, wherein the third spatial encoder is composed of a fifth gated recurrent unit and a fifth linear fully connected network, and the third temporal encoder is composed of a sixth gated recurrent unit and a sixth linear fully connected network. The output of the third spatial encoder and the output of the third temporal encoder are added to obtain sample distribution information of the current trajectory data.

6. The trajectory prediction method based on the diffuse attention model according to claim 1, characterized in that: 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 off-line.

7. The trajectory prediction method based on the diffuse attention model according to claim 1, characterized in that: Using historical trajectory data to pre-train the diffusion denoising module includes a denoising process and a denoising process; The noise adding process is: adding Gaussian noise to the historical trajectory data multiple times to disturb it; The denoising process is: denoising the noisy historical trajectory data through a neural network, and training the neural network based on the loss of the predicted trajectory data and the real historical trajectory data obtained by denoising to obtain a pre-trained diffusion denoising module.

8. A trajectory prediction device based on a diffuse attention model, characterized in that: It comprises a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, it is used to implement the trajectory prediction method based on the diffuse attention model described in any one of claims 1-7.

Citation Information

Patent Citations

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

    CN117237475A

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

    CN115082896A

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

    CN117635658A

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

    CN118569307A