A pre-training-fine-tuning-based precipitation runoff time series simulation method
By constructing a consistent hydro-meteorological dataset and an LSTM runoff prediction model that are pre-trained in multiple global watersheds and fine-tuned in target watersheds, the problems of high modeling cost and strong dependence on long-term observation in traditional methods are solved, and high-precision prediction and rapid adaptation are achieved in data-scarce areas.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-03-24
AI Technical Summary
Traditional precipitation-runoff modeling typically requires independent training for a single watershed, resulting in high modeling costs and a strong dependence on long-term continuous runoff observations of the target watershed. Furthermore, data-driven methods do not perform well in watersheds lacking runoff observation data.
A consistent hydro-meteorological dataset is constructed for global multi-basin pre-training and target basin fine-tuning. An LSTM runoff prediction model is used for global multi-basin pre-training. The base model parameters are transferred to the target basin and fine-tuned to achieve lightweight local adaptation.
It improves prediction accuracy and cross-regional generalization ability in areas with scarce data, reduces modeling and training costs, and facilitates rapid deployment.
Smart Images

Figure CN121434996B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of hydrological simulation and relates to a precipitation-runoff time series simulation method based on pre-training and fine-tuning, and more particularly to a deep learning precipitation-runoff time series simulation method based on pre-training and fine-tuning. Background Technology
[0002] Precipitation-runoff modeling refers to the process of converting precipitation processes into time-varying runoff at river outlets using meteorological inputs such as precipitation and watershed characteristics, through physical or data-driven models, for calculation and prediction. It is used in flood forecasting, reservoir scheduling, and water resource management.
[0003] In recent years, data-driven methods have developed rapidly. Recurrent Neural Networks (RNNs), represented by Long Short-Term Memory (LSTM) networks, have alleviated the gradient vanishing and exploding problems of traditional RNNs through gated memory mechanisms. Furthermore, they possess a stronger ability to characterize nonlinear relationships compared to process-driven physical models, achieving good results in multi-basin runoff simulation. However, in watersheds lacking runoff observation data or with short observation periods and numerous missing measurements, continuous flow observation samples suitable for supervised learning are scarce. Relying solely on a small number of labels makes it difficult to stably learn reliable precipitation-runoff response relationships, resulting in poor simulation performance of data-driven methods in such watersheds.
[0004] To address the above issues, scholars both domestically and internationally have conducted extensive research. For example, Chinese invention patent (application number 202211139881.6) provides a rainfall-runoff forecasting method applicable to data-scarce areas. It selects several data-rich reference watersheds around the target area and, based on static characteristics such as rainfall, runoff, climate, vegetation, topography, and soil, establishes statistical relationships between model parameters and watershed attributes within the framework of a classic rainfall-runoff model. These relationships are then extrapolated to data-scarce watersheds for parameter estimation and forecasting. Another Chinese invention patent (application number 202410963373.2) provides a data-scarce watershed runoff prediction method based on two-layer LSTM transfer learning. It jointly trains a two-layer LSTM model at multiple sites in the study area and selects source watersheds with similar characteristics to the target data-scarce watershed through similarity metrics. The trained model parameters are then transferred to runoff prediction in high-altitude, cold, and data-scarce areas. Existing technical solutions typically only build models within the target watershed and a few surrounding watersheds with available data. They do not integrate multi-basin hydrological and meteorological data and static watershed attribute data at a global or cross-hydrological and climatic scale. The potential value of cross-regional large-sample information in runoff forecasting for data-scarce watersheds has not yet been fully utilized. Summary of the Invention
[0005] This invention addresses the problems of traditional precipitation-runoff modeling, which typically requires independent training for a single watershed, resulting in high modeling costs and strong dependence on long-term continuous runoff observations of the target watershed. It proposes a pre-training-fine-tuning-based precipitation-runoff time series simulation method, comprising: constructing a consistent hydro-meteorological dataset for global multi-watershed pre-training and target watershed fine-tuning; constructing an LSTM runoff prediction model; performing global multi-watershed pre-training to obtain base model parameter weights; transferring the base model parameter weights to the target watershed and freezing the LSTM network layer parameters, fine-tuning only the regression output layer; and testing and evaluating the model in the target watershed. This invention first learns transferable hydrological responses on a large sample of global multi-watershed data, and then performs lightweight fine-tuning in the target watershed, effectively improving prediction accuracy and cross-regional generalization ability in data-scarce areas, and facilitating rapid deployment.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] A precipitation-runoff time series simulation method based on pre-training and fine-tuning includes the following steps:
[0008] Step 1: Construct a consistent hydrometeorological dataset for global multi-basin pre-training and target basin fine-tuning; specifically:
[0009] Step 1.1: Obtain runoff observation time series and corresponding watershed polygons for multiple watersheds covering multiple hydroclimatic zones globally; and obtain the runoff observation time series and corresponding watershed polygons for the target watershed; define... For the set of all watershed identifiers, , It represents the watershed identifier for any watershed and establishes a one-to-one correspondence between watershed polygons and runoff observation time series based on the watershed identifier; it labels each watershed as a "pre-training watershed" or "target watershed" according to its data purpose; and the sets of all watershed identifiers for the pre-training watershed and the target watershed are independent of each other;
[0010] Step 1.2: Extract static watershed attributes from the static raster product; based on the watershed polygons obtained in Step 1.1, perform area-weighted partitioning statistics on the static raster data according to the watershed polygons under a unified projection coordinate system to obtain statistical values of the static watershed attribute variables at the watershed scale for each watershed; wherein, the statistical values include weighted average statistical values and weighted summation statistical values; specifically:
[0011] Let any watershed polygon be , assuming The set of grid cells that have spatial overlap and valid values is Define the overlap area between the grid cell and the watershed polygon. for:
[0012] (1)
[0013] And define the raster cell coverage fraction for:
[0014] (2)
[0015] in, Represents the area operator; The area of the watershed polygon; For raster cell indexing;
[0016] Let the set of static watershed attribute variables be... ,in It is a positive integer. For static watershed attribute variable index, Indicates the first A static watershed attribute variable. Raster cell. In the The values of the static watershed attribute variables are denoted as follows: .
[0017] Furthermore, the static watershed attribute variables at the watershed scale are classified into two categories according to statistical caliber: mean or proportion attribute variables and total quantity attribute variables. The static watershed attribute variables at least include mean or proportion attribute variables, and optionally further include total quantity attribute variables; specifically:
[0018] The mean or proportion attribute variables refer to raster cells whose values are intensity or proportion (such as multi-year average precipitation, multi-year average temperature, land use ratio, etc.), using overlapping area. The weights are used for weighted regional statistics to obtain the weighted average statistical value of the mean or proportion of static watershed attribute variables. As shown in formula (3);
[0019] The total quantity attribute variable refers to the raster cell value being a total or cumulative amount (such as total population, total GDP, total irrigated area, etc.), using the raster cell coverage score. The weights are used for weighted summation to obtain the weighted summation statistics of the total static watershed attribute variables. As shown in formula (4);
[0020] (3)
[0021] (4)
[0022] in, The effective set after removing missing grid cells; For raster cell indexing; This represents the overlap area between the grid cell and the watershed polygon; Raster cell coverage score; For grid cells In the The values of the static watershed attribute variables; Representing watershed polygons Upper The area-weighted average statistical value of static watershed attribute variables of mean or proportion; Representing watershed polygons Upper The weighted summation statistics of static watershed attribute variables of total quantity category;
[0023] The weighted average statistical value of static watershed attribute variables such as mean or proportion Index and store the watershed identifiers determined in step 1.1; and optionally, record and store the weighted summation statistics of the total static watershed attribute variables. The watershed identifiers determined in step 1.1 are indexed, recorded, and stored to form a set of static watershed attributes at the watershed scale that corresponds one-to-one with the watershed identifiers; wherein, the set of static watershed attributes includes at least the statistical results of mean or proportion attribute variables, and optionally further includes the statistical results of total quantity attribute variables.
[0024] Furthermore, the static raster products in step 1.2 include at least: potential evapotranspiration and drought index raster products, climate statistics raster products, land use and cover raster products, soil property raster products, and socio-economic and human activity intensity raster products; the static watershed attribute variables in step 1.2 include at least: potential evapotranspiration and drought index indicators, actual evapotranspiration and soil moisture correlation indicators, multi-year average precipitation and multi-year average temperature indicators, land use and cover type or proportion indicators, soil organic carbon indicators, and soil sand, silt, and clay content indicators. The static raster product may include indicators such as nighttime light intensity, cultivated land ratio and pasture ratio, and GDP. In optional embodiments, the static raster product may further include: digital elevation model raster product and its derived topographic factor raster product, geological or hydrogeological raster product, and other socio-economic or human activity intensity raster product. Correspondingly, the static watershed attribute variables may further include: topographic indicators such as elevation, slope, aspect, and topographic relief, geological or hydrogeological type indicators, and one or more of human activity intensity indicators such as population density and road density.
[0025] Step 1.3: Extract the average dynamic meteorological driving time series from the meteorological raster product; based on the watershed identifier and corresponding watershed polygon determined in Step 1.1, perform weighted partitioning statistics on the values of each raster cell in a unified projected coordinate system according to the overlap area between each raster cell and the watershed polygon; specifically:
[0026] Let any watershed polygon be Let the watershed polygon be... The set of grid cells that have spatial overlap and valid values is Let the set of dynamic meteorological driving variables be... ,in It is a positive integer not less than 2. For variable index, Indicates the first One dynamic meteorological driving variable; raster unit At time step The The values of the dynamic meteorological driving variables are denoted as follows: Define the overlap area between the grid cell and the watershed polygon. As shown in formula (1), then at time step watershed polygon The corresponding number The area-weighted average statistical value of the dynamic meteorological driving variables is shown in formula (5):
[0027] (5)
[0028] in, The effective set after removing missing grid cells; This represents the overlap area between the grid cell and the watershed polygon; For grid cells At time step The The values of the dynamic meteorological driving variables;
[0029] Subsequently, for each time step of Arranged chronologically and with missing values removed, the corresponding basin-averaged dynamic meteorological driving time series were obtained; The above process is performed on each dynamic meteorological driving variable, and the resulting time series are aggregated to obtain a basin-averaged dynamic meteorological driving time series set.
[0030] Further, in step 1.3, the meteorological raster product is an atmospheric reanalysis raster data product or a satellite remote sensing inversion raster data product. The dynamic meteorological driving variables include at least precipitation and temperature, and the average dynamic meteorological driving time series set includes at least an average precipitation time series and an average temperature time series; in optional embodiments, it may further include one or more of potential evapotranspiration, wind speed, radiation, and air pressure; the basin-wide average dynamic meteorological driving time series is the basin-wide average value sequence of the dynamic meteorological driving variables corresponding to each basin identifier at each time step;
[0031] Step 1.4, Construction and partitioning of a consistent hydrometeorological dataset: Based on steps 1.2 and 1.3, the static watershed attribute set at the watershed scale and the watershed average dynamic meteorological driving time series set for each watershed are obtained respectively. The watershed average dynamic meteorological driving time series set and the runoff observation time series obtained in step 1.1 are then time zone unified and time-aligned according to a unified time step under a unified time reference. Combined with unit unification and missing value processing, sample data with watershed identifier as the first-level index and time step as the second-level index are formed, constituting a consistent hydrometeorological dataset; wherein, the time reference is one of the local time zone or Coordinated Universal Time (UTC).
[0032] Based on the usage labels recorded in step 1.1, the consistent hydro-meteorological dataset is divided and organized according to the watershed identifier index to obtain the global multi-watershed dataset and the target watershed dataset; wherein, the global multi-watershed dataset consists of watershed samples with usage labels as pre-trained watersheds, and the target watershed dataset consists of watershed samples with usage labels as target watersheds.
[0033] Step 2: Construct an LSTM runoff prediction model based on the consistent hydro-meteorological dataset obtained in Step 1. The LSTM runoff prediction model is designed for any watershed identifier. Multi-basin joint training is performed on samples and model parameters are shared; specifically:
[0034] Step 2.1, Input Preparation and Feature Concatenation: For any watershed identifier Regarding The corresponding static watershed attribute set is standardized to obtain static feature vectors. ; Regarding The corresponding basin-average dynamic meteorological driving time series set is standardized by time step, and a dynamic feature vector is obtained at each time step. ; at each time step ,Will The features are concatenated along the feature dimension and used as the feature vector input to the LSTM runoff prediction model, as shown in formula (6):
[0035] (6)
[0036] in, Indicates time step Input the feature vector of the LSTM runoff prediction model; This represents a vector concatenation operation along the feature dimension; This represents the total number of time steps.
[0037] Step 2.2, Constructing the LSTM runoff prediction model: The LSTM network layer module is called within the deep learning framework to implement the LSTM runoff prediction model; the number of LSTM network layers in the LSTM runoff prediction model is set to... The number of hidden units is set to ; at each time step The LSTM runoff prediction model uses feature vectors and the hidden state of the previous time step and cell state For input, first calculate the forget gate according to formula (7) and formula (8) respectively. Input gate And calculate the candidate cell state according to formula (9). The cell state was then updated according to formula (10) to obtain the result. Then calculate the output gate according to formula (11). And obtain the hidden state according to formula (12). The hidden state As a time step The timing representation is processed by the output layer to obtain the time steps. Runoff simulation values Further, the output layer is a regression output layer; in an optional embodiment, the regression output layer is a linear regression output layer, as shown in formula (13);
[0038] Forgotten Gate: (7)
[0039] Input Gate: (8)
[0040] Candidate cell status: (9)
[0041] Update cell status: (10)
[0042] Output gate: (11)
[0043] Hidden state: (12)
[0044] Output layer: (13)
[0045] in, For the Sigmoid function, It is the hyperbolic tangent function. Element-wise multiplication; Represents the forget gate vector; This represents the weight matrix input to the forget gate; Indicates time step The feature vector input to the LSTM; This represents the circular weight matrix from the hidden state to the forget gate; The bias vector representing the forget gate; Indicates time step The input gate vector; This represents the weight matrix input to the input gate; This represents the circular weight matrix from the hidden state to the input gate; This represents the bias vector of the input gate; Indicates time step The candidate cell state vector; This represents the weight matrix input to the candidate state; Represents the cyclic weight matrix from the hidden state to the candidate state; The bias vector representing the candidate state; Indicates time step The cell state vector; Indicates time step The cell state vector; Indicates time step The input gate vector; Indicates time step The output gate vector; This represents the weight matrix from the input to the output gate; This represents the circular weight matrix from the hidden state to the output gate; This represents the bias vector of the output gate; Indicates time step The hidden state vector; The weight matrix of the linear regression output layer is used to map the hidden state to the runoff simulation value; This is the bias vector of the linear regression output layer; For time step The simulated runoff values.
[0046] Furthermore, during the training phase, Dropout regularization is applied to the hidden state vector to obtain the processed hidden representation. and with Alternative Perform regression; disable Dropout during the validation and inference phases. ;
[0047] Step 3, Global Multi-Basin Pre-training: Input the global multi-basin dataset obtained in Step 1.4 into the LSTM runoff prediction model constructed in Step 2 for pre-training; based on the global multi-basin dataset, divide the samples into training set, validation set, and test set in chronological order; in the training set, use a preset loss function as the optimization objective and a preset optimization algorithm to iteratively update the model parameters; after each round of training, calculate the evaluation index on the validation set for early stopping and model selection; when the early stopping condition is met, i.e., the validation set loss continuously decreases... When the model stops declining within a cycle, training is stopped, and the model parameter weights corresponding to the optimal evaluation metric on the validation set are saved as the parameter weights of the global multi-basin pre-trained base model. Subsequently, the evaluation metric is calculated on the test set to verify the performance of the global multi-basin pre-trained base model.
[0048] Furthermore, the evaluation metrics include the Nash–Sutcliffe efficiency coefficient (NSE) and the Kling–Gupta efficiency coefficient (KGE), which are calculated as follows:
[0049] The specific formula for calculating NSE is:
[0050] (14)
[0051] in, Indicates time step Runoff observations; Indicates time step Simulated runoff values; This represents the mean of the runoff observations; This represents the total number of time steps.
[0052] The specific formula for calculating KGE is:
[0053] (15)
[0054]
[0055] in, This represents the Pearson correlation coefficient; Indicates the ratio of standard deviations; Indicates the ratio of means; This indicates the calculation of the correlation coefficient; Indicates time step Simulated runoff values; Indicates time step Runoff observations; ; This represents the mean of the simulated runoff values; This represents the mean of the runoff observations;
[0056] Step 4, Target Watershed Migration Fine-tuning: Load the weights of the global multi-watershed pre-trained base model parameters obtained in Step 3 into the LSTM runoff prediction model constructed in Step 2 as the initial model parameters for target watershed fine-tuning; input the target watershed dataset obtained in Step 1.4 into the LSTM runoff prediction model for target watershed fine-tuning training; based on the target watershed dataset, divide the samples into fine-tuning training set, fine-tuning validation set, and fine-tuning test set in chronological order; freeze the LSTM network layer parameters during fine-tuning, adjusting only the regression output layer parameters. Gradient updates are performed; in an optional implementation, the regression output layer is a linear regression output layer, and the time step is obtained according to formula (13). Runoff simulation values ;
[0057] During fine-tuning, the LSTM network layer parameters remain unchanged:
[0058] (17)
[0059] The update of the regression output layer parameters is achieved using a preset optimization algorithm, as shown in formula (18):
[0060] (18)
[0061] in, Represents the gradient operator; These are the parameters of the LSTM network layer, which remain fixed during the fine-tuning phase. The loss function; These are the parameters for the regression output layer; This represents the parameter update operator corresponding to the preset optimization algorithm, used for iteratively updating the parameters based on the gradient; For iteration rounds; The learning rate;
[0062] The preset optimization algorithm is the Adam optimization algorithm, and in this case, formula (18) Update the operator for Adam;
[0063] To avoid overfitting during fine-tuning of the target watershed, an early stopping criterion is set based on the loss value of the fine-tuning validation set, and model selection is performed accordingly; when the loss of the fine-tuning validation set is within a certain range... When the rate of decrease within the cycle stops, stop fine-tuning training and save the model parameter weights corresponding to the minimum loss on the fine-tuning validation set as the parameter weights of the LSTM runoff prediction model after fine-tuning for the target watershed.
[0064] Step 5, Target Watershed Testing and Evaluation: From the target watershed fine-tuning test set obtained in Step 4, acquire the set of static watershed attributes and the set of average dynamic meteorological driving time series corresponding to the target watershed; construct each time step according to the standardization processing and feature splicing method in Step 2.1. eigenvectors and will Input the fine-tuned LSTM runoff prediction model for the target watershed obtained in step 4, and generate the time step. Runoff simulation values The Nash–Sutcliffe efficiency coefficient NSE and Kling–Gupta efficiency coefficient KGE were calculated according to formulas (14) to (16) respectively as test evaluation indicators to evaluate the prediction performance of the fine-tuned LSTM runoff prediction model in the target watershed.
[0065] The beneficial effects of this invention are as follows:
[0066] (1) The LSTM runoff prediction model is pre-trained based on a global multi-basin dataset to learn a general precipitation-runoff response characterization across hydro-climate zones; and fine-tuned based on the target basin dataset to enable the model to achieve local adaptation to the target basin under small sample conditions, thereby improving the accuracy of runoff simulation and the ability to fit hydrological processes in the target basin.
[0067] (2) Compared with the traditional independent modeling and parameter calibration method for each watershed, this invention achieves rapid model adaptation through the "pre-training-fine-tuning" process. Only a small number of runoff observation time series of the target watershed are needed to complete localized training, which effectively reduces the dependence on long-term, continuous and large-scale runoff observation data and reduces the cost of modeling, training and calibration.
[0068] (3) The present invention constructs a consistent hydrological and meteorological dataset covering multiple watersheds and target watersheds under a unified data processing and feature construction process, and adopts standardized pre-training, fine-tuning and testing evaluation steps, so that the LSTM runoff prediction model can be reused and transferred between different watersheds according to the same process. It has good process, reproducibility and engineering deployability, and is easy to promote quickly in multi-watershed application scenarios. Attached Figure Description
[0069] Figure 1 This is a flowchart of the method of the present invention;
[0070] Figure 2 A comparison diagram of precipitation-runoff process between Baishan Reservoir (Comparative Example 1) and the method of this invention;
[0071] Figure 3 This is a comparison diagram of precipitation-runoff processes between Baishan Reservoir (Comparative Example 2) and the method of this invention. Detailed Implementation
[0072] The present invention will be further described below with reference to specific embodiments.
[0073] Example 1: A precipitation-runoff time series simulation method based on pre-training and fine-tuning, taking the Baishan Reservoir basin in the Songliao River Basin of China as an example. The overall process of this method is as follows: Figure 1 As shown.
[0074] Step 1: Construct a consistent hydrometeorological dataset for global multi-basin pre-training and target basin fine-tuning; specifically:
[0075] Step 1.1: Obtain runoff observation time series and corresponding watershed polygons for multiple watersheds covering multiple hydroclimatic zones globally; and obtain the runoff observation time series and corresponding watershed polygons for the target watershed, the Songliao River Basin; define... For the set of all watershed identifiers, , It represents the watershed identifier for any watershed and establishes a one-to-one correspondence between watershed polygons and runoff observation time series based on the watershed identifier; it labels each watershed as a "pre-training watershed" or "target watershed" according to its data purpose; and the sets of all watershed identifiers for the pre-training watershed and the target watershed are independent of each other;
[0076] Step 1.2: Extract static watershed attributes from the static raster product; based on the watershed polygons obtained in Step 1.1, perform area-weighted partitioning statistics on the static raster data according to the watershed polygons under a unified projection coordinate system to obtain statistical values of the static watershed attribute variables at the watershed scale for each watershed; wherein, the statistical values include weighted average statistical values and weighted summation statistical values; specifically:
[0077] Let any watershed polygon be , assuming The set of grid cells that have spatial overlap and valid values is Define the overlap area between the grid cell and the watershed polygon. for:
[0078] (1)
[0079] And define the raster cell coverage fraction for:
[0080] (2)
[0081] in, Represents the area operator; The area of the watershed polygon; For raster cell indexing;
[0082] Let the set of static watershed attribute variables be... ,in It is a positive integer. For static watershed attribute variable index, Indicates the first A static watershed attribute variable. Raster cell. In the The values of the static watershed attribute variables are denoted as follows: .
[0083] Furthermore, the watershed-scale static watershed attribute variables are classified into two categories according to statistical caliber: mean or proportion attribute variables and total quantity attribute variables. Specifically:
[0084] The mean or proportion attribute variables refer to raster cells whose values are intensity or proportion (such as multi-year average precipitation, multi-year average temperature, land use ratio, etc.), using overlapping area. The weights are used for weighted regional statistics to obtain the weighted average statistical value of the mean or proportion of static watershed attribute variables. As shown in formula (3);
[0085] The total quantity attribute variable refers to the raster cell value being a total or cumulative amount (such as total population, total GDP, total irrigated area, etc.), using the raster cell coverage score. The weights are used for weighted summation to obtain the weighted summation statistics of the total static watershed attribute variables. As shown in formula (4);
[0086] (3)
[0087] (4)
[0088] in, The effective set after removing missing grid cells; For raster cell indexing; This represents the overlap area between the grid cell and the watershed polygon; Raster cell coverage score; For grid cells In the The values of the static watershed attribute variables; Representing watershed polygons Upper The area-weighted average statistical value of static watershed attribute variables of mean or proportion; Representing watershed polygons Upper The weighted summation statistics of static watershed attribute variables of total quantity category;
[0089] The weighted average statistical value of static watershed attribute variables such as mean or proportion Weighted summation statistics of total static watershed attribute variables Index, record and store the watershed identifiers determined in step 1.1 respectively to form a set of static watershed attributes at the watershed scale that corresponds one-to-one with the watershed identifier; wherein, the set of static watershed attributes includes at least the statistical results of mean or proportion attribute variables, and optionally further includes the statistical results of total quantity attribute variables;
[0090] In this embodiment, the static raster products include: Global-PET potential evapotranspiration raster data product, Global Soil-Water Balance raster data product, WorldClim climate statistics raster data product, GLC2000 land use and cover raster data product, SoilGrids 1km soil properties raster data product, Nighttime Lights v4 nighttime light raster data product, GDP PPP v2 economic output (GDP) raster data product, and EarthStat cropland-pasture-area-2000 cultivated land and pasture area raster data product, and GlobalAridity Index drought index raster data product.
[0091] Correspondingly, the static watershed attributes include at least: potential evapotranspiration, actual evapotranspiration, multi-year average precipitation, multi-year average temperature, soil organic carbon, soil sand, silt and clay content, soil moisture content, forest coverage, proportion of cultivated land area, proportion of pasture area, nighttime light index, GDP, and drought index.
[0092] Step 1.3: Extract the average dynamic meteorological driving time series from the meteorological raster product; based on the watershed identifier and corresponding watershed polygon determined in Step 1.1, perform weighted partitioning statistics on the values of each raster cell in a unified projected coordinate system according to the overlap area between each raster cell and the watershed polygon; specifically:
[0093] Let any watershed polygon be Let the watershed polygon be... The set of grid cells that have spatial overlap and valid values is Let the set of dynamic meteorological driving variables be... ,in It is a positive integer not less than 2. For variable index, Indicates the first One dynamic meteorological driving variable; raster unit At time step The The values of the dynamic meteorological driving variables are denoted as follows: Define the overlap area between the grid cell and the watershed polygon. As shown in formula (1), then at time step watershed polygon The corresponding number The area-weighted average statistical value of the dynamic meteorological driving variables is shown in formula (5):
[0094] (5)
[0095] in, The effective set after removing missing grid cells; This represents the overlap area between the grid cell and the watershed polygon; For grid cells At time step The The values of the dynamic meteorological driving variables;
[0096] Subsequently, for each time step of Arranged chronologically and with missing values removed, the corresponding basin-averaged dynamic meteorological driving time series were obtained; The above process is performed on each dynamic meteorological driving variable, and the resulting time series are aggregated to obtain a basin-averaged dynamic meteorological driving time series set.
[0097] In this embodiment, the meteorological raster product includes MSWEP precipitation raster data and ERA5-Land reanalysis raster data, wherein MSWEP is used to provide precipitation driving variables and ERA5-Land is used to provide temperature driving variables; the basin-averaged dynamic meteorological driving time series is the basin-averaged value sequence of the dynamic meteorological driving variables corresponding to each basin identifier at each time step.
[0098] Step 1.4, Construction and partitioning of a consistent hydro-meteorological dataset: Based on steps 1.2 and 1.3, the set of static watershed attributes at the watershed scale and the set of watershed average dynamic meteorological driving time series for each watershed are obtained respectively. The set of watershed average dynamic meteorological driving time series and the runoff observation time series obtained in step 1.1 are unified in time zone and aligned in time step under a unified time reference. Combined with unit unification and missing value processing, sample data with watershed identifier as the first-level index and time step as the second-level index are formed, constituting a consistent hydro-meteorological dataset; wherein, the time reference is the local time zone; In this embodiment, to facilitate the explanation of the organization and alignment relationship of the consistent hydro-meteorological dataset, the following examples are given respectively: Table 1 is an example of the set of static watershed attributes at the watershed scale corresponding to a certain watershed identifier; Table 2 is a pairing example of the set of watershed average dynamic meteorological driving time series and the runoff observation time series corresponding to the same watershed identifier, wherein the meteorological driving value at the same time step corresponds one-to-one with the runoff observation value.
[0099] Table 1: Example of Static Watershed Attribute Set (Excerpt, Partial Variables)
[0100]
[0101] Table 2: Examples of pairing watershed average dynamic meteorological driving time series with runoff observation time series under the same watershed identifier
[0102]
[0103] Based on the usage labels recorded in step 1.1, the consistent hydro-meteorological dataset is divided and organized according to the watershed identifier index to obtain the global multi-watershed dataset and the Songliao watershed dataset; wherein, the global multi-watershed dataset consists of watershed samples with the usage label "pre-training watershed", and the Songliao watershed dataset consists of watershed samples with the usage label "target watershed".
[0104] Step 2: Construct an LSTM runoff prediction model based on the consistent hydro-meteorological dataset obtained in Step 1. The LSTM runoff prediction model is designed for any watershed identifier. Multi-basin joint training is performed on samples and model parameters are shared; specifically:
[0105] Step 2.1, Input Preparation and Feature Concatenation: For any watershed identifier Regarding The corresponding static watershed attribute set is standardized to obtain static feature vectors. ; Regarding The corresponding basin-average dynamic meteorological driving time series set is standardized by time step, and a dynamic feature vector is obtained at each time step. ; at each time step ,Will The features are concatenated along the feature dimension and used as the feature vector input to the LSTM runoff prediction model, as shown in formula (6):
[0106] (6)
[0107] in, Indicates time step Input the feature vector of the LSTM runoff prediction model; This represents a vector concatenation operation along the feature dimension; This represents the total number of time steps.
[0108] Step 2.2, LSTM runoff prediction model construction: The LSTM network layer module is called within the deep learning framework to implement the LSTM runoff prediction model; the number of LSTM network layers in the LSTM runoff prediction model is set to... The number of hidden units is set to ; at each time step The LSTM runoff prediction model uses feature vectors and the hidden state of the previous time step and cell state For input, first calculate the forget gate according to formula (7) and formula (8) respectively. Input gate And calculate the candidate cell state according to formula (9). The cell state was then updated according to formula (10) to obtain the result. Then calculate the output gate according to formula (11). And obtain the hidden state according to formula (12). The hidden state As a time step The time series representation is passed through a linear regression output layer to obtain the time step. Runoff simulation values As shown in formula (13);
[0109] Forgotten Gate: (7)
[0110] Input Gate: (8)
[0111] Candidate cell status: (9)
[0112] Update cell status: (10)
[0113] Output gate: (11)
[0114] Hidden state: (12)
[0115] Output layer: (13)
[0116] in, For the Sigmoid function, It is the hyperbolic tangent function. Element-wise multiplication; Represents the forget gate vector; This represents the weight matrix input to the forget gate; Indicates time step The feature vector input to the LSTM; This represents the circular weight matrix from the hidden state to the forget gate; The bias vector representing the forget gate; Indicates time step The input gate vector; This represents the weight matrix input to the input gate; This represents the circular weight matrix from the hidden state to the input gate; This represents the bias vector of the input gate; Indicates time step The candidate cell state vector; This represents the weight matrix input to the candidate state; Represents the cyclic weight matrix from the hidden state to the candidate state; The bias vector representing the candidate state; Indicates time step The cell state vector; Indicates time step The cell state vector; Indicates time step The input gate vector; Indicates time step The output gate vector; This represents the weight matrix from the input to the output gate; This represents the circular weight matrix from the hidden state to the output gate; This represents the bias vector of the output gate; Indicates time step The hidden state vector; The weight matrix of the linear regression output layer is used to map the hidden state to the runoff simulation value; This is the bias vector of the linear regression output layer; For time step Simulated runoff values;
[0117] Furthermore, during the training phase, Dropout regularization is applied to the hidden state vector to obtain the processed hidden representation. and with Alternative Perform regression; disable Dropout during the validation and inference phases. ;
[0118] Step 3, Global Multi-Basin Pre-training: The global multi-basin dataset obtained in Step 1.4 is input into the LSTM runoff prediction model constructed in Step 2 for pre-training. Based on the global multi-basin dataset, the samples are divided into training, validation, and test sets in chronological order. The training set corresponds to 1980 / 10 / 01—2009 / 09 / 30, the validation set corresponds to 2009 / 10 / 01—2014 / 09 / 30, and the test set corresponds to 2014 / 10 / 01—2021 / 09 / 30. In the training set, the model parameters are iteratively updated using a preset loss function as the optimization objective and the preset optimization algorithm Adam. After each round of training, an evaluation index is calculated on the validation set for early stopping and model selection. When the early stopping condition is met, i.e., the validation set loss is within a certain range, the model is considered to have stopped running. When the model stops declining within a cycle, training is stopped, and the model parameter weights corresponding to the optimal evaluation metrics on the validation set are saved as parameter weights for the global multi-basin pre-trained base model. Subsequently, the evaluation metrics Nash–Sutcliffe efficiency coefficient (NSE) and Kling–Gupta efficiency coefficient (KGE) are calculated on the test set to verify the performance of the global multi-basin pre-trained base model. The test results are shown in Table 1.
[0119] Table 3: Global Multi-Basin Pre-training Test Results
[0120]
[0121] Step 4, Fine-tuning of the Songliao River Basin Migration: The weights of the global multi-basin pre-trained base model parameters obtained in Step 3 are loaded into the LSTM runoff prediction model constructed in Step 2 as the initial model parameters for fine-tuning the Songliao River Basin; the Songliao River Basin dataset obtained in Step 1.4 is input into the LSTM runoff prediction model for fine-tuning training; based on the Songliao River Basin dataset, the samples are divided into a fine-tuning training set, a fine-tuning validation set, and a fine-tuning test set in chronological order, where the fine-tuning training set corresponds to 2010 / 10 / 01—2018 / 09 / 30, the fine-tuning validation set corresponds to 2018 / 10 / 01—2019 / 09 / 30, and the fine-tuning test set corresponds to 2019 / 10 / 01—2023 / 09 / 30; the LSTM network layer parameters are frozen during fine-tuning, and only the regression output layer parameters are adjusted. Gradient updates are performed; in an optional implementation, the regression output layer is a linear regression output layer, and the time step is obtained according to formula (13). Runoff simulation values ;
[0122] During fine-tuning, the LSTM network layer parameters remain unchanged:
[0123] (14)
[0124] The update of the regression output layer parameters is achieved using a preset optimization algorithm, as shown in formula (15):
[0125] (15)
[0126] in, Represents the gradient operator; These are the parameters of the LSTM network layer, which remain fixed during the fine-tuning phase. The loss function; These are the parameters for the regression output layer; This represents the parameter update operator corresponding to the Adam algorithm, used to iteratively update the parameters based on the gradient; For iteration rounds; The learning rate;
[0127] To avoid overfitting during the fine-tuning process in the Songliao River Basin, an early stopping criterion is set based on the loss value of the fine-tuning validation set, and model selection is performed accordingly; when the loss of the fine-tuning validation set is within a certain range... When the flow rate stops decreasing within the cycle, stop the fine-tuning training and save the model parameter weights corresponding to the minimum loss of the fine-tuning validation set as the parameter weights of the fine-tuned LSTM runoff prediction model in the Songliao River Basin.
[0128] Step 5, Songliao River Basin Test and Evaluation: From the Songliao River Basin fine-tuning test set obtained in Step 4, obtain the corresponding static basin attribute set and average dynamic meteorological driving time series set; construct each time step according to the standardization processing and feature splicing method in Step 2.1. eigenvectors and the Input the fine-tuned LSTM runoff prediction model for the Songliao River Basin obtained in step 4, and generate the time step... Runoff simulation values The Nash–Sutcliffe efficiency coefficient (NSE) and the Kling–Gupta efficiency coefficient (KGE) were calculated as test evaluation indicators to evaluate the prediction performance of the fine-tuned LSTM runoff prediction model in the Songliao River Basin.
[0129] Furthermore, to verify the effectiveness and performance improvement of the "pre-training-fine-tuning" method in the Songliao River Basin, this embodiment sets up the following comparative experiment and performs a unified evaluation on the same Songliao River Basin fine-tuning test set:
[0130] Comparative Example 1: Independent Training and Comparative Experiment in the Songliao River Basin:
[0131] The same LSTM runoff prediction model as in step 2 was used, and the model parameters were randomly initialized. The same data partitioning method as in step 4 was used to construct the training set, validation set, and test set for the Songliao River Basin. The model was trained on the training set of the Songliao River Basin, and validated and the model was selected on the validation set of the Songliao River Basin. Finally, the model was tested and evaluated on the test set of the Songliao River Basin, and the Nash-Sutcliffe efficiency coefficient NSE and the Kling-Gupta efficiency coefficient KGE were calculated.
[0132] In particular, Comparative Example 1 and the method of the present invention both adopt the same input feature construction method, data partitioning method and evaluation index calculation method to ensure the comparability of the comparison results.
[0133] Comparative Example 2: Pre-training Only Comparison Experiment:
[0134] Using the same LSTM runoff prediction model as in step 2, load the parameter weights of the global multi-basin pre-trained base model obtained in step 3; without performing the Songliao Basin migration fine-tuning described in step 4, construct the Songliao Basin training set, validation set, and test set using the same data partitioning method as in step 4; directly perform testing and evaluation on the Songliao Basin test set, and calculate the Nash–Sutcliffe efficiency coefficient NSE and the Kling–Gupta efficiency coefficient KGE;
[0135] In Comparative Example 2, both the method of the present invention and the method of the present invention adopt the same input feature construction method, data partitioning method and evaluation index calculation method to ensure the comparability of the comparison results.
[0136] To facilitate comparison, the Baishan Reservoir basin was selected as a representative basin of the Songliao River Basin. A comparison diagram of precipitation-runoff processes between Comparative Example 1 (independent training in the Songliao River Basin) and the method of this invention was drawn, see [link to diagram]. Figure 2 A comparison diagram of precipitation-runoff processes between Comparative Example 2 (pre-training only) and the method of this invention is shown below. Figure 3 The corresponding quantitative evaluation results are shown in Table 4. The test results of Baishan Reservoir Basin show that the method of the present invention can effectively utilize the knowledge transfer capability of the global watershed pre-trained model. By fine-tuning the target watershed, it can achieve higher runoff simulation accuracy and generalization performance in the target watershed, verifying the advantages of the method in terms of regional adaptability and model transferability.
[0137] Table 4: Test Results of Baishan Reservoir in Songliao River Basin
[0138]
[0139] The above embodiments are merely illustrative of the implementation methods of the present invention, but should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the protection scope of the present invention.
Claims
1. A precipitation-runoff time series simulation method based on pre-training and fine-tuning, characterized in that, The precipitation runoff time series simulation method includes the following steps: Step 1: Construct a consistent hydro-meteorological dataset for global multi-basin pre-training and target basin fine-tuning; Based on usage labels, the consistent hydro-meteorological dataset is partitioned and organized according to watershed identifier indexes, resulting in a global multi-watershed dataset and a target watershed dataset. The global multi-watershed dataset consists of watershed samples labeled as pre-trained watersheds, while the target watershed dataset consists of watershed samples labeled as target watersheds. Specifically: Step 1.1: Obtain runoff observation time series and corresponding watershed polygons for multiple watersheds covering multiple hydroclimatic zones globally; and obtain the runoff observation time series and corresponding watershed polygons for the target watershed; define... For the set of all watershed identifiers, , It represents the watershed identifier for any watershed and establishes a one-to-one correspondence between watershed polygons and runoff observation time series based on the watershed identifier; it labels each watershed as a pre-training watershed or a target watershed according to its data purpose; and the sets of all watershed identifiers for the pre-training watershed and the target watershed are independent of each other; Step 1.2: Extract static watershed attributes from the static raster product; based on the watershed polygons obtained in Step 1.1, perform area-weighted partitioning statistics on the static raster data according to the watershed polygons under a unified projection coordinate system to obtain the statistical values of the static watershed attribute variables at the watershed scale for each watershed; among which, the statistical values include weighted average statistical values and weighted summation statistical values; Let any watershed polygon be , assuming The set of grid cells that have spatial overlap and valid values is Define the overlap area between the grid cell and the watershed polygon. for: (1) And define the raster cell coverage fraction for: (2) in, Represents the area operator; The area of the watershed polygon; For raster cell indexing; Let the set of static watershed attribute variables be... ,in It is a positive integer. For static watershed attribute variable index, Indicates the first A static watershed attribute variable; raster unit In the The values of the static watershed attribute variables are denoted as follows: ; Step 1.3: Extract the average dynamic meteorological driving time series from the meteorological raster product; based on the watershed identifier and corresponding watershed polygon determined in Step 1.1, perform weighted partitioning statistics on the values of each raster cell in a unified projected coordinate system according to the overlap area between each raster cell and the watershed polygon; specifically: Let any watershed polygon be Let the watershed polygon be... The set of grid cells that have spatial overlap and valid values is Let the set of dynamic meteorological driving variables be... ,in It is a positive integer not less than 2. For variable index, Indicates the first One dynamic meteorological driving variable; raster unit At time step The The values of the dynamic meteorological driving variables are denoted as follows: Define the overlap area between the raster cell and the watershed polygon. As shown in formula (1), then at time step watershed polygon The corresponding number The area-weighted average statistical value of the dynamic meteorological driving variables is shown in formula (5): (5) in, The effective set after removing missing grid cells; This represents the overlap area between the grid cell and the watershed polygon; For grid cells At time step The The values of the dynamic meteorological driving variables; For each time step of Arranged chronologically and with missing values removed, the corresponding basin-averaged dynamic meteorological driving time series were obtained; The above process is performed on each dynamic meteorological driving variable, and the resulting time series are aggregated to obtain a basin-averaged dynamic meteorological driving time series set. Step 1.4, Construction and partitioning of a consistent hydro-meteorological dataset: Based on steps 1.2 and 1.3, the set of static watershed attributes at the watershed scale and the set of watershed average dynamic meteorological driving time series for each watershed are obtained respectively. The watershed average dynamic meteorological driving time series set and the runoff observation time series obtained in step 1.1 are unified in time zone and time-aligned according to a unified time step under a unified time reference. Combined with unit unification and missing value processing, sample data with watershed identifier as the first-level index and time step as the second-level index are formed, thus constituting a consistent hydro-meteorological dataset. Step 2: Construct an LSTM runoff prediction model based on the consistent hydro-meteorological dataset obtained in Step 1. The LSTM runoff prediction model is designed for any watershed identifier. Multi-basin joint training is performed on samples and model parameters are shared; specifically: Specifically: Step 2.1, Input Preparation and Feature Concatenation: For any watershed identifier ,Will The corresponding static watershed attribute set is standardized to obtain static feature vectors. ;Will The corresponding basin-average dynamic meteorological driving time series set is standardized by time step, and a dynamic feature vector is obtained at each time step. ; at each time step ,Will The features are concatenated along the feature dimension and used as the feature vector input to the LSTM runoff prediction model, as shown in formula (6): (6) in, Indicates time step Input the feature vector of the LSTM runoff prediction model; This represents a vector concatenation operation along the feature dimension; This represents the total number of time steps. Step 2.2, Constructing the LSTM runoff prediction model: The LSTM network layer module is called within the deep learning framework to implement the LSTM runoff prediction model; the number of LSTM network layers in the LSTM runoff prediction model is set to... The number of hidden units is set to ; at each time step LSTM runoff prediction model uses eigenvectors and the hidden state of the previous time step and cell state As input, first calculate the forget gate separately. Input gate And calculate candidate cell states. Subsequently, the cell state was updated to obtain... Then calculate the output gate. Hidden state The hidden state As a time step The timing representation is processed by the output layer to obtain the time steps. Runoff simulation values Step 3, Global Multi-Basin Pre-training: The global multi-basin dataset from step 1 is input into the LSTM runoff prediction model constructed in step 2 for pre-training. Based on the global multi-basin dataset, the samples are divided into training, validation, and test sets in chronological order. In the training set, a preset loss function is used as the optimization objective, and a preset optimization algorithm is employed to iteratively update the model parameters. After each round of training, an evaluation index is calculated on the validation set for early stopping and model selection. When the early stopping condition is met, i.e., the validation set loss continuously decreases... When the model stops declining within a cycle, training is stopped, and the model parameter weights corresponding to the optimal evaluation metric on the validation set are saved as the parameter weights of the global multi-basin pre-trained base model. Subsequently, the evaluation metric is calculated on the test set to verify the performance of the global multi-basin pre-trained base model. Step 4, fine-tuning the target watershed migration: The parameter weights of the global multi-basin pre-trained base model obtained in step 3 are loaded into the LSTM runoff prediction model constructed in step 2 as the initial model parameters for fine-tuning the target watershed. The target watershed dataset obtained in step 1 is input into the LSTM runoff prediction model for fine-tuning training. Based on the target watershed dataset, the samples are divided into a fine-tuning training set, a fine-tuning validation set, and a fine-tuning test set in chronological order. The LSTM network layer parameters in the LSTM runoff prediction model are frozen during fine-tuning, and only the regression output layer parameters are adjusted. Perform gradient updates; Step 5, Target Watershed Testing and Evaluation: In the fine-tuning test set from Step 4, obtain the set of static watershed attributes and the set of average dynamic meteorological driving time series corresponding to the target watershed; construct each time step according to the standardization processing and feature splicing method. eigenvectors and will In the fine-tuned LSTM runoff prediction model for the target watershed obtained in step 4, the time step is generated. Runoff simulation values The evaluation indicators were calculated to assess the predictive performance of the fine-tuned LSTM runoff prediction model in the target watershed.
2. The precipitation-runoff time series simulation method based on pre-training-fine-tuning according to claim 1, characterized in that, In step 1.2, the static watershed attribute variables at the watershed scale are divided into two categories according to statistical caliber: mean or proportion attribute variables and total quantity attribute variables; specifically: The mean or proportion attribute variable refers to the value of the raster cell being intensity or proportion, using the overlapping area. The weights are used for weighted regional statistics to obtain the weighted average statistical value of the mean or proportion of static watershed attribute variables. As shown in formula (3); The total quantity attribute variable refers to the raster cell value being either total or cumulative, using the raster cell coverage score. The weights are used for weighted summation to obtain the weighted summation statistics of the total static watershed attribute variables. As shown in formula (4); (3) (4) in, The effective set after removing missing grid cells; For raster cell indexing; This represents the overlap area between the grid cell and the watershed polygon; Raster cell coverage score; For grid cells In the The values of the static watershed attribute variables; Representing watershed polygons Upper The area-weighted average statistical value of static watershed attribute variables of mean or proportion; Representing watershed polygons Upper The weighted summation statistics of static watershed attribute variables of total quantity category; The weighted average statistical value of static watershed attribute variables such as mean or proportion Index and store the watershed identifiers determined in step 1.1; and calculate the weighted summation statistics of the total static watershed attribute variables. Index and store the watershed identifiers determined in step 1.1 to form a set of static watershed attributes at the watershed scale that corresponds one-to-one with the watershed identifier; wherein the set of static watershed attributes includes at least the statistical results of mean or proportion attribute variables.
3. The precipitation-runoff time series simulation method based on pre-training-fine-tuning according to claim 2, characterized in that, In step 1.4, the time base is either the local time zone or Coordinated Universal Time (UTC).
4. The precipitation-runoff time series simulation method based on pre-training-fine-tuning according to claim 3, characterized in that, In step 2.2, the output layer is a regression output layer.
5. The precipitation-runoff time series simulation method based on pre-training-fine-tuning according to claim 3, characterized in that, In step 2, Dropout regularization is applied to the hidden state vector during the training phase to obtain the processed hidden representation. and with Alternative Perform regression; disable Dropout during the validation and inference phases. .
6. The precipitation-runoff time series simulation method based on pre-training-fine-tuning according to claim 3, characterized in that, In step 3, the evaluation metrics include the Nash-Sutcliffe efficiency coefficient (NSE) and the Kling-Gupta efficiency coefficient (KGE).
7. The precipitation-runoff time series simulation method based on pre-training-fine-tuning according to claim 6, characterized in that, In step 4: During fine-tuning, the LSTM network layer parameters remain unchanged: (17) The update of the regression output layer parameters is achieved using a preset optimization algorithm, as shown in formula (18): (18) in, Represents the gradient operator; These are the parameters of the LSTM network layer, which remain fixed during the fine-tuning phase. The loss function; These are the parameters for the regression output layer; This represents the parameter update operator corresponding to the preset optimization algorithm, used for iteratively updating the parameters based on the gradient; For iteration rounds; This is the learning rate.
8. The precipitation-runoff time series simulation method based on pre-training-fine-tuning according to claim 7, characterized in that, In step 4: The preset optimization algorithm is the Adam optimization algorithm, and in this case, formula (18) Update the operator for Adam; Early stopping criteria are set based on the loss value of the fine-tuned validation set, and model selection is performed; when the loss of the fine-tuned validation set is continuously... When the loss stops within the cycle, stop fine-tuning training and save the model parameter weights corresponding to the minimum loss on the fine-tuning validation set as the parameter weights of the LSTM runoff prediction model after fine-tuning for the target watershed.
Citation Information
Patent Citations
Rainfall runoff forecasting method suitable for areas without data
CN115453664A
Non-data watershed runoff prediction method based on double-layer LSTM transfer learning
CN119168109A