Method for spatial downscaling of meteorological element fields based on retrieval and diffusion generation model

By employing a retrieval and diffusion-based generative model, combined with a meteorological self-supervised encoder and physical constraints, the problem of insufficient utilization of historical high-resolution prior information in existing technologies is solved. This enables refined reconstruction and improved stability of high-resolution meteorological element fields, making it suitable for various meteorological application scenarios.

CN122132785BActive Publication Date: 2026-07-14NAT UNIV OF DEFENSE TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NAT UNIV OF DEFENSE TECH
Filing Date
2026-05-06
Publication Date
2026-07-14

Smart Images

  • Figure CN122132785B_ABST
    Figure CN122132785B_ABST
Patent Text Reader

Abstract

The application relates to a meteorological element field spatial downscaling method based on a retrieval and diffusion generation model, which is used for generating a corresponding high-resolution meteorological element field according to a low-resolution meteorological element field sequence sample. By constructing a retrieval mechanism, a high-resolution reference meteorological element field related to the current input sample is obtained from a historical high-resolution meteorological element field library, and a diffusion generation process is combined to gradually reconstruct the target high-resolution meteorological element field, and a physical consistency constraint is introduced to realize meteorological element field spatial downscaling considering the generation quality and physical rationality, and the fine degree, stability and physical rationality of the spatial downscaling result are improved. The method is suitable for various meteorological element fields, multi-source meteorological data and various complex regional scenes, has strong scalability and application value, and can be used for fine weather forecasting, complex terrain meteorological analysis, disastrous weather monitoring and early warning, aviation meteorological guarantee and related intelligent meteorological business scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of meteorological information processing and artificial intelligence, and in particular to a method for spatial downscaling of meteorological element fields based on a retrieval and diffusion generation model. Background Technology

[0002] Spatial downscaling of meteorological element fields refers to reconstructing or inferring the distribution of meteorological element fields at a higher spatial resolution based on meteorological data with lower spatial resolution, in order to obtain more detailed information on meteorological elements such as temperature, air pressure, wind field, humidity, and precipitation. This technology can provide higher-resolution data support for applications such as refined weather forecasting, meteorological analysis of complex terrain areas, monitoring and early warning of severe weather, aviation meteorological support, energy dispatching, and ecological environment assessment, and therefore has significant theoretical and practical value.

[0003] Existing methods for spatial downscaling of meteorological elements mainly include dynamic downscaling methods, statistical downscaling methods, and the rapidly developing deep learning downscaling methods. Dynamic downscaling methods typically rely on numerical weather prediction models and nested grid simulations, explicitly introducing topography, underlying surface, and physical processes to improve the resolution of local-scale meteorological fields. While these methods offer strong physical interpretability, they often suffer from high computational costs, long runtimes, and complex parameter configurations, making it difficult to balance high timeliness with the demands of large-scale operational applications. Statistical downscaling methods typically establish empirical mapping relationships between large-scale meteorological factors and local-scale meteorological variables, converting low-resolution meteorological information to high-resolution meteorological information. These methods are relatively simple to implement and computationally efficient, but they often heavily rely on sample distribution and prior assumptions. In complex terrain, drastic weather changes, and multivariate coupled scenarios, they are prone to insufficient local detail recovery, limited ability to characterize extreme values, and unstable generalization performance.

[0004] With the development of deep learning technology, meteorological downscaling methods based on convolutional neural networks, generative adversarial networks, Transformers, and diffusion models have gradually become a research hotspot. These methods can learn the complex nonlinear mapping relationship between low-resolution and high-resolution meteorological element fields through data-driven approaches, demonstrating strong potential in detail reconstruction and pattern representation. In particular, diffusion-generative models, due to their advantages in complex distribution modeling, fine-grained texture restoration, and generation stability, have been gradually applied to tasks such as image reconstruction, super-resolution generation, and scientific computing, providing a new technical path for spatial downscaling of meteorological element fields. However, existing deep learning methods, especially diffusion-generative meteorological downscaling methods, still have the following shortcomings: First, existing methods typically rely on a single input sample to establish a low-resolution to high-resolution mapping, failing to fully utilize the similar weather patterns, spatial structures, and typical local distribution patterns contained in historical high-resolution samples, thus neglecting to fully leverage the auxiliary value of historical prior information. When the input low-resolution meteorological element field itself has limited information or is severely lacking in local details, relying solely on a single sample for generation can easily lead to insufficient texture, blurred structure, or inaccurate local feature recovery in the high-resolution results.

[0005] Second, existing methods often struggle to effectively balance global, large-scale background information with local, fine-scale structural information during the modeling process. Meteorological element fields exhibit significant multi-scale characteristics and spatiotemporal correlations, and different regions are also influenced by complex topography, underlying surface conditions, and the evolution of weather systems. If the model lacks a collaborative modeling mechanism for temporal evolution characteristics and spatial reference features, it is prone to problems such as discontinuities in local details, distortion of spatial structure, and insufficient fusion of cross-scale information in the generated results.

[0006] Third, although diffusion-generated models possess strong distributional representation capabilities, their generation results are still primarily governed by data-driven learning. Without necessary physical constraints, the generated high-resolution meteorological element fields may deviate from true atmospheric physics in terms of local gradient relationships, wind-pressure coupling relationships, conservation characteristics, or equilibrium relationships, thus affecting the scientific validity and operational usability of the results. Especially in meteorological applications, statistical similarity alone is usually insufficient to guarantee the physical reliability of the results.

[0007] Fourth, while some existing methods attempt to introduce external auxiliary information or prior fields, they generally suffer from problems such as crude utilization of auxiliary information, lack of targeted selection of reference samples, and insufficient integration of reference information with the current generation process. If a reference meteorological element field that is more spatiotemporally similar to the current low-resolution input cannot be retrieved from the historical high-resolution sample library, and the reference information cannot be injected into the generation process through an effective feature interaction mechanism, it will be difficult to fully leverage the role of the historical sample library in improving generation quality.

