A trajectory prediction method and system based on cluster spatiotemporal dynamic graph network

By adopting a clustered space-time dynamic graph network in traffic signal prediction, using matrix decomposition and tensor decomposition to reduce the amount of parameters, and through the method of fusion of spatial and temporal features, the problem of difficulty in learning heterogeneous space-time dependence in the prior art is solved, and efficient traffic signal prediction is achieved.

CN119296331BActive Publication Date: 2025-03-14QUANZHOU NORMAL UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411824715.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-14
Estimated Expiration
2044-12-12

AI Technical Summary

Technical Problem

The prior art is difficult to effectively learn the heterogeneous space-time dependence in topological traffic signals, especially on weak generalization capabilities on weak periodic traffic signals, and the large amount of parameters of dynamic maps, resulting in huge challenges in computing resources.

Method used

The trajectory prediction method based on the cluster space-time dynamic graph network is adopted, and the time cluster graph and spatial cluster graph are decomposed into smaller dimensions through matrix decomposition and tensor decomposition, reducing the amount of parameters of the graph, and generating aggregation feature maps through spatial blocks and time blocks to fuse spatial and temporal features.

Benefits of technology

Effective trajectory prediction on weak periodic traffic signals is realized, the number of parameters is reduced, and the calculation efficiency and generalization ability of the model are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119296331B_ABST
    Figure CN119296331B_ABST
Patent Text Reader

Abstract

The invention discloses a trajectory prediction method and system based on a cluster spatiotemporal dynamic graph network, belonging to the field of spatiotemporal data mining in an intelligent transportation system. The method comprises: collecting existing traffic signal data and performing preprocessing; selecting a training set from the preprocessed traffic signal data and performing clustering, and assigning a category index to the remaining traffic signal data after removing the training set based on the clustering result; randomly sampling two groups of data, historical traffic signals and future traffic signals, and corresponding category indexes from the traffic signal data, inputting the historical traffic signals into an embedding layer for mapping, and obtaining high-dimensional features; inputting the high-dimensional features into a spatial block and a temporal block to generate a spatial aggregation feature map and a temporal aggregation feature map, and fusing the spatial aggregation feature map with the temporal aggregation feature map to obtain an aggregation feature; inputting the aggregation feature into a de-embedding layer for mapping, and obtaining a future topological signal traffic signal, thereby completing trajectory prediction based on a cluster spatiotemporal dynamic graph network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of spatiotemporal data mining in intelligent transportation systems, and in particular to a trajectory prediction method and system based on a cluster spatiotemporal dynamic graph network. Background Art

[0002] In order to organize and manage the traffic network, ITS deploys a large number of sensors (nodes) in the traffic network to collect traffic signals, including vehicle trajectories, traffic flow, vehicle speed, lane occupancy, etc. By collecting these traffic signals, the topological traffic signal prediction model can be trained to predict future topological traffic signals. In recent years, topological traffic signal prediction models based on deep learning have been proven to be effective, and the core of these models is to learn the spatiotemporal dependency of topological traffic signals. Spatiotemporal dependency refers to the association between nodes and the association between time steps in traffic signals. By learning spatiotemporal dependency and aggregating spatiotemporal features, traffic prediction can be achieved. The spatiotemporal dependency of traffic signals is heterogeneous, that is, different signals may have different spatiotemporal dependencies. For example, during the morning and evening peaks, the main traffic directions between residential areas and office areas are usually opposite. During the morning peak, the traffic detected by sensors in the office area mainly comes from the residential area. When predicting the node traffic in the office area, the model will rely heavily on the traffic in the residential area. However, during the evening peak, this dependence will be weakened.

[0003] In order to distinguish the heterogeneity of spatiotemporal dependencies, previous methods used the periodic characteristics of traffic signals to construct dynamic graphs, that is, to design a unique graph for each timestamp / date stamp. This method has two problems. First, the dynamic graph is based on the significant periodicity of traffic signals. It is difficult to implement it on traffic signals with weak periodicity, that is, the generalization ability is weak; second, compared with static graphs, dynamic graphs require more parameters, which brings huge challenges to video memory.

[0004] In summary, how to learn the heterogeneous spatiotemporal dependencies of topological traffic signals and construct an efficient topological traffic prediction method is an urgent problem to be solved. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a trajectory prediction method and system based on a cluster spatiotemporal dynamic graph network, the method comprising:

[0006] Step S1, collecting existing traffic signal data and preprocessing it;

[0007] Step S2, selecting a training set from the preprocessed traffic signal data and performing clustering, and assigning a category index to the remaining traffic signal data after removing the training set based on the clustering result;

[0008] Step S3, randomly sampling two sets of data of historical traffic signals and future traffic signals and corresponding category indexes from the traffic signal data, inputting the historical traffic signals into an embedding layer for mapping, and obtaining high-dimensional features;

[0009] Step S4, inputting the high-dimensional features into the spatial block and the temporal block to generate a spatial aggregation feature map and a temporal aggregation feature map, and fusing the spatial aggregation feature map and the temporal aggregation feature map to obtain an aggregation feature;

[0010] Step S5: input the aggregated features into the de-embedding layer for mapping, obtain the future topological signal traffic signal, and complete the trajectory prediction based on the cluster spatiotemporal dynamic graph network.

[0011] Optionally, in step S1, the preprocessing process specifically includes:

[0012] ,

[0013] in, is the preprocessing function, X is the traffic signal data, and denote the mean and standard deviation functions respectively.

[0014] Optionally, in step S2, the process of selecting a training set from the processed traffic signal data and performing clustering specifically includes:

[0015] a. Randomly select 60% of the data from the traffic signal data as a training set;

[0016] b. Set the number of clustering categories q in the k-means algorithm;

[0017] c. Randomly select q samples from the training set as cluster centroids;

[0018] d. Calculate the distance between each sample and the q centroids respectively, and divide the training set into categories based on the distance;

[0019] e. Based on the division results, calculate the mean of all samples divided into a class, and update the centroid of the class based on the mean;

[0020] f. Compare the distance between the original centroid and the updated centroid. If the distance is less than the preset distance, terminate clustering, otherwise repeat steps bd.

[0021] Optionally, in step S3, the historical traffic signal is input into the embedding layer for mapping, and the content of obtaining the high-dimensional features specifically includes:

[0022] ,

[0023] in, is the fully connected layer, is a high-dimensional feature, For historical traffic signals.

[0024] Optionally, in step S4, the process of inputting the high-dimensional feature into a spatial block to generate a spatial aggregation feature map specifically includes:

[0025] ,

[0026] Among them, m represents the layer index of the cluster spatiotemporal dynamic graph network; is the i-th spatial aggregation feature map; Represents the adjacency matrix of a spatial static graph; is the adjacency matrix of the spatial graph of the ith cluster, Represents the adjacency matrix of the cluster space graph; i represents Category index of ; Represents the number of adjacency matrix input / output nodes.

[0027] Optionally, in step S4, the process of inputting the high-dimensional features into the time block to generate the time-aggregated feature graph specifically includes:

[0028] ,

[0029] in, is the i-th time aggregation feature map; Represents the adjacency matrix of a time-static graph; is the adjacency matrix of the i-th time cluster graph, represents the adjacency matrix of the temporal cluster graph, Indicates the number of output / input nodes.

[0030] The present invention also discloses a trajectory prediction system based on a cluster spatiotemporal dynamic graph network, the system comprising: a data acquisition module, a data clustering module, a data mapping module, a feature fusion module and a traffic prediction module;

[0031] The data acquisition module is used to collect existing traffic signal data and perform preprocessing;

[0032] The data clustering module is used to select a training set from the preprocessed traffic signal data and perform clustering, and assign a category index to the remaining traffic signal data after removing the training set based on the clustering result;

[0033] The data mapping module is used to randomly sample two sets of data, namely, historical traffic signals and future traffic signals, from the traffic signal data, and input the historical traffic signals into the embedding layer for mapping to obtain high-dimensional features;

[0034] The feature fusion module is used to input the high-dimensional features into the spatial block and the temporal block to generate a spatial aggregation feature map and a temporal aggregation feature map, and fuse the spatial aggregation feature map and the temporal aggregation feature map to obtain an aggregation feature;

[0035] The traffic prediction module is used to input the aggregated features into the de-embedding layer for mapping, obtain the future topological signal traffic signal, and complete the trajectory prediction based on the cluster spatiotemporal dynamic graph network.

[0036] Optionally, in the data acquisition module, the process of collecting existing traffic signal data and preprocessing the data specifically includes:

[0037] ,

