Sparse trajectory recovery method based on graph neural network

By constructing the STREAM model of graph neural network, the space-time dependence and multi-step transfer mode of sparse trajectories are captured, and the problem of dynamic changes and multi-step transition modes in the existing methods is solved, which achieves high-precision recovery of sparse trajectories and improves the decision-making accuracy of traffic management and path planning.

CN120372267APending Publication Date: 2025-07-25NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510354543.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

When processing sparse trajectory data, existing trajectory recovery methods fail to effectively capture the dynamic changes in traffic conditions and multi-step transition modes, resulting in insufficient recovery accuracy, especially in large-scale urban road network environments.

Method used

A STREAM model based on graph neural network is constructed, through global mobile semantic learning, global traffic condition inference, local traffic dynamic representation and hierarchical dynamic fusion, combined with a multi-step transfer probability matrix, the spatio-temporal dependence and complex mobile semantics of sparse trajectories are captured, and the graph attention network and attention mechanism are used for trajectory recovery.

Benefits of technology

It improves the accuracy and perception ability of sparse trajectory recovery, can accurately reconstruct missing trajectory points, and improves the accuracy and reliability of trajectory prediction and path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120372267A_ABST
    Figure CN120372267A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of computer information calculation. The invention provides a sparse trajectory recovery method based on a graph neural network. According to the embodiment of the invention, the STREAM model based on the graph neural network is constructed, and for a given sparse trajectory, the graph neural network constructs a sub-graph for each point to represent a surrounding road network area. Convolution operation is applied to a speed matrix of a time period to obtain global traffic representation, and local traffic dynamics are learned through traffic information of an adjacent road section. Global traffic representation is transmitted into an encoder and fused with local traffic conditions, and a complex space-time dependency relationship is captured. The network combines hierarchical motion dynamics, and can extract global and local traffic dynamics in an encoder, so that the decoder can accurately reconstruct missing track points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer information computing technologies, and in particular, to a sparse trajectory recovery method based on a graph neural network. Background Art

[0002] In fields such as intelligent traffic management, road network optimization, and urban travel analysis, trajectory data is a crucial information resource. High-sampling-rate trajectory data is of great value for tasks such as trajectory prediction and travel time estimation. However, due to factors such as GPS signal limitations and device power consumption control, the trajectory data in practical applications is often sparse, that is, there are a large number of missing points. The incompleteness of trajectory data will seriously affect the decision-making accuracy and real-time performance in an intelligent transportation system (ITS), especially in a large-scale urban road network environment. Therefore, the research on trajectory recovery technology is of great significance for improving the accuracy and reliability of applications such as trajectory prediction, travel time estimation, and path planning.

[0003] In recent years, certain progress has been made in trajectory recovery methods based on road networks, and the repair accuracy has been improved to a certain extent. Existing methods can be roughly divided into non-road network methods and road network-based methods. Non-road network methods do not rely on road network information and thus have stronger adaptability. Representative works include DeepMove, DHTR, etc. For example, DHTR uses an attention mechanism to capture the spatio-temporal correlation between trajectory points and combines Kalman filtering to reduce prediction noise, thereby improving prediction accuracy. However, due to the lack of detailed road network information in such methods, the predicted trajectories often deviate from the true paths, resulting in low recovery accuracy. Road network-based methods usually perform better than non-road network methods because they can incorporate detailed road network structures and guide the trajectory recovery process by modeling the internal connectivity and transfer patterns between road segments. For example, MTrajRec first applied sequence-to-sequence (Seq2Seq) multitask learning to trajectory recovery, but it ignored the topological structure of the road network. To solve this problem, RNTrajRec captured the spatio-temporal features of trajectories by learning road segment embeddings, significantly improving the recovery accuracy. On this basis, GRFtrajRec further introduced important spatio-temporal intervals into the sequence-to-sequence model, further improving the recovery effect. The more recent MM-STGED framework first adopted a graph-based method to model trajectory data from both micro and macro levels and achieved remarkable results.

[0004] However, these methods have the following limitations, which restrict their application in practical scenarios: Since traffic conditions fluctuate greatly over time, accurately modeling such dynamic changes is crucial for trajectory recovery. Existing methods usually only focus on the static features of road segments and ignore the dynamic changes in traffic flow at different time periods. In addition, most current trajectory recovery methods only rely on the information of the current and the previous road segments and do not fully consider the complex transition patterns across multiple road segments. During actual driving, the driving path of a vehicle is often affected by factors such as driver habits and traffic conditions and follows multi-step transition rules. For example Figure 1 As shown, the current coordinate is, the next coordinate is. If only single-step transition is considered, the segment-to-segment will be regarded as unreachable, while the reachability can be correctly identified after introducing multi-step transition. Existing methods still have great deficiencies in modeling these complex transition patterns, thus limiting the overall recovery accuracy.