[0008] Therefore, it is urgent to propose a new spatial downscaling method for meteorological element fields to solve the problems of insufficient utilization of historical high-resolution priors, limited ability to restore local fine structure, insufficient fusion of multi-scale spatiotemporal information, and insufficient physical consistency of generated results in existing technologies, thereby improving the accuracy, stability and physical rationality of high-resolution meteorological element field reconstruction. Summary of the Invention

[0009] To address the problems of insufficient utilization of historical high-resolution prior information, limited ability to restore local fine structure, insufficient fusion of multi-scale spatiotemporal information, and insufficient physical consistency of generated results in the process of spatial downscaling of meteorological element fields, this invention proposes a spatial downscaling method for meteorological element fields based on a retrieval and diffusion generation model, which can improve the precision, stability, and physical rationality of spatial downscaling results.

[0010] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions: On the one hand, a spatial downscaling method for meteorological element fields based on a retrieval and diffusion generation model is provided, including the following steps: Obtain sample pairs; the sample pairs include: low-resolution meteorological field sequence samples, real high-resolution meteorological field samples, and high-resolution meteorological field retrieval library samples pre-constructed by a meteorological self-supervised encoder.

[0011] A retrieval-enhanced diffusion generation model was constructed, which includes a meteorological self-supervised encoder, a time-series encoder, a dual-stream noise prediction network, a physical consistency discriminator, and a differentiable physical projection operator.

[0012] During training, low-resolution meteorological field sequence samples are encoded using a temporal encoder, then retrieved from a search database, and a high-resolution reference field is generated based on the search results. Forward noise is added to the real high-resolution meteorological field samples to obtain a noisy meteorological field. The noisy meteorological field, low-resolution meteorological field sequence samples, and high-resolution reference field are input into a dual-stream noise prediction network, which outputs predicted noise. A physical consistency discriminator, in conjunction with a differentiable physical projection operator, performs physical consistency verification on the predicted noise and outputs a physical constraint signal. Based on the deviation between the predicted noise and the real noise, the reference consistency deviation, and the physical constraint signal, the total loss function is calculated, and all trainable parameters of the model are updated. Iterative training continues until the model converges.

[0013] The low-resolution meteorological field sequence to be downscaled is encoded by a time-series encoder, then searched in a retrieval database. A high-resolution reference field is constructed based on the retrieval results, and then iteratively denoised by a dual-stream noise prediction network to generate a high spatial resolution meteorological element field.

[0014] One of the above technical solutions has the following advantages and beneficial effects: The aforementioned method for spatial downscaling meteorological element fields based on a retrieval and diffusion generation model is used to generate corresponding high-resolution meteorological element fields from low-resolution meteorological element field sequence samples. By constructing a retrieval mechanism, a high-resolution reference meteorological element field related to the current input sample is obtained from a historical high-resolution meteorological element field database. The target high-resolution meteorological element field is then progressively reconstructed using a diffusion generation process. Simultaneously, physical consistency constraints are introduced to achieve spatial downscaling of the meteorological element field while balancing generation quality and physical rationality, thus improving the refinement, stability, and physical rationality of the spatial downscaling results. This method is applicable to various meteorological element fields, multi-source meteorological data, and various complex regional scenarios, possessing strong scalability and application value. It can be applied to refined weather forecasting, meteorological analysis of complex terrain, severe weather monitoring and early warning, aviation meteorological support, and related intelligent meteorological operational scenarios. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the conventional technology, the drawings used in the description of the embodiments or the conventional technology will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a flowchart illustrating a spatial downscaling method for meteorological element fields based on a retrieval and diffusion generation model in one embodiment. Figure 2 This is a flowchart illustrating the offline training and inference phases of a retrieval-enhanced diffusion generative model in one embodiment, wherein... Figure 2 Image (a) is a flowchart illustrating the offline training phase of the enhanced diffusion generative model. Figure 2 (b) is a flowchart illustrating the inference stage of the enhanced diffusion generation model. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.

[0019] It should be noted that, in this document, the reference to "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The presentation of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will understand that the embodiments described herein can be combined with other embodiments. The term "and / or" as used herein refers to any combination of one or more of the associated listed items, and all possible combinations, including such combinations.

[0020] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0021] In one embodiment, such as Figure 1 As shown, a spatial downscaling method for meteorological element fields based on a retrieval and diffusion generation model is provided, which may include the following processing steps 1 to 4: Step 1: Obtain sample pairs; the sample pairs include: low-resolution meteorological field sequence samples, real high-resolution meteorological field samples, and high-resolution meteorological field retrieval library samples pre-constructed by a meteorological self-supervised encoder.

[0022] Specifically, historical low-resolution meteorological field sequence samples are used as model input, and real high-resolution meteorological field samples are used as input. As training control labels, samples from a retrieval library of historical high-resolution meteorological fields were pre-constructed using a meteorological self-supervised encoder.

[0023] The samples in the historical high-resolution meteorological element field retrieval database are pre-constructed offline and can be dynamically expanded or updated based on new historical observation data or high-resolution analysis data.

[0024] Step 2: Construct a retrieval-enhanced diffusion generation model that includes a meteorological self-supervised encoder, a time-series encoder, a dual-stream noise prediction network, a physical consistency discriminator, and a differentiable physical projection operator.

[0025] Specifically, a pre-trained meteorological self-supervised encoder and a temporal encoder are constructed to extract multimodal features and generate retrieval vectors; then, a diffusion generation model backbone network is constructed to perform downscaling and denoising, namely a two-stream noise prediction network containing a first-stream feature encoder and a second-stream feature encoder. Finally, a physical consistency discriminator network is constructed to determine whether the generated results conform to atmospheric physical laws. D and differentiable physical projection operators .

[0026] The dual-stream noise prediction network employs a two-branch feature encoding structure. One branch models the joint conditional information of the current noisy target sample and the low-resolution conditional sample, while the other branch models the spatial texture and physical structure information of the high-resolution reference meteorological element field. The two branches interact through cross-attention, gating fusion, or feature stitching mechanisms. By enabling low-resolution conditional information and high-resolution reference information to be collaboratively modeled during the diffusion generation process, it is beneficial to take into account both large-scale background structure and local fine texture structure, thereby improving the accuracy and continuity of the spatial downscaling results of meteorological element fields.

