[go: up one dir, main page]

CN117236201A - A downscaling method based on Diffusion and ViT - Google Patents

A downscaling method based on Diffusion and ViT Download PDF

Info

Publication number
CN117236201A
CN117236201A CN202311525721.XA CN202311525721A CN117236201A CN 117236201 A CN117236201 A CN 117236201A CN 202311525721 A CN202311525721 A CN 202311525721A CN 117236201 A CN117236201 A CN 117236201A
Authority
CN
China
Prior art keywords
model
diffusion
resolution
vit
steps
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311525721.XA
Other languages
Chinese (zh)
Other versions
CN117236201B (en
Inventor
季焱
智协飞
张永宏
卢楚翰
彭婷
张玲
王靖宇
陈超辉
吉璐莹
吕阳
朱寿鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Institute Of Meteorological Science And Technology Innovation
National University of Defense Technology
Nanjing University of Information Science and Technology
Wuxi University
Original Assignee
Nanjing Institute Of Meteorological Science And Technology Innovation
National University of Defense Technology
Nanjing University of Information Science and Technology
Wuxi University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Institute Of Meteorological Science And Technology Innovation, National University of Defense Technology, Nanjing University of Information Science and Technology, Wuxi University filed Critical Nanjing Institute Of Meteorological Science And Technology Innovation
Priority to CN202311525721.XA priority Critical patent/CN117236201B/en
Publication of CN117236201A publication Critical patent/CN117236201A/en
Application granted granted Critical
Publication of CN117236201B publication Critical patent/CN117236201B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Image Processing (AREA)

Abstract

本发明公开了一种基于Diffusion和ViT的降尺度方法,包括以下步骤:S1建立低分辨率数值模式降水预报与高分辨率降水观测样本,并进行预处理;S2构建Diffusion‑Vision‑Transformer降水预报模型;S3训练模型,直至Diffusion‑Vision‑Transformer的误差收敛,保存模型并进行预测;本发明通过利用Vision Transformer模型代替原始Diffusion模型中的U‑Net结构,大幅提高模型的训练效率,减低模型用于预测的时间。

The invention discloses a downscaling method based on Diffusion and ViT, which includes the following steps: S1 establishes low-resolution numerical model precipitation forecast and high-resolution precipitation observation samples, and performs preprocessing; S2 constructs Diffusion-Vision-Transformer precipitation forecast model; S3 trains the model until the error of the Diffusion‑Vision‑Transformer converges, saves the model and makes predictions; the present invention greatly improves the training efficiency of the model and reduces the usage of the model by using the Vision Transformer model to replace the U‑Net structure in the original Diffusion model. at the predicted time.

Description

一种基于Diffusion和ViT的降尺度方法A downscaling method based on Diffusion and ViT

技术领域Technical field

本发明涉及气象预报技术领域,具体涉及一种基于Diffusion和ViT的降尺度方法。The invention relates to the technical field of weather forecasting, and specifically relates to a downscaling method based on Diffusion and ViT.

背景技术Background technique

传统统计降尺度方法多数是基于线性框架的模型,难以处理复杂且高维的气象场数据和表征大气非线性动力过程。深度学习的兴起为表征学习如气象要素场之类的、高维且强非线性的复杂数据提供了新的方向。通过利用高效的空间特征提取模块,提取高维空间数据的关键信息,建立低分辨率输入到高分辨率输出的统计模型,深度学习模型能够有效地应用于图片去噪、提高图片分辨率等场景,而此类方法一般被称为“超分辨率”模型。但如何将其高效地迁移到气象学的降尺度问题,同时进一步提高模型的计算效率与预报准确率,仍需要进一步的研究与探索。Most of the traditional statistical downscaling methods are based on linear framework models, which are difficult to handle complex and high-dimensional meteorological field data and characterize the nonlinear dynamic processes of the atmosphere. The rise of deep learning provides a new direction for representation learning of high-dimensional and highly nonlinear complex data such as meteorological element fields. By using an efficient spatial feature extraction module to extract key information of high-dimensional spatial data and establish a statistical model from low-resolution input to high-resolution output, the deep learning model can be effectively used in scenarios such as image denoising and image resolution improvement. , and such methods are generally called "super-resolution" models. However, how to efficiently transfer it to the downscaling problem of meteorology while further improving the computational efficiency and forecast accuracy of the model still requires further research and exploration.

发明内容Contents of the invention

发明目的:本发明的目的是提供一种基于Diffusion和ViT的降尺度方法以解决数值模式降水预报空间分辨率不足、预报误差大的问题。Purpose of the invention: The purpose of the invention is to provide a downscaling method based on Diffusion and ViT to solve the problems of insufficient spatial resolution and large forecast errors in numerical model precipitation forecasts.

技术方案:本发明所述的一种基于Diffusion和ViT的降尺度方法,包括以下步骤:Technical solution: a downscaling method based on Diffusion and ViT according to the present invention, including the following steps:

S1:建立低分辨率数值模式降水预报与高分辨率降水观测样本,并进行预处理;S1: Establish low-resolution numerical model precipitation forecast and high-resolution precipitation observation samples, and perform preprocessing;

S2:构建Diffusion-Vision-Transformer降水预报模型;包括以下步骤:S2: Construct the Diffusion-Vision-Transformer precipitation forecast model; including the following steps:

S21:在Diffusion模型中对高分辨率降水观测样本进行前向加噪;S21: Perform forward noise on high-resolution precipitation observation samples in the Diffusion model;

S22:利用Vision-Transformer模型提取低分辨率数值模式降水预报的高阶空间特征;S22: Use the Vision-Transformer model to extract high-order spatial features of low-resolution numerical model precipitation forecast;

S23:在Diffusion模型中对步骤S21得到的结果进行去噪,并引入步骤S22得到的高阶空间特征作为条件信息,得到降尺度后的高分辨率降水预报;S23: Denoise the results obtained in step S21 in the Diffusion model, and introduce the high-order spatial features obtained in step S22 as condition information to obtain a downscaled high-resolution precipitation forecast;

S3:训练模型,直至Diffusion-Vision-Transformer的误差收敛,保存模型并进行预测。S3: Train the model until the error of Diffusion-Vision-Transformer converges, save the model and make predictions.

进一步的,所述步骤S1中,预处理包括:对数据集进行对数化、归一化的操作。Further, in the step S1, the preprocessing includes: performing logarithmic and normalization operations on the data set.

进一步的,所述步骤S21具体过程如下:Further, the specific process of step S21 is as follows:

设某一时刻预处理后的高分辨率降水观测样本,分T次逐步对原始观测添加高斯噪声/>,得到/>;则第t时刻的数据分布/>前一时刻公式如下:Assume that the preprocessed high-resolution precipitation observation sample at a certain time , gradually add Gaussian noise to the original observations in T times/> ,get/> ;Then the data distribution at time t/> previous moment The formula is as follows:

;

其中,是预设的常数超参数,范围在0和1之间;in, is a preset constant hyperparameter, ranging between 0 and 1;

最后第t时刻的数据分布可以由第0时刻的数据/>分布得到,公式如下:The data distribution at the last t-th time It can be obtained from the data at time 0/> The distribution is obtained, and the formula is as follows:

;

其中,,且对于/>,则/>in, , and for/> , then/> .

进一步的,所述S22具体如下:输入配对的高分辨率降水观测样本和低分辨率数值模式降水预报/>,并确定前向加噪的步数T,以及所加随机高斯噪声的方差超参数Further, the details of S22 are as follows: input paired high-resolution precipitation observation samples and low-resolution numerical model precipitation forecast/> , and determine the number of steps T for forward noise addition, and the variance hyperparameter of the added random Gaussian noise. .

进一步的,所述步骤S23包括以下步骤:Further, the step S23 includes the following steps:

S231:将低分辨率数值模式降水预报分割为若干个图块,然后对分割的图块进行进行线性映射;S231: Divide the low-resolution numerical model precipitation forecast into several blocks, and then linearly map the divided blocks;

S232:利用位置编码表示不同图块的位置信息,将处理后的编码信息作为N组自注意力模块的输入;S232: Use position coding to represent the position information of different blocks, and use the processed coding information as the input of N groups of self-attention modules;

S233:利用空间自注意力模块代替卷积操作。S233: Use spatial self-attention module to replace convolution operation.

进一步的,所述步骤S231公式如下:Further, the formula of step S231 is as follows:

; ;

其中,为一组分割后的图块,/>为待训练的权重系数,/>为待训练的截断系数,/>为经过线性映射后的一组向量。in, is a group of divided tiles,/> is the weight coefficient to be trained,/> is the truncation coefficient to be trained,/> is a set of vectors after linear mapping.

进一步的,所述步骤S232位置编码为二维位置嵌入方法。Further, the position encoding in step S232 is a two-dimensional position embedding method.

进一步的,所述步骤S233具体如下:Further, the details of step S233 are as follows:

设一组分割后的图块为,利用三组权重,即查询权重/>、键值权重/>、和数值权重/>,将原始数据分为三个特征:查询矩阵/>、键值矩阵/>、数值矩阵/>;则/>对应的自注意力/>公式如下:Let a group of divided tiles be , using three sets of weights, namely query weights/> , key value weight/> , and numerical weight/> , divide the original data into three features: query matrix/> , key value matrix/> , numerical matrix/> ;then/> Corresponding self-attention/> The formula is as follows:

;

其中,为/>维度的平方根。in, for/> The square root of the dimension.

进一步的,所述步骤S3具体如下:Further, the details of step S3 are as follows:

设经过步骤S21-S22得到的结果为:,其中,为为步骤S21-S22得到的模型,/>为低分辨率数值模式降水预报,/>为配对的高分辨率降水观测样本,/>为步骤S21中预设的超参数,T为步骤S21中前向加噪的步数;则步骤S3中Diffusion-Vision-Transforme模型的预报误差/>公式如下:Assume that the result obtained through steps S21-S22 is: ,in, is the model obtained in steps S21-S22,/> For low-resolution numerical model precipitation forecast,/> For paired high-resolution precipitation observation samples,/> is the preset hyperparameter in step S21, and T is the number of steps of forward noise addition in step S21; then the prediction error of the Diffusion-Vision-Transforme model in step S3/> The formula is as follows:

;

其中,为随机高斯分布,则/>in, is a random Gaussian distribution, then/> ;

当Diffusion-Vision-Transforme模型的预报误差收敛时,逆向推断T步直到得到模型预测/>;其中,前一步的/>由后一步的/>得到,公式如下:When the forecast error of the Diffusion-Vision-Transforme model When convergence occurs, the T steps are extrapolated backward until the model prediction is obtained/> ; Among them, the previous step's /> From the next step/> Obtained, the formula is as follows:

;

其中,为为步骤S21-S22得到的模型,/>为低分辨率数值模式降水预报,/>为步骤S21中预设的超参数,/>为随机高斯分布,则/>in, is the model obtained in steps S21-S22,/> For low-resolution numerical model precipitation forecast,/> is the hyperparameter preset in step S21,/> is a random Gaussian distribution, then/> .

本发明所述的一种设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的程序,所述处理器执行所述程序时实现任一项所述的一种基于Diffusion和ViT的降尺度方法中的步骤。A device according to the present invention includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements any one of the Diffusion and Diffusion-based methods. Steps in ViT’s downscaling method.

有益效果:与现有技术相比,本发明具有如下显著优点:(1)通过利用Diffusion模型提高降尺度预报的精细化程度,尤其在针对降尺度倍数超过4的任务中更具优势;(2)通过利用Vision Transformer模型代替原始Diffusion模型中的U-Net结构,大幅提高模型的训练效率,减低模型用于预测的时间。Beneficial effects: Compared with the existing technology, the present invention has the following significant advantages: (1) By using the Diffusion model to improve the degree of refinement of downscaling forecasts, it is especially advantageous in tasks with downscaling multiples exceeding 4; (2) ) By using the Vision Transformer model to replace the U-Net structure in the original Diffusion model, the training efficiency of the model is greatly improved and the time for the model to be used for prediction is reduced.