[0005] Therefore, it is necessary to improve one or more problems existing in the above related technical solutions.

[0006] It should be noted that this part aims to provide background or context for the technical solutions of the present disclosure stated in the claims. The description herein is not admitted to be prior art merely because it is included in this part. Summary of the Invention

[0007] The purpose of the embodiments of the present disclosure is to provide a sparse trajectory recovery method based on a graph neural network, thereby at least to some extent overcoming one or more problems caused by the limitations and defects of the related art.

[0008] According to the embodiments of the present disclosure, a sparse trajectory recovery method based on a graph neural network is provided. The method includes: Construct a STREAM model based on a graph neural network; wherein, the STREAM model includes an encoder and a decoder. The encoder includes a global movement semantics learning module, a global traffic condition inference module, a local traffic dynamics representation module, and a hierarchical dynamic fusion module. The decoder includes a recovery decoder; The global movement semantics learning module constructs a global road segment transition graph based on historical trajectory data and calculates its transition matrix; The global movement semantics learning module generates a constraint subgraph centered on the current trajectory point, combines the transition matrix, calculates the comprehensive weight between the current road segment and the candidate road segments, and assigns the comprehensive weight to the constraint subgraph; The global traffic condition inference module constructs static features and dynamic features based on the target map area, and splices the static features and the dynamic features to obtain a global traffic representation; The local traffic dynamics representation module selects nodes within h hops of the target node from the road network graph of the target map area, constructs a local subgraph, and aggregates the high-dimensional embedding vectors in the local subgraph using a graph attention network to obtain a local traffic representation; The hierarchical dynamic fusion module generates a final trajectory representation based on the global traffic representation and the local traffic representation; The recovery decoder predicts the target road segment and the moving proportion within the target road segment using an attention mechanism based on the trajectory representation to complete the sparse trajectory recovery.

[0009] Furthermore, in the step of the global mobility semantics learning module constructing a global road segment transition graph based on historical trajectory data and calculating its transition matrix, it includes: Constructing a global road segment transition graph based on historical trajectory data; Calculating the adjacency matrix of the global road segment transition graph according to the transition frequency of the road segments in the global road segment transition graph; Normalizing the adjacency matrix using the degree matrix to obtain the one-hop transition probability matrix of all road segments; By accumulating the transition probabilities from 1 hop to k hops, the global transition matrix is obtained.

[0010] Furthermore, in the step of the global mobility semantics learning module generating a constraint subgraph centered on the current trajectory point, combining the transition matrix, calculating the comprehensive weight between the current road segment and the candidate road segments, and assigning the comprehensive weight to the constraint subgraph, it includes: Normalizing the global transition matrix to obtain the normalized transition matrix; Calculating the transition probability from the current road segment to the candidate road segments according to the normalized transition matrix; Generating a constraint subgraph centered on the current trajectory point; Calculating the distance weight of the trajectory point relative to each candidate road segment according to the road network distance of the constraint subgraph; Calculating the comprehensive weight between the current road segment and the candidate road segments based on the distance weight and the transition probability from the current road segment to the candidate road segments, and assigning the comprehensive weight to the constraint subgraph.

[0011] Furthermore, in the step of the global traffic condition inference module constructing static features and dynamic features based on the target map area and concatenating the static features and the dynamic features to obtain the global traffic representation, it includes: Constructing static features based on the inherent characteristics of the target map area; Dividing the target map area into several grids, and for each grid, calculating its corresponding average speed using historical trajectory data; Calculating the average speed of all grids to obtain the average speed matrix of all grids, and extracting the global traffic representation from the average speed matrix.

[0012] Further, in the step where the local traffic dynamics representation module selects nodes within h hops from the target node from the road network graph of the target map area, constructs a local subgraph, and aggregates the high-dimensional embedding vectors in the local subgraph using a graph attention network to obtain the local traffic representation, it includes: Based on the target map area, calculate the average speed of each road segment in real time and map it to a high-dimensional embedding vector; Select nodes within h hops from the target node from the road network graph of the target map area to construct a local subgraph; Use a graph attention network to aggregate the high-dimensional embedding vectors in the local subgraph to obtain the local traffic representation.

[0013] Further, in the step where the global movement semantics learning module constructs a global road segment transition graph based on historical trajectory data and calculates its transition matrix, it includes: Perform weighted fusion on the global traffic representation and the local traffic representation to obtain a fused feature; Perform a pooling operation on the fused feature to extract the fused features of all nodes in the constraint subgraph and generate the final trajectory representation.