[0027] The physical consistency discriminator is used to determine the consistency between the generated results and the real high-resolution meteorological element field from two levels: statistical distribution and physical structure.

[0028] The differentiable physics projection module is used to calculate derivative terms, gradient terms, divergence terms, or equilibrium terms related to physical laws within an automatic differentiation framework, so as to directly incorporate physical constraints into the model training process.

[0029] By setting up a physical consistency discriminator and a differentiable physical projection module, physical constraints are introduced into the spatial downscaling generation process. This not only improves the refinement of the results but also helps to ensure the physical rationality and credibility of the output high-resolution meteorological element field.

[0030] By using a retrieval-enhanced diffusion-generative model to progressively reconstruct high-resolution meteorological element fields, it is possible to better learn the high-dimensional distribution characteristics of complex meteorological element fields and enhance the model's capabilities in fine-grained structure recovery, complex pattern representation, and generation stability.

[0031] Step 3: During training, low-resolution meteorological field sequence samples are encoded using a time-series encoder, then retrieved from a search database. A high-resolution reference field is generated based on the search results. Forward noise is added to the real high-resolution meteorological field samples to obtain a noisy meteorological field. The noisy meteorological field, low-resolution meteorological field sequence samples, and high-resolution reference field are input into a dual-stream noise prediction network, which outputs predicted noise. A physical consistency discriminator and a differentiable physical projection operator are used to perform physical consistency verification on the predicted noise and output physical constraint signals. Based on the deviation between the predicted noise and the real noise, the reference consistency deviation, and the physical constraint signals, the total loss function is calculated and all trainable parameters of the model are updated. Iterative training continues until the model converges.

[0032] Specifically, before model training begins, the maximum number of diffusion steps for the retrieval-enhanced diffusion generation model is set. Temperature parameter constant used to control the smoothness of reference field fusion weights Atmospheric vertical adiabatic lapse constant used for physical projection of temperature lapse rate The learning rate and the batch size for model training.

[0033] For each input low-resolution meteorological field sequence sample, the temporal encoder uses it as input, forward propagates to output features and maps them to a query vector, calculates the similarity with samples in the retrieved database, and weights and fuses them to output a single high-resolution reference field. During the forward propagation of the diffusion process, samples are directed towards the true high-resolution meteorological field. Gradually add Gaussian noise to output the first Noisy meteorological field of the step Dual-stream noise prediction network Noisy meteorological field, low-resolution meteorological field sequence and high-resolution reference field As input, reference features are fused through a cross-attention mechanism, and the final decoded output predicts noise; physical consistency discriminator network Compare the generated intermediate state with the high-resolution reference field As input, the forward propagation outputs the physical consistency score; For the predicted noise and generation state obtained from forward propagation, calculate its comparison with the real high-resolution meteorological field sample. Loss function that compares added real noise with the actual physical state The loss function Loss prediction based on diffused noise Reference consistency loss And physical constraint losses such as geostrophic balance Weighted composition; based on the loss function Calculate the gradients of all trainable network parameters, and finally update the temporal encoder and dual-stream noise prediction network based on the gradients and learning rate. and physical consistency discriminator network All network parameters; iteratively train and retrieve the augmented diffusion generative model until the preset convergence condition is met or the maximum number of iterations is reached.

[0034] This application introduces a historical high-resolution meteorological element field retrieval mechanism, enabling the model to obtain effective reference information from historical samples similar to the current input sample. This compensates for the lack of prior information caused by relying solely on the current low-resolution input sample, thereby improving the ability to restore high-resolution details.

[0035] A flowchart illustrating the offline training phase of the retrieval enhancement diffusion generative model is shown below. Figure 2 As shown in (a).

[0036] Step 4: Encode the low-resolution meteorological field sequence to be downscaled using a time-series encoder, then search the retrieval database, construct a high-resolution reference field based on the retrieval results, and generate a high spatial resolution meteorological element field through iterative denoising using a dual-stream noise prediction network.

[0037] Specifically, the meteorological elements include temperature, air pressure, wind speed, wind direction, humidity, precipitation, or any combination thereof. A flowchart illustrating the inference stage of the enhanced diffusion generation model is shown below. Figure 2 As shown in (b).

[0038] The aforementioned spatial downscaling method for meteorological element fields based on a retrieval and diffusion generation model is used to generate corresponding high-resolution meteorological element fields from low-resolution meteorological element field sequence samples. By constructing a retrieval mechanism, a high-resolution reference meteorological element field related to the current input sample is obtained from a historical high-resolution meteorological element field database. The target high-resolution meteorological element field is then progressively reconstructed using a diffusion generation process. Simultaneously, physical consistency constraints are introduced to achieve spatial downscaling of the meteorological element field while balancing generation quality and physical rationality, thus improving the refinement, stability, and physical rationality of the spatial downscaling results. This method is applicable to various meteorological element fields, multi-source meteorological data, and various complex regional scenarios, possessing strong scalability and application value. It can be applied to refined weather forecasting, meteorological analysis of complex terrain, severe weather monitoring and early warning, aviation meteorological support, and related intelligent meteorological operational scenarios.

[0039] In one embodiment, the low-resolution meteorological field sequence sample in step 1 includes univariate or multivariate meteorological element field data from multiple consecutive time periods. The meteorological elements include temperature, air pressure, wind speed, wind direction, humidity, precipitation, or any combination thereof.

[0040] In one embodiment, the high-resolution meteorological field retrieval database sample in step 1 is pre-built offline and dynamically expanded or updated based on newly added historical observation data or high-resolution analysis data.

