Medium-and-long-term rainfall prediction method fusing spatial-temporal characteristics

Through the DC-CNN-BiLSTM model, combined with expanded causal convolution and bidirectional LSTM network, the problem of low precipitation prediction accuracy in the existing technology is solved, and more efficient spatial and temporal feature capture and prediction accuracy are achieved.

CN119918000APending Publication Date: 2025-05-02GUIZHOU EAST CENTURY SCI TECH CO LTD +1
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411969618.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

Existing precipitation prediction methods are difficult to effectively capture the spatiotemporal characteristics of precipitation data, resulting in low prediction accuracy.

Method used

The DC-CNN-BiLSTM model is adopted to mine the spatial dependence and temporal characteristics of precipitation data through a two-way LSTM network combining a causal convolution neural network and a multi-head attention mechanism.

Benefits of technology

It significantly improves the accuracy of precipitation prediction, can better capture spatiotemporal features and reduce prediction errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918000A_ABST
    Figure CN119918000A_ABST
Patent Text Reader

Abstract

The invention discloses a spatio-temporal feature fused medium and long term rainfall prediction method, an adopted prediction model is a fusion prediction model combining an expansion causal convolutional neural network (DC-CNN) and a bidirectional long and short term memory (BiLSTM) network, and the fusion prediction model is used for rainfall prediction; the DC-CNN captures spatial information in an original time sequence and applies the spatial information to a subsequent prediction task; the BiLSTM effectively processes the time dependence of the sequence data, and models and predicts the time sequence. According to the DC-CNN-BiLSTM model, the precision and stability of rainfall prediction can be effectively improved through the mutual cooperation between the DCNN network and the BiLSTM network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of precipitation prediction, and relates to a medium- and long-term precipitation prediction method integrating temporal and spatial characteristics. Background Art

[0002] As a research hotspot in meteorology, climate science and computer science, precipitation forecasting has a vital impact on all areas of human society. For example, in agriculture, precipitation forecasting can help farmers arrange irrigation time and frequency reasonably, so as to effectively use water resources and reduce waste. It can also adjust irrigation plans according to weather changes to ensure that crops are adequately supplied with water. At the same time, precipitation is an important process in the hydrological cycle and plays a vital role in maintaining the balance of global freshwater and saltwater resources. Accurate precipitation forecasting helps to rationally plan water resource utilization and ensure the balance of urban water supply, industrial production and ecological environment. In addition, precipitation forecasting is also of great significance for disaster reduction and relief, such as early warning and accurate prediction of extreme climate events such as floods and droughts. In particular, climate and meteorological science studies focusing on India have shown that the variability and frequency of extreme precipitation events have increased significantly. And some gradual biological changes are related to responses to extreme weather and climate events. Precipitation forecasting can minimize disaster losses and protect people's lives and property.

[0003] Traditional prediction methods mainly focus on meteorological observation and numerical weather prediction. The basic principles of NWP model, including numerical framework, methods and physical parameterization for simulating atmospheric dynamics, are proposed in the literature "Pu Z, Kalnay E. Numerical Weather Prediction Basics: Models, Numerical Methods, and Data Assimilation [J]. 2019. DOI: 10.1007 / 978-3-642-39925-1_11 (Numerical Weather Forecast Basics: Models, Numerical Methods, and Data Assimilation, Journal: Handbook of Hydrometeorological Ensemble Forecasting)"; the literature " S, Lin CA, Zawadzki I, et al. Evaluation of precipitation from numerical weather prediction models and satellites using values ​​retrieved from radars [J]. Monthly weather review, 2007, 135 (11): 3750-3766 (Evaluation of precipitation from numerical weather prediction models and satellites using values ​​retrieved from radars, Journal: Monthly Weather Review) proposed that the accuracy of NWP models and satellite precipitation estimates can be significantly improved by combining meteorological data observed by radar. The meteorological observation method uses meteorological element data such as temperature, humidity, air pressure, wind speed and wind direction at meteorological observation sites, combined with historical data and empirical models, to make precipitation forecasts; while numerical weather forecasts are based on atmospheric dynamics and thermodynamic equations, by dividing the atmosphere into grids and solving basic equations such as motion, heat and moisture conservation at each grid point to simulate the evolution of the atmosphere. Traditional prediction methods require the collection and analysis of a large amount of observation data and model parameters, and the calculation time is long. However, the response time of flash floods is very short, and flood forecasting is still subject to important limitations.

[0004] With the rapid development of artificial intelligence theory and application, CNN (Convolutional Neural Network) and LSTM (Long Short Term Memory, LSTM) models have been widely used in precipitation forecasting. The paper "Zhang T, Liu J, Gao C, et al. Prior-Guided gated convolutional networks for rainstorm forecasting [J]. Journal of Hydrology, 2024, 633: 130962" proposed a CNN model that takes into account temporal and spatial prior guidance, which has good results in short-term rainstorm forecasting tasks, and proposed a new gated convolutional encoder-decoder network that can effectively characterize the spatiotemporal pattern of rainstorm events. The paper "Ishida K, Ercan A, Nagasato T, et al. Use of one-dimensional CNN for input data size reduction in LSTM for improved computational efficiency and accuracy in hourly rainfall-runoffmodeling. [J]. Journal of environmental management, 2024, 359: 120931-120931" (Using one-dimensional CNN in LSTM to reduce input data size to improve the computational efficiency and accuracy of hourly rainfall-runoff modeling, Journal name: Journal of Environmental Management) proposes a deep learning architecture CNNsLSTM for hourly rainfall-runoff modeling, which can use meteorological data to estimate hourly river flow. The paper "Rezaie FA, SM J, Fatemeh J. Short-term rainfall forecasting using machine learning-based approaches of PSO-SVR, LSTM and CNN [J]. Journal of Hydrology, 2022, 614: 128463" compared the performance of three rainfall forecasting methods based on machine and deep learning, including hybrid optimized PSO support vector regression (PSO-SVR), long short-term memory (LSTM) and convolutional neural network (CNN). Specifically, deep learning methods have been widely used in precipitation forecasting.Although the current artificial intelligence precipitation forecasting has promoted the development of theory and application, the long-term series prediction of spatiotemporal big data will still produce catastrophic forgetting, resulting in poor training results. In addition, the choice of prediction model will also affect the accuracy of prediction, which requires continuous in-depth research and exploration. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a medium- and long-term precipitation prediction method integrating spatiotemporal features, which can effectively mine the spatial dependencies between regions and capture temporal features, so as to make the prediction model more accurate for precipitation prediction.

[0006] The technical solution adopted by the present invention is: a medium- and long-term precipitation prediction method integrating spatiotemporal features, the method comprising the following steps:

