A deep learning-based small-data small watershed water level prediction method
By using a deep learning-based dual-generative GAN model and a CNN-LSTM hybrid prediction model, the problems of data scarcity and low accuracy in predicting extreme events in small watershed water level forecasting with limited data are solved, achieving a breakthrough improvement in the accuracy and reliability of water level forecasting, and is applicable to the prevention and control of flash floods in small watersheds.
Patent Information
- Application Number
- CN202511242783.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-09-02
AI Technical Summary
Traditional hydrological models suffer from stringent data requirements, high professional thresholds, and failure to predict extreme events in small watersheds with limited data. Existing improvement solutions address the issue of data augmentation methods (such as SMOTE) generating physically unfeasible rainfall patterns, while end-to-end deep learning models ignore the spatial heterogeneity of rainfall across multiple stations, resulting in low accuracy in water level prediction.
We employ a deep learning-based approach, utilizing a dual-generative GAN model for data augmentation, and construct a CNN-LSTM hybrid prediction model. By combining multi-scale spatiotemporal feature modeling and a progressive validation strategy, we generate extreme rainfall-water level data that conforms to hydrological patterns through a physical constraint loss function, and construct a CNN-LSTM hybrid prediction model. The progressive validation strategy ensures the stability and generalization ability of the model under different data environments.
It significantly improves the accuracy and reliability of water level prediction in small watersheds with limited data, especially the prediction accuracy under extreme events, and provides more accurate and reliable early warning support for flash floods.
Smart Images

Figure CN120744513B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water level forecasting technology for small watersheds, and more particularly to a method for forecasting water levels in small watersheds with limited data based on deep learning. Background Technology
[0002] Water level forecasting is a crucial link in the prevention and control of flash floods in small watersheds. Traditional hydrological models (such as the Xin'anjiang model and HEC-HMS) rely on physical mechanism equations to describe the rainfall-runoff-water level relationship, which faces serious limitations in small watersheds with limited data: high professional threshold: hydrological experts need to pre-set watershed parameters (such as infiltration rate and runoff time), making it difficult to model watersheds without long-term monitoring data; demanding data requirements: requiring complete rainfall-water level data for many years; failure to predict extreme events: traditional models rely on linear assumptions, and the prediction error for rainstorms with hourly rainfall ≥15mm is more than 35%, which cannot meet the requirements for flash flood early warning.
[0003] While existing improvement methods (such as statistical models and simple machine learning) reduce data requirements, they still suffer from two major drawbacks: data augmentation methods (such as SMOTE) generate physically unfeasible rainfall patterns, leading to the "spurious peak" problem; and end-to-end deep learning models (such as a single LSTM) ignore the spatial heterogeneity of rainfall across multiple sites, resulting in a 2-3 hour lag in predicting sudden changes in water level. Therefore, there is an urgent need for a water level forecasting method that balances adaptability to limited data with accuracy in predicting extreme events. Summary of the Invention
[0004] To address the issues of low water level prediction accuracy in small watersheds with limited data due to data scarcity and insufficient extreme event samples in existing technologies, as well as the neglect of spatial characteristics and physical consistency by traditional non-mechanistic models, this invention proposes a deep learning-based water level prediction method for small watersheds with limited data.
[0005] The specific technical solution is as follows: A method for predicting water levels in small watersheds with limited data based on deep learning, including:
[0006] Obtain historical hourly rainfall data from multiple rain gauge stations in the upper reaches of the small watershed and historical hourly water level data from downstream water level stations;
[0007] The acquired data was preprocessed to filter rainfall events with hourly rainfall exceeding 15 mm within 24 hours and their corresponding water levels.
[0008] Data augmentation is performed using a dual-generative GAN model. The first GAN model generates simulated rainfall data with white noise as input, and the second GAN model generates simulated water level data with rainfall data as input. Historical data and simulated data are merged, normalized, and then proportionally divided into training set, validation set, and test set.
[0009] A CNN-LSTM hybrid prediction model is constructed, and the prediction model is trained with Nash coefficient as the optimization target and verified by using a progressive verification strategy.
[0010] The prediction model is deployed to perform real-time water level prediction, and water level prediction results are obtained.
[0011] Further, the generator of the second GAN model adopts a down-sampling and up-sampling symmetric structure to generate simulated water level data, and the generator includes three down-sampling convolutional layers and three up-sampling deconvolutional layers.
[0012] The down-sampling layer adopts a 3×3 convolutional kernel with a step of (2, 1), and the number of channels increases from 64 to 256, which is used to gradually compress the spatio-temporal features of the rainfall data.
[0013] The up-sampling layer adopts a deconvolutional kernel with a step of (2, 1), and the number of channels decreases from 256 to 64, which fuses shallow features and deep features through a skip connection to ensure the spatio-temporal continuity of the generated water level sequence.
[0014] The discriminator adopts a global feature pooling structure, which extracts features through three 3×3 convolutional layers and outputs a probability of authenticity through a global maximum pooling layer.
[0015] Further, the multi-scale feature fusion of the CNN module in the CNN-LSTM hybrid prediction model is realized through double-branch cooperation:
[0016] The first branch adopts a 3×3 standard convolutional kernel to focus on the spatial correlation of local rainfall features.
[0017] The second branch adopts a 5×5 dilated convolutional kernel to capture large-scale rainfall spatial heterogeneity.
[0018] The outputs of the double branches are dynamically weighted and fused through a channel attention mechanism, which generates channel statistical descriptors through global average pooling, learns the importance weights of each feature channel through a fully connected layer, and finally outputs the weighted fusion features.
[0019] Further, the LSTM module in the CNN-LSTM hybrid prediction model adopts a spatio-temporal attention mechanism, which operates according to a hierarchical structure.
[0020] The spatial attention layer calculates the feature weights of each rainfall station according to the nonlinear mapping relationship between the current time hidden state and the station features.
[0021] The temporal attention layer calculates the feature weights of the historical time according to the correlation strength between the current time memory unit and the historical state.
[0022] The weighted space-time feature vector is used as the input of the LSTM unit, which makes the prediction model dynamically focus on key stations and key historical moments.
[0023] Further, the progressive verification strategy is executed in three stages:
[0024] The first stage only uses historical real data verification to ensure the basic prediction ability;
[0025] The second stage injects 30% simulated data verification to test the adaptability of the prediction model to generated data;
[0026] The third stage uses a mixed validation set containing 50% simulated data to verify the generalization ability of the prediction model under extreme data.
[0027] Further, the training of the second GAN model introduces a physical constraint loss function:
[0028] The first constraint term forces the generated rainfall to be non-negative, eliminating non-physical feasible solutions;
[0029] The second constraint term controls the hourly rainfall peak to approach the 15mm threshold, enhancing the extreme event generation ability;
[0030] The third constraint term limits the water level change rate within a reasonable range, ensuring that the generated water level conforms to the continuity rules of hydrological process lines.
[0031] Further, the specific implementation of the channel attention mechanism is:
[0032] Perform global average pooling on the input feature map to generate a channel description vector;
[0033] Learn the non-linear relationship between channels through two fully connected layers, with the first layer using ReLU activation and the second layer using Sigmoid activation;
[0034] Output the normalized weight vector and multiply it with the original feature map channel by channel to achieve adaptive enhancement and suppression of feature channels.
[0035] Further, the calculation expression of the spatial attention weight in the spatio-temporal attention mechanism is:
[0036] ;
[0037] Where, is the feature vector at the current time, , is a learnable parameter, is the attention query vector.
[0038] Further, the specific parameters of the progressive verification strategy are:
[0039] The first stage requires Nash coefficient >= 0.7;
[0040] The second stage requires Nash coefficient >= 0.75;
[0041] The third stage requires Nash coefficient >= 0.8.
[0042] Further, after the deployment prediction model is used for real-time water level prediction, the method further comprises: starting a residual correction mechanism when the prediction deviation exceeds a threshold value, and the residual correction mechanism comprises:
[0043] When the deviation between the real-time monitored water level and the predicted water level exceeds 10cm, a light LSTM correction model is started;
[0044] The correction model inputs the past 24-hour prediction residual sequence;
[0045] The final prediction value is corrected according to the following formula:
[0046] ;
[0047] Wherein, is the original prediction value, is the residual prediction value output by the correction model.
[0048] The above technical scheme has the following advantages or technical effects:
[0049] 1. Through the three core technical innovations of double-GAN physical constraint data enhancement technology, multi-scale spatio-temporal feature modeling technology and progressive verification strategy, the prediction accuracy and reliability of small data small watershed water level are broken through. The double-GAN physical constraint data enhancement technology effectively expands the data samples that can be used for prediction model training, the multi-scale spatio-temporal feature modeling technology accurately captures the complex spatio-temporal relationship in rainfall and water level data, and the progressive verification strategy ensures the stability and generalization ability of the prediction model in different data environments. The three work together to comprehensively improve the performance of water level prediction.
[0050] 2. The present application is based on a physical constraint-based GAN generation technique, which can generate extreme rainfall-water level data that conforms to hydrological laws. By introducing a physical constraint loss function, the generated rainfall is forced to be non-negative, the hourly rainfall peak is controlled to approach the actual threshold, and the water level change rate is limited within a reasonable range, ensuring the physical feasibility of the generated data. This technique effectively increases the sample size of extreme events and solves the problem of large errors in traditional models for storm field prediction. At the same time, the extreme event reinforcement mechanism further ensures the proportion of storm samples in the generated data, enabling the prediction model to fully learn the water level change rules under extreme rainfall conditions, significantly improving the prediction accuracy of the prediction model for extreme rainfall events with single-hour rainfall exceeding 15mm, and providing more accurate and reliable data support for small watershed flood disaster warning.
[0051] 3. The multi-scale CNN fusion channel attention mechanism used in the present application performs well in spatial feature extraction of multi-site rainfall. Through a double-branch collaborative structure, comprehensive coverage of rainfall spatial features is achieved. The channel attention mechanism generates channel statistical descriptors through global average pooling, learns the importance weights of each feature channel through a fully connected layer, and dynamically weights and fuses the double-branch output, so that the prediction model can adaptively enhance key feature channels and suppress irrelevant feature channels, thereby improving the spatial feature extraction efficiency of multi-site rainfall, reducing the key site weight allocation error, and ensuring that the prediction model can more accurately capture the impact of rainfall at different sites on water level, providing more accurate spatial feature information for water level prediction. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 is a method flowchart of the present application;
[0053] Figure 2 is a flowchart of the water level prediction model construction method of the present application;
[0054] Figure 3 is a rainfall data simulation model training flowchart of the present application;
[0055] Figure 4 is a water level data simulation model training flowchart of the present application;
[0056] Figure 5 is a CNN-LSTM water level prediction model architecture diagram of the present application;
[0057] Figure 6 is a comparison diagram of the prediction model prediction results and the measured water level of the present application;
[0058] Figure 7 is a correction model correction flowchart of the present application;
[0059] Figure 8is a prediction result schematic diagram of only using the CNN-LSTM model in the prior art;
[0060] Figure 9 is a prediction structure schematic diagram of the GAN-CNN-LSTM model in the application. DETAILED DESCRIPTION
[0061] In order to make the technical scheme of the application clearer, the application will be further described in detail below in combination with the drawings and specific embodiments.
[0062] As shown in the figure, a deep learning-based small-data small watershed water level prediction method comprises: Figure 1 Obtaining historical hourly rainfall data of multiple rainfall stations upstream of the small watershed and historical hourly water level data of the downstream water level station;
[0063] Preprocessing the obtained data, screening rainfall events with single-hour rainfall reaching 15mm or more within 24 hours and corresponding water level data;
[0064] Performing data augmentation through a dual-generation GAN model, a first GAN model generates simulated rainfall data with white noise as input, a second GAN model generates simulated water level data with rainfall data as input, merging historical data and simulated data, normalizing and dividing into training set, validation set and test set according to proportion;
[0065] Building a CNN-LSTM hybrid prediction model, training the prediction model with Nash coefficient as the optimization target, and verifying the prediction model using a progressive verification strategy;
[0066] Deploying the prediction model for real-time water level prediction to obtain water level prediction results.
[0067] The method for building the deployed prediction model is shown in the figure, considering the problem of data scarcity in small-data small watersheds, the data sources can include ground rainfall stations, satellite remote sensing data and weather radar data to capture rainfall information as comprehensively as possible, and hourly rainfall data from 2018 to 2024 can be selected. Data preprocessing includes filling missing values with mean value, completing missing record data; replacing abnormal values with mean value in the form of moving average to ensure data continuity and stability.
[0068] Figure 2 The first GAN model is a rainfall simulation model, as shown in the figure, white noise is input in the form of N*24 matrix, where N is the number of rainfall stations upstream of the small watershed, 24 is the time interval, and the first GAN model outputs an N*24 matrix; the second GAN model is a water level simulation model, as shown in the figure
[0069] The first GAN model is a rainfall simulation model, as shown in the figure, white noise is input in the form of N*24 matrix, where N is the number of rainfall stations upstream of the small watershed, 24 is the time interval, and the first GAN model outputs an N*24 matrix; the second GAN model is a water level simulation model, as shown in the figure Figure 3 Figure 4 The second GAN model is shown, in which actual rainfall data is input, and corresponding actual water level data is model simulation output, and the input structure of the second GAN model is N*24 rainfall data, which is consistent with the rainfall simulation model, and the output structure of the model is 1*24 water level data. Figure 3 、 Figure 4 In the formula, Conv1 and Conv2 respectively represent the first convolutional layer and the second convolutional layer, DeConv1 and DeConv2 respectively represent the first deconvolutional layer and the second deconvolutional layer, Features represents the feature layer, True represents that the identification result of the identification module in the simulation model is the actual rainfall data, and False represents that the identification result of the identification module in the simulation model is the simulated rainfall data. The purpose is to generate rainfall data that cannot be correctly identified by the identification module in the generation module in the simulation model, and the generation module and the identification module continuously upgrade each other to generate and identify the ability.
[0070] In the training process, rainfall with a 24-hour rainfall peak of 15m and corresponding water level data in the historical data are used, focusing on extreme rainfall events that may trigger mountain torrents. In the application stage, white noise is used to input the rainfall simulation model, the model outputs simulated rainfall data, and the simulated rainfall data is input into the water level simulation model to generate corresponding water level data to form a corresponding training data set.
[0071] The generator of the second GAN model adopts a down-sampling and up-sampling symmetric structure to generate simulated water level data. The generator includes three down-sampling convolutional layers and three up-sampling deconvolutional layers.
[0072] The down-sampling layer adopts a 3*3 convolution kernel with a step of (2, 1), and the number of channels increases from 64 to 256, which is used to gradually compress the spatio-temporal features of the rainfall data.
[0073] The up-sampling layer adopts a deconvolution kernel with a step of (2, 1), and the number of channels decreases from 256 to 64. The shallow features and deep features are fused through a jump connection to ensure the spatio-temporal continuity of the generated water level sequence.
[0074] The discriminator adopts a global feature pooling structure. After extracting features through three 3*3 convolutional layers, the global maximum pooling layer outputs the authenticity probability.
[0075] To ensure the physical feasibility of the generated data, a physical constraint loss function is introduced in the training of the second GAN model.
[0076] The first constraint term forces the generated rainfall to be non-negative, eliminating non-physical feasible solutions.
[0077] The second constraint term controls the hourly rainfall peak to approach the 15mm threshold, enhancing the extreme event generation capability.
[0078] The third constraint term limits the water level change rate within a reasonable range, ensuring that the generated water level conforms to the continuity rule of hydrological process line.
[0079] The third constraint term adopts the following formula:
[0080] ;
[0081] wherein D(x) is an identification module, G(z) is a generation module, P is a physical constraint module, and z is white noise input; in the formula, G(z) represents generated rainfall data, D(x) represents the identification module determining whether the data is generated data, and P(x, v) represents the physical constraint module reducing the error of generated data.
[0082] The GAN model principle is that the error between the G(z) generation module and the actual data is as small as possible, the accuracy of the D(x) identification module is as high as possible, and the error of the P physical constraint module is as low as possible.
[0083] The physical constraint mainly calculates the error between the generated rainfall data and the historical rainfall distribution, and is realized by calculating the Wasserstein distance, and the specific formula is as follows:
[0084] ;
[0085] wherein x is the rainfall distribution generated by the model, and v is the distribution of historical rainfall.
[0086] The rainfall data and water level data are normalized to compress the data range to 0 to 1. At the same time, the rainfall data and water level data are divided into training data set, validation data set and test data set in the ratio of 7:1:2, wherein the rainfall data is X and the water level data is Y. The simulated generated data is combined into the training data set, the training data is expanded, and the generalization ability of the prediction model is improved.
[0087] Through the data enhancement of the double GAN model, a large amount of simulated rainfall-water level data conforming to the physical law is obtained, which effectively expands the training data set. This provides a solid foundation for subsequent construction of CNN-LSTM hybrid prediction model, which helps the prediction model to learn more rich rainfall-water level relationship and improve the prediction accuracy.
[0088] A CNN-LSTM hybrid prediction model is constructed, which combines the spatial feature extraction ability of CNN and the time series modeling ability of LSTM to realize high-precision prediction of water level. The prediction model structure is as shown in Figure 5 .
[0089] The CNN module is responsible for extracting the spatial features of the rainfall data, and the multi-scale feature fusion is realized through the cooperation of the double branches:
[0090] The first branch adopts a 3x3 standard convolution kernel, focusing on the spatial correlation of local rainfall characteristics, capturing the rainfall interaction between adjacent rainfall stations;
[0091] The second branch adopts a 5x5 hollow convolution kernel, capturing large-scale rainfall spatial heterogeneity, expanding the receptive field, and capturing rainfall distribution patterns in a wider area;
[0092] The dual-branch output is dynamically weighted and fused through the channel attention mechanism, which generates channel statistical descriptors through global average pooling and learns the importance weights of each feature channel through a fully connected layer, finally outputting the weighted fusion features.
[0093] The specific implementation of the channel attention mechanism is as follows:
[0094] Perform global average pooling on the input feature map to generate a channel descriptor vector, which summarizes the spatial information of each channel;
[0095] Learn the nonlinear relationship between channels through two fully connected layers, with the first layer using ReLU activation and the second layer using Sigmoid activation to learn the importance weights of each channel;
[0096] Output the normalized weight vector and multiply it with the original feature map channel by channel to achieve adaptive enhancement and suppression of feature channels, allowing the prediction model to focus on more important spatial features.
[0097] The LSTM module is responsible for modeling the time series characteristics of water level data, using a spatio-temporal attention mechanism that operates in a hierarchical structure:
[0098] The spatial attention layer calculates the feature weights of each rainfall station, dynamically focusing on the rainfall stations that have a greater impact on the current water level prediction based on the nonlinear mapping relationship between the current hidden state and the station features;
[0099] The temporal attention layer calculates the feature weights of historical time points, dynamically focusing on the historical time points that have a greater impact on the current water level prediction based on the correlation strength between the current memory unit and the historical state;
[0100] The weighted spatial-temporal feature vector is used as the input of the LSTM unit, allowing the prediction model to dynamically focus on key stations and key historical time points, improving the accuracy of time series modeling. The calculation expression of the spatial attention weight in the spatio-temporal attention mechanism is as follows:
[0101] ;
[0102] where, is the current time feature vector, , is a learnable parameter, For attention query vectors, the attention weights of each rainfall station are normalized by the softmax function.
[0103] The combination of the multi-scale spatial features extracted by the CNN module and the spatio-temporal attention mechanism modeled by the LSTM module enables the CNN-LSTM hybrid prediction model to comprehensively capture the spatio-temporal complexity of the rainfall-water level relationship. This combination not only improves the processing capability of the prediction model for spatial heterogeneity, but also enhances the modeling accuracy of temporal dependence, providing a more powerful feature representation for water level prediction.
[0104] The constraint formula of the CNN-LSTM hybrid prediction model is as follows:
[0105] ;
[0106] wherein, represents all trainable parameters of the CNN-LSTM network, including convolution kernel weights, LSTM Wi, W_f, W_o, U matrices and biases, fully connected layer weights, etc.; N represents the number of samples in a batch; H represents the prediction step, which is 24 hours in this model; represents the measured downstream water level of the nth sample at the tth prediction time; represents the corresponding prediction value given by the model under the parameters ; , represents the trade-off weight of MSE and MAE, usually =1, ≈0.1~1, wherein MSE and MAE are constrained by the actual water level and the data, which improves the physical constraint ability of the model; represents the L2 weight decay coefficient (regularization) to prevent overfitting, with a typical value of 1e-4~1e-3; represents the sum of squares of all trainable parameters .
[0107] An incremental validation strategy is adopted to validate the prediction model, ensuring its stability and generalization ability under different data environments. The incremental validation strategy is executed in three stages:
[0108] The first stage only uses historical real data for validation, requiring a Nash coefficient ≥0.7 to ensure basic prediction ability and accurately fit historical data;
[0109] The second stage injects 30% simulated data for validation, requiring a Nash coefficient ≥0.75 to test the adaptability of the prediction model to generated data and verify the performance of the prediction model after data enhancement;
[0110] The third stage uses a mixed validation set containing 50% simulated data, and the final Nash coefficient is greater than or equal to 0.8, to verify the generalization ability of the prediction model under extreme data, and to ensure that the prediction model can still maintain stable prediction performance when facing extreme rainfall events.
[0111] Table 1 is the prediction data of the CNN-LSTM model of the application, the prediction data of the traditional model and the measured water level data from 18:00 on July 29, 2025 to 17:00 on July 30, 2025; the results are shown in Figure 6 As shown in the figure, the difference between the prediction results of the prediction model and the measured water level has reached a reasonable error range;
[0112] Table 1: Prediction data and measured data
[0113] Time Traditional model CNN-LSTM Measured 2025 / 7 / 29 18:00 30.04 30.04 30.05 2025 / 7 / 29 19:00 30.23 30.11 30.06 2025 / 7 / 29 20:00 30.9 30.17 30.06 2025 / 7 / 29 21:00 31.34 30.22 30.08 2025 / 7 / 29 22:00 32.07 30.27 30.11 2025 / 7 / 29 23:00 33.13 30.33 30.16 2025 / 7 / 30 0:00 32.73 30.33 30.22 2025 / 7 / 30 1:00 31.46 30.39 30.3 2025 / 7 / 30 2:00 31.53 30.49 30.43 2025 / 7 / 30 3:00 32.4 30.55 30.53 2025 / 7 / 30 4:00 32.41 30.57 30.55 2025 / 7 / 30 5:00 31.07 30.58 30.56 2025 / 7 / 30 6:00 30.94 30.5 30.6 2025 / 7 / 30 7:00 32.05 30.48 30.68 2025 / 7 / 30 8:00 30.85 30.46 30.71 2025 / 7 / 30 9:00 30.65 30.42 30.69 2025 / 7 / 30 10:00 30.64 30.37 30.67 2025 / 7 / 30 11:00 31.02 30.31 30.64 2025 / 7 / 30 12:00 30.87 30.26 30.59 2025 / 7 / 30 13:00 31.19 30.24 30.54 2025 / 7 / 30 14:00 30.87 30.23 30.49 2025 / 7 / 30 15:00 30.3 30.2 30.45 2025 / 7 / 30 16:00 30.22 30.18 30.41 2025 / 7 / 30 17:00 30.35 30.2 30.38
[0114] Due to the rapid change of the environment in the actual scene, the actual prediction section changes with the influence of factors such as the underlying surface. Reconstructing the prediction model has a high cost, so a correction prediction model is added to the output results of the prediction model, which is mainly used to correct the errors of the prediction model in the prediction process, and is often added as an offset after the output of the prediction model. Therefore, after deploying the prediction model for real-time water level prediction, a residual correction mechanism is started when the prediction deviation exceeds a threshold value, and the residual correction mechanism includes:
[0115] When the deviation between the real-time monitoring water level and the predicted water level exceeds 10 cm, a light LSTM correction model is started;
[0116] The correction model inputs the prediction residual sequence of the past 24 hours, and the specific correction process is shown in Figure 7 The correction model is constructed based on the LSTM model, with 2 hidden units and 80 calculation units. The training data is the predicted water level data and the measured water level data, wherein the measured water level data is the target value. Through the training of the correction model, the predicted water level data is continuously close to the measured water level data, so as to achieve the correction ability of the prediction result.
[0117] The final prediction value is corrected according to the following formula:
[0118] ;
[0119] Wherein, is the original prediction value, is the residual prediction value output by the correction model.
[0120] As shown in Figure 8 , it is the prediction water level result of directly using the CNN-LSTM model, as shown in Figure 9 , it is the prediction water level result of the GAN-CNN-LSTM model of the application, from the figure, it can be directly seen that,Figure 9 The fitting degree of the blue prediction curve (the prediction result of the CNN-LSTM model after adding the GAN data) and the yellow real curve (the real water level value) in FIG. 8 is better, especially in the area with large water level change, the prediction curve can more accurately follow the fluctuation of the real curve. While in Figure 8 In FIG. 7, there is some obvious deviation between the prediction curve and the real curve, especially at the peak and valley of the water level.
[0121] Figure 8 The correlation coefficient square R 2 in FIG. 7 is 0.7868162429991967, the Nash efficiency coefficient is 0.7587523907104514, and the BIAS index is 5.26463842592184%, the correlation coefficient square R Figure 9 2 in FIG. 8 is 0.931144173481257, the Nash efficiency coefficient is 0.9243195465232924, and the BIAS index is 4.694567553618245%. It can be seen that after adding the GAN simulated data, the CNN-LSTM model can better capture the change rule in the water level data, the correlation between the prediction result and the real value is stronger, the Nash efficiency coefficient is significantly improved, indicating that after adding the GAN simulated data, the prediction efficiency of the prediction model is greatly improved, and the prediction result is more reliable, the average deviation between the prediction value of the prediction model and the real value is reduced, and the prediction result is closer to the real water level value. After adding the GAN simulated data, the performance of the CNN-LSTM model in water level prediction is significantly improved, including improving the correlation, prediction efficiency and accuracy, and reducing the prediction deviation.
[0122] The above-described embodiments only express several embodiments of the present application, and the description is more specific and detailed, but it cannot be understood as limiting the scope of the patent of the present application. It should be noted that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A deep learning-based small-data small watershed water level prediction method, characterized in that, The method comprises the following steps: acquiring historical hourly rainfall data of multiple rainfall stations upstream of a small watershed and historical hourly water level data of a water level station downstream of the small watershed; preprocessing the acquired data, screening rainfall events with single-hour rainfall exceeding 15 mm within 24 hours and corresponding water level data; performing data augmentation through a double-generation GAN model, a first GAN model generates simulated rainfall data by taking white noise as input, a second GAN model generates simulated water level data by taking rainfall data as input, merging the historical data and the simulated data, normalizing and dividing the data into a training set, a validation set and a test set according to a proportion; constructing a CNN-LSTM hybrid prediction model, training the prediction model by taking the Nash coefficient as an optimization objective, and verifying the prediction model by using a progressive verification strategy; the multi-scale feature fusion of the CNN module in the CNN-LSTM hybrid prediction model is realized through double-branch cooperation: the first branch adopts a 3×3 standard convolution kernel, focusing on the spatial correlation of local rainfall features; the second branch adopts a 5×5 hollow convolution kernel, capturing large-scale rainfall spatial heterogeneity; the outputs of the double branches are dynamically weighted and fused through a channel attention mechanism, the channel attention mechanism generates channel statistical descriptors through global average pooling, learns the importance weights of each feature channel through a fully connected layer, and finally outputs the weighted and fused features; deploying the prediction model to perform real-time water level prediction and obtaining water level prediction results.
2. The method of claim 1, wherein the method is based on deep learning. The generator of the second GAN model adopts a down-sampling-up-sampling symmetric structure to generate simulated water level data, and the generator comprises three down-sampling convolution layers and three up-sampling deconvolution layers; the down-sampling layer adopts a 3×3 convolution kernel with a step of (2, 1), and the number of channels increases from 64 to 256, which is used to gradually compress the spatio-temporal features of the rainfall data; the up-sampling layer adopts a deconvolution kernel with a step of (2, 1), and the number of channels decreases from 256 to 64, which fuses shallow features and deep features through a skip connection to ensure the spatio-temporal continuity of the generated water level sequence; the discriminator adopts a global feature pooling structure, which extracts features through three 3×3 convolution layers and outputs a reality probability through a global maximum pooling layer.
3. The method of claim 1, wherein the method is characterized by, The LSTM module in the CNN-LSTM hybrid prediction model adopts a spatio-temporal attention mechanism, which operates according to a hierarchical structure: the spatial attention layer calculates the feature weights of each rainfall station according to the nonlinear mapping relationship between the current time hidden state and the station features; the temporal attention layer calculates the feature weights of the historical time according to the correlation strength between the current time memory unit and the historical state; the weighted spatial-time feature vector is used as the input of the LSTM unit, so that the prediction model dynamically focuses on key stations and key historical time.
4. The method of claim 1, wherein the method is characterized by, The progressive verification strategy is executed in three stages: the first stage only uses historical real data for verification to ensure the basic prediction ability; the second stage injects 30% simulated data for verification to test the adaptability of the prediction model to generated data; the third stage uses a mixed validation set containing 50% simulated data to verify the generalization ability of the prediction model under extreme data.
5. The method of claim 2, wherein the method is characterized by, The training of the second GAN model introduces a physical constraint loss function: the first constraint term forces the generated rainfall to be non-negative, eliminating non-physical feasible solutions; The second constraint term controls the hourly rainfall peak to approach the 15mm threshold, enhancing the extreme event generation capability; The third constraint term limits the water level change rate within a reasonable range, ensuring that the generated water level conforms to the continuity rules of hydrological process lines.
6. The method of claim 1, wherein the method is based on deep learning. The specific implementation of the channel attention mechanism is as follows: Global average pooling is performed on the input feature map to generate a channel description vector; Two fully connected layers are used to learn the nonlinear relationship between channels, with the first layer using ReLU activation and the second layer using Sigmoid activation; The output normalized weight vector is multiplied with the original feature map channel by channel to achieve adaptive enhancement and suppression of feature channels.
7. The method of claim 3, wherein the method is characterized by, The calculation expression of the spatial attention weight in the spatio-temporal attention mechanism is as follows: ; wherein, is the current time feature vector, , is the learnable parameter, is the attention query vector.
8. The deep learning-based few-data small watershed water level prediction method according to claim 1, wherein, The specific parameters of the progressive verification strategy are as follows: In the first stage, the Nash coefficient is required to be greater than or equal to 0.7; In the second stage, the Nash coefficient is required to be greater than or equal to 0.75; In the third stage, the Nash coefficient is required to be greater than or equal to 0.
8.
9. The deep learning-based few-data small watershed water level prediction method according to claim 1, wherein, After deploying the prediction model for real-time water level prediction, a residual correction mechanism is started when the prediction deviation exceeds a threshold, which includes: When the deviation between the real-time monitoring water level and the predicted water level exceeds 10cm, a lightweight LSTM correction model is started; The correction model inputs the past 24-hour prediction residual sequence; The final prediction value is corrected according to the following formula: ; wherein, is the original prediction value, is the residual prediction value of the correction model output.
Citation Information
Patent Citations
CNN-LSTM convolutional recurrent neural network hydrological forecast correction method based on grid rainfall information
CN115511206A
Supervised time sequence water level data generation method and system and storage medium
CN119623531A