[0041] In one embodiment, the meteorological self-supervised encoder includes: three spatial convolutional network layers and one global average pooling layer; in the meteorological self-supervised encoder: the multi-channel features of the input high-resolution meteorological field are input into the first spatial convolutional network layer to output a first spatial feature map; the first spatial feature map is input into the second spatial convolutional network layer to output a second spatial feature map; the second spatial feature map is input into the third spatial convolutional network layer to output a third spatial feature map; the third spatial feature map is input into the global average pooling layer to obtain a retrieval embedding vector, and the retrieval embedding vector is used as a high-resolution meteorological field retrieval sample and stored in the high-resolution meteorological field retrieval database.

[0042] Specifically, pre-trained meteorological self-supervised encoders It includes: three spatial convolutional network layers and one global average pooling layer. The first spatial convolutional network layer incorporates the multi-channel features of the high-resolution meteorological field. As input, the output is the first-layer spatial feature map. for: in, This is the first layer of spatial feature map. Represents convolution. For the activation function, a linear rectified function with leakage ( (The slope of the negative half-axis is set to 0.2); convolution kernel Size set to Quantity (input channel) Output channel) set to , The initial value is set to the number of input feature channels. , indicates that values ​​are randomly selected in a uniform distribution; bias The number of feature maps is set to 64, and the initial value is set to 0. The second and third spatial convolutional network layers use the same construction method, progressively mapping the number of channels to... and Finally, a one-dimensional retrieval embedding vector is output through a global average pooling layer.

[0043] In one embodiment, the time encoder includes three 3D convolutional neural network layers; in the time encoder: the low-resolution meteorological field sequence samples are processed sequentially through the first 3D convolutional neural network layer, the second 3D convolutional neural network layer, and the third 3D convolutional neural network layer to obtain three-dimensional spatiotemporal features; the three-dimensional spatiotemporal features are flattened into a one-dimensional vector, and the one-dimensional vector is used as the query vector.

[0044] Specifically, timing encoders Using 3D convolutional neural network layers, low-resolution meteorological field sequences are processed. As input, output time-series feature map for: ; in, This is a time series feature map. Represents 3D spatiotemporal convolution; 3D convolution kernel Size set to Quantity set to , The number of low-resolution input channels is initially set to... ; bias The number of feature maps is set to 64, and the initial value is set to 0; the temporal encoder then stacks two identical 3D convolutional layers and flattens them to map them into query vectors. .

[0045] In one embodiment, the specific process of searching in the retrieval database includes: calculating the similarity between the query vector and the embedding vector of the high-resolution sample in the retrieval database; the similarity is, but is not limited to, based on cosine similarity, Euclidean distance, or dot product similarity; selecting several high-resolution meteorological fields from the retrieval database according to the similarity to obtain the retrieved high-resolution meteorological fields; calculating the normalized weights after temperature smoothing according to the similarity, and performing weighted summation on the retrieved high-resolution meteorological fields to obtain the high-resolution reference field.

[0046] Specifically, the reference sample retrieval is performed using cosine similarity, Euclidean distance, dot product similarity, or other similarity metrics, and one or more high-resolution reference meteorological element fields can be selected for fusion based on the retrieval results.

[0047] In one embodiment, the two-stream noise prediction network includes: a first-stream feature encoder, a second-stream feature encoder, a cross-attention module, and a decoder; the first-stream feature encoder includes convolutional layers and... The network consists of an activation function and a residual convolution module; a second-stream feature encoder includes a residual convolution module and a nonlinear feature extraction layer; a decoder includes an upsampling layer and an output layer; the output layer includes a convolutional layer; in the dual-stream noise prediction network: the high-resolution reference field is processed by the second-stream feature encoder to obtain a reference feature map; the noisy meteorological field and the low-resolution meteorological field sequence samples at the current time are concatenated and processed by the first-stream feature encoder to obtain a generated feature map; the reference feature map and the generated feature map are input into the cross-attention module to obtain the fused feature map after injecting the reference field features. ; ; ; ; in, This is the fused feature map after injecting reference field features. , , These are query, key, and value matrices, respectively. , , These are respectively query, key, and value. Linear mapping convolution kernel, Scaling factor To generate feature maps, For reference feature map; The fused feature maps are superimposed with residuals to obtain the fused features of the encoding stage. The fused features of the encoding stage are input into the decoder and decoded layer by layer from top to bottom. Spatial resolution upsampling is performed using deconvolution. At the same time, the fused features of the encoding stage are combined through skip connections and processed through the output layer to obtain the prediction noise.

[0048] Specifically, the two-stream noise prediction network includes a first-stream feature encoder, a second-stream feature encoder, a cross-attention module, and a decoder; (1) Constructing the second-stream feature encoder unit: The second-stream feature encoder is used at different network layers. Extracting high-resolution reference field Spatial texture and physical property features, including the number of network layers. During the transmission process, the Layer 1 network will... As input, the The output features of the layer are used as the first The input to the layer is used to construct a second-stream feature encoder unit, which includes residual projection and nonlinear feature extraction. The specific implementation formula is as follows: ; ; in, For the first Intermediate feature map of the layer For the first Layer output feature map, Represents two-dimensional spatial convolution. for Activation function; when When, input ; convolution kernel and ,when When, the size is set to Quantity set to and The initial value is set to This indicates that values ​​are randomly selected according to a normal distribution with a mean of 0 and a standard deviation of 0.02; when When, the size is set to Quantity set to and The initial value is set to ;when When, the size is set to Quantity set to and The initial value is set to .

[0049] Residual projection convolution kernel , All dimensions are set to ,when Time quantity set to , when Time quantity set to ,when Time quantity set to The initial value is set to ; for bias and ,when At that time, the number of feature maps was set to 64, 128, and 256 respectively, and the initial value was set to 0 for all of them.

[0050] (2) Constructing the first-stream feature encoder unit: The first-stream feature encoder is used in different network layers. Processing the noisy meteorological field in the current step and low-resolution meteorological field features as a condition for generation First of all, The input is concatenated along the channel dimension, and the formula is as follows: ; ; ; in, For the first Layer generates feature maps, For the first Feature maps are generated in the middle of the layer. This represents the concatenation operation along the feature channel dimension; for the convolution kernel... and ,when When, the size is set to Quantity set to and The initial value is set to ;when When, the size is set to Quantity set to and The initial value is set to ;when When, the size is set to Quantity set to and The initial value is set to Residual projection convolution kernel The size and quantity configuration are the same as the residual convolution kernel of the second-stream encoder, and the initial value is set to... ; bias and Initial values ​​are all set to 0, bias The number of feature maps is set to 128.

