Self-supervised trajectory completion method in general scene

By combining the Transformer and the diffusion model, the self-supervised general trajectory probability completion method solves the problem of missing spatiotemporal information of trajectory data in general scenarios, achieves efficient completion of trajectory data, and is suitable for marine and aerial environments that lack auxiliary information. scene.

CN118550907AActive Publication Date: 2024-08-27NAT UNIV OF DEFENSE TECH

Patent Information

Application Number
CN202410661443.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2024-08-27
Estimated Expiration
2044-05-27

AI Technical Summary

Technical Problem

Existing time series data interpolation methods are difficult to effectively handle the spatiotemporal characteristics of trajectory data, especially in general scenarios lacking auxiliary information, and cannot accurately complete trajectory data, especially in ocean or air environments, affecting trajectory prediction and Accuracy of completion.

Method used

A self-supervised universal trajectory probability completion method (STUTI) based on Transformer and diffusion model is proposed. It combines representation learning model and grid coding, predicts noise through neural network, generates completion data of trajectory sequence, and uses diffusion embedding and TrajEncoder. The layers capture spatiotemporal relationships and establish a unified trajectory completion framework.

Benefits of technology

It effectively alleviates the lack of spatiotemporal information in trajectory data in an open environment, improves the completion accuracy and stability of trajectory data, is suitable for trajectory interpolation tasks in general scenarios, and is superior to traditional methods and other generative models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550907A
    Figure CN118550907A
Patent Text Reader

Abstract

The invention discloses a self-supervised track completion method in a general scene. The method comprises the following steps: acquiring a general track sequence data set; the data range is limited by adopting Min-Max transformation; randomly setting the track points of the partial region to be missing; selecting a preset Gaussian noise level value, and iteratively adding noise to the missing track sequence which is finally converged to Gaussian distribution; in each step in the reverse trajectory denoising process, noise is predicted by a neural network, and complementation data of the trajectory sequence is finally generated; and inputting the actual track sequence data into the trained neural network, and complementing the actual track sequence data by the neural network. According to the method, a deterministic model and a conditional diffusion model are combined, position information representation is enhanced through gridding coding, and spatial-temporal correlation and uncertainty are effectively processed; the spatio-temporal information loss of the trajectory data is relieved; and the space-time correlation of the trajectory data is effectively learned.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology, and in particular relates to a self-supervised trajectory completion method in a general scenario. Background Art

[0002] Driven by the rapid advancement of the digital world, the collection and utilization of location data has become ubiquitous, providing unprecedented opportunities to optimize our living spaces and experiences. However, paralleling this technological advancement are challenges in data integrity and quality, as data loss due to various reasons such as equipment failure and human error is inevitable and can severely impair the performance of downstream applications. Unfortunately, promising solutions to these problems are still lacking to date.

[0003] Existing methods for interpolation of trajectory data are usually based on interpolation methods for time series data. In recent years, from early models such as ARIMA and VAR, and MICE, a variety of deep learning techniques have been developed, including attention-based deterministic models, complex network structures combining RNN and LSTM, and probabilistic models using VAE and GAN variants. Diffusion models have also been introduced into time series interpolation, using their strong performance in generation tasks to enhance interpolation accuracy.

[0004] However, in response to the corresponding gap in the task of trajectory data interpolation, most of the above-mentioned time series data interpolation methods usually learn the sequence representation of multivariate time series and roughly unravel the latent variables, ignoring the fact that trajectory data is a special kind of spatiotemporal data with special relative position relationships and long-range relationships of trajectories in time series modeling, and cannot solve the trajectory data interpolation problems and needs well.

[0005] Secondly, most of the scenarios for trajectory interpolation are based on real-world problems in urban traffic, such as motion analysis, motion capture, scene understanding, and autonomous driving. However, the scenarios used by these models only focus on cities with a large amount of auxiliary information, ignoring the trajectory completion task in general scenarios, especially in the absence of auxiliary information such as road networks or real-time images. In this scenario, it not only involves personal-level data processing, such as sparse data collected by GPS devices in remote areas or in the wild, but also involves a wider range, such as aerial trajectory monitoring and maritime rescue in marine or air environments without sufficient ground support. In these cases, a deep understanding of trajectory data becomes particularly critical because they are directly related to effective trajectory prediction and completion, thereby supporting more accurate decision-making, and their importance is self-evident.

[0006] In addition, there is currently no unified framework between generative models and deterministic models for trajectory completion in general scenarios. Although some generative models have made great achievements in handling multi-dimensional time series completion tasks, they cannot handle the completion of spatiotemporal trajectory data in a fine-grained manner. Using deterministic models such as transformers cannot accurately and effectively solve the above problems. How to effectively combine the two models with different ideas is also essential to solving the missing values ​​of trajectories in real problems. Summary of the invention

[0007] In response to the above problems and the shortcomings of existing models, this application proposes a novel self-supervised universal trajectory probability completion method (STUTI) based on Transformer and diffusion model. Specifically, the diffusion model is combined with the deterministic model to create a unified universal trajectory completion framework to fill the gap in this field. For general scenarios, by introducing representation learning models and grid coding processing, the lack of spatiotemporal information of trajectory data in open environments can be effectively alleviated.

