Trajectory prediction method of moving body

By introducing attention mechanism and encoder-decoder structure into the motion body trajectory prediction method, the problems of low prediction accuracy and calculation efficiency in the prior art are solved, and more accurate and efficient prediction of motion body trajectory is achieved.

CN119004121AInactive Publication Date: 2024-11-22HENAN INST OF SCI & TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411489665.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2024-11-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The trajectory prediction method based on mechanism models in the prior art performs poorly in long-term prediction scenarios, and the deep learning-based methods are difficult to effectively process spatial data and improve the computing efficiency of network models due to model error and low computational efficiency.

Method used

A trajectory prediction method for moving bodies is adopted, including a moving body intention recognition module and a trajectory output module. Through filtering processing, CNN layer, LSTM loop body unit and attention layer, the motion direction intention probability and trajectory encoding vector are generated, and the encoder is used. -The decoder structure predicts the location of the future trajectory, introduces an attention mechanism to mitigate the impact of non-important features, and enhances the perception of key features.

Benefits of technology

It improves the accuracy and calculation efficiency of trajectory prediction of moving bodies, reduces the error between the predicted position and the real position, and significantly improves the trajectory prediction accuracy of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119004121A_ABST
    Figure CN119004121A_ABST
Patent Text Reader

Abstract

The invention provides a trajectory prediction method for a moving body, and the method comprises the following steps: marking an input quantity according to labels in three movement directions of left turning, straight going and right turning, and obtaining a marked input quantity; the marked input quantity sequentially passes through an input layer, a CNN layer, an LSTM loop body unit, an attention layer and an output layer in a moving body intention recognition module to obtain a feature vector and a one-dimensional array; encoding the one-dimensional array into a context vector with a fixed length through an encoder of a moving body track output module, combining the context vector with each feature vector, and outputting a track encoding vector; predicting a future trajectory position of the moving body according to the trajectory coding vector through a decoder of a moving body trajectory output module; a moving body intention recognition module of an attention mechanism is introduced, the influence degree of non-important time sequence features is relieved, the perception ability of the model to key features is enhanced, and accurate prediction of trajectory prediction of a moving body is achieved through a moving body trajectory output module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of trajectory prediction of a moving body when grasping an object, and in particular to a trajectory prediction method of a moving body. Background Art

[0002] Object grasping is one of the most representative applications of robots, and its related technologies are widely used in assembly, sorting and other operations. Among them, the tracking and grasping of moving objects by robotic arms is one of the main applications in the field of robots, which can improve the intelligence and flexibility of robots, as well as the development level of industrial automation and intelligence, and has broad application prospects.

[0003] At present, there are mainly two types of trajectory prediction methods for moving bodies: trajectory prediction based on mechanism models and trajectory prediction based on deep learning. In a trajectory prediction system with high real-time performance, trajectory prediction based on mechanism models has a faster execution speed than deep learning models, but this trajectory prediction method is only applicable to short-term predictions and performs poorly in long-term prediction scenarios. In addition, this trajectory prediction method assumes that the current speed, acceleration and other states of the moving body are constant, which does not conform to the long-term motion law and cannot be applied to real motion scenarios. Trajectory prediction based on deep learning has strong adaptability and fitting capabilities. Compared with traditional trajectory prediction methods based on mechanism models, it can more accurately predict the position of the moving body. However, the model error (such as the cumulative error of LSTM) and the extraction effect of input information of the trajectory prediction method based on deep learning will affect the final output accuracy. Due to the need for a large number of parameter weights and matrix operations, it is difficult to express the local characteristics of spatial data, and the recognition accuracy is low and the computational efficiency is low. Summary of the invention

[0004] In view of the problems in the prior art, the present invention provides a trajectory prediction method for a moving body, which aims to better process spatial data and improve the computational efficiency of a network model.

[0005] A moving body trajectory prediction method includes a moving body intention recognition module and a moving body trajectory output module, and the following steps: Step 1: Filter the original data set and use the extracted moving body trajectory fragments as input; Step 2: Mark the input quantity according to the three types of movement direction labels: left turn, straight ahead, and right turn, to obtain the marked input quantity; Step 3: The labeled input is sequentially passed through the input layer, CNN layer, LSTM recurrent unit, attention layer, and output layer in the moving body intention recognition module to obtain a feature vector containing the moving body's moving direction intention probability and a one-dimensional array containing the moving trajectory time series information; Step 4: Encode the one-dimensional array into a fixed-length context vector through the encoder of the moving body trajectory output module, and combine the context vector with each feature vector to output the trajectory encoding vector; Step 5: The decoder of the moving body trajectory output module predicts the future trajectory position of the moving body according to the trajectory encoding vector.

