A spatiotemporal sequence interpolation method based on a conditional diffusion model, an electronic device, and a medium
Patent Information
- Application Number
- CN202611505915.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-25
- Publication Date
- 2026-10-30
AI Technical Summary
然而,现有的扩散模型在应用于时空插补时,由于高斯噪声的随机性,导致噪声样本偏离真实的时空分布,难以从中有效学习正确的时空关联,且多步迭代去噪过程计算开销大,长序列条件下易发生轨迹偏移,亦缺乏针对空间异质性的专门建模,难以复杂环境中局部与全局空间依赖的协同关系
[0029](1)通过条件特征提取模块从观测数据中提取全局时空先验特征,引导扩散模型的反向去噪过程,有效纠正线性内插引入的平滑偏差,插补精度显著提升;
Smart Images

Figure CN123012377A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic digital data processing, and in particular to a spatiotemporal sequence interpolation method, electronic device, and medium based on a conditional diffusion model. Background Technology
[0002] Spatiotemporal series data are widely used in various fields such as meteorological monitoring, environmental sensing, traffic flow analysis, and socioeconomic statistics. Their completeness plays a crucial foundational role in subsequent pattern recognition, trend prediction, and decision support. Currently, a multi-source data acquisition system, primarily based on fixed or mobile sensor networks and supplemented by remote sensing satellites and mobile terminals, has been largely established, capable of providing multivariate spatiotemporal observation data with broad coverage and high temporal resolution.
[0003] However, due to various factors such as sensor malfunctions, communication interruptions, environmental interference, and alternating operation of data acquisition equipment, the actual spatiotemporal sequence data collected generally suffers from significant data gaps. This severe data gap not only restricts the accuracy of dynamic system evolution analysis but also seriously affects downstream practical applications such as forecasting, early warning, and resource management.
[0004] For the problem of imputing missing values in spatiotemporal series, existing technologies mainly include statistical and machine learning methods and deep learning methods. Traditional statistical and machine learning methods include linear interpolation, spline interpolation, K-nearest neighbor interpolation, and matrix factorization. These methods typically estimate missing values based on assumptions about the smoothness or spatial similarity of the time series, and are computationally efficient. However, they are difficult to characterize the complex nonlinear spatiotemporal evolution of sea surface temperature data, and their imputation accuracy is limited, especially in scenarios with blocky, continuous missing values. In deep learning methods, recurrent neural networks or Transformers learn temporal dependencies through sequence modeling, which can improve interpolation accuracy to some extent. However, they are prone to error accumulation when dealing with long sequences, causing subsequent predictions to gradually deviate from the true values. Their attention mechanisms are mainly designed for regular grid data and are difficult to effectively capture the complex spatial topological relationships and dynamic evolution patterns between irregularly distributed observation nodes in real-world application scenarios. On the other hand, graph neural network-based methods model the dependencies between spatial nodes through predefined adjacency graphs, which can utilize spatial structure information to assist interpolation to some extent. However, they usually rely on fixed graph topology structures and are difficult to adapt to the dynamic changes in spatial correlations in real-world systems. Furthermore, due to their insufficient utilization of global context information, their interpolation accuracy is still not ideal in scenarios with large-scale continuous missing data.
[0005] Diffusion models have demonstrated excellent performance in image generation, audio synthesis, and other fields, and have been gradually introduced into time series interpolation tasks in recent years. However, when applied to spatiotemporal interpolation, existing diffusion models suffer from several drawbacks. The randomness of Gaussian noise causes noise samples to deviate from the true spatiotemporal distribution, making it difficult to effectively learn the correct spatiotemporal correlations. Furthermore, the multi-step iterative denoising process is computationally expensive, and trajectory shifts are prone to occur under long sequence conditions. In addition, there is a lack of specialized modeling for spatial heterogeneity, making it difficult to understand the cooperative relationship between local and global spatial dependencies in complex environments. Summary of the Invention
[0006] This invention solves the problems existing in the prior art and provides a spatiotemporal sequence interpolation method, electronic device and medium based on a conditional diffusion model.
[0007] The technical solution adopted in this invention is a spatiotemporal sequence interpolation method based on a conditional diffusion model, comprising the following steps:
[0008] S1 acquires the original observation data and its missing mask, randomly selects some known positions from the observation data as conditions, performs linear interpolation on the missing positions, and obtains the condition information sequence;
[0009] S2 utilizes the conditional feature extraction module to extract global spatiotemporal prior features based on the conditional information sequence and geographical adjacency information;
[0010] S3 fuses the noise samples of the current diffusion step with the conditional information sequence, inputs them into the noise estimation module, and outputs the predicted noise.
[0011] S4 calculates the loss based on the difference between the predicted noise and the actual noise in the target region and updates the model parameters; the target region is the location in the original missing mask that was not selected as a condition.
[0012] Preferably, in S1, linear interpolation is performed using only observations from the same location at other time steps, without introducing cross-location information.
[0013] Preferably, in S2, the conditional information sequence is subjected to spatial dimension self-attention operation, temporal dimension self-attention operation, and graph message passing operation based on geographical adjacency information. The output of the fusion operation is used to obtain the global spatiotemporal prior features.
[0014] Preferably, in S3, the noise estimation module includes:
[0015] The time extraction submodule is used to capture long program column dependencies;
[0016] The spatial extraction submodule is used to extract multi-granularity spatial dependencies.
[0017] Preferably, the time extraction submodule performs layer normalization and state-space model processing on the input features, and connects them with the input feature residuals to obtain intermediate features;
[0018] Rotational position encodings are injected into intermediate features and global spatiotemporal prior features respectively, and cross-attention calculation is performed to align and calibrate noisy features to prior features;
[0019] After concatenating the cross-attention output with the intermediate feature residuals, the output is subjected to layer normalization and linear mapping to produce temporal calibration features.
[0020] Preferably, the spatial extraction submodule unfolds the temporal calibration features along the spatial dimension, performs multi-scale convolution operations using three different sizes of convolution kernels and fuses the results, performs multi-head self-attention operations, performs graph convolution operations based on adjacency information, and performs deformable attention operations by adjusting the sampling position through learnable offsets;
[0021] The outputs of the four branches are aggregated by the feature fusion module to output predicted noise.
[0022] Preferably, in S4, the loss is calculated only on the target region as the mean square error between the predicted noise and the actual noise, and the size of the target region is normalized.
[0023] If the total number of pixels in the target region is zero during training, the loss calculation for the current batch of samples is skipped.
[0024] Preferably, during the inference stage, all known observation positions are used as conditions to gradually remove noise from random noise. After each step of noise removal, the known observation values are forcibly overwritten back to the corresponding positions to output the complete sequence.
[0025] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the spatiotemporal sequence interpolation method based on the conditional diffusion model.
[0026] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the spatiotemporal sequence interpolation method based on the conditional diffusion model.
[0027] This invention relates to a spatiotemporal sequence interpolation method, electronic device, and medium based on a conditional diffusion model. The method involves acquiring original observation data and its missing mask; randomly selecting some known locations from the observation data as conditions; performing linear interpolation on the missing locations to obtain a conditional information sequence; using a conditional feature extraction module to extract global spatiotemporal prior features based on the conditional information sequence and geographical adjacency information; fusing noise samples from the current diffusion step with the conditional information sequence and inputting this data into a noise estimation module to output predicted noise; calculating the loss based on the difference between the predicted noise and the actual noise in the target region and updating the model parameters; the target region being the locations in the original missing mask that were not selected as conditions; and implementing the electronic device and medium based on this method.
[0028] The beneficial effects of this invention are as follows:
[0029] (1) By extracting global spatiotemporal prior features from the observation data through the conditional feature extraction module, the reverse denoising process of the diffusion model is guided, effectively correcting the smoothing bias introduced by linear interpolation and significantly improving the interpolation accuracy.
[0030] (2) By capturing long-range temporal dependencies through state-space model, combined with rotational position encoding and cross-attention calibration, the gradual deviation in the denoising process can be effectively avoided, and the accumulation of long sequence errors and denoising trajectory deviation can be alleviated.
[0031] (3) Parallel integration of multi-scale convolution, self-attention, adaptive graph convolution and deformable attention to achieve multi-level spatial dependency modeling from local neighborhood to global association;
[0032] (4) It maintains stable performance in a highly sparse data environment. The error remains stable when the missing rate reaches 60%, and it still has reliable interpolation capability when the missing rate reaches 90%, which far exceeds the comparison model. It has excellent anti-noise interference and sparse data adaptability.
[0033] (5) The conditional feature extraction module can effectively capture local key feature constraints by fusion of spatial attention, temporal attention and graph message passing in parallel. It plays an important role in scenarios with strong spatial homogeneity and improves accuracy.
[0034] (6) It can be effectively transferred to spatiotemporal data interpolation tasks in other fields such as air quality monitoring and urban traffic flow prediction. It has good versatility and practical value, and has good cross-domain generalization ability.
[0035] (7) In the process of reverse interpolation reasoning, after each step of denoising, the original known observation value is forcibly overwritten back to the corresponding position of the current estimation result to ensure that the known data is not modified during the interpolation process, thus ensuring strict consistency between the interpolation result and the original observation data.
[0036] (8) The self-supervised random masking strategy makes full use of limited observation data, calculates the loss only in the target region and normalizes it, avoids invalid positions from interfering with gradient updates, and balances training efficiency and stability. Attached Figure Description
[0037] Figure 1 This is a flowchart of the method of the present invention;
[0038] Figure 2 This is a flowchart illustrating the specific implementation of the present invention;
[0039] Figure 3 In an embodiment of the present invention, visualizations of MAE for different variant models on datasets in sea areas A and B are provided, where (a) corresponds to sea area A and (b) corresponds to sea area B.
[0040] Figure 4 In an embodiment of the present invention, a visualization of the absolute error of sea area A under different missing rates in a scatter plot missing pattern is shown.
[0041] Figure 5 In an embodiment of the present invention, a visualization of MAE and MSE of sea area A at different reverse diffusion time steps under the scatter missing mode;
[0042] Figure 6 In an embodiment of the present invention, a visualization comparing the daily SST values and absolute errors of sea surface temperature in sea area B over a random 6-day period is provided. Detailed Implementation
[0043] The present invention will be further described in detail below with reference to embodiments, but the scope of protection of the present invention is not limited thereto.
[0044] This invention relates to a spatiotemporal sequence interpolation method based on a conditional diffusion model. The core of the method lies in using a conditional feature extraction module to extract global spatiotemporal prior features from the observation data, and using a noise estimation module composed of a time extraction submodule and a spatial extraction submodule to gradually restore random noise to the true data distribution under global prior constraints. The input of the method is a dynamic sequence. The diffusion framework extracts a coarse but effective spatiotemporal dependency from the conditional information sequence as a global context prior. Under this prior constraint, the noise estimation module extracts spatiotemporal correlation and gradually restores the true data distribution.
[0045] The method includes the following steps:
[0046] S1 acquires the original observation data and its missing mask, randomly selects some known positions from the observation data as conditions, performs linear interpolation on the missing positions, and obtains the condition information sequence;
[0047] S2 utilizes the conditional feature extraction module to extract global spatiotemporal prior features based on the conditional information sequence and geographical adjacency information;
[0048] S3 fuses the noise samples of the current diffusion step with the conditional information sequence, inputs them into the noise estimation module, and outputs the predicted noise.
[0049] S4 calculates the loss based on the difference between the predicted noise and the actual noise in the target region and updates the model parameters; the target region is the location in the original missing mask that was not selected as a condition.
[0050] The method will be described below with reference to specific embodiments.
[0051] S1 acquires the original observation data and its missing mask, randomly selects some known positions from the observation data as conditions, performs linear interpolation on the (non-conditional) missing positions, and obtains the conditional information sequence.
[0052] Linear interpolation uses only observations from the same location at other time steps and does not introduce cross-location information.
[0053] In this invention, the time series of each node is first linearly interpolated to initially construct a rough but effective interpolation condition information sequence X for subsequent denoising. This interpolation method can provide an initial estimate with low uncertainty for the missing parts to maintain the spatiotemporal consistency of the current data. Linear interpolation only assumes that the data changes linearly and uniformly in the time dimension. Therefore, it only uses the observations of the same spatial node at other time steps for piecewise linear estimation and does not introduce spatial information across nodes.
[0054] It should be noted that linear interpolation is only a preliminary means of constructing conditional information, and it may introduce systematic smoothing bias. This bias will be corrected in the future by extracting deeper spatiotemporal features.
[0055] S2 utilizes the conditional feature extraction module to extract global spatiotemporal prior features based on the conditional information sequence and geographical adjacency information;
[0056] In this invention, the interpolated data is modeled as a global context prior by a learnable module to model the spatiotemporal information-based conditional features. This module takes the interpolated conditional information sequence X and the adjacency matrix A as input and extracts the spatiotemporal dependencies from X.
[0057] Specifically, the conditional feature extraction module performs three parallel operations on the conditional information sequence, including spatial self-attention operation, temporal self-attention operation, and graph message passing operation based on geographical adjacency information. The output of the fusion operation is used to obtain the global spatiotemporal prior features; represented as follows:
[0058]
[0059]
[0060]
[0061]
[0062] in, Indicates global attention, subscript and Spatial attention and temporal attention are represented respectively, implemented using the dot product multi-head self-attention mechanism in Transformer. , This represents a neural network for spatial information transmission. The outputs of the three operations are respectively subjected to residual connections and layer normalization (Norm), and then the three results are summed. Finally, the results are mapped through a multilayer perceptron (MLP) to obtain the global context prior features. These prior features will serve as the global context for the subsequent noise estimation module to calculate the spatiotemporal attention weights, guiding the denoising process to correct the bias of the initial linear interpolation.
[0063] S3 fuses the noise samples of the current diffusion step with the conditional information sequence, inputs them into the noise estimation module, and outputs the predicted noise.
[0064] The noise estimation module includes:
[0065] The time extraction submodule is used to capture long program column dependencies;
[0066] The spatial extraction submodule is used to extract multi-granularity spatial dependencies.
[0067] In this invention, the input to the noise estimation module includes a conditional information sequence X and noise samples. Composition of noise information and by conditional characteristics The prior information formed by the adjacency matrix A.
[0068] The noise estimation module consists of two sequential parts: a time extraction submodule and a spatial extraction submodule. The time extraction submodule is used to capture long program column dependencies, while the spatial extraction submodule is used to extract multi-granularity spatial dependencies.
[0069] (3-1) Time Extraction Submodule
[0070] The time extraction submodule performs layer normalization and state space model processing on the input features, and connects them with the input feature residuals to obtain intermediate features;
[0071] Rotational position encodings are injected into intermediate features and global spatiotemporal prior features respectively, and cross-attention calculation is performed to align and calibrate noisy features to prior features;
[0072] After concatenating the cross-attention output with the intermediate feature residuals, the output is subjected to layer normalization and linear mapping to produce temporal calibration features.
[0073] In this invention, the time extraction submodule uses the Mamba module as the core of time-series feature extraction. It utilizes its selective scanning mechanism to efficiently process long-series sea surface temperature data. This mechanism can adaptively filter noise interference and accurately capture the long-range time-series evolution features of the sea surface temperature sequence.
[0074] Specifically, the input features of the noise estimation module are processed sequentially through layer normalization and the Mamba module, and then the residuals are added to the original input features to obtain intermediate features. ,
[0075]
[0076] To enhance the model's ability to perceive relative temporal positions, intermediate features were analyzed separately. and global prior features Inject rotational position encoding ( The intermediate features encoded by the injected rotation position are used as the query vector, and the global prior features encoded by the injected rotation position are used as the key vector and value vector, respectively. Cross-attention is then performed. The calculation process acts as a feature calibrator, enabling noisy features to retrieve key features from clean prior information, guiding the model to recover the true feature distribution from random noise. After residual concatenation of the cross-attention output with intermediate features, the data is sequentially normalized through layers. and linear mapping The final output is the timing calibration feature. ,
[0077]
[0078] (3-2) Spatial Extraction Submodule
[0079] The spatial extraction submodule unfolds the temporal calibration features along the spatial dimension, performs multi-scale convolution operations using three different sizes of convolution kernels and fuses the results, performs multi-head self-attention operations, performs graph convolution operations based on adjacency information, and performs deformable attention operations by adjusting the sampling position through learnable offsets.
[0080] The outputs of the four branches are aggregated by the feature fusion module to output predicted noise.
[0081] In this invention, the spatial extraction submodule expands the temporal calibration features output by the temporal extraction submodule in a spatial dimension, and uses four submodules in parallel to capture complex spatial dependencies; the four parallel branches include:
[0082] a) Multi-scale convolutional branches
[0083] Parallel convolutions with kernel sizes of 1×1, 3×3, and 5×5 are employed to capture spatial physical features ranging from local grids to macroscopic regions through hierarchical receptive fields. The three outputs are concatenated and then fused using a 1×1 convolution to obtain multi-scale spatial features.
[0084]
[0085] b) Self-attention branch
[0086] Multi-head self-attention (SelfAttn) is performed on the temporal calibration features to focus on capturing long-range spatial correlations, ensuring that the interpolation results follow uniform physical constraints at the global scale, and outputting global spatial correlation features. ;
[0087] c) Adaptive graph convolution branch
[0088] Graph convolution operations are performed based on geographic adjacency information, and deep spatial dependencies are uncovered by learning implicit topological structures. ;
[0089] d) Deformable attention branch
[0090] By dynamically adjusting the sampling position using learnable offsets, the limitations of a fixed receptive field are overcome, allowing for the focused capture of abrupt spatial features such as extreme events. Specifically, the deformable attention operation is based on a learnable spatial offset parameter and an adaptive attention weight generation mechanism to perform dynamic spatial feature modeling, thereby enhancing the spatial features.
[0091] The outputs of the four branches are concatenated along the channel dimension.
[0092]
[0093] The feature fusion module aggregates the data and outputs the prediction noise. ,
[0094]
[0095] S4 calculates the loss based on the difference between the predicted noise and the actual noise in the target region and updates the model parameters; the target region is the location in the original missing mask that was not selected as a condition.
[0096] The loss is calculated only on the target region, using the mean square error between the predicted noise and the actual noise, and the size of the target region is normalized.
[0097] If the total number of pixels in the target region is zero during training, the loss calculation for the current batch of samples is skipped.
[0098] In this invention, given a clean data sample (noise-free data or raw data collected), Gaussian noise is gradually added to it during the training process in the following manner;
[0099] Forward diffusion noise
[0100]
[0101] in ~ N(0, I) represents standard Gaussian noise. The noise control coefficient is determined by the preset minimum noise level β1 and maximum noise level β2. T The recursive calculation shows that t is the number of diffusion steps for random sampling.
[0102] This invention employs a self-supervised training strategy to simulate the imputation process for missing data. During the training phase, a conditional mask is first sampled from the original observation mask according to a random masking strategy. The model uses only the known observations marked by the conditional mask as conditions for interpolation and prior extraction, while the observed locations in the original observation mask that were not selected as conditions are used as the interpolation targets (i.e., the target regions). Since the imputation task aims to learn the missing data distribution, the model only calculates the diffusion loss for the target regions during training. The loss function is defined as the mean square error between the predicted noise and the true forward noise in the target region, divided by the total number of pixels in the target region to achieve normalization.
[0103]
[0104] Here, ⊙ represents element-wise multiplication, and the max(·, 1) operator is introduced in the denominator to prevent division by zero and ensure the numerical stability of the training process; if the total number of pixels in the target region is zero during training, the loss calculation of the current batch of samples is skipped.
[0105] During the inference phase, all known observation positions are used as conditions to gradually remove noise from random noise. After each step of noise removal, the known observation values are forcibly overwritten back to the corresponding positions to output the complete sequence.
[0106] In the reverse interpolation inference stage, this invention takes the original observation sequence, observation mask, and adjacency matrix as input, setting the condition mask to all known observation positions and the target mask to all missing positions. First, a conditional information sequence and global prior are constructed, and initial noise is sampled from a standard normal distribution. Then, denoising is iteratively performed from t=T to t=1 according to the reverse diffusion process. The update rule for each step is as follows:
[0107]
[0108] Where z ~ N(0, I) is a random perturbation, and z = 0 when t = 1; The noise standard deviation is preset; after each denoising step, the known observations are forcibly overwritten back to the corresponding positions of the current estimation results according to the original observation mask, ensuring that the known data is not modified throughout the inference process. The fusion rule is... Finally, the complete interpolated sequence is output.
[0109] The present invention also relates to an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the spatiotemporal sequence interpolation method based on the conditional diffusion model.
[0110] The present invention also relates to a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the spatiotemporal sequence interpolation method based on the conditional diffusion model.
[0111] To verify the universality and robustness of this invention in different application scenarios, this embodiment selects the Sea Surface Temperature (SST) dataset, Air Quality Monitoring (AQI-36) dataset, Urban Traffic Flow (METR-LA) dataset, and Marine Chlorophyll a Concentration dataset for interpolation experiments, covering various data formats such as regular grids and irregular topologies. In one specific embodiment, this invention sets 24 consecutive time steps as a time series, sets the number of noise estimation module layers to 4, sets the diffusion steps to 100, sets the batch size to 16, sets the training epochs to 100, sets the initial learning rate to 0.0001, sets the number of attention heads to 8, and sets the dimension of the diffusion hidden layer to 128; the minimum noise level β1 of the diffusion model is set to 0.0001, and the maximum noise level β... T Set to 0.2. The above parameters can be adjusted appropriately according to the characteristics of the dataset in specific applications. The first 70% of the dataset is used as the training set, 10% of the data is used as the validation set, and the remaining 20% of the data is used as the test set. To simulate the distribution of real missing data, two artificial missing strategies are adopted: (1) Block missing: 5% of the observation data is randomly masked, and the observations of each sensor for 1 to 4 hours (or 1 to 4 days) are masked with a probability of 0.15%; (2) Scatter missing: 25% of the observation data is randomly masked. To verify the effectiveness of the present invention, a large number of experiments were conducted on the sea surface temperature (SST) datasets of two sea areas. At the same time, to verify the cross-domain generalization ability of the present invention, extended experiments were also carried out on the AQI-36 air quality monitoring dataset, the METR-LA urban traffic flow dataset, and the marine chlorophyll a concentration dataset.
[0112] To verify the performance advantages of the PSTI model of this invention, a comparative analysis was conducted with four existing baseline models: SAITS, SPIN, STAGANN, and ImputeFormer. The evaluation metrics used were mean absolute error (MAE) and mean squared error (MSE), with smaller values indicating better interpolation performance.
[0113] The interpolation results of the five models on the SST dataset of sea area A are shown in Table 1, and the interpolation results on the SST dataset of sea area B are shown in Table 2.
[0114] Table 1. Error statistics of different models with different missing patterns on the A sea area dataset.
[0115]
[0116] Table 2. Error statistics of different models with different missing patterns on the B sea area dataset.
[0117]
[0118] SST data itself possesses strong spatial autocorrelation and temporal continuity. In the relatively enclosed and gently flowing A-area dataset, most benchmark models exhibit good imputation performance. The performance of this invention is further improved upon this. In the scattered missing pattern, the MAE of this invention is reduced to 0.03, and the MSE is 0.01; in the blocky missing pattern, the MAE is 0.05, and the MSE is 0.01, reaching the optimal or matching the optimal model. The B-area is open and significantly influenced by ocean currents and monsoons, exhibiting stronger spatial heterogeneity and greater imputation difficulty. In the scattered missing pattern, the MAE and MSE of this invention are 0.02 and 0.01, respectively; in the blocky missing pattern, the MAE and MSE are 0.02 and 0.01, respectively. The suboptimal ImputeFormer model has MAEs of 0.04 and 0.09 in the two patterns, respectively, which this invention reduces by 50% and 78%, respectively. Experimental results show that this invention, through its spatiotemporal feature extraction mechanism, can effectively capture the complex spatiotemporal correlations in the marine environment.
[0119] To further verify the effectiveness of each module of this invention, under the condition of maintaining consistent parameters, imputation experiments were conducted on variant models of removing the conditional feature extraction module (w / o Feature), removing the temporal extraction module (w / o Temporal), and removing the spatial extraction module (w / o Spatial) under both scattered and blocky missing modes. MAE was used as the evaluation metric. The experimental results are as follows: Figure 3As shown, the complete PSTI model of this invention exhibits the lowest MAE across all datasets and missing settings. For example, in the A sea area dataset, the MAE is 0.03 in the scattered missing mode and 0.054 in the block missing mode. Removing the conditional extraction module resulted in a certain degree of performance degradation on both the A and B sea area datasets. In the open B sea area, which exhibits strong spatial homogeneity, the conditional extraction module effectively captures key feature constraints of local disturbances; losing this module leads to a decrease in the model's ability to locate isolated outliers. Removing the temporal extraction module increased the MAE in all scenarios, indicating that the temporal extraction module plays a positive role in capturing ocean dynamic evolution. The spatial extraction module is the core foundation for maintaining model performance; removing it significantly reduced model performance. Taking block missing as an example, the MAE in the A sea area dataset increased from 0.054 to 0.347, and the MAE in the B sea area dataset increased from 0.022 to 0.196. This phenomenon indicates that this invention highly relies on the spatial module to extract spatial correlations between adjacent sea areas.
[0120] To evaluate the imputation stability of this invention under different missing values, imputation experiments were conducted on the PSTI model and the suboptimal baseline model ImputeFormer under different missing values (10%~90%) in the scattered missing data pattern of the A sea area dataset. MAE was used as the evaluation metric. The experimental results are as follows: Figure 4 As shown, under all missing rate settings, the imputation error of this invention is consistently lower than that of the ImputeFormer model. When the missing rate reaches 60%, the performance of ImputeFormer begins to decline significantly, with the MAE rising sharply from 0.14 to 0.32. In contrast, this invention exhibits stronger imputation stability and noise immunity; the MAE changes very slowly with increasing missing rate, maintaining strong imputation performance even when the data becomes very sparse. These results demonstrate that this invention possesses reliable imputation capabilities and stable performance even in highly sparse data environments, making it highly suitable for spatiotemporal data imputation tasks in complex scenarios.
[0121] To investigate the impact of diffusion steps on the performance of this invention, experiments were conducted with 50, 100, 150, and 200 back diffusion steps in a scatter plot missing mode for the A sea area dataset. MAE and MSE were used as evaluation metrics. The experimental results are as follows: Figure 5As shown, when the number of diffusion steps increases from 50 to 100, both MSE and MAE show a slow decreasing trend, reaching their lowest point at 100 steps. When the number of diffusion steps exceeds 100, MAE and MSE show a continuous increase, with the slope of MSE becoming steeper, indicating a significant performance degradation. When the number of iterations increases to 150 or even 200 steps, the error accumulation effect becomes increasingly apparent, ultimately causing the generated samples to gradually deviate from the true data distribution. Experimental results show that, under the current scattered missing data pattern of the dataset, setting the backdiffusion time step to 100 steps is sufficient to characterize the details of the data distribution, achieving a relatively ideal balance between accuracy and computational cost.
[0122] To further verify the generalization and interpolation capabilities of this invention under different marine geographical environments, six typical time slices were randomly selected from the B sea area dataset for visualization, such as... Figure 6 As shown in the figure, the experimental results demonstrate that the interpolated field (second row) generated by the PSTI model achieves a high degree of similarity in spatial morphology to the actual observed field (first row), successfully reproducing the complex sea surface temperature distribution pattern at each sampling time. The figure clearly shows the nonlinear fronts formed by the convergence of warm and cold water bodies and the distorted temperature gradient bands. In scenarios with complex spatial heterogeneity, traditional pure mathematical spatial interpolation methods easily lead to blurred edges. However, this invention, with its powerful spatiotemporal feature extraction capabilities, can accurately recover the original layout, indicating that the model does not simply perform numerical interpolation based on neighboring nodes, but rather learns the inherent sea surface temperature evolution patterns of the ocean.
[0123] To verify the performance of this invention in handling high-frequency fluctuations and strong abrupt changes, a comparative experiment was conducted using a real air quality monitoring dataset (AQI-36). This dataset contains hourly PM2.5 sampling data from 36 monitoring stations in a certain area, covering 12 months and reflecting the air quality fluctuations in that region. The error statistics of MAE and MSE for different models on the AQI-36 dataset are shown in Table 3.
[0124] Table 3. Error statistics of different models for MAE and MSE on the AQI-36 dataset.
[0125]
[0126] This invention achieves a MAE of 9.10, outperforming all other models. The performance of the graph neural network model STAGANN shows a significant decline, with an MAE of 17.46; ImputeFormer, based on the Transformer architecture, has an MAE of 12.58; and the second-best performing model, SAITS, has an MAE of 9.47. In contrast, this invention keeps the error within a smaller range, further reducing it by approximately 4% compared to SAITS, validating the superior performance and robustness of this invention in handling such data imputation tasks.
[0127] To verify the spatiotemporal interpolation performance of this invention under different application scenarios and complex topologies, the classic METR-LA urban traffic flow dataset was selected. This data comes from 207 traffic sensors in a certain city, distributed across different road sections, providing data such as vehicle speed and traffic flow, covering traffic records from 2012 to 2015. Table 4 shows the error statistics of different models on the METR-LA dataset for different missing modes.
[0128] Table 4. Error statistics of different models on different missing patterns on the METR-LA dataset.
[0129]
[0130] This invention outperforms other baseline models in both scattered and blocky missing modes. In the scattered missing mode, the MAE of this invention is 1.69 and the MSE is 8.37; in the blocky missing mode, the MAE is 1.75, better than all baselines, and the MSE is 10.07, comparable to the optimal baseline. These results demonstrate that this invention can effectively overcome the topological limitations of non-Euclidean road networks and accurately recover real traffic flow data when processing traffic flow data interpolation tasks.
[0131] To verify the interpolation capability of this invention when processing data with spatial heterogeneity and nonlinearity, a marine chlorophyll-a (Chlorophyll-a) concentration dataset was introduced. Two sea areas, A and B, with different marine dynamic properties were selected for the study. The experimental results are shown in Tables 5 and 6.
[0132] Table 5. Error statistics of different models for different missing patterns on the Chl-a sea area dataset.
[0133]
[0134] Table 6. Error statistics of different models on different missing patterns in the B sea area dataset (Chl-a).
[0135]
[0136] Whether in complex nearshore areas or open ocean waters, the MAE and MSE of this invention outperform all benchmark models on the chlorophyll a dataset. In the scattered missing data pattern of sea area A, the MAE of this invention is 0.06 and the MSE is 0.04. In contrast, ImputeFormer's MAE is 0.15, while the errors of SAITS and SPIN, which are based on attention mechanisms, both exceed 0.4. These results demonstrate that this invention can effectively explore the spatiotemporal evolution of phytoplankton aggregation and achieve accurate imputation of missing data.
[0137] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0138] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0139] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0140] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps of the function specified in one or more boxes.
[0141] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the invention.
[0142] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A spatiotemporal sequence interpolation method based on a conditional diffusion model, characterized in that, Includes the following steps: S1 acquires the original observation data and its missing mask, randomly selects some known positions from the observation data as conditions, performs linear interpolation on the missing positions, and obtains the condition information sequence; S2 utilizes the conditional feature extraction module to extract global spatiotemporal prior features based on the conditional information sequence and geographical adjacency information; S3 fuses the noise samples of the current diffusion step with the conditional information sequence, inputs them into the noise estimation module, and outputs the predicted noise. S4 calculates the loss based on the difference between the predicted noise and the actual noise in the target region and updates the model parameters; the target region is the location in the original missing mask that was not selected as a condition.
2. The method according to claim 1, characterized in that, In S1, linear interpolation only uses observations from the same location at other time steps, without introducing cross-location information.
3. The method according to claim 1, characterized in that, In S2, the conditional information sequence is subjected to spatial dimension self-attention operation, temporal dimension self-attention operation, and graph message passing operation based on geographical adjacency information. The output of the fusion operation is used to obtain the global spatiotemporal prior features.
4. The method according to claim 1, characterized in that, In S3, the noise estimation module includes: The time extraction submodule is used to capture long program column dependencies; The spatial extraction submodule is used to extract multi-granularity spatial dependencies.
5. The method according to claim 4, characterized in that, The time extraction submodule performs layer normalization and state space model processing on the input features, and connects them with the input feature residuals to obtain intermediate features; Rotational position encodings are injected into intermediate features and global spatiotemporal prior features respectively, and cross-attention calculation is performed to align and calibrate noisy features to prior features; After concatenating the cross-attention output with the intermediate feature residuals, the output is subjected to layer normalization and linear mapping to produce temporal calibration features.
6. The method according to claim 5, characterized in that, The spatial extraction submodule unfolds the temporal calibration features along the spatial dimension, performs multi-scale convolution operations using three different sizes of convolution kernels and fuses the results, performs multi-head self-attention operations, performs graph convolution operations based on adjacency information, and performs deformable attention operations by adjusting the sampling position through learnable offsets. The outputs of the four branches are aggregated by the feature fusion module to output predicted noise.
7. The method according to claim 1, characterized in that, In S4, the loss is calculated only on the target region as the mean square error between the predicted noise and the actual noise, and the size of the target region is normalized. If the total number of pixels in the target region is zero during training, the loss calculation for the current batch of samples is skipped.
8. The method according to claim 1, characterized in that, During the inference phase, all known observation positions are used as conditions to gradually remove noise from random noise. After each step of noise removal, the known observation values are forcibly overwritten back to the corresponding positions to output the complete sequence.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the spatiotemporal sequence interpolation method based on the conditional diffusion model as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the spatiotemporal sequence interpolation method based on the conditional diffusion model as described in any one of claims 1 to 8.
