Deep learning-based less-data small-watershed water level forecasting method
By combining a deep learning-based approach with a dual-generation GAN model and a CNN-LSTM hybrid prediction model, the problems of data scarcity and failure to predict extreme events in water level prediction in small watersheds with limited information were solved, achieving high-precision water level prediction and flash flood disaster warning.
Patent Information
- Application Number
- CN202511242783.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-09-02
AI Technical Summary
Traditional hydrological models have problems such as stringent data requirements, high professional barriers, and inability to predict extreme events in small watersheds with little data. Existing improvement plans have problems such as false peaks generated by data augmentation in non-physical models, and ignore spatial characteristics and physical consistency.
A deep learning-based method is used, combined with a dual-generation GAN model for data enhancement, to construct a CNN-LSTM hybrid prediction model. Through a progressive verification strategy and a physical constraint loss function, extreme rainfall-water level data that conforms to hydrological laws is generated, and multi-scale spatiotemporal features are integrated to perform water level prediction.
It 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 support for flash flood disaster warning.
Smart Images

Figure CN120744513A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of small watershed water level forecasting, and in particular to a method for small watershed water level forecasting with little data based on deep learning. Background Art
[0002] Water level forecasting is a key 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. They face serious limitations in small watersheds with little data: high professional barriers: hydrological experts are required to preset watershed parameters (such as infiltration rate and confluence time), and it is difficult to model watersheds without long-term monitoring data; stringent data requirements: complete rainfall-water level data for many years is required; extreme event prediction fails: traditional models rely on linear assumptions, and the prediction error for rainstorms with single-hour rainfall ≥15mm is over 35%, which cannot meet the requirements of flash flood warning.
[0003] While existing improvements (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 non-physically plausible rainfall patterns, leading to "false peaks"; and end-to-end deep learning models (such as single LSTM) ignore the spatial heterogeneity of rainfall across multiple sites, resulting in a 2-3 hour lag in predicting sudden water level changes. Therefore, a water level forecasting method that balances adaptability to limited data with high accuracy for extreme event prediction is urgently needed. Summary of the Invention
[0004] In order to solve the problems of low water level prediction accuracy in small watersheds with little data in the existing technology due to data scarcity and insufficient extreme event samples, as well as the problem of traditional non-mechanistic models ignoring spatial characteristics and physical consistency, the present invention proposes a water level forecasting method for small watersheds with little data based on deep learning.
[0005] The specific technical solution is as follows: A method for water level forecasting in small watersheds with limited data based on deep learning, including:
[0006] Obtain historical hourly rainfall data from multiple rain gauges upstream of the small watershed and historical hourly water level data from water level stations downstream;
[0007] Pre-process the acquired data to filter out rainfall events with hourly rainfall of more than 15 mm within 24 hours and the corresponding water level data;
[0008] Data enhancement is performed using a dual-generative GAN model. The first GAN model uses white noise as input to generate simulated rainfall data, while the second GAN model uses rainfall data as input to generate simulated water level data. The historical data and simulated data are merged, normalized, and then proportionally divided into training, validation, and test sets.
[0009] Construct a CNN-LSTM hybrid prediction model, train the prediction model with the Nash coefficient as the optimization target, and verify the prediction model using a progressive verification strategy;
[0010] Deploy the prediction model to perform real-time water level prediction and obtain water level forecast results.
[0011] Furthermore, the generator of the second GAN model uses a downsampling-upsampling symmetric structure to generate simulated water level data, and the generator includes three downsampling convolution layers and three upsampling deconvolution layers;
[0012] The downsampling layer uses a 3×3 convolution kernel with a stride of (2, 1) and the number of channels increases from 64 to 256 to gradually compress the spatiotemporal features of rainfall data;
[0013] The upsampling layer uses a deconvolution kernel with a stride of (2, 1), and the number of channels decreases from 256 to 64. The shallow and deep features are fused through jump connections to ensure the spatiotemporal continuity of the generated water level sequence.
[0014] The discriminator adopts a global feature pooling structure. After extracting features through three layers of 3×3 convolutional layers, it outputs the authenticity probability through the global maximum pooling layer.
[0015] Furthermore, the multi-scale feature fusion of the CNN module in the CNN-LSTM hybrid prediction model is achieved through dual-branch collaboration:
[0016] The first branch uses a 3×3 standard convolution kernel to focus on the spatial correlation of local rainfall features;
[0017] The second branch uses a 5×5 dilated convolution kernel to capture large-scale rainfall spatial heterogeneity;
[0018] The dual-branch outputs are dynamically weighted and fused through the channel attention mechanism. The channel attention mechanism generates channel statistical descriptors through global average pooling, learns the importance weights of each feature channel through the fully connected layer, and finally outputs the weighted fusion features.
[0019] Furthermore, the LSTM module in the CNN-LSTM hybrid prediction model adopts a spatiotemporal attention mechanism, which operates in a hierarchical structure:
[0020] The spatial attention layer calculates the feature weights of each rainfall station based on the nonlinear mapping relationship between the hidden state at the current moment and the station features;
[0021] The temporal attention layer calculates the feature weights of historical moments based on the strength of the association between the current moment memory unit and the historical state;
[0022] The weighted space-time feature vector is used as the input of the LSTM unit, enabling the prediction model to dynamically focus on key sites and key historical moments.
[0023] Furthermore, the progressive verification strategy is implemented in three stages:
[0024] In the first phase, only historical real data is used for verification to ensure basic forecasting capabilities;
[0025] In the second phase, 30% of simulated data is injected for verification to test the adaptability of the prediction model to the generated data;
[0026] In the third stage, a mixed validation set containing 50% simulated data was used to verify the generalization ability of the prediction model under extreme data.
[0027] Furthermore, the training of the second GAN model introduces a physical constraint loss function:
[0028] The first constraint forces the generated rainfall to be non-negative, eliminating non-physically feasible solutions;
[0029] The second constraint controls the hourly rainfall peak to approach the 15mm threshold, enhancing the ability to generate extreme events;
[0030] The third constraint limits the water level change rate to a reasonable range, ensuring that the generated water level conforms to the continuity law of the hydrological process line.
[0031] Furthermore, 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] The nonlinear relationship between channels is learned through two fully connected layers. The first layer uses ReLU activation and the second layer uses Sigmoid activation.
[0034] The output normalized weight vector is multiplied with the original feature map channel by channel to achieve adaptive enhancement and suppression of feature channels.
[0035] Furthermore, the calculation expression of the spatial attention weight in the spatiotemporal attention mechanism is:
[0036] ;
[0037] in, is the feature vector at the current moment, 、 is a learnable parameter, is the attention query vector.
[0038] Furthermore, the specific parameters of the progressive verification strategy are:
[0039] The first stage requires the Nash coefficient to be ≥ 0.7;
[0040] The second stage requires the Nash coefficient to be ≥ 0.75;
[0041] The third stage requires the Nash coefficient to be ≥ 0.8.
[0042] Furthermore, after the deployment prediction model performs real-time water level prediction, the method further includes: starting a residual correction mechanism when the prediction deviation exceeds a threshold, wherein the residual correction mechanism includes:
[0043] When the deviation between the real-time monitored water level and the predicted water level exceeds 10 cm, the lightweight LSTM correction model is activated;
[0044] The calibration model input is the forecast residual series of the past 24 hours;
[0045] The final predicted value is corrected according to the following formula:
[0046] ;
[0047] in, is the original predicted value, The residual prediction value output by the calibration model.
[0048] The above technical solution has the following advantages or technical effects:
[0049] 1. This invention achieves a breakthrough improvement in the accuracy and reliability of water level prediction for small watersheds with limited data through three core technological innovations: dual GAN physical constraint data augmentation, multi-scale spatiotemporal feature modeling, and a progressive verification strategy. The dual GAN physical constraint data augmentation effectively expands the data samples available for prediction model training, the multi-scale spatiotemporal feature modeling accurately captures the complex spatiotemporal relationships in rainfall and water level data, and the progressive verification strategy ensures the stability and generalization of the prediction model under diverse data environments. These three technologies work synergistically to comprehensively enhance water level prediction performance.
[0050] 2. The GAN generation technology based on physical constraints in this invention can generate extreme rainfall-water level data that is highly consistent with 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 to a reasonable range, thus ensuring the physical feasibility of the generated data. This technology effectively increases the sample size of extreme events and solves the problem of large errors in the prediction of heavy rain events by traditional models. At the same time, the extreme event enhancement mechanism further ensures the proportion of heavy rain samples in the generated data, allowing the prediction model to fully learn the water level change patterns under extreme rainfall conditions, significantly improving the prediction accuracy of the prediction model for extreme rainfall events with single-hour rainfall reaching or exceeding 15 mm, providing more accurate and reliable data support for early warning of flash flood disasters in small watersheds.
[0051] 3. The multi-scale CNN fusion channel attention mechanism employed in this invention excels in extracting spatial features of rainfall at multiple sites. Through its dual-branch collaborative structure, it achieves comprehensive coverage of rainfall spatial features. 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 the dual-branch outputs. This enables the prediction model to adaptively enhance key feature channels and suppress irrelevant feature channels, thereby improving the efficiency of spatial feature extraction for rainfall at multiple sites and reducing the error in weight assignment for key sites. This ensures that the prediction model can more accurately capture the impact of rainfall at different sites on water levels, providing more precise spatial feature information for water level prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 is a flow chart of the method of the present invention;
[0053] Figure 2 is a flow chart of the water level prediction model construction method of the present invention;
[0054] Figure 3 It is a flow chart of the rainfall data simulation model training of the present invention;
[0055] Figure 4 It is a flow chart of water level data simulation model training of the present invention;
[0056] Figure 5 This is the architecture diagram of the CNN-LSTM water level prediction model of the present invention;
[0057] Figure 6 It is a comparison chart of the forecast results of the prediction model of the present invention and the measured water level;
[0058] Figure 7 It is a correction flow chart of the correction model of the present invention;
[0059] Figure 8This is a schematic diagram of the prediction results using only the CNN-LSTM model in the existing technology;
[0060] Figure 9 It is a schematic diagram of the prediction structure of the GAN-CNN-LSTM model in the present invention. DETAILED DESCRIPTION
[0061] In order to make the technical solution of the present invention clearer, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0062] like Figure 1 As shown in the figure, a method for water level forecasting in a small watershed with limited data based on deep learning includes:
[0063] Obtain historical hourly rainfall data from multiple rain gauges upstream of the small watershed and historical hourly water level data from water level stations downstream;
[0064] Pre-process the acquired data to filter out rainfall events with hourly rainfall of more than 15 mm within 24 hours and the corresponding water level data;
[0065] Data enhancement is performed using a dual-generative GAN model. The first GAN model uses white noise as input to generate simulated rainfall data, while the second GAN model uses rainfall data as input to generate simulated water level data. The historical data and simulated data are merged, normalized, and then proportionally divided into training, validation, and test sets.
[0066] Construct a CNN-LSTM hybrid prediction model, train the prediction model with the Nash coefficient as the optimization target, and verify the prediction model using a progressive verification strategy;
[0067] Deploy the prediction model to perform real-time water level prediction and obtain water level forecast results.
[0068] The prediction model building method deployed is as follows Figure 2 As shown in the figure, considering the scarcity of data in small watersheds with limited data, data sources can include ground rain gauges, satellite remote sensing data, and meteorological radar data to capture rainfall information as comprehensively as possible. Hourly rainfall data from 2018 to 2024 can be used. Data preprocessing includes filling missing values with the mean to complete missing records; outliers are replaced with the mean using a moving average to ensure data continuity and stability.
[0069] The first GAN model is a rainfall simulation model, such as Figure 3 As shown in Figure 2, white noise is input in the form of an N*24 matrix, where N is the number of rainfall stations upstream of the small watershed, and 24 is the time interval. The first GAN model outputs an N*24 matrix; the second GAN model is a water level simulation model, as shown in Figure 2. Figure 4As shown, the actual rainfall data is used as input, and the corresponding actual water level data is the model simulation output. The input structure of the second GAN model is N*24 rainfall data, which is consistent with the rainfall simulation model, and the model output structure is 1*24 water level data. Figure 3 、 Figure 4 In the figure, Conv1 and Conv2 represent the first convolutional layer and the second convolutional layer respectively, DeConv1 and DeConv2 represent the first deconvolutional layer and the second deconvolutional layer respectively, Features represents the feature layer, True indicates that the recognition result of the recognition module in the simulation model is real rainfall data, and False indicates that the recognition result of the recognition module in the simulation model is simulated rainfall data. The purpose is to make the generation module in the simulation model generate rainfall data that the recognition module cannot recognize correctly, and the generation module and the recognition module continuously compete with each other to upgrade the generation and recognition capabilities.
[0070] During the training process, historical data with a peak rainfall of 15m within 24 hours and the corresponding water level data are used, focusing on extreme rainfall events that may cause flash floods. In the application stage, white noise is input into the rainfall simulation model, and the model outputs simulated rainfall data. The simulated rainfall data is then input into the water level simulation model to generate the corresponding water level data to form the corresponding training dataset.
[0071] The generator of the second GAN model uses a downsampling-upsampling symmetric structure to generate simulated water level data. The generator contains three downsampling convolution layers and three upsampling deconvolution layers.
[0072] The downsampling layer uses a 3×3 convolution kernel with a stride of (2, 1) and the number of channels increases from 64 to 256 to gradually compress the spatiotemporal features of rainfall data;
[0073] The upsampling layer uses a deconvolution kernel with a stride of (2, 1), and the number of channels decreases from 256 to 64. The shallow and deep features are fused through jump connections to ensure the spatiotemporal continuity of the generated water level sequence.
[0074] The discriminator adopts a global feature pooling structure. After extracting features through three layers of 3×3 convolutional layers, it outputs the authenticity probability through the global maximum pooling layer.
[0075] To ensure the physical feasibility of the generated data, the training of the second GAN model introduces a physical constraint loss function:
[0076] The first constraint forces the generated rainfall to be non-negative, eliminating non-physically feasible solutions;
[0077] The second constraint controls the hourly rainfall peak to approach the 15mm threshold, enhancing the ability to generate extreme events;
[0078] The third constraint limits the water level change rate to a reasonable range, ensuring that the generated water level conforms to the continuity law of the hydrological process line.
[0079] The third constraint adopts the following formula: ;
[0080] Where D(x) is the recognition module, G(z) is the generation module, P is the physical constraint module, and z is the white noise input. G(z) represents the generated rainfall data, D(x) represents the recognition module's judgment on whether the data is generated data, and P(x,v) represents the physical constraint module's reduction of the error of the generated data.
[0081] In principle, the GAN model aims to minimize the error between the G(z) generation module and the actual data, maximize the accuracy of the D(x) recognition module in judging the generated data, and minimize the error of the P physical constraint module.
[0082] Physical constraints are mainly achieved by calculating the error between the generated rainfall data and the historical rainfall distribution, and by calculating the Wasserstein distance. The specific formula is as follows:
[0083] ;
[0084] where x is the rainfall distribution generated by the model and v is the distribution of historical rainfall.
[0085] Normalize the rainfall and water level data to compress the data range between 0 and 1. Split the rainfall and water level data into training, validation, and test datasets in a ratio of 7:1:2, with rainfall data as X and water level data as Y. Merge the simulated dataset into the training dataset to expand the training data and improve the generalization ability of the prediction model.
[0086] Through data augmentation using the dual GAN model, we obtained a large amount of simulated rainfall and water level data that conforms to physical laws, effectively expanding the training dataset. This provided a solid foundation for the subsequent construction of a CNN-LSTM hybrid prediction model, helping the prediction model learn a richer range of rainfall-water level relationships and improve prediction accuracy.
[0087] A CNN-LSTM hybrid prediction model is constructed, combining the spatial feature extraction capability of CNN and the time series modeling capability of LSTM to achieve high-precision water level prediction. The prediction model structure is as follows: Figure 5 As shown, it includes CNN module and LSTM module.
[0088] The CNN module is responsible for extracting the spatial features of rainfall data, and multi-scale feature fusion is achieved through dual-branch collaboration:
[0089] The first branch uses a 3×3 standard convolution kernel to focus on the spatial correlation of local rainfall characteristics and capture the rainfall interaction between adjacent rain gauges;
[0090] The second branch uses a 5×5 dilated convolution kernel to capture the spatial heterogeneity of rainfall over a large area, expand the receptive field, and capture the rainfall distribution pattern in a wider area;
[0091] The dual-branch outputs are dynamically weighted and fused through the channel attention mechanism. The channel attention mechanism generates channel statistical descriptors through global average pooling, learns the importance weights of each feature channel through the fully connected layer, and finally outputs the weighted fusion features.
[0092] The specific implementation of the channel attention mechanism is:
[0093] Perform global average pooling on the input feature map to generate a channel description vector that summarizes the spatial information of each channel;
[0094] The nonlinear relationship between channels is learned through two fully connected layers. The first layer uses ReLU activation and the second layer uses Sigmoid activation to learn the importance weight of each channel.
[0095] The output normalized weight vector is multiplied with the original feature map channel by channel to achieve adaptive enhancement and suppression of feature channels, enabling the prediction model to focus on more important spatial features.
[0096] The LSTM module is responsible for modeling the time series characteristics of water level data, using a spatiotemporal attention mechanism that operates in a hierarchical structure:
[0097] The spatial attention layer calculates the feature weights of each rain gauge and dynamically focuses on the rain gauges that have a greater impact on the current water level forecast based on the nonlinear mapping relationship between the current hidden state and the station features.
[0098] The temporal attention layer calculates the feature weights of historical moments and dynamically focuses on historical moments that have a greater impact on the current water level prediction based on the strength of the association between the current moment memory unit and the historical state.
[0099] The weighted space-time feature vector is used as the input of the LSTM unit, which enables the prediction model to dynamically focus on key sites and key historical moments, improving the accuracy of time series modeling. The calculation expression of the spatial attention weight in the spatiotemporal attention mechanism is:
[0100] ;
[0101] in, is the feature vector at the current moment, 、 is a learnable parameter, is the attention query vector, and the attention weight of each rain gauge is obtained by normalizing it with the softmax function.
[0102] The combination of multi-scale spatial features extracted by the CNN module and the spatiotemporal attention mechanism modeled by the LSTM module enables the CNN-LSTM hybrid prediction model to fully capture the spatiotemporal complexity of the rainfall-water level relationship. This combination not only improves the prediction model's ability to handle spatial heterogeneity but also enhances the accuracy of modeling temporal dependencies, providing a more robust feature representation for water level prediction.
[0103] The constraint formula of the CNN-LSTM hybrid prediction model is as follows:
[0104] ;
[0105] in, Represents all trainable parameters of the CNN-LSTM network, including convolution kernel weights, LSTM Wᵢ, W_f, W_o, U matrices and biases, and fully connected layer weights. N represents the number of samples in a batch. H represents the prediction step size, which is 24 hours for this model. represents the measured downstream water level at the nth sample and tth prediction time; Indicates that the model has parameters The corresponding predicted values are given below; , Indicates the trade-off weight between MSE and MAE, usually =1, ≈0.1~1, where MSE and MAE improve the physical constraint capability of the model by being related to the actual water level and data constraints; 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 .
[0106] A progressive validation strategy is used to validate the prediction model to ensure its stability and generalization ability under different data environments. The progressive validation strategy is implemented in three stages:
[0107] In the first phase, only historical data is used for verification, and the Nash coefficient is required to be ≥ 0.7 to ensure basic forecasting capabilities and to accurately fit historical data;
[0108] In the second stage, 30% of simulated data is injected for verification, requiring the Nash coefficient to be ≥ 0.75, to test the adaptability of the prediction model to the generated data and verify the performance of the prediction model after data augmentation;
[0109] In the third stage, a mixed validation set containing 50% simulated data was used, and the final Nash coefficient was ≥0.8 to verify the generalization ability of the prediction model under extreme data and ensure that the prediction model can maintain stable prediction performance when facing extreme rainfall events.
[0110] Table 1 shows the prediction data of the CNN-LSTM model of the present invention, 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 as follows Figure 6 As shown in the figure, the gap between the prediction results of the prediction model and the measured water level has reached a reasonable error range;
[0111] Table 1: Predicted data and measured data
[0112] time Traditional Model CNN-LSTM Actual measurement 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
[0113] Due to the rapid changes in the environment in real-world scenarios, the actual predicted section changes with the influence of factors such as the underlying surface. Rebuilding the prediction model is costly, so a correction prediction model is added to the prediction model output results. This is mainly used to correct the errors in the prediction model during the forecast process, and is often used as an offset added after the prediction model output. Therefore, after deploying the prediction model for real-time water level prediction, it also includes: when the prediction deviation exceeds the threshold, the residual correction mechanism is activated. The residual correction mechanism includes:
[0114] When the deviation between the real-time monitored water level and the predicted water level exceeds 10 cm, the lightweight LSTM correction model is activated;
[0115] The correction model inputs the forecast residual sequence of the past 24 hours. The specific correction process is as follows Figure 7 As shown in the figure, the correction model is built on the basis of the LSTM model, which has 2 hidden units and 80 computing units. The training data are the predicted water level data and the measured water level data, of which the measured water level data is the target value. Through the correction model training, the predicted water level data is continuously approached to the measured water level data, so as to achieve the correction ability of the prediction results.
[0116] The final predicted value is corrected according to the following formula:
[0117] ;
[0118] in, is the original predicted value, The residual prediction value output by the calibration model.
[0119] like Figure 8 As shown in the figure, the water level prediction result is directly using the CNN-LSTM model, as shown in the figure. Figure 9 As shown in the figure, the water level prediction result of the GAN-CNN-LSTM model of the present invention is shown. It can be seen intuitively from the figure that Figure 9 The blue prediction curve (the prediction result after adding GAN data to the CNN-LSTM model) fits better with the yellow true curve (the actual water level value), especially in areas with large water level fluctuations, where the prediction curve can more accurately follow the fluctuations of the true curve. Figure 8 There are some obvious deviations between the predicted and true curves, especially at the peak and valley values of the water level.
[0120] Figure 8 The squared correlation coefficient R 2 The Nash efficiency coefficient is 0.7587523907104514, and the BIAS index is 5.26463842592184%. Figure 9 The squared correlation coefficient R 2 The Nash efficiency coefficient is 0.931144173481257, the Nash efficiency coefficient is 0.9243195465232924, and the BIAS index is 4.694567553618245%. It can be seen that after the present invention adds GAN simulated data, the CNN-LSTM model can better capture the changing patterns in the water level data, and the correlation between the prediction results and the true values is stronger; the Nash efficiency coefficient is significantly improved, indicating that after adding GAN simulated data, the prediction efficiency of the prediction model has been greatly improved, and the prediction results are more reliable; the average deviation between the predicted values of the prediction model and the true values is reduced, and the prediction results are closer to the true water level value. After adding GAN simulated data, the performance of the CNN-LSTM model in water level prediction has been significantly improved, including improving correlation, prediction efficiency and accuracy, while reducing prediction deviation.
[0121] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
Claims
1. A method for water level forecasting in small watersheds with limited data based on deep learning, characterized in that: include: Obtain historical hourly rainfall data from multiple rain gauges upstream of the small watershed and historical hourly water level data from water level stations downstream; Pre-process the acquired data to filter out rainfall events with hourly rainfall of more than 15 mm within 24 hours and the corresponding water level data; Data enhancement is performed using a dual-generative GAN model. The first GAN model uses white noise as input to generate simulated rainfall data, while the second GAN model uses rainfall data as input to generate simulated water level data. The historical data and simulated data are merged, normalized, and then proportionally divided into training, validation, and test sets. Construct a CNN-LSTM hybrid prediction model, train the prediction model with the Nash coefficient as the optimization target, and verify the prediction model using a progressive verification strategy; Deploy the prediction model to perform real-time water level prediction and obtain water level forecast results.
2. The method for predicting water level in a small watershed with little data based on deep learning according to claim 1, characterized in that: The generator of the second GAN model uses a downsampling-upsampling symmetric structure to generate simulated water level data. The generator includes three downsampling convolution layers and three upsampling deconvolution layers. The downsampling layer uses a 3×3 convolution kernel with a stride of (2, 1) and the number of channels increases from 64 to 256 to gradually compress the spatiotemporal features of rainfall data; The upsampling layer uses a deconvolution kernel with a stride of (2, 1), and the number of channels decreases from 256 to 64. The shallow and deep features are fused through jump connections to ensure the spatiotemporal continuity of the generated water level sequence. The discriminator adopts a global feature pooling structure. After extracting features through three layers of 3×3 convolutional layers, it outputs the authenticity probability through the global maximum pooling layer.
3. The method for predicting water level in a small watershed with little data based on deep learning according to claim 1, characterized in that: The multi-scale feature fusion of the CNN module in the CNN-LSTM hybrid prediction model is achieved through dual-branch collaboration: The first branch uses a 3×3 standard convolution kernel to focus on the spatial correlation of local rainfall features; The second branch uses a 5×5 dilated convolution kernel to capture large-scale rainfall spatial heterogeneity; The dual-branch outputs are dynamically weighted and fused through the channel attention mechanism. The channel attention mechanism generates channel statistical descriptors through global average pooling, learns the importance weights of each feature channel through the fully connected layer, and finally outputs the weighted fusion features.
4. The method for predicting water level in a small watershed with little data based on deep learning according to claim 1, characterized in that: The LSTM module in the CNN-LSTM hybrid prediction model adopts a spatiotemporal attention mechanism, which operates in a hierarchical structure: The spatial attention layer calculates the feature weights of each rainfall station based on the nonlinear mapping relationship between the hidden state at the current moment and the station features; The temporal attention layer calculates the feature weights of historical moments based on the strength of the association between the current moment memory unit and the historical state; The weighted space-time feature vector is used as the input of the LSTM unit, enabling the prediction model to dynamically focus on key sites and key historical moments.
5. The method for predicting water level in a small watershed with little data based on deep learning according to claim 1, characterized in that: The progressive verification strategy is performed in three phases: In the first phase, only historical real data is used for verification to ensure basic forecasting capabilities; In the second phase, 30% of simulated data is injected for verification to test the adaptability of the prediction model to the generated data; In the third stage, a mixed validation set containing 50% simulated data was used to verify the generalization ability of the prediction model under extreme data.
6. The method for predicting water level in a small watershed with little data based on deep learning according to claim 2, characterized in that: The training of the second GAN model introduces a physical constraint loss function: The first constraint forces the generated rainfall to be non-negative, eliminating non-physically feasible solutions; The second constraint controls the hourly rainfall peak to approach the 15mm threshold, enhancing the ability to generate extreme events; The third constraint limits the water level change rate to a reasonable range, ensuring that the generated water level conforms to the continuity law of the hydrological process line.
7. The method for predicting water level in a small watershed with little data based on deep learning according to claim 3, characterized in that: The specific implementation of the channel attention mechanism is: Perform global average pooling on the input feature map to generate a channel description vector; The nonlinear relationship between channels is learned through two fully connected layers. The first layer uses ReLU activation and the second layer uses 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.
8. The method for predicting water level in a small watershed with little data based on deep learning according to claim 4, characterized in that: The calculation expression of the spatial attention weight in the spatiotemporal attention mechanism is: ; in, is the feature vector at the current moment, 、 is a learnable parameter, is the attention query vector.
9. The method for predicting water level in a small watershed with little data based on deep learning according to claim 1, characterized in that: The specific parameters of the progressive verification strategy are: The first stage requires the Nash coefficient to be ≥ 0.7; The second stage requires the Nash coefficient to be ≥ 0.75; The third stage requires the Nash coefficient to be ≥ 0.
8.
10. The method for predicting water level in a small watershed with little data based on deep learning according to claim 1, characterized in that: After the prediction model is deployed to perform real-time water level prediction, the method further includes: starting a residual correction mechanism when the prediction deviation exceeds a threshold, wherein the residual correction mechanism includes: When the deviation between the real-time monitored water level and the predicted water level exceeds 10 cm, the lightweight LSTM correction model is activated; The calibration model input is the forecast residual series of the past 24 hours; The final predicted value is corrected according to the following formula: ; in, is the original predicted value, The residual prediction value output by the calibration model.
Citation Information
Patent Citations
CNN-LSTM convolutional recurrent neural network hydrological forecast correction method based on grid rainfall information
CN115511206A
Soil water content prediction method, device, equipment, medium and program product
CN118569309A
Supervised time sequence water level data generation method and system and storage medium
CN119623531A
Lymph node CT detection system employing recurrent spatio-temporal attention mechanism
WO2020258611A1
Imminent precipitation forecast method and apparatus
WO2023103587A1
Cited By
River section flow prediction method and system based on deep learning
CN121997812A
A Deep Learning-Based Method and System for Predicting River Cross-Sectional Flow
CN121997812B