A multi-source input hydrological model training method, runoff prediction method, device and equipment

By constructing a directed graph model and a graph neural network, and combining multimodal feature encoding and causal consistency regularization loss, the problem of insufficient prediction accuracy of existing hydrological models in extreme events is solved, and efficient and stable runoff prediction is achieved.

CN122241082APending Publication Date: 2026-06-19四川省达州水文水资源勘测中心

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
四川省达州水文水资源勘测中心
Filing Date
2026-03-18
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing hydrological models have weak generalization ability and insufficient prediction accuracy in predicting extreme hydrological events. Furthermore, traditional models rely on high-quality training data and have weak interpretability, making it difficult to meet the high requirements for prediction accuracy and adaptability.

Method used

By constructing a directed graph model, combining a multimodal feature encoder and a graph neural network, and using the hydrological continuity equation as a hard constraint, counterfactual samples are generated and causal consistency regularization loss is calculated to train a multi-source input hydrological model, ensuring that the model's prediction results conform to hydrological physical laws and causal relationships.

🎯Benefits of technology

It improves the prediction accuracy and stability of the model in extreme hydrological events, can distinguish the influence of natural factors and human factors, avoids the problems of physical inconsistency and overfitting, and achieves efficient runoff prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122241082A_ABST
    Figure CN122241082A_ABST
Patent Text Reader

Abstract

This invention relates to the field of hydrological modeling, specifically to a multi-source input hydrological model training method, runoff prediction method, apparatus, and equipment. Based on watershed geographic information and river topology data, a directed graph representing the spatial topology of the watershed is constructed. Node feature vectors for each node are obtained using multi-source historical hydrological and meteorological data and a multimodal feature encoder. The directed graph and the node feature vectors of each node are input into a graph neural network, which outputs the predicted runoff values ​​for each node at future times. A regularization term used to constrain the model's prediction sensitivity to causal paths is calculated based on counterfactual samples, resulting in a causal consistency regularization loss. The graph neural network is trained based on the data fitting error between the predicted and observed runoff values, the physical consistency loss calculated based on the discrete residuals of the Saint-Venant equations, and the causal consistency regularization loss, to obtain a trained hydrological process model, thereby improving the accuracy of runoff prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine learning, specifically to a multi-source input hydrological model training method, runoff prediction method, apparatus, and equipment. Background Technology

[0002] Hydrological models are core tools for simulating the entire process of surface runoff, groundwater level changes, and precipitation-runoff-confluence, enabling hydrological process prediction and early warning. They are widely used in key national areas such as water resource optimization, flood control, and ecological environment governance. With the intensification of global climate change and the increase in human activity, the natural properties of hydrological evolution patterns are significantly altered, placing higher demands on the prediction accuracy, response speed, and deployment flexibility of hydrological models.

[0003] Currently, hydrological models are mainly divided into three categories, and these models differ significantly in their construction principles, data requirements, and applicable scenarios:

[0004] The first category is physics-driven models (such as SWAT, HEC-HMS, SHE, and VIC models). These models are built upon hydrological physical mechanisms such as mass conservation and energy conservation, directly simulating processes like precipitation, interception, infiltration, evaporation, and runoff through differential equations or physical parameterization schemes. Their parameters have clear physical meanings (such as soil porosity and vegetation transpiration coefficient), and their theoretical framework is rigorous, making them suitable for mechanistic studies and long-term hydrological process simulation. However, physics-driven models are highly dependent on high-density observational data (such as soil moisture and spatial distribution of meteorological elements), and their complex structures lead to significant calibration difficulties and high computational resource consumption, limiting their application in data-scarce areas or real-time flood forecasting scenarios.

