A vehicle trajectory prediction method integrating bayonet importance and attention mechanism

By combining the importance and attention mechanism of the bayonet, combined with the Glove model, PageRank algorithm and Bi-LSTM neural network, the problem of not considering the interaction relationship between the vehicle and the bayonet in the existing technology is solved, and the accuracy and effect of trajectory prediction are improved.

CN114925875BActive Publication Date: 2025-02-28CHINA UNIV OF MINING & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210314126.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-28
Publication Date
2025-02-28
Estimated Expiration
2042-03-28

AI Technical Summary

Technical Problem

When existing deep learning makes trajectory prediction based on vehicle information or road information, the interaction relationship between the target vehicle and the passing mount is not considered, resulting in the accuracy of the prediction effect need to be improved.

Method used

The vehicle trajectory prediction method is adopted that integrates the importance of bayonets and attention mechanisms. By obtaining the vehicle data source, extracting the vehicle trajectory, training the Glove model to obtain the bayonet embedding word vectors, combining the PageRank algorithm to sort the importance of bayonets, using the SIF method to weight average to obtain the trajectory sentence vectors, using the K-means algorithm to cluster, and fusing the bayonet position coding and importance coding in the Bi-LSTM neural network, adding attention mechanisms to make predictions.

Benefits of technology

The accuracy and effect of trajectory prediction are improved, taking into account vehicle information and road information, and fully digging out the interactive relationship between the vehicle and the passing checkpoint, achieving more accurate vehicle trajectory prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114925875B_ABST
    Figure CN114925875B_ABST
Patent Text Reader

Abstract

The present invention discloses a vehicle trajectory prediction method integrating checkpoint importance and attention mechanism, comprising the following steps: (1) obtaining a data source of passing vehicles and performing data preprocessing on the data source to extract vehicle trajectories; (2) extracting a set of traffic checkpoints for representing positions, introducing a GloVe model in natural language processing, and obtaining an embedded word vector representation of each checkpoint by training vehicle trajectory data; and ranking the importance of each checkpoint by combining a PageRank algorithm; (3) using a SIF method to perform weighted averaging on the embedded word vectors of the checkpoints to obtain a trajectory sentence vector representation, and applying a K-means algorithm to cluster the trajectories; and (4) integrating the checkpoint position coding and the importance coding, and adding an attention mechanism, and using a Bi-LSTM neural network in each obtained cluster to train the vehicle trajectory and predict a new trajectory, which not only considers vehicle information or road information, but also considers the interactive relationship between the target vehicle and the checkpoints passed, and has a better trajectory prediction effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle trajectory prediction methods, and in particular to a vehicle trajectory prediction method integrating checkpoint importance and attention mechanism. Background Art

[0002] With the rapid development of cities, the proportion of urban population in the world's total population has exceeded 50%, which inevitably leads to more and more serious problems faced by the traffic system, which is a huge challenge for both traffic managers and traffic participants. For traffic managers, it is very difficult to balance traffic efficiency and traffic safety under the premise of large-scale and high-density traffic flow. For traffic participants, it is also very difficult to improve their travel efficiency in a complex and congested traffic environment. Fortunately, the emergence of intelligent transportation systems provides a solution to this contradiction.

[0003] An essential component in intelligent transportation systems is the vehicle trajectory prediction algorithm. Trajectory prediction plays a key role in trajectory big data analysis, and predicting the next position of a moving vehicle is an important branch in trajectory data mining. Trajectory prediction has great application value for both users and owners of trajectory data. Since trajectory prediction plays an important role in intelligent transportation systems (ITS), providing accurate trajectory prediction information can help improve transportation efficiency.

