Air quality prediction method and device based on AI meteorological large model
By generating 41 layers of smooth meteorological data through the UNet-Swin Transformer deep learning model, the problem of input mismatch between the AI meteorological model and the WRF model is solved, thus improving the accuracy and reliability of air quality prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEBEI ADVANCED ENVIRONMENTAL PROTECTION IND INNOVATION CENT CO LTD
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-10
AI Technical Summary
The meteorological data output by existing AI meteorological models does not match the input requirements of WRF models at the vertical height level, resulting in insufficient accuracy in air quality prediction. Existing solutions suffer from numerical instability or large errors.
The UNet-Swin Transformer deep learning model was trained based on historical real atmospheric 3D structure data to generate 41 layers of meteorological data with smooth interlayer transitions. Through data preprocessing and interpolation by the deep learning model, the physical consistency and accuracy of the meteorological data were ensured.
It significantly improves the accuracy and reliability of air quality forecasting, avoids numerical instability, reduces inter-layer interpolation errors, generates meteorological field data that better reflects the actual situation, and supports high-precision air quality simulation.
Smart Images

Figure CN121836010A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of environmental monitoring, and more particularly relates to an air quality prediction method and device based on an AI meteorological large model. BACKGROUND
[0002] Air quality prediction based on an AI meteorological large model is a key technology for ecological environment governance and public health protection, and its core relies on high-precision meteorological field data support and needs to be realized through coupling of a meteorological model and an air quality model. Among them, AI meteorological large models such as Pangu, Fuxi, and Fengwu can quickly output global high-resolution meteorological prediction results by virtue of high-efficiency computing power and deep learning advantages, and have become an important means of meteorological data acquisition; a Weather Research and Forecasting (WRF) mesoscale meteorological model, as a mainstream numerical meteorological simulation tool, needs to input refined meteorological data containing 41 vertical pressure layers to accurately depict atmospheric dynamics and provide reliable driving fields for subsequent air quality models such as CMAQ.
[0003] At present, the output data of the AI meteorological large model has limitations in vertical height coverage, and can only provide meteorological data of 13 target pressure layers, which is not matched with the 41 vertical pressure layer data required by the WRF model, becoming a core bottleneck restricting the improvement of the air quality prediction accuracy based on the AI meteorological large model. In the prior art, the solutions to this problem mainly include two types: one is to directly replace the 13-layer data output by the AI meteorological large model with the corresponding layer data of a global forecast system, but this method often causes numerical instability of the WRF model; the other is to expand the 13-layer data to 41 layers by using linear interpolation or spline interpolation methods, but this method has significant errors in areas with large layer intervals and cannot maintain atmospheric physical consistency, ultimately resulting in insufficient meteorological field simulation accuracy and affecting the accuracy and reliability of the air quality prediction based on the AI meteorological large model. Therefore, there is an urgent need for a technical solution to solve the above defects to improve the accuracy of the air quality prediction based on the AI meteorological large model. SUMMARY
[0004] The purpose of the present application is to provide an air quality prediction method and device based on an AI meteorological large model to improve the accuracy of the air quality prediction based on the AI meteorological large model.
[0005] In a first aspect, an air quality prediction method based on an AI meteorological large model is provided, comprising: obtain current meteorological variable data based on global forecast data, and filter meteorological variable data corresponding to 13 target pressure layers from the meteorological variable data set as an initial meteorological data set; preprocess the initial meteorological data set to obtain a target meteorological data set; the meteorological variable data includes temperature, specific humidity, zonal wind speed, meridional wind speed, and potential height; input the target meteorological data set into a target meteorological large model to obtain 13-layer meteorological prediction data for a future target time period; the 13-layer meteorological prediction data includes prediction meteorological data corresponding to the 13 target pressure layers; input the 13-layer meteorological prediction data into a UNet-Swin Transformer deep learning model to obtain 41-layer meteorological data; the UNet-Swin Transformer deep learning model is trained based on final business global analysis data, and the final business global analysis data includes real atmospheric three-dimensional structure data in a historical time period; obtain a standardized file based on the 41-layer meteorological data and a target template, generate an initial field file and a standard field file based on the standardized file; and perform dynamic simulation of a meteorological field based on the initial field file and the standard field file by using a WRF model to generate target meteorological field data; obtain an air quality prediction result based on an AI meteorological large model based on the target meteorological field data by using an air quality model.
[0006] In a second aspect, an air quality prediction device based on an AI meteorological large model is provided, including: a data preprocessing module configured to obtain current meteorological variable data based on global forecast data, and filter meteorological variable data corresponding to 13 target pressure layers from the meteorological variable data set as an initial meteorological data set; preprocess the initial meteorological data set to obtain a target meteorological data set; the meteorological variable data includes temperature, specific humidity, zonal wind speed, meridional wind speed, and potential height; a meteorological prediction module configured to input the target meteorological data set into a target meteorological large model to obtain 13-layer meteorological prediction data for a future target time period; the 13-layer meteorological prediction data includes prediction meteorological data corresponding to the 13 target pressure layers; a data interpolation module configured to input the 13-layer meteorological prediction data into a UNet-Swin Transformer deep learning model to obtain 41-layer meteorological data; the UNet-Swin Transformer deep learning model is trained based on final business global analysis data, and the final business global analysis data includes real atmospheric three-dimensional structure data in a historical time period; The data format conversion module is configured to obtain a standardized file based on the 41-layer meteorological data and the target template, generate an initial field file and a standard field file based on the standardized file, and perform dynamic simulation on a meteorological field by using a WRF model based on the initial field file and the standard field file, so as to generate target meteorological field data. The air quality prediction module based on the AI meteorological large model is configured to obtain an air quality prediction result based on the AI meteorological large model based on the target meteorological field data by using an air quality model.
[0007] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the steps of the air quality prediction method based on the AI meteorological large model when running the computer program.
[0008] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program implements the steps of the air quality prediction method based on the AI meteorological large model when executed by a processor.
[0009] The air quality prediction method and device based on the AI meteorological large model provided in the embodiments of the present application have the advantages that the core problem of mismatch between AI meteorological large model output data and WRF model input requirements in the prior art is effectively solved, and the accuracy and reliability of air quality prediction based on the AI meteorological large model are significantly improved.
[0010] To solve the problem of numerical instability caused by direct replacement of data, the UNet-SwinTransformer deep learning model in the embodiments of the present application is trained and learned based on historical real atmospheric three-dimensional structure data, can generate 41-layer meteorological data with smooth interlayer transition, avoids physical quantity mutation, ensures the stability of WRF model operation, and eliminates false convection and other abnormal situations from the source.
[0011] For the defects of large error and poor physical consistency of traditional interpolation methods, the UNet-SwinTransformer deep learning model in the embodiments of the present application does not need to assume linear change of meteorological variables, can accurately capture real nonlinear structure of the atmosphere, makes the expanded meteorological data comply with natural laws such as hydrostatic equilibrium, reduces the interpolation error in the region with large interlayer interval, improves the simulation accuracy of the meteorological field, and finally outputs high-quality meteorological field data to provide reliable support for the air quality model, so that the air quality prediction result based on the AI meteorological large model is more consistent with the actual situation. BRIEF DESCRIPTION OF DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description only constitute some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0013] Figure 1 A flowchart of an air quality prediction method based on an AI meteorological large model provided by an embodiment of the present application is shown in the figure. Figure 2 A model architecture diagram of a UNet-Swin Transformer deep learning model provided by an embodiment of the present application is shown in the figure. Figure 3 A structural block diagram of an air quality prediction device based on an AI meteorological large model provided by an embodiment of the present application is shown in the figure. Figure 4 A schematic block diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0014] In the following description, specific details such as specific system structures, techniques, etc. are presented in order to thoroughly understand the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits and methods are omitted to avoid unnecessary details that hinder the description of the present application.
[0015] It can be understood that in the embodiments of the present application, data related to user information is involved, and when the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards.
[0016] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.
[0017] Reference should be made to Figure 1 , Figure 1 A flowchart of an air quality prediction method based on an AI meteorological large model provided by an embodiment of the present application is shown in the figure, which can be executed by an electronic device. Specifically, the method can include S101-S104.
[0018] S101: Obtain current meteorological variable data based on global forecast data, select meteorological variable data corresponding to each of the 13 target pressure layers from the meteorological variable data set as the initial meteorological data set; preprocess the initial meteorological data set to obtain the target meteorological data set; the meteorological variable data includes temperature, specific humidity, zonal wind speed, meridional wind speed and potential height.
[0019] In this embodiment, in order to drive AI meteorological large models such as Pangu, Fuxi, Fengwu, etc. (i.e. target meteorological large models) to make global forecasts, global meteorological initial field data in a specific format need to be obtained. The core input of these meteorological large models depends on the global meteorological state information at a single time or two consecutive times. For example, the Pangu model uses single-time data, while the Fuxi, Fengwu, etc. models need data of the previous two time points to capture the evolution trend. Therefore, downloading global forecast data suitable for the input of such meteorological large models is the key first step. Currently, the global forecast data provided by the American Global Forecast System (GFS) and the European Centre for Medium-Range Weather Forecasts (ECMWF) is the main source to meet this demand. The data from these two major international meteorological agencies is widely used to drive the above-mentioned advanced AI meteorological large models. The 13 target pressure layers are [1000, 925, 850, 700, 600, 500, 400, 300, 250, 200, 150, 100, 50] hPa.
[0020] For example, in order to convert the original data (GRIB2 format) of the global forecast system such as GFS or ECMWF into the input format required by the AI meteorological large model (such as Pangu, Fuxi, Fengwu, etc.), a series of standardized data conversion and extraction processes need to be performed. The specific implementation steps are as follows: (1) Data download and decoding. Obtain grib2 format global meteorological forecast data of GFS or IFS from NCEP or ECMWF. Use wgrib2, pygrib, xarray+cfgrib, etc. to decode the GRIB2 file and extract the required variables and height layer data.
[0021] (2) Variable selection and extraction. According to the input requirements of the target AI meteorological large model, extract the key meteorological variables. The variables include: temperature (T), specific humidity (Q), zonal wind speed (U), meridional wind speed (V) and potential height (Z).
[0022] (3) Vertical layer matching. Extract the ground data and the required data of the vertical layers of 1000hpa, 925hpa, 850hpa, 700hpa, 600hpa, 500hpa, 400hpa, 300hpa, 250hpa, 150hpa, 100hpa, 50hpa from the above downloaded grib2 format data.
[0023] (4) Time alignment and sequence construction. For single-time-input models (such as Pangu-Weather), the input is a complete three-dimensional field at a certain time t, and it is necessary to ensure that all variables are synchronized under the same timestamp (UTC). For dual-time-input models (such as FuXi, FengWu), it is necessary to construct [t 6h,t] or [t] The input tensors are at two consecutive time points [12h, t]. The time difference must precisely match the time interval of the training data (typically 6 hours).
[0024] (5) Data cleaning and outlier handling. Missing value detection: Identify and mark NaN or filler values (e.g., 9999.0). Outlier removal: Correct or interpolate unreasonable values such as wind speed >200m / s and temperature <-100°C; this can be combined with sliding window midpoint filtering or correction based on physical constraints (e.g., static equilibrium relationship). Unit unification: Convert all variables to the units used during model training (e.g., temperature → K, specific humidity → kg / kg, wind speed → m / s).
[0025] (6) Data format encapsulation. The processed multivariate and multi-layer data is organized into a multidimensional tensor structure and saved as an input format supported by the model, such as NetCDF format or NumPy binary data format.
[0026] For example, different AI meteorological big data models have clear and strict requirements for input format, as shown in Table 1. Table 1 is the input specification table for typical AI meteorological big data models.
[0027] Table 1 Input Specifications for Typical AI Meteorological Models
[0028] All models require that the input data have been vertically matched and spatially resampled to the specified resolution. The time of the input data must be Coordinated Universal Time (UTC) at the top of the hour and aligned with the time window of the model training (e.g., 00Z, 06Z, 12Z, 18Z).
[0029] S102: Input the target meteorological dataset into the target meteorological big model to obtain 13 layers of meteorological forecast data for the future target time period; the 13 layers of meteorological forecast data include the forecast meteorological data corresponding to each of the 13 target pressure layers.
[0030] Exemplarily, the future target time period is a preset time period, such as 10 days. A new generation of artificial intelligence meteorological large models represented by Panggu, Fuxi, and wind wool have shown strong medium and long-term prediction capabilities and can effectively predict weather evolution in the future 10 days or even longer time scales. This embodiment can convert and extract the global meteorological data (i.e., the target meteorological data set) obtained in the foregoing to finally generate an input format and data specification conforming to the target meteorological large model specification, thereby driving the target meteorological large model to perform high-precision and long-time meteorological prediction calculation.
[0031] S103: input the 13-layer meteorological prediction data into the UNet-Swin Transformer deep learning model to obtain 41-layer meteorological data; the UNet-Swin Transformer deep learning model is trained based on the final business global analysis data, and the final business global analysis data includes real atmospheric three-dimensional structure data in a historical time period.
[0032] In this embodiment, the UNet-Swin Transformer deep learning model includes an input preprocessing layer, a 3D patch embedding layer, an encoder down-sampling layer, a dynamic padding layer, a backbone attention layer, a de-padding layer, a decoder up-sampling layer, and an output reconstruction layer; the dimension semantics of the 13-layer meteorological prediction data include batch size, vertical layer number, latitude direction grid number, and longitude direction grid number; The 13-layer meteorological prediction data is input into the UNet-Swin Transformer deep learning model to obtain 41-layer meteorological data, including: The 13-layer meteorological prediction data is input into the UNet-Swin Transformer deep learning model, and the input preprocessing layer is used to perform data verification and cleaning and standardization processing on the 13-layer meteorological prediction data, and a time dimension is inserted into the processed 13-layer meteorological prediction data to obtain a target multi-dimensional tensor with a time dimension; the dimensions of the target multi-dimensional tensor include batch size, vertical layer number, time, latitude direction grid number, and longitude direction grid number; Based on the target multi-dimensional tensor, a high-dimensional feature tensor is obtained through the 3D patch embedding layer; The high-dimensional feature tensor is subjected to spatial down-sampling, residual block feature enhancement, and jump connection feature saving through the encoder down-sampling layer to obtain a down-sampled high-dimensional feature map; The dynamic padding layer calculates a symmetric zero padding amount based on a preset window size, and performs symmetric zero padding on the down-sampled high-dimensional feature map based on the symmetric zero padding amount to obtain a padded feature map; Based on the padded feature map, a stacked feature map is obtained through the backbone attention layer; The de-padding layer performs de-padding on the stacked feature map based on the symmetric zero padding amount to obtain a deep semantic feature map; Based on the deep semantic feature map, an up-sampling fusion feature map is obtained through a decoder up-sampling layer; Based on the up-sampling fusion feature map, 41 layers of meteorological data are obtained through an output reconstruction layer.
[0033] In the present embodiment, due to the limitations of the existing AI meteorological large model in the vertical height level coverage of output variables and output results, it is difficult to meet the strict requirements of the high-precision WRF model on initial and boundary field data. In order to make up for this deficiency and ensure that the input meteorological field of the air quality prediction model based on the AI meteorological large model has sufficient precision and spatial and temporal details, the present embodiment uses the prediction data of GFS for supplementation. The present embodiment can obtain GFS global forecast data covering the next 10 days to support subsequent air quality simulation and prediction work.
[0034] The running of the WRF model needs to decode and interpolate the grib2 data downloaded by the GFS through the WRF model preprocessing program (WRF Preprocessing System, WPS). The present embodiment fuses the prediction data of the AI meteorological large model with the downloaded GFS data, that is, replaces the corresponding variables in the GFS data with the output data of the AI meteorological large model, and then regenerates grib2 data that meets the running of WPS through the pygrib library of python. Since the prediction data of the AI meteorological large model is 13 layers in the vertical direction ([1000, 925, 850, 700, 600, 500, 400, 300, 250, 200, 150, 100, 50), unit: mb), which is different from the 41 vertical layers of the GFS data ([1000, 975, 950, 925, 900, 850, 800, 750, 700, 650, 600, 550, 500, 450, 400, 350, 300, 250, 200, 150, 100, 70, 50, 40, 30, 20, 15, 10, 7, 5, 3, 2, 1, 0.7, 0.4, 0.2, 0.1, 0.07, 0.04, 0.02, 0.01), unit: mb), the present embodiment fills up through a vertical interpolation algorithm. Considering that the meteorology near the ground is more important for air quality prediction, the present embodiment implements vertical interpolation on the key atmospheric layers below 50 hPa, that is, interpolates the 13 vertical layers of the AI meteorological large model into 23 vertical layers.
[0035] However, traditional interpolation methods have certain errors when dealing with vertical direction meteorological data, which are caused by the complexity of the terrain, the sparsity of observation data or the limitations of the interpolation algorithm itself. This uncertainty will further affect the accuracy of the simulation results when providing initial fields and boundary conditions for the WRF model. In order to overcome this problem, the embodiment introduces a deep learning algorithm, which directly generates the required interpolated layer data by constructing a high-precision neural network model (i.e. UNet-Swin Transformer deep learning model). This method can effectively capture the non-linear relationship between variables, improve the accuracy and continuity of spatial target interpolation, and more accurately reconstruct the atmospheric state. Compared with traditional interpolation methods, the deep learning-driven data generation method not only improves the spatial resolution and temporal consistency of the data, but also better adapts to the evolution characteristics of different weather systems, providing more reliable and refined initial fields and boundary fields for the WRF model, and further improving the quality and credibility of numerical weather prediction.
[0036] For example, UNet-Swin Transformer is a U-Transformer-based encoder-decoder structure model, and the model architecture diagram of the UNet-Swin Transformer deep learning model is as shown in Figure 2 Table 2 is a component description table of the UNet-Swin Transformer deep learning model.
[0037] Table 2 is a component description table of the UNet-Swin Transformer deep learning model.
[0038] The core modules of UNet-Swin Transformer include get_pad3d and get_pad2d, CubeEmbedding, Down Block, Up Block, U-Transformer, and UNet-Swin Transformer main model.
[0039] For example, the purpose of Cube Embedding (3D Patch Embedding) is to divide the original meteorological field into local 3D spatio-temporal blocks and extract initial features. The initial features are extracted through 3D Patch Embedding, and the specific method is summarized as follows: The core purpose of 3D Patch Embedding is to split the original high-resolution meteorological data (such as [B, 13, 721, 1440]) into local three-dimensional spatio-temporal patches (patch), and embed it into a high-dimensional semantic feature space through linear mapping, so as to extract initial features with physical meaning and spatial structure. In specific implementation, the model uses a three-dimensional convolution layer (nn.Conv3d) to slide in the latitude, longitude and time dimensions, and divides the input data into non-overlapping cubic blocks according to the preset patch size (such as 1x12x12, the time dimension is not compressed); each 3D patch is locally perceived and linearly transformed by the convolution kernel to map it into a high-dimensional embedding vector (embed_dim), realizing the conversion from the original physical quantity (such as temperature, wind speed) to abstract semantic features. Subsequently, the feature is normalized by Layer Norm, and the output is reshaped into a two-dimensional spatial feature map (such as [B, embed_dim, H_patch, W_patch]), which not only preserves the spatial continuity and local correlation, but also greatly reduces the computational complexity of the subsequent Transformer module. This process is essentially a "structured dimension reduction + semantic enhancement", which lays a high-quality feature foundation for the model to capture complex nonlinear relationships between vertical layers and spatial long-range dependencies in the subsequent.
[0040] The time dimension is not compressed (T=1); Each 12x12 grid in space is divided into a patch -> output [B, embed_dim, T_p, H_p, W_p]; H_p=721 / / 12≈60,W_p=1440 / / 12=120; In the UNet-Swin Transformer model, 3D Patch Embedding is a key preprocessing step before data enters the backbone network. The input high-resolution global meteorological field (dimension [B, 13, 721, 1440], i.e., batch x vertical layer x latitude x longitude) is processed by a three-dimensional convolution operation. The spatial dimension (latitude x longitude) is divided into a three-dimensional "data block" (3D patch) by every 12x12 grid point while keeping the time dimension unchanged (T=1, because the input is a single time). In this way, the original 721x1440 spatial grid is compressed into about 60x120 spatial blocks (H_p=721 / / 12≈60, W_p=1440 / / 12=120), and each block is mapped to a high-dimensional embedding space (embed_dim) by a convolution kernel, and the output tensor shape becomes [B, embed_dim, 1, 60, 120]. This process not only greatly reduces the computational complexity of the subsequent Transformer module, but also preserves the local spatial structure and the physical correlation between vertical layers. Subsequently, through Layer Norm normalization and dimension adjustment, the data is reshaped into a two-dimensional feature map, providing a regular and efficient input structure for the subsequent window-based Swin Transformer attention mechanism, thereby maintaining the spatial continuity of the meteorological field while laying the foundation for the model to capture complex nonlinear relationships in the vertical direction. Subsequently, Layer Norm normalization is performed, and the data is flattened into a 2D feature map for SwinTranformer processing.
[0041] For example, Swin Transformer requires that the input size be divisible by window_size (such as 7); the purpose of get_pad3d / get_pad2d (dynamic padding) is to symmetrically pad zeros on the four edges of the image to ensure that the subsequent window attention can run. To ensure that the spatial dimensions (height H and width W) of the input feature map can be evenly divided by the window size (such as window_size=7) of Swin Transformer, the model will dynamically call the get_pad2d (or get_pad3d, if there is a time dimension) function to calculate the required padding amount before entering the attention module.
[0042] First, according to the current feature map size (H, W) and the preset window size, the number of pixels that need to be supplemented in the height and width directions is calculated, which is rounded up to be divisible by the window size; then, symmetric zero padding is performed on the top, bottom, left and right of the feature map (i.e. half padding on the top and bottom, and half padding on the left and right), if the number of pixels to be filled is odd, one more pixel is added on one side to maintain symmetry; after padding is completed, the feature map size becomes (H+pad_h, W+pad_w), H_pad divisible by window_size==0 and W_pad divisible by window_size==0, so as to ensure that the subsequent window division and self-attention calculation can be normally executed; after attention calculation is completed, the model will remove the padding area added before by cropping operation to restore the original spatial size and ensure the structural consistency of the feature map in the encoding-decoding path. This mechanism realizes adaptive support for any input resolution while maintaining the integrity of spatial information and the stability of model calculation.
[0043] For example, the Down Block (encoder downsampling module) realizes halving of the space and increasing of the channels after each layer of downsampling, and supports odd size cropping edges to maintain alignment. In the UNet-Swin Transformer model, the implementation method of "halving of the space and increasing of the channels after each layer of downsampling, and supporting odd size cropping edges to maintain alignment" is as follows: when the downsampling module (Down Block) uses a convolution operation with a step of 2 to process a feature map with an odd spatial dimension (such as 721 in 721x1440), the output size will lose one pixel due to integer division rounding down (such as 721 / / 2=360), resulting in the inability to accurately restore the original size after subsequent upsampling. Therefore, the model automatically detects whether the spatial dimension is odd before or after downsampling, and if it is odd, it crops 1 pixel from the edge of the feature map (usually the right or bottom side) to make the size even (such as 720x1440), thereby ensuring the symmetry of downsampling→upsampling. After upsampling in the decoder, the model fuses the original size features saved in the encoder stage (saved before cropping) through a jump connection, or aligns the original grid through interpolation in the final output stage, thereby maintaining the accuracy of spatial resolution while maintaining the regularity of network structure, avoiding boundary misalignment or information loss due to size mismatch, which is crucial for meteorological field data reconstruction which has extremely high requirements for spatial continuity and geographical coordinate accuracy.
[0044] For example, Swin TransformerV2Stage (main attention module) realizes efficient modeling of long-distance nonlinear dependence in the vertical-spatial structure of the meteorological field by introducing local window multi-head self-attention (W-MSA) and shift window multi-head self-attention (SW-MSA) mechanisms. The implementation process based on Swin TransformerV2 in the timm library is as follows: window multi-head self-attention (W-MSA): calculate attention within a fixed 7x7 window; shift window attention (SW-MSA): staggered window enhances cross-window information interaction; depth is variable: repeat Swin Transformer Block 4 times per stage.
[0045] For example, Up Block (decoder upsampling module), after upsampling, the corresponding layer of the encoder is connected by jump connection, multi-scale features are fused, and detail information is preserved. The implementation of the jump connection is that after each level of down sampling in the encoder (Down Block), the high-resolution feature map of this level is "temporarily stored" and directly transmitted to the upsampling module of the corresponding level in the decoder (Up Block); when the decoder doubles the spatial size of the low-resolution feature map through transposed convolution, it is spliced with the feature map of the same size from the encoder in the channel dimension, thereby realizing multi-scale feature fusion. This mechanism enables the collaborative optimization of deep semantic information (from the high layer of the encoder, low resolution) and shallow spatial details (from the low layer of the encoder, high resolution), which not only preserves the macroscopic structural consistency of atmospheric variables in the vertical direction, but also enhances the spatial detail restoration ability of key areas such as the near-surface layer, significantly improving the physical rationality and spatial continuity of the interpolation results, especially in complex terrain or strong gradient areas.
[0046] S104: Based on the 41-layer meteorological data and the target template, a standardized file is obtained, and an initial field file and a standard field file are generated based on the standardized file; based on the initial field file and the standard field file, a meteorological field dynamic simulation is performed through a WRF model to generate target meteorological field data.
[0047] In this embodiment, the 41-layer meteorological data refers to 41 atmospheric pressure layer meteorological data conforming to the GFS standard vertical structure, including temperature, wind speed and other variables. The target template refers to the GFS original GRIB2 file, including geographic grid, timestamp and other metadata. The standardized file refers to the WPS compatible GRIB2 file generated by the pygrib library. The initial field file refers to the meteorological field file at the initial time of the WRF model. The standard field file refers to the boundary constraint file of the WRF model. The WRF model refers to the Weather Research and Forecasting Mesoscale Numerical Weather Model. Meteorological field dynamic simulation refers to the process of solving atmospheric dynamics equations combined with physical parameterization schemes. The target meteorological field data refers to high spatiotemporal resolution meteorological data containing wind field, temperature and other key elements.
[0048] In this embodiment, consistent with the conventional driving mode, the generated new GRIB2 format meteorological data can be used as input data to drive WPS to preprocess geographical and meteorological data, and then drive the WRF mesoscale meteorological model to generate high-precision meteorological field data. Subsequently, the meteorological data output by the WRF model is used as input to drive the air quality model such as CMAQ (Community Multiscale Air Quality Modeling System) or CMAx (Comprehensive Air Quality Model with Extensions), thereby realizing high-resolution simulation and prediction of regional air quality.
[0049] High-resolution simulation refers to a numerical simulation method that finely depicts atmospheric processes under finer spatial grids (such as 1 km x 1 km or 3 km x 3 km) and shorter time steps. It can more accurately reflect the influence of local features such as terrain, land use, and emission source distribution on meteorology and air quality, thereby improving prediction accuracy. This process does not rely on manual input of data one by one, but rather through the interpolation and format conversion of high-temporal and high-spatial resolution meteorological fields (such as temperature, wind speed, humidity, pressure, and vertical velocity) generated by the AI meteorological large model, which are automatically input into the WPS-WRF system to drive the mesoscale meteorological model to run, and then the three-dimensional meteorological field (i.e., target meteorological field data) output by WRF is input into the air quality model such as CMAQ or CAMx as a key driving factor.
[0050] For example, the high-precision grib2 format meteorological data generated by fusion and interpolation can be input into the WRF preprocessing system (WPS). WPS completes grid projection, regional cropping, terrain matching, and extraction and interpolation of initial / boundary field variables through geographical space matching and meteorological field decoding, generating initial and boundary condition files (such as wrfinput and wrfbdy) required by the WRF model; then, the WRF mesoscale meteorological model, based on these data, combines physical parameterization schemes and atmospheric dynamics equations to perform regional high-resolution meteorological field dynamic simulation, outputting time and space fine-grained data including wind field, temperature, humidity, pressure, and precipitation; this meteorological field data meets the input requirements of the air quality model (such as CMAQ) in terms of temporal and spatial resolution and physical consistency, and is then input into the air quality model as the core driving field to calculate the diffusion, chemical reaction, dry and wet deposition, etc. of pollutants, and finally realize the whole-chain coupled simulation from AI-enhanced meteorological prediction to high-precision air quality prediction. This driving logic realizes the collaborative transfer of data flow and physical mechanism from "AI meteorological large model → WPS → WRF → CMAQ", improving the accuracy and efficiency of environmental meteorological simulation.
[0051] S105: obtaining an air quality prediction result based on the AI meteorological model based on the target meteorological field data through an air quality model.
[0052] In this embodiment, the air quality model finally outputs the hourly three-dimensional concentration field of various pollutants, including the ground and vertical distribution of main pollutants, not directly outputting the air quality level. The air quality level is obtained by post-processing according to the air quality index (AQI) calculation method specified in the national "Environmental Air Quality Standard" (GB3095-2012) based on the model simulation result. AQI is calculated by segmenting linearly according to six pollutants, and the maximum value is determined to determine the air quality level of the day, which is divided into six levels: 0-50 is excellent (level 1), 51-100 is good (level 2), 101-150 is light pollution (level 3), 151-200 is moderate pollution (level 4), 201-300 is severe pollution (level 5), and >300 is serious pollution (level 6). Therefore, the entire prediction process is: AI meteorological model output → deep learning vertical reconstruction → GRIB2 format generation → WRF meteorological simulation → CMAQ / CAMx pollutant concentration simulation → AQI calculation and level division, realizing hourly, high-resolution air quality prediction based on AI meteorological model for a certain day in the future.
[0053] From the above, it can be seen that the present embodiment effectively solves the core problem of mismatch between AI meteorological model output data and WRF model input requirements in the prior art, significantly improving the accuracy and reliability of air quality prediction based on AI meteorological model. For the numerical instability problem caused by direct replacement of data, the UNet-SwinTransformer deep learning model in this embodiment is trained and learned based on historical real atmospheric three-dimensional structure data, which can generate 41 layers of meteorological data with smooth interlayer transition, avoiding physical quantity mutation and ensuring the stability of WRF model operation, eliminating false convection and other abnormal situations from the source.
[0054] For the defects of large error and poor physical consistency of traditional interpolation methods, the UNet-SwinTransformer deep learning model of the present embodiment does not need to assume linear changes of meteorological variables, can accurately capture the real nonlinear structure of the atmosphere, makes the expanded meteorological data conform to natural laws such as hydrostatic equilibrium, reduces the interpolation error in the area with large layer interval, improves the simulation accuracy of the meteorological field, and finally outputs high-quality meteorological field data to provide reliable support for the air quality model, making the air quality prediction result based on the AI meteorological model more in line with the actual situation.
[0055] In one embodiment of this disclosure, the UNet-Swin Transformer deep learning model is trained based on final operational global analytics data in the following manner: Obtain final operational global analysis data, which includes real atmospheric 3D structure data for historical time periods; The first dataset and the second dataset were obtained based on the final operational global analysis data. The first dataset includes atmospheric three-dimensional structure data corresponding to each of the 13 target pressure layers that match the output dimensions of the target meteorological large model. The second dataset includes atmospheric three-dimensional structure data corresponding to each of the 41 vertical pressure layers that match the input requirements of the WRF mesoscale meteorological model. The initial UNet-SwinTransformer deep learning model is trained using the first dataset as the model input and the second dataset as the model target output, resulting in a trained UNet-Swin Transformer deep learning model.
[0056] In this embodiment, the initial UNet-Swin Transformer deep learning model is trained using the first dataset as the model input and the second dataset as the model target output to obtain the trained UNet-Swin Transformer deep learning model. This includes: using the first dataset as the model input and the second dataset as the model target output, training the initial UNet-Swin Transformer deep learning model based on the target loss function to obtain the trained UNet-Swin Transformer deep learning model. The target loss function is: ; in, Loss to the target The batch size is the number of samples input into the model in a single run. The number of vertical layers. This represents the number of grid cells in the latitudinal direction. This represents the number of grid cells in the longitude direction. The true values are from the second dataset. These are the model's predicted values. For the first Weight coefficients for each vertical layer b is the sample index, k is the vertical layer index, i is the latitude grid index, and j is the longitude grid index.
[0057] In this embodiment, the final service global analysis data refers to the FNL reanalysis data (ds083.3) of the NCARRDA database, with a time span of 2015-2024, containing global real atmospheric three-dimensional structure, which is the core data basis for model training. The first data set is the data set A in the disclosure document, which extracts the atmospheric three-dimensional structure data of 13 target pressure layers ([1000, 925,..., 50] hPa), with dimensions [B, 13, 721, 1440], matching the output dimensions of the AI meteorological large model; the second data set is the data set B, which extracts the corresponding data of 41 layers of GFS standard vertical layers (including 975, 950, etc. intermediate layers), with dimensions [B, 41, 721, 1440], meeting the input requirements of the WRF model.
[0058] The UNet-Swin Transformer deep learning model is a U-shaped model that combines 3D Patch Embedding, U-Net structure, and Swin Transformer V2 module, designed specifically for meteorological data vertical interpolation. The target loss function WMSE is a weighted mean square error, the core of which is to assign different weights to different vertical layers, with the highest weight (10.0) for the near-surface layer (1000-850 hPa) and the weight decaying with height, strengthening the fitting accuracy of key layers.
[0059] In the parameters, B is the batch size (e.g. 8), K is the number of vertical layers (41), H=721 and W=1440 are the number of latitude / longitude grids with 0.25° resolution; y_true is the true value of the second data set, y_pred is the model prediction value, wk is the vertical layer weight (wk>0), b, k, i, j are the sample, vertical layer, latitude grid, and longitude grid indexes respectively, and the whole realizes high-precision mapping training from 13 layers to 41 layers.
[0060] For example, this embodiment constructs a high-precision neural network model (UNet-Swin Transformer) to directly generate interpolated layer data missing in the vertical direction of the AI meteorological large model output data. The core idea is to learn the nonlinear, three-dimensional spatial-vertical coupling relationship between multiple meteorological variables from high-quality reanalysis data, train an end-to-end deep learning model, and reconstruct the 13-layer coarse resolution vertical data output by the AI meteorological large model into 41-layer high-fidelity vertical structure data to meet the strict requirements of numerical models such as WRF on initial fields and boundary conditions. The following are the specific implementation steps of this method: (1) Prepare high-quality training dataset, i.e., construct input-output sample pairs for training deep learning model. Specifically, first download FNL reanalysis data in NCARRDA database (such as ds083.3, i.e., NCEP FNL 0.25°x 0.25° global analysis field), and the time span is recommended to be 2015-2024, covering different seasons, climate states and extreme weather events.
[0061] Two key subsets are extracted again. For example, the key meteorological variables (such as temperature, geopotential height, wind speed, specific humidity, etc.) on the 13 pressure layers ([1000, 925, 850, 700, 600, 500, 400, 300, 250, 150, 100, 50] hPa) corresponding to the AI meteorological model output are extracted, forming a tensor with shape [B, 13, 721, 1440] (B is the number of time samples), obtaining dataset A (input), i.e., the first dataset. Extract 41 layers in the standard vertical layer required by GFS-driven WRF, especially including intermediate layers (such as 975, 950, 900, 800, …, 70 hPa), to form the target high-resolution vertical structure, with shape [41, 721, 1440], obtaining dataset B (target output), i.e., the second dataset.
[0062] Temporal and spatial alignment and normalization processing is performed. First, the time resolution is unified (such as 6 hours); standardization (Z-score) or normalization (Min-Max) is performed for each variable to improve model convergence stability; then the training set (70%), validation set (20%) and test set (10%) are divided to ensure temporal independence (avoid data leakage).
[0063] (2) Build and train deep learning model (UNet-Swin Transformer). Specifically, first design the model architecture, use UNet-Swin Transformer architecture, rely on the long-range dependence modeling advantage of Transformer, and optimize the input dimension for three-dimensional meteorological field vertical interpolation task: [B, 13, 721, 1440], B: batch size, 13: number of input vertical layers (AI model output), 721x1440: spatial grid (0.25° resolution, covering the whole world), output dimension: [B, 41, 721, 1440], 41: target number of vertical layers (matching GFS-driven WRF standard layer).
[0064] Then design the core module, as shown in Table 3, which is the core module design table of UNet-Swin Transformer.
[0065] Table 3 Core module design table of UNet-Swin Transformer
[0066] The loss function and optimization strategy are determined again. The loss function uses weighted mean square error (Weighted MSE Loss). The weight design principle: give higher weight to the near-surface layer (such as 1000-500 hPa), because these layers directly affect the boundary layer meteorological process and pollutant diffusion; a physically consistent regularization term (such as static equilibrium constraint, mass conservation term) can be added as auxiliary loss to improve physical rationality. Optimizer: AdamW, initial learning rate lr=1e-4, weight decay weight_decay=0.02. Learning rate scheduling: cosine annealing with warm restarts (T_max=10), to prevent falling into local optimum (3) Model verification and evaluation. Specifically, the advancement quantitative index evaluation includes: RMSE, MAE, CorrelationCoefficient (variable by variable, layer by layer), vertical profile comparison (such as temperature, geopotential height change with height). Then perform physical consistency test, including: analyze whether the vertical gradient is smooth, avoid "jump" or "oscillation" phenomenon; compare with the original FNL true value, evaluate the performance in key areas such as front, convection zone, jet.
[0067] (4) Apply the trained model to actual interpolation prediction. Application scenario: vertically expand the future 10-day prediction data output by AI meteorological large model (such as Pangu, Fuxi, Fengwu). Application process: obtain the global meteorological field output by AI meteorological large model (every 6 hours, a total of 40 times), variables include: temperature, geopotential height, U / V wind, specific humidity, etc., vertical layer is 13 layers ([1000, …, 50] hPa), spatial resolution is 0.25°x0.25° (721x1440). Input each time's data into the trained UNet-Swin Transformer model, output the corresponding time's 41-layer (or 23-layer) high-resolution vertical structure meteorological field. Use Python's pygrib library to write the output results into GRIB2 format file; read the original GFS GRIB2 data; replace the 13-layer variables (such as temperature, wind field) overlapping with the AI model with the AI prediction + deep learning interpolation results; other variables not covered (such as cloud water, precipitation) remain GFS data; use geogrid, ungrb, metgrid modules to process the generated GRIB2 data; extract the initial field and boundary conditions of the target simulation area (such as eastern China, Beijing-Tianjin-Hebei); output met_em.d01.*.nc file for WRF to call. Use AI-enhanced initial / boundary field to drive WRF, output high-precision regional meteorological field (wind, temperature, humidity, precipitation, boundary layer height, etc.).
[0068] WRF output as meteorological input, combined with emission sources, chemical mechanisms, complete future 1-10 days based on AI weather large model of air quality prediction (PM2.5, O3, NO2, etc.).
[0069] For example, (1) data preparation. Input: input meteorological field [B, 13, 721, 1440]; output: meteorological field after increasing the number of vertical layers [B, 41, 721, 1440].
[0070] (2) Loss function and optimization. In the construction of the technical route for the AI weather large model output data-driven atmospheric chemical numerical model, one of the key links is to use deep learning models (such as UNet-Swin Transformer) to perform high-precision vertical interpolation on the 13-layer vertical meteorological data output by the AI weather large model, generating 41-layer grib2 format data that meets the input requirements of the WRF model. In order to improve the interpolation accuracy, especially in the near-surface layer which is crucial for air quality simulation, a weighted mean square error loss function (WeightedMSE, WMSE) is used to enhance the model's fitting ability for the lower atmosphere.
[0071] The basic idea of the target loss function is to assign different weights to different vertical layers, so that the model pays more attention to the near-surface layer (such as 1000hPa~850hPa) which has a greater impact on air quality during the training process, thereby improving the overall simulation of physical rationality and application value.
[0072] Considering that the near-surface meteorological field (such as temperature, humidity, wind speed, boundary layer height) directly affects the diffusion, chemical reaction rate and deposition process of pollutants, it must be given a higher weight.
[0073] Common weight distribution strategy (based on pressure level): The specific layer index needs to be determined according to the target vertical layer list [1000, 975,..., 0.01].
[0074] The weight function can be defined as:
[0075] A continuous function form (such as exponential decay) can also be used:
[0076] This function ensures that the ground layer (1000hPa) weight is close to 10, and rapidly decays to 1 with increasing height.
[0077] Optimizer: AdamW: lr=1e-4, weight_decay=0.02; Learning rate schedule: Cosine Annealing + Warm Restarts (T_max=10 epochs) Exemplarily, the input of the embodiment is a 13-layer sparse vertical layer, and the output is a 41-layer dense layer; considering that the deep learning model structure is complex (Swin Transformer+U-Net), it is easy to fall into local optimum; and the meteorological variable has strong physical constraints and spatial continuity requirements, the embodiment uses the combination of AdamW+CosineAnnealingWarmRestarts. AdamW is suitable for Transformer type models (sensitive to weight decay); Cosine Annealing can help the model learn the nonlinear vertical relationship at multiple scales; Warm Restarts enhances the generalization ability and avoids overfitting to specific weather patterns; the finally generated interpolation field is more consistent with the atmospheric physical structure, which is conducive to the numerical stability of WRF.
[0078] The embodiment brings significant beneficial effects through scientific training design and model optimization. On the one hand, the embodiment constructs a training set based on FNL high-quality reanalysis data from 2015 to 2024, covering a variety of meteorological scenarios, and combines precise data set division and spatio-temporal alignment to ensure the model generalization ability. On the other hand, the weighted MSE loss function strengthens the fitting accuracy of the near-surface layer, which meets the core demand of air quality prediction based on AI meteorological large model, and improves the reliability of boundary layer meteorological data; on the other hand, the UNet-SwinTransformer architecture captures the nonlinear relationship and long-range dependence in the vertical direction, and cooperates with the AdamW optimizer and the cosine annealing warm restart strategy to avoid the model falling into local optimum, and the generated 41-layer data has strong physical consistency and spatial continuity; on the other hand, through quantitative index and physical consistency double verification, the interpolation accuracy is much higher than that of traditional methods, providing high-quality input for WRF model, and finally improving the accuracy and stability of air quality prediction based on AI meteorological large model.
[0079] In an embodiment of the present disclosure, based on the target multi-dimensional tensor, a high-dimensional feature tensor is obtained through a 3D patch embedding layer, including: Based on the target multi-dimensional tensor, a first operation is performed through a 3D patch embedding layer to obtain a high-dimensional feature tensor; The first operation includes: Performing 3D convolution partitioning on the target multi-dimensional tensor to obtain a plurality of non-overlapping 3D patches, linearly mapping each 3D patch to a preset high-dimensional embedding space, and outputting an intermediate feature tensor; Performing normalization on the intermediate feature tensor to obtain a normalized feature tensor; Removing the time dimension in the normalized feature tensor through a dimension squeezing operation; The normalized feature tensor after dimension extrusion is reshaped to obtain a high-dimensional feature tensor after shape reshaping; the dimensions of the high-dimensional feature tensor include batch size, embedding dimension, spatial latitude patch number, and spatial longitude patch number.
[0080] In this embodiment, based on the down-sampled high-dimensional feature map, a deep semantic feature map is obtained through the backbone attention layer, including: Based on the down-sampled high-dimensional feature map, a second operation is performed through the backbone attention layer to obtain a deep semantic feature map; The second operation includes: Step 1, local window attention aggregation is performed on the filled feature map to obtain a local attention feature map; Step 2, the local attention feature map is connected in residual with the filled feature map to obtain a connected feature map, and the connected feature map is normalized to obtain a first normalized feature map; Step 3, shift window attention modeling is performed on the first normalized feature map to obtain a cross-window attention feature map; Step 4, the cross-window attention feature map is connected in residual with the first normalized feature map to obtain a connected feature map, and the connected feature map is normalized to obtain a second normalized feature map; Steps 1 to 4 are repeated to obtain a stacked feature map.
[0081] In this embodiment, based on the up-sampled fused feature map, 41 layers of meteorological data are obtained through the output reconstruction layer, including: Based on the up-sampled fused feature map, a third operation is performed through the output reconstruction layer to obtain 41 layers of meteorological data; The third operation includes: The feature vector of each spatial position corresponding to the embedding dimension in the up-sampled fused feature map is linearly mapped to the target dimension through the fully connected layer to obtain a mapping feature tensor; The mapping feature tensor is reshaped to obtain a six-dimensional reshaped tensor; the dimensions of the six-dimensional reshaped tensor include batch size, spatial block latitude number, patch latitude size, spatial block longitude number, patch longitude size, and vertical layer number; The six-dimensional reshaped tensor is spatially reorganized through a concatenation operation to obtain a reorganized feature tensor; According to the difference between the reorganized feature tensor and the original input resolution, the latitude direction is interpolated through a bilinear interpolation algorithm to obtain a spatial resolution adapted feature tensor; the original input resolution refers to the resolution corresponding to the 13-layer meteorological prediction data; The resolution adapted feature tensor is de-normalized to obtain 41 layers of meteorological data.
[0082] In this embodiment, the target multi-dimensional tensor refers to a five-dimensional data tensor in the format of [B, in_chans, T, Lat, Lon], containing batch size, vertical layer number, time, latitude direction grid number, and longitude direction grid number, corresponding to the 13-layer meteorological data output by the AI meteorological large model, with a spatial resolution of 721x1440 grids. The 3D patch embedding layer refers to a module that cuts data into non-overlapping 3D patches and maps them to a high-dimensional space through nn.Conv3d, with a patch size of 1x12x12 and no compression in the time dimension. The 3D convolutional block refers to the operation of dividing data according to this size, and the non-overlapping 3D patch is the three-dimensional data unit after division.
[0083] The backbone attention layer refers to the Swin Transformer V2 Stage module, which performs local window attention (W-MSA) and shift window attention (SW-MSA). The padded feature map refers to data after calculating the symmetric zero padding amount through get_pad2d, ensuring that it fits the 7x7 window size. The residual connection refers to a cross-layer connection method that preserves the original features, and the normalization uses Layer Norm to stabilize the feature distribution.
[0084] The output reconstruction layer refers to a module containing a fully connected layer, shape reshaping, splicing, and bilinear interpolation, used to generate 41-layer meteorological data. The six-dimensional reshaped tensor refers to a tensor containing batch size, spatial block latitude number, patch latitude size (12), spatial block longitude number, patch longitude size (12), and vertical layer number. The bilinear interpolation algorithm is used to supplement the latitude direction grid points to adapt the resolution to the original input resolution of 721x1440. The inverse normalization operation refers to the process of restoring the physical true values of meteorological variables such as temperature and wind speed.
[0085] For example, UNet-Swin Transformer is a U-shaped Transformer model designed specifically for meteorological vertical data prediction, with the core idea of combining 3D convolution embedding, Swin Transformer, and U-Net structure to process spatio-temporal meteorological data. Its architecture is divided into data input and preprocessing, 3D patch embedding, and fc+reshape+interpolate. The specific process is as follows: (1) Data input and preprocessing. Input format: [B, in_chans, T, Lat, Lon], B: Batchsize (number of samples), in_chans: input meteorological vertical layer number (such as 13 layers), T: time step (usually 1 for single-step prediction), Lat / Lon: spatial resolution (such as 721x1440 grids).
[0086] (2) The original meteorological data is segmented into 3D patches (time + space) by Cube Embedding (3D patch embedding) and converted into high-dimensional features. The specific operation process is as follows: use Conv3d to compress the input into [B, embed_dim, T_patch, Lat_patch, Lon_patch]. patch_size=(1, 12, 12): the time dimension is not compressed (T=1), and each 12x12 grid in space is a patch. Normalize the features by Layer Norm (3) Remodel [B, C, Lat_patch, Lon_patch] (remove the time dimension, because T=1) by fc+reshape+interpolate. The specific steps are as follows: in the output reconstruction stage of the model, the feature map obtained after the upsampling path (Up Block) has a dimension of ([B, C_out, Lat_patch, Lon_patch]), where (C_out) is the output channel number corresponding to each patch. Map the feature vector at each spatial position to the target dimension by a fully connected layer (fc), i.e. (C_out->out_chansXpatch_latXpatch_lon), where patch_lat}=12 and patch_lon=12 correspond to the patch size at input time; reshape the output into a five-dimensional tensor ([B, Lat_patch, patch_lat, Lon_patch, patch_lon, out_chans]), and then rearrange it into ([B, out_chans, Lat_patchXpatch_lat, Lon_patchXpatch_lon]), i.e. restore it to a dense field with the original spatial resolution ([B, out_chans, 721, 1440]); since patch division may cause slight mismatch at the edges, finally use bilinear interpolation (interpolate) to align the output to the exact 721x1440 grid, ensuring consistency with the input data space, and completing the reconstruction from low-resolution features to high-resolution meteorological fields.
[0087] (4) Down-sampling, dynamic padding and up-sampling are performed by a U Transformer. The specific process is as follows: the U Transformer adopts a U-type Transformer encoder-decoder structure, the down-sampling path (DownBlock) thereof first reduces the spatial resolution by half step by step through two-dimensional convolution (Conv2d) with a step of 2 to extract multi-scale features, and introduces 4 residual blocks containing convolution, group normalization (Group Norm) and SiLU activation function at each down-sampling stage to enhance the feature expression ability and training stability of the model; in view of the possibility that the input grid size may be odd, the module will automatically crop the edges to ensure the compatibility of subsequent operations.
[0088] In the encoder core part, a Swin Transformer V2 module is introduced, the feature map is ensured to be divisible by a preset window size (such as 7x7) in the height and width directions by dynamically calculating the zero padding amount, then the feature map is divided into non-overlapping local windows, and the window multi-head self-attention (W-MSA) and the shift window multi-head self-attention (SW-MSA) are alternately used to model the long-distance spatial dependence relationship while maintaining the calculation efficiency, the network depth is set to 16 layers to enhance the non-linear representation ability, and after the processing is completed, the padding area is removed to restore the original size. The decoder part (Up Block) is up-sampled by a factor of 2 through transposed convolution (ConvTranspose2d) to double the spatial size of the feature map, and is spliced with the shortcut connection features of the corresponding layer of the encoder to realize multi-scale information fusion, then the decoding features are further optimized through 4 residual blocks, thereby gradually restoring the high-resolution output and improving the spatial details and physical consistency of the vertical interpolation.
[0089] (5) The output reconstruction layer first maps the feature vector of each spatial position to a high-dimensional space with dimensions of out_chans x patch_lat x patch_lon through a fully connected layer (fc), where out_chans is the number of output vertical layers, and patch_lat and patch_lon are the spatial dimensions of each 3D patch in the latitude and longitude directions, respectively. Subsequently, the data is converted to a six-dimensional structure of [B, Lat_patch, patch_lat, Lon_patch, patch_lon, out_chans] through a reshaping operation, where Lat_patch and Lon_patch represent the number of patches in the latitude and longitude directions. Then, by tiling the patches (i.e., unfolding the patch grid), the complete spatial structure is restored, resulting in a format of [B, Lat_patch x patch_lat, Lon_patch x patch_lon, out_chans], which realizes the spatial reconstruction of the feature map. Finally, the bilinear interpolation method is used to upsample the low-resolution reconstruction result to the resolution of the original input grid (e.g., 721 x 1440), ensuring that the output meteorological field is aligned with the original data in the spatial dimension, thereby ensuring the accuracy and consistency of subsequent WRF model processing.
[0090] For example, as shown in Table 4, Table 4 is an array shape change table of the UNet-Swin Transformer deep learning model (taking an input of in_shape = (1, 13, 721, 1440) as an example).
[0091] Table 4 UNet-Swin Transformer deep learning model array shape change table
[0092] The embodiment brings significant beneficial effects through fine feature processing and model architecture design. On the one hand, the 3D patch embedding layer preserves the spatial continuity and local correlation of meteorological data through non-overlapping blocking and high-dimensional mapping, optimizes the feature distribution through normalization and dimension squeezing, and lays a high-quality foundation for subsequent modeling; on the other hand, the main attention layer alternately performs local and shift window attention, combines residual connection and multi-round stacking, accurately captures the vertical-spatial nonlinear dependence of meteorological variables, and improves the long-range feature modeling capability; on the other hand, the output reconstruction layer ensures the accurate alignment of the 41-layer data with the original resolution through shape reshaping, spatial reorganization and bilinear interpolation, and restores the physical quantity authenticity through inverse normalization. The whole realizes high precision and physical consistency of meteorological field vertical interpolation, provides reliable input for WRF model, and further improves the accuracy and stability of air quality prediction based on AI meteorological large model.
[0093] The air quality prediction method based on the AI meteorological large model corresponding to the above embodiment, Figure 3 The structural block diagram of the air quality prediction device based on the AI meteorological large model is provided for an embodiment of the present application. For ease of illustration, only parts related to the embodiments of the present application are shown. For reference Figure 3 The air quality prediction device based on the AI meteorological large model 20 includes a data preprocessing module 21, a meteorological prediction module 22, a data interpolation module 23, a data format conversion module 24, and an air quality prediction module based on the AI meteorological large model 25.
[0094] The data preprocessing module 21 is configured to obtain current meteorological variable data based on global forecast data, filter 13 meteorological variable data corresponding to each target pressure layer from the meteorological variable data set as an initial meteorological data set, and preprocess the initial meteorological data set to obtain a target meteorological data set. The meteorological variable data includes temperature, specific humidity, zonal wind speed, meridional wind speed, and potential height. The meteorological prediction module 22 is configured to input the target meteorological data set into a target meteorological large model to obtain 13-layer meteorological prediction data for a future target time period. The 13-layer meteorological prediction data includes prediction meteorological data corresponding to each of the 13 target pressure layers. The data interpolation module 23 is configured to input the 13-layer meteorological prediction data into a UNet-Swin Transformer deep learning model to obtain 41-layer meteorological data. The UNet-Swin Transformer deep learning model is trained based on final business global analysis data, which includes real atmospheric three-dimensional structure data for a historical time period. The data format conversion module 24 is configured to obtain a standardized file based on the 41-layer meteorological data and a target template, generate an initial field file and a standard field file based on the standardized file, and perform dynamic simulation of a meteorological field based on the initial field file and the standard field file through a WRF model to generate target meteorological field data. The air quality prediction module based on the AI meteorological large model 25 is configured to obtain an air quality prediction result based on the AI meteorological large model based on the target meteorological field data through an air quality model.
[0095] In an embodiment of the present application, the air quality prediction device based on the AI meteorological large model 20 further includes a model training module configured to: obtain final business global analysis data including real atmospheric three-dimensional structure data for a historical time period; The first dataset and the second dataset were obtained based on the final operational global analysis data. The first dataset includes atmospheric three-dimensional structure data corresponding to each of the 13 target pressure layers that match the output dimensions of the target meteorological large model. The second dataset includes atmospheric three-dimensional structure data corresponding to each of the 41 vertical pressure layers that match the input requirements of the WRF mesoscale meteorological model. The initial UNet-SwinTransformer deep learning model is trained using the first dataset as the model input and the second dataset as the model target output, resulting in a trained UNet-Swin Transformer deep learning model.
[0096] In one embodiment of this application, when the model training module trains an initial UNet-Swin Transformer deep learning model using a first dataset as model input and a second dataset as model target output to obtain a trained UNet-Swin Transformer deep learning model, it is specifically used for: Using the first dataset as the model input and the second dataset as the model target output, the initial UNet-Swin Transformer deep learning model is trained based on the target loss function to obtain the trained UNet-SwinTransformer deep learning model. The target loss function is: ; in, Loss to the target The batch size is the number of samples input into the model in a single run. The number of vertical layers. This represents the number of grid cells in the latitudinal direction. This represents the number of grid cells in the longitude direction. The true values are from the second dataset. These are the model's predicted values. For the first Weight coefficients for each vertical layer b is the sample index, k is the vertical layer index, i is the latitude grid index, and j is the longitude grid index.
[0097] In an embodiment of the present application, the UNet-Swin Transformer deep learning model comprises an input preprocessing layer, a 3D patch embedding layer, an encoder down-sampling layer, a dynamic padding layer, a backbone attention layer, a de-padding layer, a decoder up-sampling layer, and an output reconstruction layer; the dimension semantics of the 13-layer meteorological prediction data comprises batch size, vertical layer number, latitude direction grid number, and longitude direction grid number; when the data interpolation module 23 inputs the 13-layer meteorological prediction data into the UNet-Swin Transformer deep learning model to obtain 41-layer meteorological data, the data interpolation module 23 is specifically used for: inputting the 13-layer meteorological prediction data into the UNet-Swin Transformer deep learning model, performing data verification and cleaning and standardization processing on the 13-layer meteorological prediction data through the input preprocessing layer, inserting a time dimension into the processed 13-layer meteorological prediction data to obtain a target multi-dimensional tensor with the inserted time dimension; the dimensions of the target multi-dimensional tensor comprise batch size, vertical layer number, time, latitude direction grid number, and longitude direction grid number; based on the target multi-dimensional tensor, obtaining a high-dimensional feature tensor through the 3D patch embedding layer; performing spatial down-sampling, residual block feature enhancement, and jump connection feature saving on the high-dimensional feature tensor through the encoder down-sampling layer to obtain a down-sampled high-dimensional feature map; the dynamic padding layer calculates a symmetric zero padding amount based on a preset window size, performs symmetric zero padding on the down-sampled high-dimensional feature map based on the symmetric zero padding amount to obtain a padded feature map; based on the padded feature map, obtaining a stacked feature map through the backbone attention layer; the de-padding layer performs de-padding on the stacked feature map based on the symmetric zero padding amount to obtain a deep semantic feature map; based on the deep semantic feature map, obtaining an up-sampled fused feature map through the decoder up-sampling layer; based on the up-sampled fused feature map, obtaining 41-layer meteorological data through the output reconstruction layer.
[0098] In an embodiment of the present application, when the data interpolation module 23 obtains a high-dimensional feature tensor through the 3D patch embedding layer based on a target multi-dimensional tensor, the data interpolation module 23 is specifically used for: based on the target multi-dimensional tensor, performing a first operation through the 3D patch embedding layer to obtain a high-dimensional feature tensor; wherein the first operation comprises: performing 3D convolution partitioning on the target multi-dimensional tensor to obtain a plurality of non-overlapping 3D patches, linearly mapping each 3D patch to a preset high-dimensional embedding space, and outputting an intermediate feature tensor; performing normalization on the intermediate feature tensor to obtain a normalized feature tensor; remove the time dimension in the normalized feature tensor by dimension squeezing operation; perform shape remodeling on the normalized feature tensor after dimension squeezing to obtain a high-dimensional feature tensor after shape remodeling; the dimensions of the high-dimensional feature tensor include batch size, embedding dimension, spatial latitude patch number, and spatial longitude patch number.
[0099] In an embodiment of the present application, the data interpolation module 23 is specifically used for: performing a second operation on the down-sampled high-dimensional feature map through the backbone attention layer to obtain a deep semantic feature map; The second operation includes: Step 1, performing local window attention aggregation on the filled feature map to obtain a local attention feature map; Step 2, performing residual connection on the local attention feature map and the filled feature map to obtain a connected feature map, and performing normalization on the connected feature map to obtain a first normalized feature map; Step 3, performing shift window attention modeling on the first normalized feature map to obtain a cross-window attention feature map; Step 4, performing residual connection on the cross-window attention feature map and the first normalized feature map to obtain a connected feature map, and performing normalization on the connected feature map to obtain a second normalized feature map; repeating steps 1 to 4 to obtain a stacked feature map.
[0100] In an embodiment of the present application, the data interpolation module 23 is specifically used for: performing a third operation on the up-sampled fused feature map through the output reconstruction layer to obtain 41-layer meteorological data; The third operation includes: linearly mapping the feature vector of each spatial position in the up-sampled fused feature map to the target dimension through the fully connected layer to obtain a mapping feature tensor; performing shape remodeling on the mapping feature tensor to obtain a six-dimensional remodeling tensor; the dimensions of the six-dimensional remodeling tensor include batch size, spatial block latitude number, patch latitude size, spatial block longitude number, patch longitude size, and vertical layer number; performing spatial reorganization on the six-dimensional remodeling tensor through a concatenation operation to obtain a reorganized feature tensor; According to the difference between the reorganized feature tensor and the original input resolution, the latitude direction is supplemented by bilinear interpolation algorithm to obtain a spatial resolution adaptive feature tensor; the original input resolution refers to the resolution corresponding to the 13-layer meteorological prediction data. By performing an inverse normalization operation on the resolution-adapted feature tensor, 41 layers of meteorological data were obtained.
[0101] See Figure 4 , Figure 4 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 4 The electronic device 300 in this embodiment may include one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memories 304 store computer programs, including program instructions. The processors 301 execute the program instructions stored in the memories 304. Specifically, the processors 301 are configured to invoke the program instructions to perform the functions of the modules in the aforementioned device embodiments, for example... Figure 3 The functions of the data preprocessing module 21, the weather forecasting module 22, the data interpolation module 23, the data format conversion module 24, and the air quality forecasting module 25 based on the AI meteorological big model are shown.
[0102] It should be understood that, in the embodiments of this application, the processor 301 may be a central processing unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0103] Input device 302 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 303 may include a display (LCD, etc.), a speaker, etc.
[0104] The memory 304 may include read-only memory and random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include non-volatile random access memory. For example, the memory 304 may also store meteorological data.
[0105] In specific implementations, the processor 301, the input device 302, and the output device 303 described in the embodiments of the present application can perform the implementation manners described in the embodiments of the air quality prediction method based on the AI meteorological large model provided by the embodiments of the present application, and can also perform the implementation manners of the electronic device 300 described in the embodiments of the present application, which will not be described here.
[0106] In another embodiment of the present application, a computer readable storage medium is provided, which stores a computer program. The computer program includes program instructions, which are executed by a processor to implement all or part of the processes in the above-mentioned embodiments. The computer program can also be used to instruct related hardware to complete the implementation. The computer program can be stored in a computer readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0107] The computer readable storage medium can be an internal storage unit of the electronic device of any of the above-mentioned embodiments, such as a hard disk or a memory of the electronic device. The computer readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the computer readable storage medium can include both the internal storage unit and the external storage device of the electronic device. The computer readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer readable storage medium can also be used to temporarily store data that has been output or will be output.
[0108] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the electronic device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and will not be repeated here.
[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the electronic device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and will not be repeated here.
[0110] In several embodiments provided in the present application, it should be understood that the disclosed electronic device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of the modules / units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules, units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed each other can be indirect coupling or communication connection through some interfaces or modules / units, and can also be electrical, mechanical or other form of connection.
[0111] The modules / units described as separate components can or can not be physically separated, and the components shown as modules / units can or can not be physical modules / units, that is, can be located in one place, or can be distributed on a plurality of network modules / units. Part or all of the modules / units can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0112] In addition, each functional module / unit in each embodiment of the present application can be integrated in one processing module / unit, or each module / unit can exist physically, or two or more modules / units can be integrated in one module / unit. The integrated module / unit can be realized in the form of hardware or in the form of software functional module / unit.
[0113] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present application, and these modifications or replacements should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. An air quality prediction method based on an AI meteorological big data model, characterized in that, include: Based on global forecast data, current meteorological variable data are obtained, and meteorological variable data corresponding to 13 target pressure layers are selected from the meteorological variable dataset as the initial meteorological dataset; The initial meteorological dataset is preprocessed to obtain the target meteorological dataset; the meteorological variable data includes temperature, specific humidity, zonal wind speed, meridional wind speed, and geopotential height; The target meteorological dataset is input into the target meteorological large model to obtain 13 layers of meteorological forecast data for the future target time period; the 13 layers of meteorological forecast data include the forecast meteorological data corresponding to each of the 13 target pressure layers. The 13 layers of meteorological forecast data are input into the UNet-Swin Transformer deep learning model to obtain 41 layers of meteorological data. The UNet-Swin Transformer deep learning model is trained based on the final operational global analysis data, which includes real atmospheric three-dimensional structure data for historical time periods. A standardized file is obtained based on the 41 layers of meteorological data and the target template. An initial field file and a standard field file are then generated based on the standardized file. Based on the initial field file and the standard field file, dynamic simulation of the meteorological field is performed using a WRF model to generate target meteorological field data; Based on the target meteorological field data, air quality prediction results based on the AI meteorological big data model are obtained through the air quality model.
2. The air quality prediction method based on an AI meteorological big data model as described in claim 1, characterized in that, The UNet-Swin Transformer deep learning model is trained based on final operational global analytics data and in the following manner: Acquire final operational global analysis data, which includes real atmospheric three-dimensional structure data for historical time periods; Based on the final operational global analysis data, a first dataset and a second dataset are obtained; the first dataset includes atmospheric three-dimensional structure data corresponding to each of the 13 target pressure layers that match the output dimension of the target meteorological large model, and the second dataset includes atmospheric three-dimensional structure data corresponding to each of the 41 vertical pressure layers that match the input requirements of the WRF mesoscale meteorological model. The initial UNet-Swin Transformer deep learning model is trained using the first dataset as the model input and the second dataset as the model target output to obtain the trained UNet-Swin Transformer deep learning model.
3. The air quality prediction method based on an AI meteorological big data model as described in claim 2, characterized in that, The process of training an initial UNet-SwinTransformer deep learning model using the first dataset as model input and the second dataset as model target output to obtain a trained UNet-Swin Transformer deep learning model includes: Using the first dataset as the model input and the second dataset as the model target output, the initial UNet-Swin Transformer deep learning model is trained based on the target loss function to obtain the trained UNet-SwinTransformer deep learning model. The target loss function is: ; in, Loss to the target The batch size is the number of samples input into the model in a single run. The number of vertical layers. This represents the number of grid cells in the latitudinal direction. This represents the number of grid cells in the longitude direction. The true values are from the second dataset. These are the model's predicted values. For the first Weight coefficients for each vertical layer b is the sample index, k is the vertical layer index, i is the latitude grid index, and j is the longitude grid index.
4. The air quality prediction method based on an AI meteorological big data model as described in claim 1, characterized in that, The UNet-Swin Transformer deep learning model includes an input preprocessing layer, a 3D patch embedding layer, an encoder downsampling layer, a dynamic padding layer, a backbone attention layer, a padding removal layer, a decoder upsampling layer, and an output reconstruction layer; the dimensional semantics of the 13 layers of meteorological prediction data include batch size, number of vertical layers, number of grids in the latitudinal direction, and number of grids in the longitude direction. The 13 layers of meteorological forecast data are input into the UNet-Swin Transformer deep learning model to obtain 41 layers of meteorological data, including: The 13 layers of meteorological forecast data are input into the UNet-Swin Transformer deep learning model. The input preprocessing layer performs data verification, cleaning, and standardization on the 13 layers of meteorological forecast data. The time dimension is then inserted into the processed 13 layers of meteorological forecast data to obtain a target multidimensional tensor with the inserted time dimension. The dimensions of the target multidimensional tensor include batch size, number of vertical layers, time, number of grids in the latitudinal direction, and number of grids in the longitude direction. Based on the target multidimensional tensor, a high-dimensional feature tensor is obtained through the 3D patch embedding layer; The encoder downsampling layer performs spatial downsampling, residual block feature enhancement, and skip connection feature preservation on the high-dimensional feature tensor to obtain a downsampled high-dimensional feature map. The dynamic filling layer calculates the symmetric zero-padding amount based on a preset window size, and performs symmetric zero-padding on the downsampled high-dimensional feature map based on the symmetric zero-padding amount to obtain the filled feature map. Based on the filled feature map, a stacked feature map is obtained through the backbone attention layer; The de-padding layer performs de-padding on the stacked feature map based on the symmetric zero-padding amount to obtain a deep semantic feature map; Based on the deep semantic feature map, an upsampled and fused feature map is obtained through the decoder upsampling layer; Based on the feature map after upsampling and fusion, 41 layers of meteorological data are obtained through the output reconstruction layer.
5. The air quality prediction method based on an AI meteorological big data model as described in claim 4, characterized in that, The process of obtaining a high-dimensional feature tensor based on the target multidimensional tensor through the 3D patch embedding layer includes: Based on the target multidimensional tensor, a first operation is performed through the 3D patch embedding layer to obtain a high-dimensional feature tensor; The first operation includes: The target multidimensional tensor is subjected to 3D convolution blocks to obtain multiple non-overlapping 3D patches. Each 3D patch is linearly mapped to a preset high-dimensional embedding space, and an intermediate feature tensor is output. The intermediate feature tensor is normalized to obtain the normalized feature tensor; The time dimension in the normalized feature tensor is removed by a dimension squeezing operation; The normalized feature tensor after dimensional compression is reshaped to obtain a high-dimensional feature tensor; the dimensions of the high-dimensional feature tensor include batch size, embedding dimension, number of spatial latitude patches, and number of spatial longitude patches.
6. The air quality prediction method based on an AI meteorological big data model as described in claim 4, characterized in that, The process of obtaining a deep semantic feature map based on the downsampled high-dimensional feature map through the backbone attention layer includes: Based on the downsampled high-dimensional feature map, a second operation is performed through the backbone attention layer to obtain a deep semantic feature map; The second operation includes: Step 1: Perform local window attention aggregation on the filled feature map to obtain a local attention feature map; Step 2: Perform a residual connection between the local attention feature map and the filled feature map to obtain a connected feature map. Normalize the connected feature map to obtain a first normalized feature map. Step 3: Perform shift window attention modeling on the first normalized feature map to obtain a cross-window attention feature map; Step 4: Perform a residual connection between the cross-window attention feature map and the first normalized feature map to obtain a connected feature map. Normalize the connected feature map to obtain a second normalized feature map. Repeat steps 1 to 4 to obtain the stacked feature map.
7. The air quality prediction method based on an AI meteorological big data model as described in claim 4, characterized in that, The 41-layer meteorological data, obtained from the upsampled and fused feature map through the output reconstruction layer, includes: Based on the feature map after upsampling and fusion, a third operation is performed through the output reconstruction layer to obtain 41 layers of meteorological data. The third operation includes: The feature vectors of the embedding dimension corresponding to each spatial location in the upsampled and fused feature map are linearly mapped to the target dimension through a fully connected layer to obtain the mapped feature tensor. The mapping feature tensor is reshaped to obtain a six-dimensional reshaped tensor; the dimensions of the six-dimensional reshaped tensor include batch size, number of spatial block latitudes, patch latitude size, number of spatial block longitudes, patch longitude size, and number of vertical layers; The six-dimensional reconstructed tensor is spatially reorganized by splicing operations to obtain the reorganized feature tensor; Based on the difference between the recombined feature tensor and the original input resolution, the latitudinal direction is interpolated and supplemented using a bilinear interpolation algorithm to obtain a feature tensor with spatial resolution adaptation; the original input resolution refers to the resolution corresponding to the 13 layers of meteorological prediction data. The resolution-adapted feature tensor was denormalized to obtain 41 layers of meteorological data.
8. An air quality prediction device based on an AI meteorological big data model, characterized in that, include: The data preprocessing module is used to obtain current meteorological variable data based on global forecast data, and to select meteorological variable data corresponding to 13 target pressure layers from the meteorological variable dataset as initial meteorological datasets; to preprocess the initial meteorological datasets to obtain target meteorological datasets; the meteorological variable data includes temperature, specific humidity, zonal wind speed, meridional wind speed, and geopotential height; The weather forecasting module is used to input the target weather dataset into the target weather model to obtain 13 layers of weather forecast data for the future target time period; the 13 layers of weather forecast data include the forecast weather data corresponding to each of the 13 target pressure layers. The data interpolation module is used to input the 13-layer meteorological forecast data into the UNet-Swin Transformer deep learning model to obtain 41-layer meteorological data. The UNet-Swin Transformer deep learning model is trained based on the final operational global analysis data, which includes real atmospheric three-dimensional structure data for historical time periods. The data format conversion module is used to obtain a standardized file based on the 41 layers of meteorological data and the target template, generate an initial field file and a standard field file based on the standardized file, and perform dynamic simulation of the meteorological field using a WRF model based on the initial field file and the standard field file to generate target meteorological field data. The air quality prediction module based on the AI meteorological big data model is used to obtain air quality prediction results based on the AI meteorological big data model based on the target meteorological field data.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.