[0005] The second category is conceptual hydrological models (such as the Xin'anjiang model and the SCS model). These models are based on empirical assumptions and construct conceptual modules (such as full-sump runoff and free-water reservoirs) by simplifying physical processes. Although the parameters have physical meaning, they need to be determined through calibration. For example, the Xin'anjiang model uses a three-layer evapotranspiration and free-water reservoir water source distribution mechanism, and describes the spatial distribution of soil moisture through an exponential curve, performing excellently in flood forecasting in humid regions. Its advantages lie in its simple structure, fewer parameters, and high computational efficiency, but its ability to represent spatial heterogeneity is relatively weak, and distributed applications need to be improved by combining geographic information systems (GIS) or remote sensing (RS) technologies.

[0006] The third category is data-driven models (especially AI-driven hydrological models). These models break through the constraints of traditional mechanisms, using machine learning (such as LSTM and Transformer) or deep learning algorithms to uncover the implicit correlations in multi-source data (radar rainfall measurements, satellite remote sensing, ground observations, etc.) to achieve black-box prediction of precipitation-runoff processes. For example, a model combining radar rainfall measurements with lightweight AI can calibrate precipitation errors in real time and dynamically optimize drainage strategies, achieving sub-second response times on embedded devices. Its advantages lie in not requiring explicit understanding of physical mechanisms, strong adaptability, and high prediction efficiency. However, it relies on large-scale, high-quality training data, and the model's interpretability is relatively weak, requiring the use of interpretable AI technologies (such as SHAP value analysis) to enhance its reliability.

[0007] However, existing models often simply piece together meteorological and hydrological data, resulting in weak generalization ability and insufficient prediction accuracy, especially in predicting extreme hydrological events (heavy rainstorms, extreme droughts) with large errors. Summary of the Invention

[0008] The purpose of this invention is to provide a multi-source input hydrological model training method, runoff prediction method, device and equipment, which solves the problems in the prior art.

[0009] This invention is achieved through the following technical solution:

[0010] In a first aspect, embodiments of the present invention provide a multi-source input hydrological model training method, including:

[0011] Based on watershed geographic information and river topology data, a directed graph representing the spatial topology of the watershed is constructed, in which nodes represent sub-watershed units and are associated with physical attributes extracted from digital elevation models and soil data, and edges represent river connections and are associated with the hydraulic characteristics of river segments.

[0012] Based on multi-source historical hydrological and meteorological data, the dynamic temporal features and static geographic features of each node within the historical time window are extracted by a multimodal feature encoder to obtain the node feature vector of each node.

[0013] Based on the directed graph and the node feature vectors of each node, the graph neural network with the hydrological continuity equation as a hard constraint is used for spatial propagation during message transmission to output the future runoff prediction values ​​of each node.

[0014] Based on the counterfactual samples generated by intervening in the input variables according to the watershed physical model, the regularization term used to constrain the sensitivity of the model prediction to causal paths is calculated, and the causal consistency regularization loss is obtained.

[0015] The graph neural network is trained based on the data fitting error between the predicted and observed runoff values, the physical consistency loss calculated from the discrete residuals of the Saint-Venant equations, and the causal consistency regularization loss, to obtain a trained hydrological process model.

[0016] Preferably, the step of constructing a directed graph representing the spatial topology of the watershed based on watershed geographic information and river topology data includes:

[0017] The average slope and cross-sectional area of ​​each sub-basin unit are extracted based on the digital elevation model.

[0018] Determine the river connectivity relationships between sub-basin units based on river network data;

[0019] Soil texture of each sub-basin unit was extracted based on soil data;

[0020] The roughness parameter was obtained by looking up a table based on the soil texture.

[0021] A directed graph is constructed by using the average slope, river cross-sectional area, soil texture, and roughness parameters as the physical attributes of the nodes, the river connection relationships as the edges of the nodes, and the river length, gradient, and Manning coefficient as the hydraulic characteristics of the river segments.

[0022] Preferably, the step of extracting the dynamic temporal features and static geographic features of each node within a historical time window based on multi-source historical hydrological and meteorological data using a multimodal feature encoder to obtain the node feature vector of each node includes:

[0023] Meteorological observation data, hydrological observation data, geospatial data, soil property data, remote sensing inversion data, and human activity records are obtained from multi-source historical hydrological and meteorological data.

[0024] Based on the meteorological and hydrological observation data, the dynamic temporal features of each node are extracted through a bidirectional long short-term memory network;

[0025] Based on the geospatial data and soil attribute data, the static spatial features of each node are extracted using a multilayer perceptron.

[0026] Based on the remote sensing inversion data and human activity record data, the dynamic spatial features of each node are extracted using a one-dimensional convolutional neural network.

[0027] The dynamic temporal features, static spatial features, and dynamic spatial features of each node are concatenated to obtain the node feature vector of each node.

[0028] Preferably, the step of concatenating the dynamic temporal features, static spatial features, and dynamic spatial features of each node to obtain the node feature vector of each node includes:

[0029] For each node, based on the historical meteorological time series in the meteorological observation data corresponding to the node, the event type of the current time period is identified by support vector machine to obtain the event type label of rainstorm, drought or normal.

[0030] Based on the event type label and the pre-calculated data quality scores of each data source for the node, the dynamic fusion weights of the node's dynamic temporal features, static spatial features, and dynamic spatial features are calculated through a cross-modal attention mechanism.

[0031] The dynamic temporal features, static spatial features, and dynamic spatial features of the node are weighted and fused according to the dynamic fusion weight to obtain the node feature vector of the node.

[0032] Preferably, the step of outputting the future runoff prediction values ​​for each node by spatial propagation through a graph neural network with the hydrological continuity equation as a hard constraint during message passing, based on the directed graph and the node feature vectors of each node, includes:

[0033] Based on the directed graph and the node feature vectors of each node, a message function is used to calculate the message transmitted from the upstream node to the downstream node for each edge in the directed graph, and the edge message is obtained. The message function is obtained based on the approximate solution of the diffusion wave equation and is used to characterize the propagation attenuation and hysteresis characteristics of flood waves in the river channel.

[0034] For each node, aggregate all edge messages pointing to that node to obtain the aggregated message for that node;

[0035] Based on the aggregated message and the current state of the node, a residual connection is introduced to update the node state. During the update, the difference between the input flow and the output flow of the node is equal to the lateral inflow of the node.

[0036] The updated node status of each node is output as the future runoff prediction value for each node.

[0037] Preferably, the step of calculating a regularization term to constrain the sensitivity of the model's predictions to causal paths, based on counterfactual samples generated by intervening in the input variables according to the watershed physical model, to obtain the causal consistency regularization loss, includes:

[0038] Based on a predetermined watershed hydrophysical model, the precipitation characteristics and / or reservoir scheduling characteristics in multi-source historical hydrological and meteorological data are intervened. While keeping other variables unchanged, the precipitation characteristics and / or reservoir scheduling characteristics are forcibly set to zero, and the state variables consistent with the intervention scenario are re-simulated using the hydrophysical model to generate counterfactual samples.

[0039] The counterfactual samples are input into the graph neural network for forward propagation to obtain the counterfactual sample runoff prediction values.

[0040] The difference between the predicted runoff value and the counterfactual sample runoff prediction value is calculated to obtain the causal consistency regularization loss, which constrains the model's sensitivity to causal path perturbations.

[0041] Preferably, the step of training the graph neural network based on the data fitting error between the predicted and observed runoff values, the physical consistency loss calculated based on the discrete residuals of the Saint-Venant equations, and the causal consistency regularization loss to obtain a trained hydrological process model includes:

[0042] The data fitting error is calculated based on the weighted sum of the mean square error and the mean absolute error between the predicted and observed runoff values.

[0043] The physical consistency loss is calculated based on the discretized residuals of the Saint-Venant equations at the river cross-section.

[0044] The data fitting error, physical consistency loss, and causal consistency regularization loss are weighted and summed according to preset weights to obtain the total loss function.

[0045] Based on the total loss function, the Adam optimizer is used to update the parameters of the graph neural network to obtain a trained hydrological process model.

[0046] Secondly, embodiments of the present invention provide a runoff prediction method, including:

[0047] Acquire real-time multi-source data for the target watershed, including meteorological observation data, hydrological observation data, geospatial data, soil property data, remote sensing inversion data, and human activity records;

[0048] Based on the real-time multi-source data, the dynamic temporal features, static spatial features, and dynamic spatial features of each sub-basin unit in the target watershed are extracted by a multimodal feature encoder to obtain the node feature vector of each sub-basin unit.

[0049] The pre-constructed directed graph representing the spatial topology of the watershed and the node feature vectors of each sub-watershed unit are input into the multi-source input hydrological model, and the runoff prediction values ​​of each sub-watershed unit at future times are output. The multi-source input hydrological model is obtained according to the method of the first aspect.

[0050] The predicted runoff values ​​are post-processed to output a future runoff prediction sequence for the target watershed.

[0051] Thirdly, embodiments of the present invention provide a multi-source input hydrological model training device, comprising:

[0052] The module is used to construct a directed graph representing the spatial topology of the watershed based on watershed geographic information and river topology data. Nodes represent sub-watershed units and are associated with physical attributes extracted from digital elevation models and soil data, while edges represent river connections and are associated with the hydraulic characteristics of river segments.

[0053] The feature vector module is used to extract the dynamic temporal features and static geographic features of each node within the historical time window based on multi-source historical hydrological and meteorological data through a multimodal feature encoder, so as to obtain the node feature vector of each node.

[0054] The prediction module is used to output the predicted runoff values ​​for each node at future times by spatial propagation of a graph neural network with the hydrological continuity equation as a hard constraint during message transmission, based on the directed graph and the node feature vectors of each node.

[0055] The loss module is used to calculate the regularization term used to constrain the sensitivity of the model prediction to causal paths based on the counterfactual samples generated by intervening in the input variables according to the watershed physical model, and obtain the causal consistency regularization loss.

[0056] The training module is used to train the graph neural network based on the data fitting error between the predicted and observed runoff values, the physical consistency loss calculated based on the discrete residuals of the Saint-Venant equations, and the causal consistency regularization loss, to obtain a trained hydrological process model.

[0057] Fourthly, embodiments of the present invention provide an electronic device, including: at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method of the first aspect described above.

[0058] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0059] By using a graph neural network with the hydrological continuity equation as a hard constraint for spatial propagation during message passing, the law of mass conservation is directly embedded into the network structure rather than merely as a loss function term. This technique forces node state updates to ensure that the difference between input and output flow equals the lateral inflow, fundamentally avoiding the physical inconsistency problems that may arise from purely data-driven models. Compared to existing methods that only add physical regularization terms to the loss function, this approach ensures that the prediction results naturally conform to hydrological physical laws at the model structure level.

[0060] Based on counterfactual samples generated by the watershed physical model, a regularization term is calculated to constrain the model's prediction sensitivity to causal paths. Counterfactual samples are generated by intervening in precipitation characteristics or reservoir scheduling characteristics, and the model is constrained to the difference in predictions before and after the intervention, enabling the model to learn an input-output mapping that conforms to causal relationships. This technique allows the model to distinguish between the impact of natural and anthropogenic factors on runoff, maintaining stable predictive performance even when data distribution changes or extreme events occur, avoiding the pitfall of traditional data-driven models that are prone to learning spurious correlations.

[0061] Simultaneously considering the data fitting error between predicted and observed runoff values, the physical consistency loss calculated based on the discrete residuals of the Saint-Venant equations, and the causal consistency regularization loss, the model is trained by obtaining a total loss function through weighted summation. This technique ensures that the model, while fitting historical observation data, must meet the requirements of hydrodynamic laws and causal path sensitivity, avoiding the problem of sacrificing physical rationality for the sake of data fitting accuracy, and also avoiding the contradiction of reducing prediction accuracy due to overemphasizing physical constraints.

[0062] The physical properties of each sub-basin unit are extracted based on digital elevation models and soil data. River network data is used to determine river channel connections and correlate them with river segment hydraulic characteristics, constructing a directed graph representing the spatial topology of the basin. This technique enables the model to distinguish the physical properties and upstream-downstream connections of different sub-basin units, simulating the propagation process of water flow in the river network in a spatial dimension. It overcomes the shortcomings of existing methods that treat the basin as a whole or each station as an independent unit, thus failing to effectively simulate flood propagation time and peak attenuation. Attached Figure Description

[0063] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:

[0064] Figure 1 A flowchart illustrating the multi-source input hydrological model training method provided by this invention;

[0065] Figure 2 A schematic flowchart of the runoff prediction method provided by the present invention;

[0066] Figure 3 A schematic diagram of the structure of the multi-source input hydrological model training device provided by the present invention;

[0067] Figure 4This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0068] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.

[0069] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0070] It should be noted that all actions involving the acquisition of signals, information, or data in this invention are carried out in compliance with the relevant data protection laws and regulations of the locality and with authorization from the owner of the relevant device.

[0071] Example 1

[0072] Please see Figure 1 This invention provides a multi-source input hydrological model training method, including:

[0073] S1. Based on watershed geographic information and river topology data, construct a directed graph representing the spatial topology of the watershed. Nodes represent sub-watershed units and are associated with physical attributes extracted from digital elevation models and soil data, while edges represent river connections and are associated with the hydraulic characteristics of river segments.

[0074] Specifically, the watershed geographic information includes elevation data extracted from the digital elevation model (DEM) to determine landforms and confluence directions. River topology data includes river network distribution and channel connectivity to describe the spatial propagation paths of water flow. The directed graph consists of nodes and edges. Nodes represent sub-watershed units obtained after dividing the watershed, each associated with the average slope and channel cross-sectional area extracted from the DEM, as well as soil texture and roughness parameters determined from soil texture data. Edges represent channel connections between adjacent sub-watershed units, each associated with the river length, gradient, and Manning coefficient. The directed graph constructed in this way encodes the watershed's natural geographic features and river hydraulic characteristics into graph-structured data, providing a structural foundation for subsequent modeling of the spatial evolution of water flow. This directed graph enables the model to distinguish the physical attributes and upstream-downstream connections of different sub-watershed units, thereby simulating the propagation patterns of hydrological processes in a spatial dimension.