[0004] With the deepening of research on vehicle trajectory prediction at home and abroad, the research methods for trajectory prediction analysis have become increasingly rich. The most common methods are usually divided into statistics, probability models and deep learning. The traditional probabilistic graph model predicts by inferring the probability of the vehicle's future trajectory position. The most typical algorithm is the Markov model. In recent years, the emergence of deep learning has made a big leap in the accuracy of trajectory prediction. Deep learning has good nonlinear fitting capabilities and has great advantages in dealing with large, complex, and high-dimensional data problems. It can well describe the uncertain vehicle trajectory, so it has achieved better results.

[0005] However, most of the current deep learning trajectory prediction models only consider vehicle information or road information, and do not consider the interaction between the target vehicle and the checkpoints it passes through; the accuracy of the prediction effect needs to be improved. Summary of the invention

[0006] In view of the above-mentioned technical deficiencies, the purpose of the present invention is to provide a vehicle trajectory prediction method that integrates the importance of checkpoints and the attention mechanism, which takes into account both vehicle information or road information and the interactive relationship between the target vehicle and the checkpoints it passes through, so that the trajectory prediction accuracy is higher and the prediction effect is better.

[0007] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0008] The present invention provides a vehicle trajectory prediction method integrating the importance of the checkpoint and the attention mechanism, comprising the following steps:

[0009] (1) Obtain the data source of passing vehicles and perform data preprocessing on the data source to extract vehicle trajectories;

[0010] (2) Extract the set of traffic checkpoints used to represent the location in the trajectory of step (1), introduce the Glove model in natural language processing, and obtain the embedded word vector representation of each checkpoint by training the vehicle trajectory data; combine the PageRank algorithm to rank the importance of each checkpoint;

[0011] (3) Using the SIF method, we perform weighted averaging on the embedding vectors of the checkpoints obtained in step (2) to obtain the trajectory sentence vector representation, and then use the K-means algorithm to cluster the trajectories;

[0012] (4) The checkpoint position coding and importance coding are integrated, and the attention mechanism is added. A Bi-LSTM neural network is used to train the vehicle trajectory in each cluster obtained in step (3) to predict the new trajectory.

[0013] Preferably, the vehicle passing data source obtained in step (1) is the vehicle passing data of each checkpoint at different timestamps, and the vehicle passing data includes the vehicle license plate, vehicle model, passing time, checkpoint name, checkpoint location, and road number.

[0014] Preferably, the data preprocessing of the data source in step (1) specifically includes cleaning and removing duplicate data, missing data and invalid data in the data source, counting the daily traffic volume of each checkpoint, and extracting vehicle trajectories according to certain time intervals.

[0015] Preferably, the Glove model in natural language processing is introduced in step (2), and the embedded word vector representation of each checkpoint is obtained by training the vehicle trajectory data, which specifically includes:

[0016] (21a) Assume that the co-occurrence matrix is ​​X, X i Indicates bayonet i, X ij Indicates the number of times that the two checkpoints j and i co-appear in a context window of a specific size; the weight is calculated based on the distance d between the two checkpoints in the context window using the decreasing weighting function: decay = 1 / d;

[0017] (22a) Construct an approximate relationship between word vector and co-occurrence matrix:

[0018]

[0019] In the formula, w i and w j is the required word vector, b i and b j They are the bias items of the two word vectors respectively;

[0020] (23a) Construct the loss function:

[0021]

[0022] Where: |V| is the size of the dictionary, f(X ij ) is the weight item.

[0023] Preferably, in step (2), ranking the importance of each checkpoint in combination with the PageRank algorithm specifically includes:

[0024] (21b) The biased random walk is applied to the classic PageRank algorithm to obtain the biased PageRank based on the similarity of the checkpoint nodes, namely BSBPR, to evaluate the importance of the nodes in the first layer. The specific formula is as follows:

[0025]

[0026] Where: σ is the damping factor, which is 0.85; represents the probability that a vehicle passing through checkpoint u in network layer 1 moves to checkpoint v; N is the total number of checkpoint nodes;

[0027] (22b) Recursively calculate the BSBPR of nodes in layers α = 2, 3, ..., L, and define the multi-layer temporal biased PageRank of node u in layer α = 2, 3, ..., L as:

[0028]

[0029] Where, BSBPR(u) α-1 and They represent the power of the centrality of the same checkpoint node in the upper layer and the similarity between adjacent checkpoint nodes in the layer, respectively, where the exponents a and b are deviation parameters.

[0030] Preferably, in step (3), using the SIF method to perform weighted averaging on the embedded word vectors of the checkpoint obtained in step (2) to obtain the trajectory sentence vector representation specifically includes:

[0031] (31a) For each word vector in the sentence, multiply it by a weight Where a is a constant, p(w) is the frequency of the word;

[0032] (32a) Calculate the first principal component u of the sentence vector matrix and let each sentence vector subtract its projection on u.

[0033] Preferably, it is characterized in that the step (3) of applying the K-means algorithm to cluster the trajectories specifically includes:

[0034] (31b) Randomly select a sample from the data set as the initial cluster center c1;

[0035] (32b) First, calculate the shortest distance between each sample and the current cluster center, that is, the distance to the nearest cluster center, represented by D(x);

[0036] (33b) Calculate the probability of each sample being selected as the next cluster center Select the next cluster center according to the roulette wheel;

[0037] (34b) Repeat steps (32b) and (33b) until a total of K cluster centers are selected;

[0038] (35b) For each sample x in the data set i , calculate its distance to the K cluster centers and divide it into the class corresponding to the cluster center with the smallest distance;

[0039] (36b) For each category c i , recalculate its cluster center That is, the centroid of all samples belonging to this class;

[0040] (37b) Repeat (35b)(36b) until the position of the cluster center no longer changes.

[0041] Preferably, the fusion of the bayonet position code and the importance code in step (4) specifically includes:

[0042] (41) The position of each bayonet in each track is encoded using the following formula:

[0043]

[0044]

[0045] Where PE is a two-dimensional matrix with the same size as the input embedding. The rows represent the checkpoints and the columns represent the positions of the checkpoints in the trajectory. model represents the dimension of the card slot word vector, and i represents the position of the word vector;

[0046] (42) performing importance coding according to the importance ranking results of each checkpoint obtained in step (2);

[0047] (43) The position encoding obtained in step (41) and the checkpoint importance encoding obtained in step (42) are added to the input embedding to obtain the position encoding vector and the checkpoint importance vector, respectively, and the two are fused into the trajectory sentence vector.

[0048] Preferably, in step (4), using a Bi-LSTM neural network to train the vehicle trajectory includes building a bidirectional neural network Bi-LSTM, wherein the calculation method of LSTM is expressed by the following formula:

[0049] i t =σ(W ii x t +b ii +W hi h t-1 +b hi );

[0050] f t =σ(W if x t +b if +W hf h t-1 +b hf );

[0051] g t =tanh(W ig x t +b ig +W hg h t-1 +b hg );

[0052] σ t =σ(W io x t +b io +W ho h t-1 +b ho );

[0053] c t =f t ⊙c t-1 +i t ⊙g t ;

[0054] h t =o t ⊙tanh(c t ),

[0055] In the formula, h t is the hidden state at time t, c t is the cell state at time t, h t-1is the hidden state at time t-1, c t-1 is the cell state at time t-1, i t , f t , o t are the input gate, forget gate, and output gate at time t respectively; σ(·) is the sigmoid function, ⊙ is the Hadamard product, and tanh is the hyperbolic tangent function.

[0056] The beneficial effects of the present invention are:

[0057] Aiming at the shortcomings of the existing prediction methods, the present invention introduces a word vector embedding model, obtains the sentence vector representation of the trajectory by weighted average of the word vectors, and then performs clustering; and considering the characteristics of the checkpoints, adopts an improved PageRank algorithm to measure the importance of each checkpoint; finally, the checkpoint position coding and importance coding are integrated, the attention mechanism is introduced, and a Bi-LSTM neural network is established to predict the vehicle trajectory; the vehicle information and road information are considered, and the interactive relationship between the vehicle and the checkpoints passed is fully explored, so that the vehicle trajectory can be better predicted. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0059] Figure 1 It is the overall flow chart of the preferred embodiment patent provided by the present invention;

