Topology-aware global river AI basic model implementation and fine adjustment method

By constructing a topology-aware global river AI foundation model, the problems of high computational cost and insufficient topological characterization in existing technologies have been solved, enabling accurate prediction of multivariate hydrological data across the entire river network and meeting the needs of global water cycle analysis and flood risk prevention.

CN121936330APending Publication Date: 2026-04-28BEIJING NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING NORMAL UNIVERSITY
Filing Date
2025-11-27
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing global river hydrological forecasting technologies suffer from problems such as high computational costs, large errors due to model simplification, lack of topological awareness in data-driven models, and limitations imposed by the sparsity of observational data when applied on a global scale. These issues result in insufficient forecast accuracy and adaptability, and a loss of physical consistency, especially in extreme events.

Method used

We construct a global river AI foundation model with topology awareness. By explicitly encoding river topology, adopting a pre-training-fine-tuning paradigm and a lightweight architecture, and combining static feature, temporal state, and topological relationship encoders, we can achieve accurate prediction of multivariate hydrological data across the entire river network, adapting to the needs of global water cycle analysis and flood risk prevention and control.

Benefits of technology

While controlling computational costs, it enables universal learning and rapid regional fine-tuning of global-scale hydrodynamic laws, providing reliable technical support for water resource management and flood risk prevention, and improving the physical consistency and accuracy of predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121936330A_ABST
    Figure CN121936330A_ABST
Patent Text Reader

Abstract

The invention provides a topology-aware global river AI basic model implementation and fine adjustment method. The method comprises the following steps: constructing a global river multivariable hydrological data set; constructing a global river AI basic model with topology perception capability; finely adjusting the global river AI basic model; and outputting and applying the fine-tuned global river AI basic model. According to the topology-aware global river AI basic model implementation and fine tuning method provided by the invention, the river topology is explicitly coded, a pre-training-fine tuning normal form and a lightweight architecture are constructed, and the whole river network hydrological multivariable accurate prediction and desktop-level hardware rapid reasoning are realized; and the requirements of global water circulation analysis, water resource management and flood risk prevention and control are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of water conservancy engineering, and in particular to a method for implementing and fine-tuning a topology-aware global river AI basic model. Background Technology

[0002] Accurate forecasting of global river hydrological elements is a core technological foundation for global water cycle analysis, regional water resource optimization management, and extreme flood risk prevention, and is of great significance for ensuring ecological security and sustainable economic and social development. With the intensification of global climate change, water-related natural disasters are occurring more frequently. Over the past fifty years, water-related natural disasters have accounted for 70% of all natural disaster deaths; since 2000, the frequency of flood events has increased by 134% compared to the previous two decades, affecting approximately 1.86 billion people and causing more than US$1.05 trillion in economic losses between 2000 and 2024. The World Meteorological Organization points out that investment in early warning systems for water-related disasters such as floods and droughts can yield more than tenfold returns; a 24-hour storm warning alone can reduce disaster losses by at least 30%.

[0003] Currently, global river hydrological prediction technologies are mainly divided into two categories: one is physical mechanism-driven models, represented by classic numerical river models (NRMs) such as SWAT and HEC-HMS. These models simulate hydrological processes by constructing hydrodynamic control equations and rely on a large number of parameters such as topography, soil, and vegetation for calibration and solution. Although these models have clear physical mechanisms and good process transparency, they face significant bottlenecks in global-scale applications: firstly, the computational cost is extremely high, requiring high-performance computing clusters, and ordinary desktop hardware cannot support real-time prediction needs; secondly, to simplify actual hydrological processes, models often generalize key mechanisms, such as simplifying unsaturated zone water movement to linear infiltration, setting constant channel roughness, and ignoring hydrodynamic interactions between small-scale tributaries. Such simplifications can easily lead to error amplification under extreme rainfall or overflow conditions, affecting prediction accuracy. The other technical approach is data-driven models, encompassing everything from traditional statistical methods to deep learning architectures such as LSTM and convolutional neural networks (CNNs). These methods construct predictive mappings based on historical observation data and perform well in local short-duration predictions, but they have fundamental limitations: First, their performance is highly dependent on the quality and coverage of the training data, while about 60% of the global watersheds lack effective observations, especially in terms of synchronous data on multiple variables such as water depth and water storage, which leads to a significant decrease in the model's generalization ability in areas without monitoring stations; Second, traditional deep learning models fail to effectively characterize the essential structural features of river systems—the topological relationships of natural graphs.

[0004] River systems are inherently graph-structured systems, with their hydrological processes governed by non-Euclidean spatial relationships. Existing methods such as LSTM treat each station as an independent unit, ignoring upstream-downstream connectivity and failing to capture the laws governing hydrodynamic transmission. Grid-structured models like CNNs struggle to adapt to the dynamic topological changes in river networks (such as seasonal channel shrinkage and flood-season boundary expansion), resulting in a disconnect between model representation and actual physical processes. Topological information not only encodes the spatial configuration of rivers but also drives multivariate coupling processes. Ignoring this structure leads to significant errors in the coordinated prediction of key variables such as flow, depth, and storage capacity, especially in extreme events where physical consistency is lost.

[0005] In recent years, although there has been a trend towards integrating physical mechanisms with data-driven approaches, existing methods have not yet formed a collaborative framework of "globally applicable and regionally adaptable," leaving technological gaps in cross-scale multivariate prediction. While physical models have clear mechanisms, their high computational costs and excessive reliance on assumptions limit their widespread deployment in practical hydrological operations. Data-driven models, while possessing the potential for rapid inference, are constrained by the sparsity and uneven distribution of global observational data, making unified and large-scale modeling difficult. Current technologies have failed to achieve integrated management of "river dynamics mechanisms, topological sensing, multivariate collaboration, and sparse data adaptation," leaving accurate and efficient prediction of multiple global river hydrological elements still a technological blind spot.

[0006] Existing research indicates that for complex urban hydrological and hydrodynamic systems like urban flooding, decoupling the system, especially emphasizing the dynamic information of the drainage system, can improve the accuracy and interpretability of the model to some extent. However, existing methods only stay at the level of "physical supervision information" and do not deeply integrate physical mechanisms (such as the core constraints of the Saint-Venant equation and the shallow water equation), which cannot fundamentally explain the causal relationship of the flooding process, and are not adaptable enough to complex urban environments (such as differences in pipe network layout and topographic changes).