附图说明Description of drawings

图1为本发明总流程图;Figure 1 is a general flow chart of the present invention;

图2为Diffusion-ViT模型训练流程示意图;Figure 2 is a schematic diagram of the Diffusion-ViT model training process;

图3为Diffusion模型示意图;Figure 3 is a schematic diagram of the Diffusion model;

图4为Vision-Transformer模型示意图。Figure 4 is a schematic diagram of the Vision-Transformer model.

实施方式Implementation

下面结合附图对本发明的技术方案作进一步说明。The technical solution of the present invention will be further described below with reference to the accompanying drawings.

如图1所示,本发明实施例提供了一种基于Diffusion和ViT的降尺度方法,包括以下步骤:As shown in Figure 1, the embodiment of the present invention provides a downscaling method based on Diffusion and ViT, which includes the following steps:

S1:建立低分辨率数值模式降水预报与高分辨率降水观测样本,并进行预处理;预处理包括:对数据集进行对数化、归一化的操作。S1: Establish low-resolution numerical model precipitation forecast and high-resolution precipitation observation samples, and perform preprocessing; preprocessing includes: logarithmizing and normalizing the data set.

如图2所示,S2:构建Diffusion-Vision-Transformer降水预报模型;包括以下步骤:As shown in Figure 2, S2: Construct the Diffusion-Vision-Transformer precipitation forecast model; including the following steps:

S21:在Diffusion模型中对高分辨率降水观测样本进行前向加噪;具体如下:如图3所示,设某一时刻预处理后的高分辨率降水观测样本,分T次逐步对原始观测添加高斯噪声/>,得到/>;则第t时刻的数据分布/>前一时刻/>公式如下:;则第t时刻的数据分布/>前一时刻/>公式如下:S21: Perform forward noise on high-resolution precipitation observation samples in the Diffusion model; the details are as follows: As shown in Figure 3, assume that the high-resolution precipitation observation samples are preprocessed at a certain time , gradually add Gaussian noise to the original observations in T times/> ,get/> ;Then the data distribution at time t/> Previous moment/> The formula is as follows:;Then the data distribution at time t/> Previous moment/> The formula is as follows:

;

其中,是预设的常数超参数,范围在0和1之间;in, is a preset constant hyperparameter, ranging between 0 and 1;

最后第t时刻的数据分布可以由第0时刻的数据/>分布得到,公式如下:The data distribution at the last t-th time It can be obtained from the data at time 0/> The distribution is obtained, and the formula is as follows:

;

其中,,且对于/>,则/>in, , and for/> , then/> .

S22:利用Vision-Transformer模型提取低分辨率数值模式降水预报的高阶空间特征;具体如下:输入配对的高分辨率降水观测样本和低分辨率数值模式降水预报/>,并确定前向加噪的步数T,以及所加随机高斯噪声的方差超参数/>S22: Use the Vision-Transformer model to extract high-order spatial features of low-resolution numerical model precipitation forecasts; details are as follows: input paired high-resolution precipitation observation samples and low-resolution numerical model precipitation forecast/> , and determine the number of steps T for forward noise addition, and the variance hyperparameter of the added random Gaussian noise/> .