[0075] In some implementations, S1, based on watershed geographic information and river topology data, a directed graph representing the spatial topology of the watershed is constructed, including:

[0076] The average slope and cross-sectional area of ​​each sub-basin unit are extracted based on the digital elevation model.

[0077] Determine the river connectivity relationships between sub-basin units based on river network data;

[0078] Soil texture of each sub-basin unit was extracted based on soil data;

[0079] The roughness parameter was obtained by looking up a table based on the soil texture.

[0080] A directed graph is constructed by using the average slope, river cross-sectional area, soil texture, and roughness parameters as the physical attributes of the nodes, the river connection relationships as the edges of the nodes, and the river length, gradient, and Manning coefficient as the hydraulic characteristics of the river segments.

[0081] Specifically, the average slope and channel cross-sectional area of ​​each sub-basin unit are extracted based on the digital elevation model. The average slope reflects the surface inclination of the sub-basin unit, and the channel cross-sectional area reflects the water-carrying capacity of the channel. The channel connectivity between sub-basin units is determined based on river network data, indicating the direction of water flow from upstream to downstream sub-basin units. Soil texture of each sub-basin unit is extracted based on soil data, reflecting the soil's particle composition and permeability. Roughness parameters are obtained from a table based on soil texture, reflecting the resistance of the channel bed to water flow. A directed graph is constructed by using the average slope, channel cross-sectional area, soil texture, and roughness parameters as the physical attributes of nodes, the channel connectivity as the edges of nodes, and the segment length, gradient, and Manning coefficient as the hydraulic characteristics of the edges. The directed graph constructed in this way encodes the natural geographical features, soil properties, and river hydraulic characteristics of the watershed into graph-structured data, ensuring that each sub-watershed unit and its connections are associated with physically meaningful attribute parameters. This directed graph provides a graph structure foundation that conforms to actual physical characteristics for subsequent spatial propagation.

[0082] S2. Based on multi-source historical hydrological and meteorological data, the dynamic temporal features and static geographic features of each node within the historical time window are extracted by a multimodal feature encoder to obtain the node feature vector of each node.

[0083] Specifically, the multi-source historical hydrological and meteorological data includes meteorological observation data, hydrological observation data, geospatial data, soil property data, remote sensing inversion data, and human activity records. These data describe different factors influencing runoff formation, such as precipitation, evaporation, soil moisture, vegetation cover, and reservoir management. The multimodal feature encoder comprises multiple sub-networks to process different types of data. For time-series data, a network structure capable of capturing time dependencies is used for feature extraction, yielding dynamic temporal features reflecting the changes in hydrological processes over time. For static spatial data, a network structure capable of processing fixed attribute information is used for feature extraction, yielding static spatial features reflecting the inherent attributes of sub-basin units. By combining dynamic temporal features and static spatial features, a node feature vector for each sub-basin unit is obtained. This node feature vector integrates temporal variation information and spatial static information, providing a comprehensive representation of the hydrological state of the sub-basin unit for subsequent graph neural networks.

[0084] In some implementations, S2, based on multi-source historical hydrological and meteorological data, extracts the dynamic temporal features and static geographic features of each node within a historical time window using a multimodal feature encoder, obtaining the node feature vector for each node, including:

[0085] S21. Obtain meteorological observation data, hydrological observation data, geospatial data, soil property data, remote sensing inversion data, and human activity record data from multi-source historical hydrological and meteorological data;

[0086] Specifically, the multi-source historical hydrological and meteorological data is the historical dataset used in the training phase, containing various information related to runoff formation. Meteorological observation data includes time-series records of meteorological elements such as precipitation, temperature, and evaporation. Hydrological observation data includes time-series records of hydrological elements such as river level, flow rate, and sediment content. Geospatial data includes spatial data describing the geographical characteristics of the watershed, such as digital elevation models, watershed boundaries, and river network distribution. Soil attribute data includes attribute data describing the physical properties of the soil, such as soil texture, soil thickness, and permeability coefficient. Remote sensing inversion data includes spatiotemporally continuous data obtained through remote sensing technology, such as vegetation cover, surface temperature, and soil moisture. Human activity record data includes data reflecting the impact of human activities, such as reservoir scheduling records, irrigation water withdrawals, and land use change. By acquiring and integrating the above multi-source data, a complete data foundation covering both natural and anthropogenic factors is provided for subsequent feature extraction.

[0087] S22. Based on the meteorological and hydrological observation data, extract the dynamic temporal features of each node through a bidirectional long short-term memory network;

[0088] Specifically, meteorological and hydrological observation data are recorded in time series format, reflecting the changes in meteorological and hydrological elements over time. A bidirectional long short-term memory (LSTM) network is a network structure capable of simultaneously capturing long-term and short-term dependencies in a time series from both forward and backward directions. Meteorological and hydrological observation data corresponding to each sub-basin unit are input into the LSTM network. The network learns the time dependencies from the past to the future through forward propagation and the time dependencies from the future to the past through backward propagation, ultimately outputting a hidden state sequence that integrates bidirectional information. This hidden state sequence serves as the dynamic temporal feature of each node, encoding the patterns of meteorological and hydrological processes evolving over time, providing information reflecting temporal trends for subsequent runoff forecasting.

[0089] S23. Based on the geospatial data and soil attribute data, extract the static spatial features of each node using a multilayer perceptron;

[0090] Specifically, a multilayer perceptron (MLP) is a feedforward neural network composed of multiple fully connected layers, capable of learning a nonlinear mapping from input data to a feature space. After vectorizing the geospatial and soil property data corresponding to each sub-watershed unit, the data is input into the MLP. The network extracts a high-dimensional representation reflecting the spatial characteristics of the sub-watershed unit through layer-by-layer nonlinear transformations. This high-dimensional representation serves as the static spatial feature of each node, encoding the geographic morphology and soil properties of the sub-watershed unit, providing information reflecting spatial heterogeneity for subsequent runoff prediction.

[0091] S24. Based on the remote sensing inversion data and human activity record data, extract the dynamic spatial features of each node using a one-dimensional convolutional neural network;

[0092] Specifically, remote sensing inversion data includes spatiotemporally continuous data such as vegetation cover, surface temperature, and soil moisture, while human activity records include time-series data such as reservoir scheduling and irrigation water intake. These data exhibit both temporal and spatial variation characteristics. A one-dimensional convolutional neural network (CNN) is a network structure that extracts local temporal patterns by performing convolution operations along the time dimension. By inputting the remote sensing inversion data and human activity records corresponding to each sub-basin unit as time series data into the CNN, the network extracts temporal pattern features reflecting changes in land cover and the intensity of human activities through the sliding of multiple convolutional kernels along the time axis. These temporal pattern features are then used as the dynamic spatial features of each node. These features encode the dynamic spatial information of vegetation growth, human intervention, and other factors changing over time, providing information reflecting dynamic changes in the land surface for subsequent runoff prediction.

[0093] S25. Concatenate the dynamic temporal features, static spatial features, and dynamic spatial features of each node to obtain the node feature vector of each node.

[0094] Specifically, dynamic temporal features are extracted from meteorological and hydrological observation data, reflecting the temporal evolution of hydrological processes. Static spatial features are extracted from geospatial and soil attribute data, reflecting the inherent spatial attributes of sub-basin units. Dynamic spatial features are extracted from remote sensing inversion and human activity records, reflecting the dynamic changes in land cover and human intervention. These three features of the same sub-basin unit are concatenated along the feature dimension to form a new feature vector. This concatenated feature vector simultaneously contains temporal variation information, inherent spatial attributes, and dynamic spatial information, constituting a comprehensive state representation of each sub-basin unit. This comprehensive state representation is used as the node feature vector for each node, providing input data for subsequent spatial propagation in the graph neural network.

[0095] In some implementations, S25 involves concatenating the dynamic temporal features, static spatial features, and dynamic spatial features of each node to obtain a node feature vector for each node, including:

[0096] S251. For each node, based on the historical meteorological time series in the meteorological observation data corresponding to the node, the event type of the current time period is identified by support vector machine to obtain the event type label of rainstorm, drought or normal.

[0097] Specifically, the meteorological observation data includes historical meteorological time series for each sub-basin unit, recording the changes in meteorological elements such as precipitation and temperature over time. Support Vector Machine (SVM) is a classification model based on statistical learning theory that distinguishes samples of different categories by finding the optimal hyperplane. The SVM is pre-trained using historical meteorological data labeled with event types, enabling it to identify the event type of the current period based on the characteristics of the meteorological time series. The current period's meteorological time series corresponding to each sub-basin unit is input into the trained SVM, which outputs the event type for that sub-basin unit in the current period, including heavy rain, drought, or normal events. This event type label reflects the degree of extreme weather conditions in the current period, providing a basis for subsequent feature fusion.

[0098] S252. Based on the event type label and the pre-calculated data quality scores of each data source of the node, calculate the dynamic fusion weights of the dynamic temporal features, static spatial features and dynamic spatial features of the node through a cross-modal attention mechanism.