[0007] Step 1: Model the historical data and mine the potential time series information and precipitation trends contained in the data;

[0008] Step 2: Using the precipitation data time series characteristics and precipitation trends in step 1, and according to the spatial-temporal dependency of precipitation data, a DC-CNN-BiLSTM model is established. The DC-CNN-BiLSTM model is a bidirectional LSTM model that combines an expanded causal convolutional neural network and a multi-head attention mechanism. This model takes a single feature time series variable as input and a single variable as output. The prediction model uses the causal convolutional neural network to mine the spatial dependency between regions, and the BiLSTM is used to capture temporal features.

[0009] Step 3: Use the test data set to train the DC-CNN-BiLSTM model to obtain a qualified DC-CNN-BiLSTM model;

[0010] Step 4: Input the measured data into the trained DC-CNN-BiLSTM model to predict medium- and long-term precipitation and obtain the prediction results.

[0011] Furthermore, the specific form of the above step 1 is described in mathematical form as formula (1):

[0012] {y t+1 ,y t+2 ,…,y t+m}=f(x t-n ,x t-n+1 ,…,x t-1 ,x t ) (1)

[0013] In the formula, x t is the precipitation at time t; y t+m is the precipitation forecast at time t+m, x t is a one-dimensional vector containing n features, yt+m is the variable value to be estimated in the next m time periods of the current time; the goal is to obtain all the historical data X{x1,x2,…,x t} and Y{y1,y2,…,y t} to fit the function f as closely as possible, so as to infer the y value at the next moment from the historical data at any moment.

[0014] Furthermore, the above bidirectional LSTM uses two independent LSTM layers simultaneously, one LSTM layer processes the input sequence in chronological order, and the other LSTM layer processes the input sequence in reverse chronological order.

[0015] Furthermore, the DC-CNN-BiLSTM model includes an input layer, an expanded causal convolution layer, a flatten layer, a multi-head attention layer, a BiLSTM layer, a fully connected layer and an output layer, wherein the expanded causal convolution layer includes a causal convolution layer and a expanded convolution layer, the causal convolution layer realizes the spatial dependence on the context of the input layer, and the expanded convolution layer expands its receptive field. On this basis, a flatten layer and a dropout layer (a dropout layer is added after the fully connected layer) are added to optimize the model performance. The flatten layer is used to adjust the input data to a sequence dimension that meets the requirements of the BiLSTM layer, and the dropout layer is used to solve the common overfitting problem in neural networks. The causal convolution layer is used to capture the spatial characteristics of precipitation, that is, the precipitation correlation in adjacent areas; at the same time, the causal convolution layer processes features of different scales by adjusting the size and step size of the convolution kernel.

[0016] Furthermore, the dilated convolution layer is obtained by adding a dilation coefficient on the basis of the causal convolution.

[0017] Furthermore, the convolutional neural network used in the above causal convolutional layer includes multiple convolutional layers and pooling layers to form a feature extractor, and the operation form of each neuron is:

[0018]

[0019] Where h w,b (x) represents the operation result of each neural network unit, In, x i is the input matrix, w i is the weight matrix;

[0020] Use mask to partially remove the links layer by layer in the neural network and keep the links from the front to the back. The specific method is: use -inf (the value is replaced by -inf) to mask the fully connected links from the back to the front, so that the softmax operation will assign a close to zero attention weight to the masked position during training, thereby removing this part of the link, and then use appropriate padding to fill it to achieve causal convolution and spatial scale dependence;

[0021] The dilated convolutional neural network uses the dilation parameter in the process of moving the convolution kernel, that is, the dilation coefficient is inserted into the convolution kernel in the dilated convolution.

[0022] Furthermore, the above BiLSTM layer adopts a bidirectional long short-term memory network. The bidirectional long short-term memory network adds three gate structures in the hidden layer h, namely the forget gate, input gate, and output gate. At the same time, a hidden state (Cell State) is added, f t 、i t , o t Respectively represent the values ​​of the forget gate, input gate, and output gate at time t, x t is the input value at the current time t, h t is the output value of the hidden layer at the current moment, c t is the state information at the current moment, σ is the sigmoid activation function;

[0023] The forget gate determines whether the cell state at the previous moment is retained until the current moment c t The output f t Expressed by:

[0024] f t =σ(W f [h t-1 ,x t ]+b f ) (3)

[0025] The input gate determines the input x of the network at the current moment t Save to cell state c t The output i t It is expressed by formula (4):

[0026] i t =σ(W i [h t-1 ,x t ]+b i ) (4)

[0027] In formula (3) and formula (4), Wf , W i Represent the weight matrices of the forget gate and the input gate, respectively, f 、b i Represent the bias items of the forget gate and input gate respectively;

[0028] Used to describe the current input unit status, expressed as follows:

[0029]

[0030] The memory unit is used to calculate the unit state c at the current moment t , c t is the cell state c at the previous moment. t-1 Multiply the element by the forget gate f(t) and the current input cell state Element-wise multiplication of the input gate i t The sum represents:

[0031]

[0032] Through formula (6), the LSTM memory about the current and long-term memory c t-1 Associated to form new memories t ;

[0033] In formula (5) and formula (6), W c is the weight matrix of the memory unit, b c is the bias term of the memory unit;

[0034] The output gate controls the influence of long-term memory on the current output. After being processed by the sigmoid function, the output o of the unit is obtained. t :

[0035] o t =σ(W o [h t-1 ,x t ]+b o ) (7)

[0036] Hidden layer output h t Determined by the output gate and the new cell state;

[0037] h t =o t ⊙tanh(c t ) (8)

[0038] In formula (7) and formula (8), W o is the weight matrix of the output gate, b o is the bias term of the output gate.

[0039] Furthermore, in the training process of the DC-CNN-BiLSTM model, adaptive moment estimation (Adam) is used as the optimization function, hyperbolic tangent function (tanh) and sigmoid function are used as activation functions, and random dropout regularization (Dropout) method is used.

[0040] Furthermore, in the gradient descent step of the DC-CNN-BiLSTM model training process, the predicted value of the model on the given input data is first calculated through forward propagation, and the value of the loss function is calculated based on the predicted value and the true label; then, the gradient of the loss function to the model parameters is calculated through back propagation, that is, the rate of change of the loss function with respect to each parameter; finally, the model parameters are updated according to the gradient information to reduce the value of the loss function; the step size and direction of the parameter update are determined by the gradient and the learning rate; back propagation calculates the gradient information of the parameters of each layer by propagating the gradient of the loss function from the output layer to the input layer. Chain rule:

[0041]

