Method for generating GPS track based on distributed parallel reasoning diffusion model
Through the combination of distributed parallel inference diffusion model and new UNet network, data privacy and speed problems in GPS trajectory generation are solved, efficient and real trajectory generation is achieved, and latency is reduced.
Patent Information
- Application Number
- CN202411403485.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2024-12-31
AI Technical Summary
Existing GPS trajectory generation methods have data accessibility and privacy issues, and slow diffusion model generation speed leads to excessive latency for interactive applications.
Using a diffusion model based on distributed parallel inference, a new UNet network with multi-scale feature fusion is constructed, and an asynchronous shared activation function is used for distribution of image blocks and asynchronous calculations are performed to improve the generation speed.
Achieve more realistic GPS trajectory generation, eliminates the risk of privacy leakage, and significantly accelerates GPS trajectory generation and reduces latency for interactive applications.
Smart Images

Figure CN119224804A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of GPS trajectory generation, in particular to a method for generating GPS trajectory based on a distributed parallel reasoning diffusion model. Background Art
[0002] GPS trajectory data plays a vital role in numerous spatiotemporal data mining applications, including urban transportation planning, business location selection, and travel time estimation. Despite substantial progress in urban applications through GPS trajectory analysis, little attention has been paid to data accessibility and privacy issues. In addition, the time-consuming and labor-intensive nature of trajectory data collection leads to the challenge of obtaining accessible, public, and privacy-preserving datasets. Diffusion models are more reliable and robust generation methods than canonical methods. Human activities in the real world exhibit random and uncertain characteristics. Diffusion models gradually reconstruct data from random noise, making them suitable for generating more realistic GPS trajectories. Since diffusion models generate trajectories from random noise, the risk of privacy leakage is eliminated. However, due to the huge computational cost, diffusion models have the problem of slow generation speed of generating GPS trajectory information, resulting in excessive latency for interactive applications. Therefore, researchers are faced with the challenge of efficiently obtaining GPS trajectory information. Summary of the invention
[0003] The object of the present invention is to solve at least one of the technical drawbacks.
[0004] To this end, an object of the present invention is to propose a method for generating GPS trajectories based on a distributed parallel reasoning diffusion model to solve the problems mentioned in the background technology and overcome the deficiencies in the prior art. In order to achieve the above object, an embodiment of one aspect of the present invention provides a method for generating GPS trajectories based on a distributed parallel reasoning diffusion model, comprising the following steps:
[0005] 1): Construct a GPS trajectory generation model based on a diffusion model, wherein the GPS trajectory generation model includes multi-scale feature fusion and a new UNet network;
[0006] The novel UNet network is based on the UNet network, each layer contains multiple stacked residual network blocks based on 1D-CNN, the convolution kernel size of each layer is 3, and an activation function is introduced after each convolution layer;
[0007] 2): Obtain a set of real-world GPS trajectories, the GPS trajectories including multiple sets, and use the GPS trajectories to train a diffusion model to obtain a mean square error that minimizes the prediction noise and the forward diffusion noise;
[0008] 3): Based on the trained diffusion model, the GPS trajectory of the same diffusion task is divided into multiple image blocks, and different image blocks are assigned to different GPUs for calculation, and the information of asynchronous activation functions between GPUs is obtained;
[0009] 4): Aggregate the final results of the above GPU to obtain the predicted noise; use this method until the reverse generation process is completed and output the predicted GPS trajectory image.
[0010] Preferably, in the diffusion model-based GPS trajectory generation model of step 1), each layer in the Unet network contains multiple stacked residual network blocks based on 1D-CNN, the convolution kernel size of each layer is 3, and an activation function is introduced after each convolution layer, and a transition module based on an attention mechanism is integrated between upsampling and downsampling, wherein downsampling uses maximum pooling and upsampling uses an interpolation method, and the transition module based on the attention mechanism consists of two stacked residual network blocks and an attention layer, and a conditional embedding block is integrated to learn the diffusion step and conditional information.
[0011] Preferably, in any of the above schemes, the method in step 2 for using multiple groups of GPS trajectories to train the diffusion model, the multiple groups of GPS trajectories are a series of continuously sampled user private GPS location information, and the GPS trajectory information of a single user adopts x={p1, p2, ..., p n}, where p i =[lat i , lng i ], lat i Indicates latitude, lng i For multiple sets of GPS tracks, the real private GPS track information of different users is used. 1 , x 2 , …, x n}.
[0012] Preferably, in any of the above schemes, the method of minimizing the mean square error of the prediction noise and the forward diffusion noise in step 2 is used for a series of GPS trajectory information X={x 1 , x 2 , …, x n} to perform inference, continuously add noise ε in the forward propagation, input noise ε and time t to the prediction model UNet, and UNet outputs the predicted noise ε θ , the minimum loss function expression is:
[0013]
[0014] Among them, β irepresents the variance used in the i-th step of adding noise. As t increases, β i Keep approaching 1.
[0015] Preferably, in any of the above schemes, the method of dividing the GPS trajectory generation of the same diffusion task into multiple image blocks in step 3, for K GPU devices, the image is divided into K parts, and different GPU devices use the same trained model to perform the GPS trajectory generation task.
[0016] Preferably, in any of the above schemes, the information of the asynchronous activation function between GPUs in step 3, the activation function of the k-th GPU device in the j-th layer of the UNet network for the t-th step is Indicates that the t+1th step of the jth layer in the UNet network of the reverse generation process is expressed as
[0017] is the complete spatial state; in the kth GPU device, The corresponding GPS generates the latest trajectory generation task, selectively The corresponding k-th task is mapped and output, K GPU devices, each GPU device is only responsible for Calculation of the area.
[0018] Preferably, in any of the above schemes, the outputs of all UNet layers in step 4 are synchronized and the final result obtained by the GPU is aggregated together, and the final output of each GPU is synchronized together to approximate the prediction noise ε of the tth step θ .
[0019] Preferably, any of the above solutions is that when the jth GPU generates an activation function responsible for output
[0020] When , the activation function will be broadcast to all other devices And perform aggregation operations. The GPU uses asynchronous communication and calculation. The aggregation operation does not block the ongoing calculation. When it reaches step t-1, each device has A copy of .
[0021] Preferably, from any of the above solutions, each GPU continuously repeats the operations of step 3 and step 4 until GPS trajectory information is finally generated.
[0022] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0023] 1. The method for generating GPS trajectories based on the distributed parallel reasoning diffusion model aims at data accessibility and privacy issues. Human activities in the real world show random and uncertain characteristics. The present invention uses a diffusion model to predict GPS trajectory information. The diffusion model gradually reconstructs data from random noise, making it suitable for generating more realistic GPS trajectories. Since the diffusion model generates trajectories from random noise, the risk of privacy leakage is eliminated.
[0024] 2. Aiming at the problem of high latency in generating GPS trajectories through diffusion models, which leads to excessive latency in interactive applications, the present invention uses a method of asynchronously sharing activation functions among GPUs using UNet networks to speed up the generation of GPS trajectories, thus overcoming the problem of slow generation of GPS trajectory information generated by diffusion models. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 This is a flow chart of a GPS trajectory generation method based on a distributed parallel reasoning diffusion model according to Embodiment 1 of the present invention;
[0026] Figure 2 A schematic diagram of a diffusion model network training of a GPS trajectory generation method based on a distributed parallel inference diffusion model according to a first embodiment of the present invention;
[0027] Figure 3 This is a schematic diagram of multi-GPU parallel reverse generation of a GPS trajectory generation method based on a distributed parallel reasoning diffusion model according to the second embodiment of the present invention. DETAILED DESCRIPTION
[0028] The present invention is further described below in conjunction with the accompanying drawings, but the protection scope of the present invention is not limited to the following description.
[0029] Embodiment 1: Figure 1 As shown, a GPS trajectory generation method based on a distributed parallel reasoning diffusion model includes:
[0030] Step 1: Construct a GPS trajectory generation model based on a diffusion model, wherein the GPS trajectory generation model includes multi-scale feature fusion and a novel UNet network;
[0031] In this embodiment, the novel UNet network is based on the UNet network, each layer includes multiple stacked residual network blocks based on 1D-CNN, the convolution kernel size of each layer is 3, and an activation function is introduced after each convolution layer.
[0032] In this embodiment, the GPS trajectory generation method based on the distributed parallel reasoning diffusion model is characterized in that the GPS trajectory generation model based on the diffusion model described in step 1, each layer in the Unet network contains multiple stacked residual network blocks based on 1D-CNN, the convolution kernel size of each layer is 3, and an activation function is introduced after each convolution layer, and a transition module based on the attention mechanism is integrated between upsampling and downsampling. The downsampling uses the maximum pooling method, the upsampling uses the interpolation method, and the transition module based on the attention mechanism consists of two stacked residual network blocks and an attention layer. A conditional embedding block is integrated to learn the diffusion step size and conditional information.
[0033] In this way, the diffusion model can be used to generate high-fidelity trajectory data with high efficiency and portability. The novel UNet network, which integrates residual blocks for spatiotemporal modeling and multi-scale feature fusion, can accurately predict the noise level in the denoising process.
[0034] Step 2: Obtain a set of real-world GPS trajectories, wherein the GPS trajectories include multiple sets, and use the GPS trajectories to train a diffusion model to obtain a mean square error that minimizes the prediction noise and the forward diffusion noise.
[0035] Embodiment 2: Figure 3 As shown, a method for generating GPS trajectories based on a distributed parallel reasoning diffusion model is provided. The multiple groups of GPS trajectories are a series of continuously sampled user private GPS location information. The GPS trajectory information of a single user is represented by x={p1, p2, ..., p n}, where p i =[lat i , lng i ], lat i Indicates latitude, lng i For multiple sets of GPS tracks, the real private GPS track information of different users is used. 1 , x 2 , …, x n The method of minimizing the mean square error of the prediction noise and the forward diffusion noise is used for a series of GPS trajectory information X = {x 1 , x 2 , …, x n} to perform inference, continuously add noise ε in the forward propagation, input noise ε and time t to the prediction model UNet, and UNet outputs the predicted noise ε θ , the minimum loss function expression is:
[0036]
[0037] Among them, βi represents the variance used in the i-th step of adding noise, using the sine embedding method in t. As t increases, β i Keep approaching 1.
[0038] By training the noise level of each diffusion time step in this way, the UNet structure of CNN can provide higher computational efficiency with fewer parameters compared to other time processing modules. Among them, the multi-level structure of skip connections can help the model better capture local and global contextual information in GPS trajectory data.
[0039] Step 3: Based on the trained diffusion model, the GPS trajectory of the same diffusion task is divided into multiple image blocks. Different image blocks are assigned to different GPUs for calculation, and the information of asynchronous activation functions between GPUs is obtained.
[0040] Specifically, Figure 3 As shown in the figure, the method of dividing the GPS trajectory generation of the same diffusion task into multiple image blocks is used. For K GPU devices, the image is divided into K parts, and different GPU devices use the same trained model to perform the GPS trajectory generation task. The information of asynchronous activation function between GPUs, the activation function of the kth GPU device in the jth layer of the UNet network for the tth step is Indicates that the t+1th step of the jth layer in the UNet network of the reverse generation process is expressed as is the complete spatial state. In the kth GPU device, The corresponding GPS trajectory generation task is the latest, selectively The corresponding k-th task is mapped and output. K GPU devices, each GPU device is only responsible for Calculation of the area.
[0041] In this way, the diffusion task is divided into K blocks, and K tasks are deployed on different GPS devices. Each device is only responsible for the total calculation. This enables efficient parallel diffusion task calculation.
[0042] Step 4: Aggregate the final results of the above GPU to obtain the predicted noise; use this method until the reverse generation process is completed and output the predicted GPS trajectory image.
[0043] Among them, the output of all UNet layers is finally synchronized on the GPU and the final result is aggregated together. The final output of each GPU is synchronized together to approximate the prediction noise ε of the tth step θ When the jth GPU generates the activation function responsible for the output When , the activation function will be broadcast to all other devices
[0044] And perform aggregation operations. The GPU uses asynchronous communication and calculation, and the aggregation operation will not block the ongoing calculation. When it reaches step t-1, each device has A copy of .
[0045] In this way, the application reuses the activations pre-computed in the previous step to provide global context and interaction between partitions for the current step. The application hides the communication overhead in the calculation through asynchronous communication of the GPU, improving the efficiency of creating generated content of the diffusion model.
[0046] Finally, each GPU repeats steps 3 and 4 until GPS trajectory information is generated.
[0047] A method for generating GPS trajectories based on a distributed parallel inference diffusion model. The working principle is as follows:
[0048] In summary, the method for generating GPS trajectories based on the distributed parallel reasoning diffusion model targets data accessibility and privacy issues, and human activities in the real world exhibit random and uncertain characteristics. The present invention uses a diffusion model to predict GPS trajectory information. The diffusion model gradually reconstructs data from random noise, making it suitable for generating more realistic GPS trajectories. Since the diffusion model generates trajectories from random noise, the risk of privacy leakage is eliminated, which leads to the problem of excessive delay in interactive applications. The present invention uses a method of asynchronously sharing activation functions between UNet networks of GPUs to speed up the generation of GPS trajectories, thereby overcoming the problem of slow generation speed of GPS trajectory information generated by the diffusion model.
[0049] Although the embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. Those skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention without departing from the principles and purpose of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for generating GPS trajectories based on a distributed parallel inference diffusion model, characterized in that: The following steps are involved: 1): Construct a GPS trajectory generation model based on a diffusion model, wherein the GPS trajectory generation model includes multi-scale feature fusion and a new UNet network; The novel UNet network is based on the UNet network, each layer contains multiple stacked residual network blocks based on 1D-CNN, the convolution kernel size of each layer is 3, and an activation function is introduced after each convolution layer; 2): Obtain a set of real-world GPS trajectories, the GPS trajectories including multiple sets, and use the GPS trajectories to train a diffusion model to obtain a mean square error that minimizes the prediction noise and the forward diffusion noise; 3): Based on the trained diffusion model, the GPS trajectory of the same diffusion task is divided into multiple image blocks, and different image blocks are assigned to different GPUs for calculation, and the information of asynchronous activation functions between GPUs is obtained; 4): Aggregate the final results of the above GPU to obtain the predicted noise; use this method until the reverse generation process is completed and output the predicted GPS trajectory image.
2. The method for generating GPS trajectories based on a distributed parallel inference diffusion model according to claim 1, characterized in that: The GPS trajectory generation model based on the diffusion model in step 1) comprises a plurality of stacked residual network blocks based on 1D-CNN in each layer of the Unet network, the convolution kernel size of each layer is 3, and an activation function is introduced after each convolution layer, and a transition module based on an attention mechanism is integrated between upsampling and downsampling, wherein downsampling uses maximum pooling and upsampling uses an interpolation method, and the transition module based on the attention mechanism consists of two stacked residual network blocks and an attention layer, and a conditional embedding block is integrated to learn the diffusion step and conditional information.
3. The method for generating GPS trajectories based on a distributed parallel inference diffusion model according to claim 1, characterized in that: In the method of step 2, multiple groups of GPS trajectories are used to train the diffusion model. The multiple groups of GPS trajectories are a series of continuously sampled user private GPS location information. The GPS trajectory information of a single user is x={p1, p2, ..., pn }, where p i =[lat i , lng i ], lat i Indicates latitude, lng i For multiple sets of GPS tracks, the real private GPS track information of different users is used. 1 , x 2 , ..., x n }.
4. The method for generating GPS trajectories based on a distributed parallel inference diffusion model according to claim 1, characterized in that: The method of minimizing the mean square error of the prediction noise and the forward diffusion noise in step 2 is used for a series of GPS trajectory information X={x 1 , x 2 , ..., x n } to perform inference, continuously add noise ε in the forward propagation, input noise ε and time t to the prediction model UNet, and UNet outputs the predicted noise ε θ , the minimum loss function expression is: Among them, β i represents the variance used in the i-th step of adding noise. As t increases, β i Keep approaching 1.
5. The method for generating GPS trajectories based on a distributed parallel inference diffusion model according to claim 1, characterized in that: The step 3 divides the GPS trajectory generation of the same diffusion task into multiple image blocks. For K GPU devices, the image is divided into K parts, and different GPU devices use the same trained model to perform the GPS trajectory generation task.
6. The method for generating GPS trajectories based on a distributed parallel inference diffusion model according to claim 1, characterized in that: The information of the asynchronous activation function between GPUs in step 3, the activation function of the kth GPU device in the jth layer of the UNet network for the tth step is Indicates that the t+1th step of the jth layer in the UNet network of the reverse generation process is expressed as is the complete spatial state; in the kth GPU device, The corresponding GPS generates the latest trajectory generation task, selectively The corresponding k-th task is mapped and output, K GPU devices, each GPU device is only responsible for Calculation of the area.
7. The method for generating GPS trajectories based on a distributed parallel inference diffusion model according to claim 1, characterized in that: The outputs of all UNet layers in step 4 are synchronized on the GPU and the final results are aggregated together. The final outputs of each GPU are synchronized together to approximate the prediction noise ε of the tth step θ .
8. The method for generating GPS trajectories based on a distributed parallel inference diffusion model according to claim 7, characterized in that: When the jth GPU generates the activation function responsible for the output When , the activation function will be broadcast to all other devices And perform aggregation operations. The GPU uses asynchronous communication and calculation. The aggregation operation does not block the ongoing calculation. When it reaches step t-1, each device has A copy of .
9. The method for generating GPS trajectories based on a distributed parallel inference diffusion model according to claim 7, characterized in that: Each GPU repeats steps 3 and 4 continuously until GPS trajectory information is generated.
Citation Information
Cited By
Trajectory generation method based on diffusion model
CN120123770A