[0007] In September 2025, H Wang, J Chen, Y Zheng, and X Song published an article titled "Accelerating Flood Warnings by 10 Hours: The Power of River Network Topology in AI-enhanced Flood Forecasting" in *Natural Hazards*. This article argued that climate change-induced floods require advanced predictive models, but Graph Neural Networks (GNNs) fail to fully utilize the topological advantages due to the excessive compression of high node resistance distances caused by the tree-like structure of river network topologies. This study reveals this limitation and proposes a graph transformation method based on reachability to densify topological connections, thereby reducing resistance distances. Empirical tests show that the transformed GNN outperforms EA-LSTM in extreme flood prediction, with its 24-hour water level prediction accuracy comparable to EA-LSTM's 14-hour prediction—a 71% improvement in long-term prediction timeliness. This dense graph preserves the flow dynamics in the hierarchical river network branches, enabling the GNN to capture distant node interactions crucial for rare flood events. This topological innovation bridges the gap between river network structure and GNN modeling, providing a scalable framework for early warning systems. The drawback of this method is that it has not yet revealed the role of the river's original topology and has not adopted a two-way river topological relationship, and the simulation of the river's backwater and backwater effects is basically lacking. Summary of the Invention

[0008] To address the aforementioned technical challenges, this invention proposes a topology-aware global river AI foundation model implementation and fine-tuning method. By explicitly encoding river topology, constructing a pre-training-fine-tuning paradigm, and employing a lightweight architecture, it enables accurate prediction of multivariate hydrological data across the entire river network and rapid inference on desktop hardware, meeting the needs of global water cycle analysis, water resource management, and flood risk prevention.

[0009] The purpose of this invention is to provide a method for implementing and fine-tuning a topology-aware global river AI basic model, including constructing a global river multivariate hydrological dataset, and further including the following steps:

[0010] Step 1: Construct a global river AI foundation model with topology awareness capabilities;

[0011] Step 2: Fine-tune the global river AI base model;

[0012] Step 3: Output and apply the fine-tuned global river AI base model.

[0013] Preferably, the construction of the global river multivariate hydrological dataset includes the following sub-steps:

[0014] Step 01: Collect and process static data;

[0015] Step 02: Integrate meteorological and hydrological data;

[0016] Step 03: Distributed river hydrodynamic model simulation.

[0017] In any of the above schemes, it is preferred that the static data includes river channel geometric parameters, watershed topographic parameters, and river network topology parameters.

[0018] In any of the above schemes, it is preferred that the meteorological and hydrological data include meteorological forcing data and hydrological state variables.

[0019] In any of the above schemes, it is preferred that the distributed river hydrodynamic model takes the integrated meteorological and hydrological data as input, solves the physical control equations through numerical methods, generates a continuous multivariate hydrodynamic state time series covering global river sections, and uses the output of the distributed river hydrodynamic model as a supervision label for the pre-training of the global river AI basic model.

[0020] In any of the above schemes, the global river AI basic model preferably includes a static feature encoder, a temporal state encoder, and a topological relationship encoder.

[0021] In any of the above schemes, the static feature encoder's operation method includes the following sub-steps:

[0022] Step 101: Using a broadcast mechanism, transmit the static feature vectors from the global river multivariate hydrological dataset. Copy and extend along the time axis to all time steps t of the same dynamic input data to generate a time series. , where s i Let be the static feature vector of node i. d s The number of static information dimensions. It is the space of real numbers;

[0023] Step 102: Perform feature splicing and fusion.

[0024] In any of the above schemes, step 102 preferably includes, at each time step t, the static features after broadcast. Will change with the historical river state and meteorological and hydrological forcing data The features are concatenated along the feature dimension to form a comprehensive feature tensor. The formula is:

[0025] .

[0026] In any of the above schemes, it is preferred to use the comprehensive feature tensor The input is fed into a multilayer perceptron with residual connections for deep feature fusion, as shown in the formula:

[0027]

[0028] The MLP consists of two fully connected layers and a ReLU activation function. This is an enhanced feature that combines static backgrounds with dynamic contexts.

[0029] In any of the above schemes, it is preferred that the time-state encoder calculates a state increment through the gating mechanism of the GRU. Then, the current hidden state is updated via residual join:

[0030]

[0031] Among them, z (t+1) This is the hidden state from the previous time step. .

[0032] In any of the above schemes, the state increment is preferred. The calculation method includes the following sub-steps:

[0033] Step 111: Generate a gating signal;

[0034] Step 112: Calculate candidate residuals;

[0035] Step 113: Residual fusion and state update.

[0036] In any of the above embodiments, step 111 preferably includes updating the gate. The formula for controlling the retention ratio of new and old information is as follows:

[0037]

[0038] Where σ is the activation function, W u To update the gate transformation matrix, h (t) The input features from the spatial fusion module at the current moment, b u To update the gate bias matrix.

[0039] In any of the above solutions, step 111 preferably further includes resetting the door. The formula for controlling the influence of the previous state on the candidate state is as follows:

[0040]

[0041] Among them, W rTo reset the gate transformation matrix, b r To reset the gate bias matrix.

[0042] In any of the above schemes, step 112 preferably includes generating candidate residuals using reset gate modulation history information. The formula is

[0043]

[0044] Among them, W z To reset the gate modulation term transformation matrix, b z This is to reset the gate modulation term bias matrix.

[0045] In any of the above schemes, step 113 preferably includes using an update gate to perform a weighted fusion of the candidate residual and the previous state to obtain the final state increment. ,

[0046] .

[0047] Preferably, in any of the above schemes, the operation method of the topology encoder includes the following sub-steps:

[0048] Step 121: Construct a symbolic graph convolutional layer;

[0049] Step 122: Construct a neighbor aggregation mechanism;

[0050] Step 123: Disseminate multi-layered information;

[0051] Step 124: Fuse features and output.

[0052] In any of the above schemes, step 121 preferably includes representing the global river network as a directed graph. , The total set of nodes in the river segment. For the overall audit of topological link relationships;

[0053] For each river section Upstream Neighbor Set Downstream Neighbor Set , where v i For the river segment including node i, e ji e represents the direction of water flow from node j to node i. ik For the outflow section v i The topological connection relationship.

[0054] In any of the above schemes, step 122 preferably includes aggregating upstream and downstream influences respectively, and aggregating upstream features. The formula is

[0055]

[0056] Downstream Feature Aggregation The formula is

[0057]