[0042] Based on the chain rule, the back-propagation process first calculates the gradient of the loss function with respect to the model output y Starting from the output layer, Propagate back to each layer and calculate the gradient of the loss function with respect to the parameters of each layer. For each layer parameter θ, use the chain rule to calculate the gradient of the loss function with respect to that parameter

[0043]

[0044] Finally, the model parameters are updated according to the calculated gradients (17):

[0045]

[0046] In formula (15) and formula (16), It represents the rate of change of the function y in the x direction, and is modeled through multiple chain derivations of the intermediate variable u. In formula (17), α represents the learning rate.

[0047] Beneficial effects of the present invention: Compared with the prior art, the present invention aims at the deficiencies in the background technology and, based on the spatial-temporal dependency of precipitation data, establishes a bidirectional LSTM model combining an expanded causal convolutional neural network and a multi-head attention mechanism, namely, DC-CNN-BiLSTM. Specifically, causal convolution can effectively mine the spatial dependency between regions, and BiLSTM can capture temporal features. The present invention proposes a precipitation prediction model DC-CNN-BiLSTM based on deep learning. By combining an expanded causal convolutional neural network (DC-CNN) and a bidirectional long short-term memory (BiLSTM) network, the deficiencies of traditional prediction methods in regional meteorological dynamic understanding and conventional weather event prediction are solved. Experimental results show that the DC-CNN-BiLSTM model has a significant performance improvement in precipitation prediction tasks. DC-CNN can effectively capture the spatial information in the original time series, and BiLSTM can process the temporal dependency of sequence data. The combination of the two makes the model superior to the traditional model in precipitation prediction accuracy. Through the synergistic effect of the two networks of DCNN and BiLSTM, the model can maintain stable prediction performance and effectively reduce the prediction error. The advantages of the present invention are specifically as follows:

[0048] 1) In order to take into account the spatiotemporal contextual relationship, the present invention proposes a DC-CNN-BiLSTM model, which combines the advantages of dilated causal convolution and bidirectional LSTM, and can better capture the spatiotemporal characteristics in the prediction of precipitation data.

[0049] 2) The idea of ​​causal inference is integrated, that is, only past information is used for prediction to avoid the involvement of future information in advance. At the same time, the causal convolutional network expands the receptive field through the dilated convolution operation, effectively capturing the spatial dependence of precipitation, thereby improving the accuracy of precipitation prediction.

[0050] 3) Experiments on actual precipitation data show that the prediction accuracy of this method is much higher than that of statistical and traditional deep learning methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 This is the DC-CNN-BiLSTM prediction model structure diagram;

[0052] Figure 2 is the causal convolution map of the mask;

[0053] Figure 3 is the expanded convolutional neural network graph;

[0054] Figure 4 This is the BiLSTM neural network structure model diagram;

[0055] Figure 5 is the evaluation index map after training;

[0056] Figure 6 Compare the predicted value with the actual value.

[0057] Figure 7 This is a comparison chart of ablation experiments. DETAILED DESCRIPTION

[0058] The present invention is further described below in conjunction with specific embodiments.

[0059] Example 1: Figure 1-7 As shown, a medium- and long-term precipitation prediction method integrating spatiotemporal features comprises the following steps:

[0060] Step 1: Model the historical data and mine the potential time series characteristics and precipitation trends contained in the data;

[0061] The specific form is described in mathematical form as formula (1):

[0062] {y t+1 ,y t+2 ,…,y t+m}=f(x t-n ,x t-n+1 ,…,x t-1 ,x t ) (1)

[0063] In the formula, x t is the precipitation at time t; y t+m is the precipitation forecast at time t+m, x t is a one-dimensional vector containing n features, y t+m is the variable value to be estimated in the next m time periods of the current time. The goal is to obtain all the historical data X{x1,x2,…,x t} and Y{y1,y2,…,y t} to fit the function f as much as possible, so as to infer the y value at the next moment from the historical data at any moment;

[0064] Step 2: Using the precipitation data time series characteristics and precipitation trends in step 1, and according to the spatial-temporal dependency of precipitation data, a DC-CNN-BiLSTM model is established. The DC-CNN-BiLSTM model is a bidirectional LSTM model that combines an expanded causal convolutional neural network and a multi-head attention mechanism. This model takes a single feature time series variable as input and a single variable as output. The prediction model uses the causal convolutional neural network to mine the spatial dependency between regions, and the BiLSTM is used to capture temporal features.

[0065] Step 3: Use the test data set to train the DC-CNN-BiLSTM model to obtain a qualified DC-CNN-BiLSTM model;

[0066] Step 4: Input the measured data into the trained DC-CNN-BiLSTM model to predict medium- and long-term precipitation and obtain the prediction results.

[0067] BiLSTM neural network: Long Short-Term Memory (LSTM) is a variant of Recurrent Neural Network (RNN) commonly used in deep learning. Compared with traditional RNN, LSTM network is more effective in processing long sequence data and can better capture long-term dependencies in the sequence. The core of LSTM network is the memory unit, which controls the flow of information through three gates and maintains and updates information during the processing of sequence data.

[0068] With the development of deep learning theory, the accuracy of precipitation prediction models based on LSTM algorithms has been significantly improved in long-term series prediction. The BiLSTM neural network is based on the long-term short-term neural network LSTM, which considers both past and future information in the sequence data, thereby better capturing the contextual information and long-term dependencies in the sequence data. Bidirectional LSTM uses two independent LSTM layers at the same time, one to process the input sequence in chronological order and the other to process the input sequence in reverse chronological order. In this way, at each time step, the model can access past and future information, thereby better capturing the long-term dependencies in the sequence and predicting long-term precipitation.

[0069] Dilated Causal Convolution: Causal convolution is based on convolution (CNN), in which the value of each time step of the output depends only on the value of the current and previous time steps of the input. In other words, the output time step cannot depend on the value of the input in the future time step, which ensures that the cause of the value of the current and previous time steps of the input only produces the effect of the value of the current time step, forming a causal constraint. In traditional convolutional neural networks, the connections of each layer of neurons are fully connected, which violates the causal constraint between the previous and next time series, because the output neurons at the previous moment are connected to the input neurons at the next moment, which is not allowed in the time series. Therefore, it is necessary to remove the connected parts of the oblique triangles layer by layer in the network by means of square masks. The structure of causal convolution is usually similar to that of ordinary convolution layers, but restrictions are added to the convolution operation to ensure that the output is only affected by the input at the current moment and before. Dilated convolution increases the receptive field of the convolution kernel while keeping the number of parameters unchanged, so that each convolution output contains a larger range of information; at the same time, it can ensure that the size of the output feature map remains unchanged. Dilated convolutions can cover a larger input area without adding extra parameters by inserting "holes" (i.e. dilation) between adjacent elements of the convolution kernel. It is very useful in image processing and audio processing, especially when it is necessary to capture a wider range of contextual information. A well-known example of the application of dilated causal convolutions is the WaveNet model proposed in the prior art, which is used to generate very realistic human voices. WaveNet generates audio samples by using a series of dilated causal convolution layers, and the dilation rate of each convolution layer increases exponentially, which enables the network to effectively capture long-term dependencies in audio data.