[0014] Further, in the step where the recovery decoder predicts the target road segment and the movement ratio within the target road segment using the attention mechanism based on the trajectory representation, it includes: Generate the target road segment and its corresponding movement ratio according to the trajectory representation; By using the attention mechanism, calculate the attention weights between the current hidden state and the trajectory representation, and calculate the weighted sum using the attention weights to generate a context vector; Concatenate the context vector, the road segment embedding, and the movement ratio, and update the hidden state of the recovery decoder through an RNN to predict the target road segment and the movement ratio within the target road segment.

[0015] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: In the embodiments of the present disclosure, through the above-mentioned sparse trajectory recovery method based on graph neural networks, on the one hand, a STREAM model based on graph neural networks is constructed. For a given sparse trajectory, the graph neural network constructs a subgraph for each point, representing the surrounding road network area. Applying convolutional operations to the speed matrix over a time period obtains the global traffic representation, and the local traffic dynamics are learned through the traffic information of adjacent road segments. The global traffic representation is fed into the encoder and fused with the local traffic conditions to capture complex spatio-temporal dependencies. This network combines hierarchical motion dynamics and can extract global and local traffic dynamics in the encoder, enabling the decoder to accurately reconstruct the missing trajectory points. On the other hand, according to the transfer frequencies between road segments, a multi-step transition probability matrix is calculated, which is used to assign weights to the nodes in the subgraph, capturing complex movement semantics through multi-step transitions between road segments, thereby improving the recovery performance. The graph neural network effectively captures multi-hop motion patterns and infers the transfer preferences for the next hop to enhance the perception ability. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Apparently, the drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[0017] Figure 1 Showing the motion example of a spatial trajectory in an exemplary embodiment of the present disclosure; Figure 2 Showing the step diagram of a sparse trajectory recovery method based on graph neural networks in an exemplary embodiment of the present disclosure; Figure 3 Showing the framework diagram of the trajectory recovery method based on graph neural networks in an exemplary embodiment of the present disclosure; Figure 4 Showing the hyperparameter learning result diagram in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more complete and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

[0019] In addition, the accompanying drawings are only schematic illustrations of the embodiments of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities.

[0020] In this exemplary embodiment, a sparse trajectory recovery method based on a graph neural network is provided. Referring to Figure 2 as shown in, the sparse trajectory recovery method based on a graph neural network may include: Step S101 to Step S107.

[0021] Step S101: Construct a STREAM model based on a graph neural network; wherein, the STREAM model includes an encoder and a decoder, the encoder includes a global movement semantics learning module, a global traffic condition inference module, a local traffic dynamics representation module, and a hierarchical dynamic fusion module, and the decoder includes a recovery decoder; Step S102: The global movement semantics learning module constructs a global road segment transfer graph based on historical trajectory data and calculates its transfer matrix; Step S103: The global movement semantics learning module generates a constraint subgraph centered on the current trajectory point, combines the transfer matrix, calculates the comprehensive weight between the current road segment and the candidate road segments, and assigns the comprehensive weight to the constraint subgraph; Step S104: The global traffic condition inference module constructs static features and dynamic features based on the target map area, and splices the static features and the dynamic features to obtain a global traffic representation; Step S105: The local traffic dynamics representation module selects the nodes within h hops away from the target node from the road network graph of the target map area, constructs a local subgraph, and aggregates the high-dimensional embedding vectors in the local subgraph by using a graph attention network to obtain a local traffic representation; Step S106: The hierarchical dynamic fusion module generates a final trajectory representation according to the global traffic representation and the local traffic representation; Step S107: The recovery decoder predicts the target road segment and the moving ratio within the target road segment based on the trajectory representation by using an attention mechanism to complete the sparse trajectory recovery.

[0022] Through the above sparse trajectory recovery method based on graph neural networks, on the one hand, a STREAM model based on graph neural networks is constructed. For a given sparse trajectory, the graph neural network constructs a subgraph for each point to represent the surrounding road network area. The convolution operation is applied to the speed matrix of the time period to obtain the global traffic representation, and the local traffic dynamics are learned through the traffic information of adjacent road segments. The global traffic representation is fed into the encoder and fused with the local traffic conditions to capture complex spatio-temporal dependencies. This network combines hierarchical motion dynamics and can extract global and local traffic dynamics in the encoder, enabling the decoder to accurately reconstruct the missing trajectory points. On the other hand, according to the transfer frequencies between road segments, a multi-step transfer probability matrix is calculated, which is used to assign weights to the nodes in the subgraph. By making multi-step transfers between road segments, complex movement semantics are captured, thereby improving the recovery performance. The graph neural network effectively captures multi-hop movement patterns and infers the transfer preferences of the next hop to enhance the perception ability.

[0023] Next, with reference to Figures 2 to 4 each step of the above sparse trajectory recovery method based on graph neural networks in this exemplary embodiment will be described in more detail.

