A generative spatio-temporal trajectory prediction method for inconsistent sampling rates
Patent Information
- Application Number
- CN202311679951.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-07
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-12-07
AI Technical Summary
但上述方法存在数据不平衡的问题,在轨迹预测中,采样率不一致会导致数据不平衡的问题,例如,某些轨迹可能只有少量的采样点,而其他轨迹可能有很多采样点,这种数据不平衡将影响模型的性能,使得模型更倾向于预测采样点较多的轨迹,为了解决上述问题,现提供一种技术方案
[0012]本发明一种面向采样率不一致的生成式时空轨迹预测方法的技术效果和优点:本发明使用生成式模型生成额外的轨迹样本,以增加采样点较少的轨迹的数量,使得时空轨迹数据集中不同采样率的轨迹更加平衡;同时再调整权重,给予采样点较少的轨迹更高的权重,以便在模型训练过程中增加样本的关注度;使用生成式网络来更有效的生成额外的轨迹样本,在损失函数中引入样本权重,使得采样点较少的轨迹对总体损失的贡献更大,解决了采样率不一致、数据不平衡的问题,能够有效提高轨迹预测模型的性能和鲁棒性。
Smart Images

Figure CN117648541B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information technology, and more specifically, to a generative spatiotemporal trajectory prediction method for inconsistent sampling rates. Background Technology
[0002] Spatiotemporal trajectory prediction refers to the prediction of the trajectory of an object in space. This prediction plays an important role in many application fields, such as traffic management, environmental monitoring, and natural disaster early warning. However, in reality, different sensors have different sampling rates, which poses a great challenge to spatiotemporal trajectory prediction. Therefore, how to deal with spatiotemporal trajectory prediction with inconsistent sampling rates has become a hot research topic. The research methods in the field of trajectory prediction have evolved through the following stages in dealing with the problem of inconsistent sampling rates: (1) Interpolation method: The earliest method was to use interpolation algorithms to fill in missing data points to ensure the continuity and consistency of data. However, this method can only handle a small number of missing points and is not effective for cases with large differences in sampling rates; (2) Sliding window based method: With the increase in trajectory data and the increase in complexity, researchers began to try to use sliding window technology to solve the problem of inconsistent sampling rates. The sliding window can align and smooth data with different sampling rates, thereby reducing the impact of sampling rate differences. It can be used for data interpolation, denoising, smoothing and other operations to improve the accuracy of trajectory prediction; (3) Segmented model (3) Segmented model method: In order to better solve the problem of inconsistent sampling rates, researchers began to try to divide the trajectory data into multiple sub-intervals with the same sampling rate in each sub-interval and build an independent model in each sub-interval. This segmented model-based method can better adapt to data with different sampling rates and improve the accuracy of prediction; (4) Deep learning-based method: In recent years, the development of deep learning technology has brought new opportunities and challenges to the field of trajectory prediction. Deep learning-based methods can automatically learn features and patterns from large-scale trajectory data and predict future trajectories. In dealing with the problem of inconsistent sampling rates, deep learning-based methods can process data with different sampling rates through multi-layer neural networks, thereby improving the accuracy and robustness of prediction. However, the above methods have the problem of data imbalance. In trajectory prediction, inconsistent sampling rates will lead to data imbalance. For example, some trajectories may have only a few sampling points, while other trajectories may have many sampling points. This data imbalance will affect the performance of the model, making the model more inclined to predict trajectories with more sampling points. In order to solve the above problems, a technical solution is provided. Summary of the Invention
[0003] To overcome the aforementioned shortcomings of existing technologies, this invention provides a generative spatiotemporal trajectory prediction method for inconsistent sampling rates. It uses a generative model to generate additional trajectory samples, increasing the number of trajectories with fewer sampling points and thus making the trajectories with different sampling rates in the spatiotemporal trajectory dataset more balanced. Simultaneously, it adjusts the weights, giving higher weights to trajectories with fewer sampling points to increase sample attention during model training. By using a generative network to more effectively generate additional trajectory samples and introducing sample weights into the loss function, the trajectories with fewer sampling points contribute more to the overall loss. This solves the problems of inconsistent sampling rates and data imbalance, effectively improving the performance and robustness of the trajectory prediction model, thereby addressing the issues raised in the background art.
[0004] To achieve the above objectives, the present invention provides the following technical solution: A generative spatiotemporal trajectory prediction method for inconsistent sampling rates includes the following steps: Step 1, Obtain spatiotemporal trajectory data: Obtain spatiotemporal trajectory data by collecting historical trajectory records of the target moving entity, and construct a spatiotemporal trajectory dataset; Step 2, Data Preprocessing: Preprocess the spatiotemporal trajectory data; Step 3, Data Mapping: Map the sparse spatiotemporal trajectory data into a dense vector representation, and perform spatiotemporal alignment on the mapped dense vector representation; Step 4, learn the probability distribution of spatiotemporal trajectory data: train the generative model to learn the probability distribution of spatiotemporal trajectory data; Step 5, synthesize spatiotemporal trajectory data samples: sample from the latent space using the trained generative model, and synthesize spatiotemporal trajectory data samples using decoding; Step 6, introduce sample weights into the loss function: introduce sample weights into the loss function to address inconsistencies in sampling rates; Step 7: Obtain the trajectory prediction results: The predicted trajectory results are obtained through the generative model and the introduced sample weights.
[0005] As a further aspect of the present invention, step two involves data preprocessing, which preprocesses the spatiotemporal trajectory data. The preprocessed spatiotemporal trajectory data is represented as follows: ; ; In the formula: This is the preprocessed spatiotemporal trajectory dataset. For spatiotemporal trajectory datasets, For preprocessing functions, For the first The target moving entity is The coordinates of the location at that moment. The total number of entities that move towards the target.
[0006] As a further aspect of the present invention, step two involves data preprocessing, which preprocesses the spatiotemporal trajectory data. The preprocessing includes removing outliers, filling in missing data, and time alignment. Outliers are removed using a spatial outlier detection method; missing data is filled using a road network matching method; and the trajectories of the target moving entities are made consistent in the time dimension using a time alignment method.
[0007] As a further aspect of the present invention, step three involves data mapping, which maps sparse spatiotemporal trajectory data into a dense vector representation. Spatiotemporal alignment of the mapped dense vector representation helps eliminate problems caused by inconsistent sampling rates. The mapped dense vector representation is as follows: ; In the formula: The dense vector representation after mapping. For mapping functions, This is the preprocessed spatiotemporal trajectory dataset. This is a spatiotemporal trajectory dataset.
[0008] As a further aspect of the present invention, a clean and consistent trajectory after road network matching is obtained through a GNN network. Perform mapping to obtain Dense vector representation; original trajectory processed through a Transformer network Perform mapping to obtain Dense vector representation; the dense vector representations after the above two mappings are spatiotemporally aligned using an Attention network.
[0009] As a further aspect of the present invention, step four involves learning the probability distribution of spatiotemporal trajectory data, training a generative model to learn the probability distribution of spatiotemporal trajectory data, and learning a variational autoencoder (...). )Will Mapping to the latent space, the decoder simultaneously learns to generate trajectories from the latent space. During the learning process, the variational autoencoder loss function is formed by minimizing the reconstruction error and the regularization term of the latent space. The formula for the variational autoencoder loss function is: ; In the formula: The loss function of the variational autoencoder is... for divergence, As latent variables, For decoder, For latent variables Decoding, For encoder, For encoder latent variables of the output Make expectations.
[0010] As a further aspect of the present invention, step five involves synthesizing spatiotemporal trajectory data samples. These samples are obtained by sampling from the latent space using a trained generative model, and then synthesizing the spatiotemporal trajectory data samples using decoding. The synthesized spatiotemporal trajectory data samples are represented as follows: ; In the formula: Position coordinates exist Synthetic spatiotemporal trajectory data samples at each moment, For latent variables Decoding.
[0011] As a further aspect of the present invention, sample weights are introduced into the loss function in step six to address sampling rate inconsistencies. The loss function formula is as follows: ; In the formula: The output of the loss function, For synthesizing spatiotemporal trajectory data samples The weight, For synthesizing spatiotemporal trajectory data samples The loss.
[0012] The technical effects and advantages of this invention, a generative spatiotemporal trajectory prediction method for inconsistent sampling rates, are as follows: This invention uses a generative model to generate additional trajectory samples, increasing the number of trajectories with fewer sampling points, thus making the trajectories with different sampling rates in the spatiotemporal trajectory dataset more balanced; at the same time, the weights are adjusted, giving higher weights to trajectories with fewer sampling points, so as to increase the attention of samples during model training; using a generative network to generate additional trajectory samples more effectively, and introducing sample weights into the loss function, so that trajectories with fewer sampling points contribute more to the overall loss, solving the problems of inconsistent sampling rates and data imbalance, and effectively improving the performance and robustness of the trajectory prediction model. Attached Figure Description
[0013] Figure 1 This is a flowchart illustrating a generative spatiotemporal trajectory prediction method for inconsistent sampling rates according to the present invention. Detailed Implementation
[0014] The technical solutions of this invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described technical solutions are only a part of this invention, and not all of it. All other technical solutions obtained by those skilled in the art based on the technical solutions of this invention without inventive effort are within the scope of protection of this invention.
[0015] A generative spatiotemporal trajectory prediction method for inconsistent sampling rates includes the following steps: Step 1, Obtain spatiotemporal trajectory data: Obtain spatiotemporal trajectory data by collecting historical trajectory records of the target moving entity, and construct a spatiotemporal trajectory dataset; Step 2, Data Preprocessing: Preprocess the spatiotemporal trajectory data; Step 3, Data Mapping: Map the sparse spatiotemporal trajectory data into a dense vector representation, and perform spatiotemporal alignment on the mapped dense vector representation; Step 4, learn the probability distribution of spatiotemporal trajectory data: train the generative model to learn the probability distribution of spatiotemporal trajectory data; Step 5, synthesize spatiotemporal trajectory data samples: sample from the latent space using the trained generative model, and synthesize spatiotemporal trajectory data samples using decoding; Step 6, introduce sample weights into the loss function: introduce sample weights into the loss function to address inconsistencies in sampling rates; Step 7: Obtain the trajectory prediction results: The predicted trajectory results are obtained through the generative model and the introduced sample weights.
[0016] Generative models generate additional trajectory samples to increase the number of trajectories with fewer sampling points, making the trajectories with different sampling rates in the spatiotemporal trajectory dataset more balanced. At the same time, the weights are adjusted to give higher weights to trajectories with fewer sampling points, so as to increase the attention of samples during model training. Generative networks are used to generate additional trajectory samples more effectively, and sample weights are introduced into the loss function so that trajectories with fewer sampling points contribute more to the overall loss. This solves the problems of inconsistent sampling rates and data imbalance, and can effectively improve the performance and robustness of trajectory prediction models.
[0017] In this embodiment of the invention, step two, data preprocessing, involves preprocessing the spatiotemporal trajectory data. The preprocessed spatiotemporal trajectory data is represented as follows: ; ; In the formula: This is the preprocessed spatiotemporal trajectory dataset. For spatiotemporal trajectory datasets, For preprocessing functions, For the first The target moving entity is The coordinates of the location at that moment. The total number of entities that are targeted for movement.
[0018] In this embodiment of the invention, step two, data preprocessing, involves preprocessing the spatiotemporal trajectory data. The preprocessing includes removing outliers, filling in missing data, and time alignment. Outliers are removed using a spatial outlier detection method; missing data is filled using a road network matching method; and the trajectories of the target moving entities are made consistent in the time dimension using a time alignment method.
[0019] In this embodiment of the invention, step three, data mapping, maps sparse spatiotemporal trajectory data into a dense vector representation. Spatiotemporal alignment of the mapped dense vector representation helps eliminate problems caused by inconsistent sampling rates. The mapped dense vector representation is as follows: ; In the formula: The dense vector representation after mapping. For mapping functions, This is the preprocessed spatiotemporal trajectory dataset. This is a spatiotemporal trajectory dataset.
[0020] In this embodiment of the invention, a clean and consistent trajectory after road network matching is obtained through a GNN network. Perform mapping to obtain Dense vector representation; original trajectory processed through a Transformer network Perform mapping to obtain Dense vector representation; the dense vector representations after the above two mappings are spatiotemporally aligned using an Attention network.
[0021] In this embodiment of the invention, step four involves learning the probability distribution of spatiotemporal trajectory data, training a generative model to learn the probability distribution of spatiotemporal trajectory data, and learning a variational autoencoder (...). )Will Mapping to the latent space, the decoder simultaneously learns to generate trajectories from the latent space. During the learning process, the variational autoencoder loss function is formed by minimizing the reconstruction error and the regularization term of the latent space. The formula for the variational autoencoder loss function is: ; In the formula: The loss function of the variational autoencoder is... for divergence, As latent variables, For decoder, For latent variables Decoding, For encoder, For encoder The output latent variables are expected.
[0022] The goal of the variational autoencoder loss function is to minimize the reconstruction error, making the data generated by the decoder as similar as possible to the original data. Furthermore, the regularization term (KL divergence) ensures that the distribution of the latent space is close enough to the prior distribution, so that the generative model can not only generate reasonable trajectory data during training, but also learn a meaningful latent space, which is helpful for subsequent trajectory analysis or generation tasks.
[0023] In this embodiment of the invention, step five involves synthesizing spatiotemporal trajectory data samples. These samples are obtained by sampling from the latent space using a trained generative model and then synthesizing spatiotemporal trajectory data samples using decoding. The synthesized spatiotemporal trajectory data samples are represented as follows: ; In the formula: Position coordinates exist Synthetic spatiotemporal trajectory data samples at each moment, For latent variables Decoding.
[0024] In this embodiment of the invention, sample weights are introduced into the loss function in step six to address inconsistencies in sampling rates. The loss function formula is as follows: ; In the formula: The output of the loss function, For synthesizing spatiotemporal trajectory data samples The weight, For synthesizing spatiotemporal trajectory data samples The loss.
[0025] This invention uses a generative model to generate additional trajectory samples, increasing the number of trajectories with fewer sampling points and making the trajectories with different sampling rates in the spatiotemporal trajectory dataset more balanced. At the same time, the weights are adjusted to give higher weights to trajectories with fewer sampling points, so as to increase the attention of samples during model training. By using a generative network to generate additional trajectory samples more effectively and introducing sample weights into the loss function, the trajectories with fewer sampling points contribute more to the overall loss, solving the problems of inconsistent sampling rates and data imbalance, and effectively improving the performance and robustness of the trajectory prediction model.
[0026] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0027] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A generative spatiotemporal trajectory prediction method for inconsistent sampling rates, characterized in that, Includes the following steps: Step 1, Obtain spatiotemporal trajectory data: Obtain spatiotemporal trajectory data by collecting historical trajectory records of the target moving entity, and construct a spatiotemporal trajectory dataset; Step 2, Data Preprocessing: Preprocess the spatiotemporal trajectory data; Step 3, Data Mapping: Map the sparse spatiotemporal trajectory data into a dense vector representation, and perform spatiotemporal alignment on the mapped dense vector representation; Step 4, learn the probability distribution of spatiotemporal trajectory data: train the generative model to learn the probability distribution of spatiotemporal trajectory data; By learning variational autoencoders Will Mapping to the latent space, the decoder simultaneously learns to generate trajectories from the latent space. During the learning process, the variational autoencoder loss function is formed by minimizing the reconstruction error and the regularization term of the latent space. The formula for the variational autoencoder loss function is: ; In the formula: The loss function of the variational autoencoder is... for divergence, As latent variables, For decoder, The dense vector representation after mapping. For encoder, For encoder latent variables of the output Make expectations; Step 5, synthesize spatiotemporal trajectory data samples: sample from the latent space using the trained generative model, and synthesize spatiotemporal trajectory data samples using the decoder; Step 6, introduce sample weights into the loss function: introduce the sample weights into the loss function; Step 7: Obtain the trajectory prediction results: The predicted trajectory results are obtained through the generative model and the introduced sample weights.
2. The generative spatiotemporal trajectory prediction method for inconsistent sampling rates according to claim 1, characterized in that, Step 2: Data preprocessing. The spatiotemporal trajectory data is preprocessed, and the preprocessed spatiotemporal trajectory data is represented as follows: ; ; In the formula: This is the preprocessed spatiotemporal trajectory dataset. For spatiotemporal trajectory datasets, For preprocessing functions, For the first The target moving entity is The coordinates of the location at that moment. The total number of entities that move towards the target.
3. The generative spatiotemporal trajectory prediction method for inconsistent sampling rates according to claim 1, characterized in that, Step 3, data mapping, maps sparse spatiotemporal trajectory data into dense vector representations. Spatiotemporal alignment of the mapped dense vector representations helps eliminate problems caused by inconsistent sampling rates. The mapped dense vector representation is as follows: ; In the formula: The dense vector representation after mapping. For mapping functions, This is the preprocessed spatiotemporal trajectory dataset. This is a spatiotemporal trajectory dataset.
4. The generative spatiotemporal trajectory prediction method for inconsistent sampling rates according to claim 1, characterized in that, Step 5: Synthesize spatiotemporal trajectory data samples. The trained generative model samples the data from the latent space, and the decoder synthesizes the spatiotemporal trajectory data samples. The synthesized spatiotemporal trajectory data samples are represented as follows: ; In the formula: Position coordinates exist Synthetic spatiotemporal trajectory data samples at each moment, For decoders.
5. The generative spatiotemporal trajectory prediction method for inconsistent sampling rates according to claim 1, characterized in that, Step six introduces sample weights into the loss function to address sampling rate inconsistencies. The loss function formula is as follows: ; In the formula: The output of the loss function, For synthesizing spatiotemporal trajectory data samples The weight, For synthesizing spatiotemporal trajectory data samples The loss.
Citation Information
Patent Citations
TCN-GRU ship trajectory prediction method, system and device based on coding-decoding structure, and medium
CN116342657A
Dynamic graph generative adversarial network track prediction method and system for multi-source heterogeneous data
CN116523002A