[0099] Specifically, the data quality scores for each data source are pre-calculated based on sensor status, historical errors, and missing rates, reflecting the reliability of meteorological observation data, hydrological observation data, geospatial data, soil attribute data, remote sensing inversion data, and human activity record data. The cross-modal attention mechanism is a mechanism capable of dynamically calculating the importance of different modal features based on input information. Event type labels and data quality scores are used as query conditions for the attention mechanism, while dynamic temporal features, static spatial features, and dynamic spatial features are used as input values. The attention mechanism calculates the correlation score between each feature and the query conditions, and after normalization, obtains a dynamic fusion weight for each feature. This dynamic fusion weight reflects the relative importance of different types of features for runoff prediction under the current event type and data quality conditions.

[0100] S253. The dynamic temporal features, static spatial features and dynamic spatial features of the node are weighted and fused according to the dynamic fusion weight to obtain the node feature vector of the node.

[0101] Specifically, the dynamic fusion weights correspond to the contributions of dynamic temporal features, static spatial features, and dynamic spatial features in the fusion process, respectively. Each feature is multiplied by its corresponding dynamic fusion weight to obtain a weighted feature vector. The three weighted feature vectors are then summed to obtain the fused feature vector. This fused feature vector serves as the node feature vector for each sub-basin unit. The event type label enables the model to adaptively adjust the attention given to different features under varying meteorological conditions, while the data quality score allows the model to reduce the weight of unreliable features when data quality deteriorates. This node feature vector provides a dynamically weighted and fused comprehensive state representation for subsequent spatial propagation in the graph neural network.

[0102] S3. Based on the directed graph and the node feature vectors of each node, the graph neural network with the hydrological continuity equation as a hard constraint is used for spatial propagation during message transmission to output the future runoff prediction values ​​of each node.

[0103] Specifically, the directed graph provides the spatial topology of the watershed, and the node feature vectors provide the current hydrological state of each sub-watershed unit. The graph neural network simulates the propagation of water flow in the river network through a message-passing mechanism. For each directed edge, a message is calculated to be passed to the downstream node based on the features of the upstream node and the hydraulic features of the edge. The message function is designed to ensure that the transmitted information conforms to the physical laws of water flow propagation in the river channel. During the node update phase, each node aggregates messages from all upstream neighbors and updates itself based on its current state. Residual connections are introduced during the update process to ensure that the difference between the node's input flow and output flow equals the lateral inflow. This constraint enforces the hydrological continuity equation, i.e., the law of conservation of mass, at the structural level. After multiple layers of message passing and node updates, the graph neural network outputs the predicted runoff values ​​for each sub-watershed unit at future times. This process embeds physical laws into the network structure, making the prediction results naturally conform to water balance and avoiding the physical inconsistencies that may arise from purely data-driven models.

[0104] In some implementations, S3, based on the directed graph and the node feature vectors of each node, spatial propagation is performed using a graph neural network with the hydrological continuity equation as a hard constraint during message passing to output the future runoff prediction values ​​for each node, including:

[0105] S31. Based on the directed graph and the node feature vectors of each node, a message function is used to calculate the message transmitted from the upstream node to the downstream node for each edge in the directed graph to obtain the edge message. The message function is obtained based on the approximate solution of the diffusion wave equation and is used to characterize the propagation attenuation and hysteresis characteristics of flood waves in the river channel.

[0106] Specifically, the directed graph contains upstream and downstream connections between nodes, and the node feature vectors reflect the current hydrological state of each sub-basin unit. For each directed edge in the graph, the upstream node represents the sub-basin unit from which the water flow originates, and the downstream node represents the sub-basin unit to which the water flow terminates. The message function is calculated based on the node feature vector of the upstream node and the hydraulic characteristics of the river segment associated with the edge, yielding the edge message transmitted from the upstream node to the downstream node. This message function is designed based on an approximate solution to the spreading wave equation, which describes a simplified physical process of flood wave propagation in the river channel. By embedding the solution form of the physical equation into the message function, the calculated edge message naturally conforms to the attenuation and hysteresis laws of water flow propagation in the river channel. This edge message quantifies the water volume contribution of the upstream sub-basin unit to the downstream sub-basin unit.

[0107] S32. For each node, aggregate all edge messages pointing to the node to obtain the aggregated message of the node;

[0108] Specifically, each node, as a downstream node, may receive side messages from multiple upstream nodes. These side messages represent the water volume contributions of different upstream sub-basin units to that node. The aggregation operation combines all the side messages pointing to that node, for example, through summation or averaging, to obtain the node's aggregated message. This aggregated message integrates the impact of all upstream water inflows on the node, reflecting the total upstream water input received by the node at the current moment. This aggregated message provides upstream water inflow information for subsequent node state updates.

[0109] S33. Based on the aggregated message and the current state of the node, a residual connection is introduced to update the node state. During the update, the difference between the input flow and the output flow of the node is equal to the lateral inflow of the node.

[0110] Specifically, the current state of a node includes its water volume or water level information at the current moment. The node state update function calculates the node's new state at the next moment based on the aggregated message and the node's current state. A residual connection is introduced during the update process, meaning that some of the original state information is retained when calculating the new state. Simultaneously, the update process enforces the mass conservation condition at the structural level, meaning the difference between the node's input flow and output flow equals the node's lateral inflow. Input flow includes the water volume corresponding to the aggregated message from upstream nodes, output flow includes the water volume output by the node to downstream nodes, and lateral inflow includes precipitation runoff or inter-node inflow generated by the node itself. Through this enforced constraint, the node state update always satisfies the water balance principle.

[0111] Furthermore, the following mass conservation conditions are enforced during node state updates:

[0112] ,

[0113] in: :node The input flow is obtained by aggregating all edge messages pointing to that node;

[0114] :node The output flow of a node is determined by the edge messages from that node to its downstream nodes;

[0115] :node Lateral inflow, including precipitation runoff or inter-node inflow generated by the node itself.

[0116] Introducing node state updates using residual connections:

[0117] ,

[0118] in: :node In the The state of the layer;

[0119] :node In the The state of the layer;

[0120] From upstream node Transmitted to downstream nodes Aggregated messages;

[0121] : Pointer to node The set of all upstream nodes.

[0122] S34. Output the updated node status of each node as the predicted runoff value for each node at future time.

[0123] Specifically, after one or more layers of message passing and node updates, each node obtains its updated node state. This updated node state reflects the water volume or water level information of the sub-basin unit at future times, and is used as the predicted runoff value for that sub-basin unit at future times. For the watershed outlet node, its runoff prediction value is the flow prediction result of the watershed outlet section. Through the above process, the graph neural network outputs the runoff prediction sequence for each sub-basin unit at future times based on the input data at the current time and the watershed spatial topology.

[0124] S4. Based on the counterfactual samples generated by intervening in the input variables according to the watershed physical model, calculate the regularization term used to constrain the sensitivity of the model prediction to causal paths, and obtain the causal consistency regularization loss.

[0125] Specifically, counterfactual samples are generated based on a pre-defined watershed hydrophysical model, obtained by intervening in key input variables of the original multi-source historical hydrological and meteorological data. Interventions include forcibly setting precipitation characteristics to zero or reservoir scheduling characteristics to zero, while keeping other characteristics unchanged. This intervention simulates a scenario where natural runoff is separated from the impact of human activities. The counterfactual samples are then fed into a graph neural network for forward propagation to obtain the runoff prediction values ​​for the counterfactual samples. The difference between the runoff prediction values ​​for the original samples and the runoff prediction values ​​for the counterfactual samples is calculated, and this difference measure is used as the causal consistency regularization loss. This regularization loss constrains the model during training, ensuring that the model responds appropriately to perturbations of causal paths in the input variables, while remaining stable to perturbations of non-causal paths. By introducing causal consistency regularization, the model can better distinguish the impact of natural and anthropogenic factors on runoff, improving prediction robustness under varying data distribution conditions.

[0126] In some implementations, S4, based on counterfactual samples generated by intervening in input variables according to a watershed physical model, calculates a regularization term used to constrain the sensitivity of model predictions to causal paths, obtaining a causal consistency regularization loss, including:

[0127] S41. Based on a predetermined watershed hydrophysical model, intervene in the precipitation characteristics and / or reservoir scheduling characteristics in multi-source historical hydrological and meteorological data. While keeping other variables unchanged, force the precipitation characteristics and / or reservoir scheduling characteristics to zero, and use the hydrophysical model to re-simulate the state variables consistent with the intervention scenario to generate counterfactual samples.