[0058] in, This is the upstream information aggregation matrix of layer l. This represents the hidden state of upstream information at layer l-1. This refers to the information hiding state of layer l-1 itself. The upstream information bias matrix of layer l, This is the downstream information aggregation matrix of layer l. This represents the downstream information hiding state of layer l-1. The downstream information bias matrix of layer l. It is a small constant.

[0059] In any of the above schemes, step 123 preferably includes information propagating through cross paths in a deep network.

[0060]

[0061] in, This represents the upstream forward information hiding state of layer l-1. This represents the downstream forward information hiding state of layer l-1. This represents the hidden state of positive upstream information in layer l-1. This represents the downstream reverse information hiding state of layer l-1. This represents the hidden state of upstream reverse information at layer l-1. This represents the hidden state of the downstream reverse information of layer l-1 itself.

[0062] In any of the above schemes, step 124 preferably includes fusing the final node features through learnable weights. The formula is

[0063]

[0064] in, These are trainable parameters.

[0065] In any of the above schemes, the preferred option is that the overall loss function L of the global river AI basic model is:

[0066] L=λ base ·L base +λ bw ·L bw

[0067] Where, λ baseand λ bw For hyperparameters, L base Based on the mean squared error loss function, L bw This is the weighted loss function for hydraulic gradient.

[0068] In any of the above schemes, it is preferred that the basic mean squared error loss function is used to ensure the overall prediction accuracy of the model across the entire dataset, and the formula is:

[0069]

[0070] in, and y i (t) represents the predicted and actual values ​​of node i at time t, respectively. The total number of time steps. This represents the total number of nodes.

[0071] In any of the above schemes, it is preferred that the hydraulic slope weighted loss function is used for reinforcement learning in areas with gentle river slopes, and the formula is as follows:

[0072]

[0073] Among them, w i (t) represents the weighting coefficient.

[0074] In any of the above schemes, it is preferred to determine the weighting coefficient w through an automated calculation process based on the empirical distribution of global hydraulic gradient. i (t), the formula is

[0075]

[0076] Wherein, F(s) i (t) represents the hydraulic gradient s. i (t) is the percentile of the global empirical cumulative distribution function, γ is the hyperparameter, is the expectation operator, and F(s) is the percentile of the hydraulic gradient s of a specific river segment in the global empirical cumulative distribution function.

[0077] The binary search automatically adjusts the weight ratio to meet the target.

[0078]

[0079] Among them, Q 0.25 R is the 25th percentile of the hydraulic gradient. traget is the preset target weight ratio, and w is the weighting parameter for river segment loss.

[0080] In any of the above solutions, step 2 preferably includes the following sub-steps:

[0081] Step 21: Adjust historical observation data;

[0082] Step 22: Data partitioning and validation;

[0083] Step 23: Fine-tune the learning rate of the key layers, applying differentiated learning rates to different layers.

[0084] In any of the above embodiments, step 23 preferably includes performing the following operations during fine-tuning:

[0085] 1. Open the key layer to adapt to local features;

[0086] 2. Freeze the other layers in the model except for the key layer and their parameters;

[0087] 3. Fine-tune the parameters of the key layer, limiting the initial learning step size to 1% of the training period.

[0088] In any of the above schemes, it is preferred that the key layer includes the final result output layer, as well as the last layer of the graph topology encoder and the time encoder.

[0089] This invention proposes a topology-aware global river AI basic model implementation and fine-tuning method, which can achieve universal learning of global-scale hydrodynamic laws and rapid regional fine-tuning while controlling computational costs, providing reliable technical support for global and regional water cycle analysis, water resource allocation and flood risk prevention. Attached Figure Description

[0090] Figure 1 This is a flowchart of a preferred embodiment of the implementation and fine-tuning method for a topology-aware global river AI basic model according to the present invention.

[0091] Figure 2 A flowchart of another preferred embodiment of the implementation and fine-tuning method of the topology-aware global river AI basic model according to the present invention. Detailed Implementation

[0092] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0093] Example 1

[0094] like Figure 1 As shown, a method for implementing and fine-tuning a topology-aware global river AI basic model is described. Step 1000 involves constructing a global river multivariate hydrological dataset, including the following sub-steps:

[0095] Perform step 1010 to collect and process static data, which includes river channel geometric parameters, watershed topographic parameters, and river network topology parameters.

[0096] Step 1020 involves integrating meteorological and hydrological data, which includes meteorological forcing data and hydrological state variables.

[0097] Step 1030 is executed: a distributed river hydrodynamic model is used for simulation. The distributed river hydrodynamic model takes the integrated meteorological and hydrological data as input, solves the physical control equations through numerical methods, generates a continuous multivariate hydrodynamic state time series covering global river sections, and uses the output of the distributed river hydrodynamic model as a supervision label for the pre-training of the global river AI basic model.

[0098] Perform step 1100 to construct a global river AI basic model with topology awareness capabilities. The global river AI basic model includes a static feature encoder, a temporal state encoder, and a topological relationship encoder.

[0099] The working method of the static feature encoder includes the following sub-steps:

[0100] Step 1101 involves broadcasting the static feature vectors from the global river multivariate hydrological dataset via a broadcast mechanism. Copy and extend along the time axis to all time steps t of the same dynamic input data to generate a time series. , where s i Let be the static feature vector of node i. d s The number of static information dimensions. It is the space of real numbers;

[0101] Execute step 1102, perform feature splicing and fusion at each time step t, broadcast the static features. Will change with the historical river state and meteorological and hydrological forcing data The features are concatenated along the feature dimension to form a comprehensive feature tensor. The formula is:

[0102] .

[0103] The comprehensive feature tensor The input is fed into a multilayer perceptron with residual connections for deep feature fusion, as shown in the formula:

[0104]

[0105] The MLP consists of two fully connected layers and a ReLU activation function. This is an enhanced feature that combines static backgrounds with dynamic contexts.

[0106] The time-state encoder calculates a state increment through the GRU gating mechanism. Then, the current hidden state is updated via residual join:

[0107]

[0108] Among them, z (t+1) This is the hidden state from the previous time step. .

[0109] The state increment The calculation method includes the following sub-steps:

[0110] Execute step 1111 to generate a gate control signal and update the gate. The formula for controlling the retention ratio of new and old information is as follows:

[0111]

[0112] Where σ is the activation function, W u To update the gate transformation matrix, h (t) The input features from the spatial fusion module at the current moment, b u To update the gate bias matrix.

[0113] Reset door The formula for controlling the influence of the previous state on the candidate state is as follows:

[0114]

