Short-term rainfall prediction method and system based on deep learning and deviation correction
By introducing multivariate correlation mechanisms and bias correction technology into the precipitation prediction model, complex spatio-temporal characteristics of non-structural site data are extracted and model errors are corrected, and the problem of poor precipitation prediction accuracy in the prior art is solved, achieving higher prediction accuracy.
Patent Information
- Application Number
- CN202411871466.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-11
AI Technical Summary
The existing precipitation prediction method based on deep learning is difficult to extract complex spatiotemporal relationships in non-structural site observation data, and ignores the errors in the model itself, resulting in poor accuracy of precipitation prediction.
A short-term precipitation prediction model based on deep learning is adopted. By embedding the sample sequence, site location information and time information in the precipitation historical data, the seasonal characteristics of generalized stationarity and the trend characteristics of non-stationarity are extracted, and multi-level optimization is carried out through multi-variable correlation mechanisms, combined with deviation correction technology, the prediction accuracy is improved.
Effectively extract complex spatio-temporal features in massive non-structural site data, improve prediction accuracy, and solve model error problems through deviation correction technology, further improve prediction accuracy.
Smart Images

Figure CN119809381A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of precipitation prediction, and in particular relates to a short-term precipitation prediction method and system based on deep learning and deviation correction. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Traditional precipitation prediction methods have limitations when processing massive amounts of data, but with the continuous development of deep learning technology, people have begun to explore the use of deep learning technology to improve the accuracy and reliability of precipitation prediction; deep learning methods effectively improve the accuracy and precision of precipitation prediction by learning and building models for massive precipitation data. Compared with traditional numerical model methods, deep learning has advantages in computing resource consumption and computing time, making precipitation prediction and analysis more efficient. Using deep learning technology for precipitation analysis and prediction can help improve the accuracy of weather forecasts, enhance understanding of climate change, and effectively respond to extreme weather events.
[0004] However, the inventors found that the existing precipitation prediction methods based on deep learning have the following problems: on the one hand, the methods based on deep learning usually need to use massive data to train the model, but the previous model training is mostly based on gridded structured reanalysis data sets, and it is difficult to train a model with higher accuracy than the reanalysis data set. The multi-dimensional time series observation data of non-structured sites with higher accuracy are unevenly distributed in space and usually have extremely complex spatiotemporal relationships. The traditional deep learning model cannot effectively model the complex spatiotemporal relationships between non-structured site data; on the other hand, the methods based on deep learning usually use the output results of the trained deep learning model as the final precipitation prediction results, while ignoring the errors in the model prediction, resulting in poor accuracy of the prediction results. Traditionally, a uniform loss function is usually used for model training, but there is an imbalance problem in precipitation data, which easily leads to large errors in the training model and affects the accuracy of the prediction results. Therefore, in addition to using the real observation data of non-structured sites, there should also be a more reasonable loss function construction method for the obvious imbalance of precipitation data to improve the effect of model training and the accuracy of prediction. Summary of the invention
[0005] The present invention provides a short-term precipitation prediction method and system based on deep learning and deviation correction to solve the problems that traditional deep learning-based methods have difficulty in extracting complex spatiotemporal relationships of non-structured site observation data, precipitation data is highly unbalanced, and errors in the model itself are ignored, which leads to poor precipitation prediction accuracy.
[0006] According to a first aspect of an embodiment of the present invention, a short-term precipitation prediction method based on deep learning and deviation correction is provided, comprising: Get historical data on precipitation in a preset area; Based on the historical data, using a pre-trained short-term precipitation prediction model based on deep learning, an initial precipitation prediction result for a preset future stage is obtained; The short-term precipitation prediction model based on deep learning specifically performs the following processing process: embedding the sample sequence in the historical data of precipitation, the location information of the station corresponding to the sample sequence, and the time information respectively; using the obtained embedding representation as the encoder input to obtain the seasonal characteristics with broad sense stability and the trend characteristics with non-stationarity; using the seasonal characteristics and trend characteristics as the input of the decoder, through the preset multivariate correlation mechanism, multi-level optimization of the seasonal characteristics and trend characteristics is performed to obtain the optimized seasonal characteristics and trend characteristics; based on the fusion characteristics of the obtained seasonal characteristics and trend characteristics, short-term precipitation prediction is realized; Based on the initial precipitation forecast result and in combination with the pre-calculated forecast deviation, a short-term precipitation forecast result is obtained.
[0007] Furthermore, the training of the short-term precipitation prediction model based on deep learning is specifically as follows: constructing a data set based on historical data of precipitation in a preset area, and dividing the data set into a first training set, a validation set and a test set according to a preset ratio; randomly extracting samples from the training set, the validation set and the test set according to a preset ratio to construct a second training set; counting the proportions of different precipitation levels in the second training set, and obtaining weights corresponding to different precipitation levels based on the proportions; constructing a weight-controlled loss function based on the weights; and training the model based on the first training set and the loss function.
[0008] Furthermore, the loss function of the weight control is specifically expressed as follows:
[0009] in, Representative The true label value of the sample, Indicates The absolute error between the true value and the predicted value of a sample is Indicates the total number of elements output. is the weight.
[0010] Furthermore, the short-term precipitation prediction model includes an encoder and a decoder, wherein the encoder specifically performs the following processing procedures: the sample sequence in the input precipitation historical data, the location information of the station corresponding to the sample sequence, and the time information are respectively embedded and represented, and the spatiotemporal features are extracted through a multivariate correlation mechanism; the extracted spatiotemporal features are decomposed in multiple levels to obtain seasonal characteristics and trend characteristics; the decoder specifically performs the following processing procedures: the obtained seasonal characteristics and trend characteristics are taken as input, and the optimized seasonal characteristics and trend characteristics are obtained in sequence through a first multivariate correlation mechanism, feature decomposition, a second multivariate correlation mechanism, feature decomposition, a feedforward neural network, and feature decomposition; the precipitation prediction result is obtained based on the fusion features of the optimized seasonal characteristics and trend characteristics.
[0011] Furthermore, the prediction deviation is calculated specifically as follows: based on the trained short-term precipitation prediction model, precipitation prediction is performed on samples in the historical data set, and deviation calculation is performed based on the prediction results and actual precipitation results; the deviation mean of all samples is taken as the prediction deviation.
[0012] Furthermore, based on the initial precipitation prediction result, combined with the pre-calculated prediction deviation, a short-term precipitation prediction result is obtained, specifically: the sum of the initial precipitation prediction result and the prediction deviation is taken as the final short-term precipitation prediction result.
[0013] According to a second aspect of an embodiment of the present invention, a short-term precipitation prediction system based on deep learning and deviation correction is provided, comprising: A data acquisition unit, which is used to acquire historical data of precipitation conditions in a preset area; An initial prediction unit is used to obtain an initial precipitation prediction result for a preset future stage based on the historical data using a pre-trained short-term precipitation prediction model based on deep learning; wherein the short-term precipitation prediction model based on deep learning specifically performs the following processing procedures: embedding the sample sequence in the historical data of precipitation conditions, the location information of the corresponding station of the sample sequence, and the time information respectively; using the obtained embedded representation as the encoder input to obtain seasonal characteristics with broad sense stationarity and trend characteristics with non-stationarity; using the seasonal characteristics and trend characteristics as the decoder input, performing multi-level optimization on the seasonal characteristics and trend characteristics through a preset multivariate correlation mechanism to obtain optimized seasonal characteristics and trend characteristics; based on the fusion characteristics of the obtained seasonal characteristics and trend characteristics, short-term precipitation prediction is realized; A deviation correction unit is used to obtain a short-term precipitation prediction result based on the initial precipitation prediction result in combination with a pre-calculated prediction deviation.
[0014] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising a memory, a processor, and a computer program stored and running on the memory, wherein when the processor executes the program, the short-term precipitation prediction method based on deep learning and deviation correction is implemented.
[0015] According to a fourth aspect of an embodiment of the present invention, a non-transitory computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the short-term precipitation prediction method based on deep learning and deviation correction is implemented.
[0016] According to a fifth aspect of an embodiment of the present invention, there is provided a computer program product, comprising a computer program, which, when executed by a processor, implements the short-term precipitation prediction method based on deep learning and deviation correction.
[0017] One or more of the above technical solutions have the following beneficial effects: (1) The present invention provides a short-term precipitation prediction method and system based on deep learning and bias correction. The scheme decomposes the input massive unstructured station data features into seasonal characteristics of generalized stationarity and trend characteristics of non-stationarity, and combines the multivariate correlation mechanism to perform multi-level optimization of seasonal characteristics of generalized stationarity and trend of non-stationarity. It can effectively extract the complex spatiotemporal characteristics in the massive unstructured station data and improve the prediction accuracy to a certain extent. At the same time, by introducing bias correction, it can effectively solve the error problem existing in the model itself and further improve the prediction accuracy.
[0018] (2) The scheme of the present invention can effectively achieve weighted processing of data by classifying precipitation into grades, and then use the weighted loss function to deal with precipitation problems in deep learning; by introducing the weighted loss function, the performance of the deep learning model in detecting precipitation events with a small proportion of precipitation data can be improved to a certain extent; at the same time, different precipitation levels can be given different "importances" during the training process, so that the model pays more attention to those important or difficult categories when predicting. The weighted loss function can help the model pay more attention to important or difficult-to-predict precipitation levels by adjusting the loss contribution of each category in the precipitation classification task.
[0019] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0021] Figure 1 It is a schematic diagram of the overall process of a short-term precipitation prediction method based on deep learning and deviation correction described in an embodiment of the present invention; DETAILED DESCRIPTION It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0022] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.
[0023] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0024] like Figure 1 As shown, this embodiment provides a short-term precipitation prediction method based on deep learning and deviation correction, including: Step 1: Obtain historical data on precipitation in a preset area; In the specific implementation, this embodiment uses the meteorological station data of a certain area and the precipitation data of ERA5 from 2017 to 2023, and finally outputs the precipitation forecast results for 1-2 days; Among them, each sample sequence in the input historical data includes seven influencing factors related to precipitation, including: temperature, air pressure, dew point, wind direction, wind speed, cloud cover, and precipitation.
[0025] In a specific implementation, the samples in the historical data are divided into several precipitation levels according to preset thresholds based on the precipitation corresponding to the samples in the historical data. For example, the precipitation level is divided based on the 3-hour cumulative precipitation of the four precipitation thresholds of 0.1, 3.0, 20.0, and 50.0 mm / 3 h.
[0026] Step 2: Based on the historical data, using a pre-trained short-term precipitation prediction model based on deep learning, an initial precipitation prediction result for a preset future stage is obtained; The short-term precipitation prediction model based on deep learning specifically performs the following processing process: embedding the sample sequence in the historical data of precipitation, the location information of the station corresponding to the sample sequence, and the time information respectively; using the obtained embedding representation as the encoder input to obtain the seasonal characteristics with broad sense stability and the trend characteristics with non-stationarity; using the seasonal characteristics and trend characteristics as the input of the decoder, through the preset multivariate correlation mechanism, multi-level optimization of the seasonal characteristics and trend characteristics is performed to obtain the optimized seasonal characteristics and trend characteristics; based on the fusion characteristics of the obtained seasonal characteristics and trend characteristics, short-term precipitation prediction is realized; In a specific implementation, the training of the short-term precipitation prediction model based on deep learning is specifically as follows: a data set is constructed based on historical data of precipitation in a preset area, and the data set is divided into a first training set, a validation set, and a test set according to a preset ratio; samples are randomly extracted from the training set, the validation set, and the test set according to a preset ratio to construct a second training set; the proportion of different precipitation levels in the second training set is counted, and the weights corresponding to different precipitation levels are obtained based on the proportion; a weight-controlled loss function is constructed based on the weights; and model training is performed based on the first training set and the loss function.
[0027] The loss function of the weight control is specifically expressed as follows:
[0028] in, Representative The true label value of the sample, Indicates The absolute error between the true value and the predicted value of a sample is Indicates the total number of elements output. is the weight.
[0029] The scheme described in this embodiment can effectively implement weighted processing of data by classifying precipitation into levels, and use weighted loss functions for deep learning to deal with precipitation problems. In the precipitation classification task, different levels of precipitation may have different impacts on practical applications. For example, a prediction error for heavy rain may be more serious than a prediction error for light rain. Therefore, by introducing a weighted loss function, different precipitation levels can be given different "importances" during the training process, so that the model pays more attention to those important or difficult categories when predicting. The weighted loss function can help the model pay more attention to important or difficult-to-predict precipitation levels in the precipitation classification task by adjusting the loss contribution of each category.
[0030] In a specific implementation, the short-term precipitation prediction model is based on a Transformer architecture, and the short-term precipitation prediction model includes an encoder and a decoder, wherein the encoder specifically performs the following processing procedures: the sample sequence in the input precipitation historical data, the location information of the corresponding site of the sample sequence, and the time information are respectively embedded and represented, and the spatiotemporal features are extracted through a multivariate correlation mechanism; the extracted spatiotemporal features are decomposed in multiple levels to obtain seasonal features and trend features; the decoder specifically performs the following processing procedures: the obtained seasonal features and trend features are taken as input, and the optimized seasonal features and trend features are obtained in sequence through a first multivariate correlation mechanism, feature decomposition, a second multivariate correlation mechanism, feature decomposition, a feedforward neural network, and feature decomposition; the precipitation prediction result is obtained based on the fusion features of the optimized seasonal features and trend features.
[0031] Specifically, the short-term precipitation prediction model also includes a feature embedding part, such as Figure 1 In the feature embedding part: project the original sequence into the latent space and embed the geographic location Fusion with the original sequence, including latitude, longitude, altitude and time information for each station ,The same embedding is also applied to prepare the input for the decoder.
[0032] First, the embedding layer will , and As input data, three linear projectors are used to embed the embedding layer and appropriately broadcast in spatial and temporal dimensions to ensure dimension compatibility.
[0033] Second, the encoder layer learns information representation from past observations and provides it to the decoder. Layer Input ,The model alternately uses multi-correlation mechanisms and feed-forward layers to capture spatiotemporal correlations and perform representation transformation, respectively. The past information is extracted from the E encoder layer and fed to the decoder. The sequence decomposition block Decomp of the encoder layer can decompose the sequence into a seasonal part with wide-sense stationarity and a non-stationary trend part. In the encoder, the wide-sense stationary information of past observations is focused on and the trend part is eliminated. For spatiotemporal modeling, multi-correlation is designed in a self-attention style.
[0034] Among them, the sequence decomposition block Decomp adopts the idea of decomposition, which can divide the sequence into a seasonal part with broad-sense stationarity and a non-stationary trend part. These two parts reflect the long-term evolution and seasonality of the sequence respectively. The sequence decomposition module Decomp can gradually extract the long-term stationary trend from the intermediate hidden variables of the prediction. Specifically, the module uses moving average to smooth the periodic fluctuations and highlight the long-term trend. For example: for an input sequence of length L , the processing process is:
[0035]
[0036] The seasonal and cyclical trends are extracted by the above formulas, where: Indicates the season part, Represents the trend part, AvgPool() represents average pooling in deep learning, and Padding() represents edge padding in deep learning.
[0037] Finally, the input to the decoder layer , , respectively representing the future wide stationary seasonal part and non-stationary trend part, these initializations will be refined in the decoder based on the spatiotemporal information learned from the encoder. For seasonal part modeling, the input and past information No. The seasonal forecast was updated twice using the multi-correlation method: the first The second step integrates the spatiotemporal information from past observations and sets the keys and values to , set the query to the output of the previous decoding step. The trend part is extracted through accumulation. The final forecast is the sum of the seasonal forecast and the trend forecast.
[0038] The scheme described in this embodiment adopts a multi-head attention mechanism. In order to discover complex spatiotemporal correlations from scattered partial observation data and perform collaborative forecasting, the following multi-correlation mechanism is proposed, specifically: The tree-based multi-scale structure uses a tree structure to organize scattered sites into multiple scales. Unlike the regularly spaced kernels widely used in neural networks, the tree provides a more flexible way to capture multi-scale patterns. Technically, the tree is built on the geographical locations of the sites through hierarchical neighborhood clustering. In addition to being closely linked to the multi-scale characteristics of the global weather system, the tree design also provides an overall framework for unified spatiotemporal correlation modeling. Temporal autocorrelation modeling: In order to achieve more fine-grained prediction, we choose to retain the time information of each site and perform temporal correlation modeling on each leaf node of the tree structure. By introducing autocorrelation into a unified spatiotemporal correlation modeling framework, it is used for sequence-related temporal dependency discovery, rather than point-by-point self-attention. The autocorrelation involving Q, K, and V is formalized, the autocorrelation coefficients of Q and K are calculated, and sequence aggregation is performed on V. Fast Fourier transform (FFT) is used to accelerate autocorrelation calculation, which essentially achieves N The computational complexity is log-linear for each station.
[0039] Spatial cross-correlation modeling, computed directly from the observation sequence N The dependencies between sites will generate quadratic complexity. To achieve effective spatial correlation modeling, the pairwise cross-correlations are expanded into a pivot-based form, which significantly reduces the computational complexity from quadratic to linear form.
[0040] In the specific implementation, the multivariate correlation mechanism mainly serves to model the input in time and space. First, a multi-scale tree structure is constructed to combine all sites according to their locations. Similar sites form an area, and similar areas form a larger area to form a multi-scale tree structure. The bottom layer is the leaf node, which corresponds to all sites. Then, at the leaf node, autocorrelation is used for time domain modeling; at the upper node of the tree, autocorrelation is used for spatial domain modeling.
[0041] Specifically, the multivariate correlation mechanism is described in detail below: Tree-based multi-scale structure: The construction of a tree-based multi-scale structure is essentially to gradually combine adjacent sites. Specifically: the bottom layer has N nodes, including all sites; the top layer has only one node. For each upper-level node, its sequence value is obtained by averaging its child nodes, representing the comprehensive meteorological characteristics of a region. This organization not only conforms to the multi-scale characteristics of the global atmosphere itself, but also allows the parent node to be used as the Pivot (center) of the child node. The sequence value of the child node is obtained by delaying the sequence value of the parent node in the time domain (time domain offset), which can reduce the complexity of airspace modeling and introduce interpretability.
[0042] In the specific implementation process, in order to parallelize the calculation, the number of child nodes of each parent node is set to be the same, and the different ones can be filled by Padding.
[0043] Time Series Autocorrelation Modeling: For each leaf node (i.e., each site), Auto-Correlation is used to model the time domain relationship. Auto-Correlation uses the autocorrelation of the sequence, calculates the autocorrelation coefficient through FFT, finds the most important autocorrelation delay, forms several delay sequences, and then aggregates these delay sequences to obtain the output. In actual calculation, Q (query) and K (key) are used to calculate the autocorrelation and aggregate the delay sequence of V (value).
[0044] Spatial cross-correlation modeling: For upper-level nodes (child nodes are different sites and different regions), Cross-Correlation is calculated on a multi-scale tree structure to model spatial relationships. Specifically, a parent node sequence is the average of all child node sequences, which is equivalent to reflecting the overall meteorological characteristics of a region. For each child node sequence, they also have a time offset relative to the parent node sequence (called Pivot), that is, a relative time domain delay. These offsets can also be calculated using the autocorrelation formula (take Top 1). After that, these offsets are sorted, and this sorting can be regarded as the path of meteorological propagation.
[0045] For example, there are three stations, A, B, and C. It is found that the delays of the sequences of these three stations relative to the average sequence are 3, -2, and 1, respectively. This shows that B is the earliest (arrived earlier in time) relative to the overall weather of the entire region, while A is the latest (arrived later in time). Therefore, the propagation path of the weather in this region is from B to C and then to A. For example, the cold air flows from B to C and then to A, thus forming a chain. Using causal convolution along this chain, you can get a spatially aggregated output.
[0046] Step 3: Based on the initial precipitation forecast result and in combination with the pre-calculated forecast deviation, a short-term precipitation forecast result is obtained.
[0047] In a specific implementation, the prediction deviation is calculated as follows: based on the trained short-term precipitation prediction model, precipitation prediction is performed on samples in the historical data set, and deviation calculation is performed based on the prediction results and actual precipitation results; the deviation mean of all samples is used as the prediction deviation.
[0048] Furthermore, based on the initial precipitation prediction result, combined with the pre-calculated prediction deviation, a short-term precipitation prediction result is obtained, specifically: the sum of the initial precipitation prediction result and the prediction deviation is taken as the final short-term precipitation prediction result.
[0049] Furthermore, in order to verify the effectiveness of the solution described in this embodiment, the following experimental verification was carried out in this embodiment: The spatial distribution of precipitation forecast error (MAE) at different times in my country is shown, covering the forecast period from 3 hours to 24 hours. Each letter corresponds to the MAE distribution at a specific time, where (a) represents 03:00, (b) represents 06:00, (c) represents 09:00, (d) represents 12:00, (e) represents 15:00, (f) represents 18:00, (g) represents 21:00, and (h) represents 24:00.
[0050] The southern and northwestern regions of my country show higher errors, reaching around 1.0, while the central and northeastern regions are relatively low, reaching around 0.6. As time goes by to (c), the error in the southern region continues to increase, while the error in the northeastern region decreases. By (d), the high error areas in the north and northeast have further decreased to around 0.5, the error areas in the south and northwest continue to rise, reaching around 1.5, and the central region maintains a low error.
[0051] (e) has a similar error distribution to (d), but the error in the central region has decreased slightly, while the error in the southern region has increased. In (f), the error in the south and northwest has increased again, reaching around 1.5, and the error in the central region has decreased. (g) shows that the high error area in the north has decreased, the error in the central region has stabilized, and the error in the south has increased. Finally, (h) has a similar error distribution to (g), but the error in the south and northwest has increased slightly, and the error in the central region has remained stable.
[0052] These error changes reveal the complexity of precipitation prediction in my country, and the errors in different regions are significantly affected by local climate conditions and topography. The prediction performance of the model is dynamically adjusted with changes in time and space, showing that the model has good adaptability in dealing with different climate conditions and topographic influences. Although the MAE and its changes at different times are shown, the MAE values at all specific times are relatively small, indicating that the precipitation prediction model in my country has high accuracy and stability.
[0053] Precipitation classification: The spatial distribution of the MAE difference between the model before and after correction and classification is shown, covering the forecast period from 3 hours to 24 hours, with an interval of 3 hours. The overall distribution of the graded corrected MAE values is similar to that of the precipitation values, with the largest value in the southeast region, the smallest value in the northwest region, and the central region in between. The larger positive values of the corrected MAE are located in the southeast region with abundant precipitation, especially in the southeast coastal area, and the maximum graded corrected MAE can reach more than 6. Most of the corrected MAE values in the central region are between 2 and 4. The difference in the corrected MAE in the northeast region of the northwest is small, and most of them are below 1, which may indicate that the effect of graded correction is not obvious in these areas or there are other factors affecting the prediction performance. Overall, the graded loss function technology effectively improves the prediction performance of the precipitation prediction model.
[0054] In general, the bias correction technology has played a positive role in reducing prediction errors and improving model prediction accuracy, especially when the precipitation levels are divided more finely, the model can better adapt to different precipitation conditions and provide more reliable prediction results. This improvement has important application value for actual meteorological forecasting and water resources management, especially in the context of accurate prediction of extreme precipitation events, the graded corrected model has demonstrated its superior prediction ability and stability.
[0055] Comparative analysis: According to the data in Table 1, the scheme described in this embodiment is generally superior to the ECMWF and GFS models in the accuracy of 3-hour precipitation forecast. In terms of the MAE (mean absolute error) and RMSE (root mean square error) indicators throughout the year, the values of the scheme described in this embodiment are lower than those of the other two models, showing a smaller prediction error. Especially in summer, the MAE and RMSE of the scheme described in this embodiment are 0.98 and 1.33, respectively, which is the best performance in all seasons. In winter, the MAE of the scheme described in this embodiment is 0.69 and the RMSE is 0.96, which also performs well. In contrast, the ECMWF model has the highest RMSE in summer, reaching 9.72, while the GFS model has a maximum RMSE of 8.97 throughout the year, which occurs in summer. These results show that the scheme described in this embodiment provides more stable and accurate predictions in precipitation forecasts in different seasons.
[0056] Overall, the scheme described in this embodiment has demonstrated a forecasting capability that is superior to the international mainstream precipitation forecasts ECMWF and GFS. This achievement reflects the progress of the scheme described in this embodiment in data processing and algorithm optimization, and also reveals the possibility of further improving model performance in specific seasons (such as summer).
[0057] Table 1. Comparison results of the 3-hour precipitation forecast of the scheme described in this embodiment with the ECMWF and GFS models
[0058] In one or more embodiments, a short-term precipitation prediction system based on deep learning and deviation correction is provided corresponding to the above method, including: A data acquisition unit, which is used to acquire historical data of precipitation conditions in a preset area; An initial prediction unit is used to obtain an initial precipitation prediction result for a preset future stage based on the historical data using a pre-trained short-term precipitation prediction model based on deep learning; wherein the short-term precipitation prediction model based on deep learning specifically performs the following processing procedures: embedding the sample sequence in the historical data of precipitation conditions, the location information of the corresponding station of the sample sequence, and the time information respectively; using the obtained embedded representation as the encoder input to obtain seasonal characteristics with broad sense stationarity and trend characteristics with non-stationarity; using the seasonal characteristics and trend characteristics as the decoder input, performing multi-level optimization on the seasonal characteristics and trend characteristics through a preset multivariate correlation mechanism to obtain optimized seasonal characteristics and trend characteristics; based on the fusion characteristics of the obtained seasonal characteristics and trend characteristics, short-term precipitation prediction is realized; A deviation correction unit is used to obtain a short-term precipitation prediction result based on the initial precipitation prediction result in combination with a pre-calculated prediction deviation.
[0059] It should be noted here that each module in this embodiment corresponds to each step in Example 1 one by one, and the specific implementation process is the same, which will not be repeated here.
[0060] In further embodiments, there is also provided: An electronic device includes a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in Embodiment 1 is performed. For the sake of brevity, no further description is given here.
[0061] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0062] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0063] A computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the method described in embodiment 1 is completed.
[0064] The method in the first embodiment can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
[0065] Those skilled in the art will appreciate that the units, i.e., algorithm steps, of the various examples described in the present embodiment can be implemented in electronic hardware or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0066] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A short-term precipitation prediction method based on deep learning and deviation correction, characterized in that: include: Obtain historical data on precipitation in a preset area; Based on the historical data, using a pre-trained short-term precipitation prediction model based on deep learning, an initial precipitation prediction result for a preset future stage is obtained; The short-term precipitation prediction model based on deep learning specifically performs the following processing process: embedding the sample sequence in the historical data of precipitation, the location information of the station corresponding to the sample sequence, and the time information respectively; using the obtained embedding representation as the encoder input to obtain the seasonal characteristics with broad sense stability and the trend characteristics with non-stationarity; using the seasonal characteristics and trend characteristics as the input of the decoder, through the preset multivariate correlation mechanism, multi-level optimization of the seasonal characteristics and trend characteristics is performed to obtain the optimized seasonal characteristics and trend characteristics; based on the fusion characteristics of the obtained seasonal characteristics and trend characteristics, short-term precipitation prediction is realized; Based on the initial precipitation forecast result and in combination with the pre-calculated forecast deviation, a short-term precipitation forecast result is obtained.
2. A short-term precipitation prediction method based on deep learning and deviation correction as claimed in claim 1, characterized in that: The training of the short-term precipitation prediction model based on deep learning is specifically as follows: constructing a data set based on historical data of precipitation in a preset area, and dividing the data set into a first training set, a validation set, and a test set according to a preset ratio; randomly extracting samples from the training set, the validation set, and the test set according to a preset ratio to construct a second training set; Counting the proportions of different precipitation levels in the second training set, and obtaining weights corresponding to different precipitation levels based on the proportions; A weight-controlled loss function is constructed based on the weights; and model training is performed based on the first training set and the loss function.
3. A short-term precipitation prediction method based on deep learning and deviation correction as claimed in claim 2, characterized in that: The loss function of the weight control is specifically expressed as follows: Among them, y i represents the true label value of the i-th sample, It represents the absolute error between the true value and the predicted value of the i-th sample, n represents the total number of output elements, and ω is the weight.
4. A short-term precipitation prediction method based on deep learning and deviation correction as claimed in claim 1, characterized in that: The short-term precipitation prediction model includes an encoder and a decoder, wherein the encoder specifically performs the following processing process: the sample sequence in the input precipitation historical data, the location information of the corresponding site of the sample sequence, and the time information are respectively embedded and represented, and the spatiotemporal features are extracted through a multivariate correlation mechanism; the extracted spatiotemporal features are multi-level decomposed to obtain seasonal features and trend features; the decoder specifically performs the following processing process: the obtained seasonal features and trend features are used as input, and the optimized seasonal features and trend features are obtained in sequence through a first multivariate correlation mechanism, feature decomposition, a second multivariate correlation mechanism, feature decomposition, a feedforward neural network, and feature decomposition; the precipitation prediction result is obtained based on the fusion features of the optimized seasonal features and trend features.
5. The short-term precipitation prediction method based on deep learning and deviation correction as claimed in claim 1, characterized in that: The prediction deviation is calculated specifically as follows: based on the trained short-term precipitation prediction model, precipitation prediction is performed on samples in the historical data set, deviation calculation is performed based on the prediction results and actual precipitation results; and the deviation mean of all samples is taken as the prediction deviation.
6. A short-term precipitation prediction method based on deep learning and deviation correction as claimed in claim 1, characterized in that: The short-term precipitation prediction result is obtained based on the initial precipitation prediction result and the pre-calculated prediction deviation, specifically: the sum of the initial precipitation prediction result and the prediction deviation is used as the final short-term precipitation prediction result.
7. A short-term precipitation prediction system based on deep learning and deviation correction, characterized in that: include: A data acquisition unit, which is used to acquire historical data of precipitation conditions in a preset area; An initial prediction unit is used to obtain an initial precipitation prediction result for a preset future stage based on the historical data using a pre-trained short-term precipitation prediction model based on deep learning; wherein the short-term precipitation prediction model based on deep learning specifically performs the following processing procedures: embedding the sample sequence in the historical data of precipitation conditions, the location information of the corresponding station of the sample sequence, and the time information respectively; using the obtained embedded representation as the encoder input to obtain seasonal characteristics with broad sense stationarity and trend characteristics with non-stationarity; using the seasonal characteristics and trend characteristics as the decoder input, performing multi-level optimization on the seasonal characteristics and trend characteristics through a preset multivariate correlation mechanism to obtain optimized seasonal characteristics and trend characteristics; based on the fusion characteristics of the obtained seasonal characteristics and trend characteristics, short-term precipitation prediction is realized; A deviation correction unit is used to obtain a short-term precipitation prediction result based on the initial precipitation prediction result in combination with a pre-calculated prediction deviation.
8. An electronic device comprising a memory, a processor and a computer program stored and running on the memory, characterized in that: When the processor executes the program, it implements a short-term precipitation prediction method based on deep learning and deviation correction as described in any one of claims 1-6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a short-term precipitation prediction method based on deep learning and deviation correction as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it implements a short-term precipitation prediction method based on deep learning and deviation correction as described in any one of claims 1 to 6.