A method for modeling vehicle-human collaborative trajectory generation combined with multi-stage attention guidance
By constructing a multi-stage attention-guided human-vehicle collaborative trajectory generation model, utilizing multi-head self-attention and spatiotemporal graph attention networks, and combining generative adversarial training with diversity loss, the problems of complex interaction modeling and behavioral pattern fragmentation are solved, achieving high-precision multimodal trajectory prediction and improving the environmental perception and generalization capabilities of autonomous driving systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PEKING UNIV SHENZHEN GRADUATE SCHOOL
- Filing Date
- 2026-04-17
- Publication Date
- 2026-07-03
AI Technical Summary
Existing trajectory prediction methods have limitations in complex interactions and generating multimodal trajectories. They are difficult to effectively model long-range or heterogeneous graph structure interactions and fail to fully utilize human-vehicle interaction characteristics, resulting in decreased prediction accuracy and generalization ability.
A multi-stage attention-guided human-vehicle collaborative trajectory generation model is constructed. It adopts a multi-head self-attention mechanism and a spatiotemporal graph attention network, combined with generative adversarial training and diversity loss. The long-range and local spatiotemporal dependencies between agents are explicitly captured through an encoding-attention-decoding architecture, and a dedicated loss function is designed to handle vehicle-pedestrian interaction features.
It significantly improves the accuracy of trajectory prediction and multimodal coverage in complex scenarios, and can generate a variety of behavioral intentions that conform to social norms, thereby improving the environmental perception and generalization capabilities of autonomous driving systems.
Smart Images