[0024] In step S101, a STREAM model based on graph neural networks is constructed; wherein, the STREAM model includes an encoder and a decoder. The encoder includes a global movement semantics learning module, a global traffic condition inference module, a local traffic dynamics representation module, and a hierarchical dynamics fusion module. The decoder includes a recovery decoder.

[0025] Specifically, problem definition: Definition 1 (original trajectory): The original trajectory is a chronologically ordered sequence of GPS points , where each point is represented by a triple containing the latitude , longitude and timestamp of the point. The timestamps satisfy , where .

[0026] Definition 2 (road network): The road network is represented as a directed graph , where is the set of nodes, and each node represents a road segment, is the set of directed edges, representing the connectivity between road segments. If there is a legal road transition from node to node , then the edge exists.

[0027] Definition 3 (Fixed Sampling Interval Trajectory Matched to Road Network): A fixed sampling interval trajectory matched to a road network is a sequence of trajectory points, where each point is represented as a triple , where is the matched road segment, is the movement ratio, indicating the ratio of the movement distance of the trajectory point on this road segment to the total length, is the timestamp of the trajectory point. The time interval between adjacent trajectory points is fixed at .

[0028] Problem 1 (Trajectory Recovery): Given a low-sampling-rate trajectory , the goal is to recover the true fixed sampling interval trajectory matched to the road network , that is, to infer the missing GPS trajectory points and map all GPS trajectory points to the road network to obtain the true movement trajectory of the vehicle. The sampling interval of the recovered trajectory should be much smaller than the sampling interval of the original trajectory .

[0029] Construct the STREAM model: Figure 3 shows the framework of the STREAM model, which adopts an encoder-decoder architecture. In this structure, the global movement semantics learning module (Module 1), the global traffic condition inference module (Module 2), and the local traffic dynamics representation module (Module 3) together constitute the encoder, and the recovery decoder (Module 4) serves as the decoder of the model.

[0030] The core idea of this method is to encode sparse trajectory data by inferring global and local traffic conditions and simultaneously capturing global movement transfer relationships, and finally reconstruct and recover complete trajectory points through the decoding process.

[0031] In step S102, the global movement semantics learning module constructs a global road segment transfer graph based on historical trajectory data and calculates its transfer matrix.

[0032] Specifically, this application describes the process of constructing the intra-hop global transfer matrix , which captures the multi-hop dependency relationships between road segments. First, a global road segment transfer graph is constructed based on historical trajectory data. In this graph, each node represents a road segment, each directed edge represents a transfer from one road segment to another, and the edge weight reflects the transfer frequency between road segments, which are extracted from historical trajectory data.

[0033] To obtain the global transition matrix, first calculate the adjacency matrix of the graph , which captures the direct transition relationships between road segments, where the element represents the frequency of transitioning from road segment to road segment . Next, use the degree matrix to normalize the adjacency matrix. The degree matrix is a diagonal matrix, and its diagonal elements represent the sum of the transition frequencies of each road segment. The normalized adjacency matrix is calculated as follows: (1) where is the inverse matrix of the degree matrix , and represents the one-hop transition probability matrix of all road segments.

[0034] To model the road segment transitions within hops, first calculate the transition probabilities for exactly hops and obtain by accumulating these matrices. This matrix represents the transition probability from the current road segment to the target road segment within steps. Finally, the constructed global transition matrix can be expressed as follows:

[0035] (2) where represents the transition probability matrix for exactly hops.

[0036] After obtaining , normalize the rows of the matrix to ensure that each row represents a valid probability distribution, calculated as follows:

[0037] (3) where is a diagonal matrix, and its diagonal elements are the reciprocals of the sums of the elements in each row of .

[0038] In step S103, the global movement semantics learning module generates a constraint subgraph centered on the current trajectory point, combines the transition matrix, calculates the comprehensive weight between the current road segment and the candidate road segments, and assigns the comprehensive weight to the constraint subgraph.

[0039] Specifically, for each trajectory point in the sparse trajectory, assume that the road segment it is on is denoted as . First, construct a constraint subgraph , where the nodes represent road segments within a radius of meters around the trajectory point, and the edge set represents the connection relationships between these road segments in the original road network.

[0040] Next, use the transition matrix to calculate the transition probability from the current road segment to the candidate road segment : (4) where represents the element value at the -th row and -th column in the transition matrix.

[0041] Then, calculate the weight of the trajectory point relative to each candidate road segment according to the road network distance: (5) where is a hyperparameter used to control the relationship between the weight and the distance, is the road network distance from the candidate road segment to the trajectory point .

[0042] Finally, combine the distance weight and the transition probability to calculate the comprehensive weight between the current road segment and the candidate road segment : (6) Then, assign these weights to the edges in the constraint subgraph .

