Drainage basin rainfall runoff prediction method and system based on bidirectional long short-term memory network and multi-source data fusion
Through the method of fusion of BiLSTM-ATT hybrid model and multi-source data, the problem of low accuracy of rainfall runoff prediction in the basin is solved, and more accurate and robust prediction results are achieved, which are suitable for applications such as flood control and water resource scheduling.
Patent Information
- Application Number
- CN202510542838.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-12
AI Technical Summary
In the prior art, the prediction method for rainfall runoff in the basin has problems with low accuracy and one-sided results, especially the LSTM cannot use both forward and reverse information at the same time, resulting in incomplete prediction results.
A hybrid model combining bidirectional long and short-term memory network (BiLSTM) and attention mechanism (ATT) is adopted, and pre-processed with multi-source data, and water balance constraint terms are introduced in MSE losses. Through the dynamic weight transfer learning of data scarce watershed basin, model parameters are optimized, and the optimal watershed rainfall runoff prediction model is constructed.
It improves the accuracy and robustness of the prediction of rainfall runoff in the basin, reduces the prediction error of flood peaks, ensures that the prediction results comply with hydrological laws, and supports rapid cross-basin deployment.
Smart Images

Figure CN120470256A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of basin rainfall runoff prediction, and more particularly to a basin rainfall runoff prediction method and system based on a bidirectional long short-term memory network and multi-source data fusion. Background Art
[0002] Due to the influence of climate change, natural geography, agricultural development, and engineering scheduling, rainfall and runoff in river basins are complex and volatile, bringing significant uncertainty to runoff forecasting. Accurate runoff forecasting is crucial for the rational allocation of water resources, the prediction and scheduling of flood and drought pressure, the scheduling of ecological water use, and maintaining the economic and ecological balance of artificial oases and natural oases.
[0003] The use of manually collected data to predict rainfall and runoff in a watershed is inefficient. With the development of science and technology, artificial intelligence (AI) algorithms have become a tool for solving many complex problems. Among them, deep learning, as an important branch of artificial intelligence, can automatically extract useful information from large amounts of data and learn the inherent laws and characteristic changes of the data by simulating the working mode of the human brain neural network. For example, the hidden layer output h at the current moment in LSTM t and cell state C t is the hidden layer output h of the previous moment t-1 , cell state C t-1 And the current input x t Although LSTM solves the problems of vanishing gradients and long-term dependencies, it can only learn from the previous context of the text and cannot utilize the subsequent context. It cannot simultaneously consider the forward and reverse information of the sequence, nor can it optimize the complementary nature of forward and reverse information. It cannot fully capture the contextual features of the sequence data, resulting in one-sided prediction results and low accuracy in basin rainfall runoff prediction.
[0004] Therefore, how to propose a basin rainfall runoff prediction method and system based on bidirectional long short-term memory network and multi-source data fusion to optimize the current situation of one-sided and low accuracy of traditional basin rainfall runoff prediction results is an urgent problem that technicians in this field need to solve. Summary of the Invention
[0005] In view of this, the present invention provides a basin rainfall runoff prediction method and system based on a bidirectional long short-term memory network and multi-source data fusion, which optimizes the current one-sided and low-accuracy status of traditional basin rainfall runoff prediction results, greatly improves accuracy and robustness, and effectively solves the problem of low accuracy of current basin rainfall runoff prediction methods. To achieve the above objectives, the present invention adopts the following technical solutions:
[0006] A basin rainfall runoff prediction method based on bidirectional long short-term memory network and multi-source data fusion, including:
[0007] Collecting multi-source data of the watershed and preprocessing the multi-source data;
[0008] A basin rainfall-runoff prediction model based on the BiLSTM-ATT hybrid model is constructed according to the preprocessed data;
[0009] The rainfall-runoff prediction model of the watershed is trained and the water balance constraint term is introduced into the MSE loss to optimize the model;
[0010] Conduct dynamic weight transfer learning for models in data-scarce basins. Pre-train the model on similar basin data and fine-tune the model parameters through domain adaptation to obtain the optimal basin rainfall-runoff prediction model.
[0011] Obtain real-time data and input it into the optimal basin rainfall runoff prediction model to obtain prediction results.
[0012] Optionally, collecting multi-source data of the watershed includes collecting meteorological, hydrological and topographic data of the watershed.
[0013] Optionally, the preprocessing of the multi-source data includes data cleaning, data standardization and data segmentation.
[0014] Optionally, the construction of a watershed rainfall runoff prediction model based on a BiLSTM-ATT hybrid model includes: constructing a BiLSTM base model, coupling an ATT module between the forward output of the LSTM and the reverse output of the LSTM, optimizing the forward output with the reverse output at the same moment through the ATT module, passing the obtained time features through a self-attention module to capture long-range time dependencies and obtain an attention feature map, using the attention feature map as the input of the decoder module, and using transposed convolution to perform multi-layer upsampling operations, and performing jump connections between the results obtained from each upsampling layer and the self-attention feature map at the corresponding scale of the encoder part to obtain a trained model.
[0015] Optionally, the introducing a water balance constraint term into the MSE loss to perform model optimization includes: introducing a water balance constraint term into the MSE loss function:
[0016]
[0017] Among them, P i is the rainfall in period i, Q i is the runoff volume in period i, E i is the evaporation amount in the i-th period, ΔS i is the change of soil moisture content in the i-th period, and λ is the weight coefficient.
[0018] Optionally, the dynamic weight transfer learning of the model for the data-scarce watershed, pre-training the model on similar watershed data, and fine-tuning the model parameters through domain adaptive tuning to obtain the optimal watershed rainfall-runoff prediction model, includes:
[0019] By comparing the topography, climatic conditions, and land use characteristics of the watershed, n watersheds similar to the target sub-watershed are selected as source watersheds;
[0020] The BiLSTM-ATT model is pre-trained using multi-source data from the source basin. The number of training rounds is m. During the pre-training process, the model learns the rainfall-runoff patterns and data characteristics of the source basin.
[0021] The pre-trained model parameters are transferred to the target sub-basin model, and domain adaptive fine-tuning is performed using the limited data of the target sub-basin. During the fine-tuning process, a smaller learning rate is set to avoid overfitting. By adjusting the hyperparameters multiple times, the optimal basin rainfall-runoff prediction model is obtained.
[0022] Optionally, the self-attention module includes:
[0023] Represent the output features of each time series as a vector;
[0024] Through linear matrix transformation, the query matrix Q, index matrix K, and value matrix V are created for the feature matrix at each time node, and key-value pairs consisting of the Q and K matrices are created;
[0025] The obtained Q and K are used to calculate the attention value α by dot multiplication, and normalized by softmax. The obtained α and V matrix are used to calculate the output matrix of the self-attention layer corresponding to each feature matrix.
[0026] Optionally, the decoder module includes: using the obtained attention feature map as the input of the decoder module, and upsampling the attention feature map, jump-connecting the upsampling result of each layer with the output of the convolution module at the same resolution in the encoder, and using the result as the input of the next upsampling module to obtain the upsampling result of the next layer, and finally constructing a cross-entropy loss function to evaluate the effect of image segmentation.
[0027] Optionally, it also includes: using multiple indicators to comprehensively evaluate the optimal basin rainfall runoff prediction model, including mean absolute error MAE, determination coefficient R 2 And the root mean square error RMSE:
[0028]
[0029] Where: y iis the true value of the verified data after denoising; is the predicted value; y is the average value of the true value; m is the number of data to be predicted, MAE reflects the actual situation of the prediction error, RMSE evaluates the prediction accuracy, R 2 The statistics used to measure the degree of fit of the model to the data. The smaller the MAE and RMSE parameter values are, the higher the accuracy of the prediction model and the better the prediction effect. 2 The closer it is to 1, the smaller the gap between the predicted value and the actual value.
[0030] Optionally, a basin rainfall runoff prediction system based on a bidirectional long short-term memory network and multi-source data fusion includes:
[0031] Data processing module: used for collecting multi-source data of the watershed and pre-processing the multi-source data;
[0032] Model building module: used to build a basin rainfall runoff prediction model based on the BiLSTM-ATT hybrid model according to the preprocessed data;
[0033] Model optimization module: used for training the basin rainfall runoff prediction model and introducing water balance constraint terms in the MSE loss to optimize the model;
[0034] Transfer learning module: used for dynamic weight transfer learning of models in data-scarce watersheds. The pre-trained model is used on similar watershed data to fine-tune model parameters through domain adaptation to obtain the optimal watershed rainfall-runoff prediction model.
[0035] Prediction module: used to obtain real-time data and input it into the optimal basin rainfall runoff prediction model to obtain prediction results.
[0036] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a method and system for basin rainfall runoff prediction based on a bidirectional long short-term memory network and multi-source data fusion, which has the following beneficial effects:
[0037] This invention proposes a basin rainfall-runoff prediction method based on a bidirectional long-short-term memory network and multi-source data fusion. The method comprises the following steps: collecting multi-source data from the basin and preprocessing the multi-source data; constructing a basin rainfall-runoff prediction model based on a BiLSTM-ATT hybrid model based on the preprocessed data; training the basin rainfall-runoff prediction model and optimizing the model by introducing a water balance constraint term into the MSE loss; performing dynamic weight transfer learning on the model for data-scarce basins, and fine-tuning the model parameters of the pre-trained model on similar basin data through domain adaptation to obtain an optimal basin rainfall-runoff prediction model; acquiring real-time data and inputting it into the optimal basin rainfall-runoff prediction model to obtain prediction results. The present invention reduces the error in flood peak prediction using the BiLSTM-ATT compared to a unidirectional LSTM; ensures that the prediction results conform to hydrological laws through a water balance constraint term; and supports rapid cross-basin deployment through a transfer learning module. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0039] Figure 1 A schematic flow chart of a basin rainfall runoff prediction method based on a bidirectional long short-term memory network and multi-source data fusion is provided in the present invention.
[0040] Figure 2 This is a structural framework diagram of a basin rainfall runoff prediction system based on a bidirectional long short-term memory network and multi-source data fusion provided by the present invention.
[0041] Figure 3 This is a structural diagram of the basin rainfall runoff prediction model based on the BiLSTM-ATT hybrid model provided by the present invention. DETAILED DESCRIPTION
[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0043] The embodiment of the present invention discloses a basin rainfall runoff prediction method based on a bidirectional long short-term memory network and multi-source data fusion, such as Figure 1 As shown, including:
[0044] Collecting multi-source data of the watershed and preprocessing the multi-source data;
[0045] A basin rainfall-runoff prediction model based on the BiLSTM-ATT hybrid model is constructed according to the preprocessed data;
[0046] The rainfall-runoff prediction model of the watershed is trained and the water balance constraint term is introduced into the MSE loss to optimize the model;
[0047] Conduct dynamic weight transfer learning for models in data-scarce basins. Pre-train the model on similar basin data and fine-tune the model parameters through domain adaptation to obtain the optimal basin rainfall-runoff prediction model.
[0048] Obtain real-time data and input it into the optimal basin rainfall runoff prediction model to obtain prediction results.
[0049] Furthermore, collecting multi-source data of the watershed includes collecting meteorological, hydrological and topographic data of the watershed.
[0050] Furthermore, the preprocessing of the multi-source data includes data cleaning, data standardization and data segmentation.
[0051] Further, such as Figure 3 As shown, the construction of a basin rainfall runoff prediction model based on the BiLSTM-ATT hybrid model includes: constructing a BiLSTM base model, coupling an ATT module between the forward output of LSTM and the reverse output of LSTM, optimizing the forward output with the reverse output at the same moment through the ATT module, passing the obtained time features through the self-attention module to capture long-range time dependencies, obtaining an attention feature map, using the attention feature map as the input of the decoder module, and using transposed convolution to perform multi-layer upsampling operations, and performing jump connections between the results obtained by upsampling each layer and the self-attention feature map at the corresponding scale of the encoder part to obtain a trained model.
[0052] Furthermore, in the BiLSTM-ATT model, there are two LSTM gates with opposite directions at each moment. is the forward output of LSTM at time t; is the reverse output of LSTM at time t; h t is the output of BiLSTM at time t; x t is the input at time t. In the BiLSTM model, the state at each moment is calculated as follows:
[0053]
[0054] Here, μ and β are weight parameters, and att represents the attention module operation. The output is determined by the LSTM states in both directions. Therefore, the BiLSTM-ATT model can better utilize the contextual information of the text, thereby improving the model's ability to understand semantics. The attention module better highlights the positive output information. By simultaneously considering the context of the text and the context of the text, the BiLSTM-ATT model can more comprehensively capture the relationship between words, enabling the model to achieve better performance in semantic understanding and related tasks.
[0055] Furthermore, the introduction of a water balance constraint term into the MSE loss for model optimization includes: introducing a water balance constraint term into the MSE loss function:
[0056]
[0057] Among them, P i is the rainfall in period i, Q i is the runoff volume in period i, E i is the evaporation amount in the i-th period, ΔS i is the change of soil moisture content in the i-th period, and λ is the weight coefficient.
[0058] Furthermore, the dynamic weight transfer learning of the model for the data-scarce basin is performed, and the pre-trained model is fine-tuned on the model parameters on similar basin data through domain adaptive tuning to obtain the optimal basin rainfall runoff prediction model, including:
[0059] By comparing the topography, climatic conditions, and land use characteristics of the watershed, n watersheds similar to the target sub-watershed are selected as source watersheds;
[0060] The BiLSTM-ATT model is pre-trained using multi-source data from the source basin. The number of training rounds is m. During the pre-training process, the model learns the rainfall-runoff patterns and data characteristics of the source basin.
[0061] The pre-trained model parameters are transferred to the target sub-basin model, and domain adaptive fine-tuning is performed using the limited data of the target sub-basin. During the fine-tuning process, a smaller learning rate is set to avoid overfitting. By adjusting the hyperparameters multiple times, the optimal basin rainfall-runoff prediction model is obtained.
[0062] Furthermore, the self-attention module includes:
[0063] Represent the output features of each time series as a vector;
[0064] Through linear matrix transformation, the query matrix Q, index matrix K, and value matrix V are created for the feature matrix at each time node, and key-value pairs consisting of the Q and K matrices are created;
[0065] The obtained Q and K are used to calculate the attention value α by dot multiplication, and normalized by softmax. The obtained α and V matrix are used to calculate the output matrix of the self-attention layer corresponding to each feature matrix.
[0066] In a specific embodiment, the original time feature H t Through the self-attention module, long-range temporal dependencies are captured, and the attention feature maps are obtained with dimensions of 256×256×32, 128×128×64, 64×64×128, 32×32×256, and 16×16×512 respectively.
[0067]
[0068] The output features of each time series are expressed as a vector:
[0069]
[0070] Through linear matrix transformation, a query matrix Q, an index matrix K, and a value matrix V are created for the feature matrix at each time node, and a key-value pair consisting of the Q and K matrices is created.
[0071] Q=W Q Y;
[0072] K=W K Y;
[0073] V=W V Y;
[0074] The obtained Q and K are used to calculate the attention value α by dot multiplication, and then normalized by softmax. The obtained α and V matrix are used to calculate the output matrix of the self-attention layer corresponding to each feature matrix:
[0075]
[0076] Furthermore, the decoder module includes: using the obtained attention feature map as the input of the decoder module, and upsampling the attention feature map, jump-connecting the upsampling result of each layer with the output of the convolution module at the same resolution in the encoder, and using the result as the input of the next upsampling module to obtain the upsampling result of the next layer, and finally constructing a cross-entropy loss function to evaluate the effect of image segmentation.
[0077] Furthermore, it also includes: using multiple indicators to comprehensively evaluate the optimal basin rainfall runoff prediction model, including mean absolute error MAE, determination coefficient R 2And the root mean square error RMSE:
[0078]
[0079]
[0080] Where: y i is the true value of the verified data after denoising; is the predicted value; y is the average value of the true value; m is the number of data to be predicted, MAE reflects the actual situation of the prediction error, RMSE evaluates the prediction accuracy, R 2 The statistics used to measure the degree of fit of the model to the data. The smaller the MAE and RMSE parameter values are, the higher the accuracy of the prediction model and the better the prediction effect. 2 The closer it is to 1, the smaller the gap between the predicted value and the actual value.
[0081] In a specific embodiment, a basin rainfall runoff prediction system based on bidirectional long short-term memory network and multi-source data fusion is provided. Figure 2 Shown, including:
[0082] Data processing module: used for collecting multi-source data of the watershed and pre-processing the multi-source data;
[0083] Model building module: used to build a basin rainfall runoff prediction model based on the BiLSTM-ATT hybrid model according to the preprocessed data;
[0084] Model optimization module: used for training the basin rainfall runoff prediction model and introducing water balance constraint terms in the MSE loss to optimize the model;
[0085] Transfer learning module: used for dynamic weight transfer learning of models in data-scarce watersheds. The pre-trained model is used on similar watershed data to fine-tune model parameters through domain adaptation to obtain the optimal watershed rainfall-runoff prediction model.
[0086] Prediction module: used to obtain real-time data and input it into the optimal basin rainfall runoff prediction model to obtain prediction results.
[0087] In a specific implementation, a basin rainfall runoff prediction method based on a bidirectional long short-term memory network and multi-source data fusion is used. A sub-basin of the Yangtze River Basin (with an area of approximately 500 square kilometers) is used as the research object. The implementation process of this technical solution is described in detail. The specific steps are as follows:
[0088] 1. Multi-source data collection and preprocessing
[0089] (1) Data collection
[0090] Meteorological Data: Hourly rainfall, temperature, humidity, wind speed, and air pressure data for the past 10 years are collected from three automatic weather stations within the sub-basin and five national-level meteorological stations within a 50-kilometer radius. For example, from 2020 to 2024, each weather station can collect 24 data points per day, covering multiple meteorological indicators.
[0091] Hydrological Data: Hydrological monitoring sections were established at the outlets of the sub-basins, using ultrasonic water level meters and electromagnetic flow meters to collect hourly water level and flow data for the past 10 years. Manual measurement and calibration were also performed monthly to ensure data accuracy.
[0092] Topographic data: Using high-precision satellite remote sensing images (resolution 0.5 meters) and drone aerial surveys, we obtain geospatial data such as the digital elevation model (DEM) of the sub-basin, land use types (such as forest land, cultivated land, construction land, etc.), and soil types (based on soil census data).
[0093] (2) Data preprocessing
[0094] Data cleaning: Abnormal data from meteorological and hydrological stations due to equipment failures were eliminated. For example, a hydrological station recorded a sudden change in flow on July 15, 2022. After verification, the data for that period was deleted. Missing data was filled using time series interpolation. For example, if a meteorological station had two hours of missing rainfall data, linear interpolation was performed using the rainfall data from the preceding and following periods. Time series alignment was performed, matching multi-source data using timestamps, and missing values were interpolated using the spatiotemporal KNN method.
[0095] Data normalization: Normalization is used to uniformly map all data to the interval [0, 1] to eliminate dimensional differences between different data dimensions. For example, if the maximum rainfall value is 300 mm and the minimum is 0 mm, the normalized value of the rainfall x at a certain moment is (x - 0) / (300 - 0).
[0096] Data Split: The processed data is divided into training, validation, and test sets in a ratio of 7:2:1. The training set is used for model training, the validation set is used to adjust model hyperparameters, and the test set is used to evaluate the model's generalization ability.
[0097] 2. Construction of a basin rainfall runoff prediction model based on the BiLSTM-ATT hybrid model
[0098] (1) Model architecture design
[0099] BiLSTM layer: A two-layer bidirectional long short-term memory (BiLSTM) network is used, with each layer containing 128 neurons. BiLSTM can simultaneously learn both forward and backward information in a time series, effectively capturing long-term dependencies in rainfall runoff. For example, the first BiLSTM layer learns trends from past rainfall data, while the second BiLSTM layer acquires information from future rainfall data, comprehensively considering contextual factors.
[0100] Attention Mechanism (ATT) Layer: An attention mechanism layer is added between the forward and reverse outputs of the LSTM. The ATT module optimizes the forward output with the reverse output at the same moment. By calculating attention weights at different time steps, it highlights key periods that have a significant impact on rainfall runoff. For example, the attention mechanism assigns higher weights to the periods before and after a rainstorm, allowing the model to focus more on this important information.
[0101] Self-attention layer: The obtained temporal features are passed through the self-attention module to capture long-range temporal dependencies and obtain an attention feature map.
[0102] Output layer: A fully connected layer is used as the output layer, and the attention feature map is used as the input of the decoder module. Transposed convolution is used for multi-layer upsampling. The result of each upsampling layer is skip-connected with the self-attention feature map at the corresponding scale in the encoder part to obtain the trained model. The output of the BiLSTM-ATT layer is mapped to a single predicted value, namely the predicted runoff flow.
[0103] 3. Model Training and Optimization
[0104] (1) Model training
[0105] Input the training set into the constructed BiLSTM-ATT model, set the number of training epochs (epochs) to 100, the batch size (batch_size) to 32, and train the model using the stochastic gradient descent algorithm. During training, record the training loss and validation loss for each epoch, plot the loss curve, and observe the model's convergence.
[0106] (II) Introducing water balance constraint optimization Introducing water balance constraint into the mean square error (MSE) loss function, the specific formula is:
[0107]
[0108] Among them, P i is the rainfall in period i, Q i is the runoff volume in period i, E i is the evaporation amount in the i-th period, ΔS iis the change in soil moisture content during the i-th period, and λ is the weight coefficient (determined through cross-validation; in this embodiment, λ = 0.1). The model is retrained to make the model more consistent with the water balance principle of the basin during the prediction process, thereby improving prediction accuracy.
[0109] 4. Model Dynamic Weight Transfer Learning in Data-Scarce Watersheds
[0110] (1) Selection of similar watersheds
[0111] By comparing basin topography, climate, and land use, three basins similar to the target sub-basin were selected as source basins. For example, the difference in average annual rainfall between source basin A and the target sub-basin was within 10%, the topography slope was similar, and the proportion of forest land in both basins was approximately 40%.
[0112] (2) Pre-training and fine-tuning
[0113] Pre-training: The BiLSTM-ATT model is pre-trained using multi-source data from the source basin, with 50 training rounds. During pre-training, the model learns the rainfall-runoff patterns and data characteristics of the source basin.
[0114] Fine-tuning: Transfer the pre-trained model parameters to the target sub-basin model and perform domain-adaptive fine-tuning using limited data from the target sub-basin (in this example, data from the last three years of the target sub-basin is used). During fine-tuning, a small learning rate (e.g., 0.001) is set to avoid overfitting. By adjusting the hyperparameters multiple times, the optimal basin-wide rainfall-runoff prediction model is obtained.
[0115] 5. Real-time prediction
[0116] Within the target sub-basin, IoT devices collect real-time meteorological and hydrological data, including hourly rainfall, temperature, and water levels. After cleaning and standardizing the real-time data according to preprocessing steps, it is fed into an optimized basin-wide rainfall-runoff prediction model, derived through optimization and transfer learning. The model then outputs a 12-hour runoff forecast, providing a basis for decision-making on flood control and water resource allocation. If the model predicts that runoff will exceed the warning level within the next six hours, relevant departments can take preemptive measures, such as opening floodgates and evacuating residents in low-lying areas.
[0117] 6. Quantitative Evaluation
[0118] Finally, in this embodiment, the precision, recall, and F1-Score evaluation indicators are selected to quantitatively evaluate the segmentation results of the model of the present invention:
[0119]
[0120] TP indicates that the true label is a positive example and the predicted result is a positive example; FP indicates that the true label is a negative example and the predicted result is a positive example; and FN indicates that the true label is a positive example and the predicted result is a negative example. After model training, the precision, recall, and F1 score of the basin rainfall runoff prediction using this embodiment model were 90.21%, 91.53%, and 88.76%, respectively. This significantly improves accuracy and robustness, effectively addressing the low accuracy of current basin rainfall runoff prediction methods.
[0121] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0122] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A basin rainfall runoff prediction method based on bidirectional long short-term memory network and multi-source data fusion, characterized by: include: Collecting multi-source data of the watershed and preprocessing the multi-source data; A basin rainfall-runoff prediction model based on the BiLSTM-ATT hybrid model is constructed according to the preprocessed data; The rainfall-runoff prediction model of the watershed is trained and the water balance constraint term is introduced into the MSE loss to optimize the model; Conduct dynamic weight transfer learning for models in data-scarce basins. Pre-train the model on similar basin data and fine-tune the model parameters through domain adaptation to obtain the optimal basin rainfall-runoff prediction model. Obtain real-time data and input it into the optimal basin rainfall runoff prediction model to obtain prediction results.
2. The basin rainfall runoff prediction method based on bidirectional long short-term memory network and multi-source data fusion according to claim 1 is characterized in that: The collecting of multi-source data of the river basin includes collecting meteorological, hydrological and topographic data of the river basin.
3. The basin rainfall runoff prediction method based on bidirectional long short-term memory network and multi-source data fusion according to claim 1 is characterized in that: The preprocessing of the multi-source data includes data cleaning, data standardization and data segmentation.
4. The basin rainfall runoff prediction method based on bidirectional long short-term memory network and multi-source data fusion according to claim 1 is characterized in that: The method comprises the following steps: constructing a BiLSTM base model, coupling an ATT module between the forward output of the LSTM and the reverse output of the LSTM, optimizing the forward output with the reverse output at the same moment through the ATT module, passing the obtained time features through a self-attention module to capture long-range time dependencies and obtain an attention feature map, using the attention feature map as the input of a decoder module, performing multi-layer upsampling operations using transposed convolution, performing jump connections between the results obtained from each upsampling layer and the self-attention feature map at the corresponding scale of the encoder part, and obtaining a trained model.
5. The basin rainfall runoff prediction method based on bidirectional long short-term memory network and multi-source data fusion according to claim 1 is characterized in that: The method of introducing a water balance constraint term into the MSE loss to perform model optimization includes: introducing a water balance constraint term into the MSE loss function: Among them, P i is the rainfall in period i, Q i is the runoff volume in period i, E i is the evaporation amount in the i-th period, ΔS i is the change of soil moisture content in the i-th period, and λ is the weight coefficient.
6. The basin rainfall runoff prediction method based on bidirectional long short-term memory network and multi-source data fusion according to claim 1 is characterized in that: The dynamic weight transfer learning of the model for data-scarce basins is performed. The pre-trained model is fine-tuned on similar basin data through domain adaptive model parameters to obtain the optimal basin rainfall runoff prediction model. By comparing the topography, climatic conditions, and land use characteristics of the watershed, n watersheds similar to the target sub-watershed are selected as source watersheds; The BiLSTM-ATT model is pre-trained using multi-source data from the source basin. The number of training rounds is m. During the pre-training process, the model learns the rainfall-runoff patterns and data characteristics of the source basin. The pre-trained model parameters are transferred to the target sub-basin model, and domain adaptive fine-tuning is performed using the limited data of the target sub-basin. During the fine-tuning process, a smaller learning rate is set to avoid overfitting. By adjusting the hyperparameters multiple times, the optimal basin rainfall-runoff prediction model is obtained.
7. The basin rainfall runoff prediction method based on bidirectional long short-term memory network and multi-source data fusion according to claim 4 is characterized in that: The self-attention module includes: Represent the output features of each time series as a vector; Through linear matrix transformation, the query matrix Q, index matrix K, and value matrix V are created for the feature matrix at each time node, and key-value pairs consisting of the Q and K matrices are created; The obtained Q and K are used to calculate the attention value α by dot multiplication, and normalized by softmax. The obtained α and V matrix are used to calculate the output matrix of the self-attention layer corresponding to each feature matrix.
8. The basin rainfall runoff prediction method based on bidirectional long short-term memory network and multi-source data fusion according to claim 4 is characterized in that: The decoder module includes: taking the obtained attention feature map as the input of the decoder module, upsampling the attention feature map, skipping the upsampling result of each layer with the output of the convolution module at the same resolution in the encoder, and taking the result as the input of the next upsampling module to obtain the upsampling result of the next layer, and finally constructing a cross entropy loss function to evaluate the effect of image segmentation.
9. The basin rainfall runoff prediction method based on bidirectional long short-term memory network and multi-source data fusion according to claim 1 is characterized in that: Also includes: The optimal basin rainfall runoff prediction model was comprehensively evaluated using multiple indicators, including mean absolute error (MAE), determination coefficient (R) and 2 And the root mean square error RMSE: Where: y i is the true value of the verified data after denoising; is the predicted value; y is the average value of the true value; m is the number of data to be predicted, MAE reflects the actual situation of the prediction error, RMSE evaluates the prediction accuracy, R 2 The statistics used to measure the degree of fit of the model to the data. The smaller the MAE and RMSE parameter values are, the higher the accuracy of the prediction model and the better the prediction effect. 2 The closer it is to 1, the smaller the gap between the predicted value and the actual value.
10. A basin rainfall runoff prediction system based on bidirectional long short-term memory network and multi-source data fusion, characterized by: include: Data processing module: used for collecting multi-source data of the watershed and pre-processing the multi-source data; Model building module: used to build a basin rainfall runoff prediction model based on the BiLSTM-ATT hybrid model according to the preprocessed data; Model optimization module: used for training the basin rainfall runoff prediction model and introducing water balance constraint terms in the MSE loss to optimize the model; Transfer learning module: used for dynamic weight transfer learning of models in data-scarce watersheds. The pre-trained model is used on similar watershed data to fine-tune model parameters through domain adaptation to obtain the optimal watershed rainfall-runoff prediction model. Prediction module: used to obtain real-time data and input it into the optimal basin rainfall runoff prediction model to obtain prediction results.
Citation Information
Cited By
Precipitation runoff time sequence simulation method based on pre-training-fine tuning
CN121434996A
Snow melting runoff prediction method and system based on direct measurement of snow water equivalent
CN121558131A
SA-BiLSTM-based snow melting runoff simulation method
CN121659762A
Water resource climate influence assessment system and method
CN121705665A