Track prediction method and device based on time-space diagram neural network learning model

Through the trajectory prediction method based on the spatio-temporal graph neural network learning model, the road topology information around the vehicle trajectory points is used to solve the problem of inaccurate matching between trajectories and roads in the intelligent traffic system, and more accurate trajectory prediction is achieved.

CN119313962APending Publication Date: 2025-01-14INST OF COMPUTING TECH CHINESE ACAD OF SCI
View PDF 0 Cites 10 Cited by

Patent Information

Application Number
CN202411423629.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

In intelligent transportation systems, the matching between trajectories and roads in the prior art is inaccurate, which affects the accuracy of trajectory prediction and makes it difficult to effectively utilize uncertain geographical context information.

Method used

The trajectory prediction method based on the spatiotemporal graph neural network learning model is adopted to predict the next trajectory point of the vehicle through data cleaning, trajectory compression, static and dynamic feature extraction, directed weighted graph network construction and sub-graph learning, and directly utilize the next trajectory point around the trajectory point. Road topology context information.

Benefits of technology

Effectively utilize uncertain information in the road network, avoid errors caused by map matching, improve the accuracy and accuracy of trajectory prediction, and can directly predict the next trajectory point of the vehicle on the road network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313962A_ABST
    Figure CN119313962A_ABST
Patent Text Reader

Abstract

The invention discloses a trajectory prediction method and device based on a time-space diagram neural network learning model, and the method comprises the steps: carrying out the data cleaning and trajectory compression based on to-be-classified original trajectory data, and outputting a compressed grid sequence; based on the grid sequence, static track information classification is executed, and track static attributes are extracted; dynamic space-time image track classification is executed, and track dynamic space feature attributes are extracted; the method comprises the following steps: pre-constructing a directed weighted network based on a driving road section connectivity attribute feature, and completing training of a trajectory prediction model based on a trajectory static attribute, a dynamic space feature attribute and the directed weighted network; and based on the trajectory prediction model, inputting spatial-temporal characteristic data of a trajectory to be predicted, and obtaining an optimal trajectory path prediction result. According to the method, uncertain track geographical background information on the road network can be effectively utilized, and meanwhile, errors caused by map matching are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent transportation technology, and in particular to a trajectory prediction method and device based on a spatiotemporal graph neural network learning model. Background Art

[0002] Currently, predicting the next location of a vehicle based on its driving history is one of the most critical tasks in Intelligent Transportation Systems (ITS). Accurately predicting the next trajectory point of a vehicle is crucial for various ITS applications, such as travel behavior research, traffic control, and traffic congestion monitoring.

[0003] However, the existing research on trajectory prediction follows the pattern of trajectory representation → trajectory prediction. Currently, trajectory representation methods tend to project trajectory points onto the road network through map matching and represent the trajectory based on the representation of the matching road. Despite such improvements, the use of grid cells as spatial units to represent trajectories ignores the constraints of the road network. In fact, the movement of vehicles depends heavily on various constraints of the traffic network.

[0004] In summary, accurate matching of trajectories to roads is a challenge in intelligent transportation systems, as the matching accuracy is largely affected by the quality of the trajectory. At the same time, since it is difficult to distinguish whether the trajectory matching result is accurate or confusing, how to effectively utilize such uncertain geographic context information is also a difficult problem, which is defined as the uncertain geographic context problem in geographic information science. Therefore, in order to solve the problem of inaccurate matching of trajectories and roads in the existing technology, it is urgent to propose a technical method that can use graph neural learning strategies to accurately predict the next trajectory point of the vehicle. Summary of the invention

[0005] In order to solve the problem of inaccurate matching between trajectory and road in the prior art, the present invention proposes a trajectory prediction method and device based on a spatiotemporal graph neural network learning model.

[0006] In a first aspect, an embodiment of the present application provides a trajectory prediction method based on a spatiotemporal graph neural network learning model, comprising:

[0007] Trajectory data preprocessing step: based on the original trajectory data to be classified, perform data cleaning and trajectory compression, and output a compressed grid sequence;

[0008] Trajectory classification step: Based on the grid sequence, static trajectory information classification is performed to extract the static attributes of the trajectory; and dynamic spatiotemporal image trajectory classification is performed to extract the dynamic spatial feature attributes of the trajectory;

[0009] Trajectory prediction model training steps: pre-build a directed weighted network based on the connectivity attribute characteristics of the driving section, and complete the trajectory prediction model training based on the trajectory static attributes, dynamic spatial feature attributes and directed weighted network;

[0010] Trajectory prediction step: Based on the trajectory prediction model, input the trajectory data to be predicted and obtain the optimal trajectory path prediction result.

[0011] In a specific embodiment of the present invention, the data preprocessing step further includes:

[0012] Data cleaning step: Based on the original trajectory data, clean the redundant fields, retain the valid static trajectory information and dynamic trajectory information, group and sort all the cleaned data, and output the final cleaned trajectory data;

[0013] Outlier point removal step: find and delete outliers in the cleaned trajectory data, evaluate the importance of trajectory points, and gradually remove minor points to reduce the density of trajectory points, and output the trajectory data after outlier processing;

[0014] Grid processing step: convert the longitude and latitude values ​​of the continuous trajectory points in the trajectory data after the abnormal point processing into the corresponding discrete grid point numbers. After the conversion is completed, the static trajectory information corresponding to the number is obtained by matching according to the pre-stored database;

[0015] Word embedding vector training steps: Based on static trajectory information, use the text representation model to train word embedding vectors for the grid points of the grid sequence, and output the word vectors of the grid points.

[0016] In a specific embodiment of the present invention, the above-mentioned trajectory classification step includes:

[0017] Static trajectory information classification step: the compressed grid sequence encoding is input into the pre-built static trajectory classification model, where the trajectory static classification model adopts a bidirectional long short-term memory network and a multi-head self-attention mechanism to extract context information in the trajectory sequence through the bidirectional long short-term memory network, and uses a multi-head self-attention mechanism combined with a block maximum pooling method to extract trajectory semantic information, and comprehensively outputs the static information classification results of the trajectory;

[0018] Spatiotemporal image trajectory classification step: convert the encoding of the grid sequence before compression into a single-channel grayscale image, input the pre-built spatiotemporal image trajectory classification model for feature extraction and classification, and output the dynamic image information classification result of the trajectory, wherein the trajectory image classification model adopts an improved convolutional neural network;

