Vehicle travel mode prediction method and system based on adaptive multi-granularity weight self-guided graph diffusion

By employing an adaptive multi-granularity weighted self-guided graph diffusion method, and utilizing a large language model and a dynamic weight generation network, the problems of granularity adaptation and scene perception in vehicle travel pattern prediction are solved, achieving efficient prediction for different urban scenarios.

CN121766531APending Publication Date: 2026-03-31HUNAN UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing vehicle travel pattern prediction methods cannot adapt to the time granularity requirements of different scenarios, resulting in redundant fine-grained information or missing coarse-grained information, weak scenario perception capabilities, and an inability to balance short-term sudden changes with the stability of long-term trends, thus lacking prediction robustness.

Method used

An adaptive multi-granularity weighted self-guided graph diffusion method is adopted. Multi-dimensional scene features are extracted through a large language model and a contrastive language-image pre-trained model. Combined with a dynamic weight generation network and a multi-granularity conditional diffusion model, multi-granularity spatiotemporal feature weighted fusion and diffusion processing are performed.

Benefits of technology

It achieves automatic adaptation to the granular requirements of different urban scenarios, improves the scene perception capability, balances short-term sensitivity and long-term stability, and enhances prediction accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121766531A_ABST
    Figure CN121766531A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle travel mode prediction method based on self-adaptive multi-granularity weight self-guiding graph diffusion, and the method comprises the steps: processing vehicle GPS track data, a high-resolution satellite image of an area where a vehicle is located, time data and other multi-source data through employing an integration and coding mode; then dynamic weight generation is carried out through two multi-layer perceptron (MLP) modules and entropy regularization constraint, finally, a vehicle activity probability prediction result is output by means of a multi-granularity condition diffusion model, on one hand, multi-granularity dynamic weight and scene adaptation features are defined, and space-time dependence and environment constraint features of vehicle activity are more fully extracted, and on the other hand, the vehicle activity probability prediction result is obtained. A space-time diagram fusion modeling and entropy regularization constraint method is adopted, so that the method can capture space-time dependence of vehicle activities, multi-granularity weight distribution is balanced, and prediction accuracy and scene adaptability are improved from the two aspects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of deep learning, artificial intelligence spatiotemporal prediction, and intelligent analysis of urban scenes. More specifically, it relates to a method and system for predicting vehicle travel patterns based on adaptive multi-granularity weighted self-guided graph diffusion. Background Technology

[0002] After decades of global urbanization, transportation networks have become a core pillar of urban infrastructure, ensuring efficient interaction among citizens and supporting the smooth flow of goods and services. Private cars constitute the largest proportion of urban transportation systems and consistently play a crucial role. According to the latest statistics, over 90% of American households own at least one private car, and in Chinese cities, private cars account for nearly 88.6% of all vehicles. Unlike public transportation and taxis, which serve a wider range of people, private cars are intrinsically linked to their users and deeply integrated into their daily lives, making them more reflective of human activity patterns and individual needs. Therefore, analyzing vehicle travel patterns can provide valuable insights, thereby driving data-driven decision-making, facilitating more efficient traffic management, smarter infrastructure planning, and ultimately promoting sustainable urban development.

[0003] Existing methods for predicting vehicle travel patterns mainly include the following: First, traditional statistical learning methods, represented by ARIMA and XGBoost, build prediction models by fitting statistical patterns (such as trends and periods) of historical time-series data, relying only on single-dimensional time-series features (such as historical dwell rates and arrival volumes), without considering regional environment and multi-scale patterns. Second, single-granularity deep learning methods, typically LSTM and GRU-based time-series prediction models, or CNN-based spatial feature extraction models, focus on spatiotemporal data at a single time granularity, capturing local spatiotemporal dependencies through network structure, but cannot simultaneously account for short-term fluctuations and long-term trends. Third, static weighted multi-granularity fusion models, such as multi-scale CNNs and simple weighted multi-granularity Transformer models, fuse features of different granularities through fixed weights, without considering the dynamic changes in granularity requirements due to scene differences. Fourth, basic diffusion models, such as vanilla diffusion and time-series diffusion models. Diffusion recovers the data distribution by adding noise forward and denoising backward, but it lacks multi-granularity adaptation design and deep constraints on scene characteristics, relying only on the original time series data for prediction.

[0004] However, the aforementioned existing methods for predicting vehicle travel patterns all have some significant drawbacks: First, the above-mentioned static weight multi-granularity fusion model adopts a fixed weight allocation strategy, which cannot adapt to the different time granularity requirements of different scenarios such as morning rush hour commercial areas and early morning residential areas. Therefore, it will lead to redundancy of fine-grained information or lack of coarse-grained information. Second, the traditional statistical learning methods and single-granularity deep learning methods mentioned above do not fully integrate scene information, focusing on a single dimension (temporal or spatial) without deeply combining time cycle patterns, regional functional semantics and static environmental features. Therefore, they lead to weak scene perception capabilities and large prediction bias. Third, the aforementioned single-granularity deep learning methods and basic diffusion models lack a multi-granularity collaborative mechanism. The single-granularity model can only capture single-scale spatiotemporal dependence, and the basic diffusion model does not coordinate the design of multi-granularity information, resulting in the inability to simultaneously take into account the sensitivity to short-term sudden changes and the stability of long-term trends. Fourth, the above-mentioned basic diffusion model does not introduce scene feature constraints, and the parameters of the noise addition and denoising process are fixed, resulting in insufficient prediction robustness and large fluctuations in accuracy in complex urban scenarios. Summary of the Invention

[0005] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides a vehicle travel pattern prediction method and system based on adaptive multi-granularity weighted self-guided graph diffusion. Its purpose is to solve the following technical problems: Firstly, existing static weighted multi-granularity fusion models, employing fixed weight allocation strategies, cannot adapt to the differentiated time granularity requirements of different scenarios such as morning rush hour commercial areas and early morning residential areas, leading to redundant fine-granularity information or missing coarse-granularity information. Secondly, existing traditional statistical learning methods and single-granularity deep learning methods suffer from insufficient scene information fusion, focusing on a single dimension and failing to deeply integrate time cycle patterns, regional functional semantics, and static environmental characteristics, resulting in weak scene perception and significant prediction bias. Thirdly, existing single-granularity deep learning methods and basic diffusion models lack multi-granularity collaborative mechanisms; single-granularity models can only capture single-scale spatiotemporal dependencies, and basic diffusion models do not collaboratively design multi-granularity information, resulting in an inability to simultaneously consider sensitivity to short-term sudden changes and stability of long-term trends. Finally, existing basic diffusion models, due to the lack of scene feature constraints and fixed parameters in the noise addition and denoising processes, suffer from insufficient prediction robustness and large accuracy fluctuations in complex urban scenarios.

[0006] To achieve the above objectives, according to one aspect of the present invention, a vehicle travel pattern prediction method based on adaptive multi-granularity weighted self-guided graph diffusion is provided, comprising the following steps: (1) Obtain scene information of the vehicle to be predicted, including GPS trajectory data of the vehicle to be predicted, high-resolution satellite images of the area where the vehicle to be predicted is located, static scene information of the area, adjacency information of the area, and time data. (2) The GPS trajectory data of the vehicle to be predicted in the scene information obtained in step (1) is split into multiple time-granular non-overlapping sliding windows to obtain a multi-granular spatiotemporal sequence. The high-resolution satellite image of the area where the vehicle to be predicted is located in the scene information is extracted by the large language model LLM and the contrastive language-image pre-trained CLIP model to obtain a 256-dimensional static environment feature vector. The LLM and the bidirectional encoder representation BERT from Transformer are used to perform semantic enhancement description and dimensionality reduction on the regional static scene information in the scene information to obtain a 9-dimensional regional feature vector. The time data in the scene information is divided into time-period clustering and time-series feature encoding to obtain a 9-dimensional time feature vector. The obtained multi-granular spatiotemporal sequence, 256-dimensional static environment feature vector, 9-dimensional time feature vector and 9-dimensional regional feature vector are combined into the preprocessed scene information. (3) The 9-dimensional time feature vector and the 9-dimensional region feature vector in the preprocessed scene information obtained in step (2) are concatenated to obtain an 18-dimensional fused scene feature vector. (4) Input the 18-dimensional fusion scene feature vector obtained in step (3) into the pre-trained dynamic weight generation network to obtain multi-granularity dynamic weights; (5) Based on the multi-granularity spatiotemporal sequence and 256-dimensional static environmental feature vector obtained in step (2), obtain multi-granularity spatiotemporal features of multiple time granularities, and use the multi-granularity dynamic weight obtained in step (4) to perform weighted fusion of the multi-granularity spatiotemporal features of all time granularities to obtain 256-dimensional fused features; (6) Input the 256-dimensional fusion features obtained in step (5) into the pre-established multi-granularity conditional diffusion model to obtain vehicle activity prediction results at multiple time granularities.

[0007] Preferably, the GPS trajectory data of the vehicle to be predicted is collected from an onboard GPS device; High-resolution satellite images of the area where the vehicle to be predicted is located were obtained from publicly available satellite data platforms. The static scene information for the area was obtained from publicly available data from the city planning bureau; Regional adjacency information is geographic boundary vector data based on a 1km×1km grid. It is obtained through spatial topology calculation and adjacency determination algorithms. Specifically, it includes direct adjacency relationships, indirect adjacency relationships, and functional neighborhoods based on road connectivity between grids. The time data is obtained from the timestamps of the onboard GPS devices to be predicted, public calendar databases, and standard time interfaces of urban traffic management departments. Specifically, it includes the target time accurate to the minute, time period division, weekly cycle, holiday type, and time interval of temporary events.

[0008] Preferably, the dynamic weight generation network includes a first MLP module and a second MLP module; The specific structure of the first MLP module is as follows: The first layer is the input layer, which is used to obtain scene information of the vehicle to be predicted, preprocess the obtained scene information to obtain preprocessed scene information, and obtain a 1×18-dimensional scene feature vector from the preprocessed scene information and output it. The second layer is a hidden layer. Its input is the 1×18-dimensional scene feature output from the first layer. This layer performs linear transformation and non-linear activation processing on the scene feature to extract the effective features in the scene feature and outputs a 32-dimensional feature vector. The specific structure of the second MLP module is as follows: The first layer is the input layer, which is used to obtain and output a 32-dimensional feature vector from the second layer of the first MLP module; The second layer is the output layer, whose input is the 32-dimensional vector output from the first layer. This layer performs linear transformation and Softmax normalization on the 32-dimensional vector to obtain multi-granularity weights and output them.

