A multi-dimensional real-time flood forecasting method based on ARIMA-HRNN
By using the ARIMA-HRNN method, which combines convolutional kernel functions, hybrid recurrent neural networks, and time series attention mechanisms, the shortcomings of traditional hydrological models in flood forecast accuracy are addressed, enabling more accurate predictions of flood trends and peak times.
Patent Information
- Application Number
- CN202111446605.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2041-11-30
AI Technical Summary
Traditional hydrological models cannot fully reflect hydrological patterns, resulting in less than ideal accuracy in flood forecasting.
A multidimensional real-time flood forecasting method based on ARIMA-HRNN is adopted. The method smooths local noise through convolutional kernel function, uses hybrid recurrent neural network for feature extraction, adds time series attention mechanism and differential integrated moving average autoregressive model, and combines the output of HRNN and ARIMA model with weighted averaging module.
It improves the accuracy of flood forecasting, enabling more precise prediction of flood trends and peak times, adapting to changes in the scale of the input period, and enhancing the accuracy of flow forecasting and peak prediction capabilities.
Smart Images

Figure CN115526094B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of flood forecasting technology (IPC classification number: G06Q10 / 04), and more particularly to a multidimensional real-time flood forecasting method based on ARIMA-HRNN. Background Technology
[0002] Reliable flood forecasting is a prerequisite for effective reservoir flood control and power generation scheduling; therefore, reservoir flood forecasting is a core component of the entire flood control and power generation scheduling decision-making process. Traditionally, flood forecasting is based on hydrological models. However, due to the limitations of the structure and parameters of traditional hydrological models (such as the Xin'anjiang model), they cannot fully reflect hydrological patterns, resulting in forecast accuracy that is often less than ideal.
[0003] This invention provides a real-time flood forecasting method based on ARIMA-HRNN, which can reliably predict flood trends and peak times for a given location. This invention combines the outputs of a dynamic regression module and a deep learning module, and incorporates a linear component into the prediction results, enabling the predictions to adapt to changes in the input period scale due to scale transformation. Long-term reservoir runoff forecasts and short-term flood runoff forecasts are performed based on user-imported data or information automatically imported from meteorological departments. This method uses a web-based graphical user interface to provide users with the generated data in formats such as time series plots, tables, GIS maps, process animations, and automatically generated forecast reports. Compared with other methods, this invention exhibits better performance in predicting flow accuracy and the difference between peak and peak time. Summary of the Invention
[0004] This invention discloses a multidimensional real-time flood forecasting method based on ARIMA-HRNN. This method optimizes the network structure and its weight coefficients to incorporate complex hydrological patterns into the model, thus overcoming the shortcomings of traditional hydrological models and improving forecast accuracy.
[0005] To address the above problems, this invention provides a multidimensional real-time flood forecasting method based on ARIMA-HRNN, comprising the following steps:
[0006] S1. Use convolution kernel functions to smooth local noise;
[0007] S2. Feature extraction is performed using a hybrid recurrent neural network (HRNN) model;
[0008] S3. A time-series attention mechanism is adopted to assign various attention weights to the input vectors such as the outflow and rainfall of the upstream reservoir;
[0009] S4. Employ the Differential Integrated Moving Average Autoregressive Model (ARIMA) to add a linear component to enhance forecasting;
[0010] S5. Add a weighted averaging module to fuse the HRNN output with the ARIMA regression values from the autoregressive fusion moving average module.
[0011] Preferably, the feature extraction in step S2 involves extracting the peak characteristics of the flood. During a flood, there can be both multi-peak and single-peak processes. For any flood, the time series corresponding to the inflow is... Q represents the time series corresponding to the flood inflow. Different times are denoted as Q0, Q1, ..., Q. T This invention first extracts 20% of the total data sample, i.e. The inflow of floodwaters into the reservoir was sorted chronologically to locate a set of flood peak locations. Let i represent a specific time series of floodwater inflow. Then determine the number n and retain the flood data. Chinese data samples The data will not be smoothed to ensure the shape of the flood.
[0012] Preferably, the HRNN model in step S2 incorporates a convolutional neural network (CNN), primarily used to extract nonlinear dependencies between different variables. Unlike the massive dimensionality of images, time series extracts fewer features; therefore, pooling layers are unnecessary after convolution. For the selected activation function, this invention uses the ReLU activation function.
[0013]
[0014] In the formula, Output matrix for CNN; This is the weight parameter matrix; The input feature matrix; For bias.
[0015] Preferably, the HRNN model in step S2 incorporates a Long Short-Term Memory (LSTM) model and a Bi-LSTM model, with the aim of obtaining the influence of variables at different time periods in the time series on the output.
[0016] Preferably, the Bi-LSTM model adds an attention layer to enhance the contribution of critical moment features to flow prediction, and can be used in flood flow prediction.
[0017] Preferably, step S2 includes the following sub-steps:
[0018] S21. Use the feature matrix extracted by the CNN as input;
[0019] S22. Use Bi-LSTM as the recurrent unit, and let the information enter the LSTM;
[0020] S23. Discard some useless information from the main information stream through the forget gate, and process it according to the following formula.
[0021]
[0022] In the formula, Output for the forget gate; Forgetting weight matrix; This refers to the network state at the previous moment; This is the current input; To offset the forget gate;
[0023] In this invention, the forget gate reads the current input. x t network state at the previous moment h t-1 The sigmoid function produces an activation vector with values between 0 and 1, which is then passed to... t LSTM cell state at time -1 C t-1 The value is used to determine which information to discard: 0 means discard all, and 1 means keep all.
[0024] S24. Determine the update status of the information.
[0025] S25. Determine the output information through the output gate.
[0026] Preferably, step S24 includes the following sub-steps:
[0027] S241. The input gate sigmoid determines which information is updated;
[0028] S242. What I have learned tanh The neural network layer generates a new information vector. , as the new value after the update.
[0029] S243. LSTM cell state update;
[0030] Preferably, the LSTM cell state is updated as follows: Ct The aforementioned Ct The following formula is used to obtain it:
[0031]
[0032] In the formula: The activation vector generated by the input gate; This refers to the state at the previous moment; it This is the input gate at time t; This is the new information vector.
[0033] In this invention, the state at the previous moment... activation vector generated by the input gate By multiplying vectors element-wise (*), useless information is forgotten, and then multiplied... The new information is added to the current information, and the LSTM cell state is then updated. C t .
[0034] Further preferably, the i t Obtain it using the following formula:
[0035]
[0036] In the formula: This is a weight matrix that does not share parameters; This refers to the network state at the previous moment; For the currently entered information; For bias.
[0037] Further preferably, the Obtain it using the following formula:
[0038] In the formula, This is a weight matrix that does not share parameters; This refers to the network state at the previous moment; For the currently entered information; For bias.
[0039] Preferably, step S25 includes the following sub-steps:
[0040] S251. The output gate reads the current input. network state at the previous moment The sigmoid function produces an activation vector with values between 0 and 1 to determine which parts of the cell state can be output.
[0041] S252. Utilizing tanh The function layer obtains activation vectors in the range of -1 to 1 to process the current state of the LSTM unit. C t Then, perform a vector element-wise multiplication with the result of the first step to obtain the output. h t .
[0042] Preferably, the h t Obtain it using the following formula:
[0043]
[0044] In the formula: Output the hidden state of the forward LSTM; This is the hidden state output of the inverse LSTM.
[0045] Preferably, the time series attention mechanism in step S3 is used to learn a weighted combination of the hidden representations of each window position of the input matrix and to assign optimal weights to variables at different times, thus solving the problem of non-seasonal time series forecasting in single flood forecasts.
[0046] Preferably, the attention weights in S3 are obtained using the following formula:
[0047]
[0048] In the formula, tanh is the activation function. For attention weights.
[0049] Preferably, the attention probability vector p t It uses the softmax function to probabilistically calculate attention weights. Obtain it using the following formula:
[0050]
[0051] Preferably, step S3 includes the following sub-steps:
[0052] S31. Calculate attention weights using dot product. .
[0053] S32. Calculate attention weights probabilistically using the softmax function. To obtain the probability vector 。
[0054] S33. Multiply the hidden state h generated by Bi-LSTM with the corresponding attention probability vector to obtain its weighted value.
[0055] Preferably, the aW t Obtain it using the following formula:
[0056]
[0057] In the formula, Attention weights; The hidden state matrix;
[0058] Preferably, the P t Obtain it using the following formula:
[0059]
[0060] In the formula, Attention weights;
[0061] Preferably, the weighted value is obtained by the following formula:
[0062]
[0063] In the formula, Assign attention coefficients; It is a probability vector; This is the output vector of the previous network layer.
[0064] S34. After passing the outputs of the attention layer and the LSTM, the model adds the outputs of the two modules together.
[0065] In this invention, Bi-LSTM and attention nonlinear models are used to obtain residual predictions of time series, while the LSTM module is used to generate a stationary prediction series. Therefore, by adding them, predictions with residuals and trends can be obtained.
[0066] Preferably, the ARIMA model in step S4 consists of an autoregressive model, a moving average model, and a smoothing module.
[0067] Preferably, the ARIMA model is obtained using the following formula:
[0068]
[0069] In the formula, the This is the actual value. For random error, and is the coefficient, p is the autoregressive lag number, and q is the moving average lag number. p and q are integers and are usually referred to as autoregressive and moving average, respectively.
[0070] In this invention, once the data becomes a stationary sequence, a given function is used to define the range of parameters p and q, where p is the autoregressive lag and q is the moving average lag, thereby identifying the Akaike Information Criterion (AIC) with the smallest standard value. After establishing the ARIMA model, the linear components of the ARIMA are modeled according to the determined parameters p and q, and the calculation result at time t is used as the expected value.
[0071] Preferably, the weighted averaging method in step S5 is to fuse the outputs of the HRNN and ARIMA models, thereby further reducing the error between the predicted value and the true value.
[0072] Preferably, the weighted average in step S5 is performed by using an algorithm that dynamically adjusts the weighting factors to perform a weighted average on the output of the ARIMA-HRNN model.
[0073] Preferably, the weighted average determination method of the ARIMA-HRNN model is implemented in the following manner: setting... and The weights of the HRNN and ARIMA models are represented by... , Let R represent the predicted values of HRNN and ARIMA models over the next T time periods, and let R represent the actual values over the next T time periods in the test set. The loss function is defined as follows. When the weight vector is Calculate the prediction results of the combined model for the T time periods. The root mean square error between the true value and the actual value The smaller the value, the closer the predicted result of the combined model is to the true value, and the higher the model accuracy. Each prediction is performed by selecting from this set. The weight vector with the smallest value By ensemble the models, we can obtain a combined model with the minimum root mean square error. To select the most suitable... The formula is as follows:
[0074]
[0075] In the formula: The loss function; This is the weight vector; This is a predicted value for a certain period of time.
[0076] This invention provides a real-time flood forecasting method based on ARIMA-HRNN, which can reliably predict flood trends and peak times for a given location. This invention combines the outputs of a dynamic regression module and a deep learning module, and incorporates a linear component into the prediction results, enabling the predictions to adapt to changes in the input period scale due to scale transformation. Long-term reservoir runoff forecasts and short-term flood runoff forecasts are performed based on user-imported data or information automatically imported from meteorological departments. This method uses a web-based graphical user interface to provide users with the generated data in formats such as time series plots, tables, GIS maps, process animations, and automatically generated forecast reports. Compared with other methods, this invention exhibits better performance in predicting flow accuracy and the difference between peak and peak time.
[0077] Beneficial effects:
[0078] (1) The HRNN model has strong memory ability and can more accurately reproduce the overall trend of flood change process. Its predicted flow and observed flow have reasonable comparability in terms of change trend.
[0079] (2) CNN has a better ability to handle flood peak problems, that is, it can handle the rapid fluctuation of flow during floods and is more sensitive to the development of local flood peaks;
[0080] (3) The injection of attention mechanism improves the ability to predict the overall trend of flood events and the peak flow;
[0081] (4) After adding the ARIMA model, the physical mechanisms that cannot be learned by different models, such as nonlinear and linear models, are further reduced, thus narrowing the gap between the results and the actual values. Attached Figure Description
[0082] Figure 1 This is a flowchart of a multidimensional real-time flood forecasting method based on ARIMA-HRNN, as described in this application.
[0083] Figure 2 The coefficient of determination (DC) for flood prediction is used as an evaluation index for the Bi-LSTM model, Xin'anjiang model, and ARIMA-HRNN model.
[0084] In the figure, (a) Bi-LSTM model; (b) Xin'anjiang model; (c) ARIMA-HRNN model. Detailed Implementation
[0085] Example 1
[0086] A real-time flood forecasting method based on ARIMA-HRNN includes the following steps:
[0087] S1. Use convolution kernel functions to smooth local noise;
[0088] S2. Use HRNN for feature extraction;
[0089] For the target reservoir, extract the peak characteristics of the flood, and for any flood, extract the time series corresponding to the inflow. This invention first extracts 20% of the total data sample, namely... The inflow of floodwaters into the reservoir was sorted chronologically to locate a set of flood peak locations. Determine the number n and retain the flood Chinese data samples The data will not be smoothed to ensure the shape of the flood. In this embodiment, the HRNN model includes a CNN. The activation function of the CNN is the ReLU activation function. .
[0090] In the formula, This is the output matrix; This is the weight parameter matrix; The input matrix; For bias.
[0091] In this embodiment, the HRNN model includes LSTM and Bi-LSTM.
[0092] In this embodiment, an attention layer is added to the Bi-LSTM.
[0093] S21 takes the peak feature matrix of the flood extracted by the CNN as input;
[0094] S22. Use Bi-LSTM as the recurrent unit, and let the information enter the LSTM;
[0095] S23. Discard some useless information from the main information stream through the forget gate, and process it according to the following formula.
[0096]
[0097] In the formula, Output for the forget gate; Forgetting weight matrix; This refers to the network state at the previous moment; This is the current input; To offset the forget gate;
[0098] In this embodiment, the forget gate reads the current input. network state at the previous moment The sigmoid function produces an activation vector with values between 0 and 1, which is then passed to... t LSTM cell state at time -1 C t-1 The value is used to determine which information to discard: 0 means discard all, and 1 means keep all.
[0099] S24. Determine the update status of the information.
[0100] S241. The input gate sigmoid determines which information is updated;
[0101] S242. What I have learned tanh The neural network layer generates a new information vector. , as the new value after the update.
[0102] S243. LSTM cell state update;
[0103] In this embodiment, the LSTM cell state is updated to Ct The aforementioned Ct The following formula is used to obtain it:
[0104]
[0105] In the formula: The activation vector generated by the input gate; This refers to the state at the previous moment; it Let be the input gate at time t. This is the new information vector.
[0106] In this implementation, the state at the previous moment activation vector generated by the input gate By multiplying vectors element-wise (*), useless information is forgotten, and then multiplied... The new information is added to the current information, and the LSTM cell state is then updated. C t .
[0107] In this embodiment, the i t Obtain it using the following formula:
[0108]
[0109] In the formula: This is a weight matrix that does not share parameters; This refers to the network state at the previous moment; For the currently entered information; For bias.
[0110] In this embodiment, the Obtain it using the following formula:
[0111] In the formula, This is a weight matrix that does not share parameters; This refers to the network state at the previous moment; x t For the currently entered information; This is for weight bias.
[0112] S25. Determine the output information through the output gate.
[0113] S251. The output gate reads the current input. x t network state at the previous moment h t-1The sigmoid function produces an activation vector with values between 0 and 1 to determine which parts of the cell state can be output.
[0114] S252. Utilizing tanh The function layer obtains activation vectors in the range of -1 to 1 to process the current state of the LSTM unit. C t Then, perform a vector element-wise multiplication with the result of the first step to obtain the output. h t .
[0115] In this embodiment, the h t Obtain it using the following formula:
[0116]
[0117] In the formula: Output the hidden state of the forward LSTM; This is the hidden state output of the inverse LSTM.
[0118] S3, Time series attention mechanism dynamically allocates weights;
[0119] S31. Calculate attention weights using dot product. .
[0120] S32. Calculate attention weights probabilistically using the softmax function. To obtain the probability vector 。
[0121] S33. Multiply the hidden state h generated by Bi-LSTM with the corresponding attention probability vector to obtain its weighted value.
[0122] In this embodiment, the Obtain it using the following formula:
[0123]
[0124] In the formula, Attention weights; This is the output vector of the previous layer;
[0125] In this embodiment, the P t Obtain it using the following formula:
[0126]
[0127] In the formula, Attention weights;
[0128] In this embodiment, the weighted value is obtained by the following formula:
[0129]
[0130] In the formula, Assign attention coefficients; It is a probability vector. This is the output vector of the previous layer.
[0131] S34. After passing the outputs of the attention layer and the LSTM, the model adds the outputs of the two modules together.
[0132] 4. Use ARIMA to add linear components to enhance prediction;
[0133] In this embodiment, the ARIMA consists of an autoregressive model, a moving average model, and a smoothing module.
[0134] In this embodiment, the ARIMA model is obtained using the following formula:
[0135]
[0136] In the formula, the This is the actual value. For random error, and is the coefficient, p is the autoregressive lag number, and q is the moving average lag number. p and q are integers and are usually referred to as autoregressive and moving average, respectively.
[0137] In this implementation, once the data becomes a stationary sequence, a given function is used to define the ranges of parameters p and q, where p is the autoregressive lag and q is the moving average lag, thereby identifying the Akaike Information Criterion (AIC) that minimizes the standard value. After establishing the ARIMA model, the linear components of the ARIMA are modeled based on the determined parameters p and q, and the calculated result at time t is used as the expected value.
[0138] 5. Add a weighted averaging module to weight and fuse the HRNN output with the ARIMA regression values;
[0139] In this example, the weighted average in step S5 is achieved by using an algorithm that dynamically adjusts the weighting factors to perform a weighted average on the output of the ARIMA-HRNN model.
[0140] In this example, the weighted fusion of the HRNN output and the ARIMA regression value is implemented as follows: [Setting...] and The weights of the HRNN and ARIMA models are represented by... , Let R represent the predicted values of HRNN and ARIMA models over the next T time periods, and let R represent the actual values over the next T time periods in the test set. The loss function is defined as follows. When the weight vector is Calculate the prediction results of the combined model for the T time periods. The root mean square error between the true value and the actual value The smaller the value, the closer the predicted result of the combined model is to the true value, and the higher the model accuracy. Each prediction is performed by selecting from this set. The weight vector with the smallest value By ensemble the models, we can obtain a combined model with the minimum root mean square error. To select the most suitable... The formula is as follows:
[0141]
[0142] In the formula: The loss function; This is the weight vector; This is a predicted value for a certain period of time.
[0143] This example uses cross-validation to estimate the prediction results for 25 flood events. Figure 2 .
[0144] Depend on Figure 2 It can be seen that, compared with the Bi-LSTM model and the Xin'anjiang model, the ARIMA-HRNN model can effectively describe the complete flood process in reservoir flood forecasting. Except for the poor forecasting effect of individual peaks, the trends of the predicted and observed values of the ARIMA-HRNN model are relatively consistent.
Claims
1. A multidimensional real-time flood forecasting method based on ARIMA-HRNN, characterized in that, Includes the following steps: S1. Use convolution kernel functions to smooth local noise; S2. Feature extraction using HRNN; S3. A time-series attention mechanism was adopted to assign various attention weights to the outflow of the upstream reservoir and the rainfall input vector; S4. Use ARIMA to add linear components to enhance prediction; S5. Add a weighted averaging module to fuse the HRNN output with the ARIMA regression values using a weighted average. The HRNN in S2 uses CNN when extracting multidimensional features; the feature extraction in S2 is to extract the peak features of the flood; S2 includes the following sub-steps: S21. Use the feature matrix extracted by the CNN as input; S22. Use Bi-LSTM as the recurrent unit, and let the information enter the LSTM; S23. Discard some useless information from the main information stream through the forget gate, and process it according to the following formula: In the formula, Output for the forget gate; Forgetting weight matrix; This refers to the network state at the previous moment; This is the current input; To offset the forget gate; S24. Determine the update status of the information; S25. Determine the output information through the output gate; S3 includes the following sub-steps: S31. Calculate attention weights using dot product; S32. Calculate the attention weights using the softmax function to obtain the probability vector; S33. Multiply the hidden state h generated by Bi-LSTM with the corresponding attention probability vector to obtain its weighted value; S34. After passing the output of the attention layer and the output of the LSTM, the model adds the outputs of the two modules; The weighted averaging method in S5 is to use an algorithm that dynamically adjusts the weighting factors to perform a weighted average on the output of the ARIMA-HRNN model; The weighted average determination method for the ARIMA-HRNN model is implemented as follows: Setting... and The weights of the HRNN and ARIMA models are represented by... , Let R represent the predicted values of HRNN and ARIMA models over the next T time periods, and let R represent the actual values over the next T time periods in the test set. The loss function is defined as follows. When the weight vector is Calculate the prediction results of the combined model for the T time periods. The root mean square error between the true value and the actual value The smaller the value, the closer the prediction result of the combined model is to the true value, and the higher the model accuracy. Each prediction is made by selecting from this set of values. The weight vector with the smallest value By ensemble the models, we can obtain a combined model with the minimum root mean square error. To select the most suitable model... The formula is as follows: In the formula: The loss function; This is the weight vector; This is a predicted value for a certain period of time.
2. The multidimensional real-time flood forecasting method according to claim 1, characterized in that, S25 includes the following sub-steps: S251. The output gate reads the current input. x t network state at the previous moment h t-1 The sigmoid function is used to obtain an activation vector with a value between 0 and 1 to determine which parts of the cell state can be output; S252. Utilizing tanh The function layer obtains activation vectors in the range of -1 to 1 to process the current state of the LSTM unit. C t Then, perform a vector element-wise multiplication with the result of the first step to obtain the output. h t .
3. The multidimensional real-time flood forecasting method according to claim 1, characterized in that, In S32 Obtain it using the following formula: In the formula, tanh is the activation function. For attention weights.
4. The multidimensional real-time flood forecasting method according to claim 1, characterized in that, In S4, ARIMA includes an autoregressive model, a moving average model, and a smoothing model.
Citation Information
Patent Citations
Runoff prediction method based on attention mechanism and LSTM
CN110288157A
Flood flow prediction method
CN112784479A