[0019] The static trajectory information classification step and the spatiotemporal image trajectory classification step are performed synchronously or superimposedly.

[0020] In a specific embodiment of the present invention, the above-mentioned trajectory prediction model training step includes:

[0021] Graph generation step: construct a directed weighted graph network based on attribute vectors according to the set of all road segments, the set of connectivity of all road segments and the set of attributes of connectivity;

[0022] Subgraph learning steps: Based on the directed weighted graph network, select any trajectory point, according to the weight decay strength when the distance to any trajectory point increases, and combine the set of trajectory static attributes and dynamic feature attributes, extract the directed subgraph network within the preset distance around any trajectory point distribution;

[0023] Model training steps: Input the directed weighted graph network, directed subgraph network, original historical trajectory points and trajectory data of the next trajectory point, train the prediction model and continuously optimize the model parameters, and complete the training of the trajectory prediction model based on the spatiotemporal graph neural network learning model.

[0024] In a specific embodiment of the present invention, the above trajectory prediction step further includes:

[0025] Movement ratio calculation step: input the trajectory data to be predicted into the trajectory prediction model, calculate the probability distribution of the next trajectory point on each road and the movement ratio on each road;

[0026] Prediction result loss analysis optimization steps: Based on the movement ratio, the loss function is used to calculate the loss value between the actual driving road conditions and the predicted trajectory results, and the parameters of the prediction model are optimized according to the loss value.

[0027] In a specific embodiment of the present invention, the directed weighted graph network G is represented as: G = (V, E, W);

[0028] Where V = {v1,v2,v3,…,v n} is the set of all road segments in G, n is the number of road segments in the network, E = {e ij} is the set of connectivity of all road segments in V, e ij Indicates road segment d i and section d j The connectivity between them is i and road segment v j When there is connectivity between ij =1, otherwise, e ij =0;

[0029] W = {w ij} is the connectivity e ij The attribute set of W is an N×N matrix, which represents the road segment d in the network. i and section d j Connectivityij Parameter attributes, when there is no connectivity between the road segments, w ij =0; for weighted graph networks, w ij ≥0,w ij Indicates connectivity ij Attributes.

[0030] In a specific embodiment of the present invention, the directed subgraph network g p It is expressed as:

[0031] Among them, p is the trajectory point, dist(v i ,p) represents the trajectory point p and its relationship with the road segment v i The distance between the projected points on , φ is a hyperparameter, For the road segment v i The attribute value of the road segment connectivity on It is used to control the strength of weight decay when the distance of trajectory point p increases.

[0032] In a second aspect, an embodiment of the present application provides a trajectory prediction device based on a spatiotemporal graph neural network learning model, which adopts a trajectory prediction method based on a spatiotemporal graph neural network learning model as described above, including:

[0033] Trajectory data preprocessing module: used to perform data cleaning and trajectory compression based on the original trajectory data to be classified, and output a compressed grid sequence;

[0034] Trajectory classification module: used to perform static trajectory information classification based on grid sequence and extract trajectory static attributes; and perform dynamic spatiotemporal image trajectory classification and extract trajectory dynamic spatial feature attributes;

[0035] Trajectory prediction model training module: used to pre-build a directed weighted network based on the connectivity attribute characteristics of the driving section, and complete the trajectory prediction model training based on the trajectory static attributes, dynamic spatial feature attributes and directed weighted network;

[0036] Trajectory prediction module: used to input the trajectory data to be predicted based on the trajectory prediction model and obtain the optimal trajectory path prediction result.

[0037] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned trajectory prediction method steps based on the spatiotemporal graph neural network learning model.

[0038] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the trajectory prediction method based on the spatiotemporal graph neural network learning model as described above are implemented.

[0039] In a fifth aspect, an embodiment of the present application provides an autonomous driving vehicle, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the trajectory prediction method based on the spatiotemporal graph neural network learning model as described above are implemented.

[0040] Compared with the related prior art, it has the following outstanding beneficial effects:

[0041] 1. The method of the present invention proposes a graph neural network generation method to extract the topological context information of the roads around the historical trajectory points. Secondly, a graph neural network learning method is designed to learn rich spatial and temporal features from the generated graph neural network. Finally, the extracted spatiotemporal features are input into the prediction method to predict the next trajectory point of the vehicle on the road network. The method of the present invention can effectively utilize the uncertain trajectory geographic background information on the road network while avoiding the errors caused by map matching;

[0042] 2. The method of the present invention no longer requires trajectory matching, but instead uses the topological context information of the road network around the trajectory point to predict the next trajectory point. Specifically, the graph neural network learning method obtains rich spatial and sequential features from the generated graph to help complete the final prediction task. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0044] Figure 1 Schematic diagram of a trajectory prediction method based on a spatiotemporal graph neural network learning model according to an embodiment of the present invention;

[0045] Figure 2 It is a schematic diagram of a trajectory prediction method based on a spatiotemporal graph neural network learning model according to another embodiment of the present invention;

[0046] Figure 3 This is a schematic diagram of converting the latitude and longitude trajectory into a grid sequence according to an implementation example of the present invention;

[0047] Figure 4 A schematic diagram of converting a grid sequence into a grayscale image according to an embodiment of the present invention;

[0048] Figure 5Schematic diagram of the calculation process of the dilated convolution according to an embodiment of the present invention;

[0049] Figure 6 A schematic diagram of trajectory prediction according to an embodiment of the present invention;

[0050] Figure 7 This is a schematic diagram of a trajectory prediction system based on a spatiotemporal graph neural network learning model according to an implementation example of the present invention;

[0051] Figure 8 It is a schematic diagram of an electronic device shown in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] It should be noted that the processor described in the present invention is the control center of the electronic device, which can be a processor or a general term for multiple processing elements. For example, it can be one or more central processing units (CPUs), or application specific integrated circuits (ASICs), or one or more integrated circuits configured to implement the embodiments of the present invention, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (FPGAs).

[0053] Optionally, the processor can perform various functions of the electronic device by running or executing a software program stored in the memory, and calling data stored in the memory.

[0054] In a specific implementation, as an embodiment, the processor may include one or more CPUs. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions). Electronic devices may include: servers, desktop computers, laptops, smart phones, tablet computers, embedded computers, etc., wherein the embedded computers include vehicles and robots, etc.