[0006] Further: The one-dimensional array is obtained by the following steps: Step 3.1: Perform the first feature fusion and variable extraction on the input through the convolution kernel in the CNN layer to obtain the extracted feature data; Step 3.2: Pool the feature data twice through the pooling module in the CNN layer to obtain the pooled feature data; Step 3.3: Perform secondary feature fusion and extraction on the pooled feature data through the ReLU activation function in the CNN layer, and reconstruct the obtained data into a one-dimensional array; The feature vector is obtained by the following steps: Step 3.4: Input the one-dimensional array into the LSTM recurrent unit. The LSTM recurrent unit reads the hidden state of the one-dimensional array at the current moment and the historical trajectory information before the previous moment, and updates the hidden state at the current moment. Step 3.5: Obtain the feature information in the historical trajectory sequence of the moving body by continuously updating the hidden state at the current moment; Step 3.6: Weight the feature information through the attention layer and feed the weighted feature information into the Softmax activation function; Step 3.7: Generate the moving direction intention probability of the moving body through the Softmax activation function and logical judgment, and form a feature vector with the moving direction intention probabilities corresponding to the three types of moving directions: left turn, straight go and right turn.

[0007] Further: In step 3.6, the feature information is recorded as , the weight of feature information is , the output of the attention layer is :

[0008] Calculated using the vector dot product scoring function and Weight , the calculation formula is as follows:

[0009]

[0010] In the formula, is the score of the vector dot product scoring function; is the weight.

[0011] Further: In step 3.7, record is the feature vector, , , Represent three types of movement directions respectively. They represent the movement direction intention probabilities of the moving body corresponding to the three movement directions of left turn, straight going and right turn respectively;

[0012] In the formula, is the conditional probability of the feature vector and the one-dimensional array; The logical judgment is as follows: the confidence thresholds for left and right turns are set at 80%, and the confidence threshold for straight driving is set at 70%. When the probability of the moving body's movement direction intention is greater than the corresponding confidence threshold, the corresponding movement direction is determined to be the correct predicted direction, and the probability of this category is adjusted to 100%. The movement direction intention probabilities of the other two categories of movement directions are adjusted to 0. Suppose the characteristic vector composed of the movement direction intention probabilities of each moving body is : 。

[0013] Further: In step 5, the decoder outputs the vector according to the previous moment , the hidden state at the previous moment and trajectory encoding vector , Update the hidden state at the current moment ,Right now

[0014] In the formula, is an LSTM network unit; is the moving body trajectory coordinate vector output at the last moment; is the hidden state of the LSTM loop unit at the previous moment; Then, according to the hidden state at the current moment , the output vector of the decoder at the previous moment and trajectory encoding vector , through nonlinear transformation Update the decoder output vector at the current moment ,Right now:

[0015] The decoder outputs the moving body trajectory coordinate vector , converted to the predicted position coordinates through the fully connected layer ; .

[0016] Furthermore, the structures of the LSTM recurrent unit, encoder and decoder are the same, and are all stacked with 4 layers of LSTM, the Dropout rate between layers is 0.2, and the number of hidden units in each layer is 128.

[0017] The beneficial effects of the present invention are as follows: a moving body intention recognition module with an attention mechanism is introduced to reduce the influence of non-important time series features, enhance the model's perception of key features, and achieve accurate prediction of the moving body's trajectory through a moving body trajectory output module. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 The process of data processing in the present invention; Figure 2 This is the structural block diagram of the moving body intention recognition module. DETAILED DESCRIPTION

[0019] The present invention is described in detail below in conjunction with the accompanying drawings. The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention. The directional terms such as left, middle, right, top, and bottom in the embodiments of the present invention are only relative concepts or are based on the normal use state of the product, and should not be considered as restrictive.