[0060] Figure 2 It is the distribution map of all checkpoints in the selected city;

[0061] Figure 3 This is the Bi-LSTM structure diagram;

[0062] Figure 4 It is a schematic diagram of the neural network input vector. DETAILED DESCRIPTION

[0063] 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.

[0064] This embodiment provides a vehicle trajectory prediction method that integrates the importance of the checkpoint and the attention mechanism, such as Figure 1 The figure shows the overall flow chart of this embodiment, which includes four modules: data acquisition and preprocessing module, card-word vector embedding and importance ranking module, trajectory sentence vector clustering module, and trajectory prediction module. The detailed implementation process of this embodiment is as follows, including four steps:

[0065] S1: Obtaining data sources and preprocessing data: Obtaining data sources including but not limited to the user's vehicle information (license plate, vehicle model, etc.) and the vehicle passing information set at each checkpoint from the traffic management department and related companies, and preprocessing;

[0066] S2: Checkpoint word vectors and importance ranking: First, the set of traffic checkpoints used to represent locations in the user trajectory is extracted; secondly, the Glove model in natural language processing is introduced to obtain the embedded word vector representation of each checkpoint by training vehicle trajectory data; then the importance of each checkpoint is ranked by combining the improved PageRank algorithm;

[0067] S3: Trajectory sentence vector clustering step: Use the SIF method to perform weighted averaging on the card mouth word vectors to obtain the trajectory sentence vector representation, and then apply the K-means algorithm to cluster the trajectories;

[0068] S4: Trajectory prediction algorithm steps: Fusion of bayonet position coding and importance coding, and addition of attention mechanism, use of Bi-LSTM neural network to train vehicle trajectories in each cluster to predict new trajectories.

[0069] Each part will be described in detail below. The acquisition of data source and data preprocessing in the above step S1 are mainly divided into the following two steps:

[0070] S11: Obtaining data: Based on the original data provided by the management department and related companies, the vehicle passing data of each checkpoint at different time stamps is obtained, including the license plate, vehicle model, passing time, checkpoint name, checkpoint location, road number, etc.

[0071] S12: Preprocessing raw data: Clean and remove duplicate data, missing data, and invalid data from the data source, count the daily traffic volume at each checkpoint, and extract vehicle trajectories according to certain time intervals.

[0072] The embedding and importance ranking of the checkpoint words in step S2 above can be specifically divided into the following steps:

[0073] S21: Define the following basic concepts:

[0074] Definition 1 (Traffic network): A traffic network is a directed graph G(V, E), where V represents a node and E represents an edge. Each v∈V represents a checkpoint, and each e∈E represents a connection between two nodes;

[0075] Definition 2 (Trajectory): The trajectory sequence of a vehicle is t = [v1, v2, ..., v n ], where v i∈ V,n is the length of the current trajectory;

[0076] Definition 3 (Trajectory Corpus): Trajectory Corpus TCorpus = {t1, t2, ..., t M}, where M represents the number of all trajectories, and the trajectory corpus is the set of all trajectories;

[0077] Definition 4 (Trajectory context): For a trajectory t i =[v1, v2, …, v n ] A context of length m The trajectory context is all the continuous sub-trajectories of length m in the trajectory;

[0078] Definition 5 (Trajectory Context Corpus): The length of the trajectory context corpus is m

[0079] Definition 6 (Node context): For a node v i , whose context is of length m and At the same time, define v i for The central word of

[0080] Definition 7 (Node Embedding Representation): For a certain v∈V, the node embedding representation θ v =(a1, a2, ..., a k )∈R k , k is the dimension of a pre-given vector;