[0009] Preferably, the dynamic weight generation network is trained through the following steps: (A1) Obtain scene information for multiple vehicles, including GPS trajectory data of all vehicles, as well as high-resolution satellite images of the area where all vehicles are located, static scene information of the area, and time data; (A2) Preprocess the scene information of all vehicles obtained in step (A1) to obtain the preprocessed scene information of all vehicles as a dynamic weight training dataset. (A3) The dynamic weight training dataset obtained in step (A2) is randomly divided into a training set and a validation set in a ratio of 7:3; (A4) Initialize the parameters of the dynamic weight generation network to obtain the initialized dynamic weight generation network; (A5) Input the training set obtained in step (A3) into the initialized dynamic weight generation network obtained in step (A4), and obtain the 3D predicted weight vector through the forward propagation algorithm. Then, obtain the weight entropy regularization loss value based on the 3D predicted weight vector. ; (A6) Based on the weight entropy regularization loss value obtained in step (A5), update and optimize all weight parameters and bias parameters of the dynamic weight generation network using the backpropagation algorithm to minimize the weight entropy regularization loss value. (A7) Repeat steps (A5) and (A6) above until the decrease in weight entropy regularization loss value is less than 1e-6 for 20 consecutive times, thereby obtaining the initially trained dynamic weight generation network; (A8) Use the validation set obtained in step (A3) to validate the dynamic weight generation network initially trained in step (A7) to obtain the trained dynamic weight generation network.

[0010] Preferably, step (A2) specifically involves first performing multiple time-granularity overlapping sliding window splitting processing on the GPS trajectory data set composed of the GPS trajectory data of all vehicles in the obtained scene information of all vehicles, in order to obtain multi-granularity spatiotemporal sequences. : in, This is a set of GPS trajectory data for all vehicles, with timestamps accurate to the second. SlidngAvg is a moving average function. ∈{1,2,3} represent the granularity for one hour, two hours, and four hours, respectively. Indicates the size of the non-overlapping sliding window. Indicates 60 minutes; Then, LLM and CLIP models were used sequentially to perform feature extraction processing on the high-resolution satellite image set consisting of high-resolution satellite images of all vehicle locations in the obtained scene information, in order to obtain a 256-dimensional static environment feature vector. : in Represents a collection of high-resolution satellite images. Represents the static environment feature vector It has 256 dimensions. This indicates that LLM is used for feature extraction processing on a high-resolution satellite image set. This indicates that the data within the brackets is processed using the CLIP model; Subsequently, LLM and BERT were used to perform semantic enhancement and dimensionality reduction on the regional static scene information obtained from the scene information, respectively, to obtain standardized 9-dimensional region feature vectors. : Subsequently, the time data in the obtained scene information was subjected to time period clustering and time sequence feature encoding to obtain a 9-dimensional time feature vector. Subsequently, the obtained 9-dimensional time feature vector and 9-dimensional region feature vector are concatenated to obtain an 18-dimensional fused scene feature vector; Finally, the obtained multi-granularity spatiotemporal sequence, 256-dimensional static environment feature vector, and 18-dimensional fused scene feature vector are combined into preprocessed scene information as a dynamic weight dataset. In step (A4), the initial values ​​of the weight parameters in the dynamic weight generation network are randomly generated using a truncated normal distribution with a standard deviation of 0.01, and the initial value of the bias parameter is set to 0; the training set is set to a fixed batch size of 32; the Adam optimizer is selected, with an initial learning rate of lr=0.001, and a step-wise learning rate adjustment strategy is adopted with a step size of stepsize=100 and a weight gamma=0.9, that is, the learning rate is multiplied by 0.9 every 100 training rounds to adapt to the gradient descent requirements of weight generation; Step (A5) specifically involves first performing LayerNorm normalization on each 18-dimensional fused scene feature vector in the training set obtained in step (A3) to obtain the normalized scene features. All normalized scene features constitute the training set after preliminary processing; Then, each normalized scene feature in the pre-processed training set is... The first MLP module in the initialized dynamic weight generation network obtained in step (A4) undergoes linear transformation and ReLU activation to obtain hidden layer features. ; This process specifically uses the following formula: in and All are learnable parameters. Represents the real number field; Subsequently, the features obtained from each hidden layer are input into the second MLP module for linear transformation and Softmax normalization to obtain a 3D prediction weight vector. The 3D prediction weight vector All elements in the vector fall within the interval [0,1] and the sum of all elements is 1. The components of each dimension of the 3D prediction weight vector correspond to the granularity of one hour, two hours, and four hours, respectively. This step specifically uses the following formula to obtain the 3D prediction weight vector. : in and All are learnable parameters, and exp represents the natural exponent operation; Finally, based on the obtained 3D prediction weight vector Calculate the weighted entropy regularized loss value : Preferably, step (5) specifically includes the following steps: (5-1) The multi-granularity spatiotemporal sequence obtained in step (2) The 256-dimensional static environment feature vectors are stacked dimensionally to obtain the complete node feature vector. Based on the regional adjacency information obtained in step (1), an adjacency matrix is ​​constructed to obtain the edge set, and the obtained complete node feature vectors are then used to construct the adjacency matrix. The edge set is combined to obtain initial structured data. This initial structured data is then encapsulated with a topological structure to obtain a spatiotemporal graph. Finally, the obtained spatiotemporal graph is sampled and masked to obtain a masked spatiotemporal graph. ; (5-2) Use a 3-layer spatiotemporal graph neural network (STGNN) to process the masked spatiotemporal graph obtained in step (5-1). Processing is performed to obtain 256-dimensional spatiotemporal features at multiple time granularities: in Indicates the first 256-dimensional spatiotemporal features at a time granularity; The specific processing steps of each STGNN layer are as follows: First, the acquired masked spatiotemporal graph is processed by temporal convolution (TCN) to obtain a preliminary set of temporal feature vectors capturing temporal dependencies. Then, the preliminary set of temporal feature vectors capturing temporal dependencies is subjected to LayerNorm temporal normalization to obtain a well-distributed set of temporal feature vectors. Next, the well-distributed set of temporal feature vectors is processed by the graph attention mechanism (GAT) to obtain a set of spatiotemporal fusion feature vectors that enhance key spatial correlations. This set of spatiotemporal fusion feature vectors is then subjected to LayerNorm spatial normalization to obtain a calibrated set of spatiotemporal fusion feature vectors. Finally, the calibrated set of spatiotemporal fusion feature vectors is residually concatenated with the original node feature vectors in the masked spatiotemporal graph to obtain the 256-dimensional spatiotemporal feature at the g-th temporal granularity. ; (5-3) The spatiotemporal features of all time granularities obtained in step (5-2) are weighted and summed according to the multi-granularity dynamic weights obtained in step (4) to obtain 256-dimensional fusion features. : in This represents a 3D prediction weight vector.

[0011] Preferably, the specific structure of the multi-granularity conditional diffusion model is as follows: The first layer is the conditional feature encoding layer, which is used to obtain the 256-dimensional fusion features obtained in step (5), the 256-dimensional static environment features obtained in step (2), and the number of noise addition steps corresponding to each time granularity. The obtained 256-dimensional fusion features and 256-dimensional static environment features are concatenated to obtain the basic conditional features. The obtained basic conditional features and the number of noise addition steps corresponding to each time granularity are encoded by step number embedding to obtain the concatenated vector. The concatenated vector is then jointly encoded using a multi-head attention mechanism to obtain the joint conditional vector. The second layer is the conditional diffusion generator, which includes a forward noise addition module, a denoising network module, and a reverse denoising module. The forward noise module is used to obtain the multi-granularity spatiotemporal sequence obtained in step (2). For the acquired multi-granularity spatiotemporal sequences Forward noise addition is performed to obtain the noise-added data set corresponding to each granularity, and the noise-added data set corresponding to each granularity is grouped by granularity to obtain the final noise-added data corresponding to that granularity. Among them, the The formula for the noisy data set corresponding to each time granularity is: in, For the first The noisy data at the k-th step corresponding to each time granularity. It is random noise that follows a normal distribution. For the first The variance coefficient at the k-th step corresponding to each time granularity is used to control the noise intensity, and its value ranges from 0.9 to 0.999, k∈[1, 2, 3]. ],in For the first The total number of noise-adding steps corresponding to each time granularity; The denoising network module consists of 3 layers, and its specific structure is as follows: The first layer is the input layer, whose inputs are the joint feature vector obtained from the conditional feature encoding layer, the final noisy data corresponding to each time granularity obtained from the forward noisy module, and the number of noisy steps corresponding to each time granularity. This layer first performs 1×1 convolution processing on the final noisy data corresponding to each time granularity to obtain the noisy data after feature mapping; then, it performs spatial broadcast embedding processing on the obtained joint feature vector to obtain the spatially broadcast joint feature vector; subsequently, it performs step embedding and spatial broadcast processing on the number of noisy steps corresponding to each time granularity to obtain the number of noisy steps after spatial broadcast; finally, it performs dimensional feature concatenation processing on the noisy data after feature mapping, the joint feature vector after spatial broadcast, and the number of noisy steps after spatial broadcast to obtain the fused feature. And output; The second layer is the spatiotemporal feature enhancement module, which is a three-layer stacked STGNN unit. Its input is the fused features output from the input layer. This module utilizes three stacked STGNN units to perform the fusion of features. Process the data to obtain and output spatiotemporally enhanced features; The specific process for each STGNN unit is as follows: First, the acquired fused features are processed... Temporal convolution operations are performed to obtain temporal augmentation features. Then, LayerNorm temporal normalization is applied to the obtained temporal augmentation features to obtain normalized temporal features. Next, graph attention is used to process the obtained normalized temporal features to obtain spatiotemporal fusion features. Subsequently, the obtained spatiotemporal fusion features are normalized according to spatial dimensions to obtain normalized spatiotemporal features. Finally, the obtained normalized spatiotemporal features are combined with the fusion features. Perform residual connections to obtain spatiotemporal augmentation features; The third layer is a parallel parameter prediction head, whose input is the spatiotemporal enhancement features output by the spatiotemporal feature enhancement module. This parallel parameter prediction head first simultaneously inputs these spatiotemporal enhancement features into three parallel fully connected prediction heads: a noise prediction head, a mean prediction head, and a variance prediction head, to obtain intermediate features from three branches. Then, the ReLU activation function is used to perform nonlinear feature transformations on the intermediate features of the three branches, resulting in three activated intermediate features. Finally, the Linear activation function is used to process the intermediate features from the noise prediction head and the mean prediction head respectively, to obtain the predicted noise. and predicted mean The linear activation function is used, and the softplus activation function is used to process the intermediate features of the variance prediction head to obtain the prediction variance. ; The input to the inverse denoising module is the predicted noise obtained from the denoising network module. Predicted mean Prediction variance The module also provides the final noise-added data for each time granularity obtained from the forward noise-adding module, which then processes the acquired prediction noise. Predicted mean Prediction variance The reverse iterative denoising process is repeated on the final noisy data corresponding to each time granularity until the number of noisy steps corresponding to each time granularity is completed to obtain denoised data. The obtained denoised data is then subjected to multi-granularity temporal alignment and feature standardization to obtain vehicle activity prediction results at multiple time granularities. The formula for reverse iterative denoising is as follows: in, Indicates the first The denoised data for the (k-1)th step corresponding to each time granularity, where c is the joint conditional vector obtained from the conditional feature coding layer.