在Diffusion模型中对步骤S21得到的结果进行去噪,并引入步骤S22得到的高阶空间特征作为条件信息,得到降尺度后的高分辨率降水预报;Denoise the results obtained in step S21 in the Diffusion model, and introduce the high-order spatial features obtained in step S22 as condition information to obtain a downscaled high-resolution precipitation forecast;

包括以下步骤:Includes the following steps:

S231:如图4所示,将低分辨率数值模式降水预报分割为若干个图块,然后对分割的图块进行进行线性映射;公式如下:S231: As shown in Figure 4, the low-resolution numerical model precipitation forecast is divided into several blocks, and then the divided blocks are linearly mapped; the formula is as follows:

; ;

其中,为一组分割后的图块,/>为待训练的权重系数,/>为待训练的截断系数,/>为经过线性映射后的一组向量。in, is a group of divided tiles,/> is the weight coefficient to be trained,/> is the truncation coefficient to be trained,/> is a set of vectors after linear mapping.

S232:利用位置编码表示不同图块的位置信息,将处理后的编码信息作为N组自注意力模块的输入;其中,位置编码为二维位置嵌入方法,具体为:通过对每个图块相对于X轴和Y轴的位置进行编码,用不同的位置编码表示不同图块。S232: Use position coding to represent the position information of different blocks, and use the processed encoding information as the input of N groups of self-attention modules; where the position coding is a two-dimensional position embedding method, specifically: by comparing each block to Coding is performed on the X-axis and Y-axis positions, and different position codes are used to represent different blocks.

S233:利用空间自注意力模块代替卷积操作。具体如下:S233: Use spatial self-attention module to replace convolution operation. details as follows:

设一组分割后的图块为,利用三组权重,即查询权重/>、键值权重/>、和数值权重/>,将原始数据分为三个特征:查询矩阵/>、键值矩阵/>、数值矩阵/>;则/>对应的自注意力/>公式如下:Let a group of divided tiles be , using three sets of weights, namely query weights/> , key value weight/> , and numerical weight/> , divide the original data into three features: query matrix/> , key value matrix/> , numerical matrix/> ;then/> Corresponding self-attention/> The formula is as follows:

;

其中,为/>维度的平方根。空间自注意力模块由正则层、多头自注意力、残差结构、前馈神经网络组成。in, for/> The square root of the dimension. The spatial self-attention module consists of a regular layer, multi-head self-attention, residual structure, and feed-forward neural network.

S3:训练模型,直至Diffusion-Vision-Transformer的误差收敛,保存模型并进行预测。具体如下:S3: Train the model until the error of Diffusion-Vision-Transformer converges, save the model and make predictions. details as follows:

设经过步骤S21-S22得到的结果为:,其中,为为步骤S21-S22得到的模型,/>为低分辨率数值模式降水预报,/>为配对的高分辨率降水观测样本,/>为步骤S21中预设的超参数,T为步骤S21中前向加噪的步数;则步骤S3中Diffusion-Vision-Transforme模型的预报误差/>公式如下:Assume that the result obtained through steps S21-S22 is: ,in, is the model obtained in steps S21-S22,/> For low-resolution numerical model precipitation forecast,/> For paired high-resolution precipitation observation samples,/> is the preset hyperparameter in step S21, and T is the number of steps of forward noise addition in step S21; then the prediction error of the Diffusion-Vision-Transforme model in step S3/> The formula is as follows:

;

其中,为随机高斯分布,则/>in, is a random Gaussian distribution, then/> ;

当Diffusion-Vision-Transforme模型的预报误差收敛时,逆向推断T步直到得到模型预测/>;其中,前一步的/>由后一步的/>得到,公式如下:When the forecast error of the Diffusion-Vision-Transforme model When convergence occurs, the T steps are extrapolated backward until the model prediction is obtained/> ; Among them, the previous step's /> From the next step/> Obtained, the formula is as follows:

;

其中,为为步骤S21-S22得到的模型,/>为低分辨率数值模式降水预报,/>为步骤S21中预设的超参数,/>为随机高斯分布,则/>in, is the model obtained in steps S21-S22,/> For low-resolution numerical model precipitation forecast,/> is the hyperparameter preset in step S21,/> is a random Gaussian distribution, then/> .

本发明实施例还提供一种设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的程序,所述处理器执行所述程序时实现任一项所述的一种基于Diffusion和ViT的降尺度方法中的步骤。An embodiment of the present invention also provides a device, including a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements any one of the Diffusion-based and steps in ViT’s downscaling method.

Claims (10)