[0070] In precipitation prediction research, these two properties are very important, especially in tasks such as time series prediction or text generation. Dilated causal convolution combines the expanded receptive field of dilated convolution with the temporal causality of causal convolution. This combination allows the model to capture long-distance sequence dependencies and maintain temporal causality at the same time. Due to the nature of causal convolution, it is usually necessary to use an appropriate padding strategy to ensure that the output matches the length of the input.

[0071] Since LSTM can only take into account the influence of unidirectional characteristics of time series, and the bidirectional influence of precipitation series is more complex and important, traditional LSTM is difficult to accurately predict. The present invention uses BiLSTM to capture the precipitation pattern of time series, while considering both the positive and reverse influences of time series data.

[0072] Furthermore, the above bidirectional LSTM uses two independent LSTM layers simultaneously, one LSTM layer processes the input sequence in chronological order, and the other LSTM layer processes the input sequence in reverse chronological order.

[0073] Furthermore, the DC-CNN-BiLSTM model includes an input layer, an expanded causal convolution layer, a flatten layer, a multi-head attention layer, a BiLSTM layer, a fully connected layer and an output layer, wherein the expanded causal convolution layer includes a causal convolution layer and a expanded convolution layer, the causal convolution layer realizes the spatial dependence on the context of the input layer, and the expanded convolution layer expands its receptive field. On this basis, a flatten layer and a dropout layer (placed after the fully connected layer) are added to optimize the model performance. The flatten layer is used to adjust the input data to a sequence dimension that meets the requirements of the BiLSTM layer, and the dropout layer is used to solve the common overfitting problem in neural networks. The causal convolution layer is used to capture the spatial characteristics of precipitation, that is, the precipitation correlation in adjacent areas; at the same time, the causal convolution layer processes features of different scales by adjusting the size and step size of the convolution kernel.

[0074] The DC-CNN-BiLSTM hybrid neural network model constructed by the present invention is a prediction model that takes a single feature time series variable as input and a single variable as output, and is composed of an input layer, a causal convolution layer, a flatten layer, a multi-head attention layer, a BiLSTM layer, a fully connected layer, and an output layer. Among them, the causal convolution layer realizes the spatial dependence on the context of the input layer, and the dilated convolution layer expands its receptive field. On this basis, the flatten layer and the dropout layer are added to optimize the model performance. The flatten layer is used to adjust the input data to the sequence dimension required by the BiLSTM layer, and the dropout layer is used to solve the common overfitting problem in neural networks.

[0075] BiLSTM lacks the ability to learn cross-features and cannot handle the multi-dimensional influencing factors in precipitation prediction. CNN cannot handle the time series characteristics of precipitation prediction. Considering that CNN's advantage lies in feature extraction and BiLSTM can effectively process time series data, in order to give full play to the advantages of the two models, the two are combined to form a CNN-BiLSTM neural network model. The combination of convolutional layer and LSTM layer enables the prediction model to extract significant features from the original data and mine the time series features hidden in the historical trend. Causal convolution can capture the spatial characteristics of precipitation, that is, the correlation of precipitation in adjacent areas; at the same time, causal convolution can process features of different scales by adjusting the size and step size of the convolution kernel.

[0076] BiLSTM can effectively capture long-term dependencies and patterns in time series, and can also consider precipitation data at historical moments. Through its bidirectional structure, BiLSTM can effectively capture the correlation features between different moments and locations. To further improve the accuracy of the model’s precipitation prediction, a multi-head attention mechanism is used in BiLSTM. Thus, the DC-CNN-BiLSTM model is established, as shown in Figure 1 As shown, it is a hybrid model of causal convolutional neural network and bidirectional long short-term memory network.

[0077] The dilated convolution layer is obtained by adding a dilation coefficient to the causal convolution.

[0078] Ordinary convolutional neural networks usually capture spatial features by processing input data in parallel. When processing time series data or tasks with time dependency, ordinary convolution may not be able to effectively capture the causal relationship in the data. Therefore, by adding causal dependency to the neural network, the causal convolution formed can have causal dependency in time, and the causal convolution after adding the void coefficient also has dependency in space. At the same time, the structure of the bidirectional long short-term memory network (BiLSTM) in time dependency makes the overall model more closely related in time and space.

[0079] DC-CNN module for spatial dependency: DC-CNN is the dilated causal convolutional neural network, which is obtained by adding a dilation coefficient to the causal convolution, thereby increasing the receptive field of the convolution kernel. The dilation coefficient determines the jump step length of the convolution kernel on the input data, allowing the network to effectively capture long-distance dependencies in the input data without increasing the layer depth. Causal convolution is an improvement on the convolutional neural network. The convolutional neural network used in the causal convolution layer includes multiple convolutional layers and pooling layers to form a feature extractor. The causal convolution does not include a pooling layer. The operation form of each neuron is:

[0080]

[0081] Where h w,b (x) represents the operation result of each neural network unit, In, x i is the input matrix, w i is the weight matrix; when multiple units are combined and have a hierarchical structure, a neural network model is formed.

[0082] The main function of convolutional neural networks is to extract features from data and to capture context sequences. Ordinary convolution applies convolution kernels to each position of the input sequence in time series data, so that the convolution operation will include the current position and the data points before and after it. Future information may be introduced when processing time series data, so it is necessary to use a mask to partially remove the links layer by layer in the neural network before this, and retain those links from the front to the back. The specific method is: use -inf (replace certain values ​​in the data with -inf) to mask the fully connected links from the back to the front, so that the softmax operation will assign attention weights close to zero to the masked positions during training, thereby removing this part of the link, and then use appropriate padding to fill it to achieve causal convolution and spatial scale dependence; for input data that is a one-dimensional vector, such as Figure 2 .

[0083] On this basis, the dilated convolutional neural network expands the coverage of the convolution kernel on historical data, that is, the dilation parameter is used during the movement of the convolution kernel to expand the coverage of the convolution kernel. In the dilated convolution, a dilation coefficient (dilation rate) is inserted into the convolution kernel to expand the receptive field of the convolution kernel, increase the network's learning ability for time-dependent information of different lengths, and thus improve the performance of the network. For example, when a 3*3 convolution kernel is convolved with the input data, it will be convolved with the same 3*3 data when no step interval is added. After adding the step interval and dilation = 1, it will become a convolution with 4*4 data, but each square of data will be convolved with one square of data. When the input data is a one-dimensional vector, the structure diagram of the causal convolutional neural network after adding the dilation mechanism is as follows: Figure 3 .