[0128] Specifically, the pre-determined watershed hydrophysical model refers to a mathematical model based on hydrophysical mechanisms, such as the Xin'anjiang model or the HEC-HMS model, which can simulate runoff formation processes based on input data. The counterfactual sample generation process is based on original multi-source historical hydrological and meteorological data samples, with intervention operations applied to specific variables within these samples. Intervention operations include forcibly setting precipitation characteristics to zero to simulate a counterfactual scenario without precipitation; or forcibly setting reservoir scheduling characteristics to zero to simulate a counterfactual scenario without reservoir scheduling intervention. While performing the intervention, the values ​​of other variables in the sample are kept unchanged. The data after intervention is input into the watershed hydrophysical model, and the simulation results output by the model serve as the target value for the counterfactual sample. The counterfactual samples generated in this way reflect the expected hydrological response of the watershed under specific intervention conditions.

[0129] S42. Input the counterfactual sample into the graph neural network for forward propagation to obtain the counterfactual sample runoff prediction value;

[0130] Specifically, the generated counterfactual samples are input into the graph neural network (Graph Neural Network) using the same data format as the original samples. The Graph Neural Network performs forward propagation on the counterfactual samples according to its normal computational process, including extracting feature vectors from the counterfactual samples through a multimodal feature encoder, performing message passing and node state updates within the Graph Neural Network, and finally outputting the future runoff prediction values ​​for each node. The output of this forward propagation is used as the runoff prediction value for the counterfactual samples. This prediction value reflects the simulation results of the Graph Neural Network for the post-intervention scenario.

[0131] S43. Calculate the difference measure between the predicted runoff value and the counterfactual sample runoff prediction value to obtain the causal consistency regularization loss, so as to constrain the model's sensitivity to causal path perturbations.

[0132] Specifically, the runoff prediction for the original samples is the result of the graph neural network's prediction of the actual data samples without intervention, while the runoff prediction for the counterfactual samples is the result of the graph neural network's prediction of the counterfactual samples after intervention. A metric for the difference between these two predictions is calculated, for example, using the L2 sum of squared distances, to obtain the causal consistency regularization loss. This loss is used during training to constrain the graph neural network, ensuring that the network produces reasonable response differences to interventions of causal features in the input variables (such as precipitation characteristics and reservoir scheduling characteristics), while remaining stable to perturbations of non-causal paths. By minimizing this regularization loss, the graph neural network learns an input-output mapping that conforms to causality, improving the model's predictive robustness when data distribution changes.

[0133] S5. Based on the data fitting error between the predicted and observed runoff values, the physical consistency loss calculated based on the discrete residuals of the Saint-Venant equations, and the causal consistency regularization loss, the graph neural network is trained to obtain a trained hydrological process model.

[0134] Specifically, the training process is based on the combined optimization of multiple loss terms. Data fitting error measures the difference between the runoff predictions output by the graph neural network and the actual observed values. It is calculated using a weighted sum of mean squared error and mean absolute error to ensure the model accurately fits historical observation data. Physical consistency loss is calculated based on the discretized residuals of the Saint-Venant equations at the river cross-section. These equations describe the conservation of momentum and energy in river flow. Minimizing the discrete residuals allows the model predictions to conform to more complete hydrodynamic laws. Causal consistency regularization loss constrains the model's sensitivity to causal paths. The three losses are weighted and summed according to preset weights to obtain the total loss function, and an optimization algorithm is used to iteratively update the parameters of the graph neural network. The resulting hydrological process model, after training, can simultaneously meet the requirements of data fitting accuracy, physical consistency, and causal path sensitivity during prediction. When inputted with real-time multi-source data, this model can output runoff prediction sequences that conform to hydrological physical laws.

[0135] In some implementations, S5 involves training the graph neural network based on the data fitting error between the predicted and observed runoff values, the physical consistency loss calculated from the discrete residuals of the Saint-Venant equations, and the causal consistency regularization loss, to obtain a trained hydrological process model, including:

[0136] S51. Calculate the data fitting error based on the weighted sum of the mean square error and the mean absolute error between the predicted and observed runoff values.

[0137] Specifically, the runoff prediction values ​​are the future runoff forecasts for each node output by the graph neural network, while the observed values ​​are the actual runoff data recorded by hydrological stations. The mean squared error (MSE) is the average of the squared differences between the predicted and observed values, reflecting the magnitude of the prediction error variance. The mean absolute error (MAE) is the average of the absolute differences between the predicted and observed values, reflecting the average magnitude of the prediction error. The MSE and MAE are weighted and summed according to preset weighting coefficients to obtain the data fitting error. This data fitting error measures the degree of agreement between the graph neural network prediction results and historical observation data.

[0138] S52. Calculate the physical consistency loss based on the discretized residuals of the Saint-Venant equations at the river cross-section.

[0139] Specifically, the Saint-Venant equations are the fundamental governing equations describing one-dimensional unsteady flow in rivers, including the continuity equation and the momentum equation. The Saint-Venant equations are spatially and temporally discretized across river cross-sections to obtain discrete equation expressions. The flow and water level data predicted by the graph neural network are substituted into the discretized equations, and the difference between the left and right sides of the equations is calculated; this difference is the discretization residual. The sum of squares or the sum of absolute values ​​of the discretization residuals for all river cross-sections is used to obtain the physical consistency loss. This physical consistency loss measures the degree to which the prediction results of the graph neural network conform to the hydrodynamic laws described by the Saint-Venant equations.

[0140] S53. The data fitting error, physical consistency loss and causal consistency regularization loss are weighted and summed according to preset weights to obtain the total loss function;

[0141] Specifically, the data fitting error reflects the model's accuracy in fitting historical observation data, the physical consistency loss reflects the degree to which the model's predictions conform to hydrodynamic laws, and the causal consistency regularization loss reflects the model's sensitivity to causal paths. These three losses are multiplied by preset weight coefficients, and the weighted results are summed to obtain the total loss function. The preset weights allow for a balance between data fitting accuracy, conformity to physical laws, and sensitivity to causal paths during model training.

[0142] Furthermore, the total loss function is:

[0143] ,

[0144] in: Total loss function value;

[0145] Data fitting error measures the degree of agreement between predicted and observed runoff values.

[0146] Physical consistency loss measures the degree to which the model's predictions conform to the hydrodynamic laws described by the Saint-Venant equations.

[0147] Causal consistency regularization loss measures the model's sensitivity to causal paths in the input variables;

[0148] The weighting coefficient for physical consistency loss, which can be 0.2, is used to balance the contribution of data fitting and the degree of conformity to physical laws to the total loss.

[0149] The weight coefficient of the causal consistency regularization loss can be 0.1, and is used to control the constraint strength of the causal regularization term during model training.

[0150] It can be further written as:

[0151] ,

[0152] in, Mean squared error (MSE) is the average of the squared differences between predicted and observed values. ;

[0153] Mean absolute error (MAE) is the average of the absolute values ​​of the differences between predicted and observed values. ;

[0154] in, : Runoff forecast;

[0155] Runoff observations;

[0156] : Sample size;

[0157] The weighting coefficient for mean squared error, which can be 0.7, is used to balance the contributions of mean squared error and mean absolute error to the data fitting loss.

[0158] The discrete form can be expressed as:

[0159] ,

[0160] in: : No. The discretized residuals of the continuity equation for each river cross-section are calculated as follows:

[0161] ,

[0162] : No. The discretized residuals of the momentum equations for each river cross-section are calculated as follows:

[0163] ,

[0164] : No. Each river cross section at time The water flow area can be obtained from the water level-area relationship curve;

[0165] : indicates the first The water flow area of ​​a river cross section at a specific time;

[0166] : No. Each river cross section at time The flow rate, predicted by a graph neural network;

[0167] Water level;

[0168] Gravitational acceleration;

[0169] : No. The friction drop of each cross section is calculated using Manning's formula:

[0170] ,

[0171] Manning roughness coefficient, obtained from a table of soil texture;

[0172] Hydraulic radius;

[0173] Time step;

[0174] Spatial step size;

[0175] Number of river cross sections;

[0176] Causal consistency regularization loss can be constructed based on the difference between the original sample predictions and the counterfactual sample predictions under different intervention conditions, and is expressed as:

[0177] ,

[0178] in: : No. Runoff prediction values ​​for each original sample;

[0179] : No. Runoff prediction values ​​for one counterfactual sample;

[0180] : Number of counterfactual samples;

[0181] Counterfactual samples are generated through the following interventions:

[0182] ,

[0183] in: The original sample contains historical hydrological and meteorological data from multiple sources.

[0184] Intervention operations force the precipitation characteristics to zero.

[0185] Intervention operation: Force the reservoir scheduling characteristics to zero.

[0186] : Intervention function, which forces the specified feature to zero while keeping other variables unchanged.

[0187] S54. Based on the total loss function, the Adam optimizer is used to update the parameters of the graph neural network to obtain a trained hydrological process model.

[0188] Specifically, the Adam optimizer is an adaptive learning rate gradient descent optimization algorithm that dynamically adjusts the learning rate of each parameter based on the first and second moments of the gradient. Using the total loss function as the optimization objective, the gradient of each parameter in the graph neural network is calculated using the backpropagation algorithm. The Adam optimizer iteratively updates the network parameters based on the calculated gradients, gradually reducing the total loss function. After multiple rounds of iterative training, when the total loss function converges or reaches the preset number of training rounds, the trained graph neural network parameters are obtained. The graph neural network corresponding to these parameters is then used as a trained hydrological process model for subsequent runoff prediction tasks.