1.一种基于Diffusion和ViT的降尺度方法,其特征在于,包括以下步骤:1. A downscaling method based on Diffusion and ViT, which is characterized by including the following steps: S1:建立低分辨率数值模式降水预报与高分辨率降水观测样本,并进行预处理;S1: Establish low-resolution numerical model precipitation forecast and high-resolution precipitation observation samples, and perform preprocessing; S2:构建Diffusion-Vision-Transformer降水预报模型;包括以下步骤:S2: Construct the Diffusion-Vision-Transformer precipitation forecast model; including the following steps: S21:在Diffusion模型中对高分辨率降水观测样本进行前向加噪;S21: Perform forward noise on high-resolution precipitation observation samples in the Diffusion model; S22:利用Vision-Transformer模型提取低分辨率数值模式降水预报的高阶空间特征;S22: Use the Vision-Transformer model to extract high-order spatial features of low-resolution numerical model precipitation forecast; S23:在Diffusion模型中对步骤S21得到的结果进行去噪,并引入步骤S22得到的高阶空间特征作为条件信息,得到降尺度后的高分辨率降水预报;S23: Denoise the results obtained in step S21 in the Diffusion model, and introduce the high-order spatial features obtained in step S22 as condition information to obtain a downscaled high-resolution precipitation forecast; S3:训练模型,直至Diffusion-Vision-Transformer的误差收敛,保存模型并进行预测。S3: Train the model until the error of Diffusion-Vision-Transformer converges, save the model and make predictions. 2.根据权利要求1所述的一种基于Diffusion和ViT的降尺度方法,其特征在于,所述步骤S1中,预处理包括:对数据集进行对数化、归一化的操作。2. A downscaling method based on Diffusion and ViT according to claim 1, characterized in that, in step S1, preprocessing includes: performing logarithmic and normalization operations on the data set. 3.根据权利要求1所述的一种基于Diffusion和ViT的降尺度方法,其特征在于,所述步骤S21具体过程如下:3. A downscaling method based on Diffusion and ViT according to claim 1, characterized in that the specific process of step S21 is as follows: 设某一时刻预处理后的高分辨率降水观测样本,分T次逐步对原始观测添加高斯噪声/>,得到/>;则第t时刻的数据分布/>前一时刻/>公式如下:Assume that the preprocessed high-resolution precipitation observation sample at a certain time , gradually add Gaussian noise to the original observations in T times/> ,get/> ;Then the data distribution at time t/> Previous moment/> The formula is as follows: ; 其中,是预设的常数超参数,范围在0和1之间;in, is a preset constant hyperparameter, ranging between 0 and 1; 最后第t时刻的数据分布可以由第0时刻的数据/>分布得到,公式如下:The data distribution at the last t-th time It can be obtained from the data at time 0/> The distribution is obtained, and the formula is as follows: ; 其中,,且对于/>,则/>in, , and for/> , then/> . 4.根据权利要求1所述的一种基于Diffusion和ViT的降尺度方法,其特征在于,所述S22具体如下:输入配对的高分辨率降水观测样本和低分辨率数值模式降水预报/>,并确定前向加噪的步数T,以及所加随机高斯噪声的方差超参数/>4. A downscaling method based on Diffusion and ViT according to claim 1, characterized in that the S22 is as follows: input paired high-resolution precipitation observation samples and low-resolution numerical model precipitation forecast/> , and determine the number of steps T for forward noise addition, and the variance hyperparameter of the added random Gaussian noise/> . 5.根据权利要求1所述的一种基于Diffusion和ViT的降尺度方法,其特征在于,所述步骤S23包括以下步骤:5. A downscaling method based on Diffusion and ViT according to claim 1, characterized in that step S23 includes the following steps: S231:将低分辨率数值模式降水预报分割为若干个图块,然后对分割的图块进行进行线性映射;S231: Divide the low-resolution numerical model precipitation forecast into several blocks, and then linearly map the divided blocks; S232:利用位置编码表示不同图块的位置信息,将处理后的编码信息作为N组自注意力模块的输入;S232: Use position coding to represent the position information of different blocks, and use the processed coding information as the input of N groups of self-attention modules; S233:利用空间自注意力模块代替卷积操作。S233: Use spatial self-attention module to replace convolution operation. 6.根据权利要求4所述的一种基于Diffusion和ViT的降尺度方法,其特征在于,所述步骤S231公式如下:6. A downscaling method based on Diffusion and ViT according to claim 4, characterized in that the formula of step S231 is as follows: ; ; 其中,为一组分割后的图块,/>为待训练的权重系数,/>为待训练的截断系数,/>为经过线性映射后的一组向量。in, is a group of divided tiles,/> is the weight coefficient to be trained,/> is the truncation coefficient to be trained,/> is a set of vectors after linear mapping. 7.根据权利要求4所述的一种基于Diffusion和ViT的降尺度方法,其特征在于,所述步骤S232位置编码为二维位置嵌入方法。7. A downscaling method based on Diffusion and ViT according to claim 4, characterized in that the position encoding in step S232 is a two-dimensional position embedding method. 8.根据权利要求4所述的一种基于Diffusion和ViT的降尺度方法,其特征在于,所述步骤S233具体如下:8. A downscaling method based on Diffusion and ViT according to claim 4, characterized in that the step S233 is as follows: 设一组分割后的图块为,利用三组权重,即查询权重/>、键值权重/>、和数值权重/>,将原始数据分为三个特征:查询矩阵/>、键值矩阵/>、数值矩阵/>;则/>对应的自注意力/>公式如下:Let a group of divided tiles be , using three sets of weights, namely query weights/> , key value weight/> , and numerical weight/> , divide the original data into three features: query matrix/> , key value matrix/> , numerical matrix/> ;then/> Corresponding self-attention/> The formula is as follows: ; 其中,为/>维度的平方根。in, for/> The square root of the dimension. 9.根据权利要求1所述的一种基于Diffusion和ViT的降尺度方法,其特征在于,所述步骤S3具体如下:9. A downscaling method based on Diffusion and ViT according to claim 1, characterized in that the step S3 is as follows: 设经过步骤S21-S22得到的结果为:,其中,/>为为步骤S21-S22得到的模型,/>为低分辨率数值模式降水预报,/>为配对的高分辨率降水观测样本,/>为步骤S21中预设的超参数,T为步骤S21中前向加噪的步数;则步骤S3中Diffusion-Vision-Transforme模型的预报误差/>公式如下:Assume that the result obtained through steps S21-S22 is: , where,/> is the model obtained in steps S21-S22,/> For low-resolution numerical model precipitation forecast,/> For paired high-resolution precipitation observation samples,/> is the preset hyperparameter in step S21, and T is the number of steps of forward noise addition in step S21; then the prediction error of the Diffusion-Vision-Transforme model in step S3/> The formula is as follows: ; 其中,为随机高斯分布,则/>in, is a random Gaussian distribution, then/> ; 当Diffusion-Vision-Transforme模型的预报误差收敛时,逆向推断T步直到得到模型预测/>;其中,前一步的/>由后一步的/>得到,公式如下:When the forecast error of the Diffusion-Vision-Transforme model When convergence occurs, the T steps are extrapolated backward until the model prediction is obtained/> ; Among them, the previous step's /> From the next step/> Obtained, the formula is as follows: ; 其中,为为步骤S21-S22得到的模型,/>为低分辨率数值模式降水预报,/>为步骤S21中预设的超参数,/>为随机高斯分布,则/>in, is the model obtained in steps S21-S22,/> For low-resolution numerical model precipitation forecast,/> is the hyperparameter preset in step S21,/> is a random Gaussian distribution, then/> . 10.一种设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的程序,其特征在于,所述处理器执行所述程序时实现如权利要求1-9任一项所述的一种基于Diffusion和ViT的降尺度方法中的步骤。10. A device, including a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that when the processor executes the program, the program as claimed in any one of claims 1 to 9 is implemented. The steps in the described downscaling method based on Diffusion and ViT.
CN202311525721.XA 2023-11-16 2023-11-16 A downscaling method based on Diffusion and ViT Active CN117236201B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311525721.XA CN117236201B (en) 2023-11-16 2023-11-16 A downscaling method based on Diffusion and ViT

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311525721.XA CN117236201B (en) 2023-11-16 2023-11-16 A downscaling method based on Diffusion and ViT