[0012] Preferably, the multi-granularity conditional diffusion model is obtained through the following steps: (B1) Obtain multi-source input data for the multi-granularity conditional diffusion model, including GPS trajectory data of all vehicles, 256-dimensional fusion features, 256-dimensional static environmental features, and the number of noise addition steps corresponding to each time granularity; (B2) Preprocess the multi-source input data of the multi-granularity conditional diffusion model obtained in step (B1) to obtain the training dataset of the multi-granularity conditional diffusion model; (B3) The dynamic weight training dataset obtained in step (B2) is randomly divided into a training set and a validation set in a ratio of 7:3; (B4) Initialize the parameters of the multi-granularity conditional diffusion model to obtain the initialized multi-granularity conditional diffusion model; (B5) Input the training set obtained in step (B3) into the initialized multi-granularity conditional diffusion model obtained in step (B4), and obtain the prediction noise through the forward propagation algorithm. Predicted mean and prediction variance And calculate the total loss value based on the prediction results and the actual data; (B6) Based on the total loss value obtained in step (B5), update and optimize all weight parameters and bias parameters of the multi-granularity conditional diffusion model using the backpropagation algorithm to minimize the total loss value; (B7) Repeat steps (B5) and (B6) above until the decrease in total loss value is less than 1e-6 for 20 consecutive times, thus obtaining a pre-trained multi-granularity conditional diffusion model; (B8) Use the validation set obtained in step (B3) to validate the multi-granularity conditional diffusion model initially trained in step (B7) to obtain the trained multi-granularity conditional diffusion model.

[0013] Preferably, step (B2) specifically involves first performing multiple time-granularity overlapping sliding window splitting processes on the GPS trajectory data set consisting of GPS trajectory data of all vehicles in the multi-source input data of the obtained multi-granularity conditional diffusion model, in order to obtain a multi-granularity spatiotemporal sequence. : in, This is a set of GPS trajectory data for all vehicles, with timestamps accurate to the second. SlidngAvg is a moving average function. ∈{1,2,3} represent the granularity for one hour, two hours, and four hours, respectively. Indicates the size of the non-overlapping sliding window. Indicates 60 minutes; Then, the multi-granularity spatiotemporal sequence obtained in the previous step... Forward noise addition is performed to obtain the noise-added data set corresponding to each granularity, and the noise-added data set corresponding to each granularity is grouped by granularity to obtain the final noise-added data corresponding to that granularity. Among them, the The formula for the noisy data set corresponding to each time granularity is: in, For the first The noisy data at the k-th step corresponding to each time granularity. It is random noise that follows a normal distribution. For the first The variance coefficient at the k-th step corresponding to each time granularity is used to control the noise intensity, and its value ranges from 0.9 to 0.999, k∈[1, 2, 3]. ],in For the first The total number of noise-adding steps corresponding to each time granularity; Subsequently, 256-dimensional fusion features, 256-dimensional static environment features, and the number of noise addition steps corresponding to each time granularity are obtained from the multi-source input data of the multi-granularity conditional diffusion model. The obtained 256-dimensional fusion features and 256-dimensional static environment features are concatenated to obtain basic conditional features. The obtained basic conditional features and the number of noise addition steps corresponding to each time granularity are subjected to step embedding encoding to obtain concatenated vectors. A multi-head attention mechanism is used to jointly encode the obtained concatenated vectors to obtain joint conditional vectors. Finally, the joint conditional vector, the number of noise-adding steps corresponding to each time granularity, and the final noise-adding data corresponding to each time granularity are combined into a preprocessed training dataset for the multi-granularity conditional diffusion model. In step (B4), the initial values ​​of the 1×1 convolutional kernel, STGNN unit weights, and parallel parameter prediction head weights in the multi-granularity conditional diffusion model are randomly generated using a truncated normal distribution with a standard deviation of 0.01, and the initial value of the bias parameter is set to 0; the training set is set to a fixed batch size of 32; the Adam optimizer is selected, with an initial learning rate of lr=0.001, and a step-wise learning rate adjustment strategy is adopted with a step size of stepsize=100 and a weight gamma=0.9, that is, the learning rate is multiplied by 0.9 every 100 training rounds to adapt to the gradient descent requirements of weight generation; Step (B5) specifically involves the following steps: First, performing a 1×1 convolution on the final noisy data corresponding to each time granularity in the training set obtained in step (B3) to obtain the noisy data after feature mapping. Then, spatial broadcasting embedding is performed on the joint feature vector in the training set to obtain the spatially broadcast joint feature vector. Next, step number embedding and spatial broadcasting are performed on the number of noisy steps corresponding to each time granularity to obtain the number of noisy steps after spatial broadcasting. Finally, the noisy data after feature mapping, the joint feature vector after spatial broadcasting, and the number of noisy steps after spatial broadcasting are concatenated using dimensional features to obtain the fused features. And output; Then, the fusion features The input spatiotemporal feature enhancement module consists of three stacked STGNN units. This module utilizes the three stacked STGNN units to enhance the fused features. Process the data to obtain and output spatiotemporally enhanced features; Specifically, the process for each STGNN unit is as follows: First, the acquired fused features are processed... Temporal convolution operations are performed to obtain temporal augmentation features. Then, LayerNorm temporal normalization is applied to the obtained temporal augmentation features to obtain normalized temporal features. Next, graph attention is used to process the obtained normalized temporal features to obtain spatiotemporal fusion features. Subsequently, the obtained spatiotemporal fusion features are normalized according to spatial dimensions to obtain normalized spatiotemporal features. Finally, the obtained normalized spatiotemporal features are combined with the fusion features. Perform residual connections to obtain spatiotemporal augmentation features; Subsequently, the spatiotemporal enhancement features output by the spatiotemporal feature enhancement module are input into a parallel parameter prediction head. This parallel parameter prediction head first simultaneously inputs the spatiotemporal enhancement features into three parallel fully connected prediction heads: a noise prediction head, a mean prediction head, and a variance prediction head, to obtain intermediate features from three branches. Then, the ReLU activation function is used to perform nonlinear feature transformation on the intermediate features of the three branches respectively, to obtain three activated intermediate features. Finally, the Linear activation function is used to process the intermediate features of the noise prediction head and the mean prediction head respectively, to obtain the predicted noise. and predicted mean The linear activation function is used, and the softplus activation function is used to process the intermediate features of the variance prediction head to obtain the prediction variance. ; Subsequently, noise will be predicted. Predicted mean and prediction variance Input to the inverse denoising module, which processes the acquired predicted noise. Predicted mean Prediction variance The reverse iterative denoising process is repeated on the final noisy data corresponding to each time granularity until the number of denoising steps corresponding to each time granularity is completed to obtain denoised data. The obtained denoised data is then subjected to multi-granularity temporal alignment and feature standardization to obtain vehicle activity prediction results at multiple time granularities. The formula for reverse iterative denoising is as follows: in, Indicates the first The denoised data for the (k-1)th step corresponding to each time granularity; Finally, based on the predicted noise Calculate multi-particle-size diffusion loss: in, As the granularity-based weight, , , , It is forward-added random noise; Then, the multi-granularity diffusion loss is fused with the weighted entropy regularization loss obtained in step (A5) to obtain the total loss value: in, is the regularization coefficient.

[0014] According to another aspect of the present invention, a vehicle travel pattern prediction system based on adaptive multi-granularity weighted self-guided graph diffusion is provided, comprising the following modules: The first module is used to acquire scene information of the vehicle to be predicted, including GPS trajectory data of the vehicle to be predicted, high-resolution satellite images of the area where the vehicle to be predicted is located, static scene information of the area, adjacency information of the area, and time data. The second module is used to perform non-overlapping sliding window splitting on the GPS trajectory data of the vehicle to be predicted in the scene information obtained from the first module to obtain a multi-granularity spatiotemporal sequence. The large language model LLM and the contrastive language-image pre-trained CLIP model are used to extract features from the high-resolution satellite images of the area where the vehicle to be predicted is located in the scene information to obtain a 256-dimensional static environment feature vector. LLM and the bidirectional encoder representation BERT from Transformer are used to perform semantic enhancement description and dimensionality reduction on the regional static scene information in the obtained scene information to obtain a 9-dimensional region feature vector. The time data in the obtained scene information is subjected to time period clustering and temporal feature encoding to obtain a 9-dimensional time feature vector. The obtained multi-granularity spatiotemporal sequence, 256-dimensional static environment feature vector, 9-dimensional time feature vector, and 9-dimensional region feature vector are combined to form the preprocessed scene information. The third module is used to concatenate the 9-dimensional temporal feature vector and the 9-dimensional regional feature vector in the preprocessed scene information obtained by the second module to obtain an 18-dimensional fused scene feature vector. The fourth module is used to input the 18-dimensional fused scene feature vector obtained from the third module into the pre-trained dynamic weight generation network to obtain multi-granular dynamic weights. The fifth module is used to obtain multi-granularity spatiotemporal features at multiple time granularities based on the multi-granularity spatiotemporal sequence and 256-dimensional static environmental feature vector obtained by the second module, and to use the multi-granularity dynamic weights obtained by the fourth module to perform weighted fusion of the multi-granularity spatiotemporal features at all time granularities to obtain 256-dimensional fused features. The sixth module is used to input the 256-dimensional fusion features obtained from the fifth module into a pre-established multi-granularity conditional diffusion model to obtain vehicle activity prediction results at multiple time granularities.

[0015] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects: (1) This invention employs steps (3) to (4) and its corresponding dynamic weight generation network training steps (A1) to (A8), which concatenate the 9-dimensional time feature vector and the 9-dimensional regional feature vector into an 18-dimensional fused scene feature vector, inputting it into a dynamic weight generation network composed of two layers of MLP, and combining entropy regularization constraints to generate multi-granular dynamic weights adapted to the scene. Therefore, it can solve the technical problem of fine-grained information redundancy or coarse-grained information loss in the existing static weight multi-granularity fusion model. (2) This invention employs steps (2) to (3). In step (2), 256-dimensional static environment features are extracted by using the large language model LLM and the contrastive language-image pre-trained CLIP model. 9-dimensional regional features are obtained by LLM and the bidirectional encoder from Transformer representing BERT. 9-dimensional time features are obtained by time clustering + temporal coding. Then, in step (3), time and regional features are spliced ​​together to obtain 18-dimensional fused scene features. A multi-dimensional scene perception foundation of "time + region + static environment" is constructed. Therefore, it can solve the technical problems of weak scene perception ability and large prediction bias in existing statistical learning methods. (3) Since the present invention adopts steps (4) to (5), the multi-granularity dynamic weights generated in step (4) are used to perform weighted fusion of the multi-granularity spatiotemporal features of multiple time granularities (e.g., one hour, two hours, four hours) after being processed by the self-guided encoder in step (5). Combined with entropy regularization constraints to balance the contribution of each granularity, it retains the sensitivity of fine granularity to short-term fluctuations and utilizes the stability of coarse granularity to long-term trends. Therefore, it can solve the technical problem that the existing single-granularity deep learning methods cannot simultaneously take into account the sensitivity of short-term sudden changes and the stability of long-term trends. (4) This invention adopts step (6), which integrates 256-dimensional fusion features and 256-dimensional static environment features into the conditional feature encoding layer of the multi-granularity conditional diffusion model, providing strong scene constraints for the diffusion process. At the same time, it designs differentiated noise addition steps (60 steps for one hour, 40 steps for two hours, and 20 steps for four hours) and variance coefficients for multiple time granularities (e.g., one hour, two hours, and four hours). Combined with the spatiotemporal feature enhancement module composed of 3 layers of STGNN to optimize the denoising process, it can solve the technical problem of insufficient prediction robustness and large accuracy fluctuation of the existing basic diffusion model in complex urban scenarios. (5) This invention uses a dual-dimensional scene feature encoding mechanism of "time + region" and a dynamic weight generation mechanism to automatically adapt to the granularity requirements of different urban scenes. For example, during the morning rush hour, commercial areas prioritize 1-hour fine-grained features to capture short-term activity fluctuations, while residential areas in the early morning focus on 4-hour coarse-grained features to reflect stable trends, thus avoiding the problem of poor scene adaptability caused by traditional fixed weights. At the same time, it deeply integrates time cycle patterns (sine coding), regional functional semantics (LLM+BERT), and static environmental features (LLM-CLIP) to build a more comprehensive scene perception foundation, which can effectively reduce prediction bias caused by insufficient single feature dimensions. (6) This invention balances the collaboration of multi-granularity features through entropy regularization constraints, avoiding redundancy of fine-granular information or loss of coarse-granular information. By using spatiotemporal graph modeling and dynamic weight fusion of the self-guided encoder, efficient collaboration of multi-granularity features is achieved, which retains the sensitivity of 1-hour granularity to short-term sudden changes and utilizes the stability of 4-hour granularity to long-term trends, avoiding computational redundancy caused by independent processing of multi-granularity data. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating the vehicle travel pattern prediction method based on adaptive multi-granularity weighted self-guided graph diffusion of the present invention. Figure 2 This is a framework diagram of the multi-granularity conditional diffusion model of the present invention; Figure 3 This is a framework diagram of the dynamic weight generation network in this invention; Figure 4 This is a flowchart illustrating the self-guided encoder of the present invention; Figure 5 This is a schematic diagram of the processing flow of the single-layer STGNN of the present invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0018] In the description of this invention, it should be noted that the terms "first", "second", and "third" are used for descriptive purposes only, such as distinguishing between a first granularity (1h), a second granularity (2h), and a third granularity (4h), or a first scene feature (time feature) and a second scene feature (regional feature), etc., and should not be construed as indicating or implying relative importance.