[0189] In some possible implementations, after obtaining the trained hydrological process model, the prediction uncertainty is estimated using Monte Carlo dropout or deep ensemble methods based on real-time input multi-source data, and the future runoff prediction sequence and its 95% confidence interval are output. The prediction error distribution is monitored in real time using the ADWIN algorithm and EWMA control chart. When concept drift is detected and exceeds a preset threshold three times consecutively, the hydrological process model is fine-tuned and updated using real-time data from the most recent week.

[0190] The trained hydrological process model is used to predict runoff from real-time multi-source input data. The Monte Carlo dropout method retains the dropout layer of the neural network during the prediction phase, performing multiple forward propagations on the same input data, randomly discarding some neurons each time, resulting in multiple different predictions. A deep ensemble method trains multiple hydrological process models with identical structures but different initializations, yielding predictions from multiple models on the same input data. Statistical analysis is performed on the multiple prediction results, calculating the mean at each prediction time as the final runoff prediction value, and the standard deviation at each prediction time as a measure of prediction uncertainty. Based on the prediction mean and standard deviation, a 95% confidence interval is calculated according to the normal distribution assumption; this confidence interval indicates that the actual runoff value has a 95% probability of falling within this interval. The predicted runoff values ​​and confidence intervals at each time point are organized chronologically, outputting the future runoff prediction sequence for the watershed and its 95% confidence intervals.

[0191] The ADWIN algorithm is an adaptive sliding window change detection algorithm that determines whether the data distribution has changed by comparing the differences in data distribution within two sub-windows. The EWMA control chart is an exponentially weighted moving average control chart that determines whether the process is out of control by calculating the weighted moving average of the prediction error and monitoring whether it exceeds the control limits. During model deployment, error data for each prediction is collected in real time and simultaneously input into the ADWIN algorithm and EWMA control chart for monitoring. When the ADWIN algorithm detects a significant change in the prediction error distribution, and the EWMA control chart detects the prediction error exceeding the preset control threshold three consecutive times, concept drift is identified. Concept drift indicates that the current data distribution has significantly differed from the data distribution during model training, and the predictive performance of the existing model may decline. At this point, real-time multi-source data from the most recent week and its corresponding actual observations are collected as a fine-tuning dataset. This fine-tuning dataset is used as training data to update the parameters of the hydrological process model in a few rounds, allowing the model to adapt to the new data distribution. After fine-tuning, the updated model replaces the original model for subsequent runoff prediction.

[0192] Example 2

[0193] Please see Figure 2This invention provides a runoff prediction method, including:

[0194] S201. Acquire real-time multi-source data for the target watershed, including meteorological observation data, hydrological observation data, geospatial data, soil property data, remote sensing inversion data, and human activity record data.

[0195] Specifically, the target watershed is the specific watershed for which runoff forecasting is currently needed. Real-time multi-source data refers to the latest data collected or acquired in real time within this target watershed. Meteorological observation data includes real-time precipitation, temperature, evaporation, and other meteorological elements. Hydrological observation data includes real-time river water level, flow rate, and other hydrological elements. Geospatial data includes spatial data such as the digital elevation model and river network distribution of the target watershed. Soil property data includes attribute data such as soil texture and permeability coefficient of the target watershed. Remote sensing inversion data includes real-time vegetation cover, surface temperature, and other data acquired through remote sensing technology. Human activity record data includes real-time records of reservoir scheduling and irrigation water intake. By acquiring the above-mentioned real-time multi-source data covering both natural and human factors, complete input information is provided for runoff forecasting.

[0196] S202. Based on the real-time multi-source data, the dynamic temporal features, static spatial features, and dynamic spatial features of each sub-basin unit in the target watershed are extracted by a multimodal feature encoder to obtain the node feature vector of each sub-basin unit.

[0197] Specifically, the target watershed is organized into pre-divided sub-watershed units, each corresponding to data related to its location in real-time multi-source data. A multimodal feature encoder comprises multiple sub-networks, each processing different types of data. Meteorological and hydrological observation data corresponding to each sub-watershed unit are input into a bidirectional long short-term memory network to extract dynamic temporal features reflecting temporal variations. Geospatial and soil property data corresponding to each sub-watershed unit are input into a multilayer perceptron to extract static spatial features reflecting inherent properties. Remote sensing inversion data and human activity records corresponding to each sub-watershed unit are input into a one-dimensional convolutional neural network to extract dynamic spatial features reflecting dynamic changes. The three features of the same sub-watershed unit are concatenated to obtain the node feature vector for that unit. This node feature vector integrates the temporal dimension, inherent spatial properties, and dynamic spatial information, reflecting the current hydrological state of each sub-watershed unit.

[0198] S203. Input the pre-constructed directed graph representing the spatial topology of the watershed and the node feature vectors of each sub-watershed unit into the multi-source input hydrological model, and output the future runoff prediction values ​​of each sub-watershed unit. The multi-source input hydrological model is obtained according to the method of Example 1.

[0199] Specifically, the pre-constructed directed graph represents the spatial topology of the target watershed. Nodes represent sub-watershed units and are associated with physical attributes, while edges represent river connections and are associated with the hydraulic characteristics of river sections. The multi-source input hydrological model is a pre-trained graph neural network model, trained according to the method described in Example 1, with its network structure and parameters fixed. The node feature vector of each sub-watershed unit is used as the input feature of the corresponding node in the graph neural network, and the entire directed graph is used as the computational graph structure of the graph neural network. The graph neural network performs forward propagation according to its defined message passing and node update mechanism, and outputs the predicted runoff value for each node at future times after multiple layers of computation. This predicted value reflects the flow change of each sub-watershed unit within the prediction time range.

[0200] S204. Post-process the predicted runoff values ​​to output the future runoff prediction sequence for the target watershed.

[0201] Specifically, post-processing includes denormalizing the runoff predictions output by the graph neural network to restore the predictions to the original dimensions and scale. The denormalized predictions are then smoothed, for example, using a moving average method to eliminate abnormal fluctuations in the prediction results. Based on model uncertainty estimation, confidence intervals for the prediction results are calculated, using methods such as Monte Carlo dropout or deep ensemble. The processed runoff predictions for each sub-basin unit are then organized chronologically to form a future runoff prediction sequence for the target basin. For the basin outlet node, the prediction sequence represents the flow forecast for the outlet section of the target basin. This prediction sequence can be used for practical applications such as flood warning and water resource allocation.

[0202] The following is an exemplary application, with specific steps as follows: A model is trained for real-time prediction of a specific rainstorm event. Inputs include future precipitation forecasts from numerical weather prediction, real-time hydrological station water level data, current vegetation cover remote sensing data, and reservoir scheduling plans. The model outputs a runoff prediction sequence and its confidence interval for a future period, used for flood warning and scheduling decisions. Examples 1 and 2 are further explained below.

[0203] 1. Watershed and Data Preparation

[0204] A mountainous watershed is used as the target watershed for illustration. This watershed covers an area of ​​1250 square kilometers and is divided into 32 sub-watershed units, with a river network comprising 31 connected river segments. Historical data for this watershed from 2015 to 2022 (a total of 8 years) was collected as training data, including:

[0205] Meteorological observation data: hourly precipitation and temperature observation records from 5 meteorological stations within the basin, totaling approximately 70,080 hours of data.

[0206] Hydrological observation data: hourly flow observation records from the hydrological station at the basin outlet, and water level observation records from three internal hydrological stations.

[0207] Geospatial data: 30-meter resolution digital elevation model, extracting the average slope range of each sub-basin unit from 0.5 degrees to 25.6 degrees, and the river channel cross-sectional area range from 8.5 square meters to 342 square meters.

[0208] Soil property data: The soil texture classification provided by the National Soil Survey Database includes three types: loam, sandy loam and clay loam, with corresponding roughness parameters of 0.035, 0.040 and 0.045, respectively.

[0209] Remote sensing inversion data: monthly vegetation cover data with a spatial resolution of 250 meters, and hourly vegetation cover sequences obtained through linear interpolation.

[0210] Human activity records: hourly outflow records of three reservoirs within the basin, and daily water intake records of the irrigation area.

[0211] 2. Directed Graph Construction

[0212] The average slope and channel cross-sectional area of ​​each sub-basin unit are extracted using the digital elevation model. Taking sub-basin unit 7 as an example, its average slope is 12.3 degrees and its channel cross-sectional area is 78.5 square meters. The channel connection relationships between sub-basin units are determined based on river network data, for example, the upstream water from sub-basin units 5, 6, and 8 flows into sub-basin unit 7. The soil texture of sub-basin unit 7 is extracted as loam based on soil data, and the roughness parameter is found to be 0.035 from a table. The average slope of 12.3 degrees, channel cross-sectional area of ​​78.5 square meters, soil texture of loam, and roughness parameter of 0.035 of sub-basin unit 7 are used as the physical attributes of node 7. The length of the river segment from sub-basin unit 5 to 7, 3.2 kilometers, gradient of 0.008, and Manning coefficient of 0.035 are used as the hydraulic characteristics of the river segment (5,7). All 32 sub-basin units and their connection relationships are processed in the same way, constructing a directed graph containing 32 nodes and 31 edges.