[0115] Among them, W r To reset the gate transformation matrix, b r To reset the gate bias matrix.

[0116] Execute step 1112 to calculate candidate residuals, including generating candidate residuals using the modulation history information of the reset gate. The formula is

[0117]

[0118] Among them, W z To reset the gate modulation term transformation matrix, b z This is to reset the gate modulation term bias matrix.

[0119] Step 1113 involves residual fusion and state update, including weighted fusion of candidate residuals and the previous state using an update gate to obtain the final state increment. ,

[0120] .

[0121] The operation method of the topology encoder includes the following sub-steps:

[0122] Perform step 1121 to construct a symbolic graph convolutional layer, representing the global river network as a directed graph. , The total set of nodes in the river segment. For the overall audit of topological link relationships,

[0123] For each river section Upstream Neighbor Set Downstream Neighbor Set , where v i For the river segment including node i, e ji e represents the direction of water flow from node j to node i. ik For the outflow section v i The topological connection relationship.

[0124] Execute step 1122 to construct a neighbor aggregation mechanism, including aggregating upstream and downstream influences separately, and aggregating upstream features. The formula is

[0125]

[0126] Downstream Feature Aggregation The formula is

[0127]

[0128] in, This is the upstream information aggregation matrix of layer l. This represents the hidden state of upstream information at layer l-1. This refers to the information hiding state of layer l-1 itself. The upstream information bias matrix of layer l, This is the downstream information aggregation matrix of layer l. This represents the downstream information hiding state of layer l-1. The downstream information bias matrix of layer l. It is a small constant.

[0129] Execute step 1123 to propagate multi-layered information, including in deep networks, where information propagates through cross paths.

[0130]

[0131] in, This represents the upstream forward information hiding state of layer l-1. This represents the downstream forward information hiding state of layer l-1. This represents the hidden state of positive upstream information in layer l-1. This represents the downstream reverse information hiding state of layer l-1. This represents the hidden state of upstream reverse information at layer l-1. This represents the hidden state of the downstream reverse information of layer l-1 itself.

[0132] Perform step 1124, fusing features and outputting the results, including fusing the final node features using learnable weights. The formula is

[0133]

[0134] in, These are trainable parameters.

[0135] The overall loss function L of the global river AI basic model is

[0136] L=λ base ·L base +λ bw ·L bw

[0137] Where, λ base and λ bw For hyperparameters, L base Based on the mean squared error loss function, L bw This is the weighted loss function for hydraulic gradient.

[0138] The basic mean squared error loss function is used to ensure the overall prediction accuracy of the model across the entire dataset, and the formula is:

[0139]

[0140] in, and y i (t) represents the predicted and actual values ​​of node i at time t, respectively. The total number of time steps. This represents the total number of nodes.

[0141] The hydraulic slope weighted loss function is used for reinforcement learning in areas with gentle river slopes, and the formula is as follows:

[0142]

[0143] Among them, w i (t) represents the weighting coefficient.

[0144] The weighting coefficient w is determined through an automated calculation process based on the empirical distribution of global hydraulic gradient. i (t), the formula is

[0145]

[0146] Wherein, F(s) i (t) represents the hydraulic gradient s. i (t) is the percentile of the global empirical cumulative distribution function, where γ is a hyperparameter. F(s) is the expectation operator, and F(s) is the percentile of the hydraulic gradient s of a specific river segment in the global empirical cumulative distribution function.

[0147] The binary search automatically adjusts the weight ratio to meet the target.

[0148]

[0149] Among them, Q 0.25 R is the 25th percentile of the hydraulic gradient. traget is the preset target weight ratio, and w is the weighting parameter for river segment loss.

[0150] Step 1200, fine-tuning the global river AI base model, includes the following sub-steps:

[0151] Perform step 1210 to adjust historical observation data;

[0152] Perform step 1220 to partition and verify the data;

[0153] Perform step 1230 to fine-tune the stratified learning rate, applying differentiated learning rates to different layers. This includes performing the following operations during fine-tuning:

[0154] 1. An open key layer is used to adapt to local features. The key layer includes the final output layer and the last layer of the graph topology encoder and the time encoder.

[0155] 2. Freeze the other layers in the model except for the key layer and their parameters;

[0156] 3. Fine-tune the parameters of the key layer, limiting the initial learning step size to 1% of the training period.

[0157] Perform step 1300 to output and apply the fine-tuned global river AI base model.

[0158] Example 2

[0159] This invention addresses the shortcomings of existing physical numerical river hydrological models, such as high computational costs, overgeneralization of mechanisms, and limitations of data-driven models due to observation sparsity and insufficient topological characterization. It provides a method for implementing and fine-tuning a topology-aware global river AI basic model. By explicitly encoding river topology, constructing a "pre-training-fine-tuning" paradigm (integrating globally applicable river hydrodynamic knowledge with local sparse data), and a lightweight architecture, it achieves accurate prediction of multivariate hydrological data across the entire river network and rapid desktop-level hardware inference, meeting the needs of global water cycle analysis, water resource management, and flood risk prevention.

[0160] The technical solution of this invention addresses the core deficiencies of existing physical numerical and data-driven models for river hydrodynamic simulation, meeting four core requirements: First, it explicitly encodes the global river topology, adapts to the non-Euclidean spatial characteristics of river hydrodynamic transmission, and ensures physical consistency in the prediction of multiple variables such as flow, depth, and storage. Second, it constructs a two-stage paradigm of "pre-training-fine-tuning," relying on global hydrological simulation data to learn general hydrodynamic laws, and then achieving regional adaptation through local sparse observation data (combined with topological relationships to expand the supervision range). Third, it adopts a lightweight neural operator architecture to ensure real-time inference across the entire river network on desktop hardware, lowering the hardware threshold. Fourth, it adapts to both data-rich and sparse scenarios, achieving accurate simulation of river sections without monitoring stations, ultimately meeting the needs of global water cycle analysis, water resource management, and flood risk prevention for efficient prediction of multiple variables in the entire river network hydrology. Specifically, the key steps include constructing a global river multivariate hydrological dataset, implementing a global river AI basic model with topology awareness capabilities, fine-tuning the benchmark model, and global or local deployment applications.

[0161] like Figure 2 As shown, the present invention includes:

[0162] S1: Construction of a Global River Multivariate Hydrological Dataset