[0081] S22: Using the Glove model in natural language processing to embed word vector representation of the card slot: Assume that the co-occurrence matrix is ​​X, X i Indicates bayonet i, X ij Indicates the number of times that checkpoint j and checkpoint i co-occur in a context window of a specific size; according to the distance d between the two checkpoints in the context window, a decaying weighting function is used: decay = 1 / d to calculate the weight, that is, the farther the distance between the two words, the smaller the weight of the total count; then, an approximate relationship between the word vector and the co-occurrence matrix is ​​constructed:

[0082]

[0083] In the formula, w i and w j is the required word vector, b i and b j They are the bias items of the two word vectors respectively.

[0084] Finally, construct the loss function:

[0085]

[0086] Where |V| is the size of the dictionary, the computational complexity of J is linearly related to the number of non-zero elements of the co-occurrence matrix X, and f(X ij ) is a weight item and must meet the following conditions:

[0087] (1) f(0) = 0, because is limited;

[0088] (2) the proportion of co-occurrences that occur less frequently is smaller;

[0089] (3) For co-occurrences that occur frequently, f(x) cannot be too large;

[0090] A weight function form with good experimental effect is:

[0091]

[0092] Definition 8 (Multi-layer time-series traffic network): A multi-layer time-series traffic network is a directed graph G(N, E, K), where N and E are the number of nodes and edge sets in the multi-layer time-series traffic network, respectively, and K = (K 1 +K 2 , …, K L ) is a series of subnets K α =(N,E α )(α={1,2,…,L}); the same nodes establish inter-layer directed connections in chronological order, and the inter-layer link from the α layer to the β layer is defined as Where β = α + 1;

[0093] Definition 9 (Bayport adjacency matrix A): If bayonet u is adjacent to bayonet v, then A uv =1, otherwise 0;

[0094] The similarity index between nodes is introduced as a symbol to measure the local importance of nodes, and the definition of the node similarity matrix is ​​given as follows:

[0095] Definition 10 (Simultaneousness matrix S of checkpoint nodes): In a multi-layer temporal traffic network, the similarity S between a checkpoint node u and its upstream and downstream checkpoint nodes v isuv It is a linear combination of the following three parts:

[0096] (1) In-degree similarity:

[0097]

[0098] In the formula, α in (u) and α in (v) are the neighbor checkpoint sets pointing to checkpoint nodes u and v respectively;

[0099] (2) Out-degree similarity:

[0100]

[0101] In the formula, α out (u) and α out (v) are the neighbor checkpoint sets pointed to by checkpoint nodes u and v respectively;

[0102] (3) Semantic similarity:

[0103]

[0104] In the formula, θ u and θ v are the embedded word vectors of the bayonet nodes u and v respectively;

[0105] The final similarity matrix is ​​S = λ·s in +μ·S out +ν·S semantic , where λ+μ+ν=1;

[0106] Definition 11 (Biased random walk jump probability matrix P): At a certain moment, the probability that a vehicle passing through checkpoint u in network layer α moves to checkpoint v is for

[0107]

[0108] In the formula, Represents the similarity between the slots u and v in the network layer α; Represents the adjacent relationship between the card slots u and v in the network layer α;

[0109] S23: Calculate the centrality of the checkpoint nodes at the initial moment (i.e., the first layer of the network); for this purpose, apply biased random walk to the classic PageRank algorithm, and obtain biased PageRank based on the similarity of checkpoint nodes, i.e., BSBPR, to evaluate the importance of nodes in the first layer:

[0110]

[0111] S24: Recursively calculate the BSBPR of nodes in layers α = 2, 3, ..., L; combined with the ordered unidirectional connections between layers, the centrality of a node u in layer α is related to the similarity of adjacent nodes and is also affected by the centrality of the same node in layer α-1, BPSBPR(u) α-1 The influence of; that is, the multi-layer temporal biased PageRank of node u in layer α includes the relevant network topology information of the previous layer; therefore, the multi-layer temporal biased PageRank of node u in layer α (α≥2) is defined as:

[0112]