[0213] 3. Node Feature Extraction

[0214] Multi-source data corresponding to each sub-basin unit were obtained from historical data. Taking sub-basin unit 7 as an example, the precipitation sequence of meteorological stations, the water level sequence of hydrological stations, the slope and area in geospatial data, the texture in soil attribute data, the vegetation cover sequence in remote sensing inversion data, and the outflow sequence in reservoir scheduling records were extracted.

[0215] Meteorological and hydrological time series data of the past 72 hours for sub-basin unit 7 were input into a bidirectional long short-term memory network. The network contains two hidden layers, each with 32 units, and outputs 64-dimensional dynamic time series features.

[0216] The geospatial data and soil attribute data of sub-basin unit 7 are input into a multilayer perceptron. This network contains two hidden layers, each with 16 units, and outputs 32-dimensional static spatial features.

[0217] The remote sensing inversion and human activity time series data of sub-basin unit 7 over the past 72 hours were input into a one-dimensional convolutional neural network. The network contains 3 convolutional layers with a kernel size of 3 and 32 channels per layer, outputting 32-dimensional dynamic spatial features.

[0218] The 64-dimensional dynamic temporal features, 32-dimensional static spatial features, and 32-dimensional dynamic spatial features are concatenated to obtain the 128-dimensional node feature vector of sub-basin unit 7. All 32 sub-basin units are processed in the same way to obtain the feature vectors of all nodes.

[0219] 4. Event Recognition and Feature Fusion

[0220] The precipitation sequence of the past 72 hours for sub-basin unit 7 is input into a pre-trained support vector machine (SVM) classifier. This SVM uses a radial basis function kernel and is pre-trained using historical meteorological data labeled with heavy rain, drought, and normal events. The classifier outputs that the event type for the current period is heavy rain, thus obtaining the event type label "heavy rain".

[0221] Data quality scores for each data source are pre-calculated. For example, meteorological observation data has a completeness of 98% and a score of 0.98; hydrological observation data has a small number of missing data points, has a completeness of 92% and a score of 0.92; and remote sensing inversion data is affected by cloud cover and has a score of 0.85.

[0222] The event type label "heavy rain" and data quality scores [0.98, 0.92, 0.85] are input into the cross-modal attention mechanism. The attention mechanism calculates the relevance scores between dynamic temporal features, static spatial features, and dynamic spatial features and query conditions. After softmax normalization, the dynamic fusion weights are 0.62, 0.18, and 0.20, respectively.

[0223] The three features are weighted and fused according to the dynamic fusion weights to obtain a 128-dimensional fused node feature vector for sub-basin unit 7. In this feature vector, dynamic temporal features dominate, which is consistent with the physical understanding that precipitation is the main driving factor of rainstorm events.

[0224] 5. Spatial Propagation of Graph Neural Networks

[0225] The fused feature vectors from 32 nodes and the constructed directed graph are input into the graph neural network. The graph neural network contains 3 graph convolutional layers.

[0226] First layer graph convolution: For edge (5,7), based on the feature vector of upstream node 5 and the hydraulic characteristics of the river segment at edge (5,7), a message function based on the approximate solution of the diffusion wave equation is used to calculate the message. The message function takes the form of: ,in The attenuation coefficient is... The length of the river segment For the sake of comparison, This is the Manning coefficient. This is the propagation function calculated based on the upstream flow. The calculation yields... The value is 0.78. Similarly, calculate all upstream edge messages pointing to node 7 to obtain the message set [0.78, 0.65, 0.82].

[0227] For node 7, sum and aggregate all edge messages pointing to it to obtain an aggregated message of 2.25.

[0228] The current state h_7 of node 7 is 0.95. When updating the node state, a residual connection is introduced, and the new state... Simultaneously, it is mandatory that the difference between the input flow and the output flow equals 0.15 of the lateral inflow. The calculation yields... It is 1.68.

[0229] After three-layer graph convolution propagation, the predicted runoff values ​​for each node over the next 24 hours are obtained. For the watershed outlet node 32, the predicted value is 156 cubic meters per second.

[0230] 6. Counterfactual sample generation and causal regularization

[0231] A random sample was selected from the training set, with a precipitation characteristic value of 12.5 mm / h and a reservoir scheduling characteristic value of 8.6 m³ / s. This sample was input into the Xin'anjiang physical model, and the simulated natural runoff value was 142 m³ / s.

[0232] Two counterfactual samples were generated: Sample A had its precipitation characteristics forcibly set to zero, while keeping other variables unchanged, and was input into the Xin'anjiang model to obtain a counterfactual runoff value of 58 cubic meters per second; Sample B had its reservoir scheduling characteristics forcibly set to zero, while keeping other variables unchanged, and was input into the Xin'anjiang model to obtain a counterfactual runoff value of 165 cubic meters per second.

[0233] Counterfactual samples A and B were input into the graph neural network for forward propagation, and the predicted runoff values ​​were 62 cubic meters per second and 159 cubic meters per second, respectively.

[0234] The predicted runoff for the original sample is 148 m³ / s. The L2 distance between the original sample prediction and the prediction of counterfactual sample A is |148 - 62| = 86, and the L2 distance between the original sample prediction and the prediction of counterfactual sample B is |148 - 159| = 11. The sum of squares of these distances is calculated for all selected samples, yielding a causal consistency regularization loss of 0.037.

[0235] 7. Model Training and Loss Calculation

[0236] Taking sub-basin unit 7 as an example, its predicted runoff value is 1.68 (normalized value), corresponding to an actual observed value of 1.72. The calculated mean square error is... The mean absolute error is The average prediction errors of the 32 nodes yielded an overall mean squared error of 0.0023 and a mean absolute error of 0.035. The data fitting error, calculated with a weight of α=0.7, was... .

[0237] The Saint-Venant equations are discretized at key sections of the river channel. The flow rate and water level predicted by the graph neural network are substituted into the equations. The residuals of the continuity equation and momentum equation are calculated to be 0.0032 and 0.0048, respectively. The summation yields a physical consistency loss of 0.008.

[0238] The causal consistency regularization loss is 0.037. The total loss, calculated with weights of β=0.2 and γ=0.1, is... .

[0239] The Adam optimizer was used to update the parameters of the graph neural network with an initial learning rate of 0.001. After 50 rounds of training, the Nash efficiency coefficient on the validation set reached 0.94, and the physical consistency loss decreased to 0.004, satisfying the preset convergence condition, thus obtaining the trained hydrological process model.

[0240] 8. Application of Model Prediction

[0241] The trained model was applied to the real-time prediction of a rainstorm event in July 2023. Inputs included real-time multi-source data, such as numerical precipitation forecasts for the next 72 hours, real-time hydrological station water level data, current vegetation cover remote sensing data, and reservoir scheduling plans. The model output a runoff prediction sequence for the next 48 hours at the watershed outlet, with a predicted peak flow of 486 cubic meters per second and an actual peak flow of 501 cubic meters per second, a peak error of 3.0%, and a peak occurrence time error of 1 hour. Furthermore, the Monte Carlo dropout method yielded a 95% confidence interval of [452, 523] cubic meters per second, and the actual peak flow fell within this confidence interval.

[0242] Example 3

[0243] Please see Figure 3 This invention provides a multi-source input hydrological model training device, comprising:

[0244] Module 301 is used to construct a directed graph representing the spatial topology of the watershed based on watershed geographic information and river topology data. Nodes represent sub-watershed units and are associated with physical attributes extracted from digital elevation models and soil data, while edges represent river connections and are associated with the hydraulic characteristics of river segments.

[0245] The feature vector module 302 is used to extract the dynamic temporal features and static geographic features of each node within the historical time window based on multi-source historical hydrological and meteorological data through a multimodal feature encoder, so as to obtain the node feature vector of each node.

[0246] The prediction module 303 is used to output the future runoff prediction values ​​of each node by spatial propagation of a graph neural network with the hydrological continuity equation as a hard constraint during message transmission, based on the directed graph and the node feature vectors of each node.

[0247] The loss module 304 is used to calculate the regularization term used to constrain the sensitivity of the model prediction to causal paths based on the counterfactual samples generated by intervening in the input variables according to the watershed physical model, and obtain the causal consistency regularization loss.

[0248] Training module 305 is used to train the graph neural network based on the data fitting error between the predicted and observed runoff values, the physical consistency loss calculated based on the discrete residuals of the Saint-Venant equations, and the causal consistency regularization loss, to obtain a trained hydrological process model.