[0019] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "connected" and "linked" should be interpreted broadly. For example, "connected" can refer to data transmission and interactive association between modules, while "linked" can refer to the adaptation of feature vectors to the input of the model network, or the logical association between functional units; it can be direct data transmission, or indirect association through intermediate data caching or preprocessing modules, or data connectivity within two units. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific scenario.

[0020] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0021] The basic idea of ​​this invention is to provide a vehicle travel pattern prediction method based on adaptive multi-granularity weighted self-guided graph diffusion. This method utilizes integration and encoding to process multi-source data such as vehicle GPS trajectory data, high-resolution satellite images of the vehicle's location, and time data. Then, it uses two multilayer perceptron (MLP) modules and entropy regularization constraints to dynamically generate weights. Finally, it outputs the vehicle activity probability prediction result using a multi-granularity conditional diffusion model. On the one hand, it defines multi-granularity dynamic weights and scene adaptation features to more fully extract the spatiotemporal dependence and environmental constraint features of vehicle activity. On the other hand, it employs spatiotemporal graph fusion modeling and entropy regularization constraints to capture the spatiotemporal dependence of vehicle activity and balance the multi-granularity weight distribution. These two aspects improve prediction accuracy and scene adaptability.

[0022] like Figure 1 As shown, this invention provides a vehicle travel pattern prediction method based on adaptive multi-granularity weighted self-guided graph diffusion, comprising the following steps: (1) Obtain scene information of the vehicle to be predicted, including GPS trajectory data of the vehicle to be predicted, high-resolution satellite images of the area where the vehicle to be predicted is located, static scene information of the area, adjacency information of the area, and time data. Specifically, the GPS trajectory data of the vehicle to be predicted is collected from the vehicle-mounted GPS device; the high-resolution satellite image of the area where the vehicle is located is obtained from a public satellite data platform; the static scene information of the area is obtained from the public data of the city planning bureau; the regional adjacency information is based on the geographic boundary vector data of a 1km×1km grid, which is obtained through spatial topology calculation and adjacency determination algorithm, specifically the direct adjacency relationship between grids, the indirect adjacency relationship, and the functional neighborhood based on road connectivity; the time data is obtained from the timestamp of the vehicle-mounted GPS device to be predicted, the public calendar database (statutory holidays / work adjustment information), and the standard time interface of the city traffic management department, specifically the target time accurate to the minute, the time period division, the weekly cycle, the holiday type, and the time interval of temporary events; (2) The GPS trajectory data of the vehicle to be predicted in the scene information obtained in step (1) is split into multiple time granularities (e.g., one hour, two hours, four hours) by non-overlapping sliding windows to obtain a multi-granularity spatiotemporal sequence. The Large Language Model (LLM) and Contrastive Language-Image Pretraining (CLIP) models are used to extract features from the high-resolution satellite images of the area where the vehicle to be predicted is located in the scene information to obtain a 256-dimensional static environment feature vector. The LLM and Bidirectional Encoder Representations from Transformers (BERT) are used to perform semantic enhancement description and dimensionality reduction on the regional static scene information in the scene information to obtain a 9-dimensional regional feature vector. The time data in the scene information is subjected to time period clustering and temporal feature encoding to obtain a 9-dimensional time feature vector. The obtained multi-granularity spatiotemporal sequence, 256-dimensional static environment feature vector, 9-dimensional time feature vector, and 9-dimensional regional feature vector are combined into the preprocessed scene information. The advantage of this step is that it achieves integrated preprocessing of multi-source data, multi-granularity splitting to adapt to different time scale requirements, and the feature extraction method takes into account both semantics and dimensionality simplification. The generated feature vectors have uniform dimensions and can be directly connected to subsequent model modules, reducing data redundancy and adaptation costs.

[0023] (3) The 9-dimensional time feature vector and the 9-dimensional region feature vector in the preprocessed scene information obtained in step (2) are concatenated to obtain an 18-dimensional fused scene feature vector. (4) Input the 18-dimensional fusion scene feature vector obtained in step (3) into the pre-trained dynamic weight generation network to obtain multi-granularity dynamic weights; Specifically, such as Figure 3 As shown, the dynamic weight generation network of the present invention includes a first MLP module and a second MLP module, wherein the specific structure of the first MLP module is as follows: The first layer is the input layer, which is used to obtain scene information of the vehicle to be predicted, preprocess the obtained scene information to obtain preprocessed scene information, and obtain a 1×18-dimensional scene feature vector from the preprocessed scene information and output it.

[0024] The preprocessing process of the input layer is exactly the same as step (1) above, and will not be repeated here.

[0025] The second layer is a hidden layer. Its input is the 1×18-dimensional scene features output from the first layer. This layer performs linear transformation and non-linear activation processing on the scene features to extract the effective features from the scene features and outputs a 32-dimensional feature vector.

[0026] The specific structure of the second MLP module is as follows: The first layer is the input layer, which is used to obtain and output a 32-dimensional feature vector from the second layer of the first MLP module; The second layer is the output layer, whose input is the 32-dimensional vector output from the first layer. This layer performs linear transformation and Softmax normalization on the 32-dimensional vector to obtain multi-granularity weights and output them.

[0027] Furthermore, the dynamic weight generation network of the present invention is trained through the following steps: (A1) Obtain scene information for multiple vehicles, including GPS trajectory data of all vehicles, as well as high-resolution satellite images of the area where all vehicles are located, static scene information of the area, and time data.

[0028] (A2) Preprocess the scene information of all vehicles obtained in step (A1) to obtain the preprocessed scene information of all vehicles as a dynamic weight training dataset.

[0029] Specifically, this step involves first performing a multi-time-granularity (e.g., one-hour, two-hour, four-hour) overlapping sliding window splitting process on the GPS trajectory data set composed of the GPS trajectory data of all vehicles in the obtained scene information of all vehicles, in order to obtain a multi-granularity spatiotemporal sequence. : in, This is a set of GPS trajectory data for all vehicles, with timestamps accurate to the second. SlidngAvg is a moving average function. ∈{1,2,3} represent the granularity for one hour, two hours, and four hours, respectively. Indicates the size of the non-overlapping sliding window. It indicates 60 minutes.

[0030] Then, LLM and CLIP models were used sequentially to perform feature extraction processing on the high-resolution satellite image set consisting of high-resolution satellite images of all vehicle locations in the obtained scene information, in order to obtain a 256-dimensional static environment feature vector. : in Represents a collection of high-resolution satellite images. Represents the static environment feature vector It has 256 dimensions. This indicates that LLM is used for feature extraction processing on a high-resolution satellite image set. This indicates that the data within the brackets is processed using the CLIP model; Subsequently, LLM and BERT were used to perform semantic enhancement and dimensionality reduction on the regional static scene information obtained from the scene information, respectively, to obtain standardized 9-dimensional region feature vectors. : Subsequently, the time data in the obtained scene information was subjected to time period clustering and time sequence feature encoding to obtain a 9-dimensional time feature vector. Subsequently, the obtained 9-dimensional time feature vector and 9-dimensional region feature vector are concatenated to obtain an 18-dimensional fused scene feature vector; Finally, the obtained multi-granularity spatiotemporal sequence, 256-dimensional static environment feature vector, and 18-dimensional fused scene feature vector are combined into preprocessed scene information as a dynamic weight dataset.

[0031] (A3) The dynamic weight training dataset obtained in step (A2) is randomly divided into a training set and a validation set in a ratio of 7:3; (A4) Initialize the parameters of the dynamic weight generation network to obtain the initialized dynamic weight generation network; Specifically, in this step, the initial values ​​of the weight parameters in the dynamic weight generation network are randomly generated using a truncated normal distribution with a standard deviation of 0.01, and the initial value of the bias parameter is set to 0. The training set is set to a fixed batch size of 32. The Adam optimizer is selected, with an initial learning rate of lr=0.001. A step-wise learning rate adjustment strategy is adopted, with a step size of stepsize=100 and a weight gamma=0.9, that is, the learning rate is multiplied by 0.9 every 100 training rounds to meet the gradient descent requirements of weight generation.

[0032] (A5) Input the training set obtained in step (A3) into the initialized dynamic weight generation network obtained in step (A4), and obtain the 3D predicted weight vector through the forward propagation algorithm. Then, obtain the weight entropy regularization loss value based on the 3D predicted weight vector. ; Specifically, this step involves first performing LayerNorm normalization on each 18-dimensional fused scene feature vector in the training set obtained in step (A3) to obtain the normalized scene features. All normalized scene features constitute the training set after preliminary processing; Then, each normalized scene feature in the pre-processed training set is... The first MLP module in the initialized dynamic weight generation network obtained in step (A4) undergoes linear transformation and ReLU activation to obtain hidden layer features. ; This process specifically uses the following formula: in and All are learnable parameters. Represents the real number field.

[0033] Subsequently, the features obtained from each hidden layer are input into the second MLP module for linear transformation and Softmax normalization to obtain a 3D prediction weight vector. The 3D prediction weight vector All elements in the vector fall within the interval [0,1] and the sum of all elements is 1. The components of each dimension of the 3D prediction weight vector correspond to the granularity of one hour, two hours, and four hours, respectively. This step specifically uses the following formula to obtain the 3D prediction weight vector. : in and All are learnable parameters, and exp represents the natural exponent operation; Finally, based on the obtained 3D prediction weight vector Calculate the weighted entropy regularized loss value : (A6) Based on the weight entropy regularization loss value obtained in step (A5), update and optimize all weight parameters and bias parameters of the dynamic weight generation network using the backpropagation algorithm to minimize the weight entropy regularization loss value. (A7) Repeat steps (A5) and (A6) until the decrease in weight entropy regularization loss value is less than 1e-6 for 20 consecutive times, thus obtaining the initially trained dynamic weight generation network.