[0163] To achieve high-precision simulation and prediction of hydrodynamic processes in global river systems, this invention first constructs a comprehensive, consistent, and physically reliable global-scale multivariate hydrological dataset. This dataset is a prerequisite for training the foundational model of topology-aware AI. Its construction process integrates multi-source geographic information, meteorological reanalysis data, and simulation results from physical mechanism models, ensuring the integrity, consistency, and reliability of the data's physical meaning across the spatiotemporal dimensions. The specific construction process encompasses three core stages: static data acquisition and processing, meteorological and hydrological data integration, and physics-based distributed river hydrodynamic model simulation.

[0164] S1.1 Static Data Acquisition and Processing:

[0165] In the static data acquisition and processing stage, this invention systematically acquires data characterizing the inherent properties of rivers and their basins from multiple authoritative global public databases (such as HydroSHEDS, MERIT-Hydro, and GRIT). The collected static features mainly fall into three categories: the first category is river channel geometric parameters, specifically including channel width, height, length, and slope, which directly determine the transport capacity of water within the channel; the second category is basin topographic parameters, including elevation, upstream catchment area, and total basin area, which control the macroscopic background of runoff generation and confluence within the basin; the third category is river network topology parameters, which are crucial for achieving topology sensing. This invention not only extracts the connectivity (i.e., the connection relationships between nodes) and flow direction (defining the natural direction of water flow) of the river network, but also calculates the degree of each node (e.g., used to identify confluence points and bifurcation points), thereby comprehensively characterizing the non-Euclidean graph structure of the river system. Furthermore, to accurately simulate the overflow process, flood inundation parameters, such as floodplain height and river channel cross-sectional morphology, are also introduced. All the static data mentioned above underwent rigorous global normalization before being input into the model to eliminate model training bias caused by differences in the units and ranges of different features, ensuring that the model can learn the influence of all features fairly. Specific variable descriptions are shown in Table 1.

[0166] Table 1. Attributes Recommended by This Patent to Describe the Characteristics of River Systems

[0167]

[0168] S1.2 Meteorological and Hydrological Data Integration:

[0169] In the meteorological and hydrological data integration phase, this invention aims to provide the model with external forcing signals driving changes in river hydrological processes. By integrating global meteorological reanalysis data (such as ERA5) with hydrological observation data from institutions such as the Global Runoff Data Center (GRDC), a long-term, highly spatiotemporally consistent dataset was constructed. The integrated data mainly includes two categories: first, meteorological forcing data, such as precipitation and surface runoff, which are the direct drivers of river hydrological processes; and second, hydrological state variables, including flow, water depth, and water storage, which are the core target variables that the model needs to predict. To ensure data quality and usability, all data were standardized to daily temporal and spatial resolutions and underwent bias correction and spatiotemporal alignment to form a globally comprehensive, continuous, and consistent time series, providing a foundation for the model to capture hydrological dynamics.

[0170] S1.3 Distributed River Hydrodynamic Model Simulation:

[0171] In the distributed river hydrodynamic model simulation stage, to address the problem of sparse and unevenly distributed hydrological observation stations globally, this invention utilizes validated high-performance physical numerical river models (such as CaMa-Flood) to conduct global hydrodynamic simulations. These simulations use integrated meteorological and hydrological data as input, solve physical governing equations numerically, and generate continuous multivariate hydrodynamic state time series (including flow, depth, and storage) covering global river sections. This simulation output serves as a supervisory label for AI model pre-training, essentially transferring the mechanistic knowledge of the physical model to the AI ​​model in data form. This step not only fills the gaps in observational data but, more importantly, ensures the physical consistency of the training data, making it possible for the AI's foundational model to learn universal global river hydrodynamic laws. Finally, by verifying the consistency of the statistical distribution between the simulated and measured data, the reliability and practicality of the constructed dataset are ensured.

[0172] S2: Implementation of a Global River AI Foundation Model with Topology Awareness

[0173] Building upon the completion of a global multivariate river hydrological dataset, the core of this invention lies in implementing an artificial intelligence benchmark model with topology awareness. This model is a spatiotemporal deep learning architecture based on neural operators, designed to directly map and learn the intrinsic physical structure and dynamic processes of river systems. By integrating three key information dimensions—static features, temporal dynamics, and network topology—the model establishes a universal mapping relationship from hydro-meteorological forcing to river dynamic variables, thus possessing the ability to generalize to river hydrological problems at different spatiotemporal scales. The specific implementation of the model revolves around three core encoders and an adaptive training strategy: a static feature encoder, a temporal state encoder, a topological relationship encoder, and corresponding model training and loss function design.

[0174] S2.1 Feature Encoder:

[0175] The main function of the static feature encoder is to efficiently fuse and extract features from the inherent and invariant physical properties of each river segment node. This encoder receives static feature vectors from the dataset and first uses a broadcast mechanism to copy and expand these originally time-invariant static features to the same time step as the dynamic input data, ensuring that the model can reference this fundamental information that determines the hydraulic characteristics of the river segment at every time step. Subsequently, the broadcast static features are concatenated with historical river state variables (such as flow and water depth) and meteorological and hydrological forcing data (such as runoff) along the feature dimension to form a comprehensive feature tensor. This comprehensive feature tensor is then input into a multilayer perceptron (MLP) with residual connections for deep feature fusion. The introduction of residual connections is crucial; it ensures that the original input information is preserved in the deep network, effectively alleviating the gradient vanishing problem during training, while allowing the MLP to focus on learning the complex nonlinear interaction between static and dynamic features, thereby more accurately characterizing the local hydrological mechanisms. Specifically, for the static feature vectors from the dataset... , where nodes static feature vectors Originally lacking a time dimension, the encoder uses a broadcast mechanism to copy and extend it along the time axis to all time steps t, which are the same as the dynamic input data, thus generating a time series. This operation ensures that the model can simultaneously reference the constant structural information that determines the hydraulic properties of the river section when processing dynamic information at any given moment.

[0176] Subsequently, the encoder performs feature concatenation and fusion. At each time step t, the broadcast static features... Will change with the historical river state (such as flow rate, water depth) and meteorological and hydrological forcing data (For example, the flow of data) is spliced ​​along the feature dimensions to form a comprehensive feature tensor. Its mathematical representation is:

[0177]

[0178] The synthesized feature tensor is then fed into a multilayer perceptron with residual connections for deep feature fusion, the computation of which is defined as follows:

[0179]