[0113] Where, BSBPR(u) α-1 and They represent the power of the centrality of the same checkpoint node in the upper layer and the similarity between adjacent checkpoint nodes in the layer, respectively. The exponents a and b are deviation parameters used to adjust the degree of dependence of the node on the intra-layer and inter-layer factors, and both exponents a and b take values ​​greater than zero, that is, a>0, b>0;

[0114] The trajectory sentence vector clustering in step S3 above can be specifically divided into the following three steps:

[0115] S31: Use the SIF method to weight the average of the card mouth word vectors to obtain the trajectory sentence vector: First, multiply each word vector in the sentence by a weight Where a is a constant (the original text takes: 0.0001), p(w) is the frequency of the word; the more frequent the word, the smaller its weight. Then calculate the first principal component u of the sentence vector matrix, and let each sentence vector subtract its projection on u;

[0116] S32: Perform K-means clustering on the obtained trajectory sentence vector:

[0117] (1) Randomly select a sample from the data set as the initial cluster center c1;

[0118] (2) First, calculate the shortest distance between each sample and the current cluster center (that is, the distance to the nearest cluster center), represented by D(x);

[0119] (3) Calculate the probability of each sample being selected as the next cluster center Select the next cluster center according to the roulette wheel;

[0120] (4) Repeat steps (2) and (3) until a total of K cluster centers are selected;

[0121] (5) For each sample x in the data set i, calculate its distance to the K cluster centers and divide it into the class corresponding to the cluster center with the smallest distance;

[0122] (6) For each category c i , recalculate its cluster center (i.e., the centroid of all samples belonging to this class);

[0123] (7) Repeat (5) (6) until the position of the cluster center no longer changes;

[0124] The trajectory prediction algorithm in step S4 above can be specifically divided into the following steps:

[0125] S41: Position encoding of each bayonet in each track using sinusoidal position encoding:

[0126]

[0127]

[0128] Among them, PE is a two-dimensional matrix with the same size as the dimension of the input embedding. The rows represent the checkpoints and the columns represent the positions of the checkpoints in the trajectory. model represents the dimension of the card slot word vector, and i represents the position of the word vector. Therefore, the above formula means adding sin variables to the even positions of the word vector of each word and adding cos variables to the odd positions to fill the entire PE matrix;

[0129] S42: According to the ranking results of the importance of each checkpoint obtained in S2, importance coding is performed using the following rules:

[0130]

[0131]

[0132] S43: Add the position code and the checkpoint importance code to the input embedding to obtain the position code vector and the checkpoint importance vector, and merge the two into the trajectory sentence vector;

[0133] S44: Attention mechanism calculation: The attention mechanism imitates the internal process of biological observation behavior, that is, a mechanism that aligns internal experience and external sensation to increase the observation precision of some areas; the attention mechanism can quickly extract important features of sparse data, and is therefore widely used in natural language processing tasks, especially machine translation;

[0134] Apart from the Encoder-Decoder framework, the essential idea of ​​the attention mechanism is to map a query to a series of key-value pairs; assuming that the constituent elements in the original input Source are a series of<Key,Value> The data pair is composed of a certain element Query in the given target output Target. The calculation principle of the attention mechanism can be divided into three stages:

[0135] (1) Calculate the similarity between each Query (Q) and each Key (K) to obtain the weight of the Value (V) corresponding to each Key;

[0136] (2) Use the Softmax function to normalize the weights to obtain directly usable weight coefficients;

[0137] (3) The weight coefficient and the corresponding key value are weighted and summed to obtain the final attention value. The calculation formula is as follows:

[0138]

[0139] The self-attention mechanism is an improvement of the attention mechanism, which reduces the dependence on external information and is better at capturing the internal correlation of data or features. It can be understood that the three matrices Q, K, and V mentioned above all come from the same input;

[0140] S45: Build a bidirectional neural network Bi-LSTM: The calculation method of LSTM is as follows:

[0141] i t =σ(W ii x t +b ii +W hi h t-1 +b hi );