[0055] The memory is used to store the software program for executing the solution of the present invention, and the execution is controlled by the processor. The specific implementation method can refer to the above method embodiment, which will not be repeated here.

[0056] It should be noted that the structure of the electronic device shown in the drawings of the present invention does not constitute a limitation thereto, and the actual knowledge structure recognition device may include more or fewer components than shown in the drawings, or a combination of certain components, or a different arrangement of components.

[0057] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0058] It should also be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0059] In the present invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0060] It should also be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0061] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0062] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0063] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0064] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0065] In order to make the above features and effects of the present invention more clearly and understandably described, embodiments are given below and described in detail with reference to the accompanying drawings. This specification discloses one or more embodiments that include the features of the present invention. The disclosed embodiments are only for illustration. The scope of protection of the present invention is not limited to the disclosed embodiments, and the present invention is defined by the attached claims.

[0066] The following is a system embodiment corresponding to the above method embodiment. This embodiment can be implemented in conjunction with the above embodiment. The relevant technical details mentioned in the above embodiment are still valid in this embodiment. In order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the above embodiment.

[0067] The present invention aims to propose a trajectory prediction method based on a graph neural network learning model for predicting the next trajectory point of a vehicle, which can effectively utilize uncertain geographic context information and avoid the errors caused by trajectory matching. The present invention includes three main steps, including data cleaning and trajectory compression, trajectory classification, and trajectory prediction. The first two steps can extract the rich spatial and sequence features inherent in the historical trajectory, and the last step can directly predict the position of the vehicle in the road network without the need for subsequent matching.

[0068] Embodiment 1

[0069] like Figure 1 As shown, the embodiment of the present application provides a trajectory prediction method based on a spatiotemporal graph neural network learning model, including:

[0070] Trajectory data preprocessing step 101: based on the original trajectory data to be classified, data cleaning and trajectory compression are performed, and a compressed grid sequence is output;

[0071] Trajectory classification step 102: Based on the grid sequence, static trajectory information classification is performed to extract trajectory static attributes; and dynamic spatiotemporal image trajectory classification is performed to extract trajectory dynamic spatial feature attributes;

[0072] In a specific embodiment of the present invention, the classification method proposed for classifying the static information of the trajectory only uses the two most basic location information, longitude and latitude, combined with methods such as attention mechanism to classify the static information of the trajectory. Through a large number of experiments on real vehicle trajectory data sets, the experimental results prove the effectiveness of the method of the present invention, and at the same time prove the effectiveness of word2vec pre-trained word embedding vectors, which can better help deep networks understand the geographic semantics of different grids, thereby improving the trajectory classification performance.

[0073] The present invention designs a network model (biSAMNet) combining a bidirectional long short-term memory network and self-attention, which captures the contextual information of the text by using a bidirectional long short-term memory network, thereby retaining the word order to the maximum extent, and splicing the original word embedding in the obtained output. Then, a multi-head self-attention layer is used to strengthen the key information, and the key part of the text is extracted by the chunk-max pooling technique. This technology obtains coarse-grained position information by retaining the relative order information of multiple local eigenvalues, and even if the absolute position information is not retained, it can ensure that no omission occurs when the feature appears significantly multiple times. The model uses a Gaussian error linear unit (GELU) activation function. Compared with ELU and RELU functions, the GELU function can adapt to different learning rates and show more complex curvatures on the entire function curve, making it easier to approximate complex nonlinear functions.

[0074] In a specific embodiment of the present invention, the information loss problem that may be caused by the proposed trajectory compression technology is solved by constructing an image dataset from a spatial perspective, and introducing a convolutional neural network to construct a classification model based on trajectory images, so that the deep neural network can capture more feature details in the original trajectory.

[0075] The main contributions of the proposed trajectory classification model based on deep convolutional neural network include the following two aspects: (1) In order to solve the information loss problem caused by compressing the trajectory into a grid sequence, the original trajectory is converted into a single-channel grayscale image of uniform size as the spatial feature of the trajectory, and a neural network based on the improved ResNet is constructed for feature extraction and classification. That is, an original trajectory is converted in two different ways and then processed in different ways respectively, with text representing its sequential features and pictures representing its spatial features.

[0076] (2) Extensive experiments were conducted on real-world datasets. The experimental results show that the model in the specific embodiment of the present invention can effectively further extract trajectory features and improve classification accuracy.

[0077] Trajectory prediction model training step 103: pre-constructing a directed weighted network based on the connectivity attribute characteristics of the driving section, and completing the trajectory prediction model training based on the trajectory static attributes, dynamic spatial feature attributes and the directed weighted network;

[0078] In a specific embodiment of the present invention, a directed weighted network G = (V, E, W) of attribute vectors is constructed. Where V = {v1, v2, v3, ..., v n} is the set of all road segments in G, n is the number of road segments in the network, E = e ij} is the set of connectivity of all road segments in V, e ij Indicates road segment d i and section d jThe connectivity between them is i and road segment v j When there is connectivity between ij =1, otherwise, e ij = 0. W = {w ij} is a set of connectivity attributes (a set of road attributes), and W is an N×N matrix representing the road segment d in the network. i and section d j Connectivity ij Parameter attributes, when there is no connectivity between the road segments, w ij =0; for weighted graph networks, w ij ≥0,w ij Indicates connectivity ij Attributes.

[0079] The graph generation step extracts the adjacent roads around the trajectory data into a graph, and extracts the corresponding graph information to predict the next trajectory point. Specifically, given a road network G = (V, E, D) and a trajectory point p, the road segments in G within a distance of pω meters will be extracted as graph G p ω is a hyperparameter. Assume that there are s road segments with a distance p within ω meters, denoted as V p ={v1,v2,...,v s}, then the connection relationship E will be extracted from G as graph G p The edge is denoted as E p (Road connectivity attributes) Road segment embedding table (The road segment embedding table is a sorting matrix of routes whose s road segment distances p are within ω meters. It can be distance priority, habit priority, or road condition priority.) (parameter Represents the road matrix) to model it, and we can also get the subgraph G p The corresponding road segment embedding in is expressed as

