Interpretable CNN-LSTM-based drainage basin flood simulation method
By using the interpretable CNN-LSTM model and SHAP technology in flood simulation, key characteristic factors are identified, the problem of poor interpretability of deep learning models in flood simulation is solved, and efficient and credible flood warning and flood prevention measures are achieved.
Patent Information
- Application Number
- CN202411279786.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-10-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing deep learning models lack interpretability in flood simulations, resulting in low transparency in their decision-making processes and low credibility of prediction results, making it difficult to meet the needs of high-precision flood warning and flood prevention and disaster reduction.
A CNN-LSTM coupling model based on interpretability is used to explain the decision-making process of the model through SHAP interpretability technology, identify key input feature factors, improve the transparency and credibility of the model, and achieve high-precision simulation of basin floods.
It improves the calculation efficiency and accuracy of the model, enhances the credibility of flood warning and forecasting, can quickly and accurately simulate the flood process in the basin, and reduces disaster casualties and property losses.
Smart Images

Figure CN118798064A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of river basin flood simulation, and in particular to a river basin flood simulation method based on an interpretable CNN-LSTM. Background Art
[0002] Floods are usually affected by factors such as rainfall and human intervention. The influencing mechanism is complex, but the flood disaster process is very rapid. Conceptual hydrological models, statistical hydrological models and physical hydrological models are currently widely used. Although the physical mechanism is clear, when dealing with large-scale watersheds or high-resolution data, the simulation process involves a large number of physical equations and calculation steps. At this time, the computing speed can no longer meet the requirements of the rapidity of early warning and forecasting. Due to the strong feature learning ability, nonlinear modeling ability, large-scale data processing ability, and generalization ability of deep learning algorithms, deep learning models are gradually developed and valued. At present, deep learning models have many advantages in flood simulation and prediction, but they are still generally regarded as "black box models" because of their low transparency in the specific decision-making process, poor interpretability, and low credibility of prediction results. (Xu Gang, Hu Tingting, Wang Chenni. Research on basin flood forecasting model based on deep learning [J]. Chinese Journal of Hydrology, 2023, 43(03): 83-87. DOI: 10.19797 / j.cnki.1000-0852.20210395.) In recent years, a variety of deep learning models based on interpretability technology have been successfully used in automatic sound classification, ophthalmology models, landslides, autonomous driving and other fields, thereby enhancing the prediction credibility of deep learning models. However, there are few studies on the application of interpretable deep learning models in the field of high-precision flood simulation. The CNN-LSTM deep learning coupling model based on SHAP interpretability technology can provide high-precision prediction output and identification of key input feature factors, which can theoretically solve the above problems. However, the relevant technology has not yet been made public. How to achieve high-precision flood simulation in a basin based on the interpretable CNN-LSTM coupling model is the core problem of realizing a high-precision flood warning and forecasting system, and it is also a key problem that needs to be solved in flood prevention and disaster reduction work in the basin. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings and deficiencies in the prior art and provide a high-precision flood simulation method for a basin based on an interpretable CNN-LSTM. The method utilizes an interpretable CNN-LSTM coupled neural network model to perform high-precision simulation of the dynamic evolution process of basin floods and identify key input characteristic factors. Compared with traditional early warning models, the method has higher model efficiency and accuracy. At the same time, compared with the original deep learning model, it is more interpretable and credible. It can provide technical reference for rapid and high-precision early warning and forecasting of basin flood disasters and the early adoption of emergency strategies, which is of great significance to the development of basin flood prevention and control work and the reduction of casualties and property losses caused by flood disasters.
[0004] The present invention is achieved by at least one of the following technical solutions.
[0005] A basin flood simulation method based on interpretable CNN-LSTM includes the following steps: S1. Standardize the basin rainfall runoff basic database and divide the database into training set, validation set and test set; S2. Build a CNN-LSTM coupling model, train the CNN-LSTM coupling model using the training set data, verify it using the validation set data, and adjust and optimize the model's hyperparameters; S3, input the rainfall sequence of the test set into the CNN-LSTM coupling model to simulate the basin flood; S4. Use SHAP interpretability technology to explain the specific decision-making process of the CNN-LSTM coupling model, identify key input feature factors, and obtain the data of the sites that contribute most to the prediction of the CNN-LSTM coupling model.
[0006] Furthermore, the standardization process uses the standard deviation of the mean value to standardize the basic data of rainfall runoff in the basin, and the standardization is calculated by the following formula:
[0007] In the formula, X n represents the standardized value, X Represents a sequence value, X mean and X std represent the mean and standard deviation of the series respectively.
[0008] Furthermore, in step S1, the training set and the validation set are converted into TensorFlow datasets.
[0009] Furthermore, in step S2, the CNN-LSTM coupling model is a deep learning model based on convolutional neural networks and long short-term memory neural networks. It takes a one-dimensional runoff prediction input feature as input, first passes through a one-dimensional CNN layer, and captures local features and patterns in the sequence data by performing an inner product between the sliding window data and the convolution kernel. The output is then passed to the LSTM layer to capture long-term dependencies, and finally passes through a fully connected layer to extract features.
[0010] Furthermore, the CNN-LSTM coupling model includes an input layer, a CNN layer, an LSTM layer, a fully connected layer, and an output layer; the CNN layer includes three convolutional layers, and the ReLU function is selected as the activation function; the LSTM layer selects the LeakyReLU function as the activation function; the fully connected layer has two layers, and the output layer corresponds to the runoff value of the downstream hydrological station.
[0011] Furthermore, in step S2, the rainfall and runoff process of the entire basin at the input time step is used as the input of the CNN-LSTM coupling model, and the runoff of the downstream hydrological station in the forecast period is used as the output. The CNN-LSTM coupling model is trained using the training set data of the rainfall runoff database, and the CNN-LSTM coupling model is verified using the verification set data of the rainfall runoff database, and the hyperparameters of the model are adjusted and optimized.
[0012] Furthermore, in step S3, the rainfall event sequence data in the test set is input into the constructed CNN-LSTM coupling model, and the runoff changes of the downstream hydrological stations are output to achieve fast and high-precision simulation of basin floods.
[0013] Furthermore, in step S4, the gradient interpreter of SHAP interpretability technology is used to explain the specific decision-making process of the simulation results of the CNN-LSTM coupling model, identify key input feature factors, and improve the transparency of model decision-making and the credibility of model prediction results.
[0014] Furthermore, the SHAP interpretability technique is used to consider all combinations of features as possible cooperative combinations and calculate the Shapley value of each feature in each cooperative combination. The Shapley value represents the average contribution of each feature to different cooperative combinations. The contribution of each feature to the model output is quantified by accumulating the contribution of the feature.
[0015] Furthermore, the key input characteristic factors of the input rainfall event sequence are identified according to the degree of contribution, and the data of the stations that contribute most to the prediction of the CNN-LSTM coupling model are obtained.
[0016] Compared with the prior art, the present invention has the following advantages and beneficial effects: (1) The present invention applies the coupling of convolutional neural network and long short-term memory neural network to the high-precision simulation of river basin floods, which can achieve high-precision simulation of river basin flood runoff evolution process. It may be because the one-dimensional CNN can extract local patterns and features in the sequence, and the LSTM can effectively capture the characteristics of long-term dependencies in the sequence, so that the model pays more attention to the important local information and global structure in the sequence. Combining and giving full play to the advantages of both, the CNN-LSTM coupling model has better prediction performance than the traditional single deep learning model (such as CNN or LSTM neural network).
[0017] (2) Compared with traditional conceptual hydrological models, statistical hydrological models and physical hydrological models, the constructed CNN-LSTM coupling model is much more efficient in predicting the evolution of basin floods than traditional models. The ultra-high computational efficiency of the CNN-LSTM coupling model can achieve rapid simulation of the evolution of basin flood runoff.
[0018] (3) Compared with the existing deep learning models, the constructed interpretable CNN-LSTM coupling model can identify key input feature factors, enhance the transparency of the model simulation decision-making process and the credibility of the prediction. Interpretable deep learning models are of great significance for the construction of high-precision flood warning and forecasting systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a flow chart of a high-precision flood simulation technology for a watershed based on an interpretable CNN-LSTM neural network according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the runoff scatter of the test set of the CNN-LSTM coupling model in the embodiment when the forecast period is 25 hours and the input time step is 28 hours; Figure 3 Schematic diagram of flood and rainfall process of the test set of the CNN-LSTM coupling model in the embodiment with a forecast period of 25 hours and an input time step of 28 hours; Figure 4 This is a schematic diagram of the runoff scatter of the test set of the CNN-LSTM coupling model in the embodiment when the forecast period is 25 hours and the input time step is 44 hours; Figure 5 Schematic diagram of flood and rainfall process of the test set of the CNN-LSTM coupling model in the embodiment with a forecast period of 25 hours and an input time step of 44 hours; Figure 6 Schematic diagram of NSE values of a test set with different input time steps for a CNN-LSTM coupling model in an embodiment with a forecast period of 25 hours; Figure 7It is a schematic diagram of the explained features and the contribution of the input time step by the SHAP interpretability technique in the embodiment; Figure 8 It is a schematic diagram of the explained features and the contribution of rainfall events by the SHAP interpretability technology in the embodiment; Fig. 9 It is a schematic diagram of the runoff scatter of the test set of the CNN deep learning model in the comparative example with a forecast period of 25 hours and an input time step of 48 hours; Fig.10 This is a schematic diagram of the runoff scatter of the test set of the LSTM deep learning model in the comparative example with a forecast period of 25 hours and an input time step of 48 hours; Fig.11 This is a schematic diagram of the runoff scatter of the test set of the CNN-LSTM coupling model in the comparative example with a forecast period of 25 hours and an input time step of 48 hours. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not limited to the present invention.
[0021] Example: A basin flood simulation method based on interpretable CNN-LSTM, such as Figure 1 As shown, the following steps are included: S1. Standardize the basin rainfall-runoff time series database after deleting erroneous data and linearly completing missing data.
[0022] In order to eliminate the dimensional effects between different input features, make the data have similar scales during model training, and improve the stability and efficiency of model training, the mean value standard deviation standardization method is used to standardize the basic data of rainfall runoff in the basin. The standardization is calculated by the following formula:
[0023] In the formula, X n represents the standardized value, X Represents a sequence value, X mean and X stdRespectively represent the mean and standard deviation of the sequence; the standardized rainfall runoff data is divided into training set, validation set and test set. In order to improve the efficiency and performance of data processing and provide a good data foundation and environment for the training of CNN-LSTM coupling model, the training set and validation set are converted into TensorFlow data sets.
[0024] S2. A CNN-LSTM coupling model (convolutional neural network-long short-term memory network coupling model) is constructed based on the deep learning algorithm of convolutional neural network and long short-term memory neural network. The CNN-LSTM coupling model utilizes one-dimensional CNN and LSTM networks. One-dimensional CNN can effectively capture local and global features in sequence data, focusing mainly on the time series of data. Its application performs better due to its lower computing requirements and good applicability to real-time data. Since one-dimensional CNN can extract local patterns and features in the sequence, and LSTM can effectively capture the characteristics of long-term dependencies in the sequence, the model pays more attention to important local information and global structure in the sequence, and can effectively capture time series information in rainfall and runoff processes.
[0025] The CNN-LSTM coupling model includes an input layer, a CNN layer, an LSTM layer, a fully connected layer, and an output layer; the rainfall sequence data of the present invention is one-dimensional, and the convolutional neural network used refers to a one-dimensional convolutional neural network. The CNN-LSTM coupling model takes the one-dimensional runoff prediction input feature as input, first passes through the one-dimensional CNN layer, captures the local features and patterns in the sequence data by inner product with the sliding window data and the convolution kernel, and then passes the output to the LSTM layer to capture long-term dependencies. Finally, through the fully connected layer, features are extracted and information is integrated to enhance the expression ability of the model. With the whole basin rainfall and runoff process of a certain input time step as input, and the runoff of the downstream hydrological station in a certain forecast period as output, the CNN-LSTM coupling model is trained using the training set data of the rainfall runoff database, and the CNN-LSTM coupling model is verified using the verification set data of the rainfall runoff database. After continuously adjusting and optimizing the hyperparameters of the model, the optimal CNN-LSTM coupling model is obtained. Using only rainfall data and runoff data as input data to train and verify the CNN-LSTM coupling model can achieve prediction of runoff evolution with less data input, effectively process large-scale hydrological data, reduce the time of model prediction, and meet the increasingly increasing timeliness requirements.
[0026] As one of the embodiments, the Keras library in the Python language is used to build a CNN-LSTM coupling model, the convolution layer of the CNN is designed to be 3 layers, and the ReLU function is selected as the activation function; the LSTM layer is set to 1 layer, and the LeakyReLU function is selected as the activation function; the fully connected layer is 2 layers, and the output layer corresponds to the runoff value of the downstream hydrological station.
[0027] When constructing the CNN-LSTM coupling model, multiple parameters need to be set and optimized. This embodiment uses a random search hyperparameter method to optimize the parameters of the CNN-LSTM model. The parameter settings are shown in Table 1.
[0028] Table 1 CNN-LSTM coupling model structure and parameter settings
[0029] Among them: ReLU: linear rectification function; LeakyReLU: leaky linear rectification function; Random normal: random normal distribution initializer; Nadam: Nesterov accelerated adaptive moment estimation optimization algorithm; MSE: mean square error.
[0030] S3. Input the rainfall sequence data in the test set into the constructed CNN-LSTM coupling model, output the runoff changes of the downstream hydrological stations, and realize fast and high-precision simulation of basin floods.
[0031] As one of the specific embodiments, this embodiment divides the forecast period into 4 types, namely 1 hour, 9 hours, 17 hours, and 25 hours, and there are 10 input time steps, namely 12 hours, 16 hours, 20 hours, 24 hours, 28 hours, 32 hours, 36 hours, 40 hours, 44 hours, and 48 hours, for a total of 40 combinations. Since the prediction results of the optimal models obtained by training various combinations are similar under the premise of the same forecast period and different input time steps, as one of the specific embodiments, the data with a forecast period of 25 hours and input time steps of 28 hours and 44 hours are used to test the basin flood simulation prediction effect of the CNN-LSTM coupling model, and the trend line and determination coefficient (R 2 ), root mean square error (RMSE) and Nash efficiency coefficient (NSE) are used as evaluation indicators of the model.
[0032] When the forecast period is 25 hours, the runoff forecast output will be made every 4 hours starting from the first hour in the future, that is, multiple outputs within a single forecast period. Under the conditions of a forecast period of 25 hours and an input time step of 28 hours, the optimal model is found after multiple trainings. The runoff scatter diagram after the test set is input into the optimal model is as follows Figure 2 , Schematic diagram of flood and rainfall process Figure 3 . Figure 2 The horizontal axis is the observed runoff value, and the vertical axis is the predicted runoff value. S28h-F25h-1th means that the input time step is 28 hours, the forecast period is 25 hours, and the runoff forecast at the first hour in the future is the same. Figure 2 a)- Figure 2 The accuracy gradually decreases, but the NSE value at the 25th hour in the future can still be close to 0.84, which proves that the predicted value is very close to the actual measured value. Figure 3 The horizontal axis is the number of rainfall records from 2005 to 2007, that is, the number of runoff prediction outputs of the test set rainfall events. The main vertical axis is the runoff value, and the secondary vertical axis is the rainfall value. This figure is a schematic diagram of the flood and rainfall process. Figure 3 a)- Figure 3 g) can be intuitively reflected. No matter it is the prediction for the next few hours, it can conform to the relationship between rainfall and runoff. The model simulation has high accuracy and good effect.
[0033] When the forecast period is 25 hours, the runoff forecast output will be made every 4 hours starting from the first hour in the future, that is, multiple outputs within a single forecast period. Under the conditions of a forecast period of 25 hours and an input time step of 44 hours, the optimal model is found after multiple trainings. The runoff scatter diagram after the test set is input into the optimal model is as follows Figure 4 , Schematic diagram of flood and rainfall process Figure 5 . Figure 4 The horizontal axis is the observed runoff value, and the vertical axis is the predicted runoff value. S28h-F25h-1th means that the input time step is 28 hours, the forecast period is 25 hours, and the runoff forecast at the first hour in the future is the same as the following. Figure 4 a)- Figure 4 However, the NSE value at the 25th hour in the future can still be close to 0.85, which proves that the predicted value is very close to the actual measured value. Figure 5 The horizontal axis is the number of rainfall records from 2005 to 2007, that is, the number of runoff prediction outputs of the test set rainfall events. The main vertical axis is the runoff value, and the secondary vertical axis is the rainfall value. This figure is a schematic diagram of the flood and rainfall process. Figure 5 a)- Figure 5 g) can be intuitively reflected. No matter it is the prediction for the next few hours, it can conform to the relationship between rainfall and runoff. The model simulation has high accuracy and good effect.
[0034] right Figure 2 and Figure 4 The evaluation indicators of the models with other input time steps not listed are summarized as follows: Figure 6 . Figure 6In the figure, the horizontal axis is the input time step, and the vertical axis is the Nash efficiency coefficient NSE of the model evaluation index. In the legend, 1h means the first hour in the future, and the same is true for the others. By comparison, it is found that the input of the same forecast period and different input time steps does not have much impact on the model prediction effect, and both can simulate the basin flood with high precision.
[0035] Table 2 Summary of evaluation indicators
[0036] S4. The gradient interpreter based on SHAP interpretability technology is used to explain the specific decision-making process of the simulation results of the CNN-LSTM coupling model, identify key input feature factors, and improve the transparency of model decisions and the credibility of model prediction results.
[0037] The inputs with the same forecast period and different input time steps do not have much impact on the model prediction effect, and can all perform high-precision simulation of basin floods. When applied to the actual basin flood high-precision early warning and forecasting system, there will be doubts about the randomness of the existing model result output. In other words, the specific decision-making process of the CNN-LSTM coupling model has low transparency, poor interpretability, and low credibility of the prediction results. Therefore, in the face of simulation results with different inputs but similar outputs, the present invention uses SHAP interpretability technology to explain the simulation results.
[0038] The core concept of SHapley Additive exPlanations (SHAP) is derived from the Shapley contribution value in game theory. SHAP provides a method to fairly distribute the contribution of each participant to the victory in a cooperative game and determine how much benefit each participant should get in the cooperative game. In the context of deep learning, different types of data input to the model input layer are recorded as different features. Features can be regarded as participants in the game, and the output of the model is the victory of the game. SHAP calculates the Shapley value of each feature in each cooperative combination by considering all combinations of features as possible cooperative combinations. The Shapley value represents the average contribution of each feature to different cooperative combinations. Finally, by accumulating the Shapley values of each feature in different cooperative combinations, the total SHAP contribution of each feature to the model output can be obtained. The contribution of each input feature to the model output can be quantified. According to the contribution, the key input feature factors of the input rainfall sequence can be identified. In this embodiment, the data of which station contributes most to the model prediction. Through the interpretation of SHAP, the transparency of model decision-making and the credibility of model prediction results can be improved. It should be noted that after SHAP interpretation, SHAP values are either positive or negative. A positive value indicates that the input has a positive impact on the output, and a negative value indicates that the input has a negative impact on the output. The larger the absolute value, the greater the impact. In the present invention, whether it is a positive impact or a negative impact, the focus is on the degree of impact of the input on the output, so all SHAP values take absolute values.
[0039] like Figure 7 It is a schematic diagram of the explained features and the contribution of the input time step through the SHAP interpretability technology in the embodiment. In the figure, the horizontal axis 0-12 is the rainfall data of the rain gauge station, 13-15 is the runoff data of the upstream hydrological station, and 16 is the runoff data of the downstream hydrological station. The vertical axis represents the input time step. The larger the value, the farther away from the current time node. Specifically, it refers to a schematic diagram of the SHAP contribution value of 17 input features (40×17) for the next 17 hours of the current time node under the premise of a forecast period of 25 hours and an input time step of 40 hours. Because this embodiment uses 80 rainfalls, there will be 80 arrays. Therefore, the absolute values of the 80 arrays are taken and the corresponding positions are added one by one. In other words, what is more concerned here is the contribution of the input time step of the 17 input features. By Figure 7 It can be found that, in general, the SHAP values of the rainfall stations are very small and almost negligible. The SHAP values of the upstream hydrological stations are slightly larger than those of the rainfall stations, but the most important thing is that the runoff data of the downstream hydrological stations has the greatest impact on the model prediction. In addition, it can be found that as the distance from the current time node increases, the contribution tends to decrease, which means that the input data at the moment before the current time node has the greatest impact on the output.
[0040] Figure 8 It is a schematic diagram of the explained features and the contribution of rainfall events through the SHAP interpretability technology in the embodiment. In the figure, the horizontal axes 0-12 are the rainfall data of the rain gauge station, 13-15 are the runoff data of the upstream hydrological station, 16 is the runoff data of the downstream hydrological station, and the vertical axis represents the rainfall events. Specifically, it refers to the SHAP contribution value (80×17) of the 17 feature inputs for the next 17 hours at the current time node under the premise of a forecast period of 25 hours, an input time step of 40 hours, and 80 rainfall events. Because the input time step is 40 hours, the absolute values of the 40 SHAP values of each feature of each rainfall event are taken, and the corresponding positions are added one by one to obtain a (1×17) array. In other words, what is more concerned here is the contribution of the 17 input features of each of the 80 rainfall events. By Figure 8 It can be found that no matter which rainfall occurs, the biggest impact is on the runoff data of the downstream hydrological station.
[0041] The use of SHAP interpretability technology can intuitively show that the size of the predicted value is almost determined by the most recent runoff data of the downstream hydrological station, while other rainfall and runoff data can only have a small impact. In other words, in this embodiment, even if the input time step is longer, it will not have a great impact on the predicted output value, at most some small revisions. Through interpretability technology, we can clearly understand why the input of the same forecast period and different input time steps does not have much impact on the model prediction effect, and can both perform high-precision simulation of basin floods. In practical applications, interpretability technology improves the transparency of CNN-LSTM coupling model decision-making and enhances the credibility of model predictions.
[0042] Comparative Example: In the comparative example, the currently popular CNN deep learning model and LSTM deep learning model as well as the CNN-LSTM deep learning coupling model of the present invention are used to simulate basin floods under the conditions of a forecast period of 25 hours and an input time step of 48 hours.
[0043] After training the CNN, LSTM, and CNN-LSTM models and finding their respective optimal models, such as Fig. 9 This is a schematic diagram of runoff scatter after the test set in the comparative example is input into the CNN deep learning model. Fig.10 This is a schematic diagram of runoff scatter points after the test set in the comparative example is input into the LSTM deep learning model. Fig.11 This is a schematic diagram of runoff scatter after the test set in the comparative example is input into the CNN-LSTM deep learning coupling model. The horizontal axis in the figure is the observed runoff value, and the vertical axis is the predicted runoff value. Fig. 9 a)- Fig. 9The accuracy gradually decreases, and the NSE value at the 25th hour in the future has dropped to 0.737. The deviation between the predicted data and the observed data is too large, proving that the model simulation effect is not good. Fig.10 a)- Fig.10 The accuracy gradually decreases, and the NSE value at the 25th hour in the future has dropped to 0.745. The deviation between the predicted data and the observed data is too large, proving that the model simulation effect is not good. Fig.11 a)- Fig.11 g), the accuracy gradually decreases, but the NSE value at the 25th hour in the future can still be close to 0.84, proving that the predicted value is very close to the actual measured value. By comparison, it is found that the prediction effect of the CNN-LSTM coupling model is better than that of the CNN and LSTM models, with NSE values of 0.838, 0.737, and 0.745 respectively. Similarly, under other different input time steps and forecast periods, it can be found that the prediction effect of the CNN-LSTM coupling model is better than that of the CNN and LSTM models.
[0044] In summary, the interpretable CNN-LSTM deep learning coupling model used in the present invention has better overall prediction performance and can therefore be applied to high-precision flood simulation in watersheds.
[0045] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well.
Claims
1. A basin flood simulation method based on interpretable CNN-LSTM, characterized in that: The following steps are involved: S1. Standardize the basin rainfall runoff basic database and divide the database into training set, validation set and test set; S2. Build a CNN-LSTM coupling model, train the CNN-LSTM coupling model using the training set data, verify it using the validation set data, and adjust and optimize the model's hyperparameters; S3, input the rainfall sequence of the test set into the CNN-LSTM coupling model to simulate the basin flood; S4. Use SHAP interpretability technology to explain the specific decision-making process of the CNN-LSTM coupling model, identify key input feature factors, and obtain the data of the sites that contribute most to the prediction of the CNN-LSTM coupling model.
2. The method for basin flood simulation based on interpretable CNN-LSTM according to claim 1, characterized in that: In step S1, the standardization process uses the standard deviation of the mean value to standardize the basic data of rainfall runoff in the basin, and the standardization is calculated by the following formula: In the formula, X n represents the standardized value, X Represents a sequence value, X mean and X std represent the mean and standard deviation of the series respectively.
3. The method for basin flood simulation based on interpretable CNN-LSTM according to claim 1, characterized in that: In step S1, the training set and the validation set are converted into TensorFlow datasets.
4. The method for basin flood simulation based on interpretable CNN-LSTM according to claim 1, characterized in that: In step S2, the CNN-LSTM coupling model is a deep learning model based on convolutional neural networks and long short-term memory neural networks. It takes one-dimensional runoff prediction input features as input, first passes through a one-dimensional CNN layer, and captures local features and patterns in the sequence data by performing inner product between the sliding window data and the convolution kernel. The output is then passed to the LSTM layer to capture long-term dependencies, and finally passes through a fully connected layer to extract features.
5. The method for basin flood simulation based on interpretable CNN-LSTM according to claim 4, characterized in that: The CNN-LSTM coupling model includes an input layer, a CNN layer, an LSTM layer, a fully connected layer, and an output layer; the CNN layer includes three convolutional layers, and the ReLU function is selected as the activation function; the LSTM layer selects the LeakyReLU function as the activation function; the fully connected layer has two layers, and the output layer corresponds to the runoff value of the downstream hydrological station.
6. The method for basin flood simulation based on interpretable CNN-LSTM according to claim 1, characterized in that: In step S2, the rainfall and runoff process of the entire basin at the input time step is used as the input of the CNN-LSTM coupling model, and the runoff of the downstream hydrological station in the forecast period is used as the output. The CNN-LSTM coupling model is trained using the training set data of the rainfall runoff database, and the CNN-LSTM coupling model is verified using the validation set data of the rainfall runoff database, and the hyperparameters of the model are adjusted and optimized.
7. The method for basin flood simulation based on interpretable CNN-LSTM according to claim 1, characterized in that: In step S3, the rainfall event sequence data in the test set is input into the constructed CNN-LSTM coupling model, and the runoff changes of the downstream hydrological stations are output to achieve fast and high-precision simulation of basin floods.
8. A basin flood simulation method based on an interpretable CNN-LSTM according to any one of claims 1 to 7, characterized in that: In step S4, the gradient interpreter of SHAP interpretability technology is used to interpret the specific decision-making process of the simulation results of the CNN-LSTM coupling model and identify the key input feature factors.
9. The method for basin flood simulation based on interpretable CNN-LSTM according to claim 8, characterized in that: The SHAP interpretability technique is used to consider all combinations of features as possible cooperative combinations and calculate the Shapley value of each feature in each cooperative combination. The Shapley value represents the average contribution of each feature to different cooperative combinations. The contribution of each feature to the model output is quantified by accumulating the contribution of the feature.
10. The method for basin flood simulation based on interpretable CNN-LSTM according to claim 9, characterized in that: The key input characteristic factors of the input rainfall sequence are identified according to the degree of contribution, and the data of the stations that contribute most to the prediction of the CNN-LSTM coupling model are obtained.
Citation Information
Patent Citations
Runoff prediction method and device, electronic equipment and storage medium
CN116167526A
Cited By
SHAP-HO-GRU interpretable drainage basin flood intelligent forecasting method based on rainfall classification
CN119740693A
River abnormity early warning method and system based on deep learning image processing
CN119888376A
Basin flood real-time early warning method and system based on multi-source data fusion
CN120974242A
A method and system for real-time early warning of watershed floods based on multi-source data fusion
CN120974242B