[0142] f t =σ(W if x t +b if +W hf h t-1 +b hf );

[0143] g t =tanh(W ig x t +b ig +W hg h t-1 +b hg );

[0144] o t =σ(Wio x t +b io +W ho h t-1 +b ho );

[0145] c t =f t ⊙c t-1 +i t ⊙g t ;

[0146] h t =o t ⊙tanh(c t ),

[0147] Among them, h t is the hidden state at time t, c t is the cell state at time t, h t-1 is the hidden state at time t-1, c t-1 is the cell state at time t-1, i t , f t , o t are the input gate, forget gate, and output gate at time t respectively; σ(·) is the sigmoid function, ⊙ is the Hadamard product, and tanh is the hyperbolic tangent function. The calculation method of tanh is as follows:

[0148]

[0149] S46: Pass the effectively fitted data through the pooling layer and the fully connected layer in turn, and output the trajectory prediction value. The pooling layer downsamples a large matrix into a small matrix by partitioning the data, reducing the amount of calculation, while reducing information redundancy, extracting effective features, and preventing overfitting. The maximum pooling layer selects the maximum value for each small area as the pooling result. The fully connected layer is a layer in which each node is connected to all nodes in the previous layer, which is used to integrate the features extracted previously.

[0150] The method of this embodiment aims at the shortcomings of the existing prediction methods, introduces a word vector embedding model, obtains the sentence vector representation of the trajectory by weighted average of the word vectors, and then performs clustering. In addition, considering the characteristics of the checkpoints, an improved PageRank algorithm is used to measure the importance of each checkpoint. Finally, the checkpoint position coding and importance coding are integrated, the attention mechanism is introduced, and a Bi-LSTM neural network is established to predict the vehicle trajectory. For the prediction of vehicle trajectory, it not only considers the vehicle information and road information, but also fully explores the interactive relationship between the vehicle and the checkpoints it passes through, which can better predict the vehicle trajectory.