[0080] In the embodiments of the present invention, the Transformer encoder layer of the trajectory prediction model has been widely used in text data modeling and has been proven to be effective in analyzing and extracting sequential features. Considering that both trajectory data and text data are organized in a similar sequential manner, some researchers have also introduced the Transformer encoder layer into trajectory analysis. These studies have shown that the Transformer encoder layer performs well in extracting sequential features from trajectories.

[0081] During model training, the input data includes the road network G = (V, E, W), the original historical trajectory points of the vehicle t = {p1, p2, ..., p |t|} and the ground truth of the next trajectory point p The input data flow starts from the graph generation step to the graph learning step and finally to the multi-task prediction step. The model parameters are optimized using the obtained loss by comparing the output prediction results with the ground truth.

[0082] Trajectory prediction step 104: Based on the trajectory prediction model, the trajectory data to be predicted is input to obtain the optimal trajectory path prediction result.

[0083] The trajectory prediction step includes: predicting the next road and the corresponding movement ratio (or movement probability) on this road. In a specific embodiment of the present invention, the movement ratio mr ranges from 0 (indicating that the vehicle is located at the starting point of a specific road) to 1 (indicating that the vehicle is located at the end point), but the present invention is not limited to this, and the movement ratio can also be set to other interval ranges. In this way, the next trajectory point on the road network can be directly obtained without any post-processing steps, such as map matching, which can also avoid related uncertainties.

[0084] Embodiment 2

[0085] like Figure 2 As shown, the embodiment of the present application provides a trajectory prediction method based on a spatiotemporal graph neural network learning model, including:

[0086] Trajectory data preprocessing step 201: based on the original trajectory data to be classified, data cleaning and trajectory compression are performed, and a compressed grid sequence is output;

[0087] 1. Data cleaning and trajectory compression

[0088] like Figure 3 As shown, an original track information contains all fields, with t original It contains dynamic information such as longitude, latitude, timestamp, speed and static information at time t.

[0089] t original = {mmsi,lon t ,lat t ,time t ,sog t ,heading t ,cog t ,…}(-1)

[0090] The purpose of this invention is to classify static information based on as little original information as possible, so only three dynamic information, longitude, latitude and timestamp, are retained, and a unique identification number is retained. process It is represented as shown in Formula 2.

[0091] tprocess = {mmsi,lon t ,lat t ,time t}(-2)

[0092] Then all t within a certain period of time process First group by the mmsi field, and then sort by the time timestamp in ascending order. Note that if the time of the current data is t The time from the last data t-1 If the interval is too long, it is considered as a new trajectory of the vehicle. In the experiment, 1 day (86400s) is used. Then, we reach the trajectory corresponding to each vehicle, but at this time t process The number of points is very large, and there are abnormal data points that need to be deleted.

[0093] After that, gridding is performed, which converts the continuous longitude and latitude values ​​into corresponding discrete grid point numbers. The specific operation is to first divide a series of predefined grids, and then correspond each longitude and latitude point to the grid it falls in. If the trajectory point is located in a certain grid area, it is considered that the vehicle has passed this grid point.

[0094] 2. Word2vec word embedding vector training

[0095] After obtaining the coded sequence, the present invention adopts the strategy of treating it as natural language and trains all sequences using the Skip-gram with Negative Sampling (SGNS) training method. Although a considerable number of sequences cannot be associated with specific vehicle files, considering the unsupervised learning characteristics of Word2Vec, that is, no data labels are required, the present invention uses all sequences for training. Specifically, the corpus of the Skip-gram model includes each word w∈V w and the context c∈V of the word c , where V w and V c are word vocabulary and context vocabulary respectively. Among them, w comes from an unlabeled corpus, which contains w1,w2,…,w n (usually n is very large), and the word w i The context of a word is the word w surrounding it in a window of length 2L i-L ,…,w i-1 ,w i+1 ,…,w i+L The present invention uses D to represent the set of word pairs generated by the observed word and its context. The present invention uses #(w,c) to represent the number of times the word pair (w,c) appears in D. and Represent the number of times w and c appear in D respectively.

[0096] Each word w∈V w All represented as a vector Likewise, each context c∈V c Represented as a vector Where d is the dimension of the embedding. The specific values ​​in the vector are regarded as the parameters to be learned by the model. The vector can also be Treated as |V w |×d matrix W, convert the vector It is called |V c |×d rows in the matrix C. In this case, W i (C i ) refers to the vector representation of the i-th word (context) in the corresponding vocabulary.

[0097] Consider whether a pair of words (w, c) comes from D. Assume that P(D=1|w, c) is the probability that (w, c) comes from D, and P(D=0|w, c)=1-P(D=1|w, c) is the probability that it does not come from D. The probability distribution model is:

[0098]

[0099] in and are d-dimensional vectors that the model needs to learn. The goal of negative sampling is to maximize the probability P(D=1|w,c) for the observed word pair (w,c), and at the same time maximize the probability P(D=0|w,c) for the randomly selected negative sample, under the premise that randomly extracting the context of a given word will produce an unobserved word pair (w,c). Therefore, the goal of SGNS for a single (w,c) is:

[0100]

[0101] Where k is the number of negative samples, c N It is based on the empirical distribution of single characters The sampled context is obtained. The goal is to train in an online manner by performing stochastic gradient updates on the word pairs observed in D. The global goal is then to sum the word pairs w,c observed in the corpus:

[0102]

[0103] Optimizing this objective results in observed word-context pairs having similar embeddings while diversifying unobserved pairs. Intuitively, words that appear in similar contexts should have similar embeddings, and SGNS maximizes the dot product of similar words.

[0104] Trajectory classification step 202: Based on the grid sequence, static trajectory information classification is performed to extract trajectory static attributes; and dynamic spatiotemporal image trajectory classification is performed to extract trajectory dynamic spatial feature attributes; wherein the static trajectory information classification step and the spatiotemporal image trajectory classification step are performed synchronously or superimposed.

[0105] 1. Classify the static information of the trajectory

[0106] GELU is an activation function in neural networks. It can adapt to a variety of learning rate settings and is particularly effective in the field of natural language processing. In order to understand the characteristics of the GELU function in more detail, this section will compare and analyze it with other common activation functions, including Sigmoid, Tanh, ReLU, and LeakyReLU.