[0034] (A8) Use the validation set obtained in step (A3) to validate the dynamic weight generation network initially trained in step (A7) to obtain the trained dynamic weight generation network.

[0035] The advantages of the above steps (A1) to (A8) are that the parameter initialization and optimization strategies are adapted to the weight generation task, the entropy regularization loss effectively avoids weight extremism, and the final dynamic weight generation network can accurately adapt to different scenario requirements.

[0036] (5) Based on the multi-granularity spatiotemporal sequence and 256-dimensional static environmental feature vector obtained in step (2), obtain multi-granularity spatiotemporal features of multiple time granularities (e.g., one hour, two hours, four hours), and use the multi-granularity dynamic weight obtained in step (4) to perform weighted fusion of the multi-granularity spatiotemporal features of all time granularities to obtain 256-dimensional fused features.

[0037] This step specifically includes the following steps: (5-1) The multi-granularity spatiotemporal sequence obtained in step (2) The 256-dimensional static environment feature vectors are stacked dimensionally to obtain the complete node feature vector. Based on the regional adjacency information obtained in step (1), an adjacency matrix is ​​constructed to obtain the edge set, and the obtained complete node feature vectors are then used to construct the adjacency matrix. The edge set is combined to obtain initial structured data. This initial structured data is then encapsulated with a topological structure to obtain a spatiotemporal graph. Finally, the obtained spatiotemporal graph is sampled and masked to obtain a masked spatiotemporal graph. ; The advantage of this step is that it integrates multi-granularity sequences and static environmental features into a structured spatiotemporal graph, taking into account both the integrity of node features and spatial topological relationships. Sampling and masking processes can enhance the model's generalization ability and avoid overfitting.

[0038] This step is done as follows: Figure 4The self-booting encoder implementation shown.

[0039] (5-2) Use a 3-layer Spatio-Temporal Graph Neural Network (STGNN) to process the masked spatio-temporal graph obtained in step (5-1). Processing is performed to obtain 256-dimensional spatiotemporal features at multiple time granularities (e.g., one hour, two hours, four hours): in ∈[1,3], Indicates the first 256-dimensional spatiotemporal features at the time granularity.

[0040] The process of each STGNN layer is as follows: Figure 5 As shown, the specific processing steps are as follows: First, the acquired masked spatiotemporal graph is processed by Temporal Convolutional Network (TCN) to obtain a preliminary set of temporal feature vectors capturing temporal dependencies. Then, the preliminary set of temporal feature vectors capturing temporal dependencies is subjected to LayerNorm temporal normalization to obtain a well-distributed set of temporal feature vectors. Next, the well-distributed set of temporal feature vectors is processed using a Graph Attention Network (GAT) mechanism to obtain a set of spatiotemporal fusion feature vectors that enhance key spatial relationships. This set of spatiotemporal fusion feature vectors that enhance key spatial relationships is then subjected to LayerNorm spatial normalization to obtain a calibrated set of spatiotemporal fusion feature vectors. Finally, the calibrated set of spatiotemporal fusion feature vectors is residually concatenated with the original node feature vectors in the masked spatiotemporal graph to obtain a 256-dimensional spatiotemporal feature at the g-th time granularity (e.g., one hour, two hours, or four hours). .

[0041] The advantage of this step is that the 3-layer STGNN structure deeply captures spatiotemporal dependencies, TCN and GAT focus on temporal and spatial correlations respectively, LayerNorm normalization and residual connections ensure training stability, and the output spatiotemporal features of each granularity have unified dimensions, which facilitates subsequent weighted fusion.

[0042] (5-3) The spatiotemporal features of all time granularities obtained in step (5-2) are weighted and summed according to the multi-granularity dynamic weights obtained in step (4) to obtain 256-dimensional fusion features. : in This represents a 3D prediction weight vector.

[0043] The advantage of the above steps (5-1) to (5-3) is that the combination of the self-guided encoder and dynamic weights enables the deep integration of multi-granular spatiotemporal features, and the output fused features can comprehensively characterize the spatiotemporal patterns and environmental constraints of vehicle activities.

[0044] (6) Input the 256-dimensional fusion features obtained in step (5) into the pre-established multi-granularity conditional diffusion model to obtain vehicle activity prediction results at multiple time granularities.

[0045] Specifically, such as Figure 2 As shown, the specific structure of the multi-granularity conditional diffusion model of the present invention is as follows: The first layer is the conditional feature encoding layer, which is used to obtain the 256-dimensional fusion features obtained in step (5), the 256-dimensional static environment features obtained in step (2), and the number of noise-adding steps corresponding to each time granularity (60 steps for one hour, 40 steps for two hours, and 20 steps for four hours). The obtained 256-dimensional fusion features and 256-dimensional static environment features are concatenated to obtain the basic conditional features. The obtained basic conditional features and the number of noise-adding steps corresponding to each time granularity are encoded by step number embedding to obtain the concatenated vector. The obtained concatenated vector is jointly encoded using a multi-head attention mechanism to obtain the joint conditional vector. The second layer is the conditional diffusion generator, which includes a forward noise addition module, a denoising network module, and a reverse denoising module. The forward noise module is used to obtain the multi-granularity spatiotemporal sequence obtained in step (2). For the acquired multi-granularity spatiotemporal sequences Forward noise addition is performed to obtain the noise-added data set corresponding to each granularity, and the noise-added data set corresponding to each granularity is then grouped by granularity to obtain the final noise-added data corresponding to that granularity.

[0046] Among them, the The formula for the noisy data set corresponding to each time granularity is: in, For the first The noisy data at the k-th step corresponding to each time granularity. It is random noise that follows a normal distribution (i.e.) ), For the first The variance coefficient of the k-th step corresponding to each time granularity is used to control the noise intensity. Its value ranges from 0.9 to 0.999, preferably 0.99, k∈[1, 2, 3, 4, 5, 6, 7, 8, 9, ... ],in For the first The total number of noise-adding steps corresponding to each time granularity.

[0047] The denoising network module consists of 3 layers, and its specific structure is as follows: The first layer is the input layer, whose inputs are the joint feature vector obtained from the conditional feature encoding layer, the final noisy data corresponding to each time granularity obtained from the forward noisy module, and the number of noisy steps corresponding to each time granularity. This layer first performs 1×1 convolution processing on the final noisy data corresponding to each time granularity to obtain the noisy data after feature mapping; then, it performs spatial broadcast embedding processing on the obtained joint feature vector to obtain the spatially broadcast joint feature vector; subsequently, it performs step embedding and spatial broadcast processing on the number of noisy steps corresponding to each time granularity to obtain the number of noisy steps after spatial broadcast; finally, it performs dimensional feature concatenation processing on the noisy data after feature mapping, the joint feature vector after spatial broadcast, and the number of noisy steps after spatial broadcast to obtain the fused feature. And output; The second layer is the spatiotemporal feature enhancement module, which is a three-layer stacked STGNN unit. Its input is the fused features output from the input layer. This module utilizes three stacked STGNN units to perform the fusion of features. Process the data to obtain spatiotemporal augmentation features and output them.

[0048] Specifically, the process for each STGNN unit is as follows: First, the acquired fused features are processed... Temporal convolution operations are performed to obtain temporal augmentation features. Then, LayerNorm temporal normalization is applied to the obtained temporal augmentation features to obtain normalized temporal features. Next, graph attention is used to process the obtained normalized temporal features to obtain spatiotemporal fusion features. Subsequently, the obtained spatiotemporal fusion features are normalized according to spatial dimensions to obtain normalized spatiotemporal features. Finally, the obtained normalized spatiotemporal features are combined with the fusion features. Perform residual connections to obtain spatiotemporal augmentation features.

[0049] The third layer is a parallel parameter prediction head, whose input is the spatiotemporal enhancement features output by the spatiotemporal feature enhancement module. This parallel parameter prediction head first simultaneously inputs these spatiotemporal enhancement features into three parallel fully connected prediction heads: a noise prediction head, a mean prediction head, and a variance prediction head, to obtain intermediate features from three branches. Then, the ReLU activation function is used to perform nonlinear feature transformations on the intermediate features of the three branches, resulting in three activated intermediate features. Finally, the Linear activation function is used to process the intermediate features from the noise prediction head and the mean prediction head respectively, to obtain the predicted noise. and predicted mean The linear activation function is used, and the softplus activation function is used to process the intermediate features of the variance prediction head to obtain the prediction variance. .

[0050] The input to the inverse denoising module is the predicted noise obtained from the denoising network module. Predicted mean Prediction variance The module also provides the final noise-added data for each time granularity obtained from the forward noise-adding module, which then processes the acquired prediction noise. Predicted mean Prediction variance The reverse iterative denoising process is repeated on the final noisy data corresponding to each time granularity until the number of noisy steps corresponding to each time granularity is completed to obtain denoised data. The obtained denoised data is then subjected to multi-granularity temporal alignment and feature standardization to obtain vehicle activity prediction results at multiple time granularities.

[0051] The formula for reverse iterative denoising is as follows: in, Indicates the first The denoised data for the (k-1)th step corresponding to each time granularity, where c is the joint conditional vector obtained from the conditional feature coding layer.

[0052] The advantage of this step is that the multi-granularity conditional diffusion model deeply integrates scene feature constraints with diffusion mechanisms, the STGNN unit of the denoising network module and the parallel prediction head design improve the accuracy of feature representation and parameter prediction, the reverse denoising process ensures the accurate recovery of data distribution, the overall model is robust, and the prediction accuracy is stable in complex urban scenarios.

[0053] The multi-granularity conditional diffusion model in this invention is obtained through the following steps: (B1) Obtain multi-source input data for the multi-granularity conditional diffusion model, including GPS trajectory data of all vehicles, 256-dimensional fusion features, 256-dimensional static environmental features, and the number of noise addition steps corresponding to each time granularity (60 steps for one hour, 40 steps for two hours, and 20 steps for four hours).

[0054] (B2) Preprocess the multi-source input data of the multi-granularity conditional diffusion model obtained in step (B1) to obtain the training dataset of the multi-granularity conditional diffusion model.

[0055] Specifically, this step involves first performing a multi-time-granularity (e.g., one-hour, two-hour, four-hour) overlapping sliding window splitting process on the GPS trajectory data set composed of GPS trajectory data of all vehicles in the multi-source input data of the obtained multi-granularity conditional diffusion model, in order to obtain a multi-granularity spatiotemporal sequence. : in, This is a set of GPS trajectory data for all vehicles, with timestamps accurate to the second. SlidngAvg is a moving average function. ∈{1,2,3} represent the granularity for one hour, two hours, and four hours, respectively. Indicates the size of the non-overlapping sliding window. It indicates 60 minutes.

[0056] Then, the multi-granularity spatiotemporal sequence obtained in the previous step... Forward noise addition is performed to obtain the noise-added data set corresponding to each granularity, and the noise-added data set corresponding to each granularity is then grouped by granularity to obtain the final noise-added data corresponding to that granularity.