[0151] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A vehicle trajectory prediction method integrating the importance of the checkpoint and the attention mechanism, characterized in that: The following steps are involved: (1) Obtaining a vehicle data source and performing data preprocessing on the data source to extract vehicle trajectories; obtaining a vehicle data source as vehicle data at different timestamps at each checkpoint, wherein the vehicle data includes a vehicle license plate, a vehicle model, a vehicle time, a checkpoint name, a checkpoint location, and a road number; (2) Extract the set of traffic checkpoints used to represent the location in the trajectory of step (1), introduce the Glove model in natural language processing, and obtain the embedded word vector representation of each checkpoint by training the vehicle trajectory data; combine the PageRank algorithm to rank the importance of each checkpoint; introduce the Glove model in natural language processing, and obtain the embedded word vector representation of each checkpoint by training the vehicle trajectory data. Specifically include: (21a) Assume that the co-occurrence matrix is ​​X, X i Indicates bayonet i, X ij It represents the number of times that the two ports j and i co-appear in a context window of a specific size. According to the distance d between the two ports in the context window, the attenuation function formula is adopted: Calculate weights; (22a) Construct an approximate relationship between word vectors and co-occurrence matrices: In the formula, w i and w j is the required word vector, b i and b j They are the bias items of the two word vectors respectively; (23a) Construct the loss function formula: Where: |V| is the size of the dictionary, f(X ij ) is the weight item; combining the PageRank algorithm to sort the importance of each checkpoint specifically includes: (21b) The biased random walk is applied to the classic PageRank algorithm to obtain the biased PageRank based on the similarity of the checkpoint nodes, namely BSBPR, to evaluate the importance of the nodes in the first layer. The specific formula is as follows: Where: σ is the damping factor, which is 0.85; represents the probability that a vehicle passing through checkpoint u in network layer 1 moves to checkpoint v; N is the total number of checkpoint nodes; (22b) Recursively calculate the BSBPR of nodes in layers α = 2, 3, ..., L, and define the multi-layer temporal biased PageRank of node u in layer α = 2, 3, ..., L as: Where, BSBPR(u) α-1 and They represent the power of the centrality of the same checkpoint node in the upper layer and the similarity between adjacent checkpoint nodes in the layer, respectively, where the exponents β and γ are deviation parameters; (3) Using the SIF method to perform weighted averaging on the embedded word vectors of the checkpoints obtained in step (2) to obtain a trajectory sentence vector representation, and applying the K-means algorithm to cluster the trajectories; Using the SIF method to perform weighted averaging on the embedded word vectors of the checkpoints obtained in step (2) to obtain a trajectory sentence vector representation specifically includes: (31a) For each word vector in the sentence, multiply it by a weight value Where a is a constant, p(w) is the frequency value of the word; (32a) Calculate the first principal component ρ of the sentence vector matrix, and subtract its projection on ρ from each sentence vector; Apply the K-means algorithm to cluster the trajectories, specifically including: (31b) Randomly select a sample from the data set as the initial cluster center; (32b) First, calculate the shortest distance between each sample x and the current cluster center, that is, the distance to the nearest cluster center, denoted by D(x); (33b) Calculate the probability value of each sample x being selected as the next cluster center Select the next cluster center according to the roulette wheel; (34b) Repeat steps (32b) and (33b) until a total of K cluster centers are selected; (35b) For each sample x in the data set, calculate its distance to the K cluster centers and assign it to the class corresponding to the cluster center with the smallest distance; (36b) For each sample x, the category c m , recalculate its cluster center The calculated cluster center is the centroid of all samples belonging to this class; (37b) Repeat (35b) (36b) until the position of the cluster center no longer changes; (4) The checkpoint position coding and importance coding are integrated, and an attention mechanism is added. A Bi-LSTM neural network is used to train the vehicle trajectory in each cluster obtained in step (3) to predict the new trajectory. The integration of the checkpoint position coding and importance coding specifically includes: (41) The position of each bayonet in each track is encoded using the following formula: Where PE is a two-dimensional matrix with the same size as the input embedding dimension. The rows represent the checkpoints and the columns represent the positions of the checkpoints in the trajectory. model represents the dimension of the card slot word vector, and z represents the position of the word vector; (42) performing importance coding according to the importance ranking results of each checkpoint obtained in step (2); (43) The position code obtained in step (41) and the checkpoint importance code obtained in step (42) are added to input embedding to obtain the position code vector and the checkpoint importance vector, and the two are integrated into the trajectory sentence vector; the Bi-LSTM neural network is used to train the vehicle trajectory, including building a bidirectional neural network Bi-LSTM, wherein the calculation method of LSTM is expressed by the following formula: i t =σ(W ii x t +b ii +W hi h t-1 +b hi ) f t =σ(W if x t +b if +W hf h t-1 +b hf ) g t =tanh(W ig x t +b ig +W hg h t-1 +b hg ) o t =σ(W io x t +b io +W ho h t-1 +b ho ) c t =f t ⊙c t-1 ⊙g t h t =o t ⊙tanh(c t ) In the formula, h t is the hidden state at time t, c t is the cell state at time t, h t-1 is the hidden state at time t-1, c t-1 is the cell state at time t-1, i t , f t , o t are the input gate, forget gate, and output gate at time t respectively; σ(·) is the sigmoid function, ⊙ is the Hadamard product, and tanh is the hyperbolic tangent function.

2. A vehicle trajectory prediction method integrating the bayonet importance and the attention mechanism as claimed in claim 1, characterized in that: The data preprocessing in step (1) specifically includes cleaning and removing duplicate data, missing data and invalid data in the data source, counting the daily traffic volume of each checkpoint, and extracting vehicle trajectories according to certain time intervals.

Citation Information

Patent Citations

  • Trajectory prediction method and device, electronic equipment and medium

    CN111798492A

  • Traffic flow prediction method based on LSTM-Attention

    CN112927507A