[0180] The MLP consists of two fully connected layers and a ReLU activation function, responsible for capturing the complex nonlinear interactions between static features and dynamic variables. The introduction of residual connections ensures lossless transfer of original input information in deep networks through identity mapping. This not only effectively alleviates the vanishing gradient problem during training, making it possible to train deeper network structures, but also ensures, mechanistically, that the model does not forget key patterns directly extracted from the original physical features, thus more accurately characterizing local hydrological mechanisms. The final output... It is an enhanced feature that combines static background and dynamic context, providing a higher information density input for subsequent temporal and topological coding.

[0181] S2.2 Time Status Encoder:

[0182] The temporal state encoder is responsible for capturing the evolution of hydrological processes over time, including the persistence and variability of flow and the hysteresis effects in the rainfall-runoff response. This invention employs a gated recurrent unit (GRU) as the core of the encoder, explicitly defining the "temporal residual" used to model hydrological states—the change in state between adjacent time steps. Specifically, at each time step, the encoder calculates a state increment output by the GRU and adds this increment to the hidden state of the previous time step to obtain the new state for the current time step. This explicit residual learning mechanism better aligns with the continuous and gradual physical characteristics of hydrological variables, enabling the model to more robustly learn the dynamic trends of hydrological processes. The gating mechanism within the GRU (update gate and reset gate) adjusts the fusion ratio of historical information and current input, allowing the model to adaptively remember important historical information or forget irrelevant background, thereby effectively capturing hydrological responses across multiple time scales.

[0183] Specifically, for time step t, let This indicates the hidden state of the previous time step. This represents the input features from the spatial fusion module at the current time (i.e., the output of the static feature encoder). The encoder first calculates a state increment through the gating mechanism of the GRU. Then, the current hidden state is updated via residual join:

[0184]

[0185] Among them, state increment The internal operating mechanism, calculated by the GRU unit, is as follows:

[0186] 1. Gating signal generation:

[0187] Update Gate Control the retention ratio of new and old information:

[0188]

[0189] Reset door Controlling the influence of the previous state on the candidate state:

[0190]

[0191] 2. Calculation of candidate residuals:

[0192] Candidate residuals are generated using the modulation history information of the reset gate. :

[0193]

[0194] 3. Residual fusion and state update:

[0195] Final state increment The result is obtained by weighted fusion of the candidate residual and the previous state using the update gate:

[0196]

[0197] This explicit residual learning mechanism repositions the core function of GRU as learning the "incremental changes" of states, rather than the complete states themselves. This allows the model to learn the dynamic trends of hydrological processes more robustly and smoothly, effectively mitigating gradient problems in long-term dependencies and enhancing the model's ability to capture different time scales in hydrological sequences (such as rapid flood peaks and slow receding processes). The gating mechanism adaptively adjusts the fusion ratio of historical memory and current input, enabling the model to intelligently remember important background information and forget irrelevant past states, thereby accurately simulating hydrological responses at multiple time scales. GRU can be effectively replaced by any recurrent neural network capable of capturing temporal features or a self-attention neural network processing sequence data.

[0198] S2.3 Topology Encoder:

[0199] The topology encoder is the core of this model's topology-aware function, enabling it to explicitly understand and utilize the non-Euclidean spatial structure of the river network's connectivity and flow directionality. This encoder is built upon a directed graph convolutional network, representing the entire river network as a directed graph where nodes represent river segments and edges represent information transmission relationships. To accurately characterize the complex hydrodynamic interactions between upstream and downstream river segments, this invention employs a signed graph convolution operation, aggregating the influences from upstream and downstream neighbors for each node. For upstream influences, the model aggregates features from all directly upstream nodes, representing the confluence effect from the catchment area; for downstream influences, the model aggregates features from all directly downstream nodes, representing backpropagation effects such as water level backwater. In multi-layer graph convolution, the information flows from upstream and downstream are processed separately and transformed through specific weight matrices. Finally, a learnable weight coefficient fuses the upstream and downstream feature representations to form the final topology-enhanced feature for each node. This mechanism ensures that hydrodynamic information propagates along the correct physical path within the network, which is fundamental to achieving consistent physical predictions across the entire river network. Specifically:

[0200] (1) Construction of symbolic graph convolutional layers,

[0201] Representing the global river network as a directed graph , where nodes Representative river section, with directional edge This represents the direction of water flow (from upstream node j to downstream node i). For each node v i Define it as:

[0202] Upstream Neighbor Set

[0203] Downstream Neighbor Set

[0204] (2) Neighbor aggregation mechanism

[0205] set up The encoder aggregates upstream and downstream influences respectively using the following formulas to represent the feature representation of node i in layer l:

[0206] Upstream feature aggregation:

[0207] Downstream feature aggregation:

[0208] in To avoid division by zero errors, small constants, This is the ReLU activation function. Let b be the weight matrix and b be the learnable offset.

[0209] (3) Multi-layered information dissemination

[0210] In deep networks, information propagates through intersecting paths:

[0211]

[0212] (4) Feature fusion and output

[0213] Finally, node features are fused using learnable weights:

[0214]

[0215] in These are trainable parameters that control the relative strength of upstream and downstream influences. Total number of layers (in this invention) To avoid oversmoothing).

[0216] This encoder ensures the physical rationality of hydrological information propagation along the river network topology by explicitly modeling the directionality of water flow. At the same time, it cross-couples the upstream and downstream states, providing a two-way dynamic information transmission path, and providing a theoretical basis for accurate prediction of river sections without monitoring stations.

[0217] S2.4 Model Training and Loss Function:

[0218] In terms of model training and loss function design, to efficiently and stably train this deeply fused model and improve its prediction accuracy under complex hydraulic conditions, this invention designs a specialized training strategy and loss function. The model is implemented and managed using the PyTorchLightning framework, employing the Adam optimizer along with a learning rate scheduling strategy based on dynamic decay of validation set performance and an early stopping mechanism to prevent overfitting and ensure convergence to the optimal solution. This invention proposes an adaptive weighted loss function, consisting of two parts: a basic mean squared error loss to ensure the overall prediction accuracy of the model across the entire dataset; and a hydraulic gradient weighted loss specifically for reinforcement learning in areas with gentle river slopes and typically large prediction errors. The weight coefficients of the weighted loss are not manually set but determined through an automatic calculation process based on the global empirical distribution of hydraulic gradients, enabling the model to adaptively allocate more learning effort to challenging simulated river sections with complex hydraulic conditions and low hydraulic gradients. Specifically:

[0219] The overall loss function is defined as:

[0220] L=λ base ·L base +λ bw ·L bw

[0221] Where, λ base and λbw The hyperparameters are used to balance the two loss components.

