Hydrological runoff prediction method and device
Patent Information
- Application Number
- CN202611151549.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-30
AI Technical Summary
[0002]径流预测是防汛抗旱、水资源调度以及水生态保护的核心支撑技术,传统水文模型虽具备明确的物理机制,但是在实际应用中面临参数率定繁琐、跨流域泛化能力弱、且难以直接输出预测不确定性等问题
[0056]其一,通过上游径流协变量和/或带河网拓扑掩码的站点注意力模块,以显式或隐式方式引入拓扑信息,使下游站点重点利用自身及其上游站点的有效径流信息,减少无关站点干扰;
Smart Images

Figure CN123012416A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of hydrological forecasting and artificial intelligence technology, and in particular to a method for predicting hydrological runoff. Background Technology
[0002] Runoff forecasting is a core supporting technology for flood control, drought relief, water resource allocation, and water ecological protection. While traditional hydrological models possess clear physical mechanisms, they face challenges in practical applications, including cumbersome parameter calibration, weak cross-basin generalization ability, and difficulty in directly outputting forecast uncertainties. Furthermore, existing forecasting models typically focus on time dependencies at a single station or relationships between different variables within the same task, making it difficult to simultaneously and accurately utilize the topological connections between upstream and downstream stations in a river network. On the one hand, directly mixing data from multiple stations for training can lead to the model incorrectly aggregating information from stations without hydraulic connections; on the other hand, the significant differences in runoff volume due to varying catchment areas at different stations can cause the model to favor stations with larger runoff volumes. Moreover, existing methods still fall short in jointly characterizing runoff processes and forecast uncertainties across multiple stations and time scales.
[0003] Therefore, the technical problem to be solved by this application is: in multi-site runoff prediction, how to introduce river network topology information in a controllable manner, distinguish between the internal characteristic relationships of stations and the runoff transmission relationships between stations, and reduce the impact of watershed area differences on the training process, thereby improving the accuracy, stability and uncertainty expression ability of medium- and long-term daily runoff prediction. Summary of the Invention
[0004] This application provides a hydrological runoff prediction method and apparatus to address the deficiencies in the prior art. This application separates the modeling of "feature contribution relationship within a station" and "runoff influence relationship between stations". The former is processed by the task attention module, and the latter is processed by the upstream runoff covariate and / or the station attention module with topology mask, thereby reducing interference from irrelevant station information and enhancing the interpretability of topology information utilization.
[0005] In a first aspect, the present invention proposes a hydrological runoff model training method, including a first-stage training and a second-stage training, characterized in that a first dataset is obtained from the same batch of stations in the target watershed within a first time interval.
[0006] The first dataset is input into the initial hydrological runoff large model and iteratively updated to obtain the first hydrological runoff large model, which is the first stage of training.
[0007] Obtain the second dataset generated by the same batch of stations in the target watershed within the second time interval;
[0008] The second dataset is input into the first large-scale hydrological runoff model and iteratively updated to obtain the second large-scale hydrological runoff model. This is the second stage of training. The second large-scale hydrological runoff model is the hydrological runoff model that has been trained.
[0009] The initialization of the large-scale hydrological runoff model includes a time attention module and a task attention module;
[0010] Task indexing was introduced during the model training process.
[0011] Preferably, both the first and second datasets are derived from the same batch of stations in the target watershed, enabling the model to learn runoff variation patterns in stages on data of different time intervals or sample sizes.
[0012] Preferably, the first stage of training includes calculating the first loss based on the predicted runoff depth at the station and the corresponding actual runoff depth, obtaining the prediction results and loss through forward propagation, and updating the model parameters through backpropagation to obtain the first large hydrological runoff model.
[0013] Preferably, the second stage of training includes inputting the second dataset into the first hydrological runoff large model for second-stage training, calculating the second loss based on the predicted runoff depth and the actual runoff depth in the second stage, and continuing to update the model parameters through backpropagation.
[0014] Preferably, the topological information of the site is introduced during the model training process.
[0015] Topological information can be introduced in two ways.
[0016] First, the historical runoff of upstream stations is explicitly added to the covariates of the current station, and the contribution of upstream runoff to the target runoff of the current station is learned through task attention.
[0017] Secondly, a site attention module is set up in addition to the time attention module and the task attention module, and the information transmission between different site runoff representations is controlled by the river network topology mask.
[0018] The two methods described above for introducing site topology information can be used individually or in combination within the same model.
[0019] The training samples for each station in the training dataset include covariates and target runoff depth.
[0020] When upstream runoff at a station is used as a covariate to introduce topological information during model training, the station covariates in the training dataset include the historical hydrological characteristics of the current station and the historical runoff depth of the upstream station determined based on the river network topology. In this case, the model sequentially performs temporal attention operations and task attention operations on the encoded input.
[0021] When topological information is introduced only using a site attention module with topological masking during model training, the site covariates in the training dataset only include the historical hydrological features of the current site. In this case, the model sequentially performs temporal attention, task attention, and site attention operations on the encoded input.
[0022] Preferably, the first dataset is input into the initial hydrological runoff large model, and forward propagation is performed first: the encoder encodes the hydrological characteristics, historical runoff depth and optional upstream runoff covariates of each station into latent vectors; the time attention module aggregates historical information along the time dimension; the task attention module aggregates covariates and target runoff information within the same task index; when the station attention module is configured, this module aggregates the runoff representations of itself and upstream stations according to the river network topology mask.
[0023] Preferably, the second dataset is input into the first large-scale hydrological runoff model, and the model parameters obtained in the first stage are used as the initial parameters for the second stage. The training continues according to the same forward propagation, combined loss calculation and backpropagation process.
[0024] Secondly, this application relates to a method for predicting hydrological runoff, including:
[0025] S1 acquires the hydrological characteristics, historical runoff, and river network topology of multiple stations to be predicted in the target watershed within a historical time window;
[0026] S2 converts historical runoff volume into historical runoff depth;
[0027] S3 is configured based on the selected topology information, using the historical runoff of upstream stations as a covariate of the current station and / or generating a river network topology mask;
[0028] S4 adds corresponding task indexes to the inputs of each site;
[0029] S5 feeds the constructed input into the hydrological runoff model and outputs the runoff depth quantile prediction results for each station in the future forecast period.
[0030] Preferably, in a prediction configuration where topological information is introduced by using upstream station runoff as a covariate, the model sequentially performs temporal attention and task attention operations on the encoded input.
[0031] Preferably, in another prediction configuration, i.e. when topological information is introduced by generating a river network topology mask, the model performs station attention operations with river network topology masks on the runoff representations of each station.
[0032] Preferably, in the combined configuration, upstream runoff depth is simultaneously used as a covariate and station attention calculations are performed. The outputs of each attention module are processed by a fusion and feedforward neural network, and the predicted runoff depth corresponding to each future time location and quantile level is output by a fully connected layer. Subsequently, the predicted runoff depth is converted into runoff volume based on the catchment area of the target station.
[0033] When topological information is incorporated by including historical runoff from upstream stations as a covariate for the current station, the station covariates include the station's historical hydrological characteristics and the historical hydrological runoff from upstream stations.
[0034] Preferably, the station is used as the unit for assigning task indices. Let the task indices of station 1, station 2, and station 3 be 0, 1, and 2 respectively. Then, the historical hydrological characteristics of station 1, the upstream runoff covariate used as input to station 1, and the target runoff depth of station 1 are all assigned index 0; the same applies to other stations. When the historical runoff of station 1 is used as a covariate of station 2, this covariate is assigned the task index 1 of station 2. The task index is used to limit the information interaction scope of task attention, so that when the model calculates the task attention of a certain station, it focuses on aggregating the covariate and the target runoff depth representation with the task index of that station.
[0035] For example, when learning the target runoff at station 2, the task attention module processes the historical hydrological features of station 2 from the attached task index 1, the upstream runoff as a covariate of station 2, and the historical target runoff depth of station 2, instead of directly aggregating the internal features of the station from other attached task indices.
[0036] Thirdly, this application relates to a hydrological runoff model training device, including...
[0037] The acquisition module is used to acquire historical hydrological characteristics, historical runoff, catchment area, and river network topology of each station in the target watershed;
[0038] The task index module is used to attach corresponding task indexes to the inputs of each site.
[0039] The prediction module performs attention operations on the encoded input and outputs the runoff depth prediction results for each station.
[0040] The training module is used to calculate the weighted sum of quantile loss and NSE loss based on the predicted runoff depth and the actual runoff depth, and to iteratively update the model parameters through backpropagation.
[0041] Preferably, when the upstream runoff covariate is used to introduce the river network topology, the prediction module performs time attention and task attention operations.
[0042] Preferably, when river network topology relationships are introduced through river network topology masks, the prediction module performs time attention operations, task attention operations, and site attention operations with river network topology masks.
[0043] Preferably, when both upstream runoff covariates and river network topology masks are used to simultaneously introduce river network topology relationships, the prediction module needs to perform time attention operations, task attention operations, and station attention operations with river network topology masks.
[0044] Fourthly, this application relates to a hydrological runoff prediction device.
[0045] It includes an acquisition module, a processing module, and an output module;
[0046] The acquisition module is used to acquire historical hydrological characteristics, historical runoff depth, catchment area, and river network topology of multiple stations;
[0047] The processing module is used to convert historical runoff into runoff depth, input additional task indexes for each station, and perform attention calculations.
[0048] The output module is used to output the runoff depth quantile prediction results for multiple stations in the future forecast period, and convert the predicted runoff depth into runoff volume based on the catchment area of each station.
[0049] The device can utilize station topology information in any of the following ways: using the historical runoff of upstream stations as the covariate of the current station; aggregating the runoff representations of each station under topological mask constraints using a station attention module; or using both of the above methods simultaneously.
[0050] When upstream runoff covariates are used, the runoff from upstream stations is appended to the task index of the current prediction station and participates in the task attention calculation for the current station. That is, the processing module performs both temporal attention and task attention calculations at this time.
[0051] When a site attention module is used, the site attention is calculated only between the runoff representations of each site, and a river network topology mask is used to ensure that downstream sites only focus on themselves and their upstream sites. In the current implementation, the site attention module does not consider upstream and downstream propagation delays. That is, the processing module performs time attention calculations, task attention calculations, and site attention calculations with river network topology masks.
[0052] Fifthly, this application relates to an electronic device, including a memory and a processor, wherein the memory stores a computer program for the hydrological runoff model training method according to the first aspect of this application or a computer program for the hydrological runoff prediction method according to the second aspect of this application; when the processor executes the program, it can implement the hydrological runoff model training method or the hydrological runoff prediction method of this application.
[0053] Sixthly, this application relates to a computer-readable storage medium storing a computer program for a hydrological runoff model training method according to the first aspect of this application or a computer program for a hydrological runoff prediction method according to the second aspect of this application; when a processor executes the program, it can implement the hydrological runoff model training method or the hydrological runoff prediction method of this application.
[0054] Seventhly, this application relates to a computer program product, including a computer program executed by a processor to implement the hydrological runoff model training method of the first aspect of this application or the hydrological runoff prediction method of the second aspect.
[0055] Compared with the prior art, this application has at least the following beneficial effects:
[0056] Firstly, by introducing topological information in an explicit or implicit manner through upstream runoff covariates and / or station attention modules with river network topology masks, downstream stations can make full use of their own and their upstream stations' effective runoff information, reducing interference from irrelevant stations.
[0057] Secondly, by limiting the scope of information interaction within a station through task indexing, the contribution of covariates within a station and the runoff impact between stations are separated and modeled separately, thereby improving the interpretability of the hydrological runoff prediction model.
[0058] Third, runoff depth is used as the training target and converted into runoff volume in the output stage to reduce the magnitude bias caused by differences in catchment area.
[0059] Fourth, by weighting and optimizing the quantile loss and NSE loss, both the expression of prediction uncertainty and the fitting ability of runoff process are taken into account.
[0060] Fifth, by conducting two-stage training on the same batch of stations at different time intervals or with different sample sizes, the model's adaptability to different hydrological scenarios and its predictive stability can be improved. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0062] Figure 1 This is a flowchart illustrating the training method for the hydrological runoff prediction model of the present invention.
[0063] Figure 2This is a flowchart illustrating the hydrological runoff prediction method of the present invention;
[0064] Figure 3 This is a schematic diagram of the hydrological runoff model training device of the present invention;
[0065] Figure 4 This is a schematic diagram of the hydrological runoff prediction device of the present invention;
[0066] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0067] 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.
[0068] 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.
[0069] Figure 1 This is a hydrological runoff model training method provided in an embodiment of the present invention.
[0070] like Figure 1 The hydrological runoff model training method shown includes a first-stage training and a second-stage training, characterized by acquiring a first dataset formed by the same batch of stations in the target watershed within a first time interval;
[0071] The first dataset is input into the initial hydrological runoff large model and iteratively updated to obtain the first hydrological runoff large model, which is the first stage of training.
[0072] Obtain the second dataset generated by the same batch of stations in the target watershed within the second time interval;
[0073] The second dataset is input into the first large-scale hydrological runoff model and iteratively updated to obtain the second large-scale hydrological runoff model. This is the second stage of training. The second large-scale hydrological runoff model is the hydrological runoff model that has been trained.
[0074] The initialization of the large-scale hydrological runoff model includes a time attention module and a task attention module;
[0075] Task indexes or site topology relationships are introduced during the training process of the model.
[0076] The hydrological characteristics are mainly precipitation, temperature and underlying surface features, supplemented by atmospheric indices such as AO (Arctic Oscillation), MEI.v2 (Multivariate ENSO Index V2), ONI (Oceanic Nino Index) and other climate features.
[0077] The precipitation data comes from an open-source dataset, and based on this, cumulative precipitation features are derived, specifically the cumulative precipitation over the past 3, 7, 15, and 30 days.
[0078] The cumulative precipitation characteristic is obtained by summing the daily precipitation series using a sliding window. Let P(t) be the daily precipitation on date t, and w be the cumulative window length. Then, the cumulative precipitation over w days is P_w(t) = Σ(i=0 to w-1)P(ti), which is the sum of precipitation over the preceding w consecutive days, including date t. Taking the input sample of station A on date t as an example (the following values are only illustrative examples), if the daily precipitation from date t to t-6 is 5, 3, 4, 0, 2, 1, and 6 mm respectively, then the cumulative precipitation over 3 days is 5+3+4=12 mm, and the cumulative precipitation over 7 days is 5+3+4+0+2+1+6=21 mm. The cumulative precipitation over 15 days and 30 days can be calculated according to the same rule, and the cumulative values of each window are used together as the multi-timescale cumulative precipitation characteristic for date t.
[0079] The Precipitation Index API: Temperature data comes from the open-source product CMFDv2, and rolling averages for 3, 7, and 15 days are derived from it.
[0080] The Precipitation Index (API) is calculated using a decay-weighted method. Let P(ti) be the precipitation on the i-th day before date t, w be the calculation window length, and k be a configurable decay coefficient between 0 and 1. Then, API_w(t) = Σ(i=0 to w-1)k^iP(ti); the further away from date t, the smaller the weight of the precipitation. For example (the following values are only illustrative examples), if k = 0.85, and the precipitation on dates t, t-1, and t-2 is 5, 3, and 4 mm respectively, then the 3-day API is 5 + 0.85 × 3 + 0.85² × 4 = 10.44 mm. The rolling average temperature is calculated as T_w(t) = (1 / w)Σ(i=0 to w-1)T(ti), which is the arithmetic mean of the daily average temperatures over the preceding w consecutive days, including date t. For example, if the daily average temperatures from date t to t-2 are 16℃, 18℃, and 17℃ respectively, then the 3-day rolling average temperature is (16+18+17) / 3=17℃. The window length w and the attenuation coefficient k can be configured according to the data conditions of the target watershed.
[0081] Due to significant differences in catchment area among different stations, runoff volume was uniformly converted to runoff depth before training, and runoff depth was used as the historical target sequence and supervision label. If the unit of daily average runoff volume Q is m³ / s...
[0082] If the catchment area A is measured in km², then the daily runoff depth R is measured in mm / day, and R = 86.4Q / A. After the model predicts the runoff depth R, it can be converted into runoff volume using Q = RA / 86.4. This process can reduce the influence of the catchment area on the target magnitude and avoid the model optimization being overly biased towards large watershed stations.
[0083] Each data sample corresponds to the data of a prediction station within a given historical window and prediction window, including the station's covariates and historical target runoff depth. Covariates include the historical hydrological characteristics of the current station, and can be configured to include historical runoff depths of upstream stations determined by the river network topology, depending on the selected topology information. All inputs in the sample are indexed by their current prediction station. Historical hydrological characteristics include multi-timescale cumulative precipitation characteristics and / or the cumulative antecedent precipitation index (API).
[0084] The first dataset is input into the initial hydrological runoff model. First, forward propagation is performed: the encoder encodes the hydrological characteristics, historical runoff depth, and optional upstream runoff covariates of each station into latent vectors; the time attention module aggregates historical information along the time dimension; the task attention module aggregates covariates and target runoff information within the same task index; when a station attention module is configured, this module aggregates the runoff representations of itself and upstream stations according to the river network topology mask. The model outputs multiple quantile predictions of future runoff depth for each station. Then, the total loss L = αL_q + βL_NSE is calculated, where α and β are configurable non-negative weights; L_q is the quantile loss at each preset quantile level; and L_NSE = 1 - NSE. Finally, backpropagation is performed on the total loss to update the model parameters, resulting in the first hydrological runoff model.
[0085] The second dataset is input into the first large-scale hydrological runoff model. The model parameters obtained in the first stage are used as the initial parameters for the second stage. Training continues according to the same forward propagation, combined loss calculation and backpropagation process.
[0086] Quantile loss is expressed as: ;
[0087] NSE loss is expressed as Where τ is the configurable quantile level and y is the true runoff depth. These are the predicted values for the corresponding quantiles. This is a representative predicted value used to calculate NSE. The second large-scale hydrological runoff model is obtained after completing the second stage of training.
[0088] Topological information can be introduced in two ways.
[0089] First, the historical runoff of upstream stations is explicitly added to the covariates of the current station, and the contribution of upstream runoff to the target runoff of the current station is learned through task attention.
[0090] Secondly, a site attention module is set up in addition to the time attention module and the task attention module, and the information transmission between different site runoff representations is controlled by the river network topology mask.
[0091] The two methods described above for introducing site topology information can be used individually or in combination within the same model.
[0092] The training samples for each station in the training dataset include covariates and target runoff depth.
[0093] When upstream runoff of a station is used as a covariate to introduce topological information during model training, the station covariates in the training dataset include the historical hydrological characteristics of the current station and the historical runoff depth of the upstream station determined based on the river network topology.
[0094] When topological information is introduced using only the site attention module with topological mask during model training, the site covariates in the training dataset only include the historical hydrological features of the current site.
[0095] The temporal attention module of this application is used to learn the dependencies of the same input variable at different historical moments along the time dimension. Specifically, a linear mapping is performed on the encoded representation H(s,k) formed by any station s and any input variable k within a historical window of length T to obtain the query matrix Q, the key matrix K, and the value matrix V, and the attention weights are calculated according to the following formula:
[0096] Then, the time aggregation representation is obtained as O_time = A_timeV; where d is the feature dimension and M_time is an optional causal mask or effective time location mask. Through this operation, the model can comprehensively utilize information such as recent and earlier precipitation, temperature, previous precipitation index, and historical runoff depth.
[0097] In this application, the covariates and target runoff depth of each station share the task index of that station. The task attention module calculates the association between each covariate and the target runoff within the same prediction station; if the runoff from an upstream station is used as a covariate input for the current station, it also uses the task index of the current station in the calculation. Each station's covariates and target runoff belong to an independent task, sharing a task index. The task self-attention module allows covariates sharing the same task index to perform attention calculations, exploring the contribution of different covariates to the target runoff. The calculation objects are the covariates and runoff depth within the station.
[0098] Each encoded variable is mapped to a query, key, and value, respectively, and a task mask M_task is set.
[0099] When two variables have the same task index, the corresponding element of M_task is 0, allowing it to participate in attention calculation; otherwise, it is set to negative infinity to block their interaction.
[0100] Task attention weights can be represented as:
[0101] ,
[0102] The task aggregation result is O_task=A_taskV_task.
[0103] Therefore, we can learn the contribution of precipitation, temperature, underlying surface characteristics, and upstream runoff covariates at the current station to the target runoff at that station.
[0104] The site attention module only performs calculations between the runoff representations of each site, without processing covariates such as precipitation and temperature within each site. A mask M_topo is constructed based on the river network topology: when site j is itself or an upstream site of site i, the corresponding mask value is 0; otherwise, it is negative infinity. Therefore, downstream sites can only aggregate runoff information from themselves and their upstream sites. The current implementation does not consider upstream and downstream propagation delays.
[0105] Specifically, let R be the runoff coding representation of each station at the same time location, map R to Q_site, K_site, and V_site, and calculate...
[0106] )
[0107] This leads to the equation O_site = A_siteV_site. Taking site A as an upstream of site B as an example, site B can assign attention weights to the runoff representations of site A and site B itself, but cannot pay attention to sites that have no upstream relationship with site B.
[0108] See Figure 2 This embodiment provides a method for predicting hydrological runoff.
[0109] Hydrological runoff prediction methods include:
[0110] S1 acquires the hydrological characteristics, historical runoff, and river network topology of multiple stations to be predicted in the target watershed within a historical time window;
[0111] S2 converts historical runoff volume into historical runoff depth;
[0112] S3 is configured based on the selected topology information, using the historical runoff of upstream stations as a covariate of the current station and / or generating a river network topology mask;
[0113] S4 adds corresponding task indexes to the inputs of each site;
[0114] S5 feeds the constructed input into the hydrological runoff model and outputs the runoff depth quantile prediction results for each station in the future forecast period.
[0115] Preferably, in a prediction configuration where topological information is introduced by using upstream station runoff as a covariate, the model sequentially performs temporal attention and task attention operations on the encoded input.
[0116] Preferably, in another prediction configuration, i.e. when topological information is introduced by generating a river network topology mask, the model performs station attention operations with river network topology masks on the runoff representations of each station.
[0117] Preferably, in the combined configuration, upstream runoff is simultaneously used as a covariate and station attention calculations are performed. The outputs of each attention module are processed by a fusion and feedforward neural network, and the predicted runoff depth corresponding to each future time location and quantile level is output by a fully connected layer. Subsequently, the predicted runoff depth is converted into runoff volume based on the catchment area of the target station.
[0118] When topological information is incorporated by including historical runoff from upstream stations as a covariate for the current station, the station covariates include the station's historical hydrological characteristics and the historical hydrological runoff from upstream stations.
[0119] Preferably, the station is used as the unit for assigning task indices. Let the task indices for station 1, station 2, and station 3 be 0, 1, and 2 respectively. Then, the historical hydrological characteristics of station 1, the upstream runoff covariate used as input to station 1, and the target runoff depth of station 1 are all assigned index 0; the same applies to other stations. When the historical runoff of station 1 is used as a covariate for station 2, this covariate is assigned the task index 1 of station 2. The task index is used to limit the information interaction scope of task attention, so that when the model calculates the task attention of a certain station, it focuses on aggregating the covariates and target runoff representations with the task index of that station.
[0120] For example, when learning the target runoff of station 2, the task attention module processes the historical hydrological features of station 2 from the attached task index 1, the upstream runoff as a covariate of station 2, and the historical target runoff of station 2, instead of directly aggregating the internal features of the station from other attached task indices.
[0121] In this embodiment, the upstream runoff covariate and the station attention module can be enabled individually or simultaneously. When the upstream runoff covariate is not used, the station attention module can aggregate the runoff representations of each station under the constraints of the river network topology mask. When the station attention module is not used, the task attention module can process the upstream runoff as the input of the current station covariate. When both are enabled, the model utilizes the river network topology information from both the input feature level and the station representation level.
[0122] When topological information is introduced by using the runoff depth at upstream stations as a covariate, the covariate includes the historical hydrological characteristics of the station and the historical hydrological runoff depth at the upstream station.
[0123] For example, if there is no upstream station for station A, then the covariates of station A only include historical hydrological characteristics. That is, the covariates of station A are only represented by the historical hydrological characteristics of station A.
[0124] For example, if station B has an upstream station A, then the covariates of station B include the hydrological characteristics of station B and the hydrological runoff depth of station A. That is, the covariates of station B are represented by the historical hydrological characteristics of station B and the historical hydrological runoff depth of station A.
[0125] For example, station C has upstream stations B, D, and E. The covariates of station C are the hydrological characteristics of station C plus the historical runoff depths of stations B, D, and E. That is, the covariates of station C are expressed as including the hydrological characteristics of station C, the historical runoff depths of station B, the historical runoff depths of station D, and the historical runoff depths of station E.
[0126] See Figure 3 This application relates to a hydrological runoff model training device, including
[0127] The acquisition module is used to acquire historical hydrological characteristics, historical runoff, catchment area, and river network topology of each station in the target watershed;
[0128] The task index module is used to attach corresponding task indexes to the inputs of each site.
[0129] The prediction module performs attention operations on the encoded input and outputs the runoff depth prediction results for each station.
[0130] The training module is used to calculate the weighted sum of quantile loss and NSE loss based on the predicted runoff depth and the actual runoff depth, and to iteratively update the model parameters through backpropagation.
[0131] Preferably, when the upstream runoff covariate is used to introduce the river network topology, the prediction module performs time attention and task attention operations.
[0132] Preferably, when river network topology relationships are introduced through river network topology masks, the prediction module performs time attention operations, task attention operations, and site attention operations with river network topology masks.
[0133] See Figure 4 This application relates to a hydrological runoff prediction device, including an acquisition module, a processing module and an output module;
[0134] The acquisition module is used to acquire historical hydrological characteristics, historical runoff, catchment area, and river network topology of multiple stations;
[0135] The processing module is used to convert historical runoff into runoff depth, input additional task indexes for each station, and perform attention calculations.
[0136] The output module is used to output the runoff depth quantile prediction results for multiple stations in the future forecast period, and convert the predicted runoff depth into runoff volume based on the catchment area of each station.
[0137] The device can utilize station topology information in any of the following ways: using the historical runoff of upstream stations as the covariate of the current station; aggregating the runoff representations of each station under topological mask constraints using a station attention module; or using both of the above methods simultaneously.
[0138] When upstream runoff covariates are used, the runoff from upstream stations is appended to the task index of the current prediction station and participates in the task attention calculation for the current station. That is, the processing module performs both temporal attention and task attention calculations at this time.
[0139] When a site attention module is used, the site attention is calculated only between the runoff representations of each site, and a river network topology mask is used to ensure that downstream sites only focus on themselves and their upstream sites. In the current implementation, the site attention module does not consider upstream and downstream propagation delays. That is, the processing module performs time attention calculations, task attention calculations, and site attention calculations with river network topology masks.
[0140] See Figure 5 This application relates to an electronic device, including a memory and a processor. The memory stores a computer program for a hydrological runoff model training method according to Embodiment 1 of this application or a computer program for a hydrological runoff prediction method according to Embodiment 2 of this application. When the processor executes the program, it can implement the hydrological runoff model training method or the hydrological runoff prediction method of this application.
[0141] This application relates to a computer-readable storage medium storing a computer program for a hydrological runoff model training method according to Embodiment 1 of this application or a computer program for a hydrological runoff prediction method according to Embodiment 2 of this application; when the processor executes the program, it can implement the hydrological runoff model training method or the hydrological runoff prediction method of this application.
[0142] This application relates to a computer program product, including a computer program that is executed by a processor to implement the hydrological runoff model training method according to Embodiment 1 or the hydrological runoff prediction method according to Embodiment 2 of this application.
Claims
1. A method for training a hydrological runoff model, comprising a first-stage training and a second-stage training, characterized in that... Obtain the first dataset generated by the same batch of stations in the target watershed within the first time interval; input the first dataset into the initial hydrological runoff large model and iteratively update it to obtain the first hydrological runoff large model, which is the first stage of training; Obtain a second dataset from the same batch of stations in the target watershed within a second time interval; input the second dataset into the first large-scale hydrological runoff model for iterative updates to obtain the second large-scale hydrological runoff model, which is the second stage of training; the second large-scale hydrological runoff model is the trained hydrological runoff model. The initialization of the large-scale hydrological runoff model includes a time attention module and a task attention module; A task index was introduced during the training of the hydrological runoff model; The data used in training the hydrological runoff model includes historical runoff depth data for each station.
2. The hydrological runoff model training method according to claim 1, characterized in that, During the training of the hydrological runoff model, the topological structure information of the stations is incorporated.
3. The hydrological runoff model training method according to claim 1 or 2, characterized in that, The topological information of the stations incorporated during the training of the hydrological runoff model includes: The historical runoff of upstream stations of the current station is explicitly added to the covariates of the current station and / or a station attention module is set in addition to the time attention module and the task attention module, and the information transmission between runoff representations of different stations is controlled by the river network topology mask.
4. A method for predicting hydrological runoff, comprising acquiring the hydrological characteristics, historical runoff, and river network topology of multiple stations to be predicted in a target watershed within a historical time window; Convert the historical runoff volume of a station into the historical runoff depth of the station; Configure topology information by using the historical runoff depth of upstream stations as a covariate for the current station and / or generating a river network topology mask; Enter the corresponding task index for each site; The station's input is fed into the hydrological runoff model, which outputs the runoff depth quantile prediction results for each station within the future forecast period.
5. According to the method of claim 4, when the historical runoff depth of the upstream station is introduced as a covariate of the current station into the station topology information, the station covariate at this time includes the historical hydrological characteristics of the current station and the historical hydrological runoff depth of the upstream station of the current station.
6. A hydrological runoff model training device, characterized in that, include The acquisition module is used to acquire historical hydrological characteristics, historical runoff depth, catchment area, and river network topology of each station in the target watershed. The task index module is used to attach corresponding task indexes to the inputs of each site. The prediction module performs attention operations on the encoded input and outputs the runoff depth prediction results for each station. The training module is used to calculate the weighted sum of quantile loss and NSE loss based on the predicted runoff depth and the actual runoff depth, and to iteratively update the model parameters through backpropagation.
7. A hydrological runoff prediction device, comprising an acquisition module, a processing module, and an output module; The acquisition module is used to acquire historical hydrological characteristics, historical runoff, catchment area, and river network topology of multiple stations; The processing module is used to convert historical runoff into runoff depth, input additional task indexes for each station, and perform attention calculations. The output module is used to output the runoff depth quantile prediction results for multiple stations in the future forecast period, and convert the predicted runoff depth into runoff volume based on the catchment area of each station.
8. A computer program product comprising a computer program executed by a processor for implementing the hydrological runoff model training method of claims 1-3 or the hydrological runoff prediction method of claims 4-5.
9. A computer-readable storage medium having a computer program stored thereon; when a processor executes the program, it is able to implement the hydrological runoff model training method of claims 1-3 or the hydrological runoff prediction method of claims 4-5.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program; when the processor executes the program, it is used to implement the hydrological runoff model training method of claims 1-3 or the hydrological runoff prediction method of claims 4-5.