[0020] A method for predicting the trajectory of a moving object, such as Figure 1 As shown, it includes a moving body intention recognition module and a moving body trajectory output module. The trajectory output module is composed of an encoder-decoder. The module sends the intention recognition data to the moving body to obtain the feature vector composed of the moving body's movement direction intention probability. , then, the feature vector With the preprocessed input The trajectory prediction method includes the following steps: A moving body trajectory prediction method includes a moving body intention recognition module and a moving body trajectory output module, and the following steps: Step 1: Filter the original data set and use the extracted moving body trajectory fragments as input; Step 2: Mark the input quantity according to the three types of movement direction labels: left turn, straight ahead, and right turn, to obtain the marked input quantity; Step 3: Combine Figure 2 As shown, the labeled input quantity passes through the input layer, CNN layer, LSTM recurrent unit, attention layer and output layer in the moving body intention recognition module in turn to obtain a feature vector containing the moving body's moving direction intention probability and a one-dimensional array containing the time series information of the moving trajectory; The one-dimensional array is obtained by the following steps: Step 3.1: Perform the first feature fusion and variable extraction on the input through the convolution kernel in the CNN layer to obtain the extracted feature data; Step 3.2: Pool the feature data twice through the pooling module in the CNN layer to obtain the pooled feature data; Step 3.3: Perform secondary feature fusion and extraction on the pooled feature data through the ReLU activation function in the CNN layer, and reconstruct the obtained data into a one-dimensional array; The feature vector is obtained by the following steps: Step 3.4: Input the one-dimensional array into the LSTM recurrent unit. The LSTM recurrent unit reads the hidden state of the one-dimensional array at the current moment and the historical trajectory information before the previous moment, and updates the hidden state at the current moment. Step 3.5: By continuously updating the hidden state at the current moment, the feature information in the historical trajectory sequence of the moving body is obtained. The feature information includes the trajectory information, motion information, and steering intention information of the moving body; Step 3.6: Weight the feature information through the attention layer and feed the weighted feature information into the Softmax activation function; Step 3.7: Generate the moving direction intention probability of the moving body through the Softmax activation function and logical judgment, and form a feature vector with the moving direction intention probabilities corresponding to the three types of moving directions: left turn, straight ahead and right turn; Step 4: Encode the one-dimensional array into a fixed-length context vector through the encoder of the moving body trajectory output module, and combine the context vector with each feature vector to output the trajectory encoding vector; Step 5: The decoder of the moving body trajectory output module predicts the future trajectory position of the moving body according to the trajectory encoding vector.

[0021] Among them, the input of the model Preprocessing mark, mark the movement direction label ; The present invention selects the NGSIM data set for training and testing the model, and marks the vehicles in the data set as moving bodies; then, the original data is filtered using a symmetric exponential moving average filtering algorithm to filter out errors and noise in the original data; and the extracted moving body trajectory segments are divided into three categories: left turn, straight and right turn; the input quantity ,in, is the lateral coordinate of the moving body; is the longitudinal coordinate of the moving body; is the speed of the moving body; The input amount after marking Input into the CNN layer to extract the temporal information between different feature information in the data; First, the labeled input Normalization is performed to ensure that the data size input to the CNN layer is the same. Secondly, the first feature fusion and variable extraction are performed in the convolution layer through a 3×3 convolution kernel. Then, the maximum pooling is used to pool the feature data extracted twice to reduce the amount of data required for prediction. At the same time, the ReLU activation function is used after the pooling layer to enhance the learning ability of the model. The secondary feature fusion and the extracted data are then reconstructed into a one-dimensional array. ; The array is used as the input of the fully connected layer of the CNN potential feature extraction network module to achieve the transformation of data dimension while retaining the useful information of the data; Finally, the fully connected layer converts the one-dimensional array containing the time series information of the motion trajectory Input LSTM recurrent body unit; through CNN potential feature extraction network module, the number of irrelevant feature variables can be reduced, the model training time can be compressed, and the accuracy of moving body trajectory prediction can be improved; In order to avoid information bottlenecks and overfitting, the structures of the LSTM recurrent unit, encoder, and decoder are the same and are all stacked with 4 layers of LSTM. The Dropout rate between layers is 0.2 and the number of hidden units in each layer is 128.

[0022] The one-dimensional array containing the timing information of the motion trajectory Input the LSTM recurrent unit to learn the motion law of the moving body; then, input the one-dimensional array containing the time series information of the motion trajectory into the LSTM recurrent unit, and , the LSTM loop unit reads the one-dimensional array at the current moment and the hidden state of the historical trajectory information before the last moment , to update the hidden state at the current moment ,Right now