[0057] Among them, the The formula for the noisy data set corresponding to each time granularity is: in, For the first The noisy data at the k-th step corresponding to each time granularity. It is random noise that follows a normal distribution (i.e.) ), For the first The variance coefficient of the k-th step corresponding to each time granularity is used to control the noise intensity. Its value ranges from 0.9 to 0.999, preferably 0.99, k∈[1, 2, 3, 4, 5, 6, 7, 8, 9, ... ],in For the first The total number of noise-adding steps corresponding to each time granularity.

[0058] Subsequently, the 256-dimensional fusion features, 256-dimensional static environment features, and the number of noise-adding steps corresponding to each time granularity (60 steps for one hour, 40 steps for two hours, and 20 steps for four hours) are obtained from the multi-source input data of the multi-granularity conditional diffusion model. The obtained 256-dimensional fusion features and 256-dimensional static environment features are concatenated to obtain the basic conditional features. The obtained basic conditional features and the number of noise-adding steps corresponding to each time granularity are subjected to step-number embedding encoding to obtain the concatenated vector. Multi-head attention is used to jointly encode the obtained concatenated vector to obtain the joint conditional vector. Finally, the joint conditional vector, the number of noise-adding steps corresponding to each time granularity (60 steps for one hour, 40 steps for two hours, and 20 steps for four hours), and the final noise-adding data corresponding to each time granularity are combined into a preprocessed training dataset for the multi-granularity conditional diffusion model.

[0059] (B3) The dynamic weight training dataset obtained in step (B2) is randomly divided into a training set and a validation set in a ratio of 7:3; (B4) Initialize the parameters of the multi-granularity conditional diffusion model to obtain the initialized multi-granularity conditional diffusion model; Specifically, in this step, the initial values ​​of the 1×1 convolutional kernel, STGNN unit weights, and parallel parameter prediction head weights in the multi-granularity conditional diffusion model are randomly generated using a truncated normal distribution with a standard deviation of 0.01, and the initial value of the bias parameter is set to 0. The training set is set to a fixed batch size of 32. The Adam optimizer is selected, with an initial learning rate of lr=0.001. A step-wise learning rate adjustment strategy is adopted, with a step size of stepsize=100 and a weight gamma=0.9, that is, the learning rate is multiplied by 0.9 every 100 training rounds to adapt to the gradient descent requirements of weight generation.

[0060] (B5) Input the training set obtained in step (B3) into the initialized multi-granularity conditional diffusion model obtained in step (B4), and obtain the prediction noise through the forward propagation algorithm. Predicted mean and prediction variance And calculate the total loss value based on the prediction results and the actual data; Specifically, this step involves: First, performing a 1×1 convolution on the final noisy data corresponding to each time granularity in the training set obtained in step (B3) to obtain the noisy data after feature mapping; then, performing spatial broadcast embedding on the joint feature vector in the training set to obtain the spatially broadcast joint feature vector; next, performing step embedding and spatial broadcasting on the number of noisy steps corresponding to each time granularity to obtain the number of noisy steps after spatial broadcasting; finally, performing dimensional feature concatenation on the noisy data after feature mapping, the spatially broadcast joint feature vector, and the spatially broadcast noisy steps to obtain the fused feature. And output it.

[0061] Then, the fusion features The input spatiotemporal feature enhancement module consists of three stacked STGNN units. This module utilizes the three stacked STGNN units to enhance the fused features. Process the data to obtain spatiotemporal augmentation features and output them.

[0062] Specifically, the process for each STGNN unit is as follows: First, the acquired fused features are processed... Temporal convolution operations are performed to obtain temporal augmentation features. Then, LayerNorm temporal normalization is applied to the obtained temporal augmentation features to obtain normalized temporal features. Next, graph attention is used to process the obtained normalized temporal features to obtain spatiotemporal fusion features. Subsequently, the obtained spatiotemporal fusion features are normalized according to spatial dimensions to obtain normalized spatiotemporal features. Finally, the obtained normalized spatiotemporal features are combined with the fusion features. Perform residual connections to obtain spatiotemporal augmentation features.

[0063] Subsequently, the spatiotemporal enhancement features output by the spatiotemporal feature enhancement module are input into a parallel parameter prediction head. This parallel parameter prediction head first simultaneously inputs the spatiotemporal enhancement features into three parallel fully connected prediction heads: a noise prediction head, a mean prediction head, and a variance prediction head, to obtain intermediate features from three branches. Then, the ReLU activation function is used to perform nonlinear feature transformation on the intermediate features of the three branches respectively, to obtain three activated intermediate features. Finally, the Linear activation function is used to process the intermediate features of the noise prediction head and the mean prediction head respectively, to obtain the predicted noise. and predicted mean The linear activation function is used, and the softplus activation function is used to process the intermediate features of the variance prediction head to obtain the prediction variance. .

[0064] Subsequently, noise will be predicted. Predicted mean and prediction variance Input to the inverse denoising module, which processes the acquired predicted noise. Predicted mean Prediction variance The reverse iterative denoising process is repeated on the final noisy data corresponding to each time granularity until the denoising steps corresponding to each time granularity are completed to obtain denoised data. The obtained denoised data is then subjected to multi-granularity temporal alignment and feature standardization to obtain vehicle activity prediction results at multiple time granularities.

[0065] The formula for reverse iterative denoising is as follows: in, Indicates the first The denoised data for the (k-1)th step corresponding to each time granularity.

[0066] Finally, based on the predicted noise Calculate multi-particle-size diffusion loss: in, As the granularity-based weight, , , , It is forward-added random noise.

[0067] Then, the multi-granularity diffusion loss is fused with the weighted entropy regularization loss obtained in step (A5) to obtain the total loss value: in, is the regularization coefficient.

[0068] The advantage of this step is that the multi-granularity diffusion loss can accurately measure the prediction error at each granularity. The total loss integrates the diffusion loss and the entropy regularization loss, which not only ensures the prediction accuracy but also balances the multi-granularity weight distribution, ensuring comprehensive model optimization.

[0069] (B6) Based on the total loss value obtained in step (B5), update and optimize all weight parameters and bias parameters of the multi-granularity conditional diffusion model using the backpropagation algorithm to minimize the total loss value; (B7) Repeat steps (B5) and (B6) until the decrease in total loss value is less than 1e-6 for 20 consecutive times, thus obtaining a preliminarily trained multi-granularity conditional diffusion model.

[0070] (B8) Use the validation set obtained in step (B3) to validate the multi-granularity conditional diffusion model initially trained in step (B7) to obtain the trained multi-granularity conditional diffusion model.

[0071] In this embodiment of the invention, it should be noted that multi-granularity spatiotemporal sequence refers to vehicle activity-related data divided into different time windows. Specifically, this method refers to GPS trajectory-derived data with time granularities of one hour, two hours, and four hours, such as dwell rate and arrival volume, to adapt to the time scale requirements of different scenarios.

[0072] Static environmental features are fixed attribute information extracted from regional satellite images. By aligning the images with semantic descriptions using LLM and CLIP models, they are transformed into computable feature vectors, providing environmental support for spatiotemporal modeling.

[0073] Time-segment clustering is based on the temporal semantic discretization of vehicle activity intensity patterns. The K-means clustering algorithm adaptively splits the 24-hour time dimension and transforms it into time-segment category labels with similar traffic behavior patterns, providing semantic temporal support for scene feature encoding.

[0074] Temporal feature encoding is a numerical representation of temporal semantics and periodic patterns. It transforms temporal information through methods such as one-hot encoding and sine / cosine encoding to generate low-dimensional dense numerical vectors, providing computable feature support for models to learn temporal dependencies.

[0075] Entropy regularization constraints are used to avoid optimization constraints that cause dynamic weights to become extreme. By calculating the entropy value of the weight distribution and incorporating it into the loss function, the weights are forced to be distributed evenly, ensuring the effective collaboration of multi-granularity features.

[0076] The multi-granularity conditional diffusion model is a probabilistic prediction model based on a joint conditional vector. By designing the number of noise addition / denoising steps at different granularities, it gradually restores the true distribution of data and outputs vehicle activity prediction results at multiple time granularities.

[0077] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A vehicle travel pattern prediction method based on adaptive multi-granularity weighted self-guided graph diffusion, characterized in that, Includes the following steps: (1) Obtain scene information of the vehicle to be predicted, including GPS trajectory data of the vehicle to be predicted, high-resolution satellite images of the area where the vehicle to be predicted is located, static scene information of the area, adjacency information of the area, and time data. (2) The GPS trajectory data of the vehicle to be predicted in the scene information obtained in step (1) is split into multiple time-granular non-overlapping sliding windows to obtain a multi-granular spatiotemporal sequence. The high-resolution satellite image of the area where the vehicle to be predicted is located in the scene information is extracted by the large language model LLM and the contrastive language-image pre-trained CLIP model to obtain a 256-dimensional static environment feature vector. The LLM and the bidirectional encoder representation BERT from Transformer are used to perform semantic enhancement description and dimensionality reduction on the regional static scene information in the scene information to obtain a 9-dimensional regional feature vector. The time data in the scene information is divided into time-period clustering and time-series feature encoding to obtain a 9-dimensional time feature vector. The obtained multi-granular spatiotemporal sequence, 256-dimensional static environment feature vector, 9-dimensional time feature vector and 9-dimensional regional feature vector are combined into the preprocessed scene information. (3) The 9-dimensional time feature vector and the 9-dimensional region feature vector in the preprocessed scene information obtained in step (2) are concatenated to obtain an 18-dimensional fused scene feature vector. (4) Input the 18-dimensional fusion scene feature vector obtained in step (3) into the pre-trained dynamic weight generation network to obtain multi-granularity dynamic weights; (5) Based on the multi-granularity spatiotemporal sequence and 256-dimensional static environmental feature vector obtained in step (2), obtain multi-granularity spatiotemporal features of multiple time granularities, and use the multi-granularity dynamic weight obtained in step (4) to perform weighted fusion of the multi-granularity spatiotemporal features of all time granularities to obtain 256-dimensional fused features; (6) Input the 256-dimensional fusion features obtained in step (5) into the pre-established multi-granularity conditional diffusion model to obtain vehicle activity prediction results at multiple time granularities.

2. The vehicle travel pattern prediction method based on adaptive multi-granularity weighted self-guided graph diffusion according to claim 1, characterized in that, The GPS trajectory data of the vehicle to be predicted is collected from the vehicle's onboard GPS device; High-resolution satellite images of the area where the vehicle to be predicted is located were obtained from publicly available satellite data platforms. The static scene information for the area was obtained from publicly available data from the city planning bureau; Regional adjacency information is geographic boundary vector data based on a 1km×1km grid. It is obtained through spatial topology calculation and adjacency determination algorithms. Specifically, it includes direct adjacency relationships, indirect adjacency relationships, and functional neighborhoods based on road connectivity between grids. The time data is obtained from the timestamps of the onboard GPS devices to be predicted, public calendar databases, and standard time interfaces of urban traffic management departments. Specifically, it includes the target time accurate to the minute, time period division, weekly cycle, holiday type, and time interval of temporary events.