[0249] It should be noted that each module and unit in the multi-source input hydrological model training device in this embodiment corresponds one-to-one with each step in the multi-source input hydrological model training method in the aforementioned embodiment. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned multi-source input hydrological model training method, and will not be repeated here.

[0250] Example 4

[0251] Please see Figure 4 This embodiment provides an electronic device, including at least one processor 401 and a memory 402. Optionally, the device further includes a communication component 403. The processor 401, memory 402, and communication component 403 are connected via a bus 404.

[0252] In a specific implementation, at least one processor 401 executes computer execution instructions stored in memory 402, causing at least one processor 401 to perform the above-described method.

[0253] The specific implementation process of processor 401 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0254] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0255] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0256] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0257] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0258] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0259] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0260] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0261] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0262] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0263] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0264] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0265] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0266] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for training a multi-source input hydrological model, characterized in that, include: Based on watershed geographic information and river topology data, a directed graph representing the spatial topology of the watershed is constructed, in which nodes represent sub-watershed units and are associated with physical attributes extracted from digital elevation models and soil data, and edges represent river connections and are associated with the hydraulic characteristics of river segments. Based on multi-source historical hydrological and meteorological data, the dynamic temporal features and static geographic features of each node within the historical time window are extracted by a multimodal feature encoder to obtain the node feature vector of each node. Based on the directed graph and the node feature vectors of each node, the graph neural network with the hydrological continuity equation as a hard constraint is used for spatial propagation during message transmission to output the future runoff prediction values ​​of each node. Based on the counterfactual samples generated by intervening in the input variables according to the watershed physical model, the regularization term used to constrain the sensitivity of the model prediction to causal paths is calculated, and the causal consistency regularization loss is obtained. The graph neural network is trained based on the data fitting error between the predicted and observed runoff values, the physical consistency loss calculated from the discrete residuals of the Saint-Venant equations, and the causal consistency regularization loss, to obtain a trained hydrological process model.

2. The multi-source input hydrological model training method according to claim 1, characterized in that, The construction of a directed graph representing the spatial topology of the watershed based on watershed geographic information and river topology data includes: The average slope and cross-sectional area of ​​each sub-basin unit are extracted based on the digital elevation model. Determine the river connectivity relationships between sub-basin units based on river network data; Soil texture of each sub-basin unit was extracted based on soil data; The roughness parameter was obtained by looking up a table based on the soil texture. A directed graph is constructed by using the average slope, river cross-sectional area, soil texture, and roughness parameters as the physical attributes of the nodes, the river connection relationships as the edges of the nodes, and the river length, gradient, and Manning coefficient as the hydraulic characteristics of the river segments.

3. The multi-source input hydrological model training method according to claim 1, characterized in that, The process involves extracting the dynamic temporal and static geographic features of each node within a historical time window using multi-source historical hydrological and meteorological data and a multimodal feature encoder, resulting in a node feature vector for each node, including: Meteorological observation data, hydrological observation data, geospatial data, soil property data, remote sensing inversion data, and human activity records are obtained from multi-source historical hydrological and meteorological data. Based on the meteorological and hydrological observation data, the dynamic temporal features of each node are extracted through a bidirectional long short-term memory network; Based on the geospatial data and soil attribute data, the static spatial features of each node are extracted using a multilayer perceptron. Based on the remote sensing inversion data and human activity record data, the dynamic spatial features of each node are extracted using a one-dimensional convolutional neural network; The dynamic temporal features, static spatial features, and dynamic spatial features of each node are concatenated to obtain the node feature vector of each node.

4. The multi-source input hydrological model training method according to claim 3, characterized in that, The process of concatenating the dynamic temporal features, static spatial features, and dynamic spatial features of each node to obtain the node feature vector for each node includes: For each node, based on the historical meteorological time series in the meteorological observation data corresponding to the node, the event type of the current time period is identified by support vector machine to obtain the event type label of rainstorm, drought or normal. Based on the event type label and the pre-calculated data quality scores of each data source for the node, the dynamic fusion weights of the node's dynamic temporal features, static spatial features, and dynamic spatial features are calculated through a cross-modal attention mechanism. The dynamic temporal features, static spatial features, and dynamic spatial features of the node are weighted and fused according to the dynamic fusion weights to obtain the node feature vector of the node.

5. The multi-source input hydrological model training method according to claim 1, characterized in that, The step of outputting the future runoff prediction values ​​for each node based on the directed graph and the node feature vectors of each node, through spatial propagation using a graph neural network with the hydrological continuity equation as a hard constraint during message passing, includes: Based on the directed graph and the node feature vectors of each node, a message function is used to calculate the message transmitted from the upstream node to the downstream node for each edge in the directed graph, and the edge message is obtained. The message function is obtained based on the approximate solution of the diffusion wave equation and is used to characterize the propagation attenuation and hysteresis characteristics of flood waves in the river channel. For each node, aggregate all edge messages pointing to that node to obtain the aggregated message for that node; Based on the aggregated message and the current state of the node, a residual connection is introduced to update the node state. During the update, the difference between the input flow and the output flow of the node is equal to the lateral inflow of the node. The updated node status of each node is output as the future runoff prediction value for each node.

6. The multi-source input hydrological model training method according to claim 1, characterized in that, The step of calculating a regularization term to constrain the model's prediction sensitivity to causal paths, based on counterfactual samples generated by intervening in input variables according to a watershed physical model, yields a causal consistency regularization loss, including: Based on a predetermined watershed hydrophysical model, the precipitation characteristics and / or reservoir scheduling characteristics in multi-source historical hydrological and meteorological data are intervened. While keeping other variables unchanged, the precipitation characteristics and / or reservoir scheduling characteristics are forcibly set to zero, and the state variables consistent with the intervention scenario are re-simulated using the hydrophysical model to generate counterfactual samples. The counterfactual samples are input into the graph neural network for forward propagation to obtain the counterfactual sample runoff prediction values. The difference between the predicted runoff value and the counterfactual sample runoff prediction value is calculated to obtain the causal consistency regularization loss, which constrains the model's sensitivity to causal path perturbations.

7. The multi-source input hydrological model training method according to claim 1, characterized in that, The process involves training the graph neural network based on the data fitting error between the predicted and observed runoff values, the physical consistency loss calculated from the discrete residuals of the Saint-Venant equations, and the causal consistency regularization loss, to obtain a trained hydrological process model, including: The data fitting error is calculated based on the weighted sum of the mean square error and the mean absolute error between the predicted and observed runoff values. The physical consistency loss is calculated based on the discretized residuals of the Saint-Venant equations at the river cross-section. The continuity equation is satisfied by the hydrological continuity hard constraint during the node state update process, and the momentum equation is measured by calculating the residuals of its discrete form and performing square sum or absolute value summation to measure the hydrodynamic consistency of the model prediction results. The data fitting error, physical consistency loss, and causal consistency regularization loss are weighted and summed according to preset weights to obtain the total loss function. Based on the total loss function, the graph neural network is updated with an adaptive learning rate optimization algorithm to obtain a trained hydrological process model.

8. A runoff prediction method, characterized in that, include: Acquire real-time multi-source data for the target watershed, including meteorological observation data, hydrological observation data, geospatial data, soil property data, remote sensing inversion data, and human activity records; Based on the real-time multi-source data, the dynamic temporal features, static spatial features, and dynamic spatial features of each sub-basin unit in the target watershed are extracted by a multimodal feature encoder to obtain the node feature vector of each sub-basin unit. The pre-constructed directed graph representing the spatial topology of the watershed and the node feature vectors of each sub-watershed unit are input into the multi-source input hydrological model, and the runoff prediction values ​​of each sub-watershed unit at future times are output. The multi-source input hydrological model is obtained according to any one of the methods described in claims 1-7. The predicted runoff values ​​are post-processed to output a future runoff prediction sequence for the target watershed.

9. A multi-source input hydrological model training device, characterized in that, include: The module is used to construct a directed graph representing the spatial topology of the watershed based on watershed geographic information and river topology data. Nodes represent sub-watershed units and are associated with physical attributes extracted from digital elevation models and soil data, while edges represent river connections and are associated with the hydraulic characteristics of river segments. The feature vector module is used to extract the dynamic temporal features and static geographic features of each node within the historical time window based on multi-source historical hydrological and meteorological data through a multimodal feature encoder, so as to obtain the node feature vector of each node. The prediction module is used to output the predicted runoff values ​​for each node at future times by spatial propagation of a graph neural network with the hydrological continuity equation as a hard constraint during message transmission, based on the directed graph and the node feature vectors of each node. The loss module is used to calculate the regularization term used to constrain the sensitivity of the model prediction to causal paths based on the counterfactual samples generated by intervening in the input variables according to the watershed physical model, and obtain the causal consistency regularization loss. The training module is used to train the graph neural network based on the data fitting error between the predicted and observed runoff values, the physical consistency loss calculated based on the discrete residuals of the Saint-Venant equations, and the causal consistency regularization loss, to obtain a trained hydrological process model.

10. An electronic device, characterized in that, include: At least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method as described in any one of claims 1-8.