[0023] The LSTM recurrent unit continuously updates the hidden state at the current moment. To learn the characteristic information in the historical trajectory sequence of the moving body; The feature information is sent to the attention layer for weighting, and the weighted feature information is used as the input of the Softmax activation function. The motion intention and motion intention probability are generated through the Softmax activation function and logical judgment, and the feature vector composed of the motion direction intention probability of the moving body corresponding to the three types of motion directions: left turn, straight go and right turn is output. ; In order to pay more attention to the time series information useful for moving body trajectory prediction, the present invention adds an attention layer after the LSTM recurrent body unit; the feature information extracted by the LSTM recurrent body unit is input into the attention layer for weighting; the output data of the hidden layer is set to , the weight of the input data is , the final result of the attention mechanism calculation is ; The calculation formula of the attention mechanism is as follows:

[0024] Calculated using the vector dot product scoring function and Weight ; The greater the correlation, the higher the score of the scoring function; the calculation formula is as follows:

[0025]

[0026] In the formula, is the score of the vector dot product scoring function; The attention mechanism is used to weight different input sequence information, reduce the influence of non-important time series features, enhance the model's perception of key features, and thus achieve accurate prediction; at the same time, the influence of irrelevant noise and interference on the model is ignored, and the prediction time of the model is compressed; The output of the attention mechanism The Softmax activation function outputs the horizontal and vertical motion intentions, where is the feature vector, i.e., the intention category vector output by the moving body intention recognition module, , , Represent three types of movement directions, namely left turn, straight ahead, and right turn. Then, the corresponding movement intention probability is obtained through logical judgment. , They represent the movement direction intention probabilities of the moving body corresponding to the three movement directions of left turn, straight going and right turn respectively;

[0027] In the formula, is the conditional probability between the model input and the moving body's movement intention; In order to make the prediction result more accurate, the present invention makes a logical judgment on the output probability: the confidence threshold for left turn and right turn is set to 80%, and the confidence threshold for straight is set to 70%. When the probability of the movement direction of the assumed moving body is greater than the corresponding confidence threshold, the corresponding movement direction is determined to be the correct predicted direction, and the probability of this category is adjusted to 100%, and the movement direction intention probabilities of the moving body corresponding to the other two categories of movement directions are adjusted to 0; let the feature vector composed of the movement direction intention probabilities of each moving body be , ; Through logical judgment, the intention recognition module is prevented from outputting multiple types of intention distribution at the same time, which improves the predictability and accuracy of the model; By introducing an attention mechanism between the LSTM recurrent unit and the output layer, the variables with high correlation with the trajectory of the moving body are screened out and assigned higher weights, so as to more accurately predict the movement intention probability of the moving body. In addition, the moving body intention recognition module simultaneously outputs the original probabilities of the three categories of intentions: left turn, straight ahead, and right turn. Each intent category probability vector and the historical trajectory information of the moving body The encoder module will send the track output module Encode into a fixed-length context vector and combine the context vector with the probability vector of each intent category Combined output trajectory encoding vector ; The decoder encodes the vector from the trajectory Extract feature information and predict the future trajectory position of the moving body; The trajectory output module of the present invention adopts an encoder-decoder structure, which is composed of two independent LSTM network loop bodies; the LSTM loop body unit, encoder and decoder have the same structure, all of which are stacked with 4 layers of LSTM, with a dropout rate of 0.2 between each layer and 128 hidden units in each layer; the model avoids information bottlenecks and overfitting, and the trajectory prediction of the moving body based on the intention recognition module can reduce the root mean square error between the predicted position and the actual position of the moving body, significantly improving the trajectory prediction accuracy of the model. The encoder encodes the historical trajectory information of the predicted moving body into a fixed-length context vector, which contains the encoder's understanding and memory of the historical trajectory features; First, the decoder outputs the vector according to the previous moment , the hidden state at the previous moment and trajectory encoding vector , Update the hidden state at the current moment ,Right now:

[0028] In the formula, is an LSTM network unit; is the moving body trajectory coordinate vector output at the last moment; is the hidden state of the LSTM loop unit at the previous moment; Then, according to the hidden state at the current moment , the vector output by the decoder at the previous moment and trajectory encoding vector , through nonlinear transformation Update the decoder output vector at the current moment ,Right now

[0029] The decoder outputs the moving body trajectory coordinate vector , converted to the predicted position coordinates through the fully connected layer (Dense layer) : .