Figure CN122334014A_ABST
Abstract
Description
Technical Field
[0001] A human-vehicle collaborative trajectory generation and modeling method combining multi-stage attention guidance is proposed, belonging to the field of autonomous driving technology. Background Technology
[0002] With the rapid development of autonomous driving and intelligent transportation systems, accurately predicting the future trajectories of vehicles and pedestrians has become a core technology for ensuring driving safety and improving traffic efficiency. Especially in complex urban scenarios, the highly dynamic and multimodal interactions between intelligent agents pose a severe challenge to the accuracy and robustness of trajectory prediction models.
[0003] However, existing trajectory prediction methods have significant limitations in modeling complex interactions and generating multimodal trajectories: while recurrent neural network-based methods can capture temporal dependencies, they aggregate neighborhood information through a fixed structure, making it difficult to effectively model long-range or heterogeneous graph structure interactions. Although convolutional social pooling methods improve local feature extraction capabilities, their receptive field is limited, and the generated trajectories tend to converge to a single pattern, failing to cover the multiple plausible possibilities of pedestrian behavior. The introduction of generative adversarial networks promotes trajectory diversity, but their discriminators typically operate on complete trajectory sequences, lacking sufficient ability to model fine-grained spatiotemporal interactions; furthermore, existing methods often treat vehicle and pedestrian trajectory prediction as independent problems, failing to fully utilize the heterogeneous characteristics of human-vehicle interactions, resulting in decreased prediction accuracy and generalization ability in mixed traffic scenarios. Existing research, such as Social GAN proposed by Gupta et al., generates diverse trajectories through pooling mechanisms and adversarial training, but the expressive power of the interaction module is limited; Social LSTM proposed by Alahi et al. relies on spatial grid pooling, which makes it difficult to effectively model non-local dependencies; Huang et al. applied graph attention networks to spatiotemporal interaction modeling, but their architecture was not deeply integrated with generative adversarial training, making it difficult to guarantee the social rationality of the predicted trajectory.
[0004] Therefore, this invention proposes a human-vehicle collaborative trajectory generation modeling method combined with multi-stage attention guidance. By constructing a hierarchical architecture of encoding-attention-decoding, it integrates a multi-head self-attention mechanism and a spatiotemporal graph attention network to explicitly capture long-range and local spatiotemporal dependencies between agents. It utilizes adversarial training and diversity loss for joint optimization to drive the model to generate multimodal trajectory distributions that conform to social norms. Furthermore, by introducing a vehicle-pedestrian interaction feature extraction module and a dedicated loss function, it achieves unified modeling and accurate prediction of heterogeneous agent behaviors. This effectively solves the key problems of insufficient interaction modeling, simplistic predicted trajectories, and fragmented human-vehicle behavior patterns in complex scenarios, providing a reliable environmental perception foundation for the safe planning of autonomous vehicles in dynamic environments. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention proposes a human-vehicle collaborative trajectory generation and modeling method that combines multi-stage attention guidance.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] S1. Construct an agent state vector containing position, velocity, acceleration, and category using Equation 1. Then, use an embedding layer using Equation 2 to map the high-dimensional state vector into a low-dimensional feature vector.
[0008] Formula 1:
[0009]
[0010] Formula 2:
[0011]
[0012] in, For the first The agent in the th... The complete state at each time step; For the first The agent in the th... The horizontal coordinate of each time step For the first The agent in the th... The vertical coordinate of each time step; For the first The agent in the th... The instantaneous velocity magnitude at each time step; For the first The agent in the th... The magnitude of instantaneous acceleration at each time step; For the first The types of intelligent agents, For the first The agent in the th... The feature vector obtained by transforming the state vector at each time step through the embedding layer. For a single fully connected layer, it represents the specific operations of the embedded layer: is the weight matrix of the embedding layer;
[0013] S2, Equation 3 uses an LSTM encoder to extract the temporal motion features of each agent from the temporal feature vector; Equation 4 uses an improved SLSTM unit to fuse the hidden state of the previous time step, the current features, and the interaction features:
[0014] Formula 3:
[0015]
[0016] Formula 4:
[0017]
[0018] in, For the first The LSTM network of the agents in the first... The hidden state at each time step As a single computational unit in a Long Short-Term Memory (LSTM) network, For the first The hidden state of an LSTM network for an agent at time step t-1. For the first The agent in the th... The feature vector obtained by transforming the state vector at each time step through the embedding layer. This refers to the set of all trainable weight parameters within the encoder unit of an LSTM network. For the first A pedestrian in the improved SLSTM network The hidden state at each time step This is an improved LSTM unit that takes into account spatial interaction. For the first The hidden state of the SLSTM of each pedestrian at time step t-1 For the first The interaction features between a pedestrian and surrounding vehicles at time step t-1. This is the set of all trainable weight parameters within the SLSTM network;
[0019] S3. Using Equation 5, scaled dot product attention is used to calculate the influence weights of different agents on the target agent to capture complex spatial dependencies. Equation 6 uses a weighted summation method to aggregate the value vectors of all neighboring agents, generating a context vector representing a specific interaction pattern for each attention head.
[0020] Formula 5:
[0021]
[0022] Formula 6:
[0023]
[0024] in, For the first In each attention head, the attention weights of all surrounding agents towards the target agent. This is a non-linear activation function used to transform a set of input values into a probability distribution such that the sum of all attention weights is 1. For the first In each attention head, the query matrix is obtained after a linear transformation of the hidden state of the target agent. Key matrix The transpose of the matrix, For the dimensions of the query and key vector, For the first The final output context vector of each attention head, The total number of all agents in the scene. For the first In the attention head, the first The attention weight values corresponding to each surrounding agent. For the first In the attention head, the first The value vector obtained by linearly transforming the hidden states of the surrounding agents;
[0025] S4. Multimodal trajectory generation: The generated trajectory points are directly output from the hidden state of the decoder LSTM, and the adversarial loss in the adversarial network is generated.
[0026] Furthermore, step S4 includes the following specific steps:
[0027] S41. Initialize generator parameters, including LSTM decoder and fully connected layer weights;
[0028] S42, Sampling noise vector , as random input to the generator;
[0029] S43. Concatenate the encoded hidden state with noise and input it into the decoder LSTM.
[0030] S44. Use attention weights to weight the decoder output to generate multiple candidate trajectories;
[0031] S45. Calculate the diversity loss between the generated trajectory and the real trajectory, and select the optimal trajectory;
[0032] S46. Optimize the generator through adversarial training to improve the diversity and realism of trajectories;
[0033] S5. Equation 7 uses the decoder LSTM and fully connected layers to predict the probability distribution parameters of future trajectory points; Equation 8 specifically demonstrates how the decoder recursively generates the trajectory state at the next moment based on the initial state and spatial features.
[0034] Formula 7:
[0035]
[0036] Formula 8:
[0037]
[0038] in, For the future The probability distribution parameters of the predicted trajectory points at each time step It is a fully connected layer. As a single computational unit in a Long Short-Term Memory (LSTM) network, Let be the hidden state of the decoder LSTM at time step t-1. This is the set of all trainable weight parameters within the decoder LSTM network and the fully connected layers. For the first The output state of the decoder for each pedestrian at the first prediction time step. This is the computational unit of the decoder's long short-term memory network. For the decoder LSTM at the end of observation time The initial state, For the first Individual pedestrian at the end of observation time Spatial feature eigenvectors This is the set of all trainable weight parameters within the pedestrian decoder LSTM network;
[0039] S6. Equation 9 is used to weight and combine the adversarial loss, the logarithmic L2 loss emphasizing the final goal, and the loss encouraging diversity to form a comprehensive optimization objective; Equation 10 is used to specifically calculate the diversity loss, and optimization is performed by selecting the predicted sample that is closest to the true trajectory.
[0040] Formula 9:
[0041]
[0042] Formula 10:
[0043]
[0044] in, The total loss that needs to be minimized during model training. To generate adversarial losses, These are hyperparameters used to control the weight of the logarithmic L2 loss in the total loss. For logarithmic L2 loss, For the loss of diversity, To account for the diverse losses calculated for pedestrians, For index Iterate through the expressions and take the minimum value of the subsequent expressions. For the first The true future trajectory of an individual pedestrian For the first The k-th predicted trajectory generated for each pedestrian;
[0045] S7. The game optimization objective of the generator and discriminator in the adversarial training framework is formally defined using Equation 11; the model parameters are iteratively updated using a gradient-based optimization algorithm using Equation 12 to minimize the overall objective function:
[0046] Formula 11:
[0047]
[0048] Formula 12:
[0049]
[0050] in, These are the optimal weight parameters for the model found through the optimization process. To find the objective function Minimized generator The parameters, To find the objective function Maximizing the discriminator The parameters, For the total loss function, To optimize the updated model parameters, To optimize the model parameters before the process update, For learning rate, For loss function Regarding model parameters The gradient;
[0051] S8. Output the complete trajectory prediction results for the future time series using Equation 13; select the most likely trajectory as the final output from the generated candidate trajectories using Equation 14, based on the probability calculated by a small classification network.
[0052] Formula 13:
[0053]
[0054] Formula 14:
[0055]
[0056] in, For the complete predicted trajectory sequence, The predicted position for the first prediction time step. The predicted position for the last predicted time step. The final output trajectory is selected from multiple candidate trajectories. In search of The index that yields the maximum value The corresponding trajectory For an auxiliary network to estimate the first The candidate trajectory is the most reasonable probability.
[0057] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0058] 1. This invention, by constructing a multi-head self-attention mechanism and a spatiotemporal graph attention network, can accurately capture the complex interactive dependencies between vehicles and pedestrians in traffic scenarios. This mechanism enables the model to adaptively focus on surrounding agents that have a key influence on the future movement of the target agent, regardless of their distance. Compared to traditional methods that rely on fixed structures or local receptive fields for interaction modeling, this invention can more comprehensively understand the rules of social behavior in dynamic scenarios, thereby significantly improving the prediction accuracy of complex interactive behaviors such as emergency avoidance and cooperative passage, making the predicted trajectory more consistent with real-world social etiquette and traffic rules.
[0059] 2. This invention innovatively combines generative adversarial training with a diversity loss function, effectively solving the problem of singular behavioral patterns in trajectory prediction. By constructing a multimodal trajectory generation framework, the model can simultaneously generate multiple physically feasible and socially reasonable future trajectory hypotheses, fully covering the various behavioral intentions that the agent may take. This design overcomes the inherent defect of traditional deterministic prediction methods that tend to output averaged trajectories, and is also superior to probabilistic models that rely solely on latent variable sampling, providing more comprehensive and reliable environmental situational awareness information for the decision-making and planning modules of autonomous driving systems.
[0060] 3. This invention employs a unified encoding-attention-decoding architecture to achieve collaborative modeling of the behavior of heterogeneous intelligent agents. By designing a dedicated feature extraction and fusion module, the system can simultaneously process the different motion patterns and behavioral characteristics of vehicles and pedestrians, and perform interactive reasoning within a unified representation space. This integrated modeling approach overcomes the problem of fragmented behavior patterns caused by treating vehicle and pedestrian prediction as independent tasks in traditional methods. This allows the prediction results to more accurately reflect the mutual influence between various intelligent agents in mixed traffic flows, significantly improving the system's generalization ability and practical value in real urban road scenarios. Attached Figure Description
[0061] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0062] Figure 1 This is a flowchart illustrating the overall technical process of a human-vehicle collaborative trajectory generation and modeling method combining multi-stage attention guidance proposed in this invention.
[0063] Figure 2 This is a flowchart of a multimodal trajectory generation method. Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.
[0065] Example 1, referring to Figure 1 , 2 The overall flowchart of this invention is shown below. Figure 1 The steps of the multimodal trajectory generation method of the present invention are as follows: Figure 2 :
[0066] First, an agent state vector containing position, velocity, acceleration, and category is constructed using Equation 1. Then, an embedding layer is used using Equation 2 to map the high-dimensional state vector into a low-dimensional feature vector.
[0067] Formula 1:
[0068]
[0069] Formula 2:
[0070]
[0071] in, For the first The agent in the th... The complete state at each time step; For the first The agent in the th... The horizontal coordinate of each time step For the first The agent in the th... The vertical coordinate of each time step; For the first The agent in the th... The instantaneous velocity magnitude at each time step; For the first The agent in the th... The magnitude of instantaneous acceleration at each time step; For the first The types of intelligent agents, For the first The agent in the th... The feature vector obtained by transforming the state vector at each time step through the embedding layer. For a single fully connected layer, it represents the specific operations of the embedded layer: is the weight matrix of the embedding layer;
[0072] Equation 3 uses an LSTM encoder to extract the temporal motion features of each agent from the temporal feature vector; Equation 4 uses an improved SLSTM unit to fuse the hidden state from the previous time step, the current features, and the interaction features.
[0073] Formula 3:
[0074]
[0075] Formula 4:
[0076]
[0077] in, For the first The LSTM network of the agents in the first... The hidden state at each time step As a single computational unit in a Long Short-Term Memory (LSTM) network, For the first The hidden state of an LSTM network for an agent at time step t-1. For the first The agent in the th... The feature vector obtained by transforming the state vector at each time step through the embedding layer. This refers to the set of all trainable weight parameters within the encoder unit of an LSTM network. For the first A pedestrian in the improved SLSTM network The hidden state at each time step This is an improved LSTM unit that takes into account spatial interaction. For the first The hidden state of the SLSTM of each pedestrian at time step t-1 For the first The interaction features between a pedestrian and surrounding vehicles at time step t-1. This is the set of all trainable weight parameters within the SLSTM network;
[0078] Equation 5 uses scaled dot product attention to calculate the influence weights of different agents on the target agent, capturing complex spatial dependencies; Equation 6 uses a weighted summation method to aggregate the value vectors of all neighboring agents, generating a context vector representing a specific interaction pattern for each attention head.
[0079] Formula 5:
[0080]
[0081] Formula 6:
[0082]
[0083] in, For the first In each attention head, the attention weights of all surrounding agents towards the target agent. This is a non-linear activation function used to transform a set of input values into a probability distribution such that the sum of all attention weights is 1. For the first In each attention head, the query matrix is obtained after a linear transformation of the hidden state of the target agent. Key matrix The transpose of the matrix, For the dimensions of the query and key vector, For the first The final output context vector of each attention head, The total number of all agents in the scene. For the first In the attention head, the first The attention weight values corresponding to each surrounding agent. For the first In the attention head, the first The value vector obtained by linearly transforming the hidden states of the surrounding agents;
[0084] Multimodal trajectory generation directly outputs the generated trajectory points from the hidden state of the decoder LSTM and generates the adversarial loss in the adversarial network;
[0085] Furthermore, the multimodal trajectory generation, which directly outputs the generated trajectory points from the hidden state of the decoder LSTM and generates the adversarial loss in the adversarial network, includes the following specific steps:
[0086] 1) Initialize generator parameters, including LSTM decoder and fully connected layer weights;
[0087] 2) Sampling noise vector , as random input to the generator;
[0088] 3) Concatenate the encoded hidden state with noise and input it into the decoder LSTM;
[0089] 4) Use attention weights to weight the decoder output to generate multiple candidate trajectories;
[0090] 5) Calculate the diversity loss between the generated trajectory and the real trajectory, and select the optimal trajectory;
[0091] 6) Optimize the generator through adversarial training to improve the diversity and realism of trajectories.
[0092] Equation 7 uses the decoder LSTM and fully connected layers to predict the probability distribution parameters of future trajectory points; Equation 8 specifically demonstrates how the decoder recursively generates the trajectory state at the next moment based on the initial state and spatial features.
[0093] Formula 7:
[0094]
[0095] Formula 8:
[0096]
[0097] in, For the future The probability distribution parameters of the predicted trajectory points at each time step It is a fully connected layer. As a single computational unit in a Long Short-Term Memory (LSTM) network, Let be the hidden state of the decoder LSTM at time step t-1. This is the set of all trainable weight parameters within the decoder LSTM network and the fully connected layers. For the first The output state of the decoder for each pedestrian at the first prediction time step. This is the computational unit of the decoder's long short-term memory network. For the decoder LSTM at the end of observation time The initial state, For the first Individual pedestrian at the end of observation time Spatial feature eigenvectors This is the set of all trainable weight parameters within the pedestrian decoder LSTM network;
[0098] Equation 9 uses a weighted combination of adversarial loss, logarithmic L2 loss emphasizing the final goal, and loss encouraging diversity to form a comprehensive optimization objective; Equation 10 specifically calculates the diversity loss, and optimization is performed by selecting the predicted sample closest to the true trajectory.
[0099] Formula 9:
[0100]
[0101] Formula 10:
[0102]
[0103] in, The total loss that needs to be minimized during model training. To generate adversarial losses, These are hyperparameters used to control the weight of the logarithmic L2 loss in the total loss. For logarithmic L2 loss, For the loss of diversity, To account for the diverse losses calculated for pedestrians, For index Iterate through the expressions and take the minimum value of the subsequent expressions. For the first The true future trajectory of an individual pedestrian For the first The k-th predicted trajectory generated for each pedestrian;
[0104] Equation 11 formally defines the game optimization objective of the generator and discriminator within the adversarial training framework; Equation 12 uses a gradient-based optimization algorithm to iteratively update the model parameters to minimize the overall objective function.
[0105] Formula 11:
[0106]
[0107] Formula 12:
[0108]
[0109] in, These are the optimal weight parameters for the model found through the optimization process. To find the objective function Minimized generator The parameters, To find the objective function Maximizing the discriminator The parameters, For the total loss function, To optimize the updated model parameters, To optimize the model parameters before the process update, For learning rate, For loss function Regarding model parameters The gradient;
[0110] Equation 13 outputs the complete trajectory prediction results for the future time series; Equation 14 selects the most likely trajectory from the generated candidate trajectories as the final output based on the probability calculated by a small classification network.
[0111] Formula 13:
[0112]
[0113] Formula 14:
[0114]
[0115] in, For the complete predicted trajectory sequence, The predicted position for the first prediction time step. The predicted position for the last predicted time step. The final output trajectory is selected from multiple candidate trajectories. In search of The index that yields the maximum value The corresponding trajectory For an auxiliary network to estimate the first The candidate trajectory is the most reasonable probability.
Claims
1. A method for modeling vehicle trajectory generation in vehicle-human collaboration with multi-stage attention guidance, characterized in that, Includes the following steps: S1. Construct an agent state vector containing position, velocity, acceleration, and category using Equation 1. Then, use an embedding layer using Equation 2 to map the high-dimensional state vector into a low-dimensional feature vector. Formula 1: Formula 2: in, For the first The agent in the th... The complete state at each time step; For the first The agent in the th... The horizontal coordinate of each time step For the first The agent in the th... The vertical coordinate of each time step; For the first The agent in the th... The instantaneous velocity magnitude at each time step; For the first The agent in the th... The magnitude of the instantaneous acceleration at each time step; For the first The types of intelligent agents, For the first The agent in the th... The feature vector obtained by transforming the state vector at each time step through the embedding layer. For a single fully connected layer, it represents the specific operations of the embedded layer: is the weight matrix of the embedding layer; S2, Equation 3 uses an LSTM encoder to extract the temporal motion features of each agent from the temporal feature vector; Equation 4 uses an improved SLSTM unit to fuse the hidden state of the previous time step, the current features, and the interaction features: Formula 3: Formula 4: in, For the first The LSTM network of the agents in the first... The hidden state at each time step As a single computational unit in a Long Short-Term Memory (LSTM) network, For the first The hidden state of an LSTM network for an agent at time step t-1. For the first The agent in the th... The feature vector obtained by transforming the state vector at each time step through the embedding layer. This refers to the set of all trainable weight parameters within the encoder unit of an LSTM network. For the first A pedestrian in the improved SLSTM network The hidden state at each time step This is an improved LSTM unit that takes into account spatial interaction. For the first The hidden state of the SLSTM of each pedestrian at time step t-1 For the first The interaction features between a pedestrian and surrounding vehicles at time step t-1. This is the set of all trainable weight parameters within the SLSTM network; S3. Using Equation 5, scaled dot product attention is used to calculate the influence weights of different agents on the target agent, capturing complex spatial dependencies. Equation 6 uses a weighted summation method to aggregate the value vectors of all neighboring agents, generating a context vector representing a specific interaction pattern for each attention head. Formula 5: Formula 6: in, For the first In each attention head, the attention weights of all surrounding agents towards the target agent. This is a non-linear activation function used to transform a set of input values into a probability distribution such that the sum of all attention weights is 1. For the first In each attention head, the query matrix is obtained after a linear transformation of the hidden state of the target agent. Key matrix The transpose of the matrix, For the dimensions of the query and key vector, For the first The final output context vector of each attention head, The total number of all agents in the scene. For the first In the attention head, the first The attention weight values corresponding to each surrounding agent. For the first In the attention head, the first The value vector obtained by linearly transforming the hidden states of the surrounding agents; S4. Multimodal trajectory generation: The generated trajectory points are directly output from the hidden state of the decoder LSTM, and the adversarial loss in the adversarial network is generated. S5. Equation 7 uses the decoder LSTM and fully connected layers to predict the probability distribution parameters of future trajectory points; Equation 8 specifically demonstrates how the decoder recursively generates the trajectory state at the next moment based on the initial state and spatial features. Formula 7: Formula 8: in, For the future The probability distribution parameters of the predicted trajectory points at each time step It is a fully connected layer. As a single computational unit in a Long Short-Term Memory (LSTM) network, Let be the hidden state of the decoder LSTM at time step t-1. This is the set of all trainable weight parameters within the decoder LSTM network and the fully connected layers. For the first The output state of the decoder for each pedestrian at the first prediction time step. This is the computational unit of the decoder's long short-term memory network. For the decoder LSTM at the end of observation time The initial state, For the first Individual pedestrian at the end of observation time Spatial feature eigenvectors This is the set of all trainable weight parameters within the pedestrian decoder LSTM network; S6. Equation 9 is used to weight and combine the adversarial loss, the logarithmic L2 loss emphasizing the final goal, and the loss encouraging diversity to form a comprehensive optimization objective; Equation 10 is used to specifically calculate the diversity loss, and optimization is performed by selecting the predicted sample that is closest to the true trajectory. Formula 9: Formula 10: in, The total loss that needs to be minimized during model training. To generate adversarial losses, These are hyperparameters used to control the weight of the logarithmic L2 loss in the total loss. For logarithmic L2 loss, For the loss of diversity, To account for the diverse losses calculated for pedestrians, For index Iterate through the expressions and take the minimum value of the subsequent expressions. For the first The true future trajectory of an individual pedestrian For the first The k-th predicted trajectory generated for each pedestrian; S7. The game optimization objective of the generator and discriminator under the adversarial training framework is formally defined using Equation 11; the model parameters are iteratively updated using a gradient-based optimization algorithm using Equation 12 to minimize the overall objective function: Formula 11: Formula 12: in, These are the optimal weight parameters for the model found through the optimization process. To find the objective function Minimized generator The parameters, To find the objective function Maximizing the discriminator The parameters, For the total loss function, To optimize the updated model parameters, To optimize the model parameters before the process update, For learning rate, For loss function Regarding model parameters The gradient; S8. Output the complete trajectory prediction results for the future time series using Equation 13; select the most likely trajectory as the final output from the generated candidate trajectories using Equation 14, based on the probability calculated by a small classification network. Formula 13: Formula 14: in, For the complete predicted trajectory sequence, The predicted position for the first prediction time step. The predicted position for the last predicted time step. The final output trajectory is selected from multiple candidate trajectories. In search of The index that yields the maximum value The corresponding trajectory For an auxiliary network to estimate the first The candidate trajectory is the most reasonable probability.
2. The method for generating and modeling human-vehicle collaborative trajectories by combining multi-stage attention guidance as described in claim 1, characterized in that, The S4 step includes the following specific steps: 1) Initialize generator parameters, including LSTM decoder and fully connected layer weights; 2) Sampling noise vector , as random input to the generator; 3) Concatenate the encoded hidden state with noise and input it into the decoder LSTM; 4) Use attention weights to weight the decoder output to generate multiple candidate trajectories; 5) Calculate the diversity loss between the generated trajectory and the real trajectory, and select the optimal trajectory; 6) Optimize the generator through adversarial training to improve the diversity and realism of trajectories.