[0222] The base mean squared error loss guarantees the overall prediction accuracy of the model across the entire dataset:

[0223]

[0224] in and These represent the time intervals of node i. The predicted value and the actual value, The total number of time steps. This represents the total number of nodes.

[0225] Hydraulic gradient weighted loss is specifically designed for reinforcement learning in areas with gentle river slopes where prediction errors are typically large.

[0226]

[0227] 3. Adaptive weight calculation mechanism

[0228] Weighting coefficients in weighted loss It is not set manually, but determined through an automated calculation process based on the empirical distribution of global hydraulic gradient. Hydraulic gradient It is calculated from the head difference between adjacent nodes and the river length.

[0229] The formula for calculating the weight is:

[0230]

[0231] in Indicates hydraulic gradient The percentile in the global empirical cumulative distribution function ensures that the weights maintain a unit mean to sustain the loss scale.

[0232] Automatically adjust the weight ratio using binary search to meet the target weight ratio:

[0233]

[0234] in This represents the 25th percentile of the hydraulic gradient. The target weight ratio is preset (default is 10). Furthermore, the loss function can be adjusted according to task requirements.

[0235] S3: Baseline Model Fine-tuning

[0236] After successfully constructing and pre-training a global river AI baseline model, this invention designs a systematic benchmark model fine-tuning process to accurately adapt it to the hydrological characteristics of specific regions and fully leverage the value of sparse observation data. This process aims to organically combine the globally universal hydrodynamic knowledge inherent in the pre-trained model with the local specific patterns of the target watershed. The fine-tuning process does not retrain all model parameters; instead, it employs a carefully designed strategy that balances knowledge preservation with local adaptation, ensuring that the model's existing strong generalization ability is not compromised while introducing limited local data. This process specifically includes three main stages: historical observation data adjustment, data validation partitioning, and the core hierarchical variable learning rate fine-tuning technique.

[0237] S3.1 Historical Observation Data Adjustment:

[0238] Historical observation data adjustment is the data preparation stage of the fine-tuning process. This invention collects historical observation data from specific stations within the target watershed from global or regional hydrological databases (such as the Global Runoff Data Center (GRDC)) and local hydrological agencies. The variables involved are typically consistent with the model's output variables, including but not limited to flow rate and water depth. Since actual observation data may be missing, anomaly-prone, or inconsistent with the model's pre-training data in terms of scale or units, this stage requires rigorous quality control, imputation, and assimilation of the collected raw observation data. This ensures that the data matches the input and output specifications of the pre-trained model in terms of time series continuity, accuracy, and format, providing high-quality, directly usable supervisory signals for subsequent fine-tuning.

[0239] S3.2 Data Validation Division:

[0240] The data validation phase aims to scientifically and rigorously evaluate the performance of the fine-tuned model in a local area and its spatial generalization ability, particularly its predictive performance on river sections without monitoring stations. This invention employs a spatiotemporal dual validation strategy: First, in the temporal dimension, the effective historical observation data of all stations in the target basin are divided chronologically into a fine-tuning training period and an independent validation period for testing temporal generalization ability. More importantly, in the spatial dimension, this invention deliberately divides all available hydrological stations within the basin into two groups: "supervised stations" and "unsupervised stations." During the fine-tuning training process, the observation data of "unsupervised stations" are completely hidden and do not participate in the updating of model parameters. These stations simulate river sections lacking measured data in the real world, and are used to ultimately evaluate the model's ability to learn and transfer knowledge from "supervised stations" through the topological network. This deliberate spatial exclusion effectively prevents the model from overfitting to a limited number of fine-tuned stations, thus forcing the model to utilize its encoded river topology to infer the state of the entire river network, rigorously validating its physical consistency and spatial generalization performance.

[0241] S3.3 Layered Variable Learning Rate Fine-Tuning Technique:

[0242] The core innovation of this phase is the hierarchical variable learning rate fine-tuning technique, which solves the challenge of stably adjusting large models with limited data. This technique does not update all parameters of the pre-trained model, but instead employs a "mostly frozen, fine-tuned" strategy. Specifically, the vast majority of the model's layers and their parameters are frozen during fine-tuning, thus firmly locking in the general hydrodynamic laws learned from global data. Only a few key layers are opened to adapt to local features. These layers typically include the final output layer and the last few layers of the graph topology encoder and temporal encoder, as they are more directly responsible for mapping from high-level features to specific watershed responses. Crucially, differentiated learning rates are applied to different layers: a very low learning rate (e.g., on the order of 1e-5) is applied to the output layer to prevent drastic parameter changes from overturning the model's core knowledge; for the opened higher layers of the graph and temporal encoders, an even smaller learning rate (e.g., on the order of 1e-6) is applied for more cautious and fine-tuning, ensuring that while absorbing local data information, the model's hydrodynamic generalization foundation is preserved to the greatest extent possible. By combining the aforementioned spatial leave-out verification strategy, this technology ensures that the value of sparse station observation data can be amplified by the topological network, and that the supervision signal can be automatically propagated from the "supervised station" along the river connection to the entire river network, including the "unsupervised station". This enables the model to demonstrate accurate prediction performance that surpasses traditional numerical models throughout the entire target watershed, regardless of whether there are stations in the river section.

[0243] S4: Global or local deployment applications

[0244] The global river prediction AI foundation model constructed in this invention possesses outstanding lightweight characteristics and structural adaptability, supporting efficient global and local deployment on desktop hardware. The pre-trained global foundation model can be directly used for real-time multivariate forecasting of global rivers, requiring only consumer-grade CPUs and GPUs to complete computation within minutes, eliminating reliance on high-performance computing clusters and achieving "desktop-level" global water cycle simulation capabilities. In local applications, the model can be quickly adapted to the specific river network topology of any target watershed through fine-tuning, forming an "expert model" focused on that region. This process is also completed on ordinary workstations, ensuring its prediction accuracy in complex confluence and bifurcation scenarios without altering the model architecture. This capability of "lightweight deployment, global applicability, and local refinement," combined with its open "pre-training-fine-tuning" ecosystem, provides a powerful, low-cost, and high-precision technical tool for global and regional water resource management and flood risk prevention.

[0245] To better understand this invention, specific embodiments have been described in detail above, but these are not intended to limit the invention. Any simple modifications made to the above embodiments based on the technical essence of this invention still fall within the scope of this invention. Each embodiment in this specification focuses on its differences from other embodiments; similar or identical parts between embodiments can be referred to mutually. For system embodiments, since they basically correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