[0084] It can be observed that after taking into account the dilated convolution, the perception field of the historical information of the neurons in the next layer of the causal neural network is significantly expanded, which improves the causal convolutional network's inference tasks that require long time series. Through the dilation mechanism, the current causal neural network can expand the perception field of the causal convolutional network by changing the size of the convolution kernel (kernel_size) or increasing the dilation parameter (dilation) while keeping the number of hidden layers unchanged.

[0085] The present invention selects Padding = (kernel_size-1)*dilation, dilation = 2, so the embedding process uses causal convolution and dilated convolution to capture the context and obtain the spatial relationship of the input data. The context data is then passed into the BiLSTM model using the tanh activation function.

[0086] Ma-BiLSTM taking into account contextual temporal dependencies:

[0087] Ma-BiLSTM is a bidirectional long short-term memory network with a multi-head attention mechanism. The network inherits and rewrites the long short-term memory network in the torch module. The multi-head attention mechanism is added in the class initialization, and the context data captured by the causal convolution is imported. After adjusting the dimensional order of the data processed in the causal convolution, the weights are adjusted through the multi-head attention mechanism to focus on different features of the sequence, so that the model can learn the representation of the data in different representation spaces, which enhances the model's ability to pay attention to different parts of the sequence. Finally, the data is loaded into the BiLSTM, and the results are input into the fully connected layer for time series prediction.

[0088] LSTM is a variant of recurrent neural network. It uses the logic control of gate units to operate on data. It provides solutions to the problems of insufficient memory of long-term sequence information, gradient disappearance and gradient explosion in RNN. The bidirectional long short-term memory network adds three gate structures in the hidden layer h, namely Forget Gate, Input Gate, and Output Gate. At the same time, a hidden state (Cell State) is added, f t 、i t , o t Respectively represent the values ​​of the forget gate, input gate, and output gate at time t, x t is the input value at the current time t, h t is the output value of the hidden layer at the current moment, c t is the state information at the current moment, σ is the sigmoid activation function;

[0089] The forget gate determines whether the cell state at the previous moment is retained until the current moment c t The output f t Expressed by:

[0090] f t =σ(W f [h t-1 ,x t ]+b f ) (3)

[0091] The input gate determines the input x of the network at the current moment t Save to cell state c t The output i t It is expressed by formula (4):

[0092] i t =σ(W i [h t-1 ,x t]+b i ) (4)

[0093] In formula (3) and formula (4), W f , W i Represent the weight matrices of the forget gate and the input gate, respectively, f , b i Represent the bias items of the forget gate and input gate respectively;

[0094] Used to describe the current input unit status, expressed as follows:

[0095]

[0096] The memory unit is used to calculate the unit state c at the current moment t , c t is the cell state c at the previous moment. t-1 Multiply the element by the forget gate f(t) and the current input cell state Element-wise multiplication of the input gate i t The sum represents:

[0097]

[0098] Through formula (6), the LSTM memory about the current and long-term memory c t-1 Associated to form new memories t ;

[0099] In formula (5) and formula (6), W c is the weight matrix of the memory unit, b c is the bias term of the memory unit;

[0100] The output gate controls the influence of long-term memory on the current output. After being processed by the sigmoid function, the output o of the unit is obtained. t :

[0101] o t =σ(W o [h t-1 ,x t ]+b o ) (7)

[0102] Hidden layer output h t Determined by the output gate and the new cell state;

[0103] h t =o t ⊙tanh(c t ) (8)

[0104] In formula (7) and formula (8), W o is the weight matrix of the output gate, b o is the bias term of the output gate.

[0105] Figure 4 Represents the BiLSTM neural network structure model, which is similar to LSTM. t is the current state information, x t is the input of the network at the current moment, h t is the hidden layer output, H t The final feature expression is obtained by concatenating the forward and reverse order outputs, t∈[1,n]. BiLSTM is optimized based on LSTM. The BiLSTM neural network structure model is composed of two independent LSTMs. The input sequence is input into the two LSTM neural networks in forward and reverse order for feature extraction. The parameters of the two LSTM neural networks in BiLSTM are independent of each other, and they only share the word-embedding word vector list.

[0106] Choice of loss function: Mean squared error (MSE), root mean squared error (RMSE) and mean absolute error (MAE) are selected to calculate the error loss in the entire prediction model. MSE is used to evaluate the loss during training loss and validation loss, and RMSE is used to evaluate the loss during validation. Mean squared error refers to the expected value of the square of the difference between the estimated value of the parameter and the true value of the parameter, which can evaluate the degree of change in the data and is denoted by L MSE The root mean square error is the square root of the mean square error, which more intuitively represents the average error between the predicted value and the actual value, denoted by L RMSE Compared with MSE, the root mean square error is less sensitive to outliers, easier to interpret, and consistent with the unit of the original data. In these two indicators, the smaller the value, the more accurate the model's prediction. The calculation formula is:

[0107]

[0108] In formula (9) and formula (10), y p ,y t They represent the normalized predicted value and true value respectively, and n is the total number of samples.

[0109] The core of model training is to continuously update model parameters through optimization algorithms so that the loss function reaches the minimum value. Gradient descent and back propagation are two key steps, which together achieve the optimization and update of model parameters. In the DC-CNN-BiLSTM model training process, Adaptive moment estimation (Adam) is used as the optimization function, hyperbolic tangent function (tanh) and sigmoid function are used as activation functions, and random dropout regularization (Dropout) method is used to avoid overfitting.

[0110] Gradient descent uses the gradient information of the loss function to the model parameters to guide the parameter update process. Gradient descent can be regarded as a process of searching for the optimal solution in the parameter space, where the search direction is guided by the gradient and the update step size is determined by the learning rate.

[0111] f(x+ε)≈f(x)+εf′(x)(11)

[0112] f(x-ηf′(x))≈f(x)-ηf′(x) 2 (12)

[0113] f(x-ηf′(x))≤f(x) (13)

[0114] x←x-nf′(x)(14)

[0115] Formula (11) is the Taylor expansion. If η makes |ηf′(x)| small enough, ε can be replaced by -ηf′(x) and formula (12) can be obtained. If f′(x)≠0, then ηf′(x) 2 >0, it can be replaced by equation (13). This indicates that equation (14) can be used to iterate x to reduce the value of function f(x), and the stop condition will be set in gradient descent to obtain the required value. For example, f′(x) 2 The value of is small enough or the number of iterations has reached a certain value.