[0038] in, is the preprocessing function, X is the traffic signal data, and denote the mean and standard deviation functions respectively.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] The present invention aims to design a learning method for heterogeneous spatiotemporal dependencies, design a cluster spatiotemporal graph to distinguish the heterogeneity of spatiotemporal dependencies, and solve the shortcomings of previous methods in dealing with weak periodic traffic signals and the problem of large number of parameters, thereby realizing topological traffic signal prediction. The present invention uses matrix decomposition to decompose the time cluster graph into two matrices with smaller dimensions to reduce the number of parameters of the graph; and uses tensor decomposition to decompose the spatial cluster graph into four matrices with smaller dimensions to reduce the number of parameters of the graph. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0042] Figure 1 A flow chart of the steps of a cluster spatiotemporal dynamic graph network according to an embodiment of the present invention;

[0043] Figure 2 A schematic diagram of the process of CSTDGM in a cluster spatiotemporal dynamic graph network according to an embodiment of the present invention;

[0044] Figure 3 This is a method step diagram of a trajectory prediction method based on a cluster spatiotemporal dynamic graph network according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0046] Embodiment 1

[0047] A trajectory prediction method based on cluster spatiotemporal dynamic graph network, such as Figure 3 As shown, the method includes:

[0048] Step S1, collect existing traffic signal data and perform preprocessing, wherein the traffic signal data includes vehicle trajectory, vehicle flow, vehicle speed and lane occupancy. In this embodiment, the traffic signal data is vehicle trajectory. Z-Score is used for preprocessing, and the formula is as follows:

[0049] , (1)

[0050] in, is the preprocessing function, X is the traffic signal data, and denote the mean and standard deviation functions respectively.

[0051] Step S2, select a training set from the traffic signal data and perform clustering, and assign a category index to the remaining traffic signal data after removing the training set based on the clustering results. The present invention divides the data set into training, verification and test sets in a ratio of 60%, 20% and 20%. The training set is clustered using the k-means algorithm, and the process is as follows: a) set the q value, which is the number of clustered categories; b) randomly select q samples as the centroid; c) calculate the distance between each sample and the q centroids respectively, and the present invention uses the central moment difference as an indicator to measure the distance. The sample is closest to the centroid, and is divided into the category corresponding to the centroid; d) when all samples have been divided, take the mean of the samples of each class to update the centroid of the class; e) determine the distance between the new and old centroids. If the distance is less than the set threshold, terminate the algorithm, otherwise repeat steps b)-d).

[0052] After the data is clustered, each sample in the training set has an index to indicate the category it belongs to. The distance between each sample in the validation set and the test set and the centroid is evaluated to assign them a category index.

[0053] Step S3: Randomly sample two sets of data, namely, historical traffic signals and future traffic signals, from the traffic signal data, and input the historical traffic signals into the embedding layer for mapping to obtain high-dimensional features. and future traffic signals All of them are for historical data, that is, at a certain moment in the past, if you want to train a model to extract the features of that moment, you need to input the traffic signals of the historical time period and the traffic signals of the future time period for that moment. However, the historical traffic signals and future traffic signals are included in the original existing traffic signal data and do not exceed the original scope.

[0054] Randomly sample a set of data from the processed original data without replacement and , which represent historical traffic signals and future traffic signals respectively. Figure 1 As shown, the purpose of the embedding layer is to Mapping to high-dimensional features , where the embedding layer, as the input layer of CSTDGN, is a nonlinear fully connected layer, and the activation function is the linear rectified function (Rectified Linear Unit, ReLU). And the formula of ReLU is as follows:

[0055] , (2)

[0056] , (3)

[0057] in, Refers to the input of the fully connected layer; Refers to the input of ReLU; and denote the weights and biases of the fully connected layer respectively. Therefore, the calculation of the embedding layer can be expressed as:

[0058] , (4)

[0059] Step S4: input the high-dimensional features into the spatial block and the temporal block to generate a spatial aggregation feature map and a temporal aggregation feature map, and fuse the spatial aggregation feature map and the temporal aggregation feature map to obtain an aggregation feature.

[0060] like Figure 1 As shown in Figure 5, the embedding layer is followed by M cluster-spatiotemporal dynamic graph modules (CSTDGM), each of which contains a spatial block and a temporal block.

[0061] Spatial Blocks: The graphs used for spatial aggregation in spatial blocks are generated as follows:

[0062] , (5)

[0063] Where m represents the layer index of CSTDGM; Represents the adjacency matrix of the Spatial StaticGraph (SSG); Represents the adjacency matrix of the Cluster-Spatial Graph (CSG); i represents Category index of ; Represents the number of input / output nodes of the adjacency matrix, S is spatial block, SS is spatial static, and SC is spatial cluster. SSG has 1 graph, which is shared by all categories of data; CSG has k graphs, corresponding to k categories of data. Both SSG and CSG are bipartite graphs, which record the dependencies between source nodes and target nodes, and can directly realize the spatial feature aggregation of target nodes. Among them, the source / target nodes represent the input / output nodes in the bipartite graph. The present invention fuses the two graphs to learn spatial dependencies, aiming to capture the commonalities of the spatiotemporal dependencies of all traffic signals while distinguishing their heterogeneity. Graph fusion adopts an averaging approach, because these adjacency matrices are generated in a data-driven manner, without the need for additional weighting methods. The adjacency matrix of SSG It can be generated by matrix decomposition:

[0064] , (6)

[0065] Among them, Dropout randomly sets the elements of the adjacency matrix to 0; and represents the input and output node embeddings, which are weight parameters. Since CSG designs a graph for each category, its parameter quantity is k times that of SSG. Therefore, the present invention designs a CSG generation method based on tensor decomposition, and its adjacency matrix It can be decomposed into four matrices:

[0066] , (7)

[0067] in, is the core matrix; is the cluster embedding matrix; is the input node embedding matrix; is the output node embedding matrix; the above matrices are all weight parameters. In addition, Represents tensor multiplication, and the subscripts represent the corresponding multiplication modes. Decomposed into four small matrices, the parameter quantity is Reduce to Among them, r1, r2, r3 are much smaller than k, N1, N2. In addition, the calculation process of the aggregation layer and the gated linear unit (GLU) can be expressed as:

[0068] , (8)

[0069] in, Refers to the adjacency matrix of the graph; Represents feature data; and Represents the weight parameter; Sigmoid represents the activation function, which is calculated as follows:

[0070] , (9)

[0071] in, Represents the input of Sigmoid. Therefore, the forward propagation of the spatial block can be expressed as follows:

[0072] , (10)

[0073] in, and represents the input and output of the spatial block of the m-th layer CSTDGM; It is also the input of the mth layer CSTDGM.

[0074] (a) Temporal chunks: Similar to spatial chunks, in temporal chunks, the graph used for aggregation is computed as follows:

[0075] , (11)

[0076] in, Represents the adjacency matrix of the Temporal Static Graph (TSG); The adjacency matrix representing the Cluster-Temporal Graph (CTG); Represents the number of output / input nodes. TSG has 1 graph shared by all categories of data; CTG has k graphs corresponding to k categories of data. Both TSG and CTG are bipartite graphs that record the dependencies between source and target nodes, where the source / target nodes are the input / output nodes in the graph. Considering that the time step is much smaller than the number of sensors, the adjacency matrix of the static graph is set as a weight parameter, which can be directly optimized through back propagation. In order to reduce the number of model parameters, the adjacency matrix of CTG It can be generated by matrix decomposition:

[0077] , (12)

[0078] in, represents cluster embedding; Indicates parameter embedding; and represents the time step of input and output data. The adjacency matrix of k CTGs is decomposed into two small matrices, and the parameter quantity is Reduce to , where the value of t is much smaller than k.

[0079] The forward propagation process of the spatial block is as follows:

[0080] , (13)

[0081] in, and They represent the input and output of the time block of the m-th layer CSTDGM respectively; It is also the output of the mth layer CSTDGM.

[0082] Step S5: input the aggregated features into the de-embedding layer for mapping, obtain the future topological signal traffic signal, and complete the trajectory prediction based on the cluster spatiotemporal dynamic graph network.

[0083] The de-embedding layer is the output layer of the model and consists of a fully connected layer. The purpose is to integrate the features aggregated by CSTDGM Mapped into predicted real-time future traffic signals , here It is a traffic signal prediction for a future time period based on the traffic signals obtained in real time, and is real-time.

[0084] CSTDGN uses Huber loss to measure the predicted real-time future traffic signals. The difference between the actual value and the actual value is calculated as follows:

[0085] , (14)

[0086] in, for future traffic signals; As the threshold for switching between the two losses.

[0087] The model uses the adaptive moment algorithm as the optimizer and sets the learning rate to ; Set the training iterations to 200; Set the training batch size to 32. The number of neurons (i.e., the number of features) in each layer of the model is set as follows: the number of neurons in the input layer (i.e., the embedding layer) is 1; the number of neurons in the hidden layer (i.e., the layer in CSTDGM) is 64; the number of neurons in the output layer (i.e., the back embedding layer) is 1. The number of layers of CSTDGM is set to 4; both the historical signal and the future signal have 12 time steps; the number of sensors is determined by the data set; the number of categories for k-means clustering is 100.

[0088] Embodiment 2

[0089] A trajectory prediction system based on a cluster spatiotemporal dynamic graph network, the system comprising: a data acquisition module, a data clustering module, a data mapping module, a feature fusion module and a traffic prediction module;

[0090] The data acquisition module is used to collect and pre-process the existing traffic signal data, wherein the traffic signal data includes vehicle trajectory, vehicle flow, vehicle speed and lane occupancy. In this embodiment, the traffic signal data is vehicle trajectory. Z-Score is used for pre-processing, and the formula is as follows:

[0091] , (15)

[0092] in, is the preprocessing function, X is the traffic signal data, and denote the mean and standard deviation functions respectively.

[0093] The data clustering module is used to select a training set from the traffic signal data and perform clustering, and assign a category index to the remaining traffic signal data after removing the training set based on the clustering result.

[0094] The present invention divides the data set into training, validation and test sets in the ratio of 60%, 20% and 20%. The training set is clustered using the k-means algorithm, and the process is as follows: a) Set the q value, which is the number of clustered categories; b) Randomly select q samples as centroids; c) Calculate the distance between each sample and the q centroids respectively, and the present invention uses the central moment difference as an indicator to measure the distance. The sample is closest to the centroid, and is divided into the category corresponding to the centroid; d) When all samples are divided, take the mean of the samples of each class to update the centroid of the class; e) Determine the distance between the new and old centroids. If the distance is less than the set threshold, terminate the algorithm, otherwise repeat steps b)-d).

[0095] After the data is clustered, each sample in the training set has an index to indicate the category it belongs to. The distance between each sample in the validation set and the test set and the centroid is evaluated to assign them a category index.

[0096] The data mapping module is used to randomly sample two groups of data, namely, historical traffic signals and future traffic signals, from the traffic signal data, input the historical traffic signals into the embedding layer for mapping, and obtain high-dimensional features.

[0097] A set of data is randomly sampled from the processed original traffic signal data without replacement. and , which represent historical traffic signals and future traffic signals respectively. Figure 1 As shown, the purpose of the embedding layer is to Mapping to high-dimensional features , where the embedding layer, as the input layer of CSTDGN, is a nonlinear fully connected layer, and the activation function is the linear rectified function (Rectified Linear Unit, ReLU). And the formula of ReLU is as follows:

[0098] (16)

[0099] (17)

[0100] in, Refers to the input of the fully connected layer; Refers to the input of ReLU; and denote the weights and biases of the fully connected layer respectively. Therefore, the calculation of the embedding layer can be expressed as:

[0101] (18)

[0102] The feature fusion module is used to input the high-dimensional features into the spatial block and the temporal block to generate a spatial aggregation feature map and a temporal aggregation feature map, and fuse the spatial aggregation feature map and the temporal aggregation feature map to obtain an aggregation feature.

[0103] like Figure 2 As shown in Figure 5, the embedding layer is followed by M cluster-spatiotemporal dynamic graph modules (CSTDGM), each of which contains a spatial block and a temporal block.

[0104] (a) Spatial Block: The graph used for spatial aggregation in the spatial block is generated as follows:

[0105] , (19)

[0106] Where m represents the layer index of CSTDGM; Represents the adjacency matrix of the Spatial StaticGraph (SSG); Represents the adjacency matrix of the Cluster-Spatial Graph (CSG); i represents Category index of ; Represents the number of input / output nodes of the adjacency matrix. SSG has 1 graph, which is shared by all categories of data; CSG has k graphs, corresponding to k categories of data. Both SSG and CSG are bipartite graphs, which record the dependencies between source nodes and target nodes, and can directly realize the spatial feature aggregation of target nodes. Among them, the source / target nodes represent the input / output nodes in the bipartite graph. The present invention fuses the two graphs to learn spatial dependencies, aiming to capture the commonalities of the spatiotemporal dependencies of all traffic signals while distinguishing their heterogeneity. Graph fusion adopts an averaging approach, because these adjacency matrices are generated in a data-driven manner, without the need for additional weighting methods. The adjacency matrix of SSG It can be generated by matrix decomposition:

[0107] , (20)

[0108] Among them, Dropout randomly sets the elements of the adjacency matrix to 0; and represents the input and output node embeddings, which are weight parameters. Since CSG designs a graph for each category, its parameter quantity is k times that of SSG. Therefore, the present invention designs a CSG generation method based on tensor decomposition, and its adjacency matrix It can be decomposed into four matrices:

[0109] , (twenty one)

[0110] in, is the core matrix; is the cluster embedding matrix; is the input node embedding matrix; is the output node embedding matrix; the above matrices are all weight parameters. In addition, Represents tensor multiplication, and the subscripts represent the corresponding multiplication modes. Decomposed into four small matrices, the parameter quantity is Reduce to Among them, r1, r2, r3 are much smaller than k, N1, N2. In addition, the calculation process of the aggregation layer and the gated linear unit (GLU) can be expressed as:

[0111] , (twenty two)

[0112] Among them, among them, Refers to the adjacency matrix of the graph; Represents feature data; and Represents the weight parameter; Sigmoid represents the activation function, which is calculated as follows:

[0113] , (twenty three)

[0114] in, Represents the input of Sigmoid. Therefore, the forward propagation of the spatial block can be expressed as follows:

[0115] , (twenty four)

[0116] in, and represents the input and output of the spatial block of the m-th layer CSTDGM; It is also the input of the mth layer CSTDGM.

[0117] (b) Temporal blocks: Similar to spatial blocks, in temporal blocks, the graph used for aggregation is calculated as follows:

[0118] , (25)

[0119] in, Represents the adjacency matrix of the Temporal Static Graph (TSG); The adjacency matrix representing the Cluster-Temporal Graph (CTG); Represents the number of output / input nodes. TSG has 1 graph shared by all categories of data; CTG has k graphs corresponding to k categories of data. Both TSG and CTG are bipartite graphs that record the dependencies between source and target nodes, where the source / target nodes are the input / output nodes in the graph. Considering that the time step is much smaller than the number of sensors, the adjacency matrix of the static graph is set as a weight parameter, which can be directly optimized through back propagation. In order to reduce the number of model parameters, the adjacency matrix of CTG It can be generated by matrix decomposition:

[0120] , (26)

[0121] in, represents cluster embedding; Indicates parameter embedding; and represents the time step of input and output data. The adjacency matrix of k CTGs is decomposed into two small matrices, and the parameter quantity is Reduce to , where the value of t is much smaller than k:

[0122] The forward propagation process of the spatial block is as follows

[0123] , (27)

[0124] in, and They represent the input and output of the time block of the m-th layer CSTDGM respectively; It is also the output of the mth layer CSTDGM.

[0125] The traffic prediction module is used to input the aggregated features into the de-embedding layer for mapping, obtain the future topological signal traffic signal, and complete the trajectory prediction based on the cluster spatiotemporal dynamic graph network.

[0126] The de-embedding layer is the output layer of the model and consists of a fully connected layer. The purpose is to integrate the features aggregated by CSTDGM Mapped into predicted real-time future traffic signals .

[0127] CSTDGN uses Huber loss to measure the predicted real-time future traffic signals. The difference between the actual value and the actual value is calculated as follows:

[0128] , (28)

[0129] in, for future traffic signals; As the threshold for switching between the two losses.

[0130] The model uses the adaptive moment algorithm as the optimizer, and sets the learning rate to 1e-2; the training iteration round is set to 200; and the training batch size is set to 32. The number of neurons (i.e., the number of features) in each layer of the model is set as follows: the number of neurons in the input layer (i.e., the embedding layer) is 1; the number of neurons in the hidden layer (i.e., the layer in CSTDGM) is 64; and the number of neurons in the output layer (i.e., the back embedding layer) is 1. The number of layers of CSTDGM is set to 4; both historical signals and future signals have 12 time steps; the number of sensors is determined by the data set; and the number of categories for k-means clustering is 100.