Claims

1. A method for implementing and fine-tuning a topology-aware global river AI basic model, comprising constructing a global river multivariate hydrological dataset, characterized in that, Includes the following steps: Step 1: Construct a global river AI foundation model with topology awareness. This model includes a static feature encoder, a temporal state encoder, and a topological relationship encoder. The static feature encoder's operation includes the following sub-steps: Step 101: Using a broadcast mechanism, transmit the static feature vectors from the global river multivariate hydrological dataset. Copy and extend along the time axis to all time steps t of the same dynamic input data to generate a time series. , where s i Let be the static feature vector of node i. d s The number of static information dimensions. It is the space of real numbers; Step 102: Perform feature splicing and fusion, including at each time step t, the broadcast static features Will change with the historical river state and meteorological and hydrological forcing data The features are concatenated along the feature dimension to form a comprehensive feature tensor. The formula is: ; The comprehensive feature tensor The input is fed into a multilayer perceptron with residual connections for deep feature fusion, as shown in the formula: ; The MLP consists of two fully connected layers and a ReLU activation function. This is an enhanced feature that combines static backgrounds with dynamic contexts; Step 2: Fine-tune the global river AI base model; Step 3: Output and apply the fine-tuned global river AI base model.

2. The method for implementing and fine-tuning the topology-aware global river AI basic model as described in claim 1, characterized in that, The time-state encoder calculates a state increment through the GRU gating mechanism. Then, the current hidden state is updated via residual join: Among them, z (t+1) This is the hidden state from the previous time step. .

3. The method for implementing and fine-tuning the topology-aware global river AI basic model as described in claim 2, characterized in that, The state increment The calculation method includes the following sub-steps: Step 111: Generate gate control signal and update the gate. The formula for controlling the retention ratio of new and old information is as follows: ; Where σ is the activation function, W u To update the gate transformation matrix, h (t) The input features from the spatial fusion module at the current moment. b u To update the gate bias matrix; Reset door The formula for controlling the influence of the previous state on the candidate state is as follows: ; Among them, W r To reset the gate transformation matrix, b r To reset the gate bias matrix; Step 112: Calculate candidate residuals and generate candidate residuals using the reset gate modulation history information. The formula is ; Among them, W z To reset the gate modulation term transformation matrix, b z To reset the gate modulation term bias matrix; Step 113: Residual fusion and state update. The candidate residuals and the previous state are weighted and fused by the update gate to obtain the final state increment. , 。 4. The method for implementing and fine-tuning the topology-aware global river AI basic model as described in claim 3, characterized in that, The operation method of the topology encoder includes the following sub-steps: Step 121: Construct a symbolic graph convolutional layer to represent the global river network as a directed graph. , The total set of nodes in the river segment. For the overall audit of topological link relationships; For each river section Upstream Neighbor Set Downstream Neighbor Set , where the state increment v i For the river segment including node i, e ji e represents the direction of water flow from node j to node i. ik For the outflow section v i Topological connections; Step 122: Construct a neighbor aggregation mechanism, including aggregating upstream and downstream influences separately, and aggregating upstream features. The formula is ; Downstream Feature Aggregation The formula is ; in, This is the upstream information aggregation matrix of layer l. This represents the hidden state of upstream information at layer l-1. This refers to the information hiding state of layer l-1 itself. The upstream information bias matrix of layer l, This is the downstream information aggregation matrix of layer l. This represents the downstream information hiding state of layer l-1. The downstream information bias matrix of layer l. It is a small constant; Step 123: Propagating multi-layered information involves deep networks where information propagates through intersecting paths. ; in, This represents the upstream forward information hiding state of layer l-1. This represents the downstream forward information hiding state of layer l-1. This represents the hidden state of positive upstream information in layer l-1. This represents the downstream reverse information hiding state of layer l-1. This represents the hidden state of upstream reverse information at layer l-1. This represents the hidden state of the downstream reverse information of layer l-1 itself; Step 124: Fuse features and output including the final node features fused through learnable weights. The formula is ; in, These are trainable parameters.

5. The method for implementing and fine-tuning the topology-aware global river AI basic model as described in claim 4, characterized in that, The overall loss function L of the global river AI basic model is L=λ base ·L base +λ bw ·L bw Where, λ base and λ bw For hyperparameters, L base Based on the mean squared error loss function, L bw This is the weighted loss function for hydraulic gradient.

6. The method for implementing and fine-tuning the topology-aware global river AI basic model as described in claim 5, characterized in that, The basic mean squared error loss function is used to ensure the overall prediction accuracy of the model across the entire dataset, and the formula is: ; in, and y i (t) represents the predicted and actual values ​​of node i at time t, respectively. The total number of time steps. This represents the total number of nodes.

7. The method for implementing and fine-tuning the topology-aware global river AI basic model as described in claim 6, characterized in that, The hydraulic slope weighted loss function is used for reinforcement learning in areas with gentle river slopes, and the formula is as follows: ; Among them, w i (t) represents the weighting coefficient.

8. The method for implementing and fine-tuning the topology-aware global river AI basic model as described in claim 7, characterized in that, The weighting coefficient w is determined through an automated calculation process based on the empirical distribution of global hydraulic gradient. i (t), the formula is ; Wherein, F(s) i (t) represents the hydraulic gradient s. i (t) is the percentile of the global empirical cumulative distribution function, γ is the hyperparameter, is the expectation operator, and F(s) is the percentile of the hydraulic gradient s of a specific river segment in the global empirical cumulative distribution function. The binary search automatically adjusts the weight ratio to meet the target. ; Among them, Q 0.25 R is the 25th percentile of the hydraulic gradient. traget is the preset target weight ratio, and w is the weighting parameter for river segment loss.

9. The method for implementing and fine-tuning the topology-aware global river AI basic model as described in claim 8, characterized in that, Step 2 includes the following sub-steps: Step 21: Adjust historical observation data; Step 22: Data partitioning and validation; Step 23: Fine-tune the learning rate of the key layers, applying differentiated learning rates to different layers.

10. The method for implementing and fine-tuning the topology-aware global river AI basic model as described in claim 9, characterized in that, Step 23 includes performing the following operations during fine-tuning:

1. The key layer is opened to adapt to local features. The key layer includes the final result output layer, as well as the last layer of the graph topology encoder and the time encoder.

2. Freeze the other layers in the model except for the key layer and their parameters; 3. Fine-tune the parameters of the key layer, limiting the initial learning step size to 1% of the training period.