A large-area marine data interpolation method and system based on a space-time diffusion model
Patent Information
- Application Number
- CN202611001406.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-07
- Publication Date
- 2026-10-13
AI Technical Summary
[0004]为了解决在面对大区域多块云朵状连续缺失时,现有插补方法适应性差、难以在有限计算资源下重构出兼具高保真度与物理梯度一致性的连续海洋环境场的问题,本发明提供一种基于时空扩散模型的大区域海洋数据插补方法及系统
1、本发明通过基于真实气象遮挡分布特征动态生成多块云朵状条件掩码,利用二维高斯分布块极大值融合与低分辨率随机噪声加权叠加的掩码构造算法,使模型在训练阶段充分学习不规则、大面积连续缺失下的数据分布边界特征,实现了对真实卫星遥感云朵状遮挡环境的强鲁棒性自适应插补。
Smart Images

Figure CN122903746A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of marine environmental information technology, and in particular to a method and system for interpolating large-area marine data based on a spatiotemporal diffusion model. Background Technology
[0002] Regional marine environmental spatial data is a fundamental condition for understanding ocean dynamic processes, conducting climate change predictions, and supporting marine economic activities. Currently, such data is mainly acquired through satellite remote sensing. However, due to limitations in satellite orbital gaps and the physical working mechanisms of the sensors themselves, the observation data acquired in actual operations often suffers from severe spatial incompleteness. This lack is not a uniformly distributed isolated point, but often manifests as large-area, multi-block, and highly irregular cloud-like continuous gaps, which greatly restricts the direct application and subsequent analysis value of marine observation data.
[0003] To address the issue of missing data, existing interpolation methods are mainly divided into two categories: traditional numerical and statistical interpolation methods. While these methods have a strong mathematical and statistical foundation, they rely excessively on historical statistical covariance or global principal components, making it difficult to capture the complex nonlinear spatiotemporal evolution caused by local small-scale eddies, thermodynamic fronts, etc. This results in overly smooth interpolation results, losing key high-frequency physical details and texture features. Although data-driven methods based on deep learning have significantly improved the fitting ability of complex nonlinear data, they often employ simple strategies for missing independent and identically distributed random points or regular geometric blocks during the training phase. This fails to accurately reflect the dynamic cloud-like occlusion distribution caused by the evolution of cyclones and cloud systems in actual satellite images. Furthermore, these methods often use pixel-wise mean square error as the sole optimization objective, lacking explicit constraints on the gradient of the spatial geophysical field. When filling large blank areas, unnatural numerical jumps or discontinuities frequently occur at the boundary between the interpolated area and the known observation area, making it difficult to achieve efficient joint extraction of long-term high-resolution spatial features with limited computing resources. Currently, there is a need for a large-area ocean data interpolation method and system based on a spatiotemporal diffusion model. Summary of the Invention
[0004] To address the problem that existing interpolation methods have poor adaptability and struggle to reconstruct a continuous marine environmental field with both high fidelity and physical gradient consistency under limited computational resources when dealing with large areas of continuous cloud-like gaps, this invention provides a large-area marine data interpolation method and system based on a spatiotemporal diffusion model.
[0005] Firstly, the present invention provides a large-area ocean data interpolation method based on a spatiotemporal diffusion model, which adopts the following technical solution: A method for interpolating large-area ocean data based on a spatiotemporal diffusion model includes: Acquire spatiotemporal data of the marine environment and dynamically generate multiple cloud-shaped conditional masks based on the real meteorological obstruction distribution characteristics; Based on the conditional mask, conditional mean filling and forward noise addition to the target region are performed on the spatiotemporal data respectively to obtain the conditional interpolation data and the target noise-added state, and then spliced along the channel dimension to construct a dual-channel input tensor; The dual-channel input tensor is input into the spatiotemporal coding backbone network, and the diffusion step time embedding information is injected to predict the denoised data field. A composite physical constraint loss function consisting of mask reconstruction loss, spatial gradient consistency loss, and total variational regularization weighting is constructed, and the spatiotemporal coding backbone network is trained end-to-end based on the composite physical constraint loss function. Based on the trained network weights, inverse diffusion iterative denoising is initialized and executed. The denoised interpolated data is then subjected to inverse normalization and physical boundary truncation in sequence. Finally, the ocean data interpolation field is obtained through multi-sample parallel sampling and fusion.
[0006] Furthermore, the dynamic generation of multiple cloud-shaped conditional masks based on real meteorological obstruction distribution characteristics includes randomly generating multiple two-dimensional Gaussian distribution blocks on a spatiotemporal grid, and fusing the maximum values of the spatial responses of each Gaussian block to form the main cloud cluster. Low-resolution random noise is generated and upsampled to the target resolution by bilinear interpolation. It is then superimposed with the main cloud cluster according to a preset weight to obtain the fused mask field. The quantile threshold of the fused mask field is calculated based on the preset missing rate, and a binary conditional mask is generated by Boolean truncation using an indicator function. The formula for calculating the Gaussian block spatial response is as follows: , in, Let be the spatial response value of the k-th two-dimensional Gaussian distribution block at the spatiotemporal grid coordinates (x, y), where k is the index number of the Gaussian distribution block. Let k be the grid position of the center of the k-th Gaussian distribution block in the longitude direction. Let be the grid position of the center of the k-th Gaussian block in the latitudinal direction. Let be the standard deviation of the k-th Gaussian block in the longitude direction. Let be the standard deviation of the k-th Gaussian block in the latitudinal direction.
[0007] Furthermore, obtaining the conditional interpolation data and the target noise state includes combining normalized observation data with a preserved region mask, using the real observation values in the mask-preserved region, and filling the missing regions marked by the mask with the spatiotemporal mean of the current batch of observation data to obtain the conditional interpolation data. Based on the variance scheduling table of the denoising diffusion probability model, Gaussian noise corresponding to the diffusion time step is added to the normalized observation data to obtain the global denoising state. Only the denoising state of the target missing region is extracted using a target missing region mask. The expression for the global denoising state is: , in, This represents the global noise-adding state at step t. To normalize the observation data, This is the cumulative variance coefficient. It is standard Gaussian noise.
[0008] Furthermore, the injected diffusion step time embedding information includes rearranging and flattening the dimensions of the dual-channel input tensor, and inputting the flattened two-dimensional spatial sequence into the projection layer to obtain the initial hidden features; Based on the initial hidden features, the scalar diffusion time step is mapped into a high-dimensional frequency vector through sinusoidal position encoding, and then mapped through a multilayer perceptron containing a nonlinear activation function to generate the diffusion step embedding vector. The diffusion step embedding vector is incorporated into the initial hidden features through a broadcast addition mechanism to obtain hidden features injected with diffusion step temporal embedding information.
[0009] Furthermore, the prediction yields a denoised data field, including: The hidden features are used to generate query matrix, key matrix and value matrix along the time dimension. After applying nonlinear kernel function mapping to the query matrix and key matrix, attention feature map is calculated through linear attention mechanism to extract global temporal dependencies. Features containing temporal information are restored to a spatial grid shape and input into a cascaded two-dimensional convolutional module to extract local spatial features. The convolutional layers of the two-dimensional convolutional module adopt a copy-fill strategy to maintain the continuity of the ocean physical boundary. The attention feature map and the spatial local features are fused by residual connection, and then the dimensionality is reduced to a single channel by a gated output head to output a denoised data field.
[0010] Furthermore, the end-to-end training of the spatiotemporal coding backbone network based on the composite physical constraint loss function includes: Calculate the mask reconstruction loss between the predicted denoised data field and the real data field in the target missing region; After the network training warm-up period ends, delayed activation is performed and the first-order difference gradient error between the predicted denoised data field and the real data field in the latitude and longitude directions is calculated to obtain the spatial gradient consistency loss. Calculate the total variational regularization of the predicted denoised data field; The mask reconstruction loss, spatial gradient consistency loss, and total variational regularization are weighted and summed according to preset weights to obtain a composite physical constraint loss function, which is used to perform end-to-end training.
[0011] Furthermore, the expression for the spatial gradient consistency loss is: , in, For spatial gradient consistency loss, For denoising data fields, To normalize the real data field, For the first-order difference gradient operator in the latitudinal direction, For the first-order difference gradient operator in the longitude direction, For the target missing region mask, For element-wise multiplication, is the square of the L2 norm.
[0012] Furthermore, the initialization and execution of inverse diffusion iterative denoising includes initializing multiple independent Gaussian noise samples as the current noisy state, cyclically executing inverse updates from the maximum diffusion time step to the minimum diffusion time step. In each step, the observation-preserved region conditions are concatenated with the current noisy state to form a dual-channel input. The spatiotemporal coding backbone network predicts the denoised data field for the current time step, and based on the denoised data field combined with the current time step state and controlled noise, an inverse Markov state transition is performed to obtain the updated state of the previous time step. The expression for the inverse Markov state transition is: , in, For the update state at step t-1, Let t be the current noise-adding state at step t. The denoised data field predicted by the spatiotemporal coding backbone network Let be the noise variance at step t. Let be the standard deviation of the controlled noise at step t. Let be the cumulative variance coefficient at step t-1.
[0013] Furthermore, the final ocean data interpolation field fused through multi-sample parallel sampling includes performing an inverse normalization operation on the denoised data field generated by inverse diffusion iterative denoising to restore it to its original physical dimensions; performing extreme value truncation on the inverse normalized data based on historical extreme upper and lower bounds to remove outliers without physical significance; performing multiple parallel independent samplings on the same input; using the weighted mean of the multiple samplings as the final ocean data interpolation field; and providing a dynamic uncertainty assessment based on the sample variance of the multiple samplings. The expression for the inverse normalization is: , in, The interpolated data after inverse normalization For denoising data fields, This represents the historical extreme upper bound of marine environmental spatiotemporal data. This represents the historical extreme lower bound for marine environmental spatiotemporal data.
[0014] Secondly, a large-area ocean data interpolation system based on a spatiotemporal diffusion model includes: The data preprocessing module is used to acquire spatiotemporal data of the marine environment and dynamically generate multiple cloud-shaped conditional masks based on the real meteorological obstruction distribution characteristics. The dual-channel construction module is used to perform conditional mean filling and forward noise addition to the target region to obtain conditional interpolation data and target noise-added state, and then splice them along the channel dimension to construct a dual-channel input tensor. The spatiotemporal coding network module is used to input the dual-channel input tensor into the spatiotemporal coding backbone network and inject the diffusion step time embedding information to predict the denoised data field. The model training module is used to construct a composite physical constraint loss function consisting of mask reconstruction loss, spatial gradient consistency loss and total variational regularization weighting, and to perform end-to-end training of the spatiotemporal coding network module based on the composite physical constraint loss function; The interpolation inference module is used to initialize and perform inverse diffusion iterative denoising based on the trained network weights. It then performs inverse normalization and physical boundary truncation on the denoised interpolated data in sequence, and outputs the final ocean data interpolation field through multi-sample parallel sampling and fusion.
[0015] In summary, the present invention has the following beneficial technical effects: 1. This invention dynamically generates multiple cloud-shaped conditional masks based on the distribution characteristics of real meteorological obstruction. It utilizes a mask construction algorithm that combines two-dimensional Gaussian distribution block maxima fusion with weighted superposition of low-resolution random noise. This enables the model to fully learn the data distribution boundary characteristics under irregular and large-area continuous missing conditions during the training phase, achieving robust adaptive interpolation for real satellite remote sensing cloud-shaped obstruction environments.
[0016] 2. This invention constructs a spatiotemporal coding backbone network that integrates temporal linear attention and cascaded spatial convolution using a copy-filling strategy. It extracts global temporal dependencies using a linear attention mechanism based on nonlinear kernel function mapping and eliminates edge artifacts in ocean boundary data using a copy-filling strategy. This achieves efficient joint modeling of long-term high-resolution three-dimensional spatiotemporal tensors with significantly reduced GPU memory usage.
[0017] 3. This invention constructs a composite physical constraint loss function consisting of mask reconstruction loss, spatial gradient consistency loss of delayed activation after network training warm-up period, and total variational regularization weighting. This function forces the predicted denoised data field to maintain consistency with the first-order difference physical gradient in the latitude and longitude directions of the real data field and suppresses high-frequency isolated noise. This achieves a natural and smooth physical transition between the interpolated region and the known observation region, effectively eliminates the boundary splicing traces of large-area interpolated regions, and ensures the consistency of the reconstructed marine environmental field in terms of fluid dynamics and thermodynamics.
[0018] 4. This invention achieves high-fidelity and physically reasonable continuous marine dynamic environment field reconstruction under extreme missing conditions by sequentially performing inverse normalization, physical boundary truncation based on historical extreme upper and lower bounds, and multi-sample parallel sampling fusion after inverse diffusion iterative denoising. It also eliminates outliers without physical meaning by using extreme value hard constraints and evaluates the weighted mean and sample variance of multiple independent samples. At the same time, it provides a reliable quantitative reference for dynamic uncertainty, effectively supporting marine environmental risk assessment and operational decision-making applications. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the overall process of a large-area ocean data interpolation method based on a spatiotemporal diffusion model according to an embodiment of the present invention.
[0020] Figure 2 This is a schematic diagram of the overall architecture of the marine data interpolation method based on the spatiotemporal diffusion model according to an embodiment of the present invention.
[0021] Figure 3 This is a schematic diagram of the dynamic construction of observation data condition mask and dual-channel input construction in an embodiment of the present invention. Detailed Implementation
[0022] The present invention will be further described in detail below with reference to the accompanying drawings.
[0023] Example 1 Reference Figure 1 This embodiment of a method for interpolating large-area ocean data based on a spatiotemporal diffusion model includes: S1. Acquire marine environmental spatiotemporal data and dynamically generate multiple cloud-shaped conditional masks based on the real meteorological obstruction distribution characteristics. S2. Perform conditional mean filling and forward noise addition on the spatiotemporal data according to the conditional mask to obtain the conditional interpolation data and the target noise-added state, and then splice them along the channel dimension to construct a dual-channel input tensor. S3. Input the dual-channel input tensor into the spatiotemporal coding backbone network and inject the diffusion step time embedding information to predict the denoised data field. S4. Construct a composite physical constraint loss function consisting of mask reconstruction loss, spatial gradient consistency loss, and total variational regularization weighting, and perform end-to-end training of the spatiotemporal coding backbone network based on the composite physical constraint loss function. S5. Based on the trained network weights, initialize and perform inverse diffusion iterative denoising. Then, perform inverse normalization and physical boundary truncation on the denoised interpolated data in sequence. Finally, the ocean data interpolation field is obtained by multi-sample parallel sampling and fusion.
[0024] Specifically, a large-area ocean data interpolation method based on a spatiotemporal diffusion model includes the following: like Figure 1 , Figure 2 As shown, S1 first involves the dynamic construction of the spatiotemporal sequence dataset and conditional mask. Specifically, the marine environmental variable data to be interpolated, including sea surface temperature (SST) or significant wave height (SWH), is obtained from the ECMWF ERA5 reanalysis data. The original observation data is then uniformly resampled into a regular gridded spatiotemporal tensor using spatiotemporal alignment techniques. Where B is the batch size, C is the number of variable channels (C=1 in this embodiment), T is the time step, H and W are the number of spatial grids in the latitudinal and longitudinal directions, respectively, and are used to stabilize the training of subsequent diffusion models based on the historical extreme lower bound of this ocean physical quantity. With the extreme upper limit of history A linear normalization operation is performed on the spatiotemporal tensor X, mapping it to the interval [-1,1], to obtain the normalized observation sequence. The normalization process satisfies the following equation: , in, This is the normalized observation sequence obtained after linear normalization. For the original marine environment spatiotemporal tensor, and These represent the minimum and maximum values of the valid observation samples in the training set at the corresponding spatial grid points, respectively. This is a scaling factor, in this embodiment This is used to linearly amplify linearly normalized data from the [0,1] interval to the [0,2] interval. This is the offset coefficient, in this embodiment This is used to shift the scaled data from the [0,2] interval to the symmetric interval [−1,1] to adapt to the centralization requirement of the diffusion model for the distribution of input data.
[0025] Subsequently, to adaptively simulate the irregular, large-area cloud-like obstructions caused by typhoons or cyclones in real satellite remote sensing, a conditional mask corresponding to the normalized observation data is dynamically generated. First, it is randomly generated on the spatiotemporal grid. There are three two-dimensional Gaussian distribution blocks. Let the center coordinates of the k-th Gaussian block be... The meridional scale parameter is The latitudinal scale parameter is The spatial response of the Gaussian block at grid coordinates (x, y) is calculated using the following formula: , in, Let be the spatial response value of the k-th two-dimensional Gaussian distribution block at the spatiotemporal grid coordinates (x, y), with a value ranging from (0, 1]. A larger value indicates a higher probability that the location belongs to the main cloud cluster. k is the index number of the Gaussian distribution block, and... , Let k be the grid position of the center of the k-th Gaussian distribution block in the longitude direction. Let be the grid position of the center of the k-th Gaussian block in the latitudinal direction. Let be the standard deviation of the k-th Gaussian block in the longitude direction. is the standard deviation of the k-th Gaussian block in the latitudinal direction, used to control the diffusion range of the cloud in the latitudinal direction.
[0026] The main cloud cluster is formed by fusing the maxima of the spatial responses of all Gaussian blocks. This leads to the generation of low-resolution uniform noise. After upsampling to the target resolution (H, W) using bilinear interpolation, it is then compared with the main cloud cluster according to a preset weight. Weighted superposition is performed to obtain the fused mask field. The weighted superposition process satisfies the following equation: , in, The fused mask field is obtained after weighted superposition. This is a preset weighting coefficient for the main cloud cluster, with a value range of (0,1), used to control the contribution ratio of the main cloud cluster in the fused mask field. The main cloud cluster is formed by the fusion of the spatial responses of multiple two-dimensional Gaussian distribution blocks. This is a bilinear interpolation upsampling operation. It is a low-resolution uniform noise, randomly generated in a low spatial dimension. After upsampling, it presents a smooth and slowly changing spatial distribution, which is used to apply natural nonlinear perturbation to the edge region of the main cloud.
[0027] Finally, given a preset missing rate proportion r, this embodiment sets it to... Calculate the fusion mask field quantile threshold Then, Boolean truncation is performed using an indicator function to generate the final binarized conditional mask. The binarization process satisfies the following equation: , in For indicator functions, This represents the area of valid observation conditions that are preserved, while This represents the missing target area to be interpolated, thus completing the dynamic construction of multiple cloud-shaped conditional masks based on the actual weather shading distribution characteristics.
[0028] like Figure 3 As shown, S2, constructing conditional interpolation data as the first channel input: the normalized observation data... With the reserved region mask In combination, the actual observations are used directly in the masked areas, while the spatiotemporal mean of the current batch of observations is used in the areas where the mask markings are missing. Perform initial condition filling to obtain conditional interpolation data. It satisfies the following formula: , in, To conditionally interpolate data, For binary condition mask, To normalize the observation data, This represents the spatiotemporal mean of the current batch of observation data within the effective observation area. This is an element-wise multiplication operation. This operation serves as a mask for the target missing region. By preserving the true physical values of the known observed regions and providing stable statistical prior support for the missing regions, it effectively avoids numerical oscillations in subsequent network inputs due to large areas of blank space.
[0029] Subsequently, the noisy state of the target region is constructed as the input of the second channel: based on the principle of the Denoising Diffusion Probability Model (DDPM), a preset including... N Noise scheduling variance table for each diffusion time step And define intermediate conversion coefficients. and cumulative variance coefficient During the training phase, random sampling is performed at any diffusion time step t, and the normalized observation data is then processed. Add Gaussian noise The global noise-added state is obtained. The global noise-adding state satisfies the following equation: , in, This represents the global noise-adding state at step t. To normalize the observation data, This is the cumulative variance coefficient. Standard Gaussian noise and , The intermediate conversion coefficients in step i are and , Let be the noise variance at step i in the variance scheduling table, and t be the diffusion time step. Subsequently, through the target missing region mask The target noise state is obtained by extracting only the noise-added state of the missing target region. It satisfies the following formula: , in, Adding noise to the target region ensures that Gaussian noise is applied only to the region to be interpolated, thus preventing the known observation area from being contaminated by noise during the training phase.
[0030] Finally, the conditional interpolation data With the target noise state By concatenating along the channel dimension, a two-channel input tensor of shape (B,2,T,H,W) is constructed. Where B is the batch size, 2 is the number of channels after splicing, T is the time step, H and W are the number of grids in the latitude and longitude directions, respectively. The dual-channel input tensor retains the physical true value of the known observation area and provides the mean prior for the missing area through the first channel, and injects controlled Gaussian noise only into the target missing area through the second channel, thereby realizing the explicit feature alignment between the known observation conditions and the noisy state of the target area to be interpolated during the denoising training process.
[0031] S3, Dual-channel input tensor The initial shape is (B, 2, T, H, W), where B is the batch size, 2 is the number of channels, T is the time length, and H and W are the spatial height and width, respectively. First, dimensional rearrangement and spatial flattening operations are performed on the dual-channel input tensor to convert it into a shape. The sequence is a two-dimensional spatial sequence, where N = H × W is the total number of spatial nodes after flattening. This sequence is then input into a one-dimensional convolutional projection layer with a kernel size of 1, mapping the two input channels to a high-dimensional hidden feature space (e.g., 64-dimensional), thus obtaining the initial hidden features. , where D is the dimension of the hidden channel.
[0032] Meanwhile, to explicitly inject diffusion time step information into the network, for a scalar diffusion time step t, it is first mapped into a high-dimensional position encoding vector through sinusoidal frequency encoding, and then input into a multilayer perceptron containing two linear transform layers and a SiLU nonlinear activation function to generate a diffusion step embedding vector of dimension D. After the dimensionality of the diffusion step embedding vector is expanded, it is added element-wise to the initial hidden feature h through a broadcast mechanism to obtain the hidden feature with injected time information. It satisfies the following formula: , in, This is the hidden feature after injecting the diffusion step time embedding information. For the one-dimensional convolution mapping operation of the input projection layer, The diffusion step embedding vector is generated based on the scalar diffusion time step t through sinusoidal position encoding and mapping with a multilayer perceptron, where t is the diffusion time step.
[0033] Next, to extract dynamic evolution patterns along the time axis and overcome the bottleneck of long-term computation, the fused hidden features are reshaped into a (B×N,T,D) shape before being fed into a temporal linear attention module. This module generates the query vector Q, key vector K, and value vector V through linear transformations; to avoid standard self-attention... The complexity explodes when a nonlinear kernel function is applied to Q and K to map the complexity. Attention feature maps are calculated using a linear attention mechanism. It satisfies the following formula: , in, This is the attention feature map, where Q, K, and V are the query matrix, key matrix, and value matrix generated along the time dimension, respectively. It is a nonlinear kernel function. The linear attention mechanism uses an exponential linear unit activation function and first computes the key-value aggregation term. Combined with the query vector, the computational complexity in the time dimension is reduced from quadratic to linear O(T), and the attention output is reshaped back to the (B,T,D,N) shape.
[0034] Subsequently, the features containing temporal information are further reshaped into a spatial grid (B×T,D,H,W) and input into a spatial convolution module for local texture extraction. The spatial convolution module consists of two cascaded depth feature extraction blocks. Each block sequentially contains a 3×3 two-dimensional convolutional layer, a group normalization layer, and a SiLU nonlinear activation function. The two-dimensional convolutional layer employs a copy-padding strategy instead of traditional zero-padding to ensure data continuity at oceanic physical boundaries and effectively eliminate edge artifacts caused by boundary truncation. After two levels of spatial feature extraction, the output is a spatial feature map including spatial texture and local correlations. .
[0035] Finally, the time features are connected via residual joins. With the aforementioned spatial features By adding elements one by one, the fusion characteristics are obtained. The fused features are normalized and then flattened back into a (B×T,D,N) shape. This shape is then input into an intermediate projection layer to double the number of channels to 2D. The features are uniformly divided into gated and filtered branches along the channel dimensions. Sigmoid and Tanh activation functions are applied to each branch, and then element-wise Hadamard product is performed to obtain the gated features. It satisfies the following formula: , In the formula, As a gating feature, For the gated branch, For the filtering branch, For the element-wise multiplication Hadamard product operation, the gated features are input to the final output projection layer. The hidden channels are reduced to 1 dimension by a one-dimensional convolution with a kernel of 1, and redundant dimensions are removed. The final output is a single-channel denoised prediction field with shape (B,T,H,W). This completes the prediction of the denoised data field.
[0036] S4. Calculate the mask reconstruction loss. Constraints are applied only to the pixel-level deviation between the predicted denoised data field and the real data field within the missing target region to avoid interference from known observation areas on gradient updates and to focus on interpolation quality. The mask reconstruction loss satisfies the following formula: , In the formula, Loss due to mask reconstruction To normalize the real data field, For the predicted denoised data field, For binary conditional mask and This represents the area where the target is missing. ϵ To prevent numerical stability constants with a denominator of zero.
[0037] Secondly, after the network training warm-up period, the spatial gradient consistency loss is activated with a delay. By calculating the first-order difference gradient error between the predicted denoised data field and the normalized real data field in the latitudinal and longitude directions, the physical gradients of the two are forced to remain consistent, thereby eliminating numerical jumps and stitching traces at the boundary between the large-area interpolation region and the known observation region. The spatial gradient consistency loss satisfies the following equation: , in, For spatial gradient consistency loss, For denoising data fields, To normalize the real data field, For the first-order difference gradient operator in the latitudinal direction, For the first-order difference gradient operator in the longitude direction, For the target missing region mask, This is an element-wise multiplication operation. It is the square of the L2 norm.
[0038] Subsequently, the total variational regularization is calculated. By imposing a spatial smoothness constraint on the predicted denoised data field, the generation of isolated high-frequency noise points within the interpolation region is suppressed. The total variational regularization satisfies: , in, For total variational regularization For expectation operator, This is for logarithmic operations.
[0039] Finally, the mask reconstruction loss, the spatial gradient consistency loss, and the total variational regularization are weighted and summed according to preset weights to obtain the composite physical constraint loss function. The AdamW optimizer, combined with a cosine annealing learning rate scheduler, is then used to perform end-to-end training of the spatiotemporal coding backbone network using an automatic mixed precision strategy. The composite physical constraint loss function satisfies: , in, For composite physical constraint loss function, The preset weight hyperparameters for spatial gradient consistency loss are... The preset weight hyperparameters for total variational regularization are updated primarily by the mask reconstruction loss in the early stages of network training. After a preset number of warm-up training rounds, the spatial gradient consistency loss is automatically activated and participates in backpropagation, thereby gradually strengthening the physical gradient consistency constraint after the model has a preliminary reconstruction capability.
[0040] S5. After the spatiotemporal coding backbone network completes end-to-end training using a composite physical constraint loss function, it enters the actual business inference stage. The optimal network weights are loaded, and inverse diffusion iterative denoising and multi-sample physical truncation sampling are performed. First, n independent Gaussian noise samples are initialized. As the current noisy state, the incomplete observation field to be interpolated and its corresponding preserved region mask are loaded; then, a reverse update is performed iteratively from the maximum diffusion time step T to the minimum diffusion time step 0. In each step t, the observation preserved region condition is concatenated with the current noisy state to form a dual-channel input, which is then used by the spatiotemporal coding backbone network to predict the denoised data field at the current time step. Based on the denoised data field, combined with the current time step state and controlled noise, a reverse Markov state transition is performed to obtain the updated state of the previous time step. The inverse Markov state transition expression is: , in, For the update state at step t-1, Let t be the current noise-adding state at step t. The denoised data field predicted by the spatiotemporal coding backbone network Let be the noise variance at step t. This is the cumulative variance coefficient. It is standard Gaussian noise, and when t=0 Through the stepwise iteration of this inverse Markov chain, pure Gaussian noise is restored into a structured denoised data field.
[0041] When the reverse process is completed, the generated denoised data field is obtained. Then, the denormalization and physical boundary truncation operations are performed sequentially. The denormalization is used to restore the normalized dimensions to the original physical dimensions, and its expression is: , in, The interpolated data after inverse normalization The denoised data field is generated through inverse diffusion iterative denoising. This represents the historical extreme upper bound of marine environmental spatiotemporal data. This represents the historical extreme lower bound of the marine environmental spatiotemporal data. Subsequently, an extreme value truncation operation is performed on the inverse normalized data based on these historical extreme upper and lower bounds, i.e. This process forcibly removes all outliers that are not physically significant and exceed the objective physical boundaries, ensuring the geoscientific rationality of the interpolation results.
[0042] Finally, to improve interpolation accuracy and provide uncertainty quantification support, the same input is processed... The process involves multiple parallel independent samplings, each of which independently initializes Gaussian noise and fully executes the aforementioned inverse diffusion iterative denoising, inverse normalization, and physical boundary truncation procedures. The weighted average of the multiple sampling results is used as the final ocean data interpolation field, while the sample variance of multiple samplings is calculated to provide a dynamic uncertainty assessment.
[0043] Example 2 The difference between this embodiment and Embodiment 1 is that this embodiment provides a large-area ocean data interpolation method based on a spatiotemporal diffusion model; To verify the effectiveness, functional contribution of each module, and cross-regional generalization ability of the large-area ocean data interpolation method based on the spatiotemporal diffusion model (hereinafter referred to as PC-STDM model) described in this invention, this embodiment conducts simulation experiments on a public ocean dataset and makes a quantitative comparison with existing mainstream interpolation methods.
[0044] This embodiment uses the OSDDS Ocean Dynamic Environment Sea Surface Temperature (SST) dataset as the experimental data source, with the sea surface temperature unit being degrees Celsius (°C). The original data was uniformly resampled into a regular grid with a spatial resolution of 50×50 grid points. The input time window length was 14 days, and the output length was 1 day. The dataset was divided chronologically into the first 80% as the training set and the last 20% as the test set. To simulate large-area continuous missing data caused by cloud cover in real satellite remote sensing, an artificially generated spatial continuous cloud-like missing mask was used in the testing phase, with missing rates set to 8%, 25%, 46%, and 68%, respectively, to verify the robustness of the model under different extreme missing conditions.
[0045] The network training parameters of the PC-STDM model are configured as follows: 3 input channels, 64 hidden channels, 100 diffusion steps, and Quadratic scheduling with beta_start of 0.0001 and beta_end of 0.2; the batch size is 8, and the initial learning rate is 1×10⁻⁶. -4 The optimizer used was AdamW, along with a cosine annealing learning rate scheduler. The network training warm-up epoch was set to 10. After the warm-up epoch, the spatial gradient consistency loss was activated with a weight coefficient λ_grad of 0.15 and a total variational regularization weight coefficient λ_tv of 0.0005. The eval mask seed was fixed at 4321 to ensure the reproducibility of the experiment.
[0046] Mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE), and coefficient of determination (R²) are used as quantitative evaluation indicators for interpolation accuracy. Lower values for MAE, MSE, and RMSE indicate smaller deviations between the interpolation results and actual observations, while higher R² values indicate a stronger ability of the model to explain data variation.
[0047] Under the extreme condition of a high missing rate of 68%, the PC-STDM model of this embodiment was compared with existing mainstream methods. The comparison methods included traditional numerical interpolation methods DINEOF and Lin_ITP, and deep learning-based methods CSDI, Inpainter, and ImputeFormer. The evaluation metrics of each model on the same test set are shown in the table below: Table 1 Evaluation Index Results
[0048] Experimental results show that, at a high deletion rate of 68%, the PC-STDM model described in this invention has a MAE of 0.2621, an MSE of 0.1536, an RMSE of 0.3919, and an R... 2 The MAE is 0.9917, outperforming all comparison methods in all metrics. Specifically, compared to the suboptimal ImputeFormer model (MAE 0.3145), the MAE of this invention's model is reduced by 16.7%; compared to the traditional methods DINEOF (MAE 0.6341) and Lin_ITP (MAE 0.7568), the MAE of this invention's model is reduced by 58.7% and 65.4%, respectively. These results fully verify that this invention, when faced with large-area continuous cloud-like defects, can reconstruct a high-fidelity, physically consistent marine environmental field through the synergistic effect of dynamic cloud-like mask training, spatiotemporal linear attention feature extraction, and a composite physical constraint loss function.
[0049] To quantitatively verify the functional contribution of each key technical module of this invention, an ablation experiment was conducted on the PC-STDM model under a 68% missing value condition. The degree of performance degradation was observed by removing core modules one by one. The ablation experiment setup included: removal... The ablation mechanism employed direct prediction (without x0-prediction), removal of the 3-channel input construction, removal of the temporal prior, and removal of the spatial regularization constraint. The ablation experimental results are shown in the table below: Table 2 shows the performance degradation data observed after removing each core module.
[0050] The ablation experiment data shows that after removing the x0 direct prediction mechanism, the model's MAE rises sharply to 1.2540, exhibiting the most significant performance degradation. This indicates that directly predicting the noiseless physical field is the core mechanism for ensuring interpolation accuracy. After removing the three-channel input or the time-linear prior, the MAE increases to 0.4098 and 0.4118, respectively, indicating that the time-continuous prior and the decoupled channel input design play an important role in maintaining the consistency of the spatiotemporal structure. After removing spatial regularization, the MAE increases to 0.3089, indicating that the spatial gradient consistency loss and total variational regularization have auxiliary optimization effects on eliminating boundary stitching traces and maintaining local physical continuity. The above ablation experiments fully demonstrate that the modules of this invention are not redundant designs, but rather necessary technical components that work together to form highly robust interpolation performance.
[0051] Example 3 This embodiment provides a large-area ocean data interpolation system based on a spatiotemporal diffusion model, including: The data preprocessing module is used to acquire spatiotemporal data of the marine environment and dynamically generate multiple cloud-shaped conditional masks based on the real meteorological obstruction distribution characteristics. The dual-channel construction module is used to perform conditional mean filling and forward noise addition to the target region to obtain conditional interpolation data and target noise-added state, and then splice them along the channel dimension to construct a dual-channel input tensor. The spatiotemporal coding network module is used to input the dual-channel input tensor into the spatiotemporal coding backbone network and inject the diffusion step time embedding information to predict the denoised data field. The model training module is used to construct a composite physical constraint loss function consisting of mask reconstruction loss, spatial gradient consistency loss and total variational regularization weighting, and to perform end-to-end training of the spatiotemporal coding network module based on the composite physical constraint loss function; The interpolation inference module is used to initialize and perform inverse diffusion iterative denoising based on the trained network weights. It then performs inverse normalization and physical boundary truncation on the denoised interpolated data in sequence, and outputs the final ocean data interpolation field through multi-sample parallel sampling and fusion.
[0052] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A method for interpolating large-area ocean data based on a spatiotemporal diffusion model, characterized in that, include: Acquire spatiotemporal data of the marine environment and dynamically generate multiple cloud-shaped conditional masks based on the real meteorological obstruction distribution characteristics; Based on the conditional mask, conditional mean filling and forward noise addition to the target region are performed on the spatiotemporal data respectively to obtain the conditional interpolation data and the target noise-added state, and then spliced along the channel dimension to construct a dual-channel input tensor; The dual-channel input tensor is input into the spatiotemporal coding backbone network, and the diffusion step time embedding information is injected to predict the denoised data field. A composite physical constraint loss function consisting of mask reconstruction loss, spatial gradient consistency loss, and total variational regularization weighting is constructed, and the spatiotemporal coding backbone network is trained end-to-end based on the composite physical constraint loss function. Based on the trained network weights, inverse diffusion iterative denoising is initialized and executed. The denoised interpolated data is then subjected to inverse normalization and physical boundary truncation in sequence. Finally, the ocean data interpolation field is obtained through multi-sample parallel sampling and fusion.
2. The method for interpolating large-area ocean data based on a spatiotemporal diffusion model according to claim 1, characterized in that, The method of dynamically generating multiple cloud-shaped conditional masks based on real meteorological obstruction distribution characteristics includes randomly generating multiple two-dimensional Gaussian distribution blocks on a spatiotemporal grid, and fusing the maximum values of the spatial responses of each Gaussian block to form the main cloud cluster. Low-resolution random noise is generated and upsampled to the target resolution by bilinear interpolation. It is then superimposed with the main cloud cluster according to a preset weight to obtain the fused mask field. The quantile threshold of the fused mask field is calculated based on the preset missing rate, and a binary conditional mask is generated by Boolean truncation using an indicator function. The formula for calculating the Gaussian block spatial response is as follows: , in, Let be the spatial response value of the k-th two-dimensional Gaussian distribution block at the spatiotemporal grid coordinates (x, y), where k is the index number of the Gaussian distribution block. Let k be the grid position of the center of the k-th Gaussian distribution block in the longitude direction. Let be the grid position of the center of the k-th Gaussian block in the latitudinal direction. Let be the standard deviation of the k-th Gaussian block in the longitude direction. Let be the standard deviation of the k-th Gaussian block in the latitudinal direction.
3. The method for interpolating large-area ocean data based on a spatiotemporal diffusion model according to claim 1, characterized in that, The process of obtaining conditional interpolation data and target noise state includes combining normalized observation data with a preserved region mask, using real observation values in the mask-preserved region, and filling the missing regions marked by the mask with the spatiotemporal mean of the current batch of observation data to obtain conditional interpolation data. Based on the variance scheduling table of the denoising diffusion probability model, Gaussian noise corresponding to the diffusion time step is added to the normalized observation data to obtain the global denoising state. Only the denoising state of the target missing region is extracted using a target missing region mask. The expression for the global denoising state is: , in, This represents the global noise-adding state at step t. To normalize the observation data, This is the cumulative variance coefficient. It is standard Gaussian noise.
4. The method for interpolating large-area ocean data based on a spatiotemporal diffusion model according to claim 1, characterized in that, The injected diffusion step time embedding information includes rearranging and flattening the dimensions of the dual-channel input tensor, and inputting the flattened two-dimensional spatial sequence into the projection layer to obtain the initial hidden features; Based on the initial hidden features, the scalar diffusion time step is mapped into a high-dimensional frequency vector through sinusoidal position encoding, and then mapped through a multilayer perceptron containing a nonlinear activation function to generate the diffusion step embedding vector. The diffusion step embedding vector is incorporated into the initial hidden features through a broadcast addition mechanism to obtain hidden features injected with diffusion step temporal embedding information.
5. A method for interpolating large-area ocean data based on a spatiotemporal diffusion model according to claim 4, characterized in that, The prediction yields a denoised data field, including: The hidden features are used to generate query matrix, key matrix and value matrix along the time dimension. After applying nonlinear kernel function mapping to the query matrix and key matrix, attention feature map is calculated through linear attention mechanism to extract global temporal dependencies. Features containing temporal information are restored to a spatial grid shape and input into a cascaded two-dimensional convolutional module to extract local spatial features. The convolutional layers of the two-dimensional convolutional module adopt a copy-fill strategy to maintain the continuity of the ocean physical boundary. The attention feature map and the spatial local features are fused by residual connection, and then the dimensionality is reduced to a single channel by a gated output head to output a denoised data field.
6. The method for interpolating large-area ocean data based on a spatiotemporal diffusion model according to claim 1, characterized in that, The end-to-end training of the spatiotemporal coding backbone network based on the composite physical constraint loss function includes: Calculate the mask reconstruction loss between the predicted denoised data field and the real data field in the target missing region; After the network training warm-up period ends, delayed activation is performed and the first-order difference gradient error between the predicted denoised data field and the real data field in the latitude and longitude directions is calculated to obtain the spatial gradient consistency loss. Calculate the total variational regularization of the predicted denoised data field; The mask reconstruction loss, spatial gradient consistency loss, and total variational regularization are weighted and summed according to preset weights to obtain a composite physical constraint loss function, which is used to perform end-to-end training.
7. A method for interpolating large-area ocean data based on a spatiotemporal diffusion model according to claim 6, characterized in that, The expression for the spatial gradient consistency loss is: , in, For spatial gradient consistency loss, For denoising data fields, To normalize the real data field, For the first-order difference gradient operator in the latitudinal direction, For the first-order difference gradient operator in the longitude direction, For the target missing region mask, This is an element-wise multiplication operation. It is the square of the L2 norm.
8. A method for interpolating large-area ocean data based on a spatiotemporal diffusion model according to claim 1, characterized in that, The initialization and execution of inverse diffusion iterative denoising includes initializing multiple independent Gaussian noise samples as the current noisy state, cyclically executing inverse updates from the maximum diffusion time step to the minimum diffusion time step. In each step, the observation-preserved region conditions are concatenated with the current noisy state to form a dual-channel input. The spatiotemporal coding backbone network predicts the denoised data field for the current time step, and based on the denoised data field combined with the current time step state and controlled noise, an inverse Markov state transition is performed to obtain the updated state of the previous time step. The expression for the inverse Markov state transition is: , in, For the update state at step t-1, Let t be the current noise-adding state at step t. The denoised data field predicted by the spatiotemporal coding backbone network Let be the noise variance at step t. Let be the standard deviation of the controlled noise at step t. Let be the cumulative variance coefficient at step t-1.
9. A method for interpolating large-area ocean data based on a spatiotemporal diffusion model according to claim 8, characterized in that, The final ocean data interpolation field obtained through multi-sample parallel sampling and fusion includes performing an inverse normalization operation on the denoised data field generated by inverse diffusion iterative denoising to restore it to its original physical dimensions; performing extreme value truncation on the inverse normalized data based on historical extreme upper and lower bounds to remove outliers without physical significance; performing multiple parallel independent samplings on the same input; using the weighted mean of the multiple samplings as the final ocean data interpolation field; and providing a dynamic uncertainty assessment based on the sample variance of the multiple samplings. The expression for the inverse normalization is: , in, The interpolated data after inverse normalization For denoising data fields, This represents the historical extreme upper bound of marine environmental spatiotemporal data. This represents the historical extreme lower bound for marine environmental spatiotemporal data.
10. A large-area ocean data interpolation system based on a spatiotemporal diffusion model, comprising the method described in claim 1, characterized in that, include: The data preprocessing module is used to acquire spatiotemporal data of the marine environment and dynamically generate multiple cloud-shaped conditional masks based on the real meteorological obstruction distribution characteristics. The dual-channel construction module is used to perform conditional mean filling and forward noise addition to the target region to obtain conditional interpolation data and target noise-added state, and then splice them along the channel dimension to construct a dual-channel input tensor. The spatiotemporal coding network module is used to input the dual-channel input tensor into the spatiotemporal coding backbone network and inject the diffusion step time embedding information to predict the denoised data field. The model training module is used to construct a composite physical constraint loss function consisting of mask reconstruction loss, spatial gradient consistency loss and total variational regularization weighting, and to perform end-to-end training of the spatiotemporal coding network module based on the composite physical constraint loss function; The interpolation inference module is used to initialize and perform inverse diffusion iterative denoising based on the trained network weights. It then performs inverse normalization and physical boundary truncation on the denoised interpolated data in sequence, and outputs the final ocean data interpolation field through multi-sample parallel sampling and fusion.