A var-based cross-resolution ai downscaling method
By employing a cross-resolution AI downscaling method based on VAR and Transformer, the problems of cross-variable knowledge transfer, static geographic information fusion, and model generalization in meteorological data downscaling are solved, achieving efficient and accurate meteorological data processing and adaptive downscaling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TIANJIN YUNYAO AEROSPACE TECH CO LTD
- Filing Date
- 2026-01-06
- Publication Date
- 2026-05-12
AI Technical Summary
Existing meteorological data downscaling methods struggle to balance cross-variable knowledge transfer and joint processing, arbitrary resolution input and arbitrary scale downscaling, effective fusion of static geographic information, model generalization and adaptability to specific scenarios, resulting in insufficient prediction accuracy and efficiency.
We employ a VAR-based cross-resolution AI downscaling method, which uses multi-scale feature encoding and Transformer interaction, combined with static geographic information features, to achieve multivariate joint modeling and autoregressive iteration. We then use a pre-trained model for fine-tuning to adapt to private datasets.
It improves the prediction accuracy and physical consistency of the spatial distribution of meteorological elements, enhances the utilization efficiency of static geographic information, realizes flexible processing of inputs at arbitrary resolution and the generalization ability of models, and reduces computational complexity and training costs.
Smart Images

Figure CN121456836B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of meteorological data processing technology, and in particular relates to a cross-resolution AI downscaling method based on VAR. Background Technology
[0002] Currently, meteorological data downscaling methods are mainly divided into two categories: dynamic downscaling and statistical downscaling. Dynamic downscaling uses regional climate models (RCMs) to perform high-resolution simulations under given global climate model (GCM) boundary conditions. While it can ensure physical consistency, it is computationally expensive and has limited flexibility. Statistical downscaling, on the other hand, makes predictions by establishing statistical relationships between large-scale climate variables and local meteorological elements. It requires relatively less computation, but often relies on specific statistical assumptions and struggles to capture complex nonlinear relationships.
[0003] In recent years, deep learning technology has achieved significant success in the field of image super-resolution and has been introduced into meteorological downscaling tasks. For example, some studies have adopted CNN architectures to treat low-resolution meteorological fields as images and train models to learn the mapping relationship from low resolution to high resolution. However, when dealing with multivariate meteorological data, these methods typically train models separately for each variable, leading to computational redundancy and ignoring the physical relationships and interdependencies between different meteorological variables, thus limiting the model's context-awareness and predictive performance. Furthermore, existing deep learning-based downscaling methods have limited capabilities in handling arbitrary input resolutions and arbitrary output scales (e.g., often only applicable to specific datasets, specific spatial resolutions, and specific meteorological elements), and a unified and efficient solution has not yet been developed for effectively integrating static geographic information such as topography and elevation as auxiliary data to improve downscaling accuracy. For example, some methods simply concatenate digital elevation model (DEM) data with meteorological data along the channel dimension or add feature maps, which lacks deep extraction of the semantic features of auxiliary information, limiting its guiding role.
[0004] Existing technologies cannot simultaneously address the following aspects:
[0005] 1. Cross-variable knowledge transfer and joint processing: Existing methods usually downscale modeling for single meteorological variables, lacking effective utilization of the inherent physical relationships between multiple variables. This results in the model being unable to achieve cross-variable knowledge transfer, limiting the improvement of prediction accuracy and computational efficiency.
[0006] 2. Arbitrary resolution input and arbitrary scale downscaling: Traditional downscaling models are often designed for fixed resolution scaling ratios, making it difficult to flexibly handle input data from different sources and at different resolutions, and to achieve user-defined arbitrary scale downscaling output.
[0007] 3. Effective integration of static geographic information: When introducing static geographic information such as topography, elevation, and land use as auxiliary data, existing technologies often use simple splicing or addition operations, failing to fully explore the fine modulation effect of this information on the spatial distribution of meteorological elements, resulting in low accuracy of downscaling results in complex underlying surface areas.
[0008] 4. Balancing Model Generalization and Scenario-Specific Adaptability: General downscaling models may perform poorly on specific regions or private datasets, while training new models from scratch is costly. Current technologies lack an efficient mechanism that allows pre-trained models to quickly adapt to private datasets and be fine-tuned, thus balancing the model's generalization ability with the accuracy requirements of specific application scenarios. Summary of the Invention
[0009] In view of this, the present invention aims to propose a VAR-based cross-resolution AI downscaling method to solve the problems of existing technologies in balancing cross-variable knowledge transfer and joint processing, arbitrary resolution input and arbitrary scale downscaling, effective fusion of static geographic information, and model generalization and adaptability to specific scenarios.
[0010] To achieve the above objectives, the technical solution of the present invention is implemented as follows:
[0011] A VAR-based cross-resolution AI downscaling method includes the following steps:
[0012] S1. Data preparation and preprocessing: Acquire low-resolution meteorological data from multiple sources and corresponding high-resolution target data, prepare static geographic information data, match the spatial range of static geographic information data with meteorological data, preprocess the input low-resolution meteorological data, process the static geographic information data, and generate feature maps with the same spatial reference and grid size as the meteorological data.
[0013] S2. Multi-scale feature encoding and VAR initialization: The preprocessed low-resolution meteorological data is input into the shared feature encoder to extract the initial context features. The lowest resolution feature output by the encoder is used as the starting point of the VAR process to predict the next higher resolution feature representation.
[0014] S3, Cross-resolution Transformer interaction and feature enhancement: Construct a Transformer architecture that includes multiple scales. At each prediction scale of VAR, introduce a Transformer module. Through the multi-head self-attention mechanism and cross-scale attention mechanism of the Transformer, learn the dependencies between features at different scales, and fuse static geographic information features to enhance and refine the features at the current scale.
[0015] S4. Multivariate Output and Autoregressive Iteration: At each VAR prediction scale, the enhanced features by the Transformer module are input into the multivariate decoder. The multivariate decoder maps the fused features back to the meteorological variable space and outputs the predicted values of each target meteorological variable at the current scale. The predicted values are used as part of the input for the VAR model to predict the next higher resolution scale, or are used to calculate the loss function. The VAR process starts from the lowest resolution and predicts higher resolution features and meteorological fields step by step until the target resolution is reached.
[0016] S5. Loss Calculation and Model Training: At each prediction scale of VAR, calculate the loss between the model output and the corresponding high-resolution ground truth, and optimize the model parameters through the backpropagation algorithm.
[0017] S6. Model Fine-tuning and Application: Based on the pre-trained general downscaling model, freeze the underlying parameters of the model for the set private dataset, and only fine-tune the top decoder or the set adaptation layer, and use the private dataset for iterative training.
[0018] Furthermore, in step S1, the static geographic information data is processed to generate a feature map with the same spatial reference and grid size as the meteorological data, including:
[0019] S11. Obtain high-resolution digital elevation model data, slope data, aspect data, and land use / land cover data;
[0020] S12. Perform feature engineering on the raw geographic information data, and perform one-hot coding or embedding coding on categorical data;
[0021] S13. By performing stepwise pooling or average pooling on the high-resolution raw geographic information data, feature maps of different resolutions are generated; or the highest resolution geographic information is directly input and interacts with meteorological features of different scales through an attention mechanism within the Transformer.
[0022] S14. In the cross-resolution Transformer interaction module, the static geographic information features and meteorological features of the corresponding scale are fused.
[0023] Furthermore, in step S14, in the cross-resolution Transformer interaction module, the static geographic information features and meteorological features at the corresponding scale are fused, including:
[0024] Channel concatenation: Static geographic information feature maps and meteorological feature maps are concatenated along the channel dimension and then input into the linear projection layer; Attention modulation: Static geographic information features are used as additional key and value inputs into the Transformer's attention mechanism, allowing the meteorological feature query to focus on geographic information; Gating mechanism: A gating unit is designed to modulate the intensity of meteorological features or selectively enhance regional features based on static geographic information features; Conditional normalization: Static geographic information features are used to predict the parameters of the conditional normalization layer, normalizing and modulating the meteorological features.
[0025] Furthermore, in step S3, the cross-resolution Transformer interaction and feature enhancement include:
[0026] S31. Multi-scale feature alignment and input: For the current prediction scale s in the VAR process, receive VAR prediction features from the previous scale s-1. If the original low-resolution input exhibits different characteristics at different scales, then the low-resolution input features corresponding to scale s will be... As input; processed static geographic information features Alignment is performed on scale s;
[0027] S32, Feature stitching and linear projection: [This section appears to be incomplete and requires further context.] , and The features are spliced along the channel dimension to obtain the fused features. Then, through a linear projection layer, Mapped to the expected input dimension d of the Transformer module model The initial token sequence T is obtained. s If the input consists of multiple patches, then the feature vectors of each patch form a sequence T. s One of the elements;
[0028] S33, Position-coded injection: for sequence T s Add a learnable location code to each token;
[0029] S34, Transformer encoder processing: Transforms the token sequence T with position encoding... s The input is fed into a module composed of stacked Transformer encoder blocks. Through the multi-head self-attention mechanism of the Transformer encoder blocks, the model captures the long-range dependencies between different spatial locations within the current scale s.
[0030] S35, Cross-scale attention mechanism: Introduce a cross-scale attention mechanism between Transformer modules of different scales;
[0031] S36. Feature Refinement and Output: After processing by a multi-layer Transformer encoder, the enhanced feature representation T' at the current scale s is obtained. s T' s It will be used for subsequent multivariate decoding and next-scale prediction of VAR.
[0032] Furthermore, in step S34, the Transformer encoder block includes a multi-head self-attention mechanism and a feedforward neural network.
[0033] Furthermore, the expression for the multi-head self-attention mechanism is as follows:
[0034] ;
[0035] In the formula, Q, K, and V represent the input token sequence T, respectively. s The query matrix, key matrix, and value matrix are obtained through different linear projection matrices, d k Let be the dimension of the key vector. The expression represents the product of the query matrix Q and the transpose of the key matrix K, resulting in the attention scores matrix. This matrix reflects the similarity (in dot product form) between each query and all keys. T represents the matrix transpose operation. It is the transpose of the key matrix K.
[0036] Furthermore, in step S4, the multivariate output and autoregressive iteration include:
[0037] S41. Decoder Design: For each VAR prediction scale s, design a decoder. s The decoder receives the enhanced features T' from the output of the corresponding scale Transformer module. s If a shared encoder-multiple decoder architecture is adopted, then each target meteorological variable has its own independent decoder. If a shared decoder is used, multiple independent output heads are set at the end of the decoder. var Each head is responsible for predicting a set weather variable;
[0038] S42. Current Scale Prediction: Enhance Feature T' s Input to Decoder s The prediction results of each meteorological variable at the current scale s are obtained. ;
[0039] S43, Autoregressive Iteration: The prediction results Pred at the current scale s are then processed. sAs input, initial features for the next higher resolution scale s+1 are predicted through a lightweight next-scale prediction module. , As the starting point of the VAR process at scale s+1, it is sent to the cross-resolution Transformer interaction module for processing;
[0040] S44. Loss Calculation: At each prediction scale s, the prediction result output by the decoder is calculated. With the corresponding high-resolution true value Compare and calculate the loss And calculate the total loss.
[0041] Furthermore, in step S41, the decoder is a decoder structure based on CNN upsampling blocks or Transformer;
[0042] In step S43, As the starting point of the VAR process at scale s+1, it is fed into the cross-resolution Transformer interaction module for processing, including:
[0043] Start with the lowest resolution scale and work upwards step by step until the preset target highest resolution scale is reached.
[0044] Furthermore, in step S44, the expression for calculating the total loss is as follows:
[0045] ;
[0046] In the formula, For the total loss, For predefined weights, For variables In the prediction scale The losses.
[0047] Furthermore, in step S6, model fine-tuning and application include:
[0048] S61. Loading the pre-trained model: Load the pre-trained general downscaling model;
[0049] S62. Parameter freezing strategy: Set the freezing layer and its parameters according to the size of the private dataset and its similarity to the pre-training dataset;
[0050] S63, Learning Rate Adjustment: Set the learning rate for fine-tuning parameters;
[0051] S64. Iterative Training: Use a private dataset to train the model in epochs and monitor its performance on the validation set.
[0052] S65. Evaluation and Application: After fine-tuning, evaluate the model performance on the test set, and use the fine-tuned model to perform a downscaling task on the private dataset.
[0053] Compared with existing technologies, the VAR-based cross-resolution AI downscaling method described in this invention has the following advantages:
[0054] (1) Improve downscaling accuracy and physical consistency: By combining the scale-by-scale refinement of VAR prediction with the powerful modeling capabilities of Transformer for long-range dependencies and multivariate relationships, this invention can more accurately capture the spatial distribution details of meteorological elements, especially in areas with complex terrain. Multivariate joint modeling helps to utilize the physical constraints between variables to improve the physical consistency of prediction results.
[0055] (2) Enhance the efficiency of utilizing static geographic information: By designing specialized feature fusion modules (such as attention modulation and gating mechanisms) to effectively integrate static geographic information such as topography, altitude, and land use into the downscaling process, the model can better understand the impact of the underlying surface on meteorological elements, thereby obtaining more refined and accurate downscaling results in areas with significant geographic features such as mountainous areas and coastal areas.
[0056] (3) Achieving arbitrary resolution input and arbitrary scale downscaling: The core idea of the VAR model is "next-scale prediction," which allows the model to start from any given low resolution and gradually predict higher resolution details until the user-specified target resolution is reached. This autoregressive characteristic gives the model the flexibility to handle data from different sources and with different initial resolutions, and enables continuous scale downscaling rather than fixed integer scaling. This overcomes the dependence of traditional methods on fixed scaling factors.
[0057] (4) Improve computational efficiency and model generalization: By using a shared encoder to process multivariate inputs and by gradually refining the model within the VAR framework, the number of model parameters and computational complexity can be reduced to some extent. This is especially efficient when dealing with multiple variables compared to training multiple independent models. At the same time, the pre-training plus fine-tuning strategy allows the model to first learn universal weather patterns and downscaling rules on a large-scale general dataset, and then quickly adapt to the characteristics of the private dataset through fine-tuning on a small number of specific data. This ensures the model's generalization ability and improves its performance in specific application scenarios, while avoiding the high cost of training from scratch for each new dataset. Attached Figure Description
[0058] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0059] Figure 1 This is a schematic diagram of the overall process described in an embodiment of the present invention. Detailed Implementation
[0060] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0061] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0062] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0063] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0064] like Figure 1 As shown, a VAR-based cross-resolution AI downscaling method is implemented as follows:
[0065] S1. Data Preparation and Preprocessing: Acquire low-resolution meteorological data from various sources (such as global numerical weather prediction models, reanalysis data, regional numerical weather prediction model data, etc.) and corresponding high-resolution target data (such as station observations, high-resolution model outputs, satellite inversion products, etc.). Simultaneously, prepare static geographic information data matching the spatial extent of the meteorological data, such as digital elevation models (DEMs) and land use type maps. Perform necessary preprocessing on the input low-resolution meteorological data, including normalization, missing value imputation, and resampling to a unified reference grid. Also process the static geographic information data into feature maps with the same spatial reference and grid size as the meteorological data.
[0066] S2. Multi-scale Feature Encoding and VAR Initialization: Preprocessed low-resolution meteorological data is input into a shared feature encoder (e.g., a Transformer-based encoder) to extract initial contextual features. Utilizing the "next-scale prediction" concept of the VAR model, the lowest-resolution feature output by the encoder is used as the starting point for the VAR process to predict the next slightly higher-resolution feature representation.
[0067] S3. Cross-resolution Transformer Interaction and Feature Enhancement: Construct a Transformer architecture encompassing multiple scales. At each prediction scale of VAR, a Transformer module is introduced. This module receives VAR prediction features from the previous scale and upsampled low-resolution input features at the current scale. Through the Transformer's multi-head self-attention mechanism and cross-scale attention mechanism, the dependencies between features at different scales are learned, and static geographic information features are fused to enhance and refine the features at the current scale. Static geographic information can be converted into feature vectors through learnable embedding layers, and then interact with meteorological features through the attention mechanism.
[0068] S4. Multivariate Output and Autoregressive Iteration: At each VAR prediction scale, the features enhanced by the Transformer module are input to a multivariate decoder (or a shared decoder with output heads for different variables). This decoder is responsible for mapping the fused features back to the meteorological variable space, outputting the predicted values of each target meteorological variable (such as precipitation, temperature, and wind speed) at the current scale. This predicted value will be used as part of the input for the VAR model to predict the next higher resolution scale, or used to calculate the loss function. The VAR process starts from the lowest resolution and predicts higher resolution features and meteorological fields step by step until the target resolution is reached.
[0069] S5. Loss Calculation and Model Training: At each prediction scale of VAR, calculate the loss between the model output and the corresponding high-resolution ground truth. Loss functions can include mean squared error (MSE), mean absolute error (MAE), structural similarity index (SSIM), etc., and different weights can be set for different meteorological variables. The total loss is the weighted sum of the losses at each scale and for each variable. Optimize the model parameters using the backpropagation algorithm.
[0070] S6. Model Fine-tuning and Application: Based on a pre-trained general downscaling model, for a specific private dataset, some low-level parameters of the model are frozen, and only the top-level decoder or a specific adaptation layer is fine-tuned. A small number of iterative training iterations are performed using the private dataset to allow the model to quickly adapt to the characteristics of the new data. The trained model can then be used to downscale new low-resolution meteorological data, outputting a high-resolution meteorological element field.
[0071] In a preferred embodiment of the present invention, the processing of static geographic information is specifically as follows:
[0072] Data preparation: Acquire high-resolution digital elevation model (DEM) data, slope data, aspect data, land use / land cover (LULC) data, etc. This data needs to be spatially and projectively aligned with meteorological data.
[0073] Feature engineering: Perform necessary feature engineering on the raw geographic information data, such as calculating derived features like terrain roughness and terrain shading index from the DEM. Perform one-hot encoding or embedding encoding on categorical data (such as LULC).
[0074] Multi-scale representation: To match the multi-scale characteristics of VAR, static geographic information data also needs to be represented at different scales. This can be achieved by performing progressive pooling or average pooling on the high-resolution raw geographic information data to generate a series of feature maps (Geo) at different resolutions. low_res Geo mid_res Geo high_res Alternatively, the highest resolution geographic information can be directly input and interacted with meteorological features at different scales within the Transformer through an attention mechanism.
[0075] Feature fusion: In the cross-resolution Transformer interaction module, static geographic information features (Geo) at corresponding scales are fused together. s This involves integrating Geo with meteorological characteristics. Integration methods may include: a. Channel splicing: combining Geo... s The feature maps and meteorological feature maps are concatenated along the channel dimension and then input into the linear projection layer. b. Attention modulation: Geo... sAs additional key and value inputs to the Transformer's attention mechanism, the meteorological feature query focuses on relevant geographic information. c. Gating Mechanism: Design a gating unit to modulate the intensity of meteorological features or selectively enhance features in certain areas based on geographic information features. d. Conditional Normalization: Use geographic information features to predict the parameters of the conditional normalization layer (such as AdaIN, SPADE) to normalize and modulate the meteorological features.
[0076] In a preferred embodiment of the present invention, cross-resolution Transformer interaction and feature enhancement are specifically as follows:
[0077] Multi-scale feature alignment and input: For the current prediction scale s in the VAR process, receive VAR prediction features from the previous scale s-1. (Upsampled to scale s resolution). Meanwhile, if the original low-resolution input exhibits different characteristics at different scales (e.g., obtained through convolutions or pooling with different numbers of layers), then the low-resolution input features corresponding to scale s will be... It is also used as input. Furthermore, static geographic information features that have undergone processing (such as convolution or embedding) are also considered. Alignment is also performed on scale s.
[0078] Feature stitching and linear projection: , (if used) and The features are spliced along the channel dimension to obtain the fused features. Then, a linear projection layer (fully connected layer) is used to... Mapped to the expected input dimension d of the Transformer module model The initial token sequence T is obtained. s If the input is multi-patch, then the feature vectors of each patch constitute a sequence T. s One of the elements.
[0079] Position-encoded injection: for sequence T s Each token in the dataset is assigned a learnable positional encoding to preserve spatial location information from the feature map. The positional encoding can be a standard sin / cosine encoding or a learnable parameter.
[0080] Transformer encoder processing: The token sequence T_s with positional encoding is input into a module consisting of stacked Transformer encoder blocks. Each Transformer encoder block contains a multi-head self-attention (MHSA) mechanism and a feed-forward network (FFN). Through MHSA, the model is able to capture long-range dependencies between different spatial locations (or feature dimensions) within the current scale s.
[0081] Cross-scale attention mechanism: To further enhance information interaction across multiple scales, a cross-scale attention mechanism can be introduced between Transformer modules at different scales. For example, the output of the Transformer encoder at scale s can serve as the Key and Value, while the output of the Transformer encoder at scale s-1 (or lower scales) (after appropriate upsampling and alignment) can serve as the Query, allowing for cross-attention computation. This helps high-level semantic information guide the recovery of low-level details and enriches high-level representations with low-level details.
[0082] Feature Refinement and Output: After processing by a multi-layer Transformer encoder (and possibly cross-scale attention), the enhanced feature representation T' at the current scale s is obtained. s This T' s It will be used for subsequent multivariate decoding and next-scale prediction of VAR.
[0083] The computational expression for the multi-head self-attention mechanism (MHSA) is as follows:
[0084] ;
[0085] In the formula, Q (Query), K (Key), and V (Value) represent the input token sequence T, respectively. s (or the output of the previous layer) through different linear projection matrices W Q W K W V The resulting query matrix, key matrix, and value matrix are obtained through mapping. k It is the dimension of the key vector, used to scale the dot product result and prevent gradient vanishing. The expression represents the product of the query matrix Q and the transpose of the key matrix K, resulting in the attention scores matrix. This matrix reflects the similarity (in dot product form) between each query and all keys. T represents the matrix transpose operation. It is the transpose of the key matrix K.
[0086] In practical multi-head attention, the input is divided into h heads, each of which performs attention calculations independently. Then, the outputs of all heads are concatenated and passed through a linear projection W. O The final MHSA output is obtained. This mechanism allows the model to focus on information from different locations across different representation subspaces.
[0087] In a preferred embodiment of the present invention, the multivariate output and autoregressive iteration are specifically as follows:
[0088] Decoder Design: For each VAR prediction scale s, design a decoder. s The decoder receives the enhanced features T' from the output of the corresponding scale Transformer module. s The decoder can be based on CNN upsampling blocks (such as transposed convolutions or pixel shuffling) or a Transformer-based decoder structure. If a shared encoder-multiple decoder architecture is used, each target meteorological variable (such as precipitation, temperature, and wind speed) has its own independent decoder. If a shared decoder is used, multiple independent output headers are set at the end of the decoder. var Each head is responsible for predicting a specific weather variable.
[0089] Current scale prediction: Enhance feature T' s Input to Decoder s (or each) ), to obtain the prediction results Pred for each meteorological variable at the current scale s. s (or ).
[0090] Autoregressive Iteration: The core of VAR lies in iterative prediction. The prediction result Pred_s at the current scale s (usually selecting one key variable or a fused representation of all variables as the driving signal for VAR) is used as input, and a lightweight "next-scale prediction module" (which can be one or several convolutional layers or a small neural network) is used to predict the initial features for the next higher resolution scale s+1. .this This will serve as the starting point for the VAR process at scale s+1 and will be fed into the cross-resolution Transformer interaction module in step (3) for processing. This process starts from the lowest resolution scale and proceeds upwards step by step until the preset target highest resolution scale is reached.
[0091] Loss calculation: At each prediction scale s, the decoder output is... With the corresponding high-resolution true value Compare and calculate the loss The total loss is the weighted sum of losses across all scales and all variables, expressed as follows:
[0092] ;
[0093] In the formula, For the total loss, For predefined weights, For variables In the prediction scale The losses.
[0094] In a preferred embodiment of the present invention, model fine-tuning and application are as follows:
[0095] Pre-trained model loading: Load a general downscaling model pre-trained based on a large and diverse meteorological dataset.
[0096] Parameter freezing strategy: Based on the size of the private dataset and its similarity to the pre-training dataset, the parameters of which layers are frozen are determined. Typically, the lower-level feature extractors (such as the first few layers of the encoder and the early-scale modules of VAR) can be kept frozen because they learn more general features. The upper-level decoders, scale-specific Transformer modules, or newly introduced adaptation layers are fine-tuned.
[0097] Learning rate adjustment: Set a small learning rate for the fine-tuned parameters to avoid excessive updates that could destroy the useful knowledge already learned by the pre-trained model.
[0098] Training with a small number of iterations: Train the model with a small number of epochs using a private dataset, monitor performance on the validation set, and prevent overfitting.
[0099] Evaluation and Application: After fine-tuning, evaluate the model's performance on the test set. The fine-tuned model can then be used for downscaling tasks on this private dataset.
[0100] Example 1: General Meteorological Data Downscaling Based on VAR and Transformer
[0101] How to build and train a general AI downscaling model based on VAR and Transformer to handle multiple meteorological variables and achieve conversion from low resolution to high resolution.
[0102] 1.1 Data Preparation and Preprocessing
[0103] 1.1.1 Data Source Selection
[0104] 1.1.1.1 Select publicly available meteorological datasets with broad coverage and long time series. For example, the ERA5 reanalysis data from the European Centre for Medium-Range Weather Forecasts (ECMWF) can be used as low-resolution input, with a horizontal resolution of approximately 0.25 degrees or 0.1 degrees. High-resolution target data can be selected from the output of regional climate models (RCMs), such as NOAA's HRRR Rapid Update Assimilation System, ICON's ICON-EU Regional Densification Model, or high-resolution satellite fusion products and ground observation gridded products (such as China's CLDAS).
[0105] 1.1.2 Variable Selection
[0106] 1.1.2.1 Select multiple meteorological variables that have a significant impact on regional climate and weather and have different spatial distribution characteristics. For example, you can select surface air temperature at 2 meters (t2m), wind speed at 10 meters (u10, v10), precipitation (tp), relative humidity (rh), sea level pressure (msl), etc.
[0107] 1.1.3 Spatiotemporal Scope and Division
[0108] 1.1.3.1 Divide the meteorological dataset into training, validation, and test sets based on time. For example, 1980-2000 can be used as the training set, 2001-2005 as the validation set, and 2006-2010 as the test set. Ensure that there is no temporal overlap between the different sets.
[0109] 1.1.4 Preprocessing steps
[0110] 1.1.4.1 Resampling and Alignment: Resample all selected low-resolution input data and high-resolution target data to a uniform reference grid (e.g., low resolution to 0.25 degrees, high resolution to 0.05 degrees or higher, depending on task requirements). Ensure consistent spatial extent and projection.
[0111] 1.1.4.2 Normalization: Normalize each meteorological variable individually so that its value ranges between 0 and 1 or between -1 and 1. This helps improve the stability and convergence speed of model training. Normalization parameters (such as minimum and maximum values) should be calculated from the training set and applied to the validation and test sets.
[0112] 1.1.4.3 Missing value handling: Check if there are missing values in the data and fill them with appropriate methods, such as using the average of neighboring grid points or by interpolation.
[0113] 1.2 Model Architecture Construction
[0114] 1.2.1 Shared Feature Encoder
[0115] 1.2.1.1 Construct a Transformer-based encoder. Low-resolution data can be divided into patches, which are then fed into a standard Transformer encoder layer after linear embedding and positional encoding. The encoder's output is a low-dimensional feature representation rich in contextual information. For example, the ViT encoder used divides the input image into 8×8 patches, each patch is projected to 256 dimensions, and then passed through 6 Transformer blocks.
[0116] 1.2.2 VAR-driven Transformer module across resolutions
[0117] 1.2.2.1 VAR Initialization: The lowest resolution feature map output by the encoder is used as the initial state of the VAR process.
[0118] 1.2.2.2 Multi-Scale Transformer Design: Design a Transformer architecture containing L scales. For example, if the goal is to reduce the degree from 0.25 degrees to 0.01 degrees (scaled up 25 times, equivalent to approximately 4.6 scales, 2^4.6≈25), 5 scales can be designed. Each scale *s* corresponds to a Transformer module *Trans*. s .
[0119] 1.2.2.3 Transformer Module Details: Each Transformer s It can contain several Transformer encoder blocks. Each block contains a multi-head self-attention mechanism (MHSA) and a feedforward neural network (FFN). The number of MHSA heads, d model The dimensions of the head and the hidden layer dimensions of the FFN are hyperparameters. For example, you can use 6 heads, d model =256, the hidden layer dimension of FFN is 512.
[0120] 1.2.2.4 Cross-scale connection: At each step of VAR, the predicted features (upsampled) from the previous scale s-1 are fused with the low-resolution input features (if available) from the current scale s, and then input into Trans. s Trans s The output features will be used for decoding at the current scale and VAR prediction at the next scale.
[0121] 1.2.3 Multivariable Decoder
[0122] 1.2.3.1 Independent Decoder Scheme: An independent decoder (Decoder_var) is designed for each target meteorological variable. Each decoder receives the features output by the corresponding scale Transformer module and restores them to the target resolution through a series of upsampling operations (such as transposed convolution, pixel shuffling, or bilinear interpolation combined with convolution). The decoder typically ends with a convolutional layer, outputting a single-channel prediction map.
[0123] 1.2.3.2 Shared Decoder and Multi-Head Output Scheme: A shared decoder can also be designed, whose output features are then processed by multiple independent, lightweight output heads, each responsible for predicting one variable.
[0124] 1.2.4 "Next-scale prediction module"
[0125] 1.2.4.1 This is a lightweight module (e.g., 1-2 convolutional layers) responsible for converting the decoder output (or the output of a key variable) at the current scale s into the initial features of the next scale s+1, which are then used as input for VAR iteration.
[0126] 1.3 Model Training
[0127] 1.3.1 Loss Function
[0128] 1.3.1.1 Calculate the model output at each prediction scale s of VAR. With the corresponding high-resolution true value The loss between the two. Commonly used loss functions include:
[0129] 1.3.1.2 Mean Square Error (MSE): L MSE = mean((Pred s,var - GT s,var ) 2 );
[0130] 1.3.1.3 Mean Absolute Error (MAE): L MAE = mean(abs(Pred s,var - GT s,var ));
[0131] 1.3.1.4 Structural Similarity Index (SSIM) Loss: L SSIM = 1 - SSIM(Pred s,var - GT s,var SSIM measures the structural similarity of images.
[0132] 1.3.1.5 Multi-scale Gradient Loss: Encourages predictions to be consistent with the ground truth at edges and textures.
[0133] 1.3.1.6 The total loss is the weighted sum of the losses at each scale and for each variable: Weight Adjustments can be made based on the importance of the variable and the difficulty of prediction.
[0134] 1.3.2 Optimizer and Learning Rate
[0135] 1.3.2.1 Use AdamW or the Adam optimizer. Set an initial learning rate (e.g., 1e-4 or 5e-5) and use a learning rate scheduling strategy, such as cosine annealing or ReduceLROnPlateau based on validation set performance.
[0136] 1.3.3 Training Process
[0137] 1.3.3.1 Perform multiple epochs of iteration on the training set. Each epoch iterates through the training dataset, performing forward propagation, loss calculation, backpropagation, and parameter updates. Periodically evaluate model performance on the validation set and save the best-performing model. Use an early stopping strategy to prevent overfitting.
[0138] 1.4 Model Evaluation
[0139] 1.4.1 Evaluation Indicators
[0140] 1.4.1.1 Evaluate the performance of the final model on an independent test set. In addition to the metrics (MSE, MAE, SSIM) corresponding to the loss function used during training, other commonly used metrics in the meteorological field can also be calculated, such as bias, correlation coefficient, percentile accuracy, etc.
[0141] 1.4.2 Visual Comparison
[0142] 1.4.2.1 Downscale prediction is performed on the samples in the test set, and the results are visualized and compared with the original low-resolution data, high-resolution ground truth, and other benchmark methods (such as bilinear interpolation and traditional statistical downscaling models) to intuitively demonstrate the advantages of the model.
[0143] 1.5 Training on Multiple Datasets
[0144] At the same time, multiple different meteorological datasets are used together as training datasets to train the model using the above training process, so that the model can absorb information at multiple scales.
[0145] Example 2:
[0146] Based on Example 1, this paper demonstrates how to effectively integrate static geographic information such as topography, elevation, and land use into a downscaling model based on VAR and Transformer to improve the downscaling accuracy in complex underlying surface areas.
[0147] 2.1 Preparation of Static Geographic Information Data
[0148] 2.1.1 Data Source Selection
[0149] 2.1.1.1 Digital Elevation Model (DEM): Acquire high-resolution DEM data, such as SRTM (Shuttle RadarTopography Mission) data (approximately 90-meter resolution) or ASTER GDEM (Advanced Spaceborne Thermal Emission and Reflection Radiometer Global Digital Elevation Model) data. DEM is the foundation for characterizing topographic relief.
[0150] 2.1.1.2 Slope and Aspect: Slope and aspect maps were calculated from DEM data. Slope affects surface runoff and solar radiation reception, while aspect affects sunlight and wind field.
[0151] 2.1.1.3 Land Use / Land Cover (LULC): Acquire high-resolution LULC data, such as LULC products from MODIS or Sentinel satellites. Different land surface types (such as forests, farmland, cities, and water bodies) have different albedo, roughness, and evapotranspiration characteristics, which significantly affect near-surface meteorological elements.
[0152] 2.1.1.4 Matching with meteorological data: Ensure that all static geographic information data and meteorological data are fully aligned in spatial extent, projected coordinate system, and grid system. If the resolution of the geographic information data is higher than that of the target meteorological data, it can be aggregated into the target grid; if it is lower, upsampling is required.
[0153] 2.2 Static Geographic Information Feature Processing and Fusion Strategies
[0154] 2.2.1 Feature Engineering and Coding
[0155] 2.2.1.1 DEM Derived Features: In addition to the original elevation, the Topographic Position Index (TPI), Topographic Roughness Index, Valley Index, etc. can be calculated to describe the terrain features more comprehensively.
[0156] 2.2.1.2 LULC Encoding: For categorical LULC data, one-hot encoding is used to convert it into a multidimensional binary feature map, or embedding is used to map it to a low-dimensional continuous vector space.
[0157] 2.2.2 Multi-scale representation
[0158] 2.2.2.1 To match the multi-scale characteristics of VAR models, static geographic information also needs to be represented at different scales. This can be achieved by progressive average pooling or convolutional downsampling of the high-resolution raw geographic information data to generate a series of geographic information feature maps (Geo) corresponding to the resolutions of each VAR scale. s ).
[0159] 2.2.3 Integration into the Transformer module
[0160] 2.2.3.1 At each scale s of the VAR-driven cross-resolution Transformer module, the corresponding static geographic information features Geo are... s Integrate with meteorological characteristics. Specific integration methods can include the following options or combinations:
[0161] 2.2.3.1.1 Channel Concatenation: This involves connecting the Geo... s The feature map is concatenated along the channel dimension with the meteorological feature map from the previous VAR scale and the low-resolution meteorological input feature map at the current scale (if used). This concatenated feature map is then passed through a linear projection layer and input into the Transformer encoder. This is the simplest and most direct fusion method, but it may lack deep interaction with the semantics of geographic information.
[0162] 2.2.3.1.2 Attention-based Modulation:
[0163] 2.2.3.1.2.1 As an additional Key and Value: Geo s Transformed into Key(K) via an independent linear projection (or a small ViT). geo ) and Value(V geo In the multi-head self-attention mechanism of the Transformer encoder, the Query(Q) of meteorological features met Not only with its own Key(K) met It interacts with Value (Vmet) and also with K. geo and V geoInteract with the model. This allows the model to learn to adjust its attention weights to meteorological features based on geographic information. The formula can be extended to: Attention(Q met , [K met , K geo ], [V met V geo ]).
[0164] 2.2.3.1.2.2 Gated Attention Mechanism: Design a gating unit whose switching is controlled by geographic information features to modulate the intensity of meteorological features or selectively enhance / suppress the meteorological feature response of certain areas.
[0165] 2.2.3.1.3 Conditional Normalization: Using geographic information features (Geo) s The parameters (scaling factor γ and translation factor β) of the conditional normalization layer (such as Spatially-Adaptive Normalization, SPADE, or Adaptive Instance Normalization, AdaIN) are predicted. These parameters are then used to normalize and modulate the meteorological features. This approach effectively incorporates geographic information into the adjustment of feature distribution.
[0166] 2.2.3.1.4 Dedicated Terrain Encoder and Feature Addition / Stitching: As mentioned in the literature, an improved method is used to design a dedicated terrain encoder to extract multi-scale terrain features, and then these features are added or stitched together with meteorological features at the corresponding scales. However, it should be noted that this will increase the model parameters.
[0167] 2.3 Model Training and Evaluation
[0168] 2.3.1 The training process and evaluation metrics are similar to those in Example 1. The key is to compare the model's performance on the test set after introducing static geographic information, especially whether there is a significant improvement in downscaling accuracy in areas with complex terrain (such as mountains, valleys, and urban clusters).
[0169] 2.3.2 The effectiveness of different geographic information fusion strategies can be verified through ablation experiments. For example, the model performance can be compared with no geographic information added, with the original DEM added, with the DEM and derived features added, and with different fusion methods.
[0170] Example 3:
[0171] How can we quickly adapt a pre-trained VAR and Transformer-based downscaling model on a large, general dataset to a specific private dataset through fine-tuning, thereby improving its downscaling performance on that private dataset? The private dataset may originate from meteorological observations in a specific region, outputs from a specific model, or meet specific application requirements.
[0172] 3.1 Preparation of Private Dataset
[0173] 3.1.1 Data Collection
[0174] 3.1.1.1 Collect private meteorological data for the target area or specific application. This may include low-resolution meteorological driving fields (such as reanalysis data or a subset of GCM output in the area) and corresponding high-resolution target data (such as regional meteorological station observations, local high-resolution numerical model outputs, or specific sensor data).
[0175] 3.1.2 Data Preprocessing
[0176] 3.1.2.1 Perform preprocessing on the private dataset similar to that in Example 1, including resampling and normalization. Key point: The normalization parameters should be as consistent as possible with the parameters used in the pre-trained model. Alternatively, if the distribution of the private data differs significantly from that of the pre-trained data, the normalization parameters can be recalculated based on the private data, but this may require a more extensive adjustment to the model.
[0177] 3.1.3 Divide the training set and validation set
[0178] 3.1.3.1 Allocate a portion of the private dataset as the training and validation sets for fine-tuning. If the amount of private data is small, methods such as cross-validation can be used.
[0179] 3.2 Loading the pre-trained model
[0180] 3.2.1 Load the model weights obtained from pre-training on a large general dataset (such as the model trained in Example 1). This pre-trained model has learned universal meteorological downscaling patterns and feature representation capabilities.
[0181] 3.3 Fine-tuning strategy
[0182] 3.3.1 Parameter Selection and Freezing
[0183] 3.3.1.1 Partial Freezing: A common strategy is to freeze the parameters of the lower-level models and only fine-tune the parameters of the upper-level models. The lower-level models typically learn more general and fundamental features (such as edges and textures), while the upper-level models tend to learn features more relevant to specific tasks or data distributions. For VAR models, one could consider freezing the encoder and the Transformer module at early VAR scales, and only fine-tuning the Transformer module and decoder at later scales (closer to the output resolution).
[0184] 3.3.1.2 Specific layer fine-tuning: For example, fine-tuning only the parameters of the decoder, or only the parameters of the modules related to the fusion of static geographic information (if the geographic information features of the private dataset are significantly different from those of the pre-training data).
[0185] 3.3.1.3 Introducing New Adaptor Layers: If the feature space of the private dataset differs significantly from that of the pre-training data, new, trainable adapter layers can be introduced in certain parts of the model (such as after the encoder or before the decoder). These can be small fully connected networks or convolutional layers. These adapter layers are responsible for mapping the features of the private data to a representation space that the pre-trained model can handle better, or for adjusting the output of the pre-trained model to fit the target space of the private data.
[0186] 3.3.2 Learning Rate Setting
[0187] 3.3.2.1 Set a small learning rate for the fine-tuned parameters, typically 1-2 orders of magnitude lower than the learning rate during pre-training (e.g., 1e-5 or less). This is because the pre-trained model is already near a good local optimum, and an excessively large learning rate may cause the model to jump out of that region or destroy the useful knowledge it has already learned.
[0188] 3.3.2.2 For newly introduced adaptation layers (if used), a relatively high learning rate can be set because they are trained from random initialization.
[0189] 3.3.3 Loss Function
[0190] 3.3.3.1 The same loss function as in the pre-training phase can be used, or it can be adjusted according to the characteristics of the private dataset. For example, if certain meteorological variables or specific regions are more important in the private dataset, the weights of the corresponding terms in the loss function can be adjusted.
[0191] 3.4 Fine-tuning the training process
[0192] 3.4.1 Train the selected model parameters using the training set of a private dataset. Since fine-tuning typically involves only a small number of parameters and data, the training process is much faster than training from scratch.
[0193] 3.4.2 After each epoch, evaluate the model performance on the validation set of the private dataset.
[0194] 3.4.3 An early stopping strategy is adopted: training is stopped when the performance of the validation set no longer improves or begins to decline.
[0195] 3.4.4 Save the best performing model on the validation set as the final fine-tuning model.
[0196] 3.5 Evaluation and Application
[0197] 3.5.1 Perform a final evaluation of the fine-tuned model on a test set (if split) of a private dataset or on a separate evaluation dataset. Compare the model performance before and after fine-tuning to quantify the improvement brought about by the fine-tuning.
[0198] 3.5.2 Apply the fine-tuned model to a real-world private data downscaling task.
[0199] Advantages and benefits of this invention:
[0200] (1) Improve downscaling accuracy and physical consistency: By combining the scale-by-scale refinement of VAR prediction with the powerful modeling capabilities of Transformer for long-range dependencies and multivariate relationships, this invention can more accurately capture the spatial distribution details of meteorological elements, especially in areas with complex terrain. Multivariate joint modeling helps to utilize the physical constraints between variables to improve the physical consistency of prediction results.
[0201] (2) Enhance the efficiency of utilizing static geographic information: By designing specialized feature fusion modules (such as attention modulation and gating mechanisms) to effectively integrate static geographic information such as topography, altitude, and land use into the downscaling process, the model can better understand the impact of the underlying surface on meteorological elements, thereby obtaining more refined and accurate downscaling results in areas with significant geographic features such as mountainous areas and coastal areas.
[0202] (3) Achieving arbitrary resolution input and arbitrary scale downscaling: The core idea of the VAR model is "next-scale prediction," which allows the model to start from any given low resolution and gradually predict higher resolution details until the user-specified target resolution is reached. This autoregressive characteristic gives the model the flexibility to handle data from different sources and with different initial resolutions, and enables continuous scale downscaling rather than fixed integer scaling. This overcomes the dependence of traditional methods on fixed scaling factors.
[0203] (4) Improve computational efficiency and model generalization: By using a shared encoder to process multivariate inputs and by gradually refining the model within the VAR framework, the number of model parameters and computational complexity can be reduced to some extent. This is especially efficient when dealing with multiple variables compared to training multiple independent models. At the same time, the pre-training plus fine-tuning strategy allows the model to first learn universal weather patterns and downscaling rules on a large-scale general dataset, and then quickly adapt to the characteristics of the private dataset through fine-tuning on a small number of specific data. This ensures the model's generalization ability and improves its performance in specific application scenarios, while avoiding the high cost of training from scratch for each new dataset.
[0204] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A VAR-based cross-resolution AI downscaling method, characterized in that: Includes the following steps: S1. Data preparation and preprocessing: Acquire low-resolution meteorological data from multiple sources and corresponding high-resolution target data, prepare static geographic information data, match the spatial range of static geographic information data with meteorological data, preprocess the input low-resolution meteorological data, process the static geographic information data, and generate feature maps with the same spatial reference and grid size as the meteorological data. S2. Multi-scale feature encoding and VAR initialization: The preprocessed low-resolution meteorological data is input into the shared feature encoder to extract the initial context features. The lowest resolution feature output by the encoder is used as the starting point of the VAR process to predict the next higher resolution feature representation. S3, Cross-resolution Transformer interaction and feature enhancement: Construct a Transformer architecture that includes multiple scales. At each prediction scale of VAR, introduce a Transformer module. Through the multi-head self-attention mechanism and cross-scale attention mechanism of the Transformer, learn the dependencies between features at different scales, and fuse static geographic information features to enhance and refine the features at the current scale. S4. Multivariate Output and Autoregressive Iteration: At each VAR prediction scale, the enhanced features by the Transformer module are input into the multivariate decoder. The multivariate decoder maps the fused features back to the meteorological variable space and outputs the predicted values of each target meteorological variable at the current scale. The predicted values are used as part of the input for the VAR model to predict the next higher resolution scale, or are used to calculate the loss function. The VAR process starts from the lowest resolution and predicts higher resolution features and meteorological fields step by step until the target resolution is reached. S5. Loss Calculation and Model Training: At each prediction scale of VAR, calculate the loss between the model output and the corresponding high-resolution ground truth, and optimize the model parameters through the backpropagation algorithm. S6. Model Fine-tuning and Application: Based on the pre-trained general downscaling model, freeze the underlying parameters of the model for the set private dataset, and only fine-tune the top decoder or the set adaptation layer, and use the private dataset for iterative training.
2. The VAR-based cross-resolution AI downscaling method according to claim 1, characterized in that: In step S1, the static geographic information data is processed to generate a feature map with the same spatial reference and grid size as the meteorological data, including: S11. Obtain high-resolution digital elevation model data, slope data, aspect data, and land use / land cover data; S12. Perform feature engineering on the raw geographic information data, and perform one-hot coding or embedding coding on categorical data; S13. By performing stepwise pooling or average pooling on the high-resolution raw geographic information data, feature maps of different resolutions are generated; or the highest resolution geographic information is directly input and interacts with meteorological features of different scales through an attention mechanism within the Transformer. S14. In the cross-resolution Transformer interaction module, the static geographic information features and meteorological features of the corresponding scale are fused.
3. The VAR-based cross-resolution AI downscaling method according to claim 2, characterized in that: In step S14, within the cross-resolution Transformer interaction module, static geographic information features at the corresponding scale are fused with meteorological features, including: Channel concatenation: Static geographic information feature maps and meteorological feature maps are concatenated along the channel dimension and then input into the linear projection layer; Attention modulation: Static geographic information features are used as additional key and value inputs into the Transformer's attention mechanism, allowing the meteorological feature query to focus on geographic information; Gating mechanism: A gating unit is designed to modulate the intensity of meteorological features or selectively enhance regional features based on static geographic information features; Conditional normalization: Static geographic information features are used to predict the parameters of the conditional normalization layer, normalizing and modulating the meteorological features.
4. The VAR-based cross-resolution AI downscaling method according to claim 1, characterized in that: In step S3, cross-resolution Transformer interaction and feature enhancement include: S31. Multi-scale feature alignment and input: For the current prediction scale s in the VAR process, receive VAR prediction features from the previous scale s-1. If the original low-resolution input exhibits different characteristics at different scales, then the low-resolution input features corresponding to scale s will be... As input; processed static geographic information features Alignment is performed on scale s; S32, Feature stitching and linear projection: [This section appears to be incomplete and requires further context.] , and The features are spliced along the channel dimension to obtain the fused features. Then, through a linear projection layer, Mapping to the expected input dimensions of the Transformer module The initial token sequence is obtained. If the input consists of multiple patches, then the feature vectors of each patch form a sequence. One of the elements; S33, Positional Encoding Injection: For sequence... Add a learnable location code to each token; S34, Transformer encoder processing: Transforms the token sequence with position encoding. The input is fed into a module composed of stacked Transformer encoder blocks. Through the multi-head self-attention mechanism of the Transformer encoder blocks, the model captures the long-range dependencies between different spatial locations within the current scale s. S35, Cross-scale attention mechanism: Introduce a cross-scale attention mechanism between Transformer modules of different scales; S36. Feature Refinement and Output: After processing by a multi-layer Transformer encoder, the enhanced feature representation at the current scale s is obtained. , It will be used for subsequent multivariate decoding and next-scale prediction of VAR.
5. The VAR-based cross-resolution AI downscaling method according to claim 4, characterized in that: In step S34, the Transformer encoder block includes a multi-head self-attention mechanism and a feedforward neural network.
6. The VAR-based cross-resolution AI downscaling method according to claim 1, characterized in that: In step S4, the multivariate output and autoregressive iteration include: S41. Decoder Design: Design a decoder for each VAR prediction scale s. The decoder receives the enhanced features output from the corresponding scale Transformer module. If a shared encoder-multiple decoder architecture is adopted, then each target meteorological variable has its own independent decoder. If a shared decoder is used, multiple independent output heads are set at the end of the decoder. Each head is responsible for predicting a set weather variable; S42. Current Scale Prediction: Enhanced Features Input to decoder The prediction results of each meteorological variable at the current scale s are obtained. ; S43, Autoregressive Iteration: The prediction results at the current scale s are... As input, initial features for the next higher resolution scale s+1 are predicted through a lightweight next-scale prediction module. , As the starting point of the VAR process at scale s+1, it is sent to the cross-resolution Transformer interaction module for processing; S44. Loss Calculation: At each prediction scale s, the prediction result output by the decoder is calculated. With the corresponding high-resolution true value Compare and calculate the loss And calculate the total loss.
7. The VAR-based cross-resolution AI downscaling method according to claim 6, characterized in that: In step S41, the decoder is a decoder structure based on CNN upsampling blocks or Transformer; In step S43, As the starting point of the VAR process at scale s+1, it is fed into the cross-resolution Transformer interaction module for processing, including: Start with the lowest resolution scale and work upwards step by step until the preset target highest resolution scale is reached.
8. The VAR-based cross-resolution AI downscaling method according to claim 1, characterized in that: In step S44, the expression for calculating the total loss is as follows: ; In the formula, For the total loss, For predefined weights, For variables In the prediction scale The losses.
9. A VAR-based cross-resolution AI downscaling method according to claim 1, characterized in that: In step S6, model fine-tuning and application include: S61. Loading the pre-trained model: Load the pre-trained general downscaling model; S62. Parameter freezing strategy: Set the freezing layer and its parameters according to the size of the private dataset and its similarity to the pre-training dataset; S63, Learning Rate Adjustment: Set the learning rate for fine-tuning parameters; S64. Iterative Training: Use a private dataset to train the model in epochs and monitor its performance on the validation set. S65. Evaluation and Application: After fine-tuning, evaluate the model performance on the test set, and use the fine-tuned model to perform a downscaling task on the private dataset.