[0008] The present application discloses a self-supervised trajectory completion method in a general scenario, comprising the following steps:

[0009] Collecting universal trajectory sequence data of a target from an ocean scene or a field scene, the universal trajectory sequence data comprising a plurality of trajectory point data, each trajectory point data comprising a latitude and longitude and a corresponding time, and dividing the universal trajectory sequence data into a non-overlapping training set, a test set and a validation set;

[0010] Min-Max transformation is used to limit the data range;

[0011] The trajectory points of some areas are randomly set to missing;

[0012] Selecting a preset Gaussian noise level value, iteratively adding noise to the missing trajectory sequence that eventually converges to a Gaussian distribution;

[0013] At each step of the reverse trajectory denoising process, the neural network predicts the noise and finally generates the complete data of the trajectory sequence;

[0014] The actual trajectory sequence data is input into the trained neural network, and the neural network completes the actual trajectory sequence data.

[0015] Furthermore, a sequence of N equally spaced trajectories of length L is expressed as in is the observed trajectory data, is the missing trajectory data, M is the missing record matrix, X cond ={X i,t |M i,t=1},X miss ={X i,t |M i,t =0}, M∈[0,1] N×L , i=1, 2,...,N, t=1, 2,...,L.

[0016] Furthermore, the trajectory data X∈R N×L Gridding is performed to generate a gridding information matrix Grid∈N N×L , each trajectory X i The total number of grids is recorded as in

[0017] Adaptively adjust the grid resolution r according to the length of the trajectory dataset

[0018]

[0019] y ticks , x ticks It is the ordinate and abscissa scale in matplotlib.

[0020] Furthermore, the completion of trajectory data includes two processing steps, namely the input processing process and the noise prediction process. The former is a forward denoising process, which aims to iteratively add noise to the missing trajectory sequence that eventually converges to a Gaussian distribution; the latter is a reverse denoising process, which reconstructs Gaussian noise for each step and finally generates the completed data of the trajectory sequence; at each step in the reverse trajectory denoising process, the noise is predicted by the STUTINet neural network.

[0021] Furthermore, the STUTINet neural network includes multiple STUTIGRIDBlocks, and the outputs of all STUTIGRIDBlocks constitute the reconstruction noise ∈ θ ;

[0022] The STUTIGRIDBlock includes a fully connected layer, a one-dimensional convolution layer, a gating unit, and a TrajEncoder layer. The data first passes through multiple convolution layers and a fully connected layer, and then passes through two TrajEncoder layers before being split by a gating unit and a residual connection is made. Finally, the outputs of all STUTIGRIDBlocks are concat-operated to obtain the final result.

[0023] The STUTIGRIDBlock takes the trajectory data, grid information and diffusion embedding of the tth step as input during training and inference, and estimates the reconstruction noise in STUTIGRIDBlock(t) and uses the output as the trajectory information input of the next step to realize the residual structure;

[0024] The diffusion embedding is to use a text editor to generate the embedding corresponding to the text, and then use it together with random noise and time steps as the input of the diffusion.

[0025] Furthermore, the TrajEncoder layer uses an attention mechanism to capture the temporal dependency of the time series, and uses the encoded grid information to capture the spatial dependency of the time series, including: using the Transformer to extract features from the non-missing trajectory data, considering that the spatial features of the trajectory cannot be well extracted, and incorporating the grid information of the trajectory encoded using the Embedding layer to extract the spatial features of the trajectory;

[0026] The structure of the TrajEncoder model is as follows: based on the transformer model, the grid is first encoded in the embedding layer, and then the fully connected neural network and the one-dimensional convolutional neural network are used multiple times to transform the trajectory data into the same dimension as the grid information vector. The position encoding is then fused and passed into the transformer layer to obtain the enhanced trajectory information feature vector.

[0027] Furthermore, inference completion is achieved through self-supervised training, which involves using M to artificially generate missing record matrices, M∈[0,1] N×L , divided into conditional data X by missing record matrix cond And complete data X miss , where X cond ={X i,t |M i,t =1}, ={X i,t |M i,t = 0}, during training, follow the training process of the unconditional model and add With the gridded data in the map, this makes the optimization objective become:

[0028]

[0029] Among them, ∈ is the same as the dimension of the input Consistent, will produce X miss As the missing value of the trajectory for training, and X miss Set to 0 or empty. is the initial condition data, x t is the intermediate value of the diffusion model output at time t. This step converts x t ,t, Grid as input, and use Predict the value of ∈.

[0030] Going further, the steps of training the algorithm are as follows:

[0031] Distribution of input training data q(x0), number of iterations N iter , the noise level sequence {α t}, and trajectory data is the total number of grids divided by the adaptive resolution of the current dataset;

[0032] t~Uniform(1,…,T), x0~q(x0), i.e., a t is randomly selected from 1,…,T;

[0033] X cond =X⊙M,X miss =X⊙(1-M),∈~N(0,I), where∈ and X have the same dimension;

[0034] According to the formula Perform gradient descent algorithm;

[0035] The trained denoising function ∈ θ .