[0116] In equations (11), (12) and (13), the function f is continuously differentiable, ∈ is a constant with a sufficiently small absolute value, f′(x) is the gradient (derivative) of the function f at x, and η is a constant greater than 0.

[0117] The gradient descent step in the DC-CNN-BiLSTM model training process first calculates the predicted value of the model on the given input data through forward propagation, and calculates the value of the loss function based on the predicted value and the true label; then, the gradient of the loss function to the model parameters is calculated through back propagation, that is, the rate of change of the loss function with respect to each parameter; finally, the model parameters are updated according to the gradient information to reduce the value of the loss function; the step size and direction of the parameter update are determined by the gradient and the learning rate; back propagation calculates the gradient information of the parameters of each layer by propagating the gradient of the loss function from the output layer to the input layer. Chain rule:

[0118]

[0119] Based on the chain rule, the back-propagation process first calculates the gradient of the loss function with respect to the model output y Starting from the output layer, Propagate back to each layer and calculate the gradient of the loss function with respect to the parameters of each layer. For each layer parameter θ, use the chain rule to calculate the gradient of the loss function with respect to that parameter

[0120]

[0121] Finally, the model parameters are updated according to the calculated gradients (17):

[0122]

[0123] In formula (15) and formula (16), It represents the rate of change of function y in the x direction, and is modeled by multiple chain derivatives of the intermediate variable u. In formula (17), α represents the learning rate.

[0124] In view of the deficiencies in the background technology, the present invention establishes a bidirectional LSTM model combining an expanded causal convolutional neural network and a multi-head attention mechanism, namely, DC-CNN-BiLSTM, based on the spatial-temporal dependency of precipitation data. Specifically, causal convolution can effectively mine the spatial dependency between regions, and BiLSTM can capture temporal features. Therefore, the present invention has the following three advantages:

[0125] 1) In order to take into account the spatiotemporal contextual relationship, the present invention proposes a DC-CNN-BiLSTM model, which combines the advantages of dilated causal convolution and bidirectional LSTM, and can better capture the spatiotemporal characteristics in the prediction of precipitation data.

[0126] 2) The idea of ​​causal inference is integrated, that is, only past information is used for prediction to avoid the involvement of future information in advance. At the same time, the causal convolutional network expands the receptive field through the dilated convolution operation, effectively capturing the spatial dependence of precipitation, thereby improving the accuracy of precipitation prediction.

[0127] 3. Experiments on actual precipitation data show that the prediction accuracy of this method is much higher than that of statistical and traditional deep learning methods.

[0128] In order to illustrate the effect of the present invention, the following simulation is performed:

[0129] 1.1 Data Description

[0130] This simulation selected data from January to April 2020 in China. The subfolders in Table 1 contain 120 days of data, including 24-hour tif format data. The data is named as year-month-day-hour-minute-second, with the year occupying 4 digits, the month occupying 2 digits, the day occupying 2 digits, and the hour-minute-second occupying 4 digits. The spatial resolution is 1401*801, as shown in Table 1.

[0131] Table 1, Data sheet

[0132] data Examples Format tif Time span range 20200101-20200430 Temporal resolution 00:00-23:00 Pixel size 100m*100m Spatial resolution 1401*801 Data name (example) 202001010000,202001012300

[0133] After preprocessing, the data is organized into a two-dimensional tensor. The 0th dimension is the 24-hour data per day, which contains the spatiotemporal sequence information, and the 1st dimension represents the number of days. The input sequence length of the training set is 16000*92, that is, 16,000 92-day data, and the prediction sequence length is 2000*10, that is, 2000 resolution positions of t1=10 days of data. The input channel is set to 1.

[0134] 1.2 Environment Configuration and Model Parameters

[0135] This experiment was built with 64GB memory and NVIDIA-RTX5000 GPU. The Windows 10 operating system, torch 2.1.0 + cuda 121 and pycharm 2023.2.4 were used. The configured hyper parameters are shown in Table 2.

[0136] Table 2 Hybrid model hyperparameters

[0137] Hyperparameters name size t0 Step Length 92 t1 Prediction time step 10 train_num Training set 16000 validation_num Validation set 2000 test_num Test Set 2000 batch_size Batch size 500 lr Initial learning rate 0.001 epoch Number of training sessions 200

[0138] 1.3 Results Analysis

[0139] RMSE (Formula 9) root mean square error loss and MAE (Formula 10) mean absolute error loss were selected as evaluation indicators for precipitation prediction.

[0140] After the model reaches the epoch number, the model stops. The effect of training is judged by Train Loss and Eval Loss. If both decrease, it means that the model is still learning and training should continue; if the former decreases and the latter increases, it means that the model begins to overfit and should be stopped, and the complexity of the model should be reduced or the amount of training set data should be increased. The results are as follows Figure 5 is the evaluation graph of t1=10, RMSE is calculated by RMSE loss, MAE is calculated by MAE loss, the smaller the value, the more accurate the prediction. To avoid accidental events, the following Figure 5 Compared with the experiments in Table 4, the experimental model results take the average MAE of 10 experiments to reach 0.00610 and the RMSE to reach 0.00788. The two evaluation indicators are averaged and the model accuracy reaches 0.00699.

[0141] like Figure 6 , showing the fit of the predicted value and the true value and the root mean square loss. In the figure, PRE represents the predicted value, OBS represents the true value, N represents the number of predicted values ​​and the true value, and R 2 Represents the square of the Pearson correlation coefficient, which is used to evaluate the degree of correlation between two values. NSE is a statistical indicator used to evaluate the prediction accuracy of the model, where 1 means that the model's prediction completely matches the observed data. The black 1:1 line in the figure indicates that the predicted value is consistent with the observed value under ideal conditions, while the red regression line indicates the fitting effect of the actual model. The scattered points are all concentrated on the edge of the black line, and the black line and the red line basically coincide, indicating that the fitting effect is good. By analyzing these evaluation indicators and graphs, the prediction performance and reliability of the model can be intuitively evaluated.

[0142] 1.4 Comparative Experiment

[0143] The prediction performance of the proposed method is compared with the following models. In the case of time step t1 = 10, the following models are compared, and the results are shown in Table 3:

[0144] (1) Conv2d (Reference "Zhou K, Zheng Y, Li B, et al. Forecasting different types of convective weather: A deep learning approach [J]. Journal of Meteorological Research, 2019, 33: 797-809"). Conv2d is a two-dimensional convolution operation (2DCNN), which is usually used to process two-dimensional grid data and image data, and can extract features in two-dimensional space, such as precipitation in geographic location grids.

