A vehicle trajectory prediction method and device based on large language model guidance
By combining large-scale language models and deep learning methods, high-level semantic understanding of vehicle trajectories and scene contexts is performed, which solves the problems of the lack of high-level semantic information and insufficient multi-modal information fusion in the existing technology, and significantly improves The accuracy and robustness of vehicle trajectory prediction provide more accurate prediction capabilities for autonomous driving systems.
Patent Information
- Application Number
- CN202410870777.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-01
AI Technical Summary
Existing deep learning methods lack the understanding and utilization of high-level semantic information in vehicle trajectory prediction, making it difficult to capture the overall scene understanding. Moreover, the multi-modal information fusion method is simple and difficult to give full play to the advantages of each modality.
The large language model (LLM) is combined with the trajectory prediction model of deep learning. The LLM is used to perform high-level semantic understanding of the vehicle's historical trajectory and scene context, generate vehicle intent representation and scene semantic encoding, and combine it with low-level visual features to input Into the deep trajectory prediction network for comprehensive prediction of multi-modal information.
The accuracy and robustness of trajectory prediction are significantly improved, and important clues such as scenes and vehicle intentions can be more fully utilized, and the understanding and prediction capabilities of complex traffic scenes are enhanced.
Smart Images

Figure CN118394874B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic flow prediction, and in particular to a vehicle trajectory prediction method and device based on large language model guidance. Background Art
[0002] With the rapid development of autonomous driving, robot navigation and other fields, accurately predicting the future movement trajectory of vehicles has become a crucial task. In complex traffic scenarios, the behavior of vehicles is usually affected by many factors, such as road conditions, other dynamic objects, traffic rules and the vehicle's own travel intentions. Therefore, accurate prediction of the vehicle's future actions requires not only capturing its past movement patterns, but also a deep understanding of the scene semantics and the motivations behind the vehicle's behavior.
[0003] Traditional rule-based and model-based methods such as social force models and Gaussian process regression rely on manually designed rules and constraints, and it is difficult to fully characterize the complexity and diversity of vehicle motion. In recent years, data-driven methods based on deep learning have shown more promising results. These methods usually adopt an encoder-decoder architecture, using models such as convolutional neural networks and recurrent neural networks to extract visual features from the vehicle's historical trajectory and surrounding environment, and predict future trajectories. Despite certain progress, existing deep learning methods still have some inherent limitations: First, there is a lack of understanding and utilization of high-level semantic information. Existing methods focus more on learning motion patterns from low-level visual data, but it is difficult to effectively utilize important semantic information, such as road environment, traffic rules, and vehicle travel intentions, which are crucial for accurate prediction. Second, independent modeling of vehicle trajectories makes it difficult to capture overall scene understanding. Most methods treat the trajectory prediction of each vehicle as an independent task, lack the understanding and modeling of the overall traffic scene, and cannot fully utilize the complex interactions between vehicles and the environment, and between vehicles. Third, there is a lack of clear mechanisms to fuse multimodal information. Although some methods try to fuse visual and other modal information, the multimodal fusion method is relatively simple and it is difficult to fully utilize the advantages of each modality.
[0004] In order to overcome the above-mentioned shortcomings, the present invention proposes a vehicle trajectory prediction method and device based on large language model guidance. Summary of the invention
[0005] The purpose of the present invention is to address the defects of the prior art and provide a vehicle trajectory prediction method and device based on a large language model. It organically combines a large language model (LLM) with a trajectory prediction model based on deep learning, and uses visual and semantic information in a unified framework. Specifically, the present invention uses LLM to perform high-level semantic understanding and reasoning on the vehicle's historical trajectory and scene context, generating vehicle intention representation and scene semantic encoding; then these semantic representations are combined with low-level visual features and input into a specially designed deep trajectory prediction network, which integrates multimodal information to jointly predict the vehicle's future motion trajectory.
[0006] In order to achieve the above purpose, the present invention adopts the following technical solutions:
[0007] A vehicle trajectory prediction method based on large language model guidance, comprising:
[0008] S1. Obtain historical trajectory data corresponding to the vehicle;
[0009] S2. Performing enhancement processing on the acquired vehicle history trajectory to obtain a processed vehicle history trajectory;
[0010] S3. Input the processed vehicle history trajectory into the large language model LLM to obtain the embedding vector corresponding to the vehicle history trajectory;
[0011] S4. Encode the obtained embedding vector to obtain the encoded vehicle history trajectory;
[0012] S5. Input the encoded vehicle historical trajectory into the decoder for decoding processing to obtain the prediction result of the future vehicle trajectory.
[0013] Furthermore, the step S1 of obtaining the historical trajectory data corresponding to the vehicle specifically includes: obtaining the trajectory points of each vehicle in the A vehicles collected by the sensor in the historical time period, which is expressed as:
[0014] ;
[0015] in, , They represent the spatial horizontal and vertical coordinates of the i-th vehicle at time t; X i represents the historical trajectory data of the i-th vehicle; A represents the number of vehicles, i∈A; t represents a certain moment; D represents the time period.
[0016] Furthermore, the step S2 specifically includes:
[0017] S21. Obtain the historical trajectory data X of A vehicles i Stack as a matrix;
[0018] S22. Perform tensor decomposition on the matrix to obtain the decomposed matrix X, which is expressed as:
[0019] ;
[0020] Among them, U ob and V ob represents an orthogonal matrix; S ob represents a diagonal matrix; T Represents the transpose of a matrix;
[0021] S23. Perform rank-k approximation on the decomposed matrix X through the first k singular values to obtain the vehicle trajectory enhancement result, which is expressed as:
[0022] ;
[0023] in, represents the vehicle trajectory enhancement result; k represents the number of singular values.
[0024] Furthermore, the embedding vector in step S3 includes the vehicle historical trajectory cluster embedding Z c , vehicle historical action intention embedding Z m , historical trajectory embedded in Z p .
[0025] Furthermore, the vehicle historical trajectory cluster embedding Z c Specifically:
[0026] A1. Preprocess the vehicle's historical trajectory;
[0027] A2. Cluster the preprocessed vehicle history trajectories into C clusters;
[0028] A3. Embed C clusters to get the vehicle history trajectory cluster embedding Z c , expressed as:
[0029] ;
[0030] Among them, Z c represents the cluster embedding of vehicle historical trajectories; C represents the number of clusters; F c Represents a vector with trainable parameters W c Linear layer of W c Denotes the linear layer F c The layer weight coefficient of .
[0031] Furthermore, the vehicle historical action intention is embedded in Z m , specifically:
[0032] B1. The historical trajectory data X of the i-th vehicle iInput into the large language model LLM to generate a pattern containing the vehicle's historical movement intention;
[0033] B2. Convert the pattern of the historical motion intention of the i-th vehicle into an output embedding vector through a tokenizer;
[0034] B3. Embed the output embedding vector to obtain the vehicle historical action intention embedding Z m , expressed as:
[0035] ;
[0036] Among them, Z m Represents the vehicle’s historical action intention embedding; F m Represents a vector with trainable parameters W m Linear layer of W m Denotes the linear layer F m The layer weight coefficient of ; G represents the embedding vector.
[0037] Furthermore, the historical trajectory is embedded in Z p , expressed as:
[0038] ;
[0039] Among them, Z p represents the historical trajectory embedding; F p Represents a vector with trainable parameters W p Linear layer of W p Denotes the linear layer F p The layer weight coefficient of ; X represents the decomposed matrix.
[0040] Furthermore, in step S4, the obtained embedding vector is encoded, which is expressed as:
[0041] ;
[0042] ;
[0043] Among them, Z e Represents the encoded vehicle history trajectory; EncoderLayer represents the coding layer; Z f represents motion embedding; concat() represents the merging function; PE represents the tensor of historical trajectory position encoding.
[0044] Furthermore, the prediction result of the future vehicle trajectory obtained in step S5 is expressed as:
[0045] ;
[0046] Among them, Z nrepresents the prediction result of the future vehicle trajectory; represents the probability associated with the predicted trajectory; DecoderLayer Denotes the decoding layer; Z ne Represents the embeddings of neighboring vehicle trajectories.
[0047] Accordingly, a vehicle trajectory prediction device based on large language model guidance is also provided, which is used to execute a vehicle trajectory prediction method based on large language model guidance. The vehicle trajectory prediction device includes a processor, and the processor is provided with:
[0048] An acquisition module, used to acquire historical trajectory data corresponding to the vehicle;
[0049] A processing module, used for performing enhancement processing on the acquired vehicle historical trajectory to obtain a processed vehicle historical trajectory;
[0050] The embedding module is used to input the processed vehicle history trajectory into the large language model LLM to obtain the embedding vector corresponding to the vehicle history trajectory;
[0051] An encoding module, used to encode the obtained embedding vector to obtain an encoded vehicle history trajectory;
[0052] The decoding module is used to input the encoded vehicle historical trajectory into the decoder for decoding processing to obtain the prediction result of the future vehicle trajectory.
[0053] Compared with the prior art, the present invention integrates the high-level semantic understanding and reasoning capabilities provided by LLM. The present invention can make full use of important clues such as scenes and vehicle intentions, thereby significantly improving the accuracy and robustness of trajectory prediction, laying the foundation for realizing a safe and efficient autonomous driving system. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 This is a flow chart of a vehicle trajectory prediction method based on large language model guidance provided in Example 1;
[0055] Figure 2 This is a framework diagram of the vehicle trajectory prediction method provided in Example 1;
[0056] Figure 3 This is a comparison chart of prediction results provided in Example 1. DETAILED DESCRIPTION
[0057] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0058] The purpose of the present invention is to provide a vehicle trajectory prediction method and device based on large language model guidance in view of the defects of the prior art.
[0059] Embodiment 1
[0060] This embodiment provides a vehicle trajectory prediction method based on a large language model. Figure 1-Figure 2 As shown, including:
[0061] S1. Obtain historical trajectory data corresponding to the vehicle;
[0062] S2. Performing enhancement processing on the acquired vehicle history trajectory to obtain a processed vehicle history trajectory;
[0063] S3. Input the processed vehicle history trajectory into the large language model LLM to obtain the embedding vector corresponding to the vehicle history trajectory;
[0064] S4. Encode the obtained embedding vector to obtain the encoded vehicle history trajectory;
[0065] S5. Input the encoded vehicle historical trajectory into the decoder for decoding processing to obtain the prediction result of the future vehicle trajectory.
[0066] In step S1, historical trajectory data corresponding to the vehicle is obtained.
[0067] The historical trajectory data corresponding to the vehicle is collected by the on-board sensors installed in the vehicle. The system obtains the data collected by the sensors and pre-processes the acquired data, specifically:
[0068] Assuming that there are A vehicles in the field of view of the camera, the sensor collects the trajectory points of the i-th vehicle in the field of view within the historical time period D, and then obtains the historical trajectory data of A vehicles.
[0069] The trajectory point of the i-th vehicle historical time period is expressed as:
[0070] ;
[0071] in, , They represent the spatial horizontal and vertical coordinates of the i-th vehicle at time t; X i represents the historical trajectory data of the i-th vehicle; A represents the number of vehicles, i∈A; t represents a certain moment; D represents the time period.
[0072] In step S2, the acquired vehicle historical trajectory is enhanced to obtain a processed vehicle historical trajectory.
[0073] The vehicle history trajectory enhancement method is as follows:
[0074] S21. The historical trajectory data X of A vehicles in the field of view i Stacked into the historical trajectory matrix X, that is ;
[0075] S22. Perform tensor decomposition on the historical trajectory matrix X to obtain the decomposed historical trajectory matrix X, which is expressed as:
[0076] ;
[0077] ;
[0078] ;
[0079] Among them, U ob and V ob represents an orthogonal matrix; S ob represents a diagonal matrix consisting of singular values composition, r represents the rank of matrix X; L = 2 × D represents the observed vehicle trajectory; u L represents the left singular vector value; v Y represents the right singular vector value; T represents the transpose of the matrix.
[0080] S23. Perform rank-k approximation on the decomposed matrix X through the first k singular values to obtain the vehicle trajectory enhancement result, which is expressed as:
[0081] ;
[0082] ;
[0083] in, represents the vehicle trajectory enhancement result, which is an approximate matrix obtained from the best rank-k approximation of X, containing only the most important k singular values; k represents the number of singular values; u k represents the kth left singular vector value; represents the kth singular value; v k represents the kth right singular vector value.
[0084] In step S3, the processed vehicle history trajectory is input into the large language model LLM to obtain the embedding vector corresponding to the vehicle history trajectory; wherein the embedding vector includes the vehicle history trajectory cluster embedding Z c , vehicle historical action intention embedding Z m , historical trajectory embedded in Z p .
[0085] Clustering embedding Z of vehicle history trajectories in vehicle trajectory embedding guided by LLM c Specifically:
[0086] A1. Preprocess the vehicle history trajectory, translate the starting coordinates of all vehicle history trajectory points to the origin, and then rotate them to the positive zero degree direction;
[0087] A2. Cluster the preprocessed vehicle history trajectories with similar motion behaviors into C clusters; the mean of each cluster is , which is C Gaussian distributions combination.
[0088] The Gaussian mixture model M is expressed as:
[0089] ;
[0090] in, represents the learnable parameters used to assign weights to clusters; and Respectively represent the mean and variance of Gaussian distribution; ; |C| is the absolute value of C, indicating the number of clusters.
[0091] A3. Embed C clusters to get the vehicle history trajectory cluster embedding Z c , expressed as:
[0092] ;
[0093] ;
[0094] Among them, O c represents the output dimension of the linear layer; |C| represents the number of clusters; F c Represents a vector with trainable parameters W c Linear layer of W c Denotes the linear layer F c The layer weight coefficient of .
[0095] Vehicle historical action intention embedding Z in vehicle trajectory embedding guided by LLM m , specifically:
[0096] B1. The historical trajectory data X of the i-th vehicle iInput into the large language model LLM to generate a pattern containing the vehicle's historical movement intention;
[0097] Use the specified roles in the prompt and provide a precise description of the system and its tasks, that is, to identify the motion mode in the vehicle movement, specify the data format input to the LLM, this template format can ensure that the LLM correctly aligns the coordinates with the motion intention, and then given the historical trajectory data X of the i-th vehicle i A set of observation coordinates (i.e., the trajectory point coordinates of the i-th vehicle historical time period in step S1) is input into the large language model LLM to generate a model M containing the vehicle's historical motion intention i , expressed as:
[0098] ;
[0099] B2. The model M of the historical motion intention of the i-th vehicle i Transformed into the output embedding vector G through the word segmenter, expressed as:
[0100] ;
[0101] Among them, g ST Represents a tokenizer.
[0102] B3. Embed the output embedding vector to obtain the vehicle historical action intention embedding Z m , expressed as:
[0103] ;
[0104] ;
[0105] ;
[0106] Among them, F m () represents a matrix W with trainable parameters m Linear layer of W m Denotes the linear layer F m The layer weight coefficient, that is, the training parameter matrix; B represents the batch size; E S represents the output dimension of the word segmenter; M d represents the output dimension; G represents the embedding vector.
[0107] Historical trajectory embedding Z in LLM-guided vehicle trajectory embedding p , expressed as:
[0108] ;
[0109] ;
[0110] Among them, F p Represents a vector with trainable parameters W p Linear layer of W p Denotes the linear layer F p Layer weight coefficient; D ob represents the observation time length; X represents the historical trajectory matrix after decomposition in step S22.
[0111] In step S4, the obtained embedding vector is encoded to obtain the encoded vehicle history trajectory; wherein the vehicle history trajectory encoding includes the history trajectory encoding Z e Embedded with surrounding vehicles ne .
[0112] Encode the obtained embedding vector as follows:
[0113] S41. After obtaining all embedding vectors, cluster the vehicle historical trajectories into Z c , vehicle historical action intention embedding Z m , historical trajectory embedded in Z p The cascaded merge is performed, and the merged result is added to the tensor PE encoded by the historical trajectory position to obtain the motion embedding Z f , then embed the motion into Z f Passed as input to the motion encoder for encoding processing.
[0114] Motion Embed Z f It is expressed as:
[0115] ;
[0116] ;
[0117] Among them, concat() represents the concatenation function; M f Represents the dimension of the output embedding vector.
[0118] The tensor PE containing the position encoding information is represented as:
[0119] ;
[0120] ;
[0121] Among them, tp represents the position of the token in the sequence; d model Represents the dimension of token; h represents the encoded position index.
[0122] According to step S41, the encoded vehicle history trajectory Z is obtained e .
[0123] The encoder consists of multiple identical neural network layers (i.e., L layers), each of which consists of a multi-head self-attention mechanism and a feedforward network. The multi-head self-attention mechanism is defined as:
[0124] ;
[0125] ;
[0126] ;
[0127] Among them, d k represents the dimensions of K and V; Q, K, V represent query, key, and value matrices respectively; represents the learnable linear transformation of the g-th attention head; represents another learnable linear transformation for output projection; head g represents the g-th attention head; Represents the transpose of vector K.
[0128] The feedforward network definition is expressed as:
[0129] ;
[0130] Among them, W1 and W2 represent learnable weight matrices; b1 and b2 represent bias vectors of the feedforward network; and a represents the input of the feedforward network.
[0131] The final output Z of the encoder e is by embedding the motion into Z f Passed to L encoder layers, it is expressed as:
[0132] ;
[0133] ;
[0134] Among them, embed_size represents the size of embedding, and B represents the batch size; EncoderLayer Represents the encoding layer.
[0135] Neighboring vehicle trajectories are embedded in Z ne is obtained by applying a linear transformation to the historical observation trajectories of neighboring vehicles and is expressed as:
[0136] ;
[0137] ;
[0138] Among them, F ne Represents a trainable parameter matrix W ne Linear layer of W neDenotes the linear layer F ne The layer weight coefficient of X ne represents the historical trajectory matrix of the vehicle that is closest to the target vehicle in space; D represents the time period.
[0139] In step S5, the encoded historical vehicle trajectory is input into a decoder for decoding to obtain a prediction result of the future vehicle trajectory.
[0140] The decoder combines the vehicle’s motion pattern with social interactions from neighboring vehicles. Neighboring vehicle trajectories are embedded into Z ne and the output Z from the motion encoder e is input into the decoder, and the prediction result Z of the future vehicle trajectory is output n , expressed as:
[0141] ;
[0142] ;
[0143] in, represents the probability associated with the predicted trajectory; DecoderLayer represents the decoding layer; num represents the number of trajectories D that need to be predicted during inference pred Indicates the length of time required for inference.
[0144] In addition to predicting future trajectories, this embodiment can also predict probabilities and then estimate the uncertainty associated with each prediction. Specifically:
[0145] The probability p of the i-th vehicle i It is calculated by taking the negative squared Euclidean distance between the ground truth trajectory and the cluster center, normalizing it, and then applying softmax, expressed as:
[0146] ;
[0147] Among them, Y i represents the actual vehicle trajectory point; c j represents the jth trajectory cluster center.
[0148] like Figure 3 The figure shows the comparison between the prediction results of this embodiment and the prediction results of the traditional model. Figure 3 It can be seen that the prediction results of this method are better than those of the traditional large language model in terms of average displacement error ADE and final displacement error FDE.
[0149] By integrating the high-level semantic understanding and reasoning capabilities provided by LLM, this embodiment of the present invention can make full use of important clues such as scenes and vehicle intentions, thereby significantly improving the accuracy and robustness of trajectory prediction, laying the foundation for realizing a safe and efficient autonomous driving system.
[0150] Embodiment 2
[0151] This embodiment provides a vehicle trajectory prediction device based on large language model guidance, which is used to execute a vehicle trajectory prediction method based on large language model guidance in embodiment 1. The vehicle trajectory prediction device includes a processor, and the processor is provided with:
[0152] An acquisition module, used to acquire historical trajectory data corresponding to the vehicle;
[0153] A processing module, used for performing enhancement processing on the acquired vehicle historical trajectory to obtain a processed vehicle historical trajectory;
[0154] The embedding module is used to input the processed vehicle history trajectory into the large language model LLM to obtain the embedding vector corresponding to the vehicle history trajectory;
[0155] An encoding module, used to encode the obtained embedding vector to obtain an encoded vehicle history trajectory;
[0156] The decoding module is used to input the encoded vehicle historical trajectory into the decoder for decoding processing to obtain the prediction result of the future vehicle trajectory.
[0157] The processor described in this embodiment may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present application.
[0158] The processor described in this embodiment is connected to a memory for storing data or instructions. The memory may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory may be inside or outside the data processing device. In a specific embodiment, the memory is a non-volatile memory. In a specific embodiment, the memory includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0159] The memory can be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor. The processor reads and executes the computer program instructions stored in the memory.
[0160] The processor described in this embodiment is connected to a transmission device for transmitting data with an external device. The transmission device can be used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired or wireless network provided by a communication provider of the electronic device. In one example, the transmission device includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0161] The processor of this embodiment is connected to an input / output device for inputting or outputting information. The input / output device is used to input or output information. In this embodiment, the input information may be historical trajectory data, and the output information may be a vehicle trajectory prediction result.
[0162] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A vehicle trajectory prediction method based on large language model guidance, characterized in that: include: S1. Obtain historical trajectory data corresponding to the vehicle; S2. Performing enhancement processing on the acquired vehicle history trajectory to obtain a processed vehicle history trajectory; S3. Input the processed vehicle history trajectory into the large language model LLM to obtain the embedding vector corresponding to the vehicle history trajectory; the embedding vector includes the cluster embedding Z of the vehicle history trajectory c , vehicle historical action intention embedding Z m , historical trajectory embedded in Z p ; S4. Encode the obtained embedding vector to obtain the encoded vehicle history trajectory; S5. Input the encoded historical trajectory of the vehicle into the decoder for decoding to obtain the prediction result of the future vehicle trajectory; The vehicle historical trajectory cluster embedding Z c Specifically: A1. Preprocess the vehicle's historical trajectory; A2. Cluster the preprocessed vehicle history trajectories into C clusters; A3. Embed C clusters to get the vehicle history trajectory cluster embedding Z c , expressed as: Z c =F c (C,W c ) Among them, Z c represents the cluster embedding of vehicle historical trajectories; C represents the number of clusters; F c Represents a vector with trainable parameters W c Linear layer of W c Denotes the linear layer F c The layer weight coefficient of The vehicle historical action intention is embedded in Z m , specifically: B1. The historical trajectory data X of the i-th vehicle i Input into the large language model LLM to generate a pattern containing the vehicle's historical movement intention; B2. Convert the pattern of the historical motion intention of the i-th vehicle into an output embedding vector through a tokenizer; B3. Embed the output embedding vector to obtain the vehicle historical action intention embedding Z m , expressed as: Z m =F m (G,W m ) Among them, Z m Represents the vehicle's historical action intention embedding; F m Represents a vector with trainable parameters W m Linear layer of W m Denotes the linear layer F m The layer weight coefficient of ; G represents the embedding vector; The historical trajectory is embedded in Z p , expressed as: Z p =F p (X,W p ) Among them, Z p represents the historical trajectory embedding; F p Represents a vector with trainable parameters W p Linear layer of W p Denotes the linear layer F p The layer weight coefficient; X represents the decomposed matrix; In step S4, the obtained embedding vector is encoded, which is expressed as: Z e =EncoderLayer(Z f ) From f =concat(Z m ,Z c ,Z p )+PE Among them, Z e Represents the encoded vehicle history trajectory; EncoderLayer represents the encoding layer; Z f represents motion embedding; concat() represents the merging function; PE represents the tensor of historical trajectory position encoding; The prediction result of the future vehicle trajectory obtained in step S5 is expressed as: Among them, Z n Represents the prediction result of future vehicle trajectory; Represents the probability associated with the predicted trajectory; DecoderLayer represents the decoding layer; Z ne Represents the embedding of neighboring vehicle trajectories; Neighboring vehicle trajectories are embedded in Z ne is obtained by applying a linear transformation to the historical observation trajectories of neighboring vehicles and is expressed as: Z ne =F ne (X ne ,W ne ) Among them, F ne Represents a trainable parameter matrix W ne Linear layer of W ne Denotes the linear layer F ne The layer weight coefficient of X ne Represents the historical trajectory matrix of the vehicle that is closest to the target vehicle in space.
2. The vehicle trajectory prediction method based on large language model guidance according to claim 1 is characterized in that: The step S1 of obtaining the historical trajectory data corresponding to the vehicle specifically includes: obtaining the trajectory points of each vehicle in the historical time period of the A vehicles collected by the sensor, which is expressed as: in, They represent the spatial horizontal and vertical coordinates of the i-th vehicle at time t respectively; X i represents the historical trajectory data of the i-th vehicle; A represents the number of vehicles, i∈A; t represents a certain moment; D represents the time period.
3. The vehicle trajectory prediction method based on large language model guidance according to claim 2 is characterized in that: The step S2 specifically includes: S21. Obtain the historical trajectory data X of A vehicles i Stack as a matrix; S22. Perform tensor decomposition on the matrix to obtain the decomposed matrix X, which is expressed as: Among them, U ob and V ob represents an orthogonal matrix; S ob represents a diagonal matrix; T represents the transpose of the matrix; S23. Perform rank-k approximation on the decomposed matrix X through the first k singular values to obtain the vehicle trajectory enhancement result, which is expressed as: in, represents the vehicle trajectory enhancement result; k represents the number of singular values.
4. A vehicle trajectory prediction device based on large language model guidance, used to execute a vehicle trajectory prediction method based on large language model guidance according to any one of claims 1 to 3, the vehicle trajectory prediction device comprising a processor, characterized in that: The processor is provided with: An acquisition module, used to acquire historical trajectory data corresponding to the vehicle; A processing module, used for performing enhancement processing on the acquired vehicle historical trajectory to obtain a processed vehicle historical trajectory; The embedding module is used to input the processed vehicle history trajectory into the large language model LLM to obtain the embedding vector corresponding to the vehicle history trajectory; An encoding module, used to encode the obtained embedding vector to obtain an encoded vehicle history trajectory; The decoding module is used to input the encoded vehicle historical trajectory into the decoder for decoding processing to obtain the prediction result of the future vehicle trajectory.
