Hydrological data prediction method and device, equipment and storage medium

By combining a diffusion model with a conditional denoising network and a physical constraint projection operator, the problem of insufficient physical interpretability and engineering credibility in hydrological data prediction is solved. This enables efficient generation and reliable prediction of multi-temporal and spatial hydrological scenarios, and is applicable to flood warning and water resource management.

CN121958769APending Publication Date: 2026-05-01STATE GRID ZHEJIANG ELECTRIC POWER CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID ZHEJIANG ELECTRIC POWER CO LTD
Filing Date
2026-04-01
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing hydrological models lack physical interpretability and engineering credibility in hydrological data prediction, making it difficult to meet the needs of simulating and predicting future hydrological scenarios. In particular, in complex hydrological systems with multiple observation stations, multiple variables, and long time spans, the generated results lack physical rationality and engineering applicability.

Method used

A diffusion model is used to generate multi-temporal and spatial hydrological scenarios. By combining forward and backward diffusion with a conditional denoising network and a physical constraint projection operator, a spatiotemporal conditional tensor is constructed. The model is then used to model and predict based on the physical laws followed by the hydrological data. Multi-scale spatiotemporal decomposition and physical constraint projection are introduced to ensure that the generated results conform to the laws of mass conservation, continuity, and energy conservation.

Benefits of technology

It improves the physical interpretability and engineering reliability of hydrological data prediction, and can generate more reliable multi-temporal and spatial hydrological scenario data, which is suitable for flood warning, reservoir operation and water resource planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121958769A_ABST
    Figure CN121958769A_ABST
Patent Text Reader

Abstract

The invention discloses a hydrological data prediction method, device and equipment and a storage medium, and relates to the technical field of hydrological prediction. Historical hydrological data and position data of each observation station are input; performing forward diffusion on the historical hydrological data to obtain diffusion data; performing reverse diffusion on the diffusion data to obtain target hydrological data; wherein in each reverse diffusion step, the following steps are executed: predicting the noise of the current diffusion data by adopting a conditional denoising network; calculating intermediate de-noised data based on the current diffusion data and the noise; mapping the middle de-noised data by adopting a physical constraint projection operator to obtain a current back diffusion result; wherein the physical constraint projection operator is constructed based on a physical rule followed by the hydrological data. According to the method, the physical interpretability and the engineering credibility of the generated hydrological data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hydrological prediction technology, and in particular to a hydrological data prediction method, apparatus, equipment, and storage medium. Background Technology

[0002] With the intensification of global climate change and the significant increase in the frequency of extreme weather events, the instability and uncertainty of hydrological systems are becoming increasingly prominent. This places higher demands on engineering management such as flood warning, water resource allocation, and reservoir operation, especially on the ability to simulate and predict future hydrological scenarios. In recent years, generative models have begun to be introduced into the field of hydrology, with diffusion models being one such example. However, when using diffusion models for hydrological data prediction, it has been found that their outputs lack physical interpretability and engineering credibility. Summary of the Invention

[0003] The purpose of this invention is to provide a hydrological data prediction method, apparatus, device, and storage medium that can improve the physical interpretability and engineering reliability of hydrological data prediction.

[0004] To achieve the above objectives, embodiments of the present invention provide a hydrological data prediction method, comprising: Input the historical hydrological data and location data of each observation station; The historical hydrological data is forward diffused to obtain diffused data; The diffusion data is then back-diffused to obtain the target hydrological data; In each reverse diffusion step, the following steps are performed: A conditional denoising network is used to predict the noise in the current diffused data; Based on the current diffusion data and the noise, calculate the intermediate denoised data; The intermediate denoised data is mapped using a physical constraint projection operator to obtain the current backdiffusion result; wherein the physical constraint projection operator is constructed based on the physical laws followed by the hydrological data.

[0005] As an improvement to the above scheme, the conditional denoising network is pre-trained in the following manner: The spatiotemporal conditional tensor and diffusion data are used as inputs to the conditional denoising network, and the network is trained with the goal of minimizing prediction error loss.

[0006] As an improvement to the above scheme, the spatiotemporal condition tensor is calculated in the following way: Extract time-scale tensors from the historical hydrological data at different times from the same observation station; Based on the location data, spatial feature tensors are extracted from the historical hydrological data of different observation stations at the same time. By fusing the time-scale tensor and the spatial feature tensor, a spatiotemporal condition tensor is obtained.

[0007] As an improvement to the above scheme, the historical hydrological data includes runoff, precipitation, evapotranspiration and water level. Then, the prediction error loss consists of the original diffusion loss, water conservation residual loss, continuity residual loss and energy conservation residual loss.

[0008] As an improvement to the above scheme, the water conservation residual loss is calculated in the following way: Based on the balance constraints of the runoff, precipitation, evapotranspiration and water storage change, a water balance tensor weight matrix is ​​constructed. Based on the water balance tensor weight matrix and the spatiotemporal condition tensor, the predicted value of water storage change is calculated. Based on the predicted value of water storage change and the actual water storage change, calculate the water conservation residual loss; The continuity residual loss is calculated in the following way: The spatial variation term is calculated based on the gradient operator matrix and the mainstream runoff flow rate. Calculate the derivative of the flow width related quantity with respect to time to obtain the time variation term; Based on the spatial variation term, the temporal variation term, and the lateral inflow volume, calculate the continuity residual loss; The energy conservation residual loss is calculated in the following way: The evapotranspiration balance value is calculated based on net radiation, soil heat flux, sensible heat flux, and latent heat constant. Based on the first evapotranspiration and the evapotranspiration balance value, the energy conservation residual loss is calculated.

[0009] As an improvement to the above scheme, the physical constraint projection operator is specifically used for: Based on the intermediate denoised data, optimization variables are generated; Calculate the distance between the intermediate denoised data and the optimization variable to obtain the distance term; Based on the optimization variables, calculate the physical consistency loss; The physical constraint projection loss is obtained by weighted summation of the distance term and the physical consistency loss. With the goal of minimizing the physical constraint projection loss, the optimization variables are iterated to obtain the current backdiffusion result.

[0010] As an improvement to the above scheme, the historical hydrological data includes runoff, precipitation, evapotranspiration and water level. Therefore, the physical consistency loss includes water conservation residual loss, continuity residual loss and energy conservation residual loss.

[0011] To achieve the above objectives, embodiments of the present invention also provide a hydrological data prediction device, comprising: The data input module is used to input historical hydrological data and location data of each observation station; The forward diffusion module is used to forward diffuse the historical hydrological data to obtain diffused data; A reverse diffusion module is used to reverse diffuse the diffusion data to obtain the target hydrological data. In each reverse diffusion step, the following steps are performed: A conditional denoising network is used to predict the noise in the current diffused data; Based on the current diffusion data and the noise, calculate the intermediate denoised data; The intermediate denoised data is mapped using a physical constraint projection operator to obtain the current backdiffusion result; the physical constraint projection operator is constructed based on the physical laws followed by the hydrological data.

[0012] To achieve the above objectives, embodiments of the present invention also provide a hydrological data prediction device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the hydrological data prediction method as described in any of the above embodiments.

[0013] To achieve the above objectives, embodiments of the present invention also provide a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the hydrological data prediction method as described in any of the above embodiments.

[0014] Compared with existing technologies, the hydrological data prediction method, apparatus, equipment, and storage medium of this invention input historical hydrological data and location data from various observation stations; perform forward diffusion on the historical hydrological data to obtain diffused data; and perform reverse diffusion on the diffused data to obtain target hydrological data. In each reverse diffusion step, the following steps are performed: using a conditional denoising network to predict the noise of the current diffused data; calculating intermediate denoised data based on the current diffused data and the noise; and mapping the intermediate denoised data using a physical constraint projection operator to obtain the current reverse diffusion result. The physical constraint projection operator is constructed based on the physical laws governing the hydrological data. Compared with existing technologies, this invention constructs a physical constraint projection operator based on the physical laws governing the hydrological data, and in each reverse diffusion step, uses the physical constraint projection operator to project and correct the intermediate denoised data. This enables the generated hydrological prediction data to have interpretability and engineering credibility, improving the reliability of the prediction results. Attached Figure Description

[0015] Figure 1 This is a flowchart of a hydrological data prediction method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating reverse diffusion according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a hydrological data prediction device provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a hydrological data prediction device provided in an embodiment of the present invention. Detailed Implementation

[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] In the description of this application, it should be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0018] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0019] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0020] It is worth noting that in recent years, generative models introduced into the field of hydrology also include variational autoencoders (VAEs) and generative adversarial networks (GANs). These models can learn distributions based on historical data and sample representative hydrological scenarios, showing potential in climate adaptation research, emergency drills, and extreme event reenactment.

[0021] VAE (Variable Image Processing) maps raw data to a latent variable space using an encoder-decoder structure and generates new samples through sampling. This method can initially reproduce the hydrological response characteristics within a watershed, but its maximum likelihood training objective leads to sample blurring, making it difficult to capture high-frequency details in real hydrological processes. GAN (Generative Adversarial Network), on the other hand, consists of a generator and a discriminator, approximating the target distribution through adversarial training. GANs can be used to probabilistically generate precipitation images and possess a certain degree of randomness representation capability, but this method suffers from training instability and pattern collapse, making it difficult to generalize to large-scale multivariate hydrological systems.

[0022] Furthermore, existing technologies mostly focus on modeling single observation stations or two-dimensional precipitation images, making it difficult to handle the complex, multi-dimensional structures of real watersheds involving multiple observation stations, multiple hydrological variables, and long-term time spans. They lack the overall modeling capability for the joint evolutionary characteristics of hydrological systems across time, space, and variables. Secondly, traditional models often only provide deterministic predictions, lacking an expression of the inherent uncertainty and diverse structures of hydrological processes, making it difficult to meet the needs of practical operations for simulating future multi-path evolution. Further, existing generation technologies are also relatively weak in terms of condition control, often failing to effectively incorporate high-dimensional prior information such as seasonal time series or spatial geography, resulting in a lack of specificity and application flexibility in the generated results. Moreover, the hydrological scenarios generated by existing technologies often suffer from distortion or abrupt changes in physical rationality and spatial coherence. The generated samples often struggle to simultaneously maintain statistical consistency and structural integrity, thus restricting their widespread application in engineering practices such as scheduling decisions and risk analysis.

[0023] Therefore, this invention proposes a hydrological data prediction method, which generates hydrological multi-temporal and spatial scenarios based on a diffusion model. By modeling hydrological variables as high-dimensional spatiotemporal tensors and combining external condition information (such as time features and spatial location) to drive the generation process, the hydrological scenario is gradually restored by using a diffusion model to "de-noise". This achieves joint modeling of hydrological variables in terms of temporal evolution, spatial coordination and multivariate interaction.

[0024] See Figure 1 This is a flowchart of a hydrological data prediction method provided in an embodiment of the present invention, including steps S1 to S3: S1. Input the historical hydrological data and location data of each observation station; S2. Perform forward diffusion on the historical hydrological data to obtain diffused data; S3. Perform reverse diffusion on the diffusion data to obtain the target hydrological data; In each reverse diffusion step, the following steps are performed: A conditional denoising network is used to predict the noise in the current diffused data; Based on the current diffusion data and the noise, calculate the intermediate denoised data; The intermediate denoised data is mapped using a physical constraint projection operator to obtain the current backdiffusion result; wherein the physical constraint projection operator is constructed based on the physical laws followed by the hydrological data.

[0025] For example, in step S1, historical hydrological data can be understood as historical hydrological variables. For ease of explanation, in the following embodiments, hydrological variables refer to runoff, precipitation, evapotranspiration, and water level. Furthermore, location data refers to the location of the observation station, for example, the latitude and longitude of the observation station. It is understood that these data serve as the basic input to the diffusion model, providing physical constraints and scenario control information for subsequent modeling.

[0026] For example, in step S2, a set of preset noise scheduling coefficients are used. For each real sample Construct a "diffusion path" that gradually adds noise. This forms a Markov chain process that gradually evolves from an ordered structure to pure noise, where real samples... This refers to historical hydrological data. Indicates the first The noise scheduling coefficient of the step, Indicates the process Data obtained from forward diffusion This represents the number of diffusion steps. As shown in the following formula: (1) in, Indicates the state given the previous time step. Current state The conditional probability distribution; Indicates the process Data obtained from forward diffusion; Indicates the process Data obtained from forward diffusion; Indicates the first The noise scheduling coefficient of the step; Represents the identity matrix; This represents a standard normal distribution.

[0027] It is worth noting that in the formulas of this invention, parameters in vector, matrix, or tensor form are represented by bold font, while parameters in numerical form are represented by plain font. This will not be repeated below.

[0028] By applying formula (1) step by step, it is possible to... After multiple perturbations, the final result is achieved on the [number]th [time]. The steps yield samples that approximate a standard normal distribution. To improve training efficiency, the diffusion process uses the following closed-form expression to construct the state at any given time step: (2) in, Indicates a given Down The conditional probability distribution; Indicates the process Data obtained from forward diffusion; Represents a real sample; Indicates the first The cumulative noise scheduling coefficient of the step; Represents the identity matrix; This represents a standard normal distribution.

[0029] Furthermore, As shown in the following formula: (3) in, Indicates the first The cumulative noise scheduling coefficient of the step; Indicates the first The noise scheduling coefficient of the step; This indicates a continuous product operation.

[0030] By applying formula (3), it is possible to select any diffusion step during training. and from Quickly generate the current step state This eliminates the need for stepwise sampling, thereby improving training efficiency.

[0031] Furthermore, in step S3, the target hydrological data, i.e., the predicted hydrological data, is obtained by progressively backdiffusion of the diffusion data generated in step S2. It should be noted that traditional conditional diffusion models rely solely on the output of a noise prediction network during the sampling process, which may cause the results to violate physical laws such as mass conservation, continuity, or thermal constraints at certain times or measurement points. To address these issues, this embodiment of the invention introduces a two-stage backdiffusion mechanism: first, conventional denoising sampling is performed, followed by tensor projection based on physical constraints.

[0032] See Figure 2This diagram illustrates a backdiffusion process according to an embodiment of the present invention. As shown in the diagram, firstly, historical hydrological data undergoes multi-scale spatiotemporal decomposition preprocessing to extract structured information, resulting in a temporal multi-scale tensor and a spatial feature tensor. These are then fused into a spatiotemporal conditional tensor and input into the diffusion network. Simultaneously, diffusion noise is added to the historical hydrological data through forward diffusion, resulting in diffused data, which also serves as input to the diffusion network. Further, in each backdiffusion step, the diffusion network progressively denoises under the guidance of the spatiotemporal conditional tensor, outputting intermediate denoised data. Subsequently, physically constrained projection is performed on the intermediate denoised data; that is, a physically constrained projection operator is used to correct the projection of the intermediate denoised data, yielding the current backdiffusion result. It can be understood that if this is the final backdiffusion step, the current backdiffusion result is the target hydrological data; otherwise, the current backdiffusion result is used as the diffusion data for the next backdiffusion step for denoising, until the backdiffusion is completed. Furthermore, the physical constraint projection operator in this embodiment of the invention is constructed based on the physical laws followed by hydrological data, such as the law of mass conservation, the spatial continuity of the hydrological field, and the law of energy conservation. This can avoid physical errors in the generated data and improve the reliability and engineering applicability of the data prediction.

[0033] Finally, a set of hydrological scene data tensors is generated. ( This represents the generated hydrological scene data tensor; Represents the real number field; Indicates the number of time steps; Indicates the number of observation stations; (Indicating the size of the variable dimension), including precipitation, runoff, evapotranspiration, and water level, it can be used to simulate the evolution of runoff, precipitation distribution patterns, or watershed response structure at multiple observation stations in the future, or directly input into reservoir scheduling models, flood warning systems, or water resources planning systems. That is, by inputting historical multi-temporal hydrological data, this embodiment of the invention can predict multiple types of hydrological data from multiple observation stations at multiple time points in the future at once. For example, multiple types of hydrological data from multiple observation stations in the previous 24 hours can be input to predict the corresponding types of hydrological data from multiple observation stations in the following 6 hours.

[0034] Compared with the prior art, the embodiments of the present invention can improve the generation efficiency of hydrological data by realizing multi-temporal and spatial hydrological data prediction, and can also make full use of the correlation between hydrological data of different times, spaces and types to constrain the generation process of hydrological data, thereby improving the reliability of hydrological data.

[0035] As one optional implementation, the conditional denoising network is pre-trained in the following manner: The spatiotemporal conditional tensor and diffusion data are used as inputs to the conditional denoising network, and the network is trained with the goal of minimizing prediction error loss.

[0036] As one optional implementation, the spatiotemporal conditional tensor is calculated in the following manner: Extract time-scale tensors from the historical hydrological data at different times from the same observation station; Based on the location data, spatial feature tensors are extracted from the historical hydrological data of different observation stations at the same time. By fusing the time-scale tensor and the spatial feature tensor, a spatiotemporal condition tensor is obtained.

[0037] It is worth noting that, in order to enhance the model's ability to model complex hydrological processes, this embodiment of the invention also performs multi-scale spatiotemporal decomposition preprocessing on the data before model training. This combines the multi-level structural features of time and space, and extracts the temporal changes and spatial structures at different scales from the original hydrological data through methods such as wavelet decomposition, thereby constructing a more structured input tensor and improving the generation quality and physical consistency.

[0038] For example, before constructing the spatiotemporal condition tensor, each type of hydrological data is standardized to obtain standardized data.

[0039] Let the original data be The mean is The standard deviation is Then the standardized data tensor is: (4) in, Represents the standardized hydrological tensor; Represents the original hydrological tensor; This represents the mean; It represents the standard deviation.

[0040] Furthermore, a learnable wavelet decomposition method is used to perform multi-scale temporal decomposition on the standardized time series, obtaining trend terms, seasonal terms, daily periodic terms, and high-frequency residual terms to construct a multi-scale time tensor, as shown in the following equation: (5) in, Represents a time-multiscale tensor; This indicates a trend, used to reflect long-term trend changes over a period of more than 30 days. This indicates a seasonal item, used to reflect a seasonal cycle of 7 to 30 days; This indicates the daily cycle item, used to reflect daily cycle changes from 1 to 7 days; This represents the high-frequency residual term, used to characterize high-frequency disturbances and noise fluctuations.

[0041] The wavelet decomposition expression is as follows: (6) in, Indicates the time position Place, No. Wavelet coefficients at various scales; Indicates the first Layer wavelet basis functions; Indicates the first The time scale parameter of the layer; Indicates time and location; This represents the standardized hydrological tensor.

[0042] Furthermore, in terms of spatial dimension, a spatial connectivity graph is constructed based on the watershed topology. Each observation station is treated as a local observation station, and the spatial data is decomposed into three scale levels: upstream data, local data, and downstream data, resulting in a spatial feature tensor. (7) in, Represents the spatial feature tensor; This indicates upstream data, including runoff and precipitation from upstream observation stations; This represents local data, including runoff, precipitation, evapotranspiration, and water level at local observation stations; This indicates downstream data, including water levels at downstream observation stations.

[0043] Combining temporal scaling with spatial filtering yields scale-combined features: (8) in, Indicates the combined characteristics of spatiotemporal scales; Indicates the spatial filtering operator; Represents the time-scale tensor.

[0044] Furthermore, the temporal multi-scale tensor and the spatial feature tensor are fused to construct an enhanced multi-scale spatiotemporal conditional tensor: (9) in, Represents the spacetime condition tensor; Indicates a merge operation; Represents a time-multiscale tensor; Represents the spatial feature tensor; It represents the combined characteristics of spatiotemporal scales.

[0045] Furthermore, the spatiotemporal condition tensor can be expressed as: (10) in, Represents the spacetime condition tensor; Indicates the number of time steps; Indicates the number of observation stations; Represents the real number field; This indicates the enhanced dimension.

[0046] Furthermore, the enhanced dimension is shown in the following formula: (11) in, Indicates the enhanced dimension; Represents the original dimension; Indicates the number of scale decompositions.

[0047] It is understood that each hydrological data input in this embodiment of the invention includes three attributes: time, space, and hydrological variable type. It should be noted that, during the standardization process described above, standardization is performed according to the hydrological variable type; that is, the mean and standard deviation are calculated separately for each hydrological variable (such as precipitation, runoff, etc.). During the calculation of the time multiscale tensor, wavelet decomposition is performed independently on the time series of each station-variable combination, i.e., the operation is performed in the time dimension while maintaining the independence of the spatial and variable dimensions. During the calculation of the spatial feature tensor, the spatial relationships between stations are modeled at each time point; that is, the operation is performed in the spatial dimension, and each time-variable combination is processed independently.

[0048] Compared with existing technologies, the embodiments of the present invention can improve the model's ability to identify spatiotemporal change patterns by constructing a multi-scale spatiotemporal condition tensor, and also provide more structured and physically reasonable input conditions for the subsequent diffusion generation process.

[0049] Furthermore, a temporal attention diffusion network based on causal masking is constructed, replacing the traditional U-Net (U-shaped network) architecture with a Transformer-Diffusion hybrid structure, resulting in a conditional denoising network: (12) in, Represents a conditional denoising network; Indicates the process Data obtained from forward diffusion; Represents a condition vector; This represents a hybrid network structure combining Transformer and Diffusion. Represents the spacetime condition tensor.

[0050] Among these methods, an autoregressive conditional denoising mechanism is introduced, a causal mask is used to ensure that future information is not leaked, a temporal location encoding is introduced to capture the time dependency of hydrological processes, and a multi-head temporal attention mechanism is designed to model short-term fluctuations and long-term trends, as shown in the following equation: (13) in, This represents the attention mechanism; Represents the query vector; Represents the key vector; Represents a value vector; Indicates the dimensions of the query vector and key vector; Indicates the transpose operation; This represents the lower triangular mask matrix.

[0051] Furthermore, training the neural network (Conditional denoising network) enables it to learn from arbitrarily diffused data The noise added to the prediction ,in, This represents a conditional vector containing control information such as time period and spatial location, which is used as one of the network inputs during training for denoising control. Furthermore, the optimization objective is to minimize the prediction error. .

[0052] As one possible implementation, the historical hydrological data includes runoff, precipitation, evapotranspiration and water level. In this case, the prediction error loss consists of the original diffusion loss, water conservation residual loss, continuity residual loss and energy conservation residual loss.

[0053] As one optional implementation method, the water conservation residual loss is calculated in the following way: Based on the balance constraints of the runoff, precipitation, evapotranspiration and water storage change, a water balance tensor weight matrix is ​​constructed. Based on the water balance tensor weight matrix and the spatiotemporal condition tensor, the predicted value of water storage change is calculated. Based on the predicted value of water storage change and the actual water storage change, calculate the water conservation residual loss; The continuity residual loss is calculated in the following way: The spatial variation term is calculated based on the gradient operator matrix and the mainstream runoff flow rate. Calculate the derivative of the flow width related quantity with respect to time to obtain the time variation term; Based on the spatial variation term, the temporal variation term, and the lateral inflow volume, calculate the continuity residual loss; The energy conservation residual loss is calculated in the following way: The evapotranspiration balance value is calculated based on net radiation, soil heat flux, sensible heat flux, and latent heat constant. Based on the first evapotranspiration and the evapotranspiration balance value, the energy conservation residual loss is calculated.

[0054] For example, the water conservation residual loss is calculated using the following formula: (14) The continuity residual loss is calculated using the following formula: (15) The energy conservation residual loss is calculated using the following formula: (16) In equations (14) to (16), This represents the residual loss due to water conservation. This represents the water balance tensor weight matrix; Represents the spacetime condition tensor; Indicates the change in water storage; Indicates continuous residual loss; Represents the gradient operator matrix; Indicates the flow rate in the mainstream direction; Indicates the quantity related to flow width Regarding time The partial derivative; Indicates the amount of water flowing in laterally; This indicates the L2 norm operation; This represents the residual loss due to energy conservation. Indicates evaporation rate; Indicates net radiation; Indicates soil heat flux; Indicates sensible heat flux; This represents the latent heat constant.

[0055] It is worth noting that, in order to improve the physical consistency of generated hydrological multi-temporal scenarios, this invention introduces a hydrological physical constraint system based on tensor structures into the conditional diffusion model. Specifically, this system includes three types of principles: water balance, continuity constraints, and energy conservation, corresponding to mass transfer, spatial topological connectivity, and energy exchange laws in hydrological processes, respectively. By constructing a differentiable constraint matrix and embedding it into the model training loss function, the physical interpretability and engineering credibility of the output scenarios can be significantly enhanced while maintaining the diversity of generation.

[0056] Specifically, in the mass conservation modeling, precipitation is taken into account. Runoff Evaporation and changes in water storage Based on the balance between these factors, the following water conservation equation is constructed: (17) in, Indicates the observation station At any moment The monitored precipitation; Indicates the observation station At any moment Monitored runoff; Observation station At any moment The monitored evapotranspiration rate; Indicates the observation station At any moment The monitored changes in water storage.

[0057] Furthermore, to unify the tensor structure processing, a water balance tensor weight matrix is ​​introduced: (18) in, This represents the water balance tensor weight matrix. For precipitation items, For runoff, For evaporation; Indicates the number of time steps; Indicates the number of observation stations; Represents the real number field.

[0058] Then, the corresponding water conservation residual loss is as shown in equation (14): (14) in, This represents the residual loss due to water conservation. This represents the water balance tensor weight matrix; Represents the spacetime condition tensor; Indicates the change in water storage; This indicates the L2 norm operation.

[0059] Furthermore, in order to capture the continuity of the hydrological field in spatial structure, this embodiment of the invention constructs a simplified one-dimensional continuity equation based on the watershed topology to describe the equilibrium form of runoff variation with spatial location: (19) in, Indicates the flow rate in the mainstream direction; Indicates quantities related to flow width; Indicates the amount of water flowing in laterally; Indicates runoff Along the river channel The rate of spatial change; This represents the partial derivative of the flow width-related quantity w with respect to time t.

[0060] Furthermore, to realize the structural representation of spatial gradients, a gradient operator matrix is ​​introduced: (20) in, Represents the gradient operator matrix; Indicates the number of observation stations; Represents the real number field.

[0061] Furthermore, the corresponding continuous residual loss is as follows: (15) Indicates continuous residual loss; Represents the gradient operator matrix; Indicates the flow rate in the mainstream direction; Indicates the quantity related to flow width Partial derivatives with respect to time; Indicates the amount of water flowing in laterally; This indicates the L2 norm operation.

[0062] Furthermore, to ensure the thermodynamic rationality of evapotranspiration generation, this embodiment of the invention introduces energy conservation constraints and uses the Earth's surface heat budget for calculation. Specifically, the evapotranspiration... and net radiation Soil heat flux sensible heat flux The following conditions must be met: (twenty one) in, Indicates evaporation rate; Represents the latent heat constant; Indicates net radiation; Indicates soil heat flux; It represents the sensible heat flux.

[0063] Furthermore, the energy conservation tensor residuals are as follows: (16) in, This represents the residual loss due to energy conservation. Indicates evaporation rate; Indicates net radiation; Indicates soil heat flux; Indicates sensible heat flux; Represents the latent heat constant; This indicates the L2 norm operation.

[0064] Finally, all physical constraint losses and the original diffusion error of the diffusion model are jointly optimized to form a complete training objective function: (twenty two) in, This represents the loss due to prediction error; Indicates the original diffusion loss; This represents the residual loss due to water conservation. Indicates continuous residual loss; This represents the residual loss due to energy conservation. This indicates an adaptive and adjustable weight parameter. In the early stages of model training, the focus is on data fitting, while in the later stages, physical consistency control is gradually enhanced, thereby achieving a dual synergy between generation quality and physical constraints.

[0065] Furthermore, As shown in the following formula: (twenty three) in, Indicates the original diffusion loss; This indicates taking the expected value; Indicates actual noise; The conditional denoising network is based on the following Data obtained by forward diffusion and condition vector The predicted noise; This indicates the norm operation.

[0066] Furthermore, based on the prediction error loss constructed by combining physical loss, this embodiment of the invention also proposes a backsampling mechanism based on "projective physical consistency constraints," thereby significantly enhancing the physical validity of the output in the generation stage. It is worth noting that existing diffusion models rely solely on the output of the noise prediction network during the sampling process, which may cause the results to violate mass conservation, continuity, or thermal constraints at certain moments or measurement points. Therefore, this embodiment of the invention introduces a two-stage backsampling mechanism: first, conventional denoising sampling is performed, and then tensor projection based on physical constraints is executed.

[0067] Specifically, at each diffusion step In the first step, intermediate denoised data is obtained through standard sampling procedures. Its expression is: (twenty four) in, This represents the intermediate denoised data; Indicates the first The noise scheduling coefficient of the step; Represents a conditional denoising network; Indicates the process Data obtained from forward diffusion; Represents a condition vector; This represents Gaussian random noise; Represents the cumulative noise dispatch coefficient; Indicates the first The diffusion scheduling parameters for each step.

[0068] Furthermore, after obtaining the intermediate denoised data, a physically constrained projection operator is introduced. This is used to remap samples to a physically consistent subspace. (25) in, This indicates the current backdiffusion result; Represents the physical constraint projection operator; This represents the intermediate denoised data.

[0069] As one optional implementation, the physical constraint projection operator is specifically used for: Based on the intermediate denoised data, optimization variables are generated; Calculate the distance between the intermediate denoised data and the optimization variable to obtain the distance term; Based on the optimization variables, calculate the physical consistency loss; The physical constraint projection loss is obtained by weighted summation of the distance term and the physical consistency loss. With the goal of minimizing the physical constraint projection loss, the optimization variables are iterated to obtain the current backdiffusion result.

[0070] For example, the physical constraint projection operator is shown in the following equation: (26) in, Represents the physical constraint projection operator; This represents the intermediate denoised data; Represents the optimization variable; This represents the norm operation; Indicates the physical constraint strength coefficient; This represents the loss of physical consistency. This represents the function that takes the minimum value.

[0071] As one optional implementation, the historical hydrological data includes runoff, precipitation, evapotranspiration and water level. In this case, the physical consistency loss includes water conservation residual loss, continuity residual loss and energy conservation residual loss.

[0072] For example, the physical consistency loss is shown in the following formula: (27) in, This represents the loss of physical consistency. Represents the optimization variable; This represents the norm operation; This indicates the outer product operation; This represents the water balance tensor weight matrix; Represents the gradient operator matrix; Represents the energy balance operator matrix; Indicates from The runoff component extracted from it; Indicates from The evaporation fraction extracted from it.

[0073] Compared with the prior art, the embodiments of the present invention can ensure that the generated samples always maintain the consistency of physical constraints by embedding a projection mechanism in each reverse diffusion step, so as to solve the problem of "numerical correct but physical incorrect" that is common in diffusion models in hydrological engineering.

[0074] See Figure 3 This invention also provides a hydrological data prediction device 10, comprising: Data input module 11 is used to input historical hydrological data and location data of each observation station; Forward diffusion module 12 is used to forward diffuse the historical hydrological data to obtain diffused data; The reverse diffusion module 13 is used to reverse diffuse the diffusion data to obtain the target hydrological data; In each reverse diffusion step, the following steps are performed: A conditional denoising network is used to predict the noise in the current diffused data; Based on the current diffusion data and the noise, calculate the intermediate denoised data; The intermediate denoised data is mapped using a physical constraint projection operator to obtain the current backdiffusion result; the physical constraint projection operator is constructed based on the physical laws followed by the hydrological data.

[0075] The hydrological data prediction device provided in this embodiment of the invention can realize all the process steps of the hydrological data prediction method described in the above embodiments. The functions and technical effects of each module and unit in the device are the same as the functions and technical effects of the hydrological data prediction method described in the above embodiments. The specific implementation method will not be described in detail here.

[0076] See Figure 4This invention also provides a hydrological data prediction device 20, including a processor 21, a memory 22, and a computer program stored in the memory 22 and configured to be executed by the processor 21. When the processor 21 executes the computer program, it implements the steps described in the above-described hydrological data prediction method embodiments, for example... Figure 1 The steps S1 to S3 described above; or, when the processor 21 executes the computer program, it implements the functions of each module in the above-described device embodiments.

[0077] The hydrological data prediction device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The hydrological data prediction device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the schematic diagram is merely an example of a hydrological data prediction device and does not constitute a limitation on the device. It may include more or fewer components than illustrated, or combine certain components, or use different components. For example, the hydrological data prediction device may also include input / output devices, network access devices, buses, etc.

[0078] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the hydrological data prediction equipment, connecting all parts of the equipment via various interfaces and lines.

[0079] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the hydrological data prediction device by running or executing the computer programs and / or modules stored in the memory and by calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created according to the use of the controller, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0080] If the modules integrated into the hydrological data prediction equipment are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0081] Compared with existing technologies, the hydrological data prediction method, apparatus, equipment, and storage medium of this invention input historical hydrological data and location data from various observation stations; perform forward diffusion on the historical hydrological data to obtain diffused data; and perform reverse diffusion on the diffused data to obtain target hydrological data. In each reverse diffusion step, the following steps are performed: using a conditional denoising network to predict the noise of the current diffused data; calculating intermediate denoised data based on the current diffused data and the noise; and mapping the intermediate denoised data using a physical constraint projection operator to obtain the current reverse diffusion result. The physical constraint projection operator is constructed based on the physical laws governing the hydrological data. Compared with existing technologies, this invention constructs a physical constraint projection operator based on the physical laws governing the hydrological data, and in each reverse diffusion step, uses the physical constraint projection operator to project and correct the intermediate denoised data. This enables the generated hydrological prediction data to have interpretability and engineering credibility, improving the reliability of the prediction results.

[0082] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for predicting hydrological data, characterized in that, include: Input the historical hydrological data and location data of each observation station; The historical hydrological data is forward diffused to obtain diffused data; The diffusion data is then back-diffused to obtain the target hydrological data; In each reverse diffusion step, the following steps are performed: A conditional denoising network is used to predict the noise in the current diffused data; Based on the current diffusion data and the noise, calculate the intermediate denoised data; The intermediate denoised data is mapped using a physical constraint projection operator to obtain the current backdiffusion result; wherein the physical constraint projection operator is constructed based on the physical laws followed by the hydrological data.

2. The hydrological data prediction method as described in claim 1, characterized in that, The conditional denoising network is pre-trained using the following method: The spatiotemporal conditional tensor and diffusion data are used as inputs to the conditional denoising network, and the network is trained with the goal of minimizing prediction error loss.

3. The hydrological data prediction method as described in claim 2, characterized in that, The spatiotemporal condition tensor is calculated in the following manner: Extract time-scale tensors from the historical hydrological data at different times from the same observation station; Based on the location data, spatial feature tensors are extracted from the historical hydrological data of different observation stations at the same time. By fusing the time-scale tensor and the spatial feature tensor, a spatiotemporal condition tensor is obtained.

4. The hydrological data prediction method as described in claim 2, characterized in that, The historical hydrological data includes runoff, precipitation, evapotranspiration, and water level. The prediction error loss consists of the original diffusion loss, water conservation residual loss, continuity residual loss, and energy conservation residual loss.

5. The hydrological data prediction method as described in claim 4, characterized in that, The water conservation residual loss is calculated in the following way: Based on the balance constraints of the runoff, precipitation, evapotranspiration and water storage change, a water balance tensor weight matrix is ​​constructed. Based on the water balance tensor weight matrix and the spatiotemporal condition tensor, the predicted value of water storage change is calculated. Based on the predicted value of water storage change and the actual water storage change, calculate the water conservation residual loss; The continuity residual loss is calculated in the following way: The spatial variation term is calculated based on the gradient operator matrix and the mainstream runoff flow rate. Calculate the derivative of the flow width related quantity with respect to time to obtain the time variation term; Based on the spatial variation term, the temporal variation term, and the lateral inflow volume, calculate the continuity residual loss; The energy conservation residual loss is calculated in the following way: The evapotranspiration balance value is calculated based on net radiation, soil heat flux, sensible heat flux, and latent heat constant. Based on the first evapotranspiration and the evapotranspiration balance value, the energy conservation residual loss is calculated.

6. The hydrological data prediction method as described in claim 1, characterized in that, The physical constraint projection operator is specifically used for: Based on the intermediate denoised data, optimization variables are generated; Calculate the distance between the intermediate denoised data and the optimization variable to obtain the distance term; Based on the optimization variables, calculate the physical consistency loss; The physical constraint projection loss is obtained by weighted summation of the distance term and the physical consistency loss. With the goal of minimizing the physical constraint projection loss, the optimization variables are iterated to obtain the current backdiffusion result.