[0145] (2) Conv3d (reference “Tran D, Bourdev L, Fergus R, et al. Learning spatiotemporal features with 3D convolutional networks[C] / / Proceedings of the IEEE international conference on computer vision. 2015:4489-4497”). Conv3d uses a three-dimensional convolutional neural network (3D CNN) for precipitation prediction, capturing features in both spatial and temporal dimensions, thereby comprehensively modeling spatiotemporal data. However, the calculation is relatively more complex and less efficient.

[0146] (3) ConLSTM (Shi X, Chen Z, Wang H, et al. Convolutional LSTM network: A machine learning approach for precipitation nowcasting [J]. Advances inneural information processing systems, 2015, 28). It is a model that combines convolutional neural network (CNN) and long short-term memory network (LSTM) and is used to process spatiotemporal data, especially video data and meteorological data.

[0147] (4) ConvGRU (literature “Ballas N, Yao L, Pal C, et al. Delving deeper into convolutional networks for learning video representations[J]. arxiv preprintarxiv:1511.06432, 2015”). ConvGRU is a deep learning model that combines convolutional neural network (CNN) and gated recurrent unit (GRU). ConvGRU uses convolution operation to replace the fully connected operation in traditional GRU to achieve joint modeling of spatiotemporal data.

[0148] (5) TrajGRU (reference “Shi X, Gao Z, Lausen L, et al. Deep learning for precipitation nowcasting: A benchmark and a new model [J]. Advances in neural information processing systems, 2017, 30”). TrajGRU is based on the trajectory gated recurrent unit model. It adopts the idea of ​​dynamic migration and adaptively adjusts the spatial position of the hidden state according to the spatial information of the input data, thereby improving the ability to model complex spatiotemporal dependencies.

[0149] It can be obtained that the experimental performance of the model of the present application is higher than that of other models. The model uses dilated causal convolution to process time series data, which improves efficiency and is more conducive to processing the spatial correlation of time series data. The BiLSTM network further captures the temporal dependency of the data. The combination of the two makes the model effect better than other models. ConvGRU is second only to the model of the present invention, which is due to its good feature extraction effect for time series data with spatial correlation, and its computational efficiency is lower than that of BiLSTM. ConvLSTM did not show very good performance, probably because the prediction time step is too long. Conv3d has the worst effect. Although it is suitable for processing time and space related data, its training effect is poor due to its large computing resource overhead and its unsuitability for processing time series data.

[0150] Table 3 Performance evaluation of different models at tl=10

[0151]

[0152] At the same time, the performance of different models at different time steps is compared, as shown in Table 4. The model of the present invention has the best performance at different time steps, while ConvGRU is second only to the model of the present invention, mainly because ConvGRU also has a strong ability to capture the temporal correlation in the time series, but is not as good as the model of the present invention that combines DC-CNN and self-attention mechanism when extracting complex spatial features. The performance of Conv2d and Conv3d is not much different, TrajGRU takes a long time to train, and its performance is not very good. ConvLSTM is close to or even higher than the performance of the model of the present application at t1=5 and t1=1, indicating that it performs better at shorter time steps.

[0153] Table 4 Performance evaluation of different models at different time steps

[0154]

[0155] 1.5 Ablation Experiment

[0156] The overall model is formed by combining the dilated causal CNN and BiLSTM. The dilated causal CNN establishes the spatial features of the data, and the BiLSTM extracts the temporal dependency. To verify the advantages of the combination of the two, the following ablation experiments are performed using the same hyperparameters:

[0157] (1) DC-CNN. Only the spatially-sensitive dilated causal convolutional part of the model is used for prediction.

[0158] (2) BiLSTM. Only the time-sensitive bidirectional long short-term memory network part of the model is used for prediction.

[0159] like Figure 7 ,The ablation experiment of the overall model is shown in Table 4. The average MAE and RMSE of the model of the present invention for 10 experiments are 0.00508 and 0.00677 respectively. In the figure, the loss of DC-CNN is the highest, with an average of 0.47764; while the loss of BiLSTM is only 0.33841. Therefore, it can be shown that the model combining the two is better than using them separately.

[0160] Table 5 Average experimental evaluation

[0161]

[0162] Average experimental evaluation Table 5, training and evaluation indicators Figure 6 , ablation comparison experiment Figure 7 . CNNBiLSTM_RMSE and CNNBiLSTM_MAE are the losses of the overall model DC-CNN-BiLSTM calculated using RMSE and MAE errors respectively; CNN_RMSE and AST_BiLSTM_RMSE are the losses of DC-CNN and BiLSTM calculated using RMSE errors respectively; Train Loss and Eval Loss are the training loss and validation loss of the overall model respectively.

[0163] In addition, the ablation experiments at different time steps were predicted. For example, the loss of the model of this application at time step t1=1 was significantly greater than that at time steps t1=5 and t1=10. Since this simulation experiment is a long-term prediction, the accuracy of the prediction time of 1 day is low; and the loss of the single CNN and single BiLSTM models gradually increases with the increase of time steps. The CNN model is good at capturing local spatiotemporal features, but performs poorly in processing the global spatiotemporal relationship of long time series. Although the BiLSTM model has advantages in capturing the temporal dependency of the sequence, it may be insufficient in processing complex spatial features and is difficult to accurately predict for long-term predictions.

[0164] Table 6 Performance evaluation of ablation models at different time steps

[0165]

[0166] The present invention proposes a precipitation prediction model DC-CNN-BiLSTM based on deep learning. By combining the dilated causal convolutional neural network (DC-CNN) and the bidirectional long short-term memory (BiLSTM) network, the model solves the shortcomings of traditional prediction methods in regional meteorological dynamic understanding and conventional weather event prediction. Experimental results show that the DC-CNN-BiLSTM model has a significant performance improvement in precipitation prediction tasks. DC-CNN can effectively capture the spatial information in the original time series, and BiLSTM can process the time dependency of sequence data. The combination of the two makes the model superior to traditional models in precipitation prediction accuracy. Through the synergy of the two networks, DCNN and BiLSTM, the model can maintain stable prediction performance and effectively reduce prediction errors.

Claims

1. A medium- and long-term precipitation prediction method integrating spatiotemporal features, characterized in that: The method comprises the following steps: Step 1: Model the historical data to mine the potential time series characteristics and precipitation trends contained in the precipitation data; Step 2: Using the precipitation data time series characteristics and precipitation trends in step 1, and according to the spatial-temporal dependency of precipitation data, a DC-CNN-BiLSTM model is established. The DC-CNN-BiLSTM model is a bidirectional LSTM model that combines an expanded causal convolutional neural network and a multi-head attention mechanism. This model uses a single feature time series variable as input and a single variable as output. The prediction model, in which the causal convolutional neural network is used to mine the spatial dependency between regions, and the BiLSTM is used to capture temporal features; Step 3: Use the test data set to train the DC-CNN-BiLSTM model to obtain a qualified DC-CNN-BiLSTM model; Step 4: Input the measured data into the trained DC-CNN-BiLSTM model to predict medium- and long-term precipitation and obtain the prediction results.