[0131] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A trajectory prediction method based on cluster spatiotemporal dynamic graph network, characterized in that: Methods include: Step S1, collecting and preprocessing existing traffic signal data, wherein the traffic signal data includes vehicle trajectory, vehicle flow, vehicle speed and lane occupancy; Step S2, selecting a training set from the preprocessed traffic signal data and performing clustering, and assigning a category index to the remaining traffic signal data after removing the training set based on the clustering result; Step S3, randomly sampling two sets of data of historical traffic signals and future traffic signals and corresponding category indexes from the traffic signal data, inputting the historical traffic signals into an embedding layer for mapping, and obtaining high-dimensional features; Step S4, inputting the high-dimensional features into the spatial block and the temporal block to generate a spatial aggregation feature map and a temporal aggregation feature map, and fusing the spatial aggregation feature map and the temporal aggregation feature map to obtain an aggregation feature; In step S4, the process of inputting the high-dimensional features into the spatial block to generate a spatial aggregation feature map specifically includes: , Among them, m represents the layer index of the cluster spatiotemporal dynamic graph network; is the i-th spatial aggregation feature map; Represents the adjacency matrix of a spatial static graph; is the adjacency matrix of the spatial graph of the ith cluster, Represents the adjacency matrix of the cluster space graph; i represents Category index of ; Represents the number of input / output nodes of the adjacency matrix; In step S4, the process of inputting the high-dimensional features into the time block to generate the time-aggregated feature graph specifically includes: , in, is the i-th time aggregation feature map; Represents the adjacency matrix of a time-static graph; is the adjacency matrix of the i-th time cluster graph, represents the adjacency matrix of the temporal cluster graph, Indicates the number of output / input nodes; Step S5: input the aggregated features into the de-embedding layer for mapping, obtain the future topological signal traffic signal, and complete the trajectory prediction based on the cluster spatiotemporal dynamic graph network.

2. The trajectory prediction method based on cluster spatiotemporal dynamic graph network according to claim 1, characterized in that: In step S1, the pre-processing process specifically includes: , in, is the preprocessing function, X is the traffic signal data, and denote the mean and standard deviation functions respectively.

3. The trajectory prediction method based on cluster spatiotemporal dynamic graph network according to claim 1, characterized in that: In step S2, the process of selecting a training set from the processed traffic signal data and performing clustering specifically includes: a. Randomly select 60% of the data from the traffic signal data as a training set; b. Set the number of clustering categories q in the k-means algorithm; c. Randomly select q samples from the training set as cluster centroids; d. Calculate the distance between each sample and the q centroids respectively, and divide the training set into categories based on the distance; e. Based on the division results, calculate the mean of all samples divided into a class, and update the centroid of the class based on the mean; f. Compare the distance between the original centroid and the updated centroid. If the distance is less than the preset distance, terminate clustering, otherwise repeat steps bd.

4. The trajectory prediction method based on cluster spatiotemporal dynamic graph network according to claim 1, characterized in that: In step S3, the historical traffic signal is input into the embedding layer for mapping, and the content of obtaining the high-dimensional features specifically includes: , in, is the fully connected layer, is a high-dimensional feature, For historical traffic signals.

5. A trajectory prediction system based on a cluster spatiotemporal dynamic graph network, the trajectory prediction system is used to implement the trajectory prediction method according to any one of claims 1 to 4, characterized in that: The system includes: a data acquisition module, a data clustering module, a data mapping module, a feature fusion module and a traffic prediction module; The data acquisition module is used to collect existing traffic signal data and perform preprocessing; The data clustering module is used to select a training set from the preprocessed traffic signal data and perform clustering, and assign a category index to the remaining traffic signal data after removing the training set based on the clustering result; The data mapping module is used to randomly sample two sets of data, namely, historical traffic signals and future traffic signals, from the traffic signal data, and input the historical traffic signals into the embedding layer for mapping to obtain high-dimensional features; The feature fusion module is used to input the high-dimensional features into the spatial block and the temporal block to generate a spatial aggregation feature map and a temporal aggregation feature map, and fuse the spatial aggregation feature map and the temporal aggregation feature map to obtain an aggregation feature; The traffic prediction module is used to input the aggregated features into the de-embedding layer for mapping, obtain the future topological signal traffic signal, and complete the trajectory prediction based on the cluster spatiotemporal dynamic graph network.

6. The trajectory prediction system based on cluster spatiotemporal dynamic graph network according to claim 5, characterized in that: In the data acquisition module, the process of collecting existing traffic signal data and preprocessing it specifically includes: , in, is the preprocessing function, X is the traffic signal data, and denote the mean and standard deviation functions respectively.

Citation Information

Patent Citations

  • Trajectory prediction method for multi-dimensional spatio-temporal feature fusion for automatic driving

    CN118296090A