Publications (2)

Publication Number Publication Date
CN117236201A true CN117236201A (en) 2023-12-15
CN117236201B CN117236201B (en) 2024-02-23

Family

ID=89098904

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311525721.XA Active CN117236201B (en) 2023-11-16 2023-11-16 A downscaling method based on Diffusion and ViT

Country Status (1)

Country Link
CN (1) CN117236201B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118033590A (en) * 2024-04-12 2024-05-14 南京信息工程大学 Short-term precipitation prediction method based on improved VIT neural network
CN118366046A (en) * 2024-06-20 2024-07-19 南京信息工程大学 Wind field downscaling method based on deep learning and combining with topography
CN119720071A (en) * 2024-11-01 2025-03-28 中国气象局成都高原气象研究所 A spatial downscaling method for precipitation fields

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6688180B1 (en) * 1999-07-05 2004-02-10 Sinvent As Multi-test assembly for evaluating, detecting and mountoring processes at elevated pressure
US20080179742A1 (en) * 2006-07-24 2008-07-31 Interuniversitair Microelektronica Centrum (Imec) Method and solution to grow charge-transfer complex salts
CN109524061A (en) * 2018-10-23 2019-03-26 中国人民解放军陆军防化学院 A kind of radionuclide diffusion calculation method based on transmission coefficient matrix
US20220043001A1 (en) * 2014-04-10 2022-02-10 Yale University Methods and compositions for detecting misfolded proteins
US20220301097A1 (en) * 2022-06-03 2022-09-22 Intel Corporation Methods and apparatus to implement dual-attention vision transformers for interactive image segmentation
CN115964869A (en) * 2022-12-14 2023-04-14 西北核技术研究所 A simulation method of air pollution diffusion and migration with high temporal and spatial resolution
US20230123322A1 (en) * 2021-04-16 2023-04-20 Strong Force Vcn Portfolio 2019, Llc Predictive Model Data Stream Prioritization
US20230176550A1 (en) * 2021-05-06 2023-06-08 Strong Force Iot Portfolio 2016, Llc Quantum, biological, computer vision, and neural network systems for industrial internet of things
US20230222132A1 (en) * 2021-05-11 2023-07-13 Strong Force Vcn Portfolio 2019, Llc Edge Device Query Processing of Distributed Database
CN116740223A (en) * 2023-04-26 2023-09-12 先进操作系统创新中心(天津)有限公司 Method for generating image based on text
CN116953642A (en) * 2023-06-29 2023-10-27 安徽大学 Millimeter wave radar gesture recognition method based on adaptive coding Vision Transformer network

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6688180B1 (en) * 1999-07-05 2004-02-10 Sinvent As Multi-test assembly for evaluating, detecting and mountoring processes at elevated pressure
US20080179742A1 (en) * 2006-07-24 2008-07-31 Interuniversitair Microelektronica Centrum (Imec) Method and solution to grow charge-transfer complex salts
US20220043001A1 (en) * 2014-04-10 2022-02-10 Yale University Methods and compositions for detecting misfolded proteins
CN109524061A (en) * 2018-10-23 2019-03-26 中国人民解放军陆军防化学院 A kind of radionuclide diffusion calculation method based on transmission coefficient matrix
US20230123322A1 (en) * 2021-04-16 2023-04-20 Strong Force Vcn Portfolio 2019, Llc Predictive Model Data Stream Prioritization
US20230176550A1 (en) * 2021-05-06 2023-06-08 Strong Force Iot Portfolio 2016, Llc Quantum, biological, computer vision, and neural network systems for industrial internet of things
US20230222132A1 (en) * 2021-05-11 2023-07-13 Strong Force Vcn Portfolio 2019, Llc Edge Device Query Processing of Distributed Database
US20230252047A1 (en) * 2021-05-11 2023-08-10 Strong Force Vcn Portfolio 2019, Llc Query Prediction Modeling for Distributed Databases
US20220301097A1 (en) * 2022-06-03 2022-09-22 Intel Corporation Methods and apparatus to implement dual-attention vision transformers for interactive image segmentation
CN115964869A (en) * 2022-12-14 2023-04-14 西北核技术研究所 A simulation method of air pollution diffusion and migration with high temporal and spatial resolution
CN116740223A (en) * 2023-04-26 2023-09-12 先进操作系统创新中心(天津)有限公司 Method for generating image based on text
CN116953642A (en) * 2023-06-29 2023-10-27 安徽大学 Millimeter wave radar gesture recognition method based on adaptive coding Vision Transformer network

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
杨舒楠: "江淮梅雨锋暴雨的中尺度可预报性研究", 《中国博士学位论文全文数据库 基础科学辑》, no. 6, pages 009 - 6 *
王鹏新: "基于点扩散函数的条件植被温度指数降尺度转换方法", 《农业机械学报》, vol. 48, no. 12, pages 165 - 173 *
秦菁: "面向多天气退化图像恢复的自注意力扩散模型", 《上海交通大学学报》, pages 1 - 22 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118033590A (en) * 2024-04-12 2024-05-14 南京信息工程大学 Short-term precipitation prediction method based on improved VIT neural network
CN118366046A (en) * 2024-06-20 2024-07-19 南京信息工程大学 Wind field downscaling method based on deep learning and combining with topography
CN118366046B (en) * 2024-06-20 2024-08-30 南京信息工程大学 Wind field downscaling method based on deep learning and combining with topography
CN119720071A (en) * 2024-11-01 2025-03-28 中国气象局成都高原气象研究所 A spatial downscaling method for precipitation fields