2. The method for medium- and long-term precipitation prediction integrating spatiotemporal features according to claim 1, characterized in that: The specific form of step 1 is described in mathematical form as formula (1): {y t+1 ,y t+2 ,…,y t+m }=f(x t-n ,x t-n+1 ,…,x t-1 ,x t ) (1) In the formula, x t is the precipitation at time t; y t+m is the precipitation forecast at time t+m, x t is a one-dimensional vector containing n features, y t+m The variable value to be estimated in the next m time periods of the current time.

3. The method for medium- and long-term precipitation prediction integrating spatiotemporal features according to claim 1, characterized in that: Bidirectional LSTM works by using two independent LSTM layers simultaneously, one LSTM layer processes the input sequence in chronological order and the other LSTM layer processes the input sequence in reverse chronological order.

4. The method for medium- and long-term precipitation prediction integrating spatiotemporal features according to claim 1, characterized in that: The DC-CNN-BiLSTM model includes an input layer, an expanded causal convolution layer, a flatten layer, a multi-head attention layer, a BiLSTM layer, a fully connected layer, and an output layer. The expanded causal convolution layer includes a causal convolution layer and a expanded convolution layer. The causal convolution layer realizes the spatial dependence on the context of the input layer, and the expanded convolution layer expands its receptive field. On this basis, the flatten layer and the dropout layer are added to optimize the model performance. The dropout layer is added after the fully connected layer. The causal convolution layer is used to capture the spatial characteristics of precipitation, that is, the precipitation correlation in adjacent areas. At the same time, the causal convolution layer processes features of different scales by adjusting the size and step size of the convolution kernel.

5. The method for medium- and long-term precipitation prediction integrating spatiotemporal features according to claim 4, characterized in that: The dilated convolution layer is obtained by adding a dilation coefficient to the causal convolution.

6. The method for medium- and long-term precipitation prediction integrating spatiotemporal features according to claim 4, characterized in that: The convolutional neural network used in the causal convolution layer includes multiple convolutional layers and pooling layers to form a feature extractor. The operation form of each neuron is: Where h w,b (x) represents the operation result of each neural network unit, In, x i is the input matrix, w i is the weight matrix; Use mask to partially remove the links layer by layer in the neural network and keep the links from the front to the back. The specific method is: use -inf to mask the fully connected links from the back to the front, so that the softmax operation will assign attention weights close to zero to the masked positions during training, remove this part of the link, and then use appropriate padding to fill it to achieve causal convolution and spatial scale dependence; The dilated convolutional neural network uses the dilation parameter in the process of moving the convolution kernel, that is, the dilation coefficient is inserted into the convolution kernel in the dilated convolution.

7. The method for medium- and long-term precipitation prediction integrating spatiotemporal features according to claim 4, characterized in that: The BiLSTM layer uses a bidirectional long short-term memory network. The bidirectional long short-term memory network adds three gate structures in the hidden layer h, namely the forget gate (Forget Gate), input gate (Input Gate), and output gate (Output Gate). At the same time, a hidden state (Cell State) is added, f t 、i t , o t Respectively represent the values ​​of the forget gate, input gate, and output gate at time t, x t is the input value at the current time t, h t is the output value of the hidden layer at the current moment, c t is the state information at the current moment, σ is the sigmoid activation function; The forget gate determines whether the cell state at the previous moment is retained until the current moment c t The output f t Expressed by: f t =σ(W f [h t-1 ,x t ]+b f ) (3) The input gate determines the input x of the network at the current moment t Save to cell state c t The output i t It is expressed by formula (4): i t =σ(W i [h t-1 ,x t ]+b i ) (4) In formula (3) and formula (4), W f , W i Represent the weight matrices of the forget gate and the input gate, respectively, f 、b i Represent the bias items of the forget gate and input gate respectively; Used to describe the current input unit status, expressed as follows: The memory unit is used to calculate the unit state c at the current moment t , c t is the cell state c at the previous moment. t-1 Multiply the element by the forget gate f(t) and the current input cell state Element-wise multiplication of the input gate i t The sum represents: Through formula (6), the LSTM memory about the current and long-term memory c t-1 Associated to form new memories t ; In formula (5) and formula (6), W c is the weight matrix of the memory unit, b c is the bias term of the memory unit; The output gate controls the influence of long-term memory on the current output. After being processed by the sigmoid function, the output o of the unit is obtained. t : the t =σ(W o [h t-1 ,x t ]+b o ) (7) Hidden layer output h t Determined by the output gate and the new cell state; h t =o t ⊙ t you t ) (8) In formula (7) and formula (8), W o is the weight matrix of the output gate, b o is the bias term of the output gate.

8. The method for medium- and long-term precipitation prediction integrating spatiotemporal features according to claim 4, characterized in that: In the training process of the DC-CNN-BiLSTM model, adaptive moment estimation (Adam) is used as the optimization function, hyperbolic tangent function (tanh) and sigmoid function are used as activation functions, and random dropout regularization (Dropout) method is adopted.

9. The method for medium- and long-term precipitation prediction integrating spatiotemporal features according to claim 4, characterized in that: The gradient descent step in the DC-CNN-BiLSTM model training process first calculates the predicted value of the model on the given input data through forward propagation, and calculates the value of the loss function based on the predicted value and the true label; then, the gradient of the loss function with respect to the model parameters is calculated through back propagation, that is, the rate of change of the loss function with respect to each parameter; finally, the model parameters are updated according to the gradient information to reduce the value of the loss function; The step size and direction of updating parameters are determined by the gradient and learning rate; back propagation calculates the gradient information of each layer parameter by propagating the gradient of the loss function from the output layer to the input layer. Chain rule: Based on the chain rule, the back-propagation process first calculates the gradient of the loss function with respect to the model output y Starting from the output layer, Propagate back to each layer and calculate the gradient of the loss function with respect to the parameters of each layer. For each layer parameter θ, use the chain rule to calculate the gradient of the loss function with respect to that parameter Finally, the model parameters are updated according to the calculated gradients (17): In formula (15) and formula (16), It represents the rate of change of the function y in the x direction, and is modeled through multiple chain derivations of the intermediate variable u. In formula (17), α represents the learning rate.

Citation Information

Cited By

  • River management-oriented multi-parameter water quality intelligent prediction method and system

    CN121393643A

  • Meteorological prediction method and device based on dual-channel modeling, equipment and storage medium

    CN121857098A

  • Meteorological prediction method and device based on double-channel modeling, equipment and storage medium

    CN121857098B