[0051] (3) Construct cross-attention injection units to compute the interaction between reference features and generated features.

[0052] Cross-attention injection units at each network layer In this process, the reference features from the second-stream output are dynamically injected into the first-stream generation state. The construction of this unit involves first constructing a linear mapping for generating the query matrix, then constructing a linear mapping for generating the key and value matrices, and finally constructing an attention scoring and feature fusion mechanism. The fused feature map, after being injected with reference field features, is fed into a decoder consisting of deconvolution and residual blocks. The final output layer of the decoding network uses... The convolution kernel is mapped to the number of channels of the predicted noise output; the construction formula is as follows: ; ; ; ; ; in, , The first The generated feature map after layer fusion and the attention feature map output by the cross-attention module. , , These are query, key, and value tensor matrices, respectively. This represents the transpose of a tensor matrix; Set the scaling factor to 128. The times are 64, 128, and 256 respectively; Learnable scalar parameters initialized to 0; kernel , and Set all dimensions to Linear mapping convolution kernel, when Time quantity set to ,when Time quantity set to ,when Time quantity set to The initial values ​​are all set to ; (4) Constructing the diffusion decoding and prediction output unit: The diffusion decoding and prediction output unit receives the highest layer feature fusion output. It decodes layer by layer from top to bottom, using deconvolution for spatial resolution upsampling, and combining fused features from the encoding stage through skip connections. The final output is the predicted noise. The formula is constructed as follows: ; ; ; in, This represents the deconvolution (transposed convolution) operation; when reversing layer by layer... The above formula is executed at that time; for the deconvolution kernel , size set The step size is set to 2. Time quantity set to ,when Time quantity set to The initial value is set to ; bias The initial value is set to 0. 。

[0053] For the convolutional kernel of the final predicted output layer , size set Quantity set to The initial value is set to bias The number of feature maps is set to The initial value is set to 0.

[0054] In one embodiment, the physical consistency discriminator includes four downsampled convolutional layers and one fully connected layer. In the physical consistency discriminator: the current prediction noise and the high-resolution reference field are concatenated along the channel dimension and then input into the first downsampled convolutional layer to obtain the output features of the first discriminator network; the output features of the first discriminator network are then processed sequentially through the second, third, and fourth downsampled convolutional layers and flattened; the flattened result is then processed through the fully connected layer and passed... The activation function is used to obtain the physical consistency score.

[0055] Specifically, physical consistency discriminator network Includes multi-layer downsampling convolutional networks and physical consistency discriminator networks. During the forward propagation, the generated intermediate state is first processed through the input feature fusion unit. With high-resolution reference field Perform channel stitching and preliminary feature mapping; construct the fusion unit, with the meteorological field generated at the current moment as input. and reference field The output is the initial fused feature map. , The formula is constructed as follows: ; ; in, This indicates that the splicing operation is performed at the channel level. Represents two-dimensional spatial convolution. Set the slope of the negative half-axis as The activation function of a leaky linear rectified circuit; and The number of input feature channels is Then the convolution kernel Size set to Step size set to 2, quantity (input channel) Output channel) set to The initial value is set to This indicates that values ​​are randomly selected from a normal distribution with a mean of 0 and a standard deviation of 0.02; bias The number of feature maps is set to 64, and the initial value is set to 0. Constructing a physical semantic feature extraction subnetwork: Constructing a physical semantic feature extraction subnetwork, consisting of stacked... The structure consists of spectral normalized convolutional layers, in which . No. Layer network will Output feature map of the layer As input, output the first... Layer feature map This process introduces a spectral normalization operator. To enhance the stability of physical discrimination by constraining the Lipschitz constant of the discriminator, the network construction formula is as follows: Among them, when When, the input is convolution kernel Size set to Step size set to 2, quantity set to The initial value is set to bias The number of feature maps is set to 128, and the initial value is set to 0. when At that time, convolution kernel Size set to Step size set to 2, quantity set to , Initial value set to , bias The number of feature maps is set to 256, and the initial value is set to 0. when At that time, convolution kernel Size set to Step size set to 1, quantity set to The initial value is set to bias The number of feature maps is set to 512, and the initial value is set to 0.

[0056] Constructing the discriminator scoring output unit: The discriminator scoring output unit converts the high-dimensional physical semantic feature map output from the 3rd layer into a single unit. Converted into a physical consistency probability score between 0 and 1 To construct the output unit, first perform global spatial feature compression, then map it to a scalar output. The construction formula is as follows: ; ; in, This represents a global average pooling operation, which reduces the space dimension to ; express Activation function; weight matrix Size set to , Initial value set to ; bias Set the quantity to 1 and the initial value to 0.

[0057] In one embodiment, the differentiable physical projection operator has no trainable network parameters; the differentiable physical projection operator has a built-in partial derivative calculation matrix based on the finite difference method, which is used to perform first-order spatial difference on the grid points of the generated meteorological field, and output the horizontal gradient of the pressure field and the divergence of the wind field to meet the constraints of hard physical formulas such as geostrophic balance.

[0058] Specifically, differentiable physical projection operators There are no trainable network parameters. It has a built-in partial derivative calculation matrix based on the finite difference method, which is used to perform first-order spatial difference on the grid points of the generated meteorological field and output the horizontal gradient of the pressure field and the divergence of the wind field to meet the constraints of hard physical formulas such as geostrophic balance.

[0059] (1) Construct a fixed difference matrix for a differentiable physical projection operator.

[0060] Differentiable physical projection operator It incorporates a fixed convolution kernel that requires no parameter updates, enabling second-order central difference approximation differentiation within the tensor computation graph to calculate the spatial gradients of pressure and wind fields; it constructs... Directional first-order partial derivative operator matrix and Directional first-order partial derivative operator matrix The formula is constructed as follows: ; ; in, To generate a two-dimensional feature map of sea level pressure separated from the field; and The scalar constant is the preset spatial grid resolution; convolution kernel Size set to Quantity set to Its kernel constant values ​​are strictly fixed as follows: the first column is all 0, and the second column is... The third column is all 0; convolution kernel Size set to Quantity set to Its core constant values ​​are strictly fixed as follows: the first row is 0, the second row is 0, and so on. The third line is 0; (2) Construct a physical site to constraint calculation unit.

[0061] Based on the aforementioned constructed difference matrix, the generated zonal wind speed field With meridional wind speed field To calculate geostrophic deviation using the same pressure gradient, the loss tensor flow formula is constructed as follows: ; ; in, and They are respectively Extreme and The geostrophic balance penalty term of the extreme components is passed into the backbone network of the diffusion model as a backpropagation node of the automatic differentiation. This represents the preset air density tensor constant; The Coriolis parameter matrix is ​​predefined and dynamically assigned values ​​based on the dimensions in the input sample metadata. This represents the total number of grid points in the spatial feature map.

[0062] In one embodiment, the total loss function is expressed as: ; ; ; ; in, For the total loss function, To predict the loss for diffused noise, For reference, consistency loss, To counteract the generation of physical loss, and They are respectively Extreme and The geostrophic balance penalty term for extreme components, Four preset loss weight hyperparameters, This represents the number of sample pairs contained in the current batch. Number of meteorological variable channels; The total number of spatial grid points in a single-channel two-dimensional feature map; The first character in the spatial feature map coordinate points, These are the sample pair number and the meteorological variable channel number, respectively. To predict noise, Add Gaussian noise to make it realistic. To predict noise-free, high-resolution meteorological fields, For physical consistency score, This is a high-resolution reference field.

[0063] Specifically, the training process includes the following steps: (1) Parameter settings The maximum number of diffusion steps in the diffusion model The noise scheduling variance parameter for the diffusion process is set to 1000, and is set to increase linearly, i.e., the initial step variance. Set to 0.0001, maximum step variance Set to 0.02; This sets the temperature parameter constant used in the multimodal retrieval module to control the smoothness of the reference field fusion weights. Set to 0.1; the atmospheric vertical adiabatic lapse rate constant used for the physical projection of temperature lapse rate in the differentiable physical projection operator. Set to 0.0065 ; Initial learning rate of the network Set the learning rate decay coefficient to 0.0001. Set to 0.95, decay rate Set to 100, the current network learning rate. Based on training steps The determination is dynamic, and the calculation formula is as follows: ; in, This is the initial network learning rate. Number of training steps. Initially set to 1, the number of training steps is adjusted for each forward and backward propagation update of the network parameters. Add 1; The number of sequence sample pairs input to the network each time during training, i.e., the batch size. Set to 8; set the maximum number of batch training iterations per round to... Initial batch training times Set to 1; the maximum number of training iterations is and Set to 200, initial iteration rounds Set to 1; where the maximum number of training iterations is... Determined by the following formula: ; in, This represents the total number of sequence sample pairs contained in the training sample set. This indicates the floor function.

[0064] Batch training is used to read data from the training sequence sample set. Each sample pair is used to train the network, and each sample pair contains historical low-resolution meteorological field sequence samples. and real high-resolution meteorological field samples as a control label Among them, the sequence length is set. Low-resolution meteorological field sequence samples The data includes data from time points 1 to 4, and its tensor space has a dimension of . The number of feature channels Spatial resolution Set as , The height and width are characterized; the real high-resolution meteorological field sample The tensor space dimension corresponding to the actual high-frequency observation state at the 4th time interval is . The number of meteorological variables generated Spatial resolution Set as .

[0065] (2) Forward propagation 1) Multimodal feature encoding and high-resolution reference field fusion: The input from step 3... Each low-resolution meteorological field sequence sample in a sample pair The temporal encoder takes it as input, extracts spatiotemporal features through forward propagation, and maps them into a query vector. The forward propagation formula is as follows: ; ; ; in , These are the spatiotemporal feature maps output from the first and second 3D convolutional layers, respectively. for Activation function , , For three 3D convolution kernels, This means flattening the 3D feature map into a 1D vector. The three 3D convolutional layers are biased. For query vector, ; query vector Compared with the previous search results Embedding vectors of high-resolution samples Calculate cosine similarity The calculation formula is: ; in, Let be the cosine similarity.

[0066] Based on cosine similarity Calculate the normalized weights after temperature smoothing And the retrieved corresponding spatial dimension is High-resolution meteorological field Perform weighted summation to output the fused high-resolution reference field. for: ; in, The initial values ​​of the convolution kernel and bias of the temporal encoder are determined when the model is constructed, and are updated once for each subsequent training iteration. 2) Forward Diffusion Noise Addition and Two-Stream Feature Encoding: During the training phase, from the interval... Uniformly randomized sampling of the current diffusion step number ; to real high-resolution meteorological field samples Add random Gaussian noise Generate the noisy weather field for the current step. , The formula for forward noise addition is as follows: ; in, It is a noisy meteorological field. Indicates the process of forward diffusion up to the th n The cumulative signal retention coefficient (i.e., the cumulative product coefficient) at each step. Next, the two-stream noise prediction network performs feature encoding. The second-stream feature encoder encodes the high-resolution reference field. As input, the forward propagation outputs a reference feature map. The forward propagation formula is as follows: ; in , For the 3D convolution kernel of the second-stream feature encoder, The bias of the 3D convolution for the second-stream feature encoder. This is the silu activation function.

[0067] The first-class feature encoder will output the noisy weather field Compared with upsampled low-resolution features The concatenated data is used as input, and after forward propagation, it outputs a feature map. , The forward propagation formula is as follows: ; in, and All spatial dimensions are Convolution kernel of the first-class feature encoder and bias The initial value is determined during construction and will be updated once during each subsequent training iteration; 3) Cross-attention injection and prediction of noise output. The cross-attention module will refer to the feature map. With the generation of feature maps As input, the attention is calculated via a linear mapping and then forward-propagated to the decoder; the forward propagation formula is as follows: ; ; ; ; Injected with reference field characteristics The superimposed residuals are input into the decoder of the dual-stream noise prediction network, passing sequentially through the upsampling layer and the output layer, and finally decoded to output the prediction noise tensor. Its formula is: ; in, The fused decoded feature map is the lowest level output of the decoder, predicting noise. ; Convolutional kernel of the output layer and bias The initial value is determined during construction and will be updated once during each subsequent training iteration.

[0068] 4) Forward scoring of the physical consistency discriminator. Based on the output prediction noise. Reconstruct the predicted noise-free high-resolution meteorological field , Discriminator Network Will With high-resolution reference field The data is concatenated along the channel dimension as input, passed through multiple layers of spectral normalization convolution for forward propagation, and finally output by the discriminator scoring output unit to produce a physical consistency score. The forward propagation formula is as follows: ; ; ; ; ; in, Noise-free high-resolution meteorological field With high-resolution reference field The splicing result, For physical consistency score, For distribution in The scalar values ​​between these represent the probability that the generated field conforms to the local atmospheric physical properties; This indicates a global average pooling operation. It is the sigmoid activation function. , , , There are four convolution kernels. , , , The initial values ​​of the convolution kernel and biases are determined during construction and are updated once during each subsequent training iteration. After a complete forward propagation, the network generates prediction noise and calculates the physical compliance state.

[0069] (3) Model parameter update.

[0070] 1) Calculate the loss function. This applies to the prediction noise obtained during forward propagation. Predicting noise-free high-resolution meteorological fields and physical consistency score Gaussian noise is added to the real input from step 3. and high-resolution reference field Calculate the predicted loss of diffused noise 、 Reference consistency loss and the generation of physical loss , This loss is then added to the geostrophic constraint loss output by the physical site transfer constraint calculation unit to form the generator's total loss function. Specifically, as shown in the total loss function expression above.

[0071] 2) Calculate the gradients of the network parameters. Calculate the generator's total loss function by taking partial derivatives using the chain rule. Gradients of each network parameter in the diffusion-generated backbone network and feature encoder : ; Among them, the constructed time encoder and dual-stream noise prediction network All convolutional kernels, mapping matrices, and bias parameters constitute the total parameters of the generator network. Indicates the first Network parameters, This represents the total number of generated network parameters, and .

[0072] Furthermore, by leveraging cross-entropy loss to maximize the discriminator's ability to distinguish between real and generated weather fields, a physically consistent discriminator network is independently computed. The discrimination loss is calculated, and the gradient of the discriminator network parameters is obtained by taking its derivative. 3) Update network parameters. Use the current network learning rate. Multiply by the gradient of network parameters The network parameter correction term is obtained. Subtracting the correction term from the original network parameters yields the gradient descent update of the network parameters, as shown in the following formula: ; in, Indicates the updated number Network parameters, learning rate The parameters are dynamically adjusted after each update according to the decay rule set in the training process.

[0073] (4) The iterative training process of the retrieval enhancement reference diffusion generation model for spatial downscaling of meteorological element fields includes the following three cases: If there are samples in the training sequence sample set in the current round that were not used for training, that is, the number of training iterations in the current batch is less than the maximum number of training iterations in the largest batch. ,but And continue reading the subsequent... Each sample is used to train the parameters in the input network; If all samples in the training sequence sample set have been used for training in the current round (i.e., the current batch training count equals the maximum batch training count), and the current iteration round is less than the maximum iteration round, then... Then set the initial batch training count. Set the index to 1, reset the data read index, increment the current iteration number by 1, and then continue reading. Each sample is used to train the parameters in the input network for the next round; If all samples in the training sequence sample set have been used in this round of training, that is, the current batch training times equal the maximum batch training times, and the current iteration round has reached the maximum iteration round, then... Then the training of the retrieval enhancement reference diffusion generation model for spatial downscaling of meteorological element fields ends, and the final network parameter model is saved and output.

[0074] It should be noted that the network structure, encoder type, similarity measurement method, number of reference samples, loss function composition, types of physical constraints, and training parameter settings described in the above embodiments can all be adjusted according to specific task requirements. For example, different network structures and retrieval strategies can be adopted for different meteorological elements, different regions, different spatiotemporal resolutions, or different data sources; for different business application scenarios, corresponding physical constraint terms can be added or removed, or the form of the loss function can be replaced. All equivalent substitutions or transformations made based on the concept of this invention should be included within the protection scope of this invention.

[0075] It should be understood that, although the above Figure 1 The steps are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise explicitly stated in this document, there is no strict order in which these steps are executed; they can be performed in other orders. Furthermore, the above... Figure 1 At least some of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0076] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0077] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and all such modifications and improvements fall within the scope of protection of this application.

Claims