[0043] In step S104, the global traffic condition inference module constructs static features and dynamic features based on the target map area, and splices the static features and dynamic features to obtain a global traffic representation.

[0044] Specifically, static feature modeling: Static features capture the inherent characteristics of roads. Assume that each road has static features (such as road type: urban road, highway, etc.), and map these features to a high-dimensional space through an embedding layer: (7) Dynamic Feature Modeling: Dynamic features reflect the impact of time factors on traffic conditions. Inspired by

[22] , the target map area is divided into several grids, and each grid cell represents a geographical area. For each grid, historical trajectory data is used to calculate its corresponding average speed. For each time period t, the average speed matrix of all grids is calculated. .

[0045] To extract global traffic features from the traffic matrix , the following operations are performed: (8) where represents a two-dimensional convolution operation on the global traffic matrix , normalizes the convolution output, is the activation function, performs average pooling to further extract features.

[0046] To model the uncertainty and randomness of traffic conditions, it is assumed that the traffic state follows a Gaussian distribution, and its parameters are determined by the features extracted by the convolutional network . The traffic state distribution is defined as: (9) where and are modeled by a multi-layer perceptron (MLP) with two shared hidden layers. This method can capture the variability of traffic conditions.

[0047] After extracting static and dynamic features, they are concatenated to form a global traffic representation over time . Let represent the static features of road segment , represent the dynamic features at time . The global traffic representation is obtained by concatenating these two features: (10) where represents the concatenation of feature vectors, and the Transformer encoder updates the global traffic representation in the constrained subgraph .

[0048] In step S105, the local traffic dynamics representation module selects the nodes within h hops of the target node from the road network graph of the target map area, constructs a local subgraph, and aggregates the high-dimensional embedding vectors in the local subgraph using a graph attention network to obtain the local traffic representation.

[0049] Specifically, to effectively capture the local traffic dynamics around each road segment, the average speed of each road segment is calculated in real time. Then, a binning strategy is used to discretize these speed values.

[0050] Use the embedding layer , and map the discretized speed representation to a high-dimensional embedding vector , as follows: (11) To effectively capture the local traffic dynamics around each road segment, by selecting all nodes within no more than hops from the road network graph to extract a subgraph , to form a local subgraph. GAT weights and aggregates the local traffic information of surrounding road segments by calculating the attention coefficients of each adjacent node, as follows: (12) where is the set of neighbor node embeddings of node at time step , is the layer index, is the local traffic embedding of node at the th layer.

[0051] After propagation through multiple layers of the graph attention network, further infer the local traffic conditions based on the traffic embeddings obtained from the observed trajectories. To this end, map the traffic embedding to a latent space to generate a latent representation that captures the probabilistic structure of traffic dynamics. This is expressed as: (13) In step S106, the hierarchical dynamic fusion module generates the final trajectory representation based on the global traffic representation and the local traffic representation.

[0052] Specifically, the encoder fuses the global sequence features and the local traffic features , as follows: (14) where and are trainable weights learned during the fusion process.

[0053] The fused features generate the final trajectory representation through a pooling operation: (15) The Pooling operation extracts the features of all nodes in the graph 。 。

[0054] In step S107, the recovery decoder uses the attention mechanism to predict the target road segment and the moving ratio within the target road segment based on the trajectory representation to complete the sparse trajectory recovery.

[0055] Specifically, a decoder based on the attention mechanism is adopted. The goal of the decoder is to generate the target road segment and its corresponding moving ratio from the output of the encoder 。 By using the attention mechanism, the decoder calculates the attention weights between the current hidden state and the output of the encoder 。 These attention weights are then used to calculate the weighted sum of the encoder output to generate the context vector , and the formula is as follows:

[0056] , (16) where represents the attention weight, is the hidden state of the decoder at time step , is the context vector, aggregating the parts of the encoder output that are most relevant to the current decoding step.

[0057] Next, the context vector , the road segment embedding and the moving ratio are concatenated and the hidden state of the decoder is updated through the RNN. The updated hidden state is used to predict the target road segment and the moving ratio within the target road segment. The prediction process is as follows:

[0058]

[0059] (17) where represents the predicted road segment, represents the predicted moving ratio, calculated through the sigmoid activation function.

[0060] In a specific embodiment, the following experiment is carried out: 1. Experimental setup (1) Datasets: This application uses two real-world trajectory datasets: the datasets of City 1 and City 2 to evaluate the performance of all methods. The City 1 dataset contains vehicle trajectory data in City 1, China in November 2016, with an average time interval of 3.3 seconds. In the City 2 dataset, taxi trip data from City 2, China during the period from January 3 to 7, 2015 was collected, with an average time interval of 36.2 seconds. The details are shown in Table 1.

[0061] Table 1 Statistical information of all datasets

