Adaptive hydrological model structure optimization and migration method based on deep learning
By dynamically adjusting the weights and parameters of the hydrological model through deep learning, the problem of rigid hydrological model structure is solved, enabling adaptive modeling for different watersheds and hydrological scenarios, and improving the model's generalization ability and prediction accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN UNIV OF TECH
- Filing Date
- 2026-01-12
- Publication Date
- 2026-05-05
AI Technical Summary
The rigid structure of existing hydrological models makes them unable to dynamically adapt to different watershed environments, thus limiting the models' generalization ability and prediction accuracy.
A deep learning model is used to replace the traditional optimization algorithm. By constructing a long short-term memory neural network and a deep neural network, the weights and parameters in the hydrological model are dynamically adjusted. Combined with the basic framework of the HMETS hydrological model, and using alternative formulas from multiple classic hydrological models, adaptive hydrological process simulation is achieved.
It significantly improves the generalization ability and prediction accuracy of hydrological models, enables adaptive modeling of different watersheds and hydrological scenarios, and improves the accuracy of runoff prediction.
Smart Images

Figure CN121980261A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of hydrological forecasting technology, specifically involving an adaptive hydrological model structure optimization and transfer method based on deep learning. Background Technology
[0002] Hydrological forecasting is a crucial technical support for water resources planning, flood control and drought relief, and reservoir operation. Hydrological models are the core tool of hydrological forecasting, using mathematical and physical equations to simulate a series of complex water cycle processes such as precipitation, evapotranspiration, runoff generation, and confluence to predict future runoff changes. Traditional hydrological models, including conceptual models and distributed physical models, typically follow a process of "model building - parameter calibration - forecast application": first, a hydrological model with a fixed structure is selected; then, using historical meteorological and runoff data, an optimal set of parameters is calibrated through optimization algorithms, assuming that these parameters remain unchanged during the forecast period.
[0003] However, existing hydrological models suffer from a fundamental limitation in application: their model structure is fixed. Specifically, once the calculation formulas or modules describing key hydrological fluxes (such as runoff generation and evapotranspiration) are selected, they remain unchanged throughout the simulation. Although some studies have attempted to address the time-varying nature of parameters, the underlying computational paradigm of the model—the choice of the formulas themselves—remains static. Any calculation formula is a specific simplification of complex natural mechanisms, performing optimally only under certain conditions. This fixed computational structure adopted by existing technologies cannot dynamically adapt to different hydrological and meteorological scenarios, resulting in insufficient expressive power for complex watershed environments and limited generalization ability and prediction accuracy.
[0004] Existing technologies have explored two methods—discrete and continuous—for optimizing hydrological model structures. Discrete optimization methods iterate through and combine different computational formulas, then use optimization algorithms to determine a set of "optimal" static structures and parameters. Continuous optimization methods assign weights to multiple alternative computational formulas for the same hydrological process, form a hybrid expression through weighted summation, and then use optimization algorithms to solve for fixed optimal weight values. However, neither of these methods fundamentally solves the problem. Whether it's the final selected single structure or the calculated fixed weight combination, it remains essentially static. Once the watershed environment changes, this "optimal solution" based on historical data loses its effectiveness, and the model's adaptability remains limited.
[0005] To address the limitations of existing technologies, this invention proposes a novel technical solution: leveraging the powerful nonlinear mapping capabilities of deep learning models to learn the complex relationships between watershed static attributes, meteorological observation data, and the optimal structure of hydrological models. By replacing traditional optimization algorithms with deep learning models, these models can dynamically output optimal combinations of calculation formulas or weights describing key hydrological processes based on real-time input. This fundamentally overcomes the problem of static and fixed model structures and enables adaptive modeling for different watersheds and hydrological scenarios, significantly improving the model's generalization ability and prediction accuracy. Summary of the Invention
[0006] Currently, hydrological models generally suffer from a rigid structure; once the calculation formulas describing key hydrological processes are selected, they cannot be changed, making it difficult for the models to adapt to changing watershed environments. Although existing technologies attempt to optimize model structures through optimization algorithms, the results are essentially static and cannot achieve dynamic adaptation, limiting the model's generalization ability and prediction accuracy. Therefore, to overcome these limitations, the purpose of this invention is to provide an adaptive hydrological model structure optimization and transfer method based on deep learning.
[0007] To achieve the above objectives, the technical solution of the present invention is as follows: This invention provides a deep learning-based adaptive hydrological model structure optimization and transfer method, comprising the following steps: (1) Design and construct a bottom-level framework based on the HMETS hydrological model. The framework integrates a snowmelt calculation module, a soil water calculation module, and a slope runoff module. Using the water balance relationship and hydrological flux calculation formula in each module, construct a set of ordinary differential equations to form the basic hydrological calculation logic. (2) For the key hydrological fluxes that significantly affect runoff response in the hydrological model, including actual evapotranspiration, runoff generation mechanism and interflow, formulas with the same function but different calculation principles are systematically selected from multiple industry-recognized classic hydrological models as alternative calculation paradigms. (3) Assign dynamically adjustable weight coefficients to the original formulas and all alternative formulas for each key hydrological flux, and construct flexible hybrid calculation expressions by weighted summation, thereby forming a hybrid structure hydrological model with dynamic adaptive capabilities. (4) Construct a long short-term memory neural network (LSTM) and a deep neural network (DNN). The input features include a dynamic meteorological data sequence that changes continuously over time and static physical properties that characterize the inherent features of the watershed and do not change over time. The output features of the LSTM model correspond to the dynamic weights of the hybrid structure hydrological model, and the output features of the DNN correspond to the static parameters of the hybrid structure hydrological model. (5) The time-varying weights predicted by the LSTM and DNN at each time step and the fixed parameters are input into the hybrid structure hydrological model in real time to drive the model to complete the runoff calculation at that time and obtain the complete runoff process prediction results. (6) The coupling body of the LSTM and the hybrid structure hydrological model is pre-trained using a large-scale, multi-basin public hydrological dataset, so that it learns and masters the complex nonlinear mapping law between "meteorology-basin attributes-optimal model structure"; (7) Prepare local natural attribute data and hydrological and meteorological observation data of the target watershed, and use transfer learning technology to fine-tune the parameters of the pre-trained coupled model in order to realize the rapid transfer and localized deployment of model knowledge and apply it to the high-precision runoff prediction task of the target watershed.
[0008] Preferably, the underlying framework based on the HMETS hydrological model in step (1) has a snowmelt calculation module based on the temperature index method, a soil water calculation module based on the multi-layer soil moisture dynamic balance principle, and a slope runoff module based on a linear reservoir model, wherein: (1.1) The snow melting calculation module uses the average daily temperature and snowfall as input, distinguishes between snowfall and rainfall by setting a temperature threshold, and calculates the snow melting amount by combining the snow melting coefficient and temperature difference. At the same time, it considers the water holding capacity of the snow layer and the liquid water release process to determine the amount of snow melting water that can be used to generate runoff. (1.2) The soil water calculation module simulates the infiltration process of surface water into multiple layers of soil and groundwater through the layered soil moisture storage and transfer formula. Specifically, it includes the calculation of surface runoff, water transfer between soil layers, evaporation loss and deep soil leakage, and ensures the water conservation between each component through the dynamic balance constraint of soil moisture. (1.3) The slope runoff module calculates the runoff time and flow distribution of surface runoff and interflow through a linear reservoir model. Surface runoff is based on a fast-response reservoir simulation, and interflow is based on a slow-response reservoir simulation. The flow distribution ratio of each component on the time scale is determined by the reservoir's storage-release relationship.
[0009] Preferably, in step (2), for the key hydrological fluxes that significantly affect runoff response in the hydrological model, including actual evapotranspiration, runoff generation mechanisms, and interflow, formulas with the same function but different calculation principles are systematically selected from multiple industry-recognized classic hydrological models, including the HBV model and the VIC model, as alternative calculation paradigms, wherein: (2.1) The actual evapotranspiration calculation paradigm includes formulas based on energy balance and formulas based on simplified empirical relationships, which are selected from different models to meet the evapotranspiration estimation needs of different meteorological and surface conditions. (2.2) The calculation paradigm of the runoff generation mechanism includes the infiltration formula based on the SCS-CN method and the infiltration formula based on topography, as well as the fast flow formula based on soil moisture state and the fast flow formula based on hydraulic conduction, which are extracted from the HBV model, VIC model or other classical models to cover the runoff generation characteristics of different watersheds. (2.3) The calculation paradigm of interflow includes formulas based on Darcy's law and formulas based on linear storage models, selected from classical models to simulate the dynamic response of interflow under different soil types and topographic conditions; (2.4) The alternative calculation paradigms are systematically compared and analyzed to ensure that the input parameters and output results of each formula are consistent in a physical sense and can be seamlessly integrated into the underlying framework of the HMETS hydrological model.
[0010] Preferably, in step (3), the original formula for each key hydrological flux and all alternative formulas are assigned dynamically adjustable weight coefficients, and a flexible hybrid calculation expression is constructed by weighted summation, thereby forming a hybrid structure hydrological model with dynamic adaptive capabilities, wherein: (3.1) The weight coefficients include two processing methods: discrete weight values and continuous weight values. Discrete weight values are generated by the one-hot method, which converts the weight calculation values of each model into a vector containing only a single 1. Continuous weight values are generated by the softmax method, which converts the weight calculation values into a weight vector with values between 0 and 1 and a sum of 1. (3.2) The discrete weights are generated by the one-hot method, specifically by selecting a single optimal formula from the candidate formulas for each key hydrological flux, with the weight value of the corresponding formula in its weight vector being 1 and the rest being 0, so as to achieve selective application of a single formula; (3.3) The continuous weights are generated by the softmax method, which specifically maps the weight calculation values of each candidate formula to the interval between 0 and 1, and ensures that the sum of all weights is 1, so as to achieve a smooth transition of the weighted combination of multiple formulas; (3.4) The hybrid calculation expression is constructed by weighted summation, which integrates the calculation results of each alternative formula. The weights satisfy the summation constraint to ensure the physical consistency and computational stability of the hybrid result. (3.5) The adjustment of the dynamic weight coefficient is achieved through subsequent neural network prediction. The weight is dynamically optimized according to the input meteorological data and watershed attributes to adapt to the calculation needs of different time steps and watershed conditions.
[0011] Preferably, the dynamic meteorological data sequence and static physical properties in step (4) include: (4.1) The dynamic meteorological data series includes daily precipitation, maximum temperature, minimum temperature, relative humidity, solar radiation and wind speed data, with a daily time resolution; (4.2) Static physical properties include soil type, vegetation cover, average slope, elevation, topographic complexity and watershed area, etc. (4.3) The LSTM model adopts a multi-layer structure, including at least two hidden layers to capture long-term sequence dependencies, and the DNN model includes at least three fully connected layers to extract nonlinear features of static attributes.
[0012] Preferably, in steps (6) and (7), the coupling of LSTM and hybrid structure hydrological model is pre-trained using a large-scale, multi-basin public hydrological dataset, and the pre-trained model is fine-tuned using transfer learning techniques to achieve high-precision runoff prediction for the target basin, wherein: (5.1) The pre-training stage uses a large-scale, multi-basin public hydrological dataset: the CAMELS dataset. Its input includes dynamic meteorological data sequences: precipitation, temperature, relative humidity and static watershed attributes: such as soil type, vegetation cover and average slope. The output is the runoff prediction value. The sliding window length of the meteorological data is set to 365 days to cover the meteorological change process of the past year. (5.2) The input and output features adopt the watershed normalization method. The flow rate is transformed to balance the differences in runoff generation under different watershed areas. The transformed flow rate is used to calculate the square root gradient at the stable zero point. (5.3) The pre-training optimizes the model parameters by minimizing the loss function. The loss function takes into account the difference between the simulated value and the observed value. The weighted parameter is set to 0.25 to balance the loss contribution of the simulated value and the observed value. The training mini-batch contains 100 watersheds, and each watershed contains 365 days of sequence data. (5.4) The fine-tuning stage uses local natural attribute data and hydrological and meteorological observation data of the target watershed (such as the Weihe River or the Hanjiang River) to optimize the parameters of the pre-trained model by minimizing the loss function of the target watershed. The loss function is based on the error between the observed runoff and the predicted runoff of the target watershed. (5.5) The fine-tuned model is used for runoff prediction in the target watershed. By inputting local dynamic meteorological data and static watershed attributes into the model, high-precision runoff prediction results are generated, which are suitable for real-time hydrological forecasting and water resource management in the target watershed.
[0013] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention is based on the HMETS hydrological basic model. It selects calculation formulas derived from other classic hydrological models and expands the calculation formulas of key hydrological processes that significantly affect runoff in the hydrological model. It constructs a set of formulas for specific hydrological processes, thereby improving the simulation performance of the hydrological model for complex hydrological processes.
[0014] 2. This invention takes into account that the calculation formulas for hydrological processes may also change over time. Therefore, it uses a long short-term memory neural network to capture the time series characteristics of meteorological and hydrological data to dynamically predict the weight values of the formula combination. At the same time, based on the correlation between the static attributes of the watershed and the model parameters in the large-scale dataset, the long short-term memory neural network predicts the regionalized model parameter values corresponding to each watershed, thereby improving the regionalization and dynamic adaptation capabilities of the hydrological model parameters.
[0015] 3. This invention addresses the lack of large-scale river basin datasets in China by using transfer learning to learn the static attributes and hydrological and meteorological data of the Weihe and Hanjiang river basins through secondary model training. This results in a fine-tuned, localized model that improves the model's prediction accuracy and generalization ability. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the design of an adaptive hydrological model structure optimization and transfer method based on deep learning in one embodiment of the present invention. Figure 2 This is a structural diagram of the basic hydrological model HMETS selected in one embodiment of the present invention; Figure 3 This is a diagram of the LSTM model structure used in one embodiment of the present invention, including hidden layers and model activation function settings; Figure 4 This is a data input / output and deep learning model structure according to one embodiment of the present invention; Figure 5 This is a watershed overview map for a localized application in one embodiment of the present invention. Detailed Implementation
[0017] To more clearly present the purpose, technical solution, and significant beneficial effects of this application, a detailed description of the application is now provided through embodiments. It should be clarified that the embodiments described in this specification are for illustrative purposes only and do not constitute a limitation on the scope of this application.
[0018] For the sake of brevity, only a portion of the numerical ranges are explicitly disclosed in this application. In reality, any lower limit can be combined with any upper limit to form a new range that is not explicitly stated; similarly, any lower limit or any upper limit can be combined to generate ranges that are not explicitly mentioned. Furthermore, even if not explicitly stated in the text, every specific value between the endpoints of a range is included within that range. These values can serve as lower or upper limits, combined with other values, to construct numerical intervals that are not explicitly stated.
[0019] This invention provides a deep learning-based adaptive hydrological model structure optimization and transfer method, comprising the following steps: A low-level framework based on the HMETS hydrological model was designed and constructed. This framework integrates complete snowmelt calculation modules, soil water calculation modules, and slope runoff modules. Utilizing the water balance relationships and hydrological flux calculation formulas within each module, a system of ordinary differential equations is constructed to form the basic hydrological calculation logic. For key hydrological fluxes that have the most significant impact on runoff response in the model, such as actual evapotranspiration, runoff generation mechanisms, and interflow, formulas with similar functions but different calculation principles are systematically selected as alternative calculation paradigms from several industry-recognized classic hydrological models (including the HBV model and the VIC model). Dynamically adjustable weight coefficients are assigned to the original formulas for each key flux and all alternative formulas. A flexible hybrid calculation expression is constructed through weighted summation, thus forming a hybrid structure hydrological model with dynamic adaptive capabilities. Long Short-Term Memory (LSTM) and Deep Neural Network (DNN) neural networks are constructed. Their input features are designed to consist of two parts: one part is a continuously changing dynamic meteorological data sequence over time, such as daily precipitation, maximum and minimum temperatures, etc., and the other part... These are static physical attributes that characterize the inherent features of a watershed and do not change over time, such as soil type, vegetation cover, average slope, and elevation. The output features of the LSTM model are assigned to the dynamic parameters required by the hybrid structure hydrological model, such as dynamic weights, while the DNN corresponds to the static parameters, such as model parameters. The time-varying weights and fixed parameters predicted by the LSTM and DNN at each time step are fed into the hybrid structure hydrological model in real time, driving the model to complete the runoff calculation at that moment, thus obtaining a complete runoff prediction result. A large-scale, multi-watershed public hydrological dataset (such as the CAMELS dataset) is used to comprehensively pre-train the aforementioned LSTM and hybrid hydrological model coupling, enabling it to learn and master the complex nonlinear mapping law between "meteorology-watershed attributes-optimal model structure" with universal applicability. Finally, local natural attribute data and hydrological and meteorological observation data of the Weihe and Hanjiang watersheds are prepared, and transfer learning techniques are used to fine-tune the parameters of the pre-trained coupling model to achieve rapid transfer and localized deployment of model knowledge, ultimately applying it to the high-precision runoff prediction task of the target watershed.
[0020] Preferably, the HMETS hydrological model includes three important modules: snowmelt calculation module, soil water calculation module, and slope runoff module, which cover almost all major hydrological processes, including hydrological fluxes such as snowmelt, condensation, evaporation, infiltration, fast flow, and baseflow, and involves intermediate hydrological fluxes such as solid snow layer, liquid snow layer, upper soil water content, lower soil water content, and runoff units.
[0021] Preferably, for the four hydrological fluxes (infiltration, fast flow, evaporation, and baseflow) and the snow balance module in the HMETS hydrological model—modules that significantly affect the runoff calculation results of the hydrological model—calculation formulas from other hydrological models such as VIC, HBV, and TOPMODEL are selected as alternatives to improve the expressive power for these hydrological processes. Different weight values are assigned to each hybrid formula, and the hydrological flux calculation results are obtained through weighted summation.
[0022] Preferably, a long short-term memory neural network and a deep neural network are constructed, using watershed static attributes and meteorological observation data as model inputs. The sliding window for data input is set to 365 days to ensure coverage of meteorological and hydrological patterns over the past year. Then, the model construction parameters are set, including hidden layers, activation functions, and packet loss rate. The model output is defined as the weight and parameter values from the hybrid hydrological model, where the weight values are time-varying, consistent with the time dimension of the observed data, and can be considered as an intermediate dimensionless hydrological flux; while the parameters of other hydrological models can be considered as fixed values. After the model output, an additional activation function transformation is required: for the weight values... The value of the parameter p must be such that the weights of all hydrological flux calculation formulas sum to 1. Therefore, the output results need to be post-processed using the softmax activation function or the one-hot encoding method. For the parameter p, it must be kept within a reasonable output range. Therefore, the output results must first be constrained to the 0-1 range using the sigmoid function, and then extended to this calibration range through inverse normalization based on pre-defined calibration ranges for various parameters. The model results predicted by the LSTM model are ultimately applied to a hybrid structure hydrological model to construct a deep learning-based hybrid structure hydrological model, obtaining output results for key prediction elements such as evaporation, soil moisture, and runoff.
[0023] Preferably, the deep learning hybrid hydrological model described above is trained on a large scale using watershed static attribute data and meteorological and hydrological observation data provided in the CAMELS dataset. Regional calibration of parameters is achieved through watershed static attribute data, and model parameters are calibrated based on over 20 years of meteorological and hydrological observation data. Learning rate, number of iterations, and optimizer settings are configured, and the model is trained to obtain the trained model parameter values. Addressing the lack of large-scale training datasets in China, the training results of the above model are transferred to the Weihe and Hanjiang watersheds. By extracting the corresponding static attribute data from these two watersheds and preparing the watershed's hydrological and meteorological data, fine-tuning is performed based on the large-scale dataset training, enabling the localized application of the model.
[0024] The specific implementation process is as follows: The system architecture consists of a hydrological model module, a deep learning module, and a training and transfer learning module. Through the organic integration of these three core modules, intelligent optimization of hydrological model structure and rapid cross-basin transfer application are realized.
[0025] In this architecture, the hydrological model module decomposes the complex hydrological cycle into standardized sub-modules, such as precipitation / snowfall classification, evapotranspiration, soil infiltration, runoff generation, and runoff concentration. Each sub-module encapsulates multiple computational paradigms (i.e., formulas) and, through standardized input / output interfaces, enables "plug-and-play" replacement or weighted combination of different paradigms. Simultaneously, the module integrates general-purpose water balance calculation units, such as snow cover and soil water modules, to solve for key intermediate states like snow depth and soil moisture content by constructing balance equations. Crucially, the entire hydrological model module is built on a differentiable programming framework, ensuring gradient differentiability in all computational processes. This lays the foundation for seamless integration with deep learning modules and end-to-end collaborative optimization.
[0026] It is precisely this differentiable property that enables deep learning modules to drive the intelligence of the model. This invention employs a Long Short-Term Memory (LSTM) network to dynamically generate weights for mixing different computational paradigms based on time-series meteorological inputs, thereby simulating the switching of dominant mechanisms in real physical processes under dynamic environments and achieving dynamic optimization of the model structure. Simultaneously, a Deep Neural Network (DNN) is used to directly infer fixed parameters in the model based on the static geographic and climatic attributes of the watershed, significantly reducing the computational cost of calibrating the model individually in different watersheds while achieving parameter regionalization. This achieves an organic combination of data-driven intelligent inference and physical mechanisms.
[0027] To ensure the model's generalization ability and practicality, the training and transfer learning module provides the capability for large-scale training and localized application. This module utilizes large-scale hydrological datasets such as CAMELS, and pre-trains the integrated model extensively using a watershed-normalized loss function, balancing the prediction accuracy across different watershed types. Based on this, when the model is applied to a new watershed, a transfer learning strategy can be used to fine-tune the pre-trained model using only its static attributes and short-term meteorological data, thereby achieving rapid and high-precision localized deployment.
[0028] The technical solution of the present invention will be further described below through specific embodiments.
[0029] In the following embodiments, unless otherwise specified, the methods described are conventional methods; and unless otherwise specified, the reagents and materials described are commercially available.
[0030] like Figure 1 A deep learning-based adaptive hydrological model structure optimization and transfer method includes the following steps: Step 1: Design and build a basic framework based on the HMETS hydrological model. This framework integrates a complete snowmelt calculation module, a soil water calculation module, and a slope runoff module. It also uses the water balance relationship and hydrological flux calculation formula in each module to build a set of ordinary differential equations to form the basic hydrological calculation logic. Specifically, referencing flexible modeling methods such as Raven and SUMMA, the calculation methods for each hydrological flux in the HMETS hydrological model are encapsulated as functions. Each water balance module is defined using an object-oriented approach, and the calculation formula for each hydrological flux within the module is represented by the hydrological flux calculation method as input. The specific calculation formulas of the model are as follows: HMETS hydrological model (such as) Figure 2 (As shown) Using a simple temperature threshold Tt, precipitation P is divided into snowfall Ps and rainfall Pr using the measured temperature T. The formula is as follows: ; In the snow melt calculation, the model considers two core fluxes: snow melt amount SM and condensation amount RF, which are calculated using the following formulas: ; ; Where Kf represents the condensation day factor, Tbf is the condensation temperature, Tbm is the snowmelt temperature, and ddf is the time-varying snowmelt day factor, determined by the following formula: ; In the formula, The minimum snowmelt duration factor, For calculating the degree-day factor, CSM represents the cumulative snowmelt. When the amount of liquid water in the snow layer exceeds its water-holding capacity, the water volume WAR can be used for runoff calculation. The water-holding capacity is calculated using the following formula: ; Where fcmax and fcmin represent the minimum and maximum water-holding factors, respectively. In the soil water module, the model includes evaporation, infiltration, and four runoff types: direct runoff, fast flow, baseflow, and groundwater. The calculation formulas are as follows: ; ; ; ; ; ; In the formula, cv, cr, cvp, and cp are coefficients for four runoff types: fast flow, baseflow, deep infiltration, and deep runoff, respectively. LV and LVmax represent soil moisture content and maximum moisture content, respectively, and GR is the amount of water infiltrating deep soil layer LP. The two runoff processes, fast flow H2 and baseflow H3, converge via a gamma unit line. The shape of the unit line is based on the two-parameter gamma distribution density function (gampdf), with shape parameter α and rate parameter β. Time x is in days, and the formula is: ; The unit flow rate is then calculated and converted to m³ / s, using the following formula: ; Where A is the catchment area, in km². The flow rates of the fast current and base current are calculated using their respective unit hydrographs, as follows: ; Where n is the length of the unit flow (in days). Finally, the model runoff is obtained by adding the four horizontal flow components.
[0031] Step 2: For the key hydrological fluxes that have the most significant impact on runoff response in the model, such as actual evapotranspiration, runoff generation mechanism, and interflow, formulas with the same function but different calculation principles are systematically selected from multiple industry-recognized classic hydrological models (including HBV model, VIC model, etc.) as alternative calculation paradigms. The infiltration formula and the fast flow formula are shown in the table below. Other alternative formulas, such as snowmelt balance calculation (simple snowmelt balance, HBV snowmelt balance) and evaporation (TOPMODEL evaporation), are not exemplified here due to space limitations.
[0032] ; Step 3: Assign dynamically adjustable weight coefficients to the original formula for each key flux and all alternative formulas, and construct a flexible hybrid calculation expression by weighted summation, thereby forming a hybrid structure hydrological model with dynamic adaptive capabilities.
[0033] Specifically, this invention proposes two weight processing methods for dynamic weight coefficients: discrete weight values and continuous weight values. Discrete weights use the one-hot encoding method to convert the calculated weight values of each model into a vector containing only a single 1; continuous weights use the softmax method to convert the calculated weight values into a weight vector with values between 0 and 1 and a sum of 1.
[0034] Discrete weights are generated using the one-hot method, with the following formula: ; Continuous weights are calculated using the softmax method, with the following formula: ; in, Indicates the first The weights of each model, For the first The weight calculation values of each model. This represents the total number of models. Then, by weighting and combining the various calculation methods for the hydrological process, the following formula is obtained: ; The weights satisfy: ; ; ; For example, and This indicates two options for a process, such as using the HMETS or HBV model to define and calculate infiltration.
[0035] Step 4, construct a Long Short-Term Memory (LSTM) neural network, such as... Figure 3 As shown in the figure, the input features of the deep neural network (DNN) are designed to be two parts: one part is a dynamic meteorological data sequence that changes continuously over time, such as daily precipitation, maximum and minimum temperatures, etc., and the other part is a static physical property that characterizes the inherent characteristics of the watershed and does not change over time, such as soil type, vegetation coverage, average slope and elevation, etc.
[0036] The input to the LSTM model is a dynamic meteorological data sequence (such as precipitation, temperature, etc.) and static watershed attributes (such as soil type, vegetation cover, etc.), and the output is dynamic weight values. Its formula is expressed as: ; The input to the DNN model is static watershed properties. The output is the static model parameter values. Its formula is expressed as: ; in, and These are the network parameters for LSTM and DNN, respectively. The final prediction result is obtained by averaging the output of the multidimensional hydrological model, using the following formula: ; in, For the first The output of a hydrological model For model dimensions ().
[0037] Data input / output and deep learning model structure, such as Figure 4 As shown.
[0038] Step 5: Utilize a large-scale, multi-basin publicly available hydrological dataset (such as the CAMELS dataset) to comprehensively pre-train the aforementioned LSTM and hybrid hydrological model coupling, enabling it to learn and master the complex nonlinear mapping law between "meteorological-basin attributes-optimal model structure" with universal applicability; finally, prepare for the Weihe and Hanjiang river basins (such as...) Figure 5 Using local natural attribute data and hydrological and meteorological observation data (as shown), transfer learning technology is used to fine-tune the parameters of the pre-trained coupled model in a targeted manner to achieve rapid transfer and localized deployment of model knowledge, and finally apply it to the high-precision runoff prediction task of the target watershed.
[0039] Specifically, during the pre-training phase, the input to the LSTM, DNN, and hybrid hydrological model coupling is dynamic meteorological data sequences (such as precipitation and temperature) and static watershed attributes (such as soil type and vegetation cover) from a multi-basin dataset, and the output is runoff prediction. The sliding window length for meteorological data was set to 365 days to cover the meteorological changes over the past year. Furthermore, both input and output features employed watershed normalization to balance the differences in runoff generation across different watershed areas. ; Among them, the adjusted forecast value Calculated using the following formula: ; In the formula, This is a weighting parameter set to 0.25 to balance the loss contribution between simulated and observed values. The definitions of the remaining variables remain consistent. Indicates the first Tianhe Di The flow rate of a river basin, subscript and These represent simulated values and observed values, respectively. It is a transformed flow rate used to improve the representation of low flow rates; the calculation formula is as follows. ,in It is a small positive value (here, ) used for calculating the square root gradient at the stable zero point; and These represent the number of watersheds (100 in this case) and the total number of days (365 in this case) in the training mini-batch, respectively.
[0040] Simultaneously, the input data is used to optimize the model parameters by minimizing the loss function, as shown in the formula: ; in, For the number of watersheds, For the first Observed runoff in each watershed To predict runoff using the model, These are the model parameters.
[0041] During the fine-tuning phase, local data from the target watershed (such as the Wei River and the Han River) are used. and For pre-trained parameters To optimize, the loss function is: ; in, For time step, For the observed runoff in the target watershed, This is the fine-tuned predicted runoff. Finally, the fine-tuned model is used for runoff prediction in the target watershed: .
[0042] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A method for adaptive hydrological model structure optimization and transfer based on deep learning, characterized in that, Includes the following steps: (1) Design and construct a bottom-level framework based on the HMETS hydrological model. The framework integrates a snowmelt calculation module, a soil water calculation module, and a slope runoff module. Using the water balance relationship and hydrological flux calculation formula in each module, construct a set of ordinary differential equations to form the basic hydrological calculation logic. (2) For the key hydrological fluxes that significantly affect runoff response in the hydrological model, including actual evapotranspiration, runoff generation mechanism and interflow, formulas with the same function but different calculation principles are systematically selected from multiple industry-recognized classic hydrological models as alternative calculation paradigms. (3) Assign dynamically adjustable weight coefficients to the original formulas and all alternative formulas for each key hydrological flux, and construct flexible hybrid calculation expressions by weighted summation, thereby forming a hybrid structure hydrological model with dynamic adaptive capabilities. (4) Construct a long short-term memory neural network (LSTM) and a deep neural network (DNN). The input features include a dynamic meteorological data sequence that changes continuously over time and static physical properties that characterize the inherent features of the watershed and do not change over time. The output features of the LSTM model correspond to the dynamic weights of the hybrid structure hydrological model, and the output features of the DNN correspond to the static parameters of the hybrid structure hydrological model. (5) The time-varying weights predicted by the LSTM and DNN at each time step and the fixed parameters are input into the hybrid structure hydrological model in real time to drive the model to complete the runoff calculation at that time and obtain the complete runoff process prediction results. (6) The coupling body of the LSTM and the hybrid structure hydrological model is pre-trained using a large-scale, multi-basin public hydrological dataset, so that it learns and masters the complex nonlinear mapping law between "meteorology-basin attributes-optimal model structure"; (7) Prepare local natural attribute data and hydrological and meteorological observation data of the target watershed, and use transfer learning technology to fine-tune the parameters of the pre-trained coupled model in order to realize the rapid transfer and localized deployment of model knowledge and apply it to the high-precision runoff prediction task of the target watershed.
2. The method for optimizing and transferring the structure of an adaptive hydrological model based on deep learning according to claim 1, characterized in that, The underlying framework based on the HMETS hydrological model in step (1) includes a snowmelt calculation module based on the temperature index method, a soil water calculation module based on the multi-layer soil moisture dynamic balance principle, and a slope runoff module based on a linear reservoir model, wherein: (1.1) The snow melting calculation module uses the average daily temperature and snowfall as input, distinguishes between snowfall and rainfall by setting a temperature threshold, and calculates the snow melting amount by combining the snow melting coefficient and temperature difference. At the same time, it considers the water holding capacity of the snow layer and the liquid water release process to determine the amount of snow melting water that can be used to generate runoff. (1.2) The soil water calculation module simulates the infiltration process of surface water into multiple layers of soil and groundwater through the layered soil moisture storage and transfer formula. Specifically, it includes the calculation of surface runoff, water transfer between soil layers, evaporation loss and deep soil leakage, and ensures the water conservation between each component through the dynamic balance constraint of soil moisture. (1.3) The slope runoff module calculates the runoff time and flow distribution of surface runoff and interflow through a linear reservoir model. Surface runoff is based on a fast-response reservoir simulation, and interflow is based on a slow-response reservoir simulation. The flow distribution ratio of each component on the time scale is determined by the reservoir's storage-release relationship.
3. The method for optimizing and transferring the structure of an adaptive hydrological model based on deep learning according to claim 1, characterized in that, In step (2), for the key hydrological fluxes that significantly affect runoff response in the hydrological model, including actual evapotranspiration, runoff generation mechanisms, and interflow, formulas with the same function but different calculation principles are systematically selected as alternative calculation paradigms from multiple industry-recognized classic hydrological models, including the HBV model and the VIC model. Among them: (2.1) The actual evapotranspiration calculation paradigm includes formulas based on energy balance and formulas based on simplified empirical relationships, which are selected from different models to meet the evapotranspiration estimation needs of different meteorological and surface conditions. (2.2) The calculation paradigm of the runoff generation mechanism includes the infiltration formula based on the SCS-CN method and the infiltration formula based on topography, as well as the fast flow formula based on soil moisture state and the fast flow formula based on hydraulic conduction, which are extracted from the HBV model, VIC model or other classical models to cover the runoff generation characteristics of different watersheds. (2.3) The calculation paradigm of interflow includes formulas based on Darcy's law and formulas based on linear storage models, selected from classical models to simulate the dynamic response of interflow under different soil types and topographic conditions; (2.4) The alternative calculation paradigms are systematically compared and analyzed to ensure that the input parameters and output results of each formula are consistent in a physical sense and can be seamlessly integrated into the underlying framework of the HMETS hydrological model.
4. The method for optimizing and transferring the structure of an adaptive hydrological model based on deep learning according to claim 1, characterized in that, In step (3), each key hydrological flux's original formula and all alternative formulas are assigned dynamically adjustable weight coefficients. A flexible hybrid calculation expression is constructed through weighted summation, thereby forming a hybrid structure hydrological model with dynamic adaptive capabilities, wherein: (3.1) The weight coefficients include two processing methods: discrete weight values and continuous weight values. Discrete weight values are generated by the one-hot method, which converts the weight calculation values of each model into a vector containing only a single 1. Continuous weight values are generated by the softmax method, which converts the weight calculation values into a weight vector with values between 0 and 1 and a sum of 1. (3.2) The discrete weights are generated by the one-hot method, specifically by selecting a single optimal formula from the candidate formulas for each key hydrological flux, with the weight value of the corresponding formula in its weight vector being 1 and the rest being 0, so as to achieve selective application of a single formula; (3.3) The continuous weights are generated by the softmax method, which specifically maps the weight calculation values of each candidate formula to the interval between 0 and 1, and ensures that the sum of all weights is 1, so as to achieve a smooth transition of the weighted combination of multiple formulas; (3.4) The hybrid calculation expression is constructed by weighted summation, which integrates the calculation results of each alternative formula. The weights satisfy the summation constraint to ensure the physical consistency and computational stability of the hybrid result. (3.5) The adjustment of the dynamic weight coefficient is achieved through subsequent neural network prediction. The weight is dynamically optimized according to the input meteorological data and watershed attributes to adapt to the calculation needs of different time steps and watershed conditions.
5. The method for optimizing and transferring the structure of an adaptive hydrological model based on deep learning according to claim 1, characterized in that, The dynamic meteorological data sequence and static physical properties in step (4) include: (4.1) The dynamic meteorological data series includes daily precipitation, maximum temperature, minimum temperature, relative humidity, solar radiation and wind speed data, with a daily time resolution; (4.2) Static physical properties include soil type, vegetation cover, average slope, elevation, topographic complexity and watershed area, etc. (4.3) The LSTM model adopts a multi-layer structure, including at least two hidden layers to capture long-term sequence dependencies, and the DNN model includes at least three fully connected layers to extract nonlinear features of static attributes.
6. The method for optimizing and transferring the structure of an adaptive hydrological model based on deep learning according to claim 1, characterized in that, In steps (6) and (7), the coupling of LSTM and hybrid structure hydrological model is pre-trained using large-scale, multi-basin public hydrological datasets, and the pre-trained model is fine-tuned using transfer learning techniques to achieve high-precision runoff prediction for the target basin, wherein: (5.1) The pre-training stage uses a large-scale, multi-basin public hydrological dataset: the CAMELS dataset. Its input includes dynamic meteorological data sequences: precipitation, temperature, relative humidity and static watershed attributes: such as soil type, vegetation cover and average slope. The output is the runoff prediction value. The sliding window length of the meteorological data is set to 365 days to cover the meteorological change process of the past year. (5.2) The input and output features adopt the watershed normalization method. The flow rate is transformed to balance the differences in runoff generation under different watershed areas. The transformed flow rate is used to calculate the square root gradient at the stable zero point. (5.3) The pre-training optimizes the model parameters by minimizing the loss function. The loss function takes into account the difference between the simulated value and the observed value. The weighted parameter is set to 0.25 to balance the loss contribution of the simulated value and the observed value. The training mini-batch contains 100 watersheds, and each watershed contains 365 days of sequence data. (5.4) The fine-tuning stage uses local natural attribute data and hydrological and meteorological observation data of the target watershed (such as the Weihe River or the Hanjiang River) to optimize the parameters of the pre-trained model by minimizing the loss function of the target watershed. The loss function is based on the error between the observed runoff and the predicted runoff of the target watershed. (5.5) The fine-tuned model is used for runoff prediction in the target watershed. By inputting local dynamic meteorological data and static watershed attributes into the model, high-precision runoff prediction results are generated, which are suitable for real-time hydrological forecasting and water resource management in the target watershed.