3. The vehicle travel pattern prediction method based on adaptive multi-granularity weighted self-guided graph diffusion according to claim 1 or 2, characterized in that, The dynamic weight generation network includes a first MLP module and a second MLP module; The specific structure of the first MLP module is as follows: The first layer is the input layer, which is used to obtain scene information of the vehicle to be predicted, preprocess the obtained scene information to obtain preprocessed scene information, and obtain a 1×18-dimensional scene feature vector from the preprocessed scene information and output it. The second layer is a hidden layer. Its input is the 1×18-dimensional scene feature output from the first layer. This layer performs linear transformation and non-linear activation processing on the scene feature to extract the effective features in the scene feature and outputs a 32-dimensional feature vector. The specific structure of the second MLP module is as follows: The first layer is the input layer, which is used to obtain and output a 32-dimensional feature vector from the second layer of the first MLP module; The second layer is the output layer, whose input is the 32-dimensional vector output from the first layer. This layer performs linear transformation and Softmax normalization on the 32-dimensional vector to obtain multi-granularity weights and output them.

4. The vehicle travel pattern prediction method based on adaptive multi-granularity weighted self-guided graph diffusion according to any one of claims 1 to 3, characterized in that, The dynamic weight generation network is trained through the following steps: (A1) Obtain scene information for multiple vehicles, including GPS trajectory data of all vehicles, as well as high-resolution satellite images of the area where all vehicles are located, static scene information of the area, and time data; (A2) Preprocess the scene information of all vehicles obtained in step (A1) to obtain the preprocessed scene information of all vehicles as a dynamic weight training dataset. (A3) The dynamic weight training dataset obtained in step (A2) is randomly divided into a training set and a validation set in a ratio of 7:3; (A4) Initialize the parameters of the dynamic weight generation network to obtain the initialized dynamic weight generation network; (A5) Input the training set obtained in step (A3) into the initialized dynamic weight generation network obtained in step (A4), and obtain the 3D predicted weight vector through the forward propagation algorithm. Then, obtain the weight entropy regularization loss value based on the 3D predicted weight vector. ; (A6) Based on the weight entropy regularization loss value obtained in step (A5), update and optimize all weight parameters and bias parameters of the dynamic weight generation network using the backpropagation algorithm to minimize the weight entropy regularization loss value. (A7) Repeat steps (A5) and (A6) above until the decrease in weight entropy regularization loss value is less than 1e-6 for 20 consecutive times, thereby obtaining the initially trained dynamic weight generation network; (A8) Use the validation set obtained in step (A3) to validate the dynamic weight generation network initially trained in step (A7) to obtain the trained dynamic weight generation network.

5. The vehicle travel pattern prediction method based on adaptive multi-granularity weighted self-guided graph diffusion according to claim 4, characterized in that, Step (A2) specifically involves first performing multiple time-granularity overlapping sliding window splitting on the GPS trajectory data set, which consists of the GPS trajectory data of all vehicles in the scene information of all vehicles, to obtain a multi-granularity spatiotemporal sequence. : ; in, This is a set of GPS trajectory data for all vehicles, with timestamps accurate to the second. SlidngAvg is a moving average function. ∈{1,2,3} represent the granularity for one hour, two hours, and four hours, respectively. Indicates the size of the non-overlapping sliding window. Indicates 60 minutes; Then, LLM and CLIP models were used sequentially to perform feature extraction processing on the high-resolution satellite image set consisting of high-resolution satellite images of all vehicle locations in the obtained scene information, in order to obtain a 256-dimensional static environment feature vector. : ; in Represents a collection of high-resolution satellite images. Represents the static environment feature vector It has 256 dimensions. This indicates that LLM is used for feature extraction processing on a high-resolution satellite image set. This indicates that the data within the brackets is processed using the CLIP model; Subsequently, LLM and BERT were used to perform semantic enhancement and dimensionality reduction on the regional static scene information obtained from the scene information, respectively, to obtain standardized 9-dimensional region feature vectors. : ; Subsequently, the time data in the obtained scene information was subjected to time period clustering and time sequence feature encoding to obtain a 9-dimensional time feature vector. Subsequently, the obtained 9-dimensional time feature vector and 9-dimensional region feature vector are concatenated to obtain an 18-dimensional fused scene feature vector; Finally, the obtained multi-granularity spatiotemporal sequence, 256-dimensional static environment feature vector, and 18-dimensional fused scene feature vector are combined into preprocessed scene information as a dynamic weight dataset. In step (A4), the initial values ​​of the weight parameters in the dynamic weight generation network are randomly generated using a truncated normal distribution with a standard deviation of 0.01, and the initial value of the bias parameter is set to 0; the training set is set to a fixed batch size of 32; the Adam optimizer is selected, with an initial learning rate of lr=0.001, and a step-wise learning rate adjustment strategy is adopted with a step size of stepsize=100 and a weight gamma=0.9, that is, the learning rate is multiplied by 0.9 every 100 training rounds to adapt to the gradient descent requirements of weight generation; Step (A5) specifically involves first performing LayerNorm normalization on each 18-dimensional fused scene feature vector in the training set obtained in step (A3) to obtain the normalized scene features. All normalized scene features constitute the training set after preliminary processing; Then, each normalized scene feature in the pre-processed training set is... The first MLP module in the initialized dynamic weight generation network obtained in step (A4) undergoes linear transformation and ReLU activation to obtain hidden layer features. ; This process specifically uses the following formula: ; in and All are learnable parameters. Represents the real number field; Subsequently, the features obtained from each hidden layer are input into the second MLP module for linear transformation and Softmax normalization to obtain a 3D prediction weight vector. The 3D prediction weight vector All elements in the vector fall within the interval [0,1] and the sum of all elements is 1. The components of each dimension of the 3D prediction weight vector correspond to the granularity of one hour, two hours, and four hours, respectively. This step specifically uses the following formula to obtain the 3D prediction weight vector. : ; in and All are learnable parameters, and exp represents the natural exponent operation; Finally, based on the obtained 3D prediction weight vector Calculate the weighted entropy regularized loss value : 。 6. The vehicle travel pattern prediction method based on adaptive multi-granularity weighted self-guided graph diffusion according to claim 5, characterized in that, Step (5) specifically includes the following steps: (5-1) The multi-granularity spatiotemporal sequence obtained in step (2) The 256-dimensional static environment feature vectors are stacked dimensionally to obtain the complete node feature vector. Based on the regional adjacency information obtained in step (1), an adjacency matrix is ​​constructed to obtain the edge set, and the obtained complete node feature vectors are then used to construct the adjacency matrix. The edge set is combined to obtain initial structured data. This initial structured data is then encapsulated with a topological structure to obtain a spatiotemporal graph. Finally, the obtained spatiotemporal graph is sampled and masked to obtain a masked spatiotemporal graph. ; (5-2) Use a 3-layer spatiotemporal graph neural network (STGNN) to process the masked spatiotemporal graph obtained in step (5-1). Processing is performed to obtain 256-dimensional spatiotemporal features at multiple time granularities: ; in Indicates the first 256-dimensional spatiotemporal features at a time granularity; The specific processing steps of each STGNN layer are as follows: First, the acquired masked spatiotemporal graph is processed by temporal convolution (TCN) to obtain a preliminary set of temporal feature vectors capturing temporal dependencies. Then, the preliminary set of temporal feature vectors capturing temporal dependencies is subjected to LayerNorm temporal normalization to obtain a well-distributed set of temporal feature vectors. Next, the well-distributed set of temporal feature vectors is processed by the graph attention mechanism (GAT) to obtain a set of spatiotemporal fusion feature vectors that enhance key spatial correlations. This set of spatiotemporal fusion feature vectors is then subjected to LayerNorm spatial normalization to obtain a calibrated set of spatiotemporal fusion feature vectors. Finally, the calibrated set of spatiotemporal fusion feature vectors is residually concatenated with the original node feature vectors in the masked spatiotemporal graph to obtain the 256-dimensional spatiotemporal feature at the g-th temporal granularity. ; (5-3) The spatiotemporal features of all time granularities obtained in step (5-2) are weighted and summed according to the multi-granularity dynamic weights obtained in step (4) to obtain 256-dimensional fusion features. : ; in This represents a 3D prediction weight vector.

7. The vehicle travel pattern prediction method based on adaptive multi-granularity weighted self-guided graph diffusion according to claim 6, characterized in that, The specific structure of the multi-granularity conditional diffusion model is as follows: The first layer is the conditional feature encoding layer, which is used to obtain the 256-dimensional fusion features obtained in step (5), the 256-dimensional static environment features obtained in step (2), and the number of noise addition steps corresponding to each time granularity. The obtained 256-dimensional fusion features and 256-dimensional static environment features are concatenated to obtain the basic conditional features. The obtained basic conditional features and the number of noise addition steps corresponding to each time granularity are encoded by step number embedding to obtain the concatenated vector. The concatenated vector is then jointly encoded using a multi-head attention mechanism to obtain the joint conditional vector. The second layer is the conditional diffusion generator, which includes a forward noise addition module, a denoising network module, and a reverse denoising module. The forward noise module is used to obtain the multi-granularity spatiotemporal sequence obtained in step (2). For the acquired multi-granularity spatiotemporal sequences Forward noise addition is performed to obtain the noise-added data set corresponding to each granularity, and the noise-added data set corresponding to each granularity is grouped by granularity to obtain the final noise-added data corresponding to that granularity. Among them, the The formula for the noisy data set corresponding to each time granularity is: ; in, For the first The noisy data at the k-th step corresponding to each time granularity. It is random noise that follows a normal distribution. For the first The variance coefficient at the k-th step corresponding to each time granularity is used to control the noise intensity, and its value ranges from 0.9 to 0.999, k∈[1, 2, 3]. ],in For the first The total number of noise-adding steps corresponding to each time granularity; The denoising network module consists of 3 layers, and its specific structure is as follows: The first layer is the input layer, whose inputs are the joint feature vector obtained from the conditional feature encoding layer, the final noisy data corresponding to each time granularity obtained from the forward noisy module, and the number of noisy steps corresponding to each time granularity. This layer first performs 1×1 convolution processing on the final noisy data corresponding to each time granularity to obtain the noisy data after feature mapping; then, it performs spatial broadcast embedding processing on the obtained joint feature vector to obtain the spatially broadcast joint feature vector; subsequently, it performs step embedding and spatial broadcast processing on the number of noisy steps corresponding to each time granularity to obtain the number of noisy steps after spatial broadcast; finally, it performs dimensional feature concatenation processing on the noisy data after feature mapping, the joint feature vector after spatial broadcast, and the number of noisy steps after spatial broadcast to obtain the fused feature. And output; The second layer is the spatiotemporal feature enhancement module, which is a three-layer stacked STGNN unit. Its input is the fused features output from the input layer. This module utilizes three stacked STGNN units to perform the fusion of features. Process the data to obtain and output spatiotemporally enhanced features; The specific process for each STGNN unit is as follows: First, the acquired fused features are processed... Temporal convolution operations are performed to obtain temporal augmentation features. Then, LayerNorm temporal normalization is applied to the obtained temporal augmentation features to obtain normalized temporal features. Next, graph attention is used to process the obtained normalized temporal features to obtain spatiotemporal fusion features. Subsequently, the obtained spatiotemporal fusion features are normalized according to spatial dimensions to obtain normalized spatiotemporal features. Finally, the obtained normalized spatiotemporal features are combined with the fusion features. Perform residual connections to obtain spatiotemporal augmentation features; The third layer is a parallel parameter prediction head, whose input is the spatiotemporal enhancement features output by the spatiotemporal feature enhancement module. This parallel parameter prediction head first simultaneously inputs these spatiotemporal enhancement features into three parallel fully connected prediction heads: a noise prediction head, a mean prediction head, and a variance prediction head, to obtain intermediate features from three branches. Then, the ReLU activation function is used to perform nonlinear feature transformations on the intermediate features of the three branches, resulting in three activated intermediate features. Finally, the Linear activation function is used to process the intermediate features from the noise prediction head and the mean prediction head respectively, to obtain the predicted noise. and predicted mean The linear activation function is used, and the softplus activation function is used to process the intermediate features of the variance prediction head to obtain the prediction variance. ; The input to the inverse denoising module is the predicted noise obtained from the denoising network module. Predicted mean Prediction variance The module also provides the final noise-added data for each time granularity obtained from the forward noise-adding module, which then processes the acquired prediction noise. Predicted mean Prediction variance The reverse iterative denoising process is repeated on the final noisy data corresponding to each time granularity until the number of noisy steps corresponding to each time granularity is completed to obtain denoised data. The obtained denoised data is then subjected to multi-granularity temporal alignment and feature standardization to obtain vehicle activity prediction results at multiple time granularities. The formula for reverse iterative denoising is as follows: ; in, Indicates the first The denoised data for the (k-1)th step corresponding to each time granularity, where c is the joint conditional vector obtained from the conditional feature coding layer.