[0062] Preprocessing: Trajectories with lengths between 40 and 80 were retained in the City 1 dataset after map matching. The City 2 dataset includes trajectories with 20 to 300 points, where the time interval between consecutive points is less than 60 seconds, and does not include any points that cannot be matched to the road network. The road network data is sourced from OpenStreetMap. Each dataset is divided into a training set, a validation set, and a test set in a ratio of 7:1:2. The Hidden Markov Model (HMM) algorithm and linear interpolation are used to construct map-matched trajectories. The ground truth trajectories are generated from map-matched trajectories with a high sampling rate, with an interval of 10 - 15 seconds. The low-sampling input trajectories are created by randomly sampling points from , with a sampling interval of 80 to 192 seconds. In this way, the recovery task only uses 12.5% or 6.25% of the points to reconstruct the remaining 87.5% or 93.75%, thus generating low-sampling trajectories with a sampling interval 8 to 16 times larger than that of the high-sampling trajectories.

[0063] (3) Competitors: To evaluate the effectiveness of the model in this application, it was compared with seven advanced models.

[0064] Linear + HMM: Use linear interpolation to generate high-sampling-rate trajectories at fixed intervals, and then map the interpolated points to the road network through HMM.

[0065] DHTR + HMM: Utilize Kalman filtering to obtain high-sampling-rate data, and then apply HMM for section mapping.

[0066] t2vec: Capture the correlations between low-quality trajectories through a novel deep learning algorithm.

[0067] Transformer: Use the attention mechanism to learn the sequential patterns in trajectory data.

[0068] NeuTraj: Enhance the trajectory representation ability by integrating a spatial attention memory module into LSTM.

[0069] MtrajRec: It is a sequence-to-sequence multi-task learning model that uses an encoder to capture context information and predicts the road segments and movement ratios of missing trajectory points through a decoder.

[0070] RNTrajRec: A Transformer-based framework is proposed, which utilizes road network-enhanced embeddings to capture spatial and temporal features for recovering missing trajectory points.

[0071] MM-STGED: It uses graph-based techniques to capture the semantic information of trajectories at the macro and micro levels to assist in trajectory recovery.

[0072] GRFTrajRec: It adopts a trajectory-aware graph representation and a spatio-temporal interval-aware sequence-to-sequence model for trajectory recovery.

[0073] It should be noted that A+Decoder in Table 2 refers to using the encoder of model A and the decoder of MtrajRec to complete the trajectory recovery task, following the method of RNTrajRec.

[0074] (4) Hyperparameter settings: The hidden state dimension is set to 512, the batch size is set to 64, is set to 15, the radius is set to 400 meters, following the settings of RNTrajRec. Other hyperparameters are adjusted through grid search, with the ranges as follows: global traffic dimension {32, 64, 128, 256}, number of time hops {1, 2, 4, 6, 8}, dropout rate {0.1, 0.2, 0.3, 0.4}, and number of hops used in the subgraph {1, 2, 3, 4}. The experiments are run on a machine equipped with an Intel(R) Xeon(R) Platinum 8358P CPU (2.60GHz) and a 24GB NVIDIA GeForce RTX 4090 GPU.

[0075] (5) Performance metrics: Referring to MtrajRec and RNTrajRec, this application uses six metrics to evaluate the performance of all methods in the trajectory recovery task. Let the true driving path extracted from the true trajectory be and the predicted driving path extracted from the predicted trajectory be .

[0076] Accuracy: The accuracy of recovery is defined as (if ; otherwise 0).

[0077] Recall, Precision, and F1Score: Recall is calculated as , Precision is expressed as , and the F1Score is .

[0078] Mean Absolute Error (MAE) and Root Mean Square Error (RMSE): MAE and RMSE are used to measure the road network distance between the true trajectory and the predicted trajectory . MAE is defined as , and RMSE is defined as .

[0079] 2. Performance Evaluation This application evaluated the overall performance of all methods on six metrics and two different sampling rates on two datasets, as shown in Table 2. On the two datasets, the method proposed in this application outperformed other methods in all metrics. Specifically, the method of this application achieved the highest values in accuracy, recall, precision, and F1Score on the two datasets, and also showed the best performance in terms of Mean Absolute Error (MAE) and Root Mean Square Error (RMSE), demonstrating its excellent trajectory recovery performance. It is worth noting that on the City1 dataset with a sampling rate of 0.125, the method of this application achieved the best F1 score of 0.904; on the City2 dataset with a sampling rate of 0.125, the F1 score was 0.852, significantly exceeding all other methods. The method of this application also showed excellent performance in terms of MAE and RMSE, with values of 154.3 and 276.9 on the City1 dataset, and 229.4 and 362.5 on the City2 dataset, respectively.