[0030] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A method for predicting the trajectory of a moving object, Features: It includes a moving body intention recognition module and a moving body trajectory output module, and the following steps: Step 1: Filter the original data set and use the extracted moving body trajectory fragments as input; Step 2: Mark the input quantity according to the three types of movement direction labels: left turn, straight ahead, and right turn, to obtain the marked input quantity; Step 3: The labeled input is sequentially passed through the input layer, CNN layer, LSTM recurrent unit, attention layer, and output layer in the moving body intention recognition module to obtain a feature vector containing the moving body's moving direction intention probability and a one-dimensional array containing the moving trajectory time series information; Step 4: Encode the one-dimensional array into a fixed-length context vector through the encoder of the moving body trajectory output module, and combine the context vector with each feature vector to output the trajectory encoding vector; Step 5: The decoder of the moving body trajectory output module predicts the future trajectory position of the moving body according to the trajectory encoding vector.

2. The method for predicting the trajectory of a moving object according to claim 1, Features: The one-dimensional array is obtained by the following steps: Step 3.1: Perform the first feature fusion and variable extraction on the input through the convolution kernel in the CNN layer to obtain the extracted feature data; Step 3.2: Pool the feature data twice through the pooling module in the CNN layer to obtain the pooled feature data; Step 3.3: Perform secondary feature fusion and extraction on the pooled feature data through the ReLU activation function in the CNN layer, and reconstruct the obtained data into a one-dimensional array; The feature vector is obtained by the following steps: Step 3.4: Input the one-dimensional array into the LSTM recurrent unit. The LSTM recurrent unit reads the hidden state of the one-dimensional array at the current moment and the historical trajectory information before the previous moment, and updates the hidden state at the current moment. Step 3.5: Obtain the feature information in the historical trajectory sequence of the moving body by continuously updating the hidden state at the current moment; Step 3.6: Weight the feature information through the attention layer and feed the weighted feature information into the Softmax activation function; Step 3.7: Generate the moving direction intention probability of the moving body through the Softmax activation function and logical judgment, and form a feature vector with the moving direction intention probabilities corresponding to the three types of moving directions: left turn, straight go and right turn.

3. The method for predicting the trajectory of a moving object according to claim 2, Features: In step 3.6, the feature information is recorded as , the weight of feature information is , the output of the attention layer is : ; Calculated using the vector dot product scoring function and Weight , the calculation formula is as follows: ; ; In the formula, is the score of the vector dot product scoring function; is the weight.

4. The method for predicting the trajectory of a moving object according to claim 2 or 3, Features: In step 3.7, remember is the feature vector, , , Represent three types of movement directions respectively. They represent the movement direction intention probabilities of the moving body corresponding to the three movement directions of left turn, straight going and right turn respectively; ; In the formula, is the conditional probability of the feature vector and the one-dimensional array; The logical judgment is as follows: the confidence thresholds for left and right turns are set at 80%, and the confidence threshold for straight driving is set at 70%. When the probability of the moving body's movement direction intention is greater than the corresponding confidence threshold, the corresponding movement direction is determined to be the correct predicted direction, and the probability of this category is adjusted to 100%. The movement direction intention probabilities of the other two categories of movement directions are adjusted to 0. Suppose the characteristic vector composed of the movement direction intention probabilities of each moving body is : 。 5. The method for predicting the trajectory of a moving object according to claim 1, Features: In step 5, the decoder outputs the vector according to the previous moment , the hidden state at the previous moment and trajectory encoding vector , Update the hidden state at the current moment ,Right now ; In the formula, is an LSTM network unit; is the moving body trajectory coordinate vector output at the last moment; is the hidden state of the LSTM loop unit at the previous moment; Then, according to the hidden state at the current moment , the output vector of the decoder at the previous moment and trajectory encoding vector , through nonlinear transformation Update the decoder output vector at the current moment ,Right now: ; The decoder outputs the moving body trajectory coordinate vector , converted to the predicted position coordinates through the fully connected layer .

6. The method for predicting the trajectory of a moving object according to claim 1, Features: The structures of the LSTM recurrent unit, encoder, and decoder are the same, and are all stacked with 4 layers of LSTM. The Dropout rate between layers is 0.2, and the number of hidden units in each layer is 128.

Citation Information

Patent Citations

  • Vehicle trajectory prediction method based on LSTM and space-time attention mechanism

    CN114372116A

  • Vehicle trajectory prediction method based on self-learning of interactive motion relation between workshops

    CN116702986A

  • Vehicle track prediction model construction method combining data driving and knowledge guiding

    CN117141517A