8. The vehicle travel pattern prediction method based on adaptive multi-granularity weighted self-guided graph diffusion according to claim 7, characterized in that, The multi-granularity conditional diffusion model is trained through the following steps: (B1) Obtain multi-source input data for the multi-granularity conditional diffusion model, including GPS trajectory data of all vehicles, 256-dimensional fusion features, 256-dimensional static environmental features, and the number of noise addition steps corresponding to each time granularity; (B2) Preprocess the multi-source input data of the multi-granularity conditional diffusion model obtained in step (B1) to obtain the training dataset of the multi-granularity conditional diffusion model; (B3) The dynamic weight training dataset obtained in step (B2) is randomly divided into a training set and a validation set in a ratio of 7:3; (B4) Initialize the parameters of the multi-granularity conditional diffusion model to obtain the initialized multi-granularity conditional diffusion model; (B5) Input the training set obtained in step (B3) into the initialized multi-granularity conditional diffusion model obtained in step (B4), and obtain the prediction noise through the forward propagation algorithm. Predicted mean and prediction variance And calculate the total loss value based on the prediction results and the actual data; (B6) Based on the total loss value obtained in step (B5), update and optimize all weight parameters and bias parameters of the multi-granularity conditional diffusion model using the backpropagation algorithm to minimize the total loss value; (B7) Repeat steps (B5) and (B6) above until the decrease in total loss value is less than 1e-6 for 20 consecutive times, thus obtaining a pre-trained multi-granularity conditional diffusion model; (B8) Use the validation set obtained in step (B3) to validate the multi-granularity conditional diffusion model initially trained in step (B7) to obtain the trained multi-granularity conditional diffusion model.

9. The vehicle travel pattern prediction method based on adaptive multi-granularity weighted self-guided graph diffusion according to claim 8, characterized in that, Step (B2) specifically involves first performing multiple time-granularity overlapping sliding window splitting processes on the GPS trajectory data set, which consists of GPS trajectory data of all vehicles in the multi-source input data of the obtained multi-granularity conditional diffusion model, to obtain a multi-granularity spatiotemporal sequence. : ; in, This is a set of GPS trajectory data for all vehicles, with timestamps accurate to the second. SlidngAvg is a moving average function. ∈{1,2,3} represent the granularity for one hour, two hours, and four hours, respectively. Indicates the size of the non-overlapping sliding window. Indicates 60 minutes; Then, the multi-granularity spatiotemporal sequence obtained in the previous step... Forward noise addition is performed to obtain the noise-added data set corresponding to each granularity, and the noise-added data set corresponding to each granularity is grouped by granularity to obtain the final noise-added data corresponding to that granularity. Among them, the The formula for the noisy data set corresponding to each time granularity is: ; in, For the first The noisy data at the k-th step corresponding to each time granularity. It is random noise that follows a normal distribution. For the first The variance coefficient at the k-th step corresponding to each time granularity is used to control the noise intensity, and its value ranges from 0.9 to 0.999, k∈[1, 2, 3]. ],in For the first The total number of noise-adding steps corresponding to each time granularity; Subsequently, 256-dimensional fusion features, 256-dimensional static environment features, and the number of noise addition steps corresponding to each time granularity are obtained from the multi-source input data of the multi-granularity conditional diffusion model. The obtained 256-dimensional fusion features and 256-dimensional static environment features are concatenated to obtain basic conditional features. The obtained basic conditional features and the number of noise addition steps corresponding to each time granularity are subjected to step embedding encoding to obtain concatenated vectors. A multi-head attention mechanism is used to jointly encode the obtained concatenated vectors to obtain joint conditional vectors. Finally, the joint conditional vector, the number of noise-adding steps corresponding to each time granularity, and the final noise-adding data corresponding to each time granularity are combined into a preprocessed training dataset for the multi-granularity conditional diffusion model. In step (B4), the initial values ​​of the 1×1 convolutional kernel, STGNN unit weights, and parallel parameter prediction head weights in the multi-granularity conditional diffusion model are randomly generated using a truncated normal distribution with a standard deviation of 0.01, and the initial value of the bias parameter is set to 0; the training set is set to a fixed batch size of 32; the Adam optimizer is selected, with an initial learning rate of lr=0.001, and a step-wise learning rate adjustment strategy is adopted with a step size of stepsize=100 and a weight gamma=0.9, that is, the learning rate is multiplied by 0.9 every 100 training rounds to adapt to the gradient descent requirements of weight generation; Step (B5) specifically involves the following steps: First, performing a 1×1 convolution on the final noisy data corresponding to each time granularity in the training set obtained in step (B3) to obtain the noisy data after feature mapping. Then, spatial broadcasting embedding is performed on the joint feature vector in the training set to obtain the spatially broadcast joint feature vector. Next, step number embedding and spatial broadcasting are performed on the number of noisy steps corresponding to each time granularity to obtain the number of noisy steps after spatial broadcasting. Finally, the noisy data after feature mapping, the joint feature vector after spatial broadcasting, and the number of noisy steps after spatial broadcasting are concatenated using dimensional features to obtain the fused features. And output; Then, the fusion features The input spatiotemporal feature enhancement module consists of three stacked STGNN units. This module utilizes the three stacked STGNN units to enhance the fused features. Process the data to obtain and output spatiotemporally enhanced features; Specifically, the process for each STGNN unit is as follows: First, the acquired fused features are processed... Temporal convolution operations are performed to obtain temporal augmentation features. Then, LayerNorm temporal normalization is applied to the obtained temporal augmentation features to obtain normalized temporal features. Next, graph attention is used to process the obtained normalized temporal features to obtain spatiotemporal fusion features. Subsequently, the obtained spatiotemporal fusion features are normalized according to spatial dimensions to obtain normalized spatiotemporal features. Finally, the obtained normalized spatiotemporal features are combined with the fusion features. Perform residual connections to obtain spatiotemporal augmentation features; Subsequently, the spatiotemporal enhancement features output by the spatiotemporal feature enhancement module are input into a parallel parameter prediction head. This parallel parameter prediction head first simultaneously inputs the spatiotemporal enhancement features into three parallel fully connected prediction heads: a noise prediction head, a mean prediction head, and a variance prediction head, to obtain intermediate features from three branches. Then, the ReLU activation function is used to perform nonlinear feature transformation on the intermediate features of the three branches respectively, to obtain three activated intermediate features. Finally, the Linear activation function is used to process the intermediate features of the noise prediction head and the mean prediction head respectively, to obtain the predicted noise. and predicted mean The linear activation function is used, and the softplus activation function is used to process the intermediate features of the variance prediction head to obtain the prediction variance. ; Subsequently, noise will be predicted. Predicted mean and prediction variance Input to the inverse denoising module, which processes the acquired predicted noise. Predicted mean Prediction variance The reverse iterative denoising process is repeated on the final noisy data corresponding to each time granularity until the number of denoising steps corresponding to each time granularity is completed to obtain denoised data. The obtained denoised data is then subjected to multi-granularity temporal alignment and feature standardization to obtain vehicle activity prediction results at multiple time granularities. The formula for reverse iterative denoising is as follows: ; in, Indicates the first The denoised data for the (k-1)th step corresponding to each time granularity; Finally, based on the predicted noise Calculate multi-particle-size diffusion loss: ; in, As the granularity-based weight, , , , It is forward-added random noise; Then, the multi-granularity diffusion loss is fused with the weighted entropy regularization loss obtained in step (A5) to obtain the total loss value: ; in, is the regularization coefficient.

10. A vehicle travel pattern prediction system based on adaptive multi-granularity weighted self-guided graph diffusion, characterized in that, Includes the following modules: The first module is used to acquire scene information of the vehicle to be predicted, including GPS trajectory data of the vehicle to be predicted, high-resolution satellite images of the area where the vehicle to be predicted is located, static scene information of the area, adjacency information of the area, and time data. The second module is used to perform non-overlapping sliding window splitting on the GPS trajectory data of the vehicle to be predicted in the scene information obtained from the first module to obtain a multi-granularity spatiotemporal sequence. The large language model LLM and the contrastive language-image pre-trained CLIP model are used to extract features from the high-resolution satellite images of the area where the vehicle to be predicted is located in the scene information to obtain a 256-dimensional static environment feature vector. LLM and the bidirectional encoder representation BERT from Transformer are used to perform semantic enhancement description and dimensionality reduction on the regional static scene information in the obtained scene information to obtain a 9-dimensional region feature vector. The time data in the obtained scene information is subjected to time period clustering and temporal feature encoding to obtain a 9-dimensional time feature vector. The obtained multi-granularity spatiotemporal sequence, 256-dimensional static environment feature vector, 9-dimensional time feature vector, and 9-dimensional region feature vector are combined to form the preprocessed scene information. The third module is used to concatenate the 9-dimensional temporal feature vector and the 9-dimensional regional feature vector in the preprocessed scene information obtained by the second module to obtain an 18-dimensional fused scene feature vector. The fourth module is used to input the 18-dimensional fused scene feature vector obtained from the third module into the pre-trained dynamic weight generation network to obtain multi-granular dynamic weights. The fifth module is used to obtain multi-granularity spatiotemporal features at multiple time granularities based on the multi-granularity spatiotemporal sequence and 256-dimensional static environmental feature vector obtained by the second module, and to use the multi-granularity dynamic weights obtained by the fourth module to perform weighted fusion of the multi-granularity spatiotemporal features at all time granularities to obtain 256-dimensional fused features. The sixth module is used to input the 256-dimensional fusion features obtained from the fifth module into a pre-established multi-granularity conditional diffusion model to obtain vehicle activity prediction results at multiple time granularities.