Heavy rainfall forecasting method based on double-branch convolution LSTM model
By using the dual-branch convolutional LSTM model in the heavy precipitation forecast system and integrating multi-source spatiotemporal data, the problems of low forecast accuracy and short timeliness in the existing system are solved, and more accurate and stable heavy precipitation forecasts are achieved.
Patent Information
- Application Number
- CN202411922802.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-25
AI Technical Summary
The existing heavy precipitation forecasting system has problems such as high air reporting rate, inaccurate positioning of heavy precipitation centers, and short forecasting timeliness, making it difficult to accurately capture the evolution characteristics of complex terrain and rapidly developing strong convective systems.
The heavy precipitation forecast method based on the dual-branch convolution LSTM model is adopted, and the dual-branch structure is fused with historical forecast data, satellite data and real-time precipitation data, multi-source spatiotemporal features are extracted, and feature fusion and nonlinear transformation are performed through feature stitching, convolutional layering, batch normalization and attention mechanisms, and the precipitation order distribution is finally output.
It improves the accuracy and stability of heavy precipitation forecasts, can more accurately capture the spatial and temporal evolution characteristics of strong convective weather systems, and provides more reliable early warning information.
Smart Images

Figure CN119886214A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of meteorological forecasting, and in particular to a heavy precipitation forecasting method based on a dual-branch convolutional LSTM model. Background Art
[0002] Heavy precipitation is one of the extreme weather events. Accurate heavy precipitation forecast is the key to the response strategy. However, the current business model still faces many challenges in heavy precipitation forecast. This is mainly reflected in the following two aspects. First, the spatiotemporal distribution of heavy precipitation is highly random and uncertain. The small and medium-scale convective systems develop rapidly and have a short life cycle, which makes forecasting difficult. Second, the existing forecasting systems generally have problems such as high false alarm rate, inaccurate positioning of heavy precipitation centers, and short forecast time, which greatly limits the effectiveness and reliability of warning information. Especially in the case of complex terrain and rapid development of weather systems, traditional forecasting methods often find it difficult to accurately grasp the evolution characteristics of precipitation systems.
[0003] With the rapid development of artificial intelligence technology, deep learning methods have shown great potential in the field of weather forecasting. Deep learning models can automatically learn and extract complex feature patterns and have significant advantages in processing spatiotemporal sequence data. For example, ConvLSTM extracts spatial features through convolution operations and captures temporal dependencies through recurrent units, effectively improving the accuracy of precipitation forecasts. U-Net, through the encoder-decoder structure and jump connections, can capture feature information at different scales and has achieved remarkable results in precipitation nowcasting. In addition, 3D convolutional neural networks can directly process three-dimensional meteorological data, and generative adversarial networks (GANs) can generate realistic meteorological scenes. These models have achieved remarkable results in precipitation forecasting, typhoon path forecasting, and other aspects.
[0004] However, the currently widely used single-branch network framework has obvious limitations. First, the input of a single data source is difficult to fully characterize the complexity of the weather system. For example, models that rely solely on satellite observation data often ignore important dynamic and thermal field information, resulting in large forecast deviations under certain weather conditions (such as frontal precipitation). Secondly, the single-branch structure is prone to information loss during the feature extraction process. Through comparative experiments, it is found that a single feature extraction path is difficult to simultaneously maintain feature information of different scales. For example, when extracting deep features, detailed information of shallow features may be lost, resulting in unstable forecast results. In addition, the single-branch network has obvious deficiencies in dealing with evolutionary features at multiple time scales, especially for rapidly developing severe convective systems. It is difficult to capture their rapidly evolving characteristics, and the forecast results are often less than ideal. Summary of the invention
[0005] The present invention aims to solve one of the technical problems existing in the related art at least to a certain extent.
[0006] An object of the present invention is to provide a heavy precipitation forecasting method based on a dual-branch convolutional LSTM model, which fuses different types of data with a dual-branch network framework and extracts multi-source information of different time series, thereby improving the prediction accuracy.
[0007] In order to achieve the above-mentioned object, the present invention provides a heavy precipitation forecasting method based on a dual-branch convolutional LSTM model, comprising:
[0008] S100, obtaining historical forecast data, and preprocessing the data as a first data source; obtaining satellite data and real-time precipitation data for a corresponding period, and preprocessing the data respectively as a second data source;
[0009] S200: construct a model for heavy rainfall forecasting, wherein the model is constructed to have:
[0010] Input layer, used to input historical forecast data, satellite data and real-time precipitation data;
[0011] The dual-branch convolutional LSTM feature extraction layer adopts a dual-branch structure, in which the first branch extracts the spatiotemporal features of historical forecast data, and the second branch extracts the spatiotemporal features of satellite data and real-time precipitation data;
[0012] The feature fusion module uses feature splicing to splice the feature vectors of the two spatiotemporal features output by the dual branches into a high-dimensional feature vector, and then reduces the dimension through a convolution layer, and performs nonlinear transformation through batch normalization and ReLU activation function;
[0013] The decoder layer upsamples and extracts features through convolution transposition, convolution, and batch normalization layers, and gradually upsamples the fused features to the original resolution. At the same time, an attention mechanism is introduced to weight the features of different channels.
[0014] The output layer uses a 1x1 convolutional layer to output 11 channels, corresponding to 11 precipitation levels, and uses the Softmax function to perform probability normalization on the channel dimension;
[0015] S300, constructing a loss function, and training the model for heavy precipitation forecasting constructed in step S200 according to the first data source and the second data source preprocessed in step S100;
[0016] S400: Using the trained model for heavy precipitation forecasting, outputting the future precipitation magnitude distribution based on the data of current satellite, ground precipitation and meteorological forecast products.
[0017] A further preferred technical solution of the present invention is that in step S100, historical forecast data is obtained and preprocessed as the first data source; satellite data and real-time precipitation data of the corresponding period are obtained and preprocessed respectively as the second data source; including:
[0018] Load the meteorological large model forecast product, perform inference and historical weather back calculation, and obtain the forecast data for the required time period and required variables; perform logarithmic transformation on the precipitation in the forecast data, and use the Z-score standardization method to standardize the remaining variables except precipitation so that the data obeys the standard normal distribution with a mean of 0 and a standard deviation of 1. The Z-score standardization formula is expressed as:
[0019] z=(x―μ) / σ;
[0020] Among them, z is the standardized value, x is the original data, μ is the sample mean, and σ is the sample standard deviation;
[0021] All processed variables are used as the first data source;
[0022] Acquire AGRI observation data from geostationary meteorological satellites and perform geometric correction, radiation correction and geolocation processing;
[0023] Obtain CLDAS precipitation data and perform logarithmic transformation. The formula for logarithmic transformation is:
[0024] y=log 10 (x+c);
[0025] Among them, y is the transformed value, x is the original precipitation data, and c is a constant, which is set to 1 to avoid taking the logarithm of zero value;
[0026] Interpolation processing was performed on AGRI observation data and CLDAS precipitation data to align the two data spaces.
[0027] The processed AGRI observation data and CLDAS precipitation data are used as the second data source.
[0028] Preferably, in the model constructed in step S200, two parallel convolutional LSTM networks are used to extract features of the first data source and the second data source respectively, and hidden state outputs of the two branches are obtained by calculation, respectively, to represent different spatiotemporal features of the two data sources;
[0029] Each convolutional LSTM network contains a ConvLSTMCell unit with a hidden state dimension of 64 and a convolution kernel size of 3.
[0030] Preferably, in the model constructed in step S200, the feature fusion module uses feature splicing to splice the hidden states of the two convolutional LSTM networks, both of which have a dimension of 64, into a 128-dimensional feature vector. Subsequently, a 3x3 convolutional layer is used to reduce the feature dimension to 64, and a nonlinear transformation is performed through batch normalization and ReLU activation function.
[0031] Preferably, in the model constructed in step S200, the decoder layer introduces the SE attention mechanism, which learns the weight of each channel through global average pooling, two fully connected layers and a Sigmoid activation function, and weights the features of different channels.
[0032] Preferably, the loss function constructed in step S300 is a combined loss function of DiceLoss and FocalLoss. During the model training process, DiceLoss is calculated to measure the overlap between the prediction results and the true labels. FocalLoss is calculated to give higher weights to difficult-to-distinguish samples. Then, DiceLoss and FocalLoss are weightedly summed to obtain the final loss function.
[0033] Preferably, when training the model in step S300, a progressive training strategy is adopted, specifically:
[0034] The first data source and the second data source are divided into time steps. During training, the model is trained in chronological order. The training of each time step is based on the training result of the previous time step, so that the model learns time features.
[0035] Preferably, when training the model in step S300, a mixed precision training method is adopted; specifically, the method includes:
[0036] Use PyTorch's autocast and GradScaler mechanisms to improve training efficiency, speed up the training process and reduce memory usage;
[0037] Use the AdamW optimizer and introduce the CosineAnnealingWarmRestarts learning rate scheduler, which uses a cosine annealing strategy and restarts the learning rate after each cycle.
[0038] An early stopping mechanism is used in model training. When the loss of the validation set does not decrease for 5 consecutive epochs, the training process is terminated early.
[0039] During the training process, torch.nn.utils.clip_grad_norm is used to clip the gradient of the model parameters and limit the norm of the gradient to less than 0.5.
[0040] On the other hand, the present invention provides a non-transitory computer-readable storage medium having computer instructions stored thereon, which enable a computer to execute the above-mentioned heavy precipitation forecasting method based on the dual-branch convolutional LSTM model.
[0041] Yet another aspect of the present invention provides an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus, and the processor calls the logic instructions in the memory to execute the above-mentioned heavy precipitation forecasting method based on the dual-branch convolutional LSTM model.
[0042] On the other hand, the present invention provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer executes the above-mentioned heavy precipitation forecasting method based on the dual-branch convolutional LSTM model.
[0043] Beneficial effects: In order to overcome the limitations of a single-branch network, the present invention proposes a dual-branch convolutional LSTM network framework for forecasting extreme precipitation. The forecasting method of the present invention can combine satellite, ground precipitation and large-scale meteorological model forecast products to forecast the development and evolution of severe convective weather, and provide the distribution of precipitation levels in the next 0-36 hours, thereby providing decision support for transportation, agricultural production, emergency rescue and disaster assessment.
[0044] The network framework proposed in this paper has good spatiotemporal modeling capabilities. The convolutional LSTM can effectively capture the evolution characteristics of severe convective weather systems in time and space dimensions. The dual-branch design can integrate satellite / precipitation real-time observation data and meteorological large model forecast data, extract multi-source information of different time series, and improve prediction accuracy. In addition, the parallel processing structure can improve the computational efficiency of the model.
[0045] The present invention can extract multi-level features and focus on minority class heavy precipitation events. The convolution and upsampling layers of the decoder can extract multi-scale features, and the SE attention mechanism can enhance important features and suppress unimportant features, so that the model can pay more attention to the key areas and factors for the occurrence and development of severe convective weather. The weighted FocalLoss and DiceLoss can effectively solve the problem of class imbalance and improve the model's prediction ability for minority class samples such as heavy precipitation.
[0046] The model training process of the present invention uses a variety of training techniques. Mixed precision training can accelerate the training process, learning rate scheduling can improve model convergence, early stopping mechanism can prevent overfitting, and gradient clipping can improve training stability. The application of these training techniques effectively improves the performance and generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 The present invention is a flowchart of a heavy precipitation forecasting method based on a dual-branch convolutional LSTM model.
[0048] Figure 2 A schematic diagram of the model architecture for heavy precipitation forecasting constructed in the present invention.
[0049] Figure 3 This is a 0-36 hour precipitation forecast effect diagram obtained by using the heavy precipitation forecast method based on the dual-branch convolutional LSTM model in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments, and they should not be understood as limitations on the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In the description of the present invention, it should be understood that the terms used are only for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0051] In order to overcome the limitations of a single-branch network, the present invention proposes a dual-branch ConvLSTM network framework for forecasting extreme precipitation. This architecture is also known as a two-stream network in the field of computer vision. The two-stream network can process different types of data, such as spatial information and temporal information in a video, respectively, and improve the performance of the model by fusing the two types of information. However, despite the success of the two-stream network in the field of computer vision, its application in the field of meteorology is relatively limited. This is because meteorological data has its unique characteristics, such as large data volume, high spatiotemporal resolution, high noise, strong spatiotemporal heterogeneity, etc., which puts higher requirements on the design and training of the model.
[0052] The present invention proposes a heavy rainfall forecasting method based on a dual-branch convolutional LSTM model and provides a solution. Figure 1-Figure 3 The present invention describes a heavy precipitation forecasting method based on a dual-branch convolutional LSTM model.
[0053] Example 1: Heavy precipitation forecasting method based on dual-branch convolutional LSTM model, such as Figure 1 As shown, it mainly includes:
[0054] Construct a dataset; construct a model for heavy precipitation forecasting; model training; model application.
[0055] The main steps are described in detail as follows:
[0056] 1. Building a Dataset
[0057] The step of building a data set is the basis of model development; in this embodiment, multi-source data is obtained and then processed accordingly to build a data set. It includes:
[0058] The historical forecast data is obtained and preprocessed as the first data source; the satellite data and real-time precipitation data of the corresponding time period are obtained and preprocessed respectively as the second data source.
[0059] 1. Historical forecast data
[0060] This embodiment uses the Graphcast model developed by Google DeepMind to back-calculate meteorological data. Graphcast is a global weather forecast model based on graph neural networks, which can provide high-precision and high-efficiency forecasts of global meteorological elements, such as temperature, geopotential height, wind speed, precipitation, etc., especially in medium- and short-term forecasts. Unlike traditional numerical weather forecast (NWP) models that rely on solving complex physical equations, Graphcast uses machine learning technology to learn the laws of atmospheric motion from the massive historical meteorological data in the ERA5 reanalysis archive of the European Center for Medium-Range Weather Forecasts (ECMWF), and can quickly generate a global weather forecast for the next 10 days.
[0061] The core of the Graphcast model is an encoder-processor-decoder architecture, in which the encoder converts meteorological data into a graph structure, the processor uses a graph neural network (GNN) to simulate atmospheric dynamics, and the decoder converts the graph structure back into a meteorological element forecast. This GNN-based approach can effectively capture the spatiotemporal correlations in the global atmospheric circulation and has high computational efficiency. Studies have shown that Graphcast outperforms ECMWF's High Resolution Forecast (HRES) system on 90% of the evaluation indicators and can identify extreme weather events such as tropical cyclones, atmospheric rivers, and extreme temperatures earlier.
[0062] In this embodiment, the forecast data with a horizontal resolution of 0.25 degrees and a time resolution of 6 hours output by the Graphcast model is selected, covering the warm season data from 2019 to 2021 (April 1 to September 30). The selected forecast variables are shown in Table 1.
[0063] Table 1 Graphcast environment variable selection and reasons
[0064]
[0065] The selection of these variables is based on consideration of the key factors that affect the formation and development of weather systems. They cover multiple aspects such as atmospheric dynamics, heat, and water vapor, and can describe the state of the atmosphere more comprehensively.
[0066] The preprocessing process of historical forecast data is as follows:
[0067] Download the pre-trained model from the Graphcast model website, and perform inference and historical weather back-calculation on the server to obtain forecast data for the required time period and variables.
[0068] In order to eliminate the impact of the difference in dimensions between different meteorological elements on model training, the data is standardized. This embodiment uses the Z-score standardization method to standardize variables other than precipitation, so that the data obeys a standard normal distribution with a mean of 0 and a standard deviation of 1 to improve the training efficiency and stability of the model. The precipitation is logarithmically transformed to make it closer to a normal distribution to meet the assumptions of some machine learning models and reduce the impact of extreme precipitation values on model training.
[0069] The Z-score standardization formula is expressed as:
[0070] z=(x―μ) / σ;
[0071] Among them, z is the standardized value, x is the original data, μ is the sample mean, and σ is the sample standard deviation.
[0072] 2. Satellite data
[0073] In this embodiment, observation data from the new generation geostationary meteorological satellite FY4A issued by the National Satellite Meteorological Center is used. The Fengyun-4 satellite is located in a geosynchronous orbit about 36,000 kilometers above the Earth's equator. It can observe a wide area from 55° east longitude to 160° west longitude and 50° north latitude to 50° south latitude, continuously detect weather changes, and quickly capture the development of typhoons, rainstorms and other weather, providing timely and accurate information support for weather forecasting and disaster prevention and mitigation.
[0074] The Advanced Geostationary Radiation Imager (AGRI) is one of the main payloads of Fengyun-4. It realizes precise and flexible two-dimensional pointing through a sophisticated dual scanning mirror mechanism, and can achieve rapid regional scanning at the minute level. It adopts an off-axis three-mirror main optical system to obtain 14-band earth cloud images at high frequency, and uses the on-board black body for high-frequency infrared calibration to ensure the accuracy of the observation data. The instrument is responsible for obtaining cloud images, has the ability to capture aerosols and snow, and can clearly distinguish between different phases of clouds and high and middle-layer water vapor. AGRI has a maximum spatial resolution of 500 meters, of which the spatial resolution of the visible light / near-infrared band is 0.5-1km, and the spatial resolution of the infrared band is 2km-4km. It can scan the Eastern Hemisphere once every 15 minutes.
[0075] This example uses the FY-4A radiation imager sensor Level 1B product, which has been pre-processed by geometric correction, radiation correction, and geolocation to provide more accurate observation data. The temporal resolution of the data is 15 minutes and the spatial resolution is 4 kilometers.
[0076] The study area is South China (100° to 120° east longitude, 20° to 30° north latitude). According to the study area, the required satellite image range is cropped, and the grayscale value of the satellite image is converted into brightness temperature value for subsequent analysis and calculation. In addition, the satellite multi-channel data is interpolated and processed into 0.05°×0.05°, which is aligned with the precipitation data space.
[0077] This study uses the multi-band data of the four channels of FY-4A as training features. The specific channel information is shown in Table 2.
[0078] Table 2 Infrared channel selection and reasons for FY satellite data
[0079]
[0080] 3. Real-time precipitation data
[0081] This embodiment uses the precipitation data of the land surface data assimilation system CLDAS developed by the National Meteorological Administration. The CLDAS system integrates multi-source data such as ground rainfall station observation data, satellite remote sensing precipitation data, numerical weather forecast models, etc., and uses advanced data assimilation technology to integrate these data from different sources and different temporal and spatial resolutions to generate gridded precipitation data with high consistency and accuracy in both time and space, reflecting the spatial distribution characteristics of precipitation and its changing laws.
[0082] CLDAS reanalysis grid precipitation data has a variety of time resolutions, such as hourly and daily, which can meet users' needs for precipitation information at different time scales. Hourly data can capture the rapid changes in precipitation, which is of great significance for short-term precipitation monitoring and severe convective weather research.
[0083] In this embodiment, hourly CLDAS and other latitude and longitude grid precipitation data of 0.0625°×0.0625° are used, and the time range is April-September in the warm season from 2019 to 2021. After the precipitation data is interpolated and processed into 0.05°×0.05°, the 2019-2020 data is used to train the deep learning model, and the 2021 warm season data is used to evaluate the model precipitation forecast effect, and compared with the Graphcast precipitation forecast results.
[0084] The data preprocessing process is as follows:
[0085] The possible NaN values in the input data are detected and processed, and the missing values are filled using linear interpolation to ensure the stability of model training.
[0086] The precipitation data is standardized. Since precipitation data usually presents a skewed distribution and contains a large number of zero values, the direct application of Z-score standardization has a poor effect. Therefore, in this embodiment, the precipitation data is logarithmically transformed. The logarithmic transformation can compress the data range, reduce the skewness of the data, and make it closer to the normal distribution, thereby improving the prediction performance of the model.
[0087] The formula for logarithmic transformation is:
[0088] y=log 10 (x+c);
[0089] Among them, y is the transformed value, x is the original precipitation data, and c is a constant, which is set to 1 to avoid taking the logarithm of zero value.
[0090] 2. Building the Model
[0091] The model for heavy rainfall forecasting constructed in this embodiment is as follows: Figure 2 As shown, including:
[0092] 1. Input layer
[0093] Input historical forecast data, satellite data and real-time precipitation data.
[0094] 2. Dual-branch convolutional LSTM feature extraction layer
[0095] The evolution of severe convective weather systems is affected by many factors, and it is difficult for a single data source to capture its complex characteristics. Therefore, this embodiment adopts a dual-branch structure to extract the spatiotemporal characteristics of four-channel satellite data and CLDAS precipitation data in the past 6 hours (a total of 5 channels, 6 times, and a time interval of 1 hour), as well as the spatiotemporal characteristics of Graphcast's forecast products from 0 to 36 hours (a total of 10 channels, 6 times, and a time interval of 6 hours). CLDAS precipitation data can provide the spatiotemporal evolution characteristics of precipitation in the past few hours, and satellite data can provide high-resolution cloud information. Graphcast data is used to provide atmospheric dynamic and thermal field information for the next 36 hours. Combining the two data sources can more comprehensively characterize the evolution of severe convective systems.
[0096] Taking into account the differences in data sources and timing characteristics, this embodiment uses two parallel convolutional LSTM networks to extract the features of satellite data and Graphcast data respectively, and obtains the hidden state outputs of the two branches after calculation, representing the different spatiotemporal characteristics of the two data sources.
[0097] Each convolutional LSTM network contains a ConvLSTMCell unit, whose input dimensions are 5 and 10, hidden state dimension is 64, and convolution kernel size is 3. Convolutional LSTM integrates convolution operation into LSTM unit, which can effectively extract spatial and temporal features in image sequences and is suitable for processing spatiotemporal sequence data such as meteorological data.
[0098] The dual-branch network framework can make full use of the complementary information of two different source data and different time series feature data to improve the prediction ability of the model. In addition, the parallel processing structure can improve the computational efficiency of the model.
[0099] 3. Feature fusion module
[0100] In order to effectively fuse the features extracted by the two branches for subsequent prediction, this embodiment adopts the feature splicing method to fuse the hidden states of the two branches. The hidden states (both dimensions are 64) output by the two convolutional LSTM networks are spliced into a 128-dimensional feature vector, and the two feature vectors are spliced into a higher-dimensional feature vector to contain more comprehensive information.
[0101] Subsequently, a 3x3 convolutional layer is used to reduce the feature dimension to 64, and a nonlinear transformation is performed through batch normalization and ReLU activation function.
[0102] 4. Decoder and Attention Mechanism
[0103] During the evolution of severe convective weather systems, different regions and different features have different importance. In order to enable the model to focus on important regions and features and improve prediction accuracy, this embodiment also introduces an attention mechanism in the decoder part to help the model focus on important regions and features and improve prediction accuracy.
[0104] In the decoder part, a series of convolutional transpose, convolution, and batch normalization layers are used to upsample and extract features, and the fused features are gradually upsampled to the original resolution. First, a 3x3 convolution layer is used to reduce the feature dimension to 32, and a nonlinear transformation is performed through batch normalization and ReLU activation function. Then, the Squeeze-and-Excitation (SE) attention mechanism is used to weight the features of different channels. The SE attention mechanism learns the weight of each channel through global average pooling, two fully connected layers, and Sigmoid activation function, enhances important features, suppresses unimportant features, and enhances the model's ability to capture key features.
[0105] The setting of the attention mechanism can effectively improve the feature expression ability of the model, focus on important features, ignore irrelevant information, and improve prediction accuracy. It should be noted that only the SE attention mechanism is used in this embodiment, which mainly focuses on the relationship between channels. Other more complex attention mechanisms can also be used to further improve the performance and prediction accuracy of the model.
[0106] 5. Output layer
[0107] Finally, a 1x1 convolutional layer is used to output 11 channels, corresponding to 11 precipitation levels (0-10), and the Softmax function is used to perform probability normalization on the channel dimension.
[0108] 3. Model Training
[0109] In this embodiment, a variety of training techniques are used in the model training process.
[0110] 1. Constructing a combined loss function
[0111] In severe convective weather forecasts, there is a serious sample imbalance in the number of samples of different categories, and the number of heavy precipitation samples is relatively small. The traditional cross entropy loss function may cause the model to favor the majority class samples. In order to solve the problem of class imbalance, this embodiment combines DiceLoss and FocalLoss to construct a combined loss function to improve the problem of class imbalance and difficult-to-distinguish samples.
[0112] During model training, DiceLoss is calculated to measure the overlap between the predicted results and the true labels, FocalLoss is calculated to give higher weights to difficult samples, and then DiceLoss and FocalLoss are weighted summed to obtain the final loss function.
[0113] Among them, DiceLoss can effectively deal with the problem of class imbalance and improve the prediction accuracy of minority class samples. FocalLoss focuses on difficult-to-classify samples and improves the generalization ability of the model.
[0114] 2. Training strategy
[0115] Since the evolution of severe convective weather systems is time-dependent, this embodiment adopts a progressive training strategy to train the model in chronological order to help the model better learn this time-dependent relationship. The training of each time step is based on the training results of the previous time step. This method can simulate the evolution process of severe convective weather systems, enable the model to better learn time characteristics, and improve the prediction accuracy and stability of the model.
[0116] Specifically, the timestamp sequence to be processed is generated first, covering April 1, 2019 to September 30, 2019, and April 1, 2020 to September 30, 2020, with a time frequency of 6 hours. Then, in the order of timestamps, the satellite data, Graphcast data, and CLDAS precipitation data corresponding to each timestamp are read in turn, NaN values are processed, and missing values are filled using linear interpolation. The satellite data and Graphcast data are Z-score normalized, and the CLDAS precipitation data is logarithmically transformed and converted to 11 magnitudes (0-10).
[0117] Randomly divide the data set into a training set and a validation set with a ratio of 8:2. Start training the model from the first time step and save the trained model parameters. Use the model parameters of the previous time step to initialize the model of the current time step and continue training. Repeat this step until all time steps are trained.
[0118] This progressive training strategy can effectively learn the time dependence of severe convective weather systems and improve the prediction accuracy and stability of the model.
[0119] 3. Training techniques
[0120] In order to improve the training efficiency and performance of the model, mixed precision training is used in the training process. PyTorch's autocast and GradScaler mechanisms are used to improve training efficiency, accelerate the training process and reduce memory usage. In addition, the AdamW optimizer is used, and the CosineAnnealingWarmRestarts learning rate scheduler is introduced. The scheduler adopts the cosine annealing strategy and restarts the learning rate after each cycle to help the model better jump out of the local optimal solution and improve the model convergence.
[0121] The early stopping mechanism is used in model training. When the loss of the validation set does not decrease for 5 consecutive epochs, the training process is terminated in advance to prevent the model from overfitting. In addition, torch.nn.utils.clip_grad_norm is used during training to clip the gradient of the model parameters and limit the norm of the gradient to less than 0.5 to prevent gradient explosion and improve training stability.
[0122] IV. Model Application
[0123] Using the trained model for heavy precipitation forecasting, the current satellite, ground precipitation and weather forecast product data are used to output the distribution of precipitation levels in the next 0-36 hours. The results are as follows: Figure 3 shown.
[0124] The model of this embodiment can combine satellite, ground precipitation and large-scale meteorological model forecast products to predict the development and evolution of severe convective weather, provide the distribution of precipitation levels in the next 0-36 hours, and provide decision support for transportation, agricultural production, emergency rescue and disaster assessment.
[0125] Embodiment 2: This embodiment provides a non-transitory computer-readable storage medium having computer instructions stored thereon, the computer instructions causing a computer to execute a heavy precipitation forecasting method based on a dual-branch convolutional LSTM model, the method comprising the following steps:
[0126] S100, obtaining historical forecast data, and preprocessing them as a first data source; obtaining satellite data and real-time precipitation data for a corresponding period, and preprocessing them respectively as a second data source;
[0127] S200: construct a model for heavy rainfall forecasting, wherein the model is constructed to have:
[0128] Input layer, used to input historical forecast data, satellite data and real-time precipitation data;
[0129] The dual-branch convolutional LSTM feature extraction layer adopts a dual-branch structure, in which the first branch extracts the spatiotemporal features of historical forecast data, and the second branch extracts the spatiotemporal features of satellite data and real-time precipitation data;
[0130] The feature fusion module uses feature splicing to splice the feature vectors of the two spatiotemporal features output by the dual branches into a high-dimensional feature vector, and then reduces the dimension through a convolution layer, and performs nonlinear transformation through batch normalization and ReLU activation function;
[0131] The decoder layer upsamples and extracts features through convolution transposition, convolution, and batch normalization layers, and gradually upsamples the fused features to the original resolution. At the same time, an attention mechanism is introduced to weight the features of different channels.
[0132] The output layer uses a 1x1 convolutional layer to output 11 channels, corresponding to 11 precipitation levels, and uses the Softmax function to perform probability normalization on the channel dimension;
[0133] S300, constructing a loss function, and training the model for heavy precipitation forecasting constructed in step S200 according to the first data source and the second data source preprocessed in step S100;
[0134] S400: Using the trained model for heavy precipitation forecasting, outputting the future precipitation magnitude distribution based on the data of current satellite, ground precipitation and meteorological forecast products.
[0135] Embodiment 3: This embodiment provides an electronic device, which may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The processor may call the logic instructions in the memory to execute a heavy precipitation forecasting method based on a dual-branch convolutional LSTM model, and the method includes the following steps:
[0136] S100, obtaining historical forecast data, and preprocessing them as a first data source; obtaining satellite data and real-time precipitation data for a corresponding period, and preprocessing them respectively as a second data source;
[0137] S200: construct a model for heavy rainfall forecasting, wherein the model is constructed to have:
[0138] Input layer, used to input historical forecast data, satellite data and real-time precipitation data;
[0139] The dual-branch convolutional LSTM feature extraction layer adopts a dual-branch structure, in which the first branch extracts the spatiotemporal features of historical forecast data, and the second branch extracts the spatiotemporal features of satellite data and real-time precipitation data;
[0140] The feature fusion module uses feature splicing to splice the feature vectors of the two spatiotemporal features output by the dual branches into a high-dimensional feature vector, and then reduces the dimension through a convolution layer, and performs nonlinear transformation through batch normalization and ReLU activation function;
[0141] The decoder layer upsamples and extracts features through convolution transposition, convolution, and batch normalization layers, and gradually upsamples the fused features to the original resolution. At the same time, an attention mechanism is introduced to weight the features of different channels.
[0142] The output layer uses a 1x1 convolutional layer to output 11 channels, corresponding to 11 precipitation levels, and uses the Softmax function to perform probability normalization on the channel dimension;
[0143] S300, constructing a loss function, and training the model for heavy precipitation forecasting constructed in step S200 according to the first data source and the second data source preprocessed in step S100;
[0144] S400: Using the trained model for heavy precipitation forecasting, outputting the future precipitation magnitude distribution based on the data of current satellite, ground precipitation and meteorological forecast products.
[0145] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0146] Embodiment 4: This embodiment provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute a heavy precipitation forecasting method based on a dual-branch convolutional LSTM model, and the method includes the following steps:
[0147] S100, obtaining historical forecast data, and preprocessing them as a first data source; obtaining satellite data and real-time precipitation data for a corresponding period, and preprocessing them respectively as a second data source;
[0148] S200: construct a model for heavy rainfall forecasting, wherein the model is constructed to have:
[0149] Input layer, used to input historical forecast data, satellite data and real-time precipitation data;
[0150] The dual-branch convolutional LSTM feature extraction layer adopts a dual-branch structure, in which the first branch extracts the spatiotemporal features of historical forecast data, and the second branch extracts the spatiotemporal features of satellite data and real-time precipitation data;
[0151] The feature fusion module uses feature splicing to splice the feature vectors of the two spatiotemporal features output by the dual branches into a high-dimensional feature vector, and then reduces the dimension through a convolution layer, and performs nonlinear transformation through batch normalization and ReLU activation function;
[0152] The decoder layer upsamples and extracts features through convolution transposition, convolution, and batch normalization layers, and gradually upsamples the fused features to the original resolution. At the same time, an attention mechanism is introduced to weight the features of different channels.
[0153] The output layer uses a 1x1 convolutional layer to output 11 channels, corresponding to 11 precipitation levels, and uses the Softmax function to perform probability normalization on the channel dimension;
[0154] S300, constructing a loss function, and training the model for heavy precipitation forecasting constructed in step S200 according to the first data source and the second data source preprocessed in step S100;
[0155] S400: Using the trained model for heavy precipitation forecasting, outputting the future precipitation magnitude distribution based on the data of current satellite, ground precipitation and meteorological forecast products.
[0156] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0157] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0158] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A heavy precipitation forecasting method based on a dual-branch convolutional LSTM model, characterized in that: include: S100, obtaining historical forecast data, and preprocessing the data as a first data source; Obtain satellite data and real-time precipitation data for the corresponding period, and pre-process them respectively as the second data source; S200: construct a model for heavy rainfall forecasting, wherein the model is constructed to have: Input layer, used to input historical forecast data, satellite data and real-time precipitation data; The dual-branch convolutional LSTM feature extraction layer adopts a dual-branch structure, in which the first branch extracts the spatiotemporal features of historical forecast data, and the second branch extracts the spatiotemporal features of satellite data and real-time precipitation data; The feature fusion module uses feature splicing to splice the feature vectors of the two spatiotemporal features output by the dual branches into a high-dimensional feature vector, and then reduces the dimension through a convolution layer, and performs nonlinear transformation through batch normalization and ReLU activation function; The decoder layer upsamples and extracts features through convolution transposition, convolution, and batch normalization layers, and gradually upsamples the fused features to the original resolution. At the same time, an attention mechanism is introduced to weight the features of different channels. The output layer uses a 1x1 convolutional layer to output 11 channels, corresponding to 11 precipitation levels, and uses the Softmax function to perform probability normalization on the channel dimension; S300, constructing a loss function, and training the model for heavy precipitation forecasting constructed in step S200 according to the first data source and the second data source preprocessed in step S100; S400: Using the trained model for heavy precipitation forecasting, outputting the future precipitation magnitude distribution based on the data of current satellite, ground precipitation and meteorological forecast products.
2. The heavy precipitation forecasting method based on the dual-branch convolutional LSTM model according to claim 1, characterized in that: In step S100, historical forecast data is obtained and pre-processed as a first data source; Obtain satellite data and real-time precipitation data for the corresponding period, and pre-process them respectively as the second data source; including: Load the meteorological large model forecast product, perform inference and historical weather back calculation, and obtain the forecast data for the required time period and required variables; perform logarithmic transformation on the precipitation in the forecast data, and use the Z-score standardization method to standardize the remaining variables except precipitation so that the data obeys the standard normal distribution with a mean of 0 and a standard deviation of 1. The Z-score standardization formula is expressed as: z=(x―μ) / σ; Among them, z is the standardized value, x is the original data, μ is the sample mean, and σ is the sample standard deviation; All processed variables are used as the first data source; Acquire AGRI observation data from geostationary meteorological satellites and perform geometric correction, radiation correction and geolocation processing; Obtain CLDAS precipitation data and perform logarithmic transformation. The formula for logarithmic transformation is: y=log 10 (x+c); Among them, y is the transformed value, x is the original precipitation data, and c is a constant, which is set to 1 to avoid taking the logarithm of zero value; Interpolation processing was performed on AGRI observation data and CLDAS precipitation data to align the two data spaces. The processed AGRI observation data and CLDAS precipitation data are used as the second data source.
3. The heavy precipitation forecasting method based on the dual-branch convolutional LSTM model according to claim 1, characterized in that: In the model constructed in step S200, two parallel convolutional LSTM networks are used to extract the features of the first data source and the second data source respectively, and the hidden state outputs of the two branches are obtained through calculation, respectively, to represent the different spatiotemporal features of the two data sources; Each convolutional LSTM network contains a ConvLSTMCell unit with a hidden state dimension of 64 and a convolution kernel size of 3.
4. The heavy precipitation forecasting method based on the dual-branch convolutional LSTM model according to claim 3 is characterized in that: In the model constructed in step S200, the feature fusion module uses feature splicing to splice the hidden states of the two convolutional LSTM networks, both of which have a dimension of 64, into a 128-dimensional feature vector. Subsequently, a 3x3 convolutional layer is used to reduce the feature dimension to 64, and a nonlinear transformation is performed through batch normalization and ReLU activation function.
5. The heavy precipitation forecasting method based on the dual-branch convolutional LSTM model according to claim 4 is characterized in that: In the model constructed in step S200, the decoder layer introduces the SE attention mechanism. The SE attention mechanism learns the weight of each channel through global average pooling, two fully connected layers and Sigmoid activation function, and weights the features of different channels.
6. The heavy precipitation forecasting method based on the dual-branch convolutional LSTM model according to claim 1, characterized in that: The loss function constructed in step S300 is a combined loss function of DiceLoss and FocalLoss. During the model training process, DiceLoss is calculated to measure the overlap between the prediction results and the true labels. FocalLoss is calculated to give higher weights to difficult-to-distinguish samples. Then, DiceLoss and FocalLoss are weighted and summed to obtain the final loss function.
7. The heavy precipitation forecasting method based on the dual-branch convolutional LSTM model according to claim 1, characterized in that: When training the model in step S300, a progressive training strategy is adopted, specifically: The first data source and the second data source are divided into time steps. During training, the model is trained in chronological order. The training of each time step is based on the training result of the previous time step, so that the model learns time features.
8. The heavy precipitation forecasting method based on the dual-branch convolutional LSTM model according to claim 1, characterized in that: When training the model in step S300, a mixed precision training method is adopted; specifically, the method includes: Use PyTorch's autocast and GradScaler mechanisms to improve training efficiency, speed up the training process and reduce memory usage; Use the AdamW optimizer and introduce the CosineAnnealingWarmRestarts learning rate scheduler, which uses a cosine annealing strategy and restarts the learning rate after each cycle. An early stopping mechanism is used in model training. When the loss of the validation set does not decrease for 5 consecutive epochs, the training process is terminated early. During the training process, torch.nn.utils.clip_grad_norm is used to clip the gradient of the model parameters and limit the norm of the gradient to less than 0.
5.
9. A non-transitory computer-readable storage medium having computer instructions stored thereon, the computer instructions enabling a computer to execute the heavy precipitation forecasting method based on a dual-branch convolutional LSTM model as described in any one of claims 1 to 8.
10. An electronic device, comprising: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus, and the processor calls the logic instructions in the memory to execute the heavy precipitation forecasting method based on the dual-branch convolutional LSTM model described in any one of claims 1-8.
Citation Information
Cited By
Photovoltaic power station distributed construction management method and system based on load analysis
CN120806577A
Short-time heavy rainfall prediction method based on deep learning
CN122221040A
A short-time heavy precipitation prediction method based on deep learning
CN122221040B