[0036] Furthermore, the trajectory sequence interpolation problem is to train the network model p θ , to approximate the true distribution q(X), that is:

[0037]

[0038] where p θ It is a probability completion model that aims to approximate the true conditional distribution q(X miss |X cond );

[0039] During inference completion, we first sample random noise ∈ from a standard Gaussian, ie, x T , and through the reverse process of the conditional diffusion model, at each step t, using the missing data given by And the trained network generates Get the missing value of X at step t-1 To gradually remove noise, and finally get the generated complete data Gradually transform the noise into a sequence of completed trajectories.

[0040] Furthermore, the steps of the inferred completion algorithm are as follows:

[0041] Input X0 with missing values, number of iterations N iter , the trained denoising function ∈ θ , and trajectory data The noise level sequence {α t};

[0042] Xcond =X⊙M, E~N(0,I), where E is has the same dimensions as X;

[0043] X cond Considered as And Denoising:

[0044]

[0045] where α t =1-β t , β t is the noise level;

[0046] According to the hyperparameter n sample Perform multiple inference completions and output the completed trajectory data BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 The trajectory data interpolation process provided by the embodiment of the present application;

[0048] Figure 2 Trajectory grids at different resolutions;

[0049] Figure 3 The TrajEncoder model architecture provided in the embodiment of the present application;

[0050] Figure 4 The architecture diagram provided in the embodiment of the present application is composed of an input processing part and STUTINet (i.e., a noise prediction module), including multiple STUTIGRIDBlocks, and the outputs of all STUTIGRIDBlocks constitute the reconstructed noise ∈ θ ;

[0051] Figure 5 : The architecture of the STUTIGRIDBlock provided in the embodiment of the present application, the left side is the input information, the right side is the internal structure of the STUTIGRIDBlock at the tth step, and the output composition is the reconstructed noise DETAILED DESCRIPTION

[0052] The present invention is further described below in conjunction with the accompanying drawings, but the present invention is not limited in any way. Any changes or substitutions made based on the teachings of the present invention belong to the protection scope of the present invention.

[0053] Before introducing the embodiments of the present application, some terms involved in the present application are explained first. 1. Deterministic models: Deterministic models represent and learn sequences and model them, generating deterministic interpolations given observations. Bayesian MCMC proposed a bidirectional recurrent neural network to effectively estimate missing values. GRUD and BRITS replace missing values ​​of input sequences with specific markers. SAITS uses self-attention to capture temporal features and feature correlations, and there are models that use differential equation networks for time series interpolation, such as the controlled differential equation network NeuralCDE and the ordinal differential equation network Latent-ODE. GRIN and ARGN combine RNN with graph convolutional networks (GCN) to generate more accurate interpolations.

[0054] 2. Probabilistic models: Probabilistic models extend GAN to multivariate interpolation, resulting in a large number of GANs, such as E2-GAN, GRUI-GAN, GAIN or SSGAN, which propose corresponding models for different perspectives. Some work is based on variational autoencoders (VAEs), such as GP_VAE, to enhance the interpretability of the model.

[0055] 3. Trajectory representation and completion: How to use trajectory representation learning has always been an important issue in spatiotemporal data analysis and management. In recent years, some two-stage methods have been proposed. First, a graph representation learning model is used to learn road representation vectors, and then a sequence learning model with self-supervised tasks is used to convert the road representation vectors in the same trajectory into trajectory representations, such as Tast and PIM. START also designs a variety of self-supervised tasks and contrastive learning for training. Most of these methods are based on road networks and propose various spatial correlation construction methods. However, they are only applicable to scenarios with strong information and cannot complete trajectories well in general scenarios.

[0056] exist Figure 1 The process of using the present application for trajectory data interpolation is illustrated in the figure. The present application starts interpolation from the random noise on the right side of the figure, and gradually converts the noise into a reasonable time series through the reverse process of the conditional diffusion model. At each step t, the reverse process removes the noise from the output of the previous step (t+1). In the denoising process, the trajectory sequence of non-missing data (in the upper left corner of the figure) can be used as a conditional input, allowing the model to use information in the observation for denoising. In order to train the model, a self-supervised training method is used to divide the data into conditional information and interpolation targets, that is, training is performed in a manner similar to MLM (Masked Language Modeling, which is a proxy task in natural language processing).

[0057] This application focuses on the problem of trajectory sequence interpolation in an open environment. The goal is to estimate the missing trajectory values ​​based on the observed values ​​of these sequences. The multivariate time series of interest contains trajectory sequences of the same length, each of which contains missing values. The trajectory sequence interpolation problem in a real environment is defined as follows: 1. The processed sequence of N equally spaced trajectories of length L can be represented as X∈R N×L , where X cond ∈R N×L is the observable trajectory data, X miss ∈R N×L is the missing trajectory data, M is the missing record matrix, M∈[0,1] N×L , where X cond ={X i,t |M i,t =1},X miss ={X i,t |M i ,t =0}.

[0058] 2. Denote the i-th trajectory as X i =(x i,1 , ..x i,t , ..., x i,T}, based on the fact that other additional information may be missing in general scenarios, only each trajectory point x i,t Include That is, the longitude and latitude values ​​of the trajectory points. At the same time, it is considered that the longitude and latitude of the trajectory data are correlated.

[0059] 3. Transform the trajectory data X∈R N×L Gridding is performed according to the adaptive resolution to generate the gridding information matrix Grid∈N N×L , each trajectory X i The total number of grids is recorded as in

[0060] 4. Based on the actual problem, consider the random missing of trajectory information. For the all-1 matrix 1∈R N ×L , uniform random sampling X∈R N×L α ratio points in the matrix, and assign the relevant positions to 0, and obtain the missing record matrix M∈[0,1] N×L , thus As input.

[0061] 5. Define the trajectory sequence interpolation problem in an open environment as training the network model p θ , approximating the true distribution q(X), that is:

[0062]

[0063] where p θ It is a probability completion model that aims to approximate the true conditional distribution q(X miss |X cond ).

[0064] The present application discloses a self-supervised trajectory completion method in a general scenario, comprising the following steps:

[0065] Obtaining a general trajectory sequence dataset, and dividing the general trajectory sequence dataset into a non-overlapping training set, a test set, and a validation set;

[0066] Min-Max transformation is used to limit the data range;

[0067] The trajectory points of some areas are randomly set to missing;

[0068] Selecting a preset Gaussian noise level value, iteratively adding noise to the missing trajectory sequence that eventually converges to a Gaussian distribution;

[0069] At each step of the reverse trajectory denoising process, the neural network predicts the noise and finally generates the complete data of the trajectory sequence;

[0070] The actual trajectory sequence data is input into the trained neural network, and the neural network completes the actual trajectory sequence data.

[0071] refer to Figure 2 , this application proposes a method for processing trajectory data in grid form. By dividing the area into multiple grids with fixed resolution, all trajectory points are mapped to the corresponding grids, as shown in the figure below. This method regards the trajectory points in the same grid as a unified area, assigns the same identifier to these points, and simplifies the spatial information of the trajectory points.

[0072] This gridding process is particularly useful in general scenarios that lack external auxiliary information, such as road networks or real-time images, because obtaining precise geographic location information may not be feasible. Trajectories within adjacent grids usually share similar spatial characteristics, which not only optimizes the expressiveness of trajectory location information, but also helps the model learn the spatial features of these trajectories more efficiently. In this way, rich spatial context can be effectively captured without relying on precise geographic information, and a robust representation of trajectory data can be provided.

[0073] In addition, the present application adaptively adjusts the grid resolution r according to the length of the trajectory dataset ,In different datasets, different maps will lead to large differences in longitude and latitude. This application uses map information to adjust the ,resolution of the trajectory to solve this problem.,yticks ,x ticks Set by matplotlib's internal automatic tick locator.

[0074]

[0075] Transformer models are based on multi-head attention mechanisms, which provide key advantages that make them particularly suitable for sequence data and have achieved great success in recent years. Inspired by the impressive results achieved by unsupervised pre-training of Transformer models in NLP, this application introduces the Transformer-based architecture to the field of trajectory data. In fact, some work has proved that the model is fully applicable to this field. By inputting the target sequence data to extract dense vectors of multivariate time series, the vector representation of the trajectory is fully learned, so it performs well in a wide range of downstream tasks, such as regression, classification, and completion.

[0076] Therefore, this application proposes a Transformer-based TrajEncoder model, which uses the attention mechanism to capture the temporal dependency of the time series and uses the encoded Grid information to capture the spatial dependency of the time series. The structure is as follows: Figure 3 As shown, this application uses Transformer to extract features from the non-missing trajectory data. Considering that the spatial features of the trajectory cannot be extracted well, the grid information of the trajectory is encoded using the Embedding layer and the data is normalized to solve this problem. Embeddings is an embedding layer in the field of machine learning. It is a dense numerical representation that represents objects and relationships in the real world as vectors. Data normalization can be achieved by inputting the normalization layer BN in the field of machine learning.

[0077] The structure and working process of the TrajEncoder model are as follows: The structure of the TrajEncoder model is based on a deterministic model. At this time, this application uses the transformer model as the basis. First, the grid GRID is encoded similar to the embedding layer in natural language processing, and then the fully connected neural network FC and the one-dimensional convolutional neural network are used multiple times to convert the trajectory data into the same dimension as the grid information vector, and then the position code PE is fused and passed into the transformer layer to obtain the enhanced trajectory information feature vector.

[0078] Most of the current generative spatiotemporal data completion models are based on VAE or GAN, and there is no previous work that directly applies the conditional diffusion model to spatiotemporal data interpolation. Considering the similarities between spatiotemporal data and time series data, this application introduces the time series interpolation model into spatiotemporal data interpolation. Previous researchers have made some progress on this issue, such as CSDI, SSSDS4, or MIDM, which are all time series interpolation based on the DiffWave framework. Therefore, this application adapts the time series interpolation model of the DiffWave architecture into a baseline for trajectory sequence completion, and proposes a completion model STUTI that is more suitable for general trajectory data. Figure 4 The framework of this application is described in the paper. The framework involves two main processes, namely the input processing process and the noise prediction process. The former noise addition process aims to iteratively add noise to the missing trajectory sequence that eventually converges to a Gaussian distribution. The latter then reconstructs the Gaussian noise for each step and finally generates the complete data of the trajectory sequence. At each step in the reverse trajectory denoising process, the noise is predicted by a designed neural network called STUTINet.

[0079] The STUTI framework mainly consists of two processes. The forward denoising process aims to iteratively add noise to the missing trajectory sequence that eventually converges to a Gaussian distribution. The backward denoising process then reconstructs the Gaussian noise for each step and finally generates the completed data of the trajectory sequence. At each step in the reverse trajectory denoising process, the noise is predicted by the designed neural network of STUTINet. Secondly, the architecture of STUTI is based on diffwave, and it is improved on this basis to achieve a model for trajectory sequence completion. STUTI consists of an input processing part and STUTINet (i.e., a noise prediction module). STUTINet includes multiple STUTIGRIDBlocks, and the outputs of all STUTIGRIDBlocks constitute the reconstructed noise ∈ θ .

[0080] The STUTIGRIDBlock proposed in this application takes the trajectory data, grid information Gridinfo and DiffusionEmbedding of the tth step as input during training and inference, and estimates the reconstruction noise in STUTIGRIDBlock(t) and uses the output as the trajectory information input of the next step to realize the residual structure. Figure 5,STUTIGRIDBlock mainly includes fully connected layer FC, one-dimensional convolution layer Conv, gate unit Gate Layer, TrajEncoder layer. The data first passes through multiple convolution and fully connected layers, and then passes through two layers of TrajEncoder layers, split by gate units, and make residual connections. Finally, all STUTIGRIDBlock outputs are concat operated to get the final result. DiffusionEmbedding uses Text Encoder (CLIP model) to generate the embedding corresponding to the text, and then uses it together with random noise and time steps as the input of Diffusion.

[0081] The STUTI framework uses a denoising diffusion probability model, which has shown state-of-the-art performance in multidimensional time series completion. However, the introduction of the denoising diffusion model into the field of trajectory completion is a pioneering work. Based on the premise that the diffusion process belongs to the Markov process, the diffusion model aims to use the learned p θ (X) approximates the true distribution p(X), and learns the mapping from the latent space to the original signal space by removing noise in a backward process that is sequentially added in a Markovian manner in the so-called forward process. 1). The forward noise addition process can be parameterized as:

[0082]

[0083] where β t Indicates the noise level, that is, given x t-1 On the premise of Given the original sequence x0, we can finally get the noised data x t , and α t Replaced by 1-β t ,Right now:

[0084] where ∈~N(0,I),

[0085] 2). The reverse denoising process can be parameterized as:

[0086] p(X t-1 |X t X0)=N(X t-1 ; μ(X t-1 |X t X0),σ(t))

[0087] in The variance σ(t) is only related to t, At this time, given x0 and x t, the network model will output ∈ θ , x t Denoising is x t-1 ,Right now:

[0088]

[0089] To minimize The real distribution The KL divergence of , the reverse process is trained by solving the following optimization problem:

[0090]

[0091] Implementation of inferred completion:

[0092] Self-supervised training: This application uses M for artificial missing record matrix, M∈[0,1] N×L , divided into conditional data X by missing record matrix cond And complete data X miss , where X cond ={X i,t |M i,t =1}, ={X i,t |M i,t =0}. During training, follow the training process of the unconditional model and add With the gridded data in the map, this makes the optimization objective become:

[0093]

[0094] Among them, ∈ is the same as the dimension of the input Consistent, in training, will produce X miss Train as missing values ​​of the trajectory and set them to 0 or nan. Nan means missing in Python, which is similar to "empty", "NULL", and "None". The specific algorithm is as follows:

[0095]

[0096] During inference completion, this application first samples random noise ∈ from a standard Gaussian, that is, x T , and through the reverse process of the conditional diffusion model, at each step t, using the missing data given by And the trained network generates get To gradually remove noise, and finally get the generated complete data Gradually convert the noise into a reasonable sequence of completed trajectories. The specific algorithm is as follows:

[0097]

[0098]

[0099] Next, the effectiveness of the proposed model for general trajectory sequence interpolation is demonstrated through experiments. Four datasets are used, and the datasets and evaluation criteria are constructed. This application evaluates the performance of the proposed model on four taxi trajectory datasets: Geolife, EastSeaAIS, and DCIC2021.

[0100] Geolife: This dataset was collected from 182 users of the Geospatial Project (Microsoft Research Asia) from April 2007 to August 2012. This dataset is an urban scene, and the GPS trajectory of the dataset is represented by a series of timestamped points, containing information on latitude, longitude, and altitude. This type of dataset is widely used in tasks such as trajectory prediction and trajectory time estimation. (https: / / www.microsoft.com / en-us / download / details.aspx?id=52367)

[0101] EastSeaAIS data is compiled from the trajectory data sent back by AIS equipment of ships in the East China Sea from July 2018 to June 2019. This dataset is an ocean scene, and the data comes from the historical trajectory data of real ships at sea. The dataset covers information in multiple dimensions. This type of dataset is widely used in scenarios such as ship navigation status assessment and ship collision probability detection. (https: / / osdds.nsoas.org.cn / DataRetrieval)

[0102] The DCIC2021 dataset comes from the 2021 Digital China Innovation Contest (DCIC 2021), which provides data information such as simulated human drift coordinates and marine environmental elements from December 2019 to October 2020. This dataset is an ocean scene, and aims to establish a drift model to predict the drift trajectory of people who fall into the water as accurately as possible, which can minimize the size of the search area and reduce the investment in search and rescue forces. (https: / / www.datafountain.cn / datasets / 5968)

[0103] LocaRDS is an open reference dataset of real-world crowdsourced flight data from the OpenSky network, containing more than 222 million measurements from more than 50 million transmissions recorded by 323 sensors. This dataset is a space scene and can be used for testing and analyzing spatial and temporal data tasks such as positioning. (https: / / zenodo.org / records / 4302265)

[0104] The entire data is divided into non-overlapping training sets, test sets, and validation sets in a ratio of {8:1:1}. By segmenting and screening valid trajectories, the detailed data of the valid data set is shown in the following table.

[0105] Table 1: Statistics of the four datasets

[0106] Dataset Location Scenarios Duration Traj Pair Node Number Geolife Beijing Urban Traffic 5years 993 105230 EastSeaAIS EastSea Openocean 12 months 192 19598 DCIC2021 Taiwan Strait Openocean 11 months 418 80242 LocaRDS Open Sky Airspace 3600seconds 921 180485

[0107] This application uses three data sets to combine with actual tasks, and constructs data for a general network on the above data sets through data deformation, data missing, and noise settings.

[0108] 1. Data deformation

[0109] Min-Max transformation is used to limit the data range, because trajectory data is particularly sensitive to data accuracy. Using most nonlinear transformations has a very large impact on the results. The change of the decimal point of longitude and latitude in the transformation will lead to a huge position gap when the data is restored, which greatly affects the value of the result. Based on Min-Max transformation and fine-tuning, we can focus on the precision of the decimal point, which solves this problem well.

[0110] 2. Data Missing and Clipping

[0111] Based on the actual problem of missing trajectories, we use the idea of ​​random point missing to randomly set the trajectory points in 10% of the area to missing, that is, to set all the information there to 0. At the same time, in order to unify the data, we limit each trajectory to max Within the length, if it exceeds l max , and crop to l max points, if less than l max , fill with 0 and use the fill matrix Mask Pad Record the position. If less than l min For those trajectories with longer lengths, this application will sample points at the same time interval and limit them to l max In this application, l max =200, l min =50.

[0112] 3. Noise addition

[0113] How to use the appropriate Gaussian noise level β to add noise to the data has always been an interesting exploration direction. Four schedules were preset in the experiment, namely cosine, sigmoid, quadratic and linear. In this experiment, the quadratic unequal method was used to set β and achieved good results. This application will use β start=0.0001,β end =0.5.

[0114] Considering that it is difficult to use models with existing road network data for interpolation in scenarios with missing information, this application compares the proposed STUTI model with several widely used multidimensional time series completion models and state-of-the-art models as baselines, and also considers both deterministic models and generative models for comparison.

[0115] In the deterministic model, KNN uses the average of the K most relevant variables as interpolation, and this application takes K = 10. The Transformer model uses the attention mechanism to interpolate serialized data; BRITS is based on RNN and uses recurrent dynamics to estimate missing values ​​in multivariate time series; SAITS learns missing values ​​from a weighted combination of two diagonal masked self-attention (DMSA) blocks.

[0116] In generative models, GP-VAE is a deep probabilistic model for multivariate time series interpolation that combines the ideas of variational autoencoders and Gaussian processes. SSGAN can be seen as GAIN with a bidirectional recurrent encoder and decoder. The representative work of recent diffusion models, CSDI, uses a conditional diffusion model and uses the Diffwave architecture to estimate multivariate time series missing, and SSSDS4 uses the recent advanced state space model as a denoising module and combines it with Diffwave to achieve interpolation.

[0117] This application proposes four indicators for evaluation, namely, mean absolute error (MAE), root mean square error (RMSE), grid prediction accuracy (Grid-ACC), and continuous ranking probability score (CRPS) as metrics. CRPS refers to the evaluation method of CSDI and is defined as follows:

[0118]

[0119]

[0120]

[0121]

[0122] In the CRPS(F,x) formula, F(y) is the predicted cumulative distribution function CDF, where x is the observed value, H(y-x) is the Heaviside step function, which is 1 when y≤x and 0 when y>x. The integral is performed on all possible results y to calculate the area of ​​the square difference between F(y) and H(y-x), which is an indicator used to evaluate the accuracy of the probability prediction model. It calculates the integral of the square of the difference between the predicted cumulative distribution function and the step function corresponding to the observed value. Integrating over all possible results, the result can be regarded as the total amount of inconsistency between the predicted distribution and the actual observation. In short, the smaller the value of CRPS, the higher the accuracy of the prediction model.

[0123] Table 2 shows the performance comparison of STUTI and the selected baseline methods on four real datasets. Specifically, we compare the performance of the best model after training for the four evaluation indicators described in 5.1.4. The model is compared with the deterministic model, and Table 2 is obtained, where the bold font is the best data and the underlined font is the suboptimal data.

[0124] Table 2: Performance comparison of deterministic models

[0125]

[0126]

[0127] It can be seen that the performance of simply using traditional methods KNN or Transformer is not enough to handle the task of spatiotemporal trajectory data completion under the condition of missing information. The BRTIS method performed poorly, and these methods showed unstable performance in different tasks. For example, the BRTIS algorithm performed well on land and ocean data, but it showed very poor accuracy on aerial data, much lower than the other three datasets. In addition, sequence-based methods (BRTIS, SAITS), except Transformer, showed significantly better performance in interpolation tasks than simply using traditional methods. Obviously, this application outperforms all non-generative baseline models and shows strong superiority in trajectory completion recovery.

[0128] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0129] This application proposes a self-supervised trajectory completion method for general scenarios, which combines a deterministic model and a conditional diffusion model, and enhances the position information representation through grid coding to effectively handle spatiotemporal correlation and uncertainty.

[0130] For the first time, a unified model using a diffusion model combined with a representation learning model is proposed to handle trajectory completion tasks in general scenarios, and at the same time effectively alleviate the lack of spatiotemporal information of trajectory data in an open environment, which can well solve the real problems and needs of trajectory interpolation in general scenarios. This application uses a (conditional) diffusion model as a generative modeling technology, and uses grid coding processing to strengthen the representation of trajectory position information, enhance the modeling ability of spatiotemporal data, and perform spatiotemporal sequence modeling of trajectories, thereby effectively learning the spatiotemporal correlation of trajectory data based on time series.

[0131] As used herein, the word "preferred" is intended to be used as an example, instance, or illustration. Any aspect or design described herein as "preferred" is not necessarily to be construed as being more advantageous than other aspects or designs. On the contrary, the use of the word "preferred" is intended to present concepts in a specific way. The term "or" as used in this application is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless otherwise specified or clear from the context, "X uses A or B" means any one of the naturally included permutations. That is, if X uses A; X uses B; or X uses both A and B, then "X uses A or B" is satisfied in any of the foregoing examples.

[0132] Moreover, although the present disclosure has been shown and described with respect to one or implementations, those skilled in the art will think of equivalent variations and modifications based on the reading and understanding of this specification and the accompanying drawings. The present disclosure includes all such modifications and variations, and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the above-mentioned components (such as elements, etc.), the terms used to describe such components are intended to correspond to any component (unless otherwise indicated) that performs the specified function of the component (such as it is functionally equivalent), even if the structure is not equivalent to the disclosed structure of the function in the exemplary implementation of the present disclosure shown herein. In addition, although the specific features of the present disclosure have been disclosed with respect to only one of several implementations, such features can be combined with one or other features of other implementations that may be desired and advantageous for a given or specific application. Moreover, insofar as the terms "including", "having", "containing" or their variations are used in specific embodiments or claims, such terms are intended to be included in a manner similar to the term "comprising".

[0133] The functional units in the embodiments of the present invention may be integrated into a processing module, or each unit may exist physically separately, or multiple or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc. The above-mentioned devices or systems may execute the storage method in the corresponding method embodiment.

[0134] To sum up, the above embodiment is an implementation mode of the present invention, but the implementation mode of the present invention is not limited by the embodiment. Any other changes, modifications, substitutions, combinations, and simplifications that deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A self-supervised trajectory completion method for general scenarios, characterized in that: The following steps are involved: Collecting universal trajectory sequence data of a target from an ocean scene or a field scene, the universal trajectory sequence data comprising a plurality of trajectory point data, each trajectory point data comprising a latitude and longitude and a corresponding time, and dividing the universal trajectory sequence data into a non-overlapping training set, a test set and a validation set; Min-Max transformation is used to limit the data range; The trajectory points of some areas are randomly set to missing; Selecting a preset Gaussian noise level value, iteratively adding noise to the missing trajectory sequence that eventually converges to a Gaussian distribution; At each step of the reverse trajectory denoising process, the neural network predicts the noise and finally generates the complete data of the trajectory sequence; The actual trajectory sequence data is input into the trained neural network, and the neural network completes the actual trajectory sequence data.

2. The self-supervised general scenario trajectory completion method according to claim 1, characterized in that: A sequence of N equally spaced trajectories of length L is represented as in is the observed trajectory data, is the missing trajectory data, M is the missing record matrix, X cond ={X i,t │M i,t =1},X miss ={X i,t │M i,t =0}, M∈[0,1] N×L ,i=1,2,…,N, t=1,2,…,L.

3. The self-supervised general scenario trajectory completion method according to claim 2, characterized in that: The trajectory data X∈R N×L Gridding is performed to generate a gridding information matrix Grid∈N N×L , each trajectory X i The total number of grids is recorded as in Adaptively adjust the grid resolution r according to the length of the trajectory dataset y ticks ,x ticks It is the ordinate and abscissa scale in matplotlib.

4. The self-supervised general scenario trajectory completion method according to claim 3, characterized in that: The completion of trajectory data includes two processing steps, namely, the input processing process and the noise prediction process. The former is a forward noise addition process, which aims to iteratively add noise to the missing trajectory sequence that eventually converges to a Gaussian distribution. The latter is a reverse denoising process, which reconstructs Gaussian noise for each step and finally generates the complete data of the trajectory sequence; at each step in the reverse trajectory denoising process, the noise is predicted by the STUTINet neural network.

5. The self-supervised general scenario trajectory completion method according to claim 4, characterized in that: The STUTINet neural network includes multiple STUTIGRIDBlocks, and the outputs of all STUTIGRIDBlocks constitute the reconstruction noise ∈ θ ; The STUTIGRIDBlock includes a fully connected layer, a one-dimensional convolution layer, a gating unit, and a TrajEncoder layer. The data first passes through multiple convolution layers and a fully connected layer, and then passes through two TrajEncoder layers before being split by a gating unit and a residual connection is made. Finally, the outputs of all STUTIGRIDBlocks are concat-operated to obtain the final result. The STUTIGRIDBlock takes the trajectory data, grid information and diffusion embedding of the tth step as input during training and inference, and estimates the reconstruction noise in STUTIGRIDBlock(t) and uses the output as the trajectory information input of the next step to realize the residual structure; The diffusion embedding is to use a text editor to generate the embedding corresponding to the text, and then use it together with random noise and time steps as the input of the diffusion.

6. The self-supervised general scenario trajectory completion method according to claim 5, characterized in that: The TrajEncoder layer uses the attention mechanism to capture the temporal dependency of the time series, and uses the encoded grid information to capture the spatial dependency of the time series, including: using the Transformer to extract features from the non-missing trajectory data, considering that the spatial features of the trajectory cannot be well extracted, and incorporating the grid information of the trajectory encoded using the Embedding layer to extract the spatial features of the trajectory; The structure of the TrajEncoder model is as follows: based on the transformer model, the grid is first encoded in the embedding layer, and then the fully connected neural network and the one-dimensional convolutional neural network are used multiple times to transform the trajectory data into the same dimension as the grid information vector. The position encoding is then fused and passed into the transformer layer to obtain the enhanced trajectory information feature vector.

7. The self-supervised general scenario trajectory completion method according to claim 6, characterized in that: Inference completion is achieved through self-supervised training, including: using M for artificial missing record matrix, M∈[0,1] N×L , divided into conditional data X by missing record matrix cond And complete data X miss , where X cond ={X i,t │M i,t =1}, ={X i,t │M i,t = 0}, during training, follow the training process of the unconditional model and add With the gridded data in the map, this makes the optimization objective become: Among them, ∈ is the same as the dimension of the input Consistent, will produce X miss As the missing value of the trajectory for training, and X miss Set to 0 or empty. is the initial condition data, x t is the intermediate value of the diffusion model output at time t. This step converts x t ,t, Grid as input, and use Predict the value of ∈.

8. The self-supervised general scenario trajectory completion method according to claim 7, characterized in that: The steps to train the algorithm are as follows: Distribution of input training data q(x0), number of iterations N iter , the noise level sequence {α t }, and trajectory data is the total number of grids divided by the adaptive resolution of the current dataset; t~Uniform(1,...,T),x0~q(x0), i.e., randomly select a t from 1,...,T; X cond =X⊙M,X miss =X⊙(1-M),∈~N(0,I), where∈ and X have the same dimension; According to the formula Perform gradient descent algorithm; The trained denoising function ∈ θ .

9. The self-supervised general scenario trajectory completion method according to claim 8, characterized in that: The trajectory sequence interpolation problem is to train the network model p θ , to approximate the true distribution q(X), that is: where p θ It is a probability completion model that aims to approximate the true conditional distribution q(X miss |X cond ); During inference completion, we first sample random noise ∈ from a standard Gaussian, ie, x T , and through the reverse process of the conditional diffusion model, at each step t, using the missing data given by And the trained network generates Get the missing value of X at step t-1 To gradually remove noise, and finally get the generated complete data Gradually transform the noise into a sequence of completed trajectories.

10. The self-supervised general scenario trajectory completion method according to claim 9, characterized in that: The steps of the inference completion algorithm are as follows: Input X0 with missing values, number of iterations N iter , the trained denoising function ∈ θ , and trajectory data The noise level sequence {α t }; X cond =X⊙M,∈~N(0,I), where ∈ is has the same dimensions as X; X cond Considered as And Denoising: where α t =1-β t , β t is the noise level; According to the hyperparameter n sample Perform multiple inference completions and output the completed trajectory data

Citation Information

Patent Citations

  • A trajectory recovery method based on depth learning and Kalman filter correction

    CN109409499A

  • Spatial-temporal data trajectory completion method, device and equipment and storage medium

    CN115033653A

  • Smart grid 5G mobile terminal multi-track prediction method based on Transform

    CN115696203A

Cited By

  • Multi-modal trajectory prediction method based on conditional diffusion model

    CN119167322A

  • User position completion method and device, terminal equipment and storage medium

    CN119277322A

  • Marine environment robust data reconstruction method and system based on graph neural network

    CN119293649A

  • Time sequence missing value filling method and system based on diffusion model

    CN119537816A

  • Sparse trajectory recovery method based on generative adversarial network

    CN119622225A