7. The hydrological data prediction method as described in claim 6, characterized in that, The historical hydrological data includes runoff, precipitation, evapotranspiration, and water level. Therefore, the physical consistency loss includes water conservation residual loss, continuity residual loss, and energy conservation residual loss.

8. A hydrological data prediction device, characterized in that, include: The data input module is used to input historical hydrological data and location data of each observation station; The forward diffusion module is used to forward diffuse the historical hydrological data to obtain diffused data; A reverse diffusion module is used to reverse diffuse the diffusion data to obtain the target hydrological data. In each reverse diffusion step, the following steps are performed: A conditional denoising network is used to predict the noise in the current diffused data; Based on the current diffusion data and the noise, calculate the intermediate denoised data; The intermediate denoised data is mapped using a physical constraint projection operator to obtain the current backdiffusion result; the physical constraint projection operator is constructed based on the physical laws followed by the hydrological data.

9. A hydrological data prediction device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the hydrological data prediction method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the hydrological data prediction method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for monitoring scale irrigation water consumption of irrigation area based on physical constraint machine learning

    CN120611626A

  • Space-time deficiency filling method and system based on context association and physical guidance

    CN120653903A

  • Incompressible turbulent flow field prediction method based on potential diffusion model

    CN121145732A

  • Soil moisture sensor data quality inspection and interpolation method

    CN121327329A

  • End-to-end drainage basin flood risk influence forecasting method based on physical constraint

    CN121390891A

Cited By

  • Runoff prediction method and device, electronic equipment and computer readable storage medium

    CN122132784A