1. A spatial downscaling method for meteorological element fields based on a retrieval and diffusion generation model, characterized in that, Including the following steps: Obtain sample pairs; The sample pairs include: low-resolution meteorological field sequence samples, real high-resolution meteorological field samples, and a retrieval library sample of high-resolution meteorological fields pre-constructed by a meteorological self-supervised encoder; A retrieval-enhanced diffusion generation model is constructed, comprising a meteorological self-supervised encoder, a temporal encoder, a two-stream noise prediction network, a physical consistency discriminator, and a differentiable physical projection operator. The two-stream noise prediction network includes a first-stream feature encoder, a second-stream feature encoder, a cross-attention module, and a decoder. The first-stream feature encoder includes convolutional layers and... The first stream feature encoder includes an activation function and a residual convolution module; the second stream feature encoder includes a residual convolution module and a nonlinear feature extraction layer; the decoder includes an upsampling layer and an output layer; the output layer includes a convolutional layer; the physical consistency discriminator includes four downsampling convolutional layers and one fully connected layer. During training, low-resolution meteorological field sequence samples are encoded using a temporal encoder, then retrieved from a search database, and a high-resolution reference field is generated based on the search results. Forward noise is added to the real high-resolution meteorological field samples to obtain a noisy meteorological field. The noisy meteorological field, low-resolution meteorological field sequence samples, and high-resolution reference field are input into a dual-stream noise prediction network, which outputs predicted noise. A physical consistency discriminator, combined with a differentiable physical projection operator, performs physical consistency verification on the predicted noise and outputs a physical constraint signal. Based on the deviation between the predicted noise and the real noise, the reference consistency deviation, and the physical constraint signal, the total loss function is calculated, and all trainable parameters of the model are updated. Iterative training continues until the model converges. The low-resolution meteorological field sequence to be downscaled is encoded by a time encoder, then searched in a retrieval database, and a high-resolution reference field is constructed based on the retrieval results. After iterative denoising by a dual-stream noise prediction network, a high spatial resolution meteorological element field is generated. In the dual-stream noise prediction network: the high-resolution reference field is processed by the second-stream feature encoder to obtain a reference feature map; the noisy meteorological field and the low-resolution meteorological field sequence samples at the current time are concatenated and processed by the first-stream feature encoder to obtain a generated feature map; the reference feature map and the generated feature map are input into the cross-attention module to obtain a fused feature map after injecting the reference field features. in, This is the fused feature map after injecting reference field features. , , These are query, key, and value matrices, respectively. , , These are respectively query, key, and value. Linear mapping convolution kernel, Scaling factor To generate feature maps, For reference feature map; The fused feature maps are superimposed with residuals to obtain the fused features of the encoding stage; the fused features of the encoding stage are input into the decoder and decoded layer by layer from top to bottom. Spatial resolution upsampling is performed using deconvolution, and the fused features of the encoding stage are combined through skip connections. The output layer is then processed to obtain the prediction noise. In the physical consistency discriminator: the current prediction noise and the high-resolution reference field are concatenated along the channel dimension and then input into the first downsampling convolutional layer to obtain the output features of the first discriminator network; the output features of the first discriminator network are then processed sequentially through the second, third, and fourth downsampling convolutional layers and flattened; the flattened result is then processed through a fully connected layer and then... The activation function is used to obtain the physical consistency score.

2. The method for spatial downscaling of meteorological element fields based on a retrieval and diffusion generation model according to claim 1, characterized in that, The low-resolution meteorological field sequence sample includes univariate or multivariate meteorological element field data from multiple consecutive time periods. The meteorological elements include temperature, air pressure, wind speed, wind direction, humidity, precipitation, or any combination thereof.

3. The method for spatial downscaling of meteorological element fields based on a retrieval and diffusion generation model according to claim 1, characterized in that, The high-resolution meteorological field retrieval database samples are pre-built offline and dynamically expanded or updated based on new historical observation data or high-resolution analysis data.

4. The method for spatial downscaling of meteorological element fields based on a retrieval and diffusion generation model according to claim 1, characterized in that, The meteorological self-supervised encoder consists of three spatial convolutional network layers and one global average pooling layer; in the meteorological self-supervised encoder: The multi-channel features of the input high-resolution meteorological field are input into the first spatial convolutional network layer, and the first spatial feature map is output. The first spatial feature map is input into the second spatial convolutional network layer, and the second spatial feature map is output. The second spatial feature map is input into the third spatial convolutional network layer, and the third spatial feature map is output. The third spatial feature map is input into a global average pooling layer to obtain a retrieval embedding vector. The retrieval embedding vector is then used as a high-resolution meteorological field retrieval sample and stored in a high-resolution meteorological field retrieval database.

5. The method for spatial downscaling of meteorological element fields based on a retrieval and diffusion generation model according to claim 1, characterized in that, The timing encoder includes three 3D convolutional neural network layers; In the timing encoder: The low-resolution meteorological field sequence samples are processed sequentially through the first 3D convolutional neural network layer, the second 3D convolutional neural network layer, and the third 3D convolutional neural network layer to obtain three-dimensional spatiotemporal features. The three-dimensional spatiotemporal features are flattened into a one-dimensional vector, and the one-dimensional vector is used as the query vector.

6. The method for spatial downscaling of meteorological element fields based on a retrieval and diffusion generation model according to claim 1, characterized in that, The specific process of conducting a search in the search database includes: Calculate the similarity between the query vector and the embedding vector of a high-resolution sample in the retrieval database; the similarity is, but is not limited to, based on cosine similarity, Euclidean distance, or dot product similarity. Several high-resolution meteorological fields are selected from the retrieval database based on similarity to obtain the retrieved high-resolution meteorological fields; The normalized weights after temperature smoothing are calculated based on the similarity, and the retrieved high-resolution meteorological fields are weighted and summed to obtain the high-resolution reference field.

7. The method for spatial downscaling of meteorological element fields based on a retrieval and diffusion generation model according to claim 1, characterized in that, Differentiable physical projection operators have no trainable network parameters; The differentiable physical projection operator has a built-in partial derivative calculation matrix based on the finite difference method, which is used to perform first-order spatial difference on the grid points of the generated meteorological field and output the horizontal gradient of the pressure field and the divergence of the wind field to meet the constraints of hard physical formulas such as geostrophic balance.

8. The method for spatial downscaling of meteorological element fields based on a retrieval and diffusion generation model according to claim 1, characterized in that, The total loss function is: in, For the total loss function, To predict the loss for diffused noise, For reference, consistency loss, To counteract the generation of physical loss, and They are respectively Extreme and The geostrophic balance penalty term for the extreme components, Four preset loss weight hyperparameters, This represents the number of sample pairs contained in the current batch. Number of meteorological variable channels; The total number of spatial grid points in a single-channel two-dimensional feature map; The first character in the spatial feature map coordinate points, These are the sample pair number and the meteorological variable channel number, respectively. To predict noise, Add Gaussian noise to make it realistic. To predict noise-free, high-resolution meteorological fields, For physical consistency score, This is a high-resolution reference field.