[0080] In contrast, traditional methods such as Linear+HMM and t2vec+Decoder performed relatively poorly, especially Linear+HMM showed a large gap in accuracy and distance error metrics. Although more advanced methods such as NeuTraj+Decoder, MTrajRec, and RNTrajRec performed okay in terms of F1 score and distance error metrics, they still could not match the overall performance of the method of this application.

[0081] Table 2 Performance of All Methods

[0082] 3. Hyperparameter Learning The influence of four key hyperparameters in the model was studied, as shown in Figure 4 . The results are shown based on the City1 dataset with a sampling rate of 0.125. Similar trends were also presented for the City2 dataset and the results with a sampling rate of 0.0625.

[0083] Global traffic dimension: The global traffic dimension parameter controls the dimension of the global traffic characteristics for each time period. The results show that the model performs best when the dimension is 128. Increasing the dimension beyond 128 does not improve performance but instead increases the computational cost. On the contrary, reducing the dimension leads to a decrease in prediction accuracy.

[0084] Number of past time steps: The number of past time steps determines how many past time steps are considered when predicting the current road segment transition. The results show that using 8 past time hops brings the best performance and significantly improves the prediction accuracy. This indicates that combining the past 8 time hops can provide sufficient temporal context to capture road segment transitions and temporal dependencies.

[0085] Dropout rate: The dropout rate controls the proportion of randomly dropped network connections during training to prevent overfitting. The results show that the best performance is achieved when the dropout rate is 0.3. A higher dropout rate helps prevent overfitting and improves generalization ability, while a lower dropout rate leads to overfitting and reduces accuracy.

[0086] Subgraph hop count: The results show that the best performance is achieved with 3 hops. Increasing the hop count allows the model to capture broader relationships in the road network, but too many hops lead to oversmoothing and increased computational complexity, thus affecting training efficiency and performance.

[0087] 4. Ablation Experiments To evaluate the impact of each component in the model, this application conducted ablation experiments by testing five different model variants: w / oGT (without global traffic information): This variant removes the global traffic conditions for each time period to evaluate the importance of global real-time traffic information in trajectory recovery.

[0088] w / oLT (without local traffic dynamics): This variant excludes the local traffic dynamics for each time interval to demonstrate the key role of local real-time traffic information in the model.

[0089] w / oGM (without global movement semantics): This variant removes the global movement semantics to evaluate the impact of road connectivity and transition probability on the model performance.

[0090] w / oSubg (without subgraph representation learning): This variant removes the subgraph representation learning and directly uses the multi-dimensional speed representation vector.

[0091] w / oWF (without weighted fusion): This variant directly concatenates the two features during the feature fusion process without performing weighted fusion.

[0092] Table 3 Results of Ablation Experiments

[0093] The results of the ablation experiments are summarized in Table 3. Compared with the full model, the performance of the w / oGT variant significantly drops, indicating the importance of global traffic conditions in capturing traffic patterns. Similarly, the accuracy of the w / oLT variant significantly decreases, highlighting the crucial role of local traffic dynamics in modeling temporal dependencies. The performance of the w / oGM variant drops most severely, emphasizing the importance of road transition preferences, which are crucial for accurate trajectory recovery. In addition, the removal of the w / oSubg variant leads to a performance drop, indicating that the graph structure representation is crucial for capturing the complex relationships between road segments. Finally, the w / oWF variant performs poorly, indicating the importance of weighted fusion in integrating features and supporting effective decision-making.

[0094] With the above graph neural network-based sparse trajectory recovery method, on the one hand, the STREAM model based on graph neural network is constructed. For a given sparse trajectory, the graph neural network constructs a subgraph for each point to represent the surrounding road network area. Applying convolutional operations to the speed matrix over a time period yields the global traffic representation, and the local traffic dynamics are learned through the traffic information of adjacent road segments. The global traffic representation is fed into the encoder and fused with the local traffic conditions to capture complex spatio-temporal dependencies. This network combines hierarchical motion dynamics and can extract global and local traffic dynamics in the encoder, enabling the decoder to accurately reconstruct the missing trajectory points. On the other hand, according to the transfer frequencies between road segments, a multi-step transfer probability matrix is calculated, which is used to assign weights to the nodes in the subgraph. By making multi-step transfers between road segments, complex movement semantics are captured, thereby improving the recovery performance. The graph neural network effectively captures multi-hop movement patterns and infers the transfer preferences for the next hop to enhance the perception ability.

[0095] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification.

[0096] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common general knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the appended claims.

Claims