Also Published As

Publication number Publication date
CN117236201B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
CN117236201B (en) A downscaling method based on Diffusion and ViT
CN112861722B (en) Remote sensing land utilization semantic segmentation method based on semi-supervised depth map convolution
CN101950365B (en) Multi-task super-resolution image reconstruction method based on KSVD dictionary learning
CN111199270B (en) Regional wave height forecasting method and terminal based on deep learning
CN103413117B (en) A kind of incremental learning face identification method keeping Non-negative Matrix Factorization based on local
CN103295197B (en) Based on the image super-resolution rebuilding method of dictionary learning and bilateral canonical
CN107680044B (en) Image super-resolution convolution neural network accelerated calculation method
CN113591633B (en) Object-oriented land utilization information interpretation method based on dynamic self-attention transducer
CN118410327B (en) A sea wave forecasting method, electronic device and medium for flat sea areas
CN112001293A (en) Remote sensing image ground object classification method combining multi-scale information and coding and decoding network
CN112560719B (en) High-resolution image water body extraction method based on multi-scale convolution-multi-core pooling
CN115713109A (en) Multi-head attention model compression method for image classification
CN118170836B (en) File knowledge extraction method and device based on structure priori knowledge
CN118131834B (en) Sand micro-water storage moisturizing device and method
CN117951485B (en) A temperature profile inversion method based on deep learning
CN113611354B (en) A Protein Torsion Angle Prediction Method Based on Lightweight Deep Convolutional Networks
CN111950615B (en) A network fault feature selection method based on tree species optimization algorithm
CN117060401A (en) New energy power prediction method, device, equipment and computer readable storage medium
CN114120315A (en) Method and device for identifying electron microscope viruses based on small sample
CN116698410B (en) Rolling bearing multi-sensor data monitoring method based on convolutional neural network
CN112559582A (en) Small sample learning method and device based on sample pair relation propagation
CN119089964A (en) A method and system for constructing a neural network model for image annotation
CN118506094A (en) Image classification method and device based on time reversible pulse transducer
CN117372450A (en) U-shaped medical image segmentation method and device for BiFormer structure backbone extraction
CN117612641A (en) Deep learning framework for magnesium anode material composition prediction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant