A Deep Learning Model Building and Forecasting Method Based on Hydrological Mechanism Fusion
By constructing a deep learning model based on the fusion of hydrological mechanisms, the issues of code standardization and readability in the secondary development of hydrological model libraries were resolved. Parallel computing and parameter optimization of multiple computing units were realized, improving the model construction efficiency and application effect, and supporting accurate decision-making in hydrological management and disaster prevention and mitigation.
Patent Information
- Application Number
- CN202511677882.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2045-11-17
AI Technical Summary
Existing hydrological model libraries face challenges during secondary development, including poor code standardization, low readability, lack of automatic differentiation support, and complex model structure adjustments and reconstructions. These issues result in low model building efficiency and poor practical application effects. Furthermore, the integration and optimization of deep learning models with hydrological models present challenges.
We adopt a deep learning model building method based on the fusion of hydrological mechanisms. By constructing three core concepts—flux type, module, and model—we use a broadcast computing strategy and an array-based ordinary differential equation solving method to achieve parallel computing of multiple computing units, and provide a standardized calling interface and automatic differentiation support.
It improves the development efficiency and application flexibility of hydrological models, supports large-scale parameter optimization, reduces computational costs, enhances model construction efficiency and practical application effects, and provides more scientific hydrological forecasting technology support.
Smart Images

Figure CN121118976B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water resource management and forecasting technology, specifically to a general method for building and forecasting deep learning models based on the fusion of hydrological mechanisms. Background Technology
[0002] Against the backdrop of global climate change and frequent extreme weather events, water resource management and forecasting have become increasingly important. Hydrological forecasting refers to the process of predicting and assessing water resources using observational data, meteorological forecasts, and hydrological models. Its goal is to help policymakers formulate effective water resource management strategies and reduce the social and environmental impacts of disasters such as floods and droughts by accurately predicting hydrological elements such as precipitation, runoff, and soil moisture. Hydrological models, as the core tool of hydrological forecasting, simulate the water cycle process through mathematical and physical equations, from precipitation to runoff and changes in water bodies. These models not only provide predictions of future hydrological conditions but also help understand the impact of different factors on hydrological systems.
[0003] With the improvement of computing power and the advancement of data acquisition technology, modern hydrological models are becoming increasingly complex. The integration of hydrological models with deep learning technology has brought about significant breakthroughs. For example, neural networks can replace some calculation formulas in traditional hydrological models, or adaptively adjust model parameters by learning the complex relationships between natural attributes and historical data. This deep learning model based on the fusion of hydrological mechanisms can not only capture more complex nonlinear relationships, but also improve the model's generalization ability, adapting to changing climatic conditions and diverse geographical environments. Therefore, the application of deep learning in hydrological forecasting is gradually becoming a trend, providing a more reliable technical means to solve hydrological forecasting problems in complex environments.
[0004] Despite the immense potential of deep learning technology in hydrological modeling, it still faces numerous challenges in practical applications. Existing hydrological model libraries often suffer from poor code standardization and low readability during secondary development, making model maintenance and expansion difficult. Most traditional hydrological models do not support automatic differentiation calculations; without this support, models cannot fully leverage the advantages of deep learning, resulting in inefficient and ineffective model training and hindering the rapid adaptation of newly proposed forecasting models to real-world applications. Furthermore, hydrological models often require structural adjustments and reconstructions for different watersheds and forecasting scenarios, such as adding or removing snowmelt modules or replacing neural network modules. Each adjustment and reconstruction necessitates modifications to the underlying code, further increasing the complexity of model construction and application.
[0005] Existing hydrological model libraries face a series of technical bottlenecks in the process of integrating deep learning models, including the integration and optimization of hydrological model parameters and neural network parameters, the input-output interface docking when the neural network is embedded in the hydrological model, and the solution of ordinary differential equations of hydrological models under neural network coupling. These challenges pose a huge challenge to the coupling of hydrological models and deep learning, and seriously restrict the model construction efficiency and practical application effect. Summary of the Invention
[0006] To address the current challenges in applying deep learning technology to hydrological models, such as issues with code standardization and readability, lack of automatic differentiation support, complexity of model structure adjustment and reconstruction, and technical bottlenecks in deep learning model fusion, which lead to low model construction efficiency and poor practical application results, this invention aims to provide a general method for building and forecasting deep learning models based on hydrological mechanism fusion.
[0007] To achieve the above objectives, the technical solution of the present invention is as follows.
[0008] This invention provides a method for building and forecasting deep learning models based on the fusion of hydrological mechanisms, comprising the following steps:
[0009] The process involves acquiring the variables involved in the hydrological model and constructing flux types. Then, snowmelt calculation modules and soil calculation modules are constructed separately. The results of these modules are combined to form a runoff generation model. Based on the variables in the runoff generation model's calculation formulas, the calculation relationships between the formulas are determined. A topology graph is constructed based on these relationships, and a network search algorithm is used to obtain the calculation order for each variable. A confluence calculation module is then constructed. Using the confluence calculation module, the runoff evolution simulation of the runoff generation module's calculation results is performed through river network topology calculation and grid confluence calculation, thus constructing a confluence model. The confluence model can be a lumped model, a semi-distributed model, or a distributed model. The lumped model uses the confluence calculation module to adjust the runoff process. The semi-distributed model uses the confluence calculation module in conjunction with the river network topology to connect the outflow processes of each sub-basin, thus obtaining the watershed... The confluence process at the outlet; the distributed model uses a confluence calculation module combined with flow direction information to connect the runoff generation process of each calculation cell. By accumulating the flow direction matrix, the runoff distribution of all calculation cells is obtained. The confluence model can dynamically extract data variables and parameters from the input data according to the calculation requirements, integrate the extracted data variables into key-value pairs, complete the calculation steps, obtain the calculation results, and then synchronously update the calculation results with the key-value pairs in the initial input data. By updating the key-value pairs, the newly generated output variable names and corresponding data variable values are saved to the input data results. In the confluence model simulation calculation, according to the number of calculation cells, a broadcast calculation strategy and an array-based ordinary differential equation solution method are adopted to realize parallel calculation of multiple calculation cells; the runoff generation calculation results of multiple cells are obtained; by integrating the runoff generation calculation results of each cell through the confluence model, the runoff prediction results of the modeled watershed after confluence are obtained.
[0010] Preferably, the variables include input variables and output variables. The input variables are at least one of precipitation, air temperature, sunshine duration, minimum melting temperature, maximum melting temperature, snow cover, and melting coefficient. The output variables are at least one of potential evaporation, snowfall, precipitation, snow melt, evaporation, and runoff. The flux type includes state fluxes, which are at least one of the input variables, the time-varying value of snow cover, and the time-varying value of soil moisture content.
[0011] Preferably, the calculation formula of the snow melting calculation module is as follows:
[0012] Formula for calculating potential evaporation:
[0013] ;
[0014] in, pet Indicates potential evaporation; lday Indicates the duration of sunshine; temp Indicates temperature;
[0015] Snowfall calculation formula: ;
[0016] in, snowfall Indicates the amount of snowfall; Tmin Indicates the minimum temperature at which it melts; temp Indicates temperature;
[0017] Rainfall calculation formula: ;
[0018] in, rainfall Indicates rainfall amount; temp Indicates temperature; Tmin Indicates the minimum temperature at which it melts; prcp Indicates precipitation;
[0019] Snowmelt calculation formula:
[0020] ;
[0021] in, melt Indicates the amount of snow melted; temp Indicates temperature; Tmax Indicates the maximum melting temperature; stepfunc For smooth calculation formula; snowpack Indicates the amount of snow cover; Df Indicates the melting coefficient;
[0022] Formula for calculating the time-varying value of snow cover: ;
[0023] in, This represents the time-varying value of snow cover. snowpack Indicates the amount of snow cover; snowfall Indicates the amount of snowfall; melt This indicates the amount of snow melted.
[0024] Preferably, the calculation formula of the soil calculation module is as follows:
[0025] Evaporation calculation formula: ;
[0026] in, ep Indicates the amount of evaporation; NN ep Represents the evaporation neural network model; snowpack Indicates the amount of snow cover; soilwater Indicates soil moisture content; temp Indicates temperature; P epnn Indicates the parameters of the evaporation model;
[0027] Production flow calculation formula: ;
[0028] in, flow Indicates production flow rate; NN q This represents a flow neural network model; soilwater Indicates soil moisture content; rainfall Indicates rainfall amount; P qnn Indicates the parameters of the flow model; stepfunc This is a formula for smooth calculation.
[0029] Formula for calculating the time-varying value of soil moisture content:
[0030] ;
[0031] in, This represents the change in soil moisture content over a period of time. rainfall Indicates rainfall amount; melt Indicates the amount of snow melted; ep Indicates the amount of evaporation; flow Indicates the output flow rate.
[0032] Preferably, the calculation formula for the runoff generation model is as follows:
[0033] Rainfall calculation formula: ;
[0034] in, rainfall Indicates rainfall amount; temp Indicates temperature; Tmin Indicates the minimum temperature at which it melts; prcp Indicates precipitation; stepfunc This is a formula for smooth calculation.
[0035] Snowmelt calculation formula:
[0036] ;
[0037] in, melt Indicates the amount of snow melted; temp Indicates temperature; Tmax Indicates the maximum melting temperature; stepfunc For smooth calculation formula; snowpack Indicates the amount of snow cover; Df Indicates the melting coefficient;
[0038] Evaporation calculation formula: ;
[0039] in, ep Indicates the amount of evaporation; NN ep Represents the evaporation neural network model; snowpack Indicates the amount of snow cover; soilwater Indicates soil moisture content;temp Indicates temperature; P epnn Indicates the parameters of the evaporation model;
[0040] Production flow calculation formula: ;
[0041] in, flow Indicates production flow rate; NN q This represents a flow neural network model; soilwater Indicates soil moisture content; rainfall Indicates rainfall amount; P qnn Indicates the parameters of the flow model;
[0042] Formula for calculating the time-varying changes in soil moisture content:
[0043] ;
[0044] in, This represents the change in soil moisture content over a period of time. rainfall Indicates rainfall amount; melt Indicates the amount of snow melted; ep Indicates the amount of evaporation; flow Indicates the output flow rate.
[0045] Preferably, the method of using the confluence calculation module to perform the confluence evolution simulation of the calculation results of the flow generation module is to use the Muskingan algorithm to simulate the outflow evolution process between calculation units.
[0046] Preferably, the method for implementing parallel computing across multiple computing units includes the following steps:
[0047] Based on the number of computational units, the input array is divided into two-dimensional matrices. and three-dimensional array ,in i Indicates the dimension of the variable; j Indicates the number of computational units; k Indicates the duration of time; generates functions that perform calculations for a single point in time, as shown below: ;in, I Indicates input variables; O Indicates the output variable; P Indicates the parameters of a conventional model; NN p It represents a neural network; based on array broadcasting and slicing techniques, it slices two-dimensional arrays and three-dimensional arrays along the second and third dimensions, respectively. By dividing the high-dimensional array into multiple subarrays along the specified dimensions, an iterator is generated, and each iteration provides a slice as the data format for function input.
[0048] Preferably, the steps for performing array broadcasting and slicing techniques are as follows: Slice the time dimension of the two-dimensional matrix to generate multiple subarrays, and generate an iterator; broadcast the calculation to match the dimensions of the sliced iterator, and substitute them into the calculation function of the confluence model to obtain the function calculation results for each time period; slice the time and computational unit dimensions of the three-dimensional array, and then perform the calculation of the two-dimensional matrix; through the array broadcasting mechanism, the input parameters are automatically matched with the sliced array to achieve the element-by-element calculation process; set the state variables of the ordinary differential equation used in the calculation as a two-dimensional matrix to represent the state variables of each computational unit at a certain time point; set the ordinary differential equation used in the calculation as follows:
[0049] ;in, Let be the state value of the ordinary differential equation in time interval t. express The differential at time t has a dimension equal to the dimension of the variable multiplied by the number of computational units. P Indicates the parameters of a conventional model; t Indicates time; f It represents an abstracted complex ordinary differential equation; after solving the ordinary differential equation, it obtains an output result that matches the dimension of the input array.
[0050] Preferably, model parameter calibration employs a gradient optimization algorithm to calibrate the model parameters, thereby improving the accuracy of the model's runoff prediction. The specific method is as follows: By setting an objective function, the error between the model's runoff prediction results and the actual observed data is calculated to obtain accumulated computational gradient information; based on the calculated accumulated computational gradient information, the parameters to be optimized in the model are adjusted using a gradient optimization algorithm, gradually optimizing them along the gradient direction to reduce the error and obtain optimized model parameters; the optimized model parameters are then used to generate more accurate prediction results.
[0051] The beneficial effects of this invention are:
[0052] 1. This invention proposes three core concepts: flux, module, and model, to achieve a systematic description of hydrological calculation formulas, calculation modules, and the overall model. It also adopts a broadcast calculation strategy and an array-based ordinary differential equation solution method to achieve parallel computing of multiple calculation units, thereby improving model parameter calibration and calculation efficiency. This solves the problems of low model construction efficiency and poor practical application effect currently faced by the application of deep learning technology in hydrological models.
[0053] 2. This invention aims to improve the development efficiency and application flexibility of hydrological models, provide standardized calling interfaces, support automatic differentiation to deal with large-scale parameter optimization problems, and improve parallel computing methods, thereby achieving distributed computing at a lower computational cost.
[0054] 3. The method of this invention provides more scientific technical support for parameter training and runoff prediction of hydrological forecasting models, which helps to make accurate decisions in hydrological management and disaster prevention and mitigation. Attached Figure Description
[0055] Figure 1 This is a flowchart illustrating the design of a general construction and forecasting method for a deep learning model based on hydrological mechanism fusion in one embodiment of the present invention.
[0056] Figure 2 This is a system framework diagram of a general construction and forecasting method for deep learning models based on hydrological mechanism fusion in one embodiment of the present invention.
[0057] Figure 3 This is a graphical representation of two methods, network evolution and vector evolution, in one embodiment of the present invention.
[0058] Figure 4 This is a schematic diagram illustrating the construction methods of different types of hydrological models in one embodiment of the present invention.
[0059] Figure 5 This is a basic logic diagram for hydrological model calculation in one embodiment of the present invention. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0061] Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0062] Figure 2 This is a system framework diagram of a general construction and forecasting method for deep learning models based on hydrological mechanism fusion, according to one embodiment of the present invention. Figure 2 This invention proposes three core concepts: flux, module, and model. Based on these three core concepts, it constructs hydrological calculation formulas, vertical and horizontal calculation modules, as well as lumped models, distributed models, and semi-distributed models.
[0063] The concept of flux is used to describe the calculation methods for the state of the water cycle, such as variables that can be calculated by formulas for processes like evaporation, infiltration, and runoff generation, state variables in the water tank module, and variables predicted by deep learning models.
[0064] The module concept is divided into two categories: water tank modules and evolution modules. The water tank module corresponds to the vertical calculation in the hydrological model. The water tank module can represent the water cycle process at various levels, such as the surface, soil, and groundwater, and involves solving ordinary differential equations based on mass conservation.
[0065] ;
[0066] in, This represents the time-varying value of an intermediate state variable of a water tank module; This represents the sum of input fluxes in a water tank module, where m represents the total number of input fluxes. This represents the sum of the output fluxes in a water tank module, where n represents the total number of output fluxes.
[0067] According to the law of conservation of mass, the time-varying value of the intermediate state variable of a water tank module It is usually equal to the sum of the input flux in a water tank module. The sum of the output flux of a water tank module The difference; combined with the calculation formulas of each flux, a complex ordinary differential equation can be constructed in a water tank module, and then the time-by-time values of the intermediate state variables of a water tank module can be calculated by numerical solution methods.
[0068] The evolution module is used to calculate the evolution process of the output runoff from the vertical module, and is used for runoff calculations between computational units in lumped, distributed, and semi-distributed models. In runoff calculations in semi-distributed and distributed models, the evolution module needs to determine the runoff logic relationships between each computational unit based on the river network topology or flow direction matrix, and then perform runoff calculations across the entire watershed according to the evolution algorithm. Depending on different evolution methods, such as linear reservoirs and unit hydrographs, the output flow process of the computational unit is obtained.
[0069] The evolution methods for modules are typically simplified forms of the Saint-Venant equations, such as the Muskingan algorithm, linear reservoirs, and unit curves. These computational methods often cannot be expressed by simple formulas; for example, the Muskingan algorithm involves dynamical systems, linear reservoirs consist of multiple ordinary differential equations, and unit curves require matrix convolution calculations. Based on computational characteristics and constraints, they are categorized into global computation, continuous computation, and discrete computation, used for confluence calculations in lumped, distributed, and semi-distributed models, respectively.
[0070] The model integrates fluxes and modules to represent a complete hydrological model. By uniformly managing the attributes and interface specifications of these three concepts and flexibly combining them, lumped or (semi-)distributed hydrological models can be constructed. During the construction process, the model can build a computational network based on the input-output logical relationships of variables, determining the computational order of fluxes and modules.
[0071] This invention uses symbolic programming to define variables involved in the model, such as rainfall, runoff, and soil moisture content, as well as model parameters, such as maximum soil moisture content and outflow coefficient, thereby realizing pre-built model calculation formulas to express water cycle processes such as infiltration, evaporation, and runoff in the model.
[0072] By constructing model calculation formulas through symbolic programming and utilizing the logical relationships between variable inputs and outputs, anonymous functions are generated to achieve efficient construction of zero-parameterized and normalized models. Specifically, this includes:
[0073] Using computer symbolic programming, we define the variables and parameters of the computational formula design, construct the computational formula at the code level, realize the zero-parameter construction of the model, and then integrate multiple fluxes through vertical modules, such as the water tank module, to construct normalized and anonymous functions for flux calculation and ordinary differential equations.
[0074] The method for constructing a zero-parameterized, normalized model is as follows:
[0075] Zero-parameterization relies on scientific computing languages and packages, such as Symbolics.jl, the Sympy library, and languages like Matlab and LISP, to predefine input variables, output variables, and computational parameters in the model's calculation formulas. This eliminates the need to assign values to parameters, allowing the use of predefined variables to represent each calculation formula. For the symbolic representation of deep learning model parameters, a deferred construction method is used to define the computational parameters required by the model, such as the weight matrix. When the formula is used to execute the calculation function, the input parameters are converted into the parameter format required by the model input according to the deferred construction method.
[0076] After expressing multiple sets of calculation formulas, the formulas are combined using metaprogramming mechanisms. Ensuring variable matching, an expression for variable calculation is constructed, serving as the execution body of the function. Then, based on the input variables and calculation parameters, a variable definition module is built within the function, obtained by extracting the input vector according to the variable's index. Finally, based on the output variable information, the calculation results of the expressions are integrated into a vector according to the output variable order, serving as the function output.
[0077] Based on metaprogramming, the flux calculation function is executed within the module's scope, ensuring the input and output structure of the normalized function, as shown below: ;in, I Indicates input variables; O Indicates the output variable; P Indicates the parameters of a conventional model; NN p Represents the parameters of the neural network; fThis represents the flux calculation function. This function performs calculations at a single time point, with both input and output in vector format. It supports time-by-time solution of ordinary differential equations and array broadcast calculations.
[0078] For the symbolic representation of deep learning model parameters, a deferred construction method is used to define the computational parameters required by the model, such as the weight matrix. When the formula is used to perform the calculation function, the input parameters are converted into the parameter format required by the model input according to the deferred construction method.
[0079] The technical solution of the present invention will be further described below through specific embodiments.
[0080] 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.
[0081] like Figure 1 A deep learning model building and forecasting method based on hydrological mechanism fusion includes the following steps:
[0082] Step 1: Using the construction results of the module integration flux, obtain the model calculation formula, extract the input variables, calculation parameters, neural network parameters and output flux of the model calculation formula, and arrange the extracted input variables, calculation parameters, neural network parameters and output flux in the calculation order to construct the function for solving the module equilibrium equation and the solution function for the module included variables.
[0083] Specifically, the construction results of the module integration flux are used to obtain the snowmelt calculation module and the soil calculation module. During module construction, functions for solving the module equilibrium equations and solution functions for the module's included variables are constructed based on the model calculation formulas. The specific method includes the following steps:
[0084] Step 1.1, the calculation formula of the snow melting calculation module is as follows:
[0085] Formula for calculating potential evaporation:
[0086] ;
[0087] in, pet Indicates potential evaporation; lday Indicates the duration of sunshine; temp represents temperature; exp represents an exponential function.
[0088] Snowfall calculation formula: ;
[0089] in, snowfall Indicates the amount of snowfall; Tmin Indicates the minimum temperature at which it melts; temp Indicates temperature;stepfunc This is a formula for smooth calculation.
[0090] Rainfall calculation formula: ;
[0091] in, rainfall Indicates rainfall amount; temp Indicates temperature; Tmin Indicates the minimum temperature at which it melts; prcp Indicates precipitation; stepfunc This is a formula for smooth calculation.
[0092] Snowmelt calculation formula:
[0093] ;
[0094] in, melt Indicates the amount of snow melted; temp Indicates temperature; Tmax Indicates the maximum melting temperature; stepfunc For smooth calculation formula; snowpack Indicates the amount of snow cover; Df This represents the melting coefficient.
[0095] Formula for calculating the time-varying value of snow cover: ;
[0096] in, This represents the time-varying value of snow cover. snowpack Indicates the amount of snow cover; snowfall Indicates the amount of snowfall; melt This indicates the amount of snow melted.
[0097] like Figure 4 Based on the calculation formula of the snow melting calculation module, extract Input variables for the module, representing precipitation, temperature, and sunshine duration, respectively; The output variables are potential evaporation, snowfall, precipitation, and snowmelt, respectively. This is a state variable for the module, representing the amount of snow layer. For smoothing calculation formula The parameters are used for calculation, representing the minimum melting temperature, the maximum melting temperature, and the melting coefficient.
[0098] Step 1.2, the calculation formula of the soil calculation module is as follows:
[0099] Evaporation calculation formula: ;
[0100] in, ep Indicates the amount of evaporation; NN ep Represents the evaporation neural network model; snowpackIndicates the amount of snow cover; soilwater Indicates soil moisture content; temp Indicates temperature; P epnn This represents the parameters of the evaporation model.
[0101] Production flow calculation formula: ;
[0102] in, flow Indicates production flow rate; NN q This represents a flow neural network model; soilwater Indicates soil moisture content; rainfall Indicates rainfall amount; P qnn This represents the parameters of the flow model.
[0103] Formula for calculating the time-varying value of soil moisture content: ;
[0104] in, This represents the change in soil moisture content over a period of time. rainfall Indicates rainfall amount; melt Indicates the amount of snow melted; ep Indicates the amount of evaporation; flow Indicates the output flow rate.
[0105] The soil calculation module uses two neural network models in its calculation formulas. and To construct formulas for calculating evaporation and production flow. For example... Figure 4 Based on the calculation formula of the soil calculation module, extract Input variables for the module, representing snow cover, rainfall, and snowmelt, respectively; The output variables are evaporation rate and production flow rate, respectively. This is the module's state variable, representing the soil moisture content.
[0106] Step 1.3: Based on the calculation formula of the snow melting calculation module in Step 1.1 and the calculation formula of the soil calculation module in Step 1.2, construct the runoff calculation model to simulate the runoff of the calculation unit and support the subsequent runoff calculation.
[0107] Specifically, the soil calculation module and the snowmelt calculation module are components of the runoff generation model, used to construct the runoff generation model. The runoff generation model simulates the rainfall-runoff process, while the confluence model performs confluence calculations on the runoff process of the runoff generation model to simulate the river propagation process.
[0108] The calculation formula for the runoff model is as follows:
[0109] Rainfall calculation formula: ;
[0110] in, rainfall Indicates rainfall amount; temp Indicates temperature; Tmin Indicates the minimum temperature at which it melts; prcp Indicates precipitation; stepfunc This is a formula for smooth calculation.
[0111] Snowmelt calculation formula:
[0112] ;
[0113] in, melt Indicates the amount of snow melted; temp Indicates temperature; Tmax Indicates the maximum melting temperature; stepfunc For smooth calculation formula; snowpack Indicates the amount of snow cover; Df This represents the melting coefficient.
[0114] Evaporation calculation formula: ;
[0115] in, ep Indicates the amount of evaporation; NN ep Represents the evaporation neural network model; snowpack Indicates the amount of snow cover; soilwater Indicates soil moisture content; temp Indicates temperature; P epnn This represents the parameters of the evaporation model.
[0116] Production flow calculation formula: ;
[0117] in, flow Indicates production flow rate; NN q This represents a flow neural network model; soilwater Indicates soil moisture content; rainfall Indicates rainfall amount; P qnn This represents the parameters of the flow model.
[0118] Formula for calculating the time-varying changes in soil moisture content:
[0119] ;
[0120] in, This represents the change in soil moisture content over a period of time. rainfall Indicates rainfall amount; melt Indicates the amount of snow melted; ep Indicates the amount of evaporation; flow Indicates the output flow rate.
[0121] In step 1, the results of constructing the module-integrated model calculation formulas are used to uncover the input-output relationships of each calculation formula in the model, automatically arrange the calculation order of variables, and construct functions for solving the module equilibrium equations and calculation functions for the variables contained in the module. First, the variables involved are defined, and flux types are constructed according to each calculation formula. For common calculation formulas such as potential evaporation, snowfall, rainfall, and snowmelt, simple flux types are used. Formulas for calculating the time-varying values of snow cover and soil moisture content use state flux types, while evaporation and runoff calculation formulas require flux construction methods specific to neural networks. The specific methods are as follows:
[0122] First, for the initial stage, namely the definition of variables and the construction of flux types, it is necessary to clarify all variables involved in the model and construct appropriate flux types for them based on the characteristics of each calculation formula. For common calculation formulas, such as potential evaporation, snowfall, rainfall, and snowmelt calculation formulas, simple flux types are used; while for specific formulas, such as the time-varying values of snow cover and soil moisture content, state flux types are used; and for formulas involving neural networks, such as evaporation and runoff calculation formulas, flux construction methods specifically designed for neural networks are required.
[0123] Next, in the second stage, module construction, the snowmelt calculation module and the soil calculation module are built using the flux results from the first stage. During module construction, functions for solving the equilibrium equations and the solution functions for the variables involved in the module are constructed based on the calculation formulas. Specifically, the snowmelt calculation module includes input variables such as precipitation, temperature, and sunshine duration, and output variables such as potential evaporation, snowfall, rainfall, and snowmelt amount, with snow cover as the module's state variable. The soil calculation module, on the other hand, uses a neural network model to replace the evaporation and flow calculation formulas, calculating the yield and flow rate, i.e., the output variable, based on the input variables and state variables such as soil moisture content.
[0124] Finally, the results from the snowmelt calculation module and the soil calculation module were combined to form a complete runoff generation model. This model can simulate the runoff generation of the calculation units, providing support for subsequent runoff calculations. In this way, the two calculation modules were successfully integrated to construct a runoff generation model capable of comprehensively simulating rainfall-runoff processes.
[0125] In summary, Step 1 is a process of deeply exploring the relationships between model calculation formulas, constructing module equilibrium equation solution functions and variable calculation functions, aiming to form a complete runoff generation model by integrating snowmelt calculation and soil calculation modules.
[0126] Step 2: To meet the computational requirements of the confluence model, a computational method for the confluence model is defined, such as the Muskingan algorithm. Then, based on different confluence computation module types, two computational logics are implemented: river network topology computation and grid confluence computation, to construct semi-distributed and distributed hydrological models. Each computational unit in both the semi-distributed and distributed hydrological models is configured to achieve parallel computation through array broadcasting and slicing. The specific method includes the following steps:
[0127] Step 2.1, Evolution Module Construction.
[0128] For semi-distributed hydrological models, a watershed is divided into multiple sub-watersheds, and the connectivity of each sub-watershed is represented by a directed graph, such as... Figure 3 As shown in (a), a directed graph is constructed to obtain all upstream sub-basins corresponding to each sub-basin. The outflow for evolution of this sub-basin can be obtained by summing the outflows, and then these outflows are used as the inflows of its downstream sub-basins. For distributed hydrological models, a watershed is divided into multiple computational units with a certain precision, such as... Figure 3 As shown in (b), the D8 flow direction information of each calculation unit is calculated using geographic elevation information, which can represent the confluence logic between the calculation units. The main implementation method uses a directional weight matrix, multiplying the calculation result at a certain moment with the weight matrix of the eight directions and summing them to obtain the evolution result of the current flow to the next time period.
[0129] Step 2.2, Evolution method settings.
[0130] For the semi-distributed hydrological model, the Muskinguistic algorithm is used to describe the runoff relationships between sub-basins. The calculation formula is as follows: ;
[0131] in, I t+1 This represents the inflow rate of the unit at time t+1; I t This represents the inflow rate of the unit at time t; Q t+1 This represents the cumulative inflow rate at time t+1. Q t This represents the cumulative inflow rate at time t; C 0 ,C 1 ,C2 The calculation parameters can be represented by the river channel retention time constant. K and channel shape coefficient x get.
[0132] The above calculation formula involves historical variable information, so a dynamic system is constructed to complete the solution.
[0133] For the distributed hydrological model, the Hydrological Discharge model, or HD model for short, is adopted, and the calculation formula is as follows:
[0134] ; ; ;
[0135] in, Q rf This represents the outflow rate under the river's state variables; S river Represents the river channel state variables; Q in This represents the input flow rate during time period t; lag Indicates the flow rate conversion factor; Represents the time-varying values of river channel state variables; Q out This represents the output flow rate during time period t; Q gen This represents the flow rate during time period t; Methods for representing confluence logic.
[0136] Distributed hydrological models require the construction of matrix ordinary differential equations and the use of matrix ordinary differential equations. The method implements the flow calculation logic based on the flow direction matrix.
[0137] Specifically, in step 1, a runoff generation model is constructed using two calculation modules. In step 2, a runoff model is constructed based on the runoff calculation method. The runoff generation model simulates the rainfall-runoff process, while the runoff model performs further runoff calculations on the runoff process from the runoff generation model to simulate the river's propagation process. The soil calculation module and snowmelt calculation module in step 1 are components of the runoff generation model, used to construct it. The results from the snowmelt calculation module and the soil calculation module are combined to obtain the runoff generation model, which simulates the runoff volume of the calculation unit and supports subsequent runoff calculations.
[0138] In steps 1 and 2, three core concepts—flux, module, and model—were proposed for the modular construction of the hydrological model. Based on these concepts, hydrological calculation formulas, runoff generation, and runoff calculation modules were constructed.
[0139] The concept of flux is used to describe the calculation methods of the water cycle state, such as the variables that can be calculated by formulas for processes such as evaporation, infiltration and runoff, the state variables in the water tank module, and the variables predicted by the deep learning model. In step 1, the concept of flux is used to represent the calculation formulas of different intermediate variables in the model.
[0140] The module concept is divided into two categories: flow generation calculation and flow merging calculation.
[0141] Among them, runoff calculation corresponds to vertical calculation in the hydrological model. This module can represent water cycle processes at various levels, including the surface, soil, and groundwater, and involves solving ordinary differential equations based on mass conservation.
[0142] ;in, This represents the time-varying value of an intermediate state variable of a water tank module; This represents the sum of the input fluxes in a water tank module; This represents the sum of the output flux in a water tank module.
[0143] According to the law of conservation of mass, the time-varying value of the intermediate state variable of a water tank It is usually equal to the sum of the input flux in the water tank. Sum of output flux By combining the difference with the calculation formulas for each flux, a complex ordinary differential equation can be constructed in the water tank, and then the time-by-time values of the intermediate state variables can be calculated through numerical solution methods.
[0144] In step 2, the production flow calculation module is used to integrate these calculation formulas:
[0145] First, the module determines the calculation relationships between formulas based on the input and output variables of various calculation formulas in the flow generation model; then, it constructs a topology graph based on these relationships and uses a network search algorithm to obtain the calculation order of each variable; finally, it uses anonymous functions to construct the functions for solving the module's equilibrium equations and the functions for solving the variables involved in the module during the module construction phase, significantly reducing the workload of model development.
[0146] In step 2, the runoff calculation module is used to perform runoff calculations on the runoff generation process output by each unit. For lumped models, the runoff calculation module can be used to adjust the runoff process; for semi-distributed models, the runoff calculation module needs to be used in conjunction with the river network topology to connect the outflow processes of each sub-basin to obtain the runoff process at the basin outlet; for distributed models, the runoff calculation module needs to be used in conjunction with flow direction information to connect the runoff generation processes of each calculation cell, and the runoff distribution of all calculation cells is obtained by accumulating the flow direction matrix.
[0147] The evolution methods for modules are typically simplified forms of the Saint-Venant equations, such as the Muskingan algorithm, linear reservoirs, and unit curves. These computational methods often cannot be expressed by simple formulas; for example, the Muskingan algorithm involves dynamical systems, linear reservoirs consist of multiple ordinary differential equations, and unit curves require matrix convolution calculations. Based on computational characteristics and constraints, they are categorized into global, continuous, and discrete computations, used for confluence calculations in lumped, distributed, and semi-distributed models, respectively.
[0148] In step 2, the flow calculation module is used to perform the flow evolution simulation of the calculation results of the flow generation module, in which the Muskingan algorithm is selected to simulate the outflow evolution process between calculation units.
[0149] Finally, the flux and modules are integrated using the model to represent the complete hydrological model. By uniformly managing the attributes and interface specifications of the three concepts and flexibly combining them, lumped, distributed, or semi-distributed hydrological models can be constructed.
[0150] Step 3: Obtain the input information required for the semi-distributed and distributed hydrological models from Step 2, namely the required input data and input parameters. Prepare the input data by integrating it into key-value pairs. For the input parameters, considering the special characteristics of neural network parameters, the input parameters are vectorized and then stored in key-value pairs along with other hydrological model parameters.
[0151] like Figure 4 Based on the input variables required by the hydrological model, prepare the input data and integrate the input data into key-value pairs. The key-value pairs are constructed as follows: ;in, prcp Indicates precipitation; temp Indicates temperature; lday Indicates the duration of sunshine; As the key name As observational data.
[0152] Based on the runoff generation model in step 1.3 and the confluence model in step 2 of the hydrological model, the required parameters are calculated and constructed. For the neural network model in flux, the initial parameters of the model are obtained using parameter initialization methods such as Xavier, and converted into vector type as model input. The constructed parameter key-value pairs are as follows:
[0153] ;
[0154] in, Tmin Indicates the minimum temperature at which it melts; Tmax Indicates the maximum melting temperature; Df Indicates the melting coefficient; NN ep Represents an evaporation neural network model; NNq Represents a flow neural network model; as well as and Construct into key-value pairs; Indicates the actual value of the parameter; Vectorized data representing the evaporation neural network; Vectorized data representing the flow neural network.
[0155] During the construction process, flux, modules, and models store input and output variables, state variables, parameter information, and neural network information. When using a model, an interface can be called to obtain the initial state of the input variables and the name information of the parameters required for model calculation. Based on the name information, key-value pairs are constructed as input data for model calculation.
[0156] Given the unique parameter structure of neural networks, a deconstruction approach will be used to break down the structured parameters of the neural network into vectorized data and structured information. Only the vectorized data of the model needs to be provided in the input parameters, while the structured information will be stored inside the model and recombined with the vectorized data during the calculation process to form the structured parameters of the model for computation.
[0157] For the preparation of input data, initial states, and model parameters for multiple computational units: Input data is stored using vector type for each computational unit, with the number of vectors matching the number of computational units. Initial states and model parameters are stored using a two-level nested key-value pair structure. The outer key represents the parameter or initial state category of the computational unit, while the inner key corresponds to the specific model parameter name. This structural design takes into account that computational units may be classified based on natural terrain features, thereby achieving grouped management of parameters. This method not only pre-distinguishes parameter categories but also supports parameter sharing and optimization between different computational unit groups, effectively reducing the model calibration cost. For the neural network part, a single network structure is used to serve multiple computational units, rather than building multiple neural networks for different categories. To distinguish computational units with different natural attributes, their attribute values are used as additional inputs to the neural network, achieving differentiation of computational results, reducing model complexity and calibration difficulty, while maintaining adaptability to different natural conditions.
[0158] Step 4: Based on the prepared input data and parameters, complete the parameter calibration and simulation calculations for the model. For example... Figure 5The model extracts the relevant input data and parameters according to the requirements, integrates the extracted input data into key-value pairs, completes all calculation steps, and updates the key-value pairs in the input data, as well as the newly generated output variable names and corresponding data variable values. After the calculation is completed, the model updates the key-value pairs in the input data and records the newly generated output variable names and corresponding data variable values, so that they are completely stored in the input data structure for subsequent calculations.
[0159] In both the semi-distributed and distributed hydrological models, each computational unit is parallelized through array broadcasting and slicing. Specifically, for calculations involving multiple computational units, the model employs array broadcasting and slicing techniques, using array-based ordinary differential equation solving methods to achieve parallel computation across multiple units, improving model parameter calibration and computational efficiency. This yields runoff calculation results for multiple units. Then, the runoff process of each unit is integrated using the confluence model from step 2 to obtain the runoff prediction results for the modeled watershed after confluence.
[0160] The model performs a series of calculations based on the given input data. During this process, the model dynamically extracts the necessary data variables and parameters from the input data according to computational needs, ensuring sufficient information support for each calculation step. Each operation may involve different parameter combinations and variable usages; the model automatically identifies the required data and extracts it flexibly to avoid redundancy or repeated calls. After the calculation is complete, the model synchronously updates the results with the key-value pairs in the initial input data. By adding or replacing key-value pairs, the model records the newly generated output variable names and corresponding data variable values one by one, ensuring they are completely preserved in the input data structure. In this way, the updated data not only contains the initial input information but also incorporates the latest computational results, providing data support for subsequent calculation steps. This step-by-step update method ensures seamless connection between the calculation results of each stage, forming a closed-loop computational process.
[0161] To address the computational needs of multiple computing units, a broadcast computing strategy and an array-based ordinary differential equation solving method are employed to achieve parallel computing across multiple computing units, thereby improving model parameter calibration and computational efficiency. Specifically, in model simulation calculations, the input array dimension can be divided into a two-dimensional matrix based on the number of computing units. and three-dimensional array ,in These represent the variable dimension, the number of computational units, and the time duration, respectively.
[0162] Generate a function that performs calculations for a single point in time, as shown below: ;in, I Indicates input variables; O Indicates the output variable;P Indicates the parameters of a conventional model; NN p This represents the parameters of the neural network. The function calculates at a single time point, with both input and output in vector format, supporting time-by-time solutions to ordinary differential equations and array broadcast computation.
[0163] Based on array broadcasting and slicing techniques, two-dimensional and three-dimensional arrays are sliced along the second and third dimensions, respectively. By dividing the high-dimensional array into multiple subarrays along the specified dimensions, an iterator is generated, and each iteration provides a slice as the data format for function input.
[0164] Since the generated computation function only supports a single time point, array broadcasting and slicing techniques are required when using it for calculations on two-dimensional matrices and three-dimensional arrays, as follows:
[0165] Two-dimensional matrices are often used to represent the input of a single computational unit. Therefore, it is only necessary to slice the time dimension of the matrix to generate multiple subarrays. During model computation, the input parameters are usually only for a single point in time, meaning the parameters are assumed not to change over time. Therefore, broadcast computation is needed to match the dimensions of the sliced iterators, and finally, all parameters are substituted into the computation function to obtain the function computation results for each time period.
[0166] Three-dimensional arrays are often used to represent the input of multiple computational units. It is necessary to slice the array in terms of time and computational unit dimensions. Compared with a single computational unit, the difference of a three-dimensional array is that multiple computational units have their own unique input parameters. Therefore, when slicing in terms of computational unit dimensions, it is necessary to slice both the array and the parameters at the same time, and then perform the calculation of the two-dimensional matrix.
[0167] Through the array broadcasting mechanism, the input parameters are automatically matched with the slice array to realize the element-by-element calculation process, and finally obtain the output results that conform to the corresponding dimensions.
[0168] For ordinary differential equation calculations across multiple computational units, to ensure simultaneous solution across all units, the state variables of the equations are defined as a two-dimensional matrix, representing the state variables of each computational unit at a given time point. The defined ordinary differential equations are as follows: ;in, The state value of the ordinary differential equation at time t is given by the dimension being the variable dimension × the number of computational units. P Indicates the parameters of a conventional model; t Indicates time; f This represents the ordinary differential function. After solving the equation, the output result, which matches the dimension of the input array, can be obtained.
[0169] Step 5: To improve the accuracy of runoff prediction, a gradient optimization algorithm is used to calibrate the model parameters. Details are as follows:
[0170] First, by setting an appropriate objective function, the error between the model's runoff prediction results and the actual observed data in step S4 is calculated to obtain accumulated computational gradient information. Then, based on the calculated accumulated gradient information, gradient optimization algorithms, such as Adam and SGD, are used to adjust the parameters to be optimized in the model, progressively optimizing them along the gradient direction to continuously reduce the error. Specifically, the optimizer adjusts the model parameters step-by-step according to a set learning rate to ensure stable convergence of the optimization process, obtaining optimized model parameters. Finally, the optimized model parameters are used to generate more accurate prediction results, improving the overall forecasting capability and reliability of the model.
[0171] Specifically, it stores the computational gradients of each stage of the model and calculates the gradients of ordinary differential equations using the adjoint method, supporting automatic differentiation functionality, including:
[0172] Leveraging the characteristics of scientific computing languages and deep learning libraries, the computational gradient of each formula in the model is stored. For complex systems such as ordinary differential equations and dynamical systems involved in the vertical and longitudinal modules, the adjoint method is used to capture the gradient changes of the system, thereby enhancing the adaptability and stability of complex systems when calculating gradients.
[0173] Automatic differentiation is a crucial foundation for gradient descent algorithms and optimizing large-scale parameters. Its core principle is to treat a function as a combination of basic operators, such as addition, multiplication, and exponentiation, each with a known derivative formula. By differentiating each node in the computational graph formed by these operators, automatic differentiation calculates the function's derivative based on the chain rule, using both forward and backward modes.
[0174] Suppose we have a function that represents a combination of simple operations, such as
[0175] Where x is the initial independent variable. Let f represent functions acting sequentially on the input, with the output of each function serving as the input to the next, ultimately yielding the output (f) of the composite function. The derivative can then be calculated using the chain rule:
[0176] Among them, the partial derivative of each term Indicates the current function Its input The rate of change, the entire product reflects the change from the initial variable To the final output The former involves tracking only one derivative value per computational path, making it suitable for situations with a small input dimension and a large output dimension; the latter is suitable for situations with a large input dimension and a small output dimension, such as neural network training.
[0177] For solving complex problems such as ordinary differential equations and dynamical systems, the adjoint method is required to calculate the Jacobian matrix of the system. The calculation formula is as follows: ;in, Let f denote the Jacobian matrix, f represent the ordinary differential equation, x(t) be the input variable, P be the function input parameters, and t be the time interval. This represents the gradient with respect to x.
[0178] Combining the partial derivatives of the loss function with respect to the state Constructing companion variables Differential equations:
[0179] ;in, This represents the partial derivative of the loss function with respect to the state; This represents the accompanying variable, and T is the matrix transpose operator.
[0180] Finally, the adjoint equation is solved in reverse time and used to obtain the loss function through numerical integration. The gradient for all parameters: ;in, Represents the loss function; Indicates the accompanying variable. This represents the partial derivative of a function in an ordinary differential equation with respect to parameters. (Integral symbol) This represents the summation of the effects at each moment over the entire time interval, thus obtaining the overall impact of the parameters on the objective function.
[0181] Specifically, by applying the gradient descent algorithm and utilizing the recorded gradient information, the objective function is optimized relative to the parameters to be optimized, thereby achieving rapid optimization of large-scale parameters in distributed or deep models. Specific methods include:
[0182] Based on the recorded gradient information, the objective function is obtained. For parameters gradient That is, the direction in which the objective function value increases fastest at the current parameter point, and then the parameters are updated according to the gradient:
[0183] ;in, This indicates the parameter updated in time period t+1; This indicates the parameter updated during time period t; Describe the objective function For parameters The gradient of t. t represents each update process. By repeatedly performing this process, the loss function gradually stabilizes, meaning the optimization process converges.
[0184] Based on the gradient descent algorithm, this embodiment of the invention can utilize the gradients stored in the model calculation to perform parameter calibration on various complex hydrological models, including deep learning coupled models and distributed models, thereby improving the computational performance, accuracy, and stability of parameter calibration results.
[0185] In summary, the embodiments of this invention aim to improve the development efficiency and application flexibility of hydrological models, provide standardized calling interfaces, support automatic differentiation to address large-scale parameter optimization problems, and improve parallel computing methods, thereby achieving distributed computing at a lower computational cost. The methods of these embodiments provide more scientific technical support for parameter training and runoff prediction of hydrological forecasting models, contributing to accurate decision-making in hydrological management and disaster prevention and mitigation.
[0186] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A deep learning model building and forecasting method based on hydrological mechanism fusion, characterized in that, The method comprises the following steps: Obtain variables involved in the hydrological model, and build a flux type; Then, a snowmelt calculation module and a soil calculation module are respectively built; the results of building the snowmelt calculation module and the soil calculation module are spliced to form a runoff generation model; According to the variables of the calculation formula of the runoff generation model, the calculation relationship between the calculation formulas of the runoff generation model is determined; According to the determined calculation relationship, a topological graph is built, and the calculation order of each variable is obtained by using a network search algorithm, and then a confluence calculation module is built; According to the confluence calculation module, the confluence evolution simulation of the calculation results of the runoff generation module is performed by using the confluence calculation module in a manner of river network topology calculation and grid confluence calculation, and a confluence model is built; the confluence model is a lumped model, a semi-distributed model or a distributed model; wherein the lumped model adjusts the runoff process by using the confluence calculation module; the semi-distributed model connects the outflow process of each sub-basin by using the confluence calculation module in combination with the river network topology, to obtain the confluence process of the outlet of the basin; and the distributed model connects the runoff process of each calculation cell by using the confluence calculation module in combination with the flow direction information, and accumulates through a flow direction matrix to obtain the runoff distribution of all calculation cells; The confluence model can dynamically extract data variables and parameters from input data according to the calculation requirement, integrate the extracted data variables into key-value pairs, complete the calculation steps, obtain the calculation results, and then synchronously update the key-value pairs in the initial input data, so that the newly generated output variable name and the corresponding data variable value are saved to the input data results through the updated key-value pairs; In the simulation calculation of the confluence model, the parallel calculation of multiple calculation units is realized by using a broadcast calculation strategy and an array-based ordinary differential equation solving method according to the number of calculation units, so as to improve the model parameter calibration and calculation efficiency; and the runoff calculation results of multiple units are obtained; The runoff prediction results of the modeled basin after confluence are obtained by integrating the runoff calculation results of each unit through the confluence model; The method for realizing the parallel calculation of multiple calculation units comprises the following steps: Depending on the number of computation units, the dimensions of the input array are either two-dimensional matrices or three-dimensional arrays where i denotes the variable dimension; j denotes the number of computation units; k denotes the time length; A function for calculating at a single time point is generated as follows: ; wherein, I represents an input variable; O represents an output variable; P represents a constant model parameter; NN p represents a neural network parameter; Based on array broadcasting and slicing technology, a two-dimensional array and a three-dimensional array are respectively sliced along the 2nd dimension and the 3rd dimension; by dividing the high-dimensional array into multiple sub-arrays along the specified dimension, an iterator is generated, and each iteration provides a slice as the data format of the function input; The steps of executing the array broadcasting and slicing technology are as follows: The time dimension of the two-dimensional matrix is sliced to generate multiple sub-arrays after slicing, and an iterator is generated; by broadcast calculation, the parameters are matched with the dimensions of the sliced iterator, and are substituted into the calculation function of the confluence model to obtain the function calculation results at each time period; The time and calculation unit dimensions of the three-dimensional array are sliced, and then the calculation of the two-dimensional matrix is performed; By using the array broadcasting mechanism, the input parameters are automatically matched with the sliced array to realize the element-by-element calculation process; the state variables of the ordinary differential equation used for calculation are set as a two-dimensional matrix, which is used to represent each state variable of each calculation unit at a certain time point; and the ordinary differential equation used for calculation is set as follows: ; wherein, is a state value of the ordinary differential equation at a time period t, denotes a time period change value of, with a dimension of variable dimension × number of calculation units; t denotes time; After the ordinary differential equation is solved, an output result matching the dimension of the input array is obtained. 2.The hydrological mechanism fusion-based deep learning model building and forecasting method according to claim 1, characterized in that, The variables include input variables and output variables, the input variables are at least one of precipitation, air temperature, sunshine duration, minimum temperature for thawing, maximum temperature for thawing, snow cover and thawing coefficient; and the output variables are at least one of potential evaporation, snowfall, rainfall, snowmelt, evaporation and runoff. The flux types include state flux, and the state flux is at least one of the input variables, the time period change value of the snow cover and the time period change value of the soil water content. 3.The hydrological mechanism fusion-based deep learning model building and forecasting method according to claim 2, characterized in that, The calculation formula of the snowmelt calculation module is as follows: Potential evaporation calculation formula: ; wherein, pet represents potential evapotranspiration; lday represents the length of the day; temp represents the air temperature; exp denotes an exponential function; Snowfall calculation formula: ; wherein, snowfall represents the amount of snowfall; Tmin represents the minimum temperature for thawing; stepfunc is a smoothing calculation formula; Rainfall calculation formula: ; wherein rainfall represents the amount of rainfall; prcp represents the amount of precipitation; Snowmelt calculation formula: ; wherein, melt represents the amount of snow melting; Tmax represents the maximum temperature of melting; snowpack represents the amount of snow layer; Df represents the melting coefficient; The snow layer amount period change value calculation formula is: ; wherein represents the time period change value of the snow layer amount. 4.The hydrological mechanism fusion-based deep learning model building and forecasting method according to claim 3, characterized in that, The calculation formula of the soil calculation module is as follows: Evaporation amount calculation formula: ; wherein, ep represents an evaporation amount; NN ep represents an evaporation neural network model; soilwater represents a soil water content; P epnn represents an evaporation model parameter; Production flow rate calculation formula: ; wherein, flow represents a production flow rate; NN q represents a flow rate neural network model ;P qnn represents a flow rate model parameter; The time period change value of the soil water content calculation formula: ; wherein, represents the time period change value of the soil water content. 5.The hydrological mechanism fusion-based deep learning model building and forecasting method according to claim 1, characterized in that, The method for using the confluence calculation module to perform the confluence evolution simulation of the runoff calculation result of the runoff calculation module is to simulate and calculate the outflow evolution process between units by using the Muskingum algorithm. 6.The hydrological mechanism fusion-based deep learning model building and forecasting method according to claim 1, characterized in that, The model parameter calibration is to calibrate the model parameters by using the gradient optimization algorithm to improve the runoff prediction accuracy of the model, and the specific method is as follows: By setting the objective function, the error between the model runoff prediction result and the true observation data is calculated to obtain the cumulative calculation gradient information; According to the calculated cumulative calculation gradient information, the gradient optimization algorithm is used to adjust the to-be-optimized parameters in the model to gradually optimize along the gradient direction, so as to reduce the error and obtain the optimized model parameters; the optimized model parameters are used to generate more accurate prediction results.
Citation Information
Patent Citations
Construction method of Xinanjiang model based on ordinary differential equation set and hydrological forecasting method of Xinanjiang model
CN115422779A
Mesoscale convection parameter optimization method and system based on genetic algorithm
CN120316530A