1. A sparse trajectory recovery method based on graph neural network, characterized in that, The method includes: Constructing a STREAM model based on a graph neural network; wherein, the STREAM model includes an encoder and a decoder, the encoder includes a global movement semantics learning module, a global traffic condition inference module, a local traffic dynamics representation module, and a hierarchical dynamic fusion module, and the decoder includes a recovery decoder; The global movement semantics learning module constructs a global road segment transition graph based on historical trajectory data and calculates its transition matrix; The global movement semantics learning module generates a constraint subgraph centered on the current trajectory point, combines the transition matrix, calculates the comprehensive weight between the current road segment and the candidate road segments, and assigns the comprehensive weight to the constraint subgraph; The global traffic condition inference module constructs static features and dynamic features based on the target map area, and splices the static features and dynamic features to obtain a global traffic representation; The local traffic dynamics representation module selects nodes within h hops from the target node from the road network graph of the target map area, constructs a local subgraph, and aggregates the high-dimensional embedding vectors in the local subgraph using a graph attention network to obtain a local traffic representation; The hierarchical dynamic fusion module generates a final trajectory representation according to the global traffic representation and the local traffic representation; The recovery decoder predicts the target road segment and the movement ratio within the target road segment using an attention mechanism based on the trajectory representation to complete sparse trajectory recovery.

2. The sparse trajectory recovery method based on a graph neural network according to claim 1, wherein In the step where the global movement semantics learning module constructs a global road segment transition graph based on historical trajectory data and calculates its transition matrix, it includes: Constructing a global road segment transition graph based on historical trajectory data; Calculating the adjacency matrix of the global road segment transition graph according to the transition frequency of the road segments in the global road segment transition graph; Normalizing the adjacency matrix using the degree matrix to obtain the one-hop transition probability matrix of all road segments; By accumulating the transition probabilities from 1 hop to k hops, the global transition matrix is obtained.

3. The sparse trajectory recovery method based on a graph neural network according to claim 2, wherein In the step where the global movement semantics learning module generates a constraint subgraph centered on the current trajectory point, combines the transition matrix, calculates the comprehensive weight between the current road segment and the candidate road segments, and assigns the comprehensive weight to the constraint subgraph, it includes: Normalizing the global transition matrix to obtain a normalized transition matrix; Calculating the transition probability from the current road segment to the candidate road segments according to the normalized transition matrix; Generating a constraint subgraph centered on the current trajectory point; Calculating the distance weight of the trajectory point relative to each candidate road segment according to the road network distance of the constraint subgraph; Calculating the comprehensive weight between the current road segment and the candidate road segments based on the distance weight and the transition probability from the current road segment to the candidate road segments, and assigning the comprehensive weight to the constraint subgraph.

4. The sparse trajectory recovery method based on a graph neural network according to claim 3, wherein In the step where the global traffic condition inference module constructs static features and dynamic features based on the target map area, and splices the static features and dynamic features to obtain a global traffic representation, it includes: Constructing static features based on the inherent characteristics of the target map area; Dividing the target map area into several grids, and for each grid, calculating its corresponding average speed using historical trajectory data; Calculating the average speed of all grids to obtain the average speed matrix of all grids, and extracting the global traffic representation from the average speed matrix.

5. The sparse trajectory recovery method based on a graph neural network according to claim 4, wherein In the step where the local traffic dynamic representation module selects nodes within h hops from the target node from the road network graph of the target map area, constructs a local subgraph, and aggregates the high-dimensional embedding vectors in the local subgraph using a graph attention network to obtain the local traffic representation, it includes: Based on the target map area, calculate the average speed of each road segment in real time and map it to a high-dimensional embedding vector; Select nodes within h hops from the target node from the road network graph of the target map area to construct a local subgraph; Use a graph attention network to aggregate the high-dimensional embedding vectors in the local subgraph to obtain the local traffic representation.

6. The sparse trajectory recovery method based on a graph neural network according to claim 5, wherein In the step where the global movement semantics learning module constructs a global road segment transition graph based on historical trajectory data and calculates its transition matrix, it includes: Perform weighted fusion on the global traffic representation and the local traffic representation to obtain a fused feature; Perform a pooling operation on the fused feature to extract the fused features of all nodes in the constraint subgraph and generate the final trajectory representation.

7. The sparse trajectory recovery method based on a graph neural network according to claim 6, wherein In the step where the recovery decoder predicts the target road segment and the movement ratio within the target road segment using the attention mechanism based on the trajectory representation, it includes: Generate the target road segment and its corresponding movement ratio according to the trajectory representation; By using the attention mechanism, calculate the attention weights between the current hidden state and the trajectory representation, and calculate the weighted sum using the attention weights to generate a context vector; Concatenate the context vector, the road segment embedding, and the movement ratio, and update the hidden state of the recovery decoder through the RNN to predict the target road segment and the movement ratio within the target road segment.

Citation Information

Cited By

  • Sparse trajectory recovery method, device and system, and storage medium

    CN121051416A

  • Vehicle track recovery method for missing road section-level data

    CN121071433A