[0107] (1) Sigmoid: The Sigmoid function is in the form of σ(x) = 1 / (1+e -x ), which maps the input to the interval (0,1). However, when the input value is particularly large or small, the gradient of the Sigmoid function approaches zero, which will cause the so-called gradient vanishing problem. This problem will affect the update of weights during the training of deep learning models, thus limiting the application scenarios of the Sigmoid function in the field of deep learning.

[0108] (2) Tanh: Tanh function is an extension of Sigmoid function, which is in the form of tan(x)=(e x -e -x ) / (e x +e -x ), mapping the input to the interval (-1,1). Although the Tanh function solves the problem that the output of the Sigmoid function is not centered at zero, the problem of gradient disappearance still exists.

[0109] (3) ReLU: The ReLU function is in the form of f(x) = max(0,x). It remains linear for positive numbers, which simplifies the calculation of gradients and helps reduce the amount of calculation during model training. However, ReLU returns to zero when processing negative inputs, which may cause some neurons to stop activating, which is often called the "dead neuron" problem.

[0110] (4) LeakyReLU: To address the limitations of ReLU, researchers proposed the LeakyReLU function. It is defined as f(x) = x when x ≥ 0, and f(x) = α x when x < 0, where α is a small constant. The design of LeakyReLU ensures that the gradient is preserved even if the input is negative, avoiding the problem of gradient disappearance.

[0111] GELU was proposed by Hendrycks and Gimpel in 2016, and its mathematical formula is x = Φ(x), where Φ(x) is the cumulative distribution function of the standard normal distribution. The characteristic of the GELU function is that it can simulate the random inactivation (dropout) of weights, so it performs well when processing language data with uncertainty. Compared with other activation functions, GELU has several significant differences. This non-convex, non-monotonic function is not linear in the positive domain and has curvature at all points. ReLU and ELU are convex monotone activation functions, which are linear in the positive domain and may lack curvature. Therefore, increasing curvature and non-monotonicity may make GELU easier to approximate complex functions than ReLU or ELU. In addition, ReLU(x) = x(x>0) and GELU(x) = x·Φ(x)(μ=0,σ=1), the present invention can see that ReLU gates the input according to the sign of the input, while GELU weights the input according to the difference between the input and other inputs.

[0112] In summary, the reason why GELU shines in natural language processing tasks is that its powerful nonlinear modeling ability combined with the simulated dropout effect can enhance the model's ability to capture data generalization. This ability is particularly critical in scenarios where subtle differences in speech and complex contextual relationships require highly sensitive processing. Although other activation functions have their advantages in specific applications, in the face of the complexity and uncertainty of the field of NLP, GELU has demonstrated its excellent adaptability and effectively processed nonlinear features in information.

[0113] 2. Classification of trajectory spatiotemporal images

[0114] like Figure 4 and Figure 5As shown, the deep learning model proposed in the present invention is the key to using an image method to represent trajectory data and using CNN to extract features, thereby solving the many limitations brought about by converting trajectories into text. The input of the model is a grayscale image converted from a grid sequence, and the output is a classification label of a vehicle, which is consistent with the previous research content. Specifically, for an uncompressed grid sequence consisting of hundreds of thousands of grid points, the present invention counts the access frequency of each grid, and normalizes and maps these frequencies to a grayscale value range of 50-255, ensuring that grid sequences of different lengths can be uniformly represented on a grayscale image of a fixed size. The grayscale image effectively expresses the spatial distribution characteristics of the vehicle trajectory, which allows CNN to effectively process it. CNN uses multiple convolutional layers to automatically identify key features in the data, such as complex spatial patterns of vehicles, including parking, anchoring, direct flight, and turning. At the same time, the convolutional layer has the characteristics of a local receptive field, which can capture the characteristics of local areas in the trajectory data, providing support for understanding and analyzing the behavior patterns of vehicles.

[0115] The conversion process is as follows Figure 5 As shown, after statistics, the original trajectory is converted into a two-dimensional array X, which contains 31*28 elements, and the element in the i-th row and j-th column is recorded as x ij , the present invention hopes to normalize this array to a new range [50,255], and the minimum value is converted to 50 in order to fully distinguish the difference between the grid points that the vehicle has passed and the ones that have not passed. First, find the maximum value x in the array max and the minimum value x min . Then calculate the normalized scale s and offset d. Then convert each element x in the array ij Normalization is performed, and the process is as shown in formulas (6)-(8).

[0116]

[0117] d=ax min ×s (-7)

[0118] x mormalized =x i ×s+d (-8)

[0119] Taking into account the small size of trajectory data images, the present invention reduces the size of ResNet to 6 layers, and uses dilated convolution on the first convolution layer. Dilated convolution, also known as expanded convolution, is a special type of convolution operation that introduces a dilation rate parameter on the basis of traditional convolution kernels to expand the receptive field of the convolution kernel. By inserting holes (i.e., zero padding) between adjacent elements of the convolution kernel, dilated convolution can cover a larger input area without increasing the number of parameters and computational cost. The main advantage of dilated convolution is that it can capture broader contextual information, which is particularly valuable for processing tasks that require global information. In addition, dilated convolution avoids the resolution reduction caused by continuous pooling operations, thereby allowing the network to learn more refined features while maintaining the resolution of the feature map. After introducing the dilation rate, the output size calculation formula of the convolution is as follows (-9)-(-10). Among them, w out Indicates the output size, w in represents the input size, stride represents the step size, padding represents the padding size, K represents the equivalent convolution kernel size, k represents the actual convolution kernel size, and r represents the void ratio. When the convolution kernel size is 3 and the void ratio is 2, the calculation process is as follows: Figure 7 shown.

[0120]

[0121] K=k+(k-1)·(r-1) (-10)

[0122] Trajectory prediction model training step 203: pre-constructing a directed weighted network based on the connectivity attribute characteristics of the driving section, and completing the trajectory prediction model training based on the trajectory static attributes, dynamic spatial feature attributes and the directed weighted network;

[0123] In a specific embodiment of the present invention, the trajectory prediction model training step 203 includes:

[0124] Graph generation step 2031: constructing a directed weighted graph network based on attribute vectors according to the set of all road segments, the set of connectivity of all road segments and the set of attributes of connectivity;

[0125] like Figure 6 As shown, in a specific embodiment of the present invention, a directed weighted network G = (V, E, W) of attribute vectors is constructed. Where V = {v1, v2, v3, ..., v n} is the set of all road segments in G, n is the number of road segments in the network, E = {e ij} is the set of connectivity of all road segments in V, e ij Indicates road segment d i and section d jThe connectivity between them is i and road segment v j When there is connectivity between ij =1, otherwise, e ij = 0. W = {w ij} is a set of connectivity attributes, W is an N×N matrix, representing the road segment d in the network i and section d j Connectivity ij Parameter attributes, when there is no connectivity between the road segments, w ij =0; for weighted graph networks, w ij ≥0,w ij Indicates connectivity ij Attributes.

[0126] Subgraph learning step 2032: Based on the directed weighted graph network, select any trajectory point, according to the weight decay strength when the distance to the arbitrary trajectory point increases, and combine the set of trajectory static attributes and dynamic feature attributes, extract a directed subgraph network within a preset distance around the arbitrary trajectory point distribution;

[0127] In a specific embodiment of the present invention, the adjacent roads around the trajectory data are extracted as a graph through the graph generation step, and the corresponding graph information is extracted for predicting the next trajectory point. Specifically, given a road network G = )V, E, D) and a trajectory point p, the road segments in G that are within ω meters from the trajectory point p will be extracted as the graph G p ω is a hyperparameter. Assume that there are s road segments with a distance p within ω meters, denoted as V p ={v1,v2,...,v s}, then the connection relationship E will be extracted from G as graph G p The edge is denoted as E p . Segment embedding table To model it, we can also get the subgraph G p The corresponding road segment embedding in is expressed as Using graph G p =(V p ,E p ,D p ) to represent the trajectory point p. Therefore, considering this distance decay effect, an exponential function is used to simulate the influence of each subgraph node on the trajectory point p, and the representation method of p is defined as the formula.

[0128]

[0129] Among them, g p Represents the subgraph network, dist)v i ,p) represents the trajectory point p and its relationship with the road segment vi The distance between the projected points on , φ is a hyperparameter used to control the strength of weight decay as the distance increases (i.e. ).

[0130] Therefore, and based on the previous driving habits, the given original historical trajectory t = {p1, p2, ..., p |t|}, its initial representation can be defined as g t ={g1,g2,...,g |t| The output of the graph generation step is the historical trajectory matrix (G t ,g t )={(G1,g1),(G2,g2),...,(G |t| ,g |t| )}.

[0131] The Transformer encoder layer performs well in extracting sequential features from trajectories. Therefore, given a historical trajectory t = {p1, p2, ..., p |t|} t ={g1,g2,...,g |t|} and g p The subgraph queue is input into the Transformer encoder layer in the prediction model and is used to build a sequential dependency model, that is, to output the shortest or optimal path that is frequently traveled.

[0132]

[0133] in, represents the trajectory features after the l-1th layer of the graph learning step. The input of the Transformer encoder layer is the representation of all historical trajectory points (i.e., g t ), the output is an updated representation that takes into account sequential dependencies (i.e. ).

[0134] Model training step 2033: input the directed weighted graph network, the directed subgraph network, the original historical trajectory point and the trajectory data of the next trajectory point, train the prediction model and continuously optimize the model parameters, and complete the training of the trajectory prediction model based on the spatiotemporal graph neural network learning model.

[0135] In a specific embodiment of the present invention, during model training, the input data includes the road network G = (V, E, D), the original historical trajectory points of the vehicle t = {p1, p2, ..., p |t|} and the ground truth of the next trajectory point p The input data flow starts from the subgraph generation step to the subgraph learning step and finally to the multi-task prediction step. The model parameters are optimized using the obtained loss by comparing the output prediction results with the ground truth.

[0136] The experiments are based on the road network and trajectory dataset of Beijing city. The road network is obtained from OpenStreetMap (https: / / www.openstreetmap.org / ). The trajectory datasets are recorded in taxis in these two cities. In fact, neither the input nor the output of the model of the present invention requires map matching during model inference. However, during the model training process, the exact position of the next trajectory point on the road segment needs to be specified to calculate the loss for optimizing the model parameters. In order to obtain training data, the widely used map matching method is used to convert the trajectory points into a sequence of positions on the road segment (i.e., the road segment ID and the movement ratio). Only the matching result of the next tracking point is used as the ground truth to train and evaluate the method of the present invention. Therefore, the goal of the present invention is to obtain high-quality trajectories by preprocessing the dataset and filtering out trajectories with obvious noise (e.g., trajectory points with too fast and too low speed, and too large distance from the previous trajectory point to the next trajectory point). In addition, trajectories less than 10 minutes in the trajectory dataset are filtered out to avoid uncertainty in short-term trajectories. Finally, the matching results are also manually checked. Each dataset is divided into three non-overlapping parts along the time axis, including training dataset, validation dataset and test dataset, with a ratio of 2:1:1. After filtering out the relatively low-quality trajectories in the dataset, in order to simulate the trajectories in the real environment, Gaussian noise with a radius of 30 meters is added to a random half of the trajectories in the training and validation datasets.

[0137]

[0138] Similar Gaussian noise is added to all test data sets to obtain noisy test data sets. In this way, the present invention can evaluate the performance of the method of the present invention on noisy or non-noisy test data sets. The present invention also uses map matching on the noisy data sets to obtain the corresponding road segment position sequence.

[0139] Since urban areas are connected by a network of roads, it can take considerable time to travel from one location to another, even if they are closely spaced in Euclidean space.

[0140] Accuracy of predicted road segment ID

[0141]

[0142] in, is the actual location on the road, is the predicted position, lp is the size of the position. L2dis is a function that calculates the Euclidean distance between the true position and the predicted position, rn dis is a function that calculates the road network distance between them. Specifically, given two points on the road network, using the Dijkstra algorithm to calculate their shortest path distance, we can get rn dis .

[0143] Trajectory prediction step 204: Based on the trajectory prediction model, the trajectory data to be predicted is input to obtain the optimal trajectory path prediction result.

[0144] The trajectory prediction step 204 includes:

[0145] Movement ratio calculation step 2041: inputting the trajectory data to be predicted into the trajectory prediction model, calculating the probability distribution of the next trajectory point being located on each road and the movement ratio on each road;

[0146] Prediction result loss analysis optimization step 2042: Based on the movement ratio, a loss function is used to calculate the loss value between the actual driving road conditions and the predicted trajectory results, and the parameters of the prediction model are optimized according to the loss value.

[0147] Trajectory prediction and trajectory prediction update, including predicting the next road and the corresponding movement ratio (or movement probability) on this road. The movement ratio mr ranges from 0 (indicating that the vehicle is at the starting point of a specific road) to 1 (indicating that the vehicle is at the end point). In this way, the next trajectory point on the road network can be obtained directly without any post-processing steps such as map matching, which can also avoid related uncertainties. In this step, given the output of the graph learning step, the trajectory sequence will be modeled. Specifically, the input of this step is the updated trajectory representation after graph learning, that is, the input sequential dependency model, that is, the shortest or optimal path that is frequently traveled is input, where the node weight is The node characteristics are Trajectory representation matrix:

[0148]

[0149] Among them, N is the number of subgraph learning modules, LSTM is the long short-term memory function in the recurrent neural network, which controls the transmission state through the gate state, remembers the information that needs to be remembered for a long time, and forgets the unimportant information. Γ represents the trajectory matrix of the shortest or optimal path that vehicles often take.

[0150] Afterwards, two feed-forward layers are used to predict the probability distribution of the next trajectory point on each road. and the corresponding moving ratio

[0151]

[0152] in, represents the number of roads in the key road network, Here, σ represents the sigmoid activation function, which ensures that the value of mr ranges from 0 to 1. The predicted road segment ID is The probability value is the largest (i.e., rid = argmax (P rid )).

[0153] Finally, the present invention adopts the cross entropy L ce and mean square loss L mse They are used as the loss functions for the road segment ID and mobility ratio prediction tasks respectively. The final loss function can be described as follows.

[0154]

[0155] Among them, P rid and mr is the corresponding ground truth and λ is a hyperparameter.

[0156] Embodiment 3

[0157] like Figure 7 As shown, the embodiment of the present application provides a trajectory prediction device based on a spatiotemporal graph neural network learning model, which adopts the trajectory prediction method based on the spatiotemporal graph neural network learning model as described above, including:

[0158] The trajectory data preprocessing module 301 is used to perform data cleaning and trajectory compression based on the original trajectory data to be classified, and output a compressed grid sequence;

[0159] The trajectory classification module 302 is used to perform static trajectory information classification based on the grid sequence to extract the static attributes of the trajectory; and perform dynamic spatiotemporal image trajectory classification to extract the dynamic spatial feature attributes of the trajectory;

[0160] Trajectory prediction model training module 303: used to pre-build a directed weighted network based on the connectivity attribute characteristics of the driving section, and complete the training of the trajectory prediction model based on the trajectory static attributes, dynamic spatial feature attributes and the directed weighted network;

[0161] The trajectory prediction module 304 is used to input the trajectory data to be predicted based on the trajectory prediction model and obtain the optimal trajectory path prediction result.

[0162] Embodiment 4

[0163] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-mentioned trajectory prediction method based on the spatiotemporal graph neural network learning model.

[0164] Embodiment 5

[0165] An embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the trajectory prediction method based on the spatiotemporal graph neural network learning model as described above are implemented.

[0166] In addition, combined Figure 1 The trajectory prediction method based on the spatiotemporal graph neural network learning model described in the embodiment of the present application can be implemented by an electronic device, such as a computer device. Figure 8 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present application.

[0167] In some of these embodiments, the computer device may further include a communication interface 83 and a bus 80. Figure 8 As shown, the processor 81, the memory 82, and the communication interface 83 are connected via a bus 80 and communicate with each other.

[0168] Specifically, the processor 81 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 embodiments of the present application.

[0169] The memory 82 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 81 .

[0170] The processor 81 implements any one of the trajectory prediction methods based on the spatiotemporal graph neural network learning model in the above embodiments by reading and executing computer program instructions stored in the memory 82.

[0171] Embodiment 6

[0172] An embodiment of the present application provides an autonomous driving vehicle, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the trajectory prediction method based on the spatiotemporal graph neural network learning model as described above are implemented.

[0173] Combination Figure 1 The trajectory prediction method based on the spatiotemporal graph neural network learning model described in the embodiment of the present application can be implemented by an autonomous driving vehicle, such as a vehicle.

[0174] The trajectory prediction method and system based on the spatiotemporal graph neural network learning model of the present invention can be applied to various application scenarios of autonomous driving vehicles, such as: cars, ships, online taxis, robots, low-altitude aircraft, etc., but the present invention is not limited to this.

[0175] In summary, compared with the prior art, the method of the present invention has the following beneficial effects:

[0176] The present invention proposes to represent the trajectory using a subgraph constructed by the adjacent roads around the trajectory, and designs three steps to predict the next trajectory point based on the subgraph structure. The strategy of the present invention takes into account the limitations of the road network and avoids the uncertainty brought by matching the trajectory to the road. Although the main focus of the present invention is to predict the next trajectory point, the strategy of the present invention is expected to be developed in other tasks where the geographical context is very important. A flexible subgraph learning strategy is proposed for predicting the next trajectory point of the vehicle in the road network, including a subgraph generation step for extracting the topological information of the adjacent roads around the trajectory, a subgraph learning step for learning global sequence features and local spatial features, and a multi-task prediction step for predicting the next trajectory point of the vehicle in the road network. The uncertain contextual information of the adjacent roads around the historical trajectory points can be used to directly obtain the accurate position of the vehicle on the road network without any pre-processing or post-processing (such as map matching) in the model inference stage.

[0177] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0178] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A trajectory prediction method based on a spatiotemporal graph neural network learning model, characterized in that: include: Trajectory data preprocessing step: based on the original trajectory data to be classified, perform data cleaning and trajectory compression, and output a compressed grid sequence; Trajectory classification step: based on the grid sequence, static trajectory information classification is performed to extract trajectory static attributes; dynamic spatiotemporal image trajectory classification is performed to extract trajectory dynamic spatial feature attributes; Trajectory prediction model training step: pre-constructing a directed weighted network based on the connectivity attribute characteristics of the driving section, and completing the trajectory prediction model training based on the trajectory static attributes, the dynamic spatial feature attributes and the directed weighted network; Trajectory prediction step: Based on the trajectory prediction model, the trajectory data to be predicted is input to obtain the optimal trajectory path prediction result.

2. The trajectory prediction method based on the spatiotemporal graph neural network learning model according to claim 1 is characterized in that: The data preprocessing step also includes: Data cleaning step: Based on the original trajectory data, clean the redundant fields, retain the valid static trajectory information and dynamic trajectory information, group and sort all the cleaned data, and output the final cleaned trajectory data; Outlier point removal step: searching and removing outliers from the cleaned trajectory data, evaluating the importance of trajectory points, and gradually removing minor points to reduce the density of trajectory points, and outputting trajectory data after outlier point processing; Grid processing step: converting the latitude and longitude values ​​of the continuous trajectory points in the trajectory data after the abnormal point processing into corresponding discrete grid point numbers, and after the conversion is completed, obtaining the static trajectory information corresponding to the number according to the pre-stored database matching; Word embedding vector training step: Based on the static trajectory information, a text representation model is used to train word embedding vectors for the grid points of the grid sequence, and the word vectors of the grid points are output.

3. The trajectory prediction method based on the spatiotemporal graph neural network learning model according to claim 1 is characterized in that: The trajectory classification step comprises: Static trajectory information classification step: inputting the encoding of the compressed grid sequence into a pre-built static trajectory classification model, wherein the trajectory static classification model adopts a bidirectional long short-term memory network and a multi-head self-attention mechanism, extracting context information in the trajectory sequence through the bidirectional long short-term memory network, adopting the multi-head self-attention mechanism combined with a block maximum pooling method to extract trajectory semantic information, and comprehensively outputting the static information classification result of the trajectory; The spatiotemporal image trajectory classification step: converting the encoding of the grid sequence before compression into a single-channel grayscale image, inputting the pre-built spatiotemporal image trajectory classification model for feature extraction and classification, and outputting the dynamic image information classification result of the trajectory, wherein the trajectory image classification model adopts an improved convolutional neural network; The static trajectory information classification step and the spatiotemporal image trajectory classification step are performed synchronously or superimposedly.

4. The trajectory prediction method based on the spatiotemporal graph neural network learning model according to claim 1 is characterized in that: The trajectory prediction model training step includes: Graph generation step: constructing a directed weighted graph network based on attribute vectors according to a set of all road segments, a set of connectivity of all road segments, and a set of attributes of the connectivity; Subgraph learning step: based on the directed weighted graph network, select any trajectory point, according to the weight attenuation strength when the distance to the arbitrary trajectory point increases, and combine the set of the trajectory static attributes and the dynamic feature attributes, extract the directed subgraph network within the preset distance around the arbitrary trajectory point distribution; Model training step: input the directed weighted graph network, the directed subgraph network, the original historical trajectory point and the trajectory data of the next trajectory point, train the prediction model and continuously optimize the model parameters, and complete the training of the trajectory prediction model based on the spatiotemporal graph neural network learning model.

5. The trajectory prediction method based on the spatiotemporal graph neural network learning model according to claim 1 is characterized in that: The trajectory prediction step also includes: Movement ratio calculation step: inputting the trajectory data to be predicted into the trajectory prediction model, calculating the probability distribution of the next trajectory point being located on each road and the movement ratio on each road; Prediction result loss analysis optimization step: Based on the movement ratio, a loss function is used to calculate the loss value between the actual driving road conditions and the predicted trajectory results, and the parameters of the prediction model are optimized according to the loss value.

6. The trajectory prediction method based on the spatiotemporal graph neural network learning model according to claim 4 is characterized in that: The directed weighted graph network G is represented as: G = (V, E, W); Where V = {v1,v2,v3,…,v n } is the set of all road segments in G, n is the number of road segments in the network, E = {e ij } is the set of connectivity of all road segments in V, e ij Indicates road segment d i and section d j The connectivity between them is i and road segment v j When there is connectivity between ij =1, otherwise, e ij =0; W={w ij } is the connectivity e ij The attribute set of W is an N×N matrix, which represents the road segment d in the network. i and section d j Connectivity ij Parameter attributes, when there is no connectivity between the road segments, w ij =0; for weighted graph networks, w ij ≥0,w ij Indicates connectivity ij Attributes.

7. The trajectory prediction method based on the spatiotemporal graph neural network learning model according to claim 4 is characterized in that: The directed subgraph network g p It is expressed as: Among them, p is the trajectory point, dist(v i ,p) represents the trajectory point p and its relationship with the road segment v i The distance between the projected points on , φ is a hyperparameter, For the road segment v i The attribute value of the road segment connectivity on It is used to control the strength of weight decay when the distance of trajectory point p increases.

8. A trajectory prediction device based on a spatiotemporal graph neural network learning model, comprising the trajectory prediction method based on a spatiotemporal graph neural network learning model as claimed in any one of claims 1 to 7, characterized in that: include: Trajectory data preprocessing module: used to perform data cleaning and trajectory compression based on the original trajectory data to be classified, and output a compressed grid sequence; Trajectory classification module: used to perform static trajectory information classification based on the grid sequence and extract trajectory static attributes; and perform dynamic spatiotemporal image trajectory classification and extract trajectory dynamic spatial feature attributes; Trajectory prediction model training module: used to pre-build a directed weighted network based on the connectivity attribute characteristics of the driving section, and complete the training of the trajectory prediction model based on the static attributes of the trajectory, the dynamic spatial feature attributes and the directed weighted network; Trajectory prediction module: used to input the trajectory data to be predicted based on the trajectory prediction model and obtain the optimal trajectory path prediction result.

9. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of a trajectory prediction method based on a spatiotemporal graph neural network learning model as described in any one of claims 1 to 7.

10. A storage medium for storing a computer program for executing the trajectory prediction method 4 based on the spatiotemporal graph neural network learning model as described in any one of claims 1 to 7.

11. An autonomous driving vehicle, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the trajectory prediction method based on the spatiotemporal graph neural network learning model as described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Target search optimization method and device and storage medium

    CN119536369A

  • Vehicle track prediction method and device based on road ETC data

    CN119811092A

  • User group classification method based on spatio-temporal trajectory features

    CN119830113A

  • Tunnel pavement throwing object early warning method based on multi-mode perception

    CN120236199A

  • Trajectory recovery method and device based on hidden space condition constraint generation model, equipment, medium and product

    CN120951281A