Uncertainty forecasting method for watershed runoff driven by multi-source data and physics

By constructing a Difformer model and combining multi-source data with physical constraints, the uncertainty problem of existing runoff prediction technology under extreme weather and data sparsity was solved, and high-precision and consistent runoff forecasts were achieved.

CN120596859BActive Publication Date: 2025-11-14ZHEJIANG UNIV CITY COLLEGE
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511100035.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-07
Publication Date
2025-11-14
Estimated Expiration
2045-08-07

AI Technical Summary

Technical Problem

Existing runoff forecasting technologies struggle to accurately reflect complex nonlinear processes in watersheds when faced with extreme weather and data sparsity, and suffer from uncertainty and low forecast accuracy.

Method used

A runoff uncertainty forecasting method driven by multi-source data and physics is adopted. By constructing a runoff uncertainty generation model (Difformer), using a denoised diffusion probability model and DTLayer learning layer, combined with Transformer blocks and FFN for deep decomposition, a joint loss function is designed to achieve multi-source data fusion and long-term time series modeling, and physical constraints are introduced to quantify uncertainty.

Benefits of technology

It significantly improves the accuracy and physical consistency of runoff prediction, effectively quantifies the randomness and uncertainty of watershed runoff, overcomes the impact of data sparsity and uncertainty of observation information, and improves the performance and reliability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120596859B_ABST
    Figure CN120596859B_ABST
Patent Text Reader

Abstract

This invention relates to a watershed runoff uncertainty forecasting method jointly driven by multi-source data and physics, comprising: acquiring runoff sequence data and external forecasting factor data of the target watershed; constructing a runoff uncertainty generation model, performing probability diffusion on the runoff sequence data through a constrained diffusion generator to generate approximate runoff data; designing a joint loss function to update the weights and biases of the runoff uncertainty generation model; training the loss convergence under joint guidance; and outputting the runoff prediction results. The beneficial effects of this invention are: it combines a Fourier transform-based loss function with physical theory guidance terms. The introduction of physical constraints not only effectively quantifies the randomness in the runoff physical system but also provides more optional prediction values ​​while ensuring the physical consistency of the prediction results. This effectively quantifies the inherent random uncertainty in the physical drought and flood process, thereby enhancing the physical consistency and prediction accuracy of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of runoff prediction, and in particular relates to a method for predicting watershed runoff uncertainty driven by multi-source data and physics. Background Technology

[0002] Runoff forecasting is a technique that uses hydrological and meteorological factors such as precipitation, evaporation, and topography to quantitatively predict the water flow at the outlet section of a watershed for a specific future period. The accuracy of runoff forecasting directly affects the safe operation of water conservancy projects.

[0003] Currently, traditional runoff forecasting techniques mainly rely on two types of methods. One type is based on empirical models, such as linear regression models, support vector regression (SVR), and neural networks (such as BP neural networks and RBF neural networks). These models predict runoff by fitting empirical relationships between historical runoff data and external factors (such as rainfall and temperature). However, their modeling capabilities are limited, making it difficult to accurately reflect the complex nonlinear processes of the watershed, and they perform poorly in the face of extreme weather or data gaps. The other type is based on physical mechanisms, such as distributed hydrological models (such as SWAT, TOPMODEL, and VIC). These methods simulate the rainfall-runoff-confluence process, considering factors such as topography, soil, and vegetation, and better reflect the physical characteristics of hydrological processes. However, these methods are usually sensitive to parameters, rely on high-precision geographical and meteorological data, have complex parameter calibration, and exhibit significant uncertainties in practical applications.

[0004] In recent years, hybrid models combining data-driven approaches and physical modeling (such as physics-guided neural networks and physics-embedded deep learning) have emerged, attempting to improve prediction accuracy while enhancing the physical interpretability of the models. However, most models only focus on single-step prediction or fixed-structure modeling, making it difficult to simultaneously address multi-source data fusion, long-term time-series modeling, and uncertainty quantification capabilities, leaving room for improvement. Furthermore, existing runoff prediction technologies are often constrained by data sparsity and the uncertainty of observational information, resulting in low runoff prediction accuracy. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a watershed runoff uncertainty forecasting method driven by multi-source data and physics.

[0006] Firstly, a method for predicting watershed runoff uncertainty driven by multi-source data and physics is provided, including:

[0007] Step 1: Obtain runoff sequence data and external forecast factor data for the target watershed;

[0008] Step 2: Construct a runoff uncertainty generation model (Difformer), which uses a constrained diffusion generator to perform probabilistic diffusion on runoff sequence data to generate approximate runoff data. The runoff uncertainty generation model includes a denoising diffusion probabilistic model (DDPM) layer and a DTLayer learning layer. The DTLayer learning layer includes a decoder with unentangled time representation. The decoder consists of a Transformer block, an FFN, and a decomposition block.

[0009] Step 3: Design a joint loss function to update the weights and biases of the runoff uncertainty generation model;

[0010] Step 4: Train the loss convergence under joint guidance and output the runoff prediction results.

[0011] Preferably, step 2 includes:

[0012] Step 2.1: Project the original input onto deep features through a data embedding layer; the original input includes runoff sequence data and external forecast factor data;

[0013] Step 2.2: Pass the deep features through the L-layer DTLayer learning layer to obtain the trend component, seasonal component, and residual component;

[0014] Step 2.3: Apply different forms of constraints to the trend component, seasonal component and residual component to achieve deentanglement and obtain approximate samples predicted by the runoff uncertainty generation model.

[0015] Preferably, in step 2, the Transformer block includes a diffusion embedding layer, a self-attention layer, and a cross-attention layer, wherein the diffusion embedding layer uses sinusoidal position embedding to encode the diffusion step size.

[0016] Preferably, in step 3, the joint loss function includes a data-driven loss term and a physical guidance loss term.

[0017] Preferably, in step 3, a reweighting strategy is used to design the data-driven loss function; the physical guidance loss term includes PDE loss, boundary loss, and initial condition loss.

[0018] Secondly, a watershed runoff uncertainty forecasting system jointly driven by multi-source data and physics is provided for performing any of the methods described in the first aspect, including:

[0019] The acquisition module is used to acquire runoff sequence data and external forecast factor data of the target watershed;

[0020] A construction module is used to build a runoff uncertainty generation model. It uses a constrained diffusion generator to perform probabilistic diffusion on runoff sequence data to generate approximate runoff data. The runoff uncertainty generation model includes a denoising diffusion probability model layer and a DTLayer learning layer. The DTLayer learning layer includes a decoder with unentangled time representation. The decoder consists of a Transformer block, an FFN, and a decomposition block.

[0021] The design module is used to design the joint loss function to update the weights and biases of the runoff uncertainty generation model;

[0022] The training module is used to train the loss convergence under joint guidance and output the runoff prediction results.

[0023] Thirdly, a computer storage medium is provided, wherein a computer program is stored therein; when the computer program is run on a computer, the computer causes the computer to perform any of the methods described in the first aspect.

[0024] Fourthly, an electronic device is provided, comprising:

[0025] Memory, used to store computer programs;

[0026] A processor for executing the computer program to implement the method as described in any of the first aspects.

[0027] The beneficial effects of this invention are:

[0028] 1. This invention provides a runoff uncertainty generation model based on a denoised diffusion probability model. This model aims to extract complex data features from runoff prediction scenarios and achieve effective uncertainty prediction. The runoff uncertainty generation model not only fully utilizes the powerful generation capabilities of the denoised diffusion probability model but also combines a joint loss function design with a Transformer-based deep decomposition architecture. This allows for the integration of multi-source data fusion, long-term time-series modeling, and uncertainty quantification capabilities, thereby significantly improving model performance.

[0029] 2. This invention combines a loss function based on Fourier transform with a physical theory guidance term. The introduction of physical constraints can not only effectively quantify the randomness in the runoff physical system, but also provide more optional prediction values ​​while ensuring the physical consistency of the prediction results. It effectively quantifies the inherent random uncertainty in the physical drought and flood process, overcomes the constraints of existing technologies due to data sparsity and uncertainty of observation information, and thus enhances the physical consistency and prediction accuracy of the model. Attached Figure Description

[0030] Figure 1The overall framework diagram of Difformer for runoff uncertainty forecasting provided by this invention;

[0031] Figure 2 A detailed unfolded diagram of the Difformer model structure provided by this invention;

[0032] Figure 3 A schematic diagram of the runoff prediction optimization visualization process based on a physical guidance framework provided by the present invention;

[0033] Figure 4 The diagram shows the interval forecast results of all the comparative models provided by this invention at Reservoir A; where (a) is the interval forecast result of the TimeVAE model at Reservoir A, (b) is the interval forecast result of the Diffwave model at Reservoir A, (c) is the interval forecast result of the CotGAN model at Reservoir A, (d) is the interval forecast result of the DiffTime model at Reservoir A, (e) is the interval forecast result of the STALSTM model at Reservoir A, (f) is the interval forecast result of the DC-WGAN model at Reservoir A, (g) is the interval forecast result of the TimeGAN model at Reservoir A, (h) is the interval forecast result of the PC-LSTM model at Reservoir A, and (i) is the interval forecast result of the Difformer model at Reservoir A.

[0034] Figure 5 The diagram shows the interval forecast results of all the comparative models provided by this invention at Reservoir B; where (a) is the interval forecast result of the TimeVAE model at Reservoir B, (b) is the interval forecast result of the Diffwave model at Reservoir B, (c) is the interval forecast result of the CotGAN model at Reservoir B, (d) is the interval forecast result of the DiffTime model at Reservoir B, (e) is the interval forecast result of the STALSTM model at Reservoir B, (f) is the interval forecast result of the DC-WGAN model at Reservoir B, (g) is the interval forecast result of the TimeGAN model at Reservoir B, (h) is the interval forecast result of the PC-LSTM model at Reservoir B, and (i) is the interval forecast result of the Difformer model at Reservoir B.

[0035] Figure 6The diagram shows the interval forecast results of all the comparative models provided by this invention at Reservoir C; where (a) is the interval forecast result of the TimeVAE model at Reservoir C, (b) is the interval forecast result of the Diffwave model at Reservoir C, (c) is the interval forecast result of the CotGAN model at Reservoir C, (d) is the interval forecast result of the DiffTime model at Reservoir C, (e) is the interval forecast result of the STALSTM model at Reservoir C, (f) is the interval forecast result of the DC-WGAN model at Reservoir C, (g) is the interval forecast result of the TimeGAN model at Reservoir C, (h) is the interval forecast result of the PC-LSTM model at Reservoir C, and (i) is the interval forecast result of the Difformer model at Reservoir C.

[0036] Figure 7 The diagram shows the interval forecast results of all the comparative models provided by this invention at station D reservoir; where (a) is the interval forecast result of the TimeVAE model at station D reservoir, (b) is the interval forecast result of the Diffwave model at station D reservoir, (c) is the interval forecast result of the CotGAN model at station D reservoir, (d) is the interval forecast result of the DiffTime model at station D reservoir, (e) is the interval forecast result of the STALSTM model at station D reservoir, (f) is the interval forecast result of the DC-WGAN model at station D reservoir, (g) is the interval forecast result of the TimeGAN model at station D reservoir, (h) is the interval forecast result of the PC-LSTM model at station D reservoir, and (i) is the interval forecast result of the Difformer model at station D reservoir.

[0037] Figure 8 This is a schematic diagram illustrating the loss trends of Difformer and PC-LSTM over the first 500 periods provided by this invention; where (a) shows a comparison of the overall loss. Figure 8 (b) shows the comparison of PDE loss;

[0038] Figure 9a Comparison of NSE values ​​of inflow runoff predicted by all models at four stations under a 5% noise level;

[0039] Figure 9b Comparison of NSE values ​​of inflow runoff predicted by all models at four stations under a 10% noise level;

[0040] Figure 9c Comparison of NSE values ​​of inflow runoff predicted by all models at four stations under a 15% noise level;

[0041] Figure 9d Comparison of NSE values ​​of inflow runoff predicted by all models at four stations under a 20% noise level;

[0042] Figure 10 This is a comparative diagram of the average PICP values ​​of all models provided by this invention under inflow anomalies at stations A and C with different outlier levels; where (a) is the average PICP value of all models under inflow anomalies at station A with different outlier levels, and (b) is the average PICP value of all models under inflow anomalies at station C with different outlier levels.

[0043] Figure 11 The diagram illustrates the impact of the forecast window length provided by this invention on the performance of all models in forecasting runoff at four stations; where (a) shows the impact of the forecast window length on the performance of all models in forecasting runoff at station A, (b) shows the impact of the forecast window length on the performance of all models in forecasting runoff at station B, (c) shows the impact of the forecast window length on the performance of all models in forecasting runoff at station C, and (d) shows the impact of the forecast window length on the performance of all models in forecasting runoff at station D.

[0044] Figure 12 The diagrams illustrate the prediction capabilities of the other four hyperparameters in the Difformer model provided by this invention under different settings; where (a) is the prediction capability of the batch size in the Difformer model under different settings, (b) is the prediction capability of the embedding dimension in the Difformer model under different settings, (c) is the prediction capability of the sampling time step in the Difformer model under different settings, and (d) is the prediction capability of the number of DTLayer layers in the Difformer model under different settings.

[0045] Figure 13 This invention provides a visualization diagram of the reconstruction performance of Difformer with decomposed configuration, using site A as an example.

[0046] Figure 14 The present invention provides a PCA map of station A water level with a prediction interval of h=72h, synthesized by TimeVAE, Diffwave, CotGAN, DiffTime, DC-WGAN, TimeGAN, PC-LSTM and Difformer. Detailed Implementation

[0047] The present invention will be further described below with reference to embodiments. The description of the embodiments below is only for the purpose of helping to understand the present invention. It should be noted that those skilled in the art can make several modifications to the present invention without departing from the principle of the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

[0048] Example 1:

[0049] As is well known, runoff time series often exhibit complex patterns in real-world scenarios due to the influence of extreme weather and human activities. To improve the accuracy of watershed runoff prediction, this invention provides a watershed runoff uncertainty forecasting method jointly driven by multi-source data and physics:

[0050] Given with Runoff sequence at time steps and external forecasting factors (e.g., rainfall, evaporation, temperature, humidity, etc.), where C represents the number of observation stations within the watershed and D represents the number of external forecast factors. Considering the necessity of physical constraints, a constrained diffusion generator is adopted. N runoff sequence datasets Probability diffusion is performed, and approximate runoff data are randomly generated. This function is designed to convert Gaussian vectors The quantity is mapped to a signal most similar to the signal in the runoff sequence dataset DATA, where T is the total diffusion step size. The method of this invention primarily considers the following runoff time series models exhibiting trends and multiple seasonalities.

[0051] (1)

[0052] Where, x j Let ζ represent the runoff sequence observed at time j. j s represents the trend component at time j. i,j r represents the i-th seasonal component at that moment. j This represents the noise and outliers at time j.

[0053] This invention provides a multi-source data and physics-driven method for predicting watershed runoff uncertainty, which constructs a decomposable Difformer model jointly driven by data and physical knowledge to effectively quantify the physical chaotic process of runoff uncertainty. Inspired by seasonal trend decomposition analysis for effective time series modeling, the core idea of ​​the Difformer model is to introduce an interpretable diffusion decomposition structure system into the Transformer-based underlying network, guided by physical theory. The overall framework is as follows: Figure 1 As shown, it mainly includes two processes: (1) the Difformer diffusion generation model based on the decomposable structural system, which can effectively quantify the runoff uncertainty of multiple stations, such as Figure 1 As shown in (a); (2) the loss constraint modeling process driven by data and guided by physical knowledge makes the predicted values ​​more consistent with the actual runoff situation in the watershed, such as Figure 1 As shown in (b).

[0054] Specifically, the method for predicting watershed runoff uncertainty driven by multi-source data and physics includes the following steps:

[0055] Step 1: Obtain runoff sequence data and external forecast factor data for the target watershed.

[0056] For example, hydrological and meteorological multi-source data are collected from N stations in the target watershed to obtain data with... Runoff sequence at time steps and external forecasting factors (such as rainfall, evaporation, temperature, humidity, etc.), where C represents the number of observation stations in the basin and D represents the number of external forecast factors.

[0057] Step 2: Construct a runoff uncertainty generation model. A constrained diffusion generator is used to perform probability diffusion on the runoff sequence data to generate approximate runoff data. The runoff uncertainty generation model includes a denoising diffusion probability model layer and a DTLayer learning layer. The DTLayer learning layer includes a decoder with a de-entangled time representation. The decoder consists of a Transformer block, an FFN, and a decomposition block.

[0058] For example, a constrained diffusion generator is used. N runoff sequence datasets Probability diffusion is performed, and approximate runoff data are randomly generated. .

[0059] Specifically, step 2 includes:

[0060] Step 2.1: Project the original input onto deep features through a data embedding layer; the original input includes runoff sequence data and external forecast factor data.

[0061] For example, for raw runoff data and external forecast factors First, it goes through the data embedding layer. Project the original input onto the depth features and In this context, d represents the projection depth. The data embedding layer encodes the raw input (i.e., runoff sequence data and external forecast factor data) into high-dimensional deep features. This embedding primarily handles the initial representation learning of the input data and serves as the front-end encoding structure of the entire model.

[0062] Step 2.2: Pass the deep features through the L-layer DTLayer learning layer to obtain the trend component, seasonal component and residual component.

[0063] For example, will and The features are processed through an L-layer DTLayer to obtain the seasonal components. Trend components and residual components .

[0064] Step 2.3: Apply different forms of constraints to the trend component, seasonal component and residual component to achieve deentanglement and obtain approximate samples predicted by the runoff uncertainty generation model.

[0065] For example, by analyzing different components (i.e., trend components) Seasonal portion and residual components By applying different forms of constraints, entanglement can be resolved, resulting in approximate samples predicted by Difformer. .

[0066] Step 3: Design a joint loss function to update the weights and biases of the runoff uncertainty generation model.

[0067] Specifically, based on the prediction sample Generate data-driven loss terms and Physically Guided Loss Item MSE PDE MSE BC MSE IC Finally, the loss function L, driven by both data and physics, is obtained to update the weights and biases of the Difformer.

[0068] Step 4: Train the loss convergence under joint guidance and output the runoff prediction results. .

[0069] Example 2:

[0070] Based on Example 1, Example 2 of the present invention provides a more specific method for predicting watershed runoff uncertainty driven by multi-source data and physics, including the following steps:

[0071] Step 1: Obtain runoff sequence data and external forecast factor data for the target watershed.

[0072] Step 2: Construct a runoff uncertainty generation model. A constrained diffusion generator is used to perform probability diffusion on the runoff sequence data to generate approximate runoff data. The runoff uncertainty generation model includes a denoising diffusion probability model layer and a DTLayer learning layer. The DTLayer learning layer includes a decoder with a de-entangled time representation. The decoder consists of a Transformer block, an FFN, and a decomposition block.

[0073] like Figure 1As shown in (a), the denoising diffusion probability model layer typically includes two processes: a forward diffusion process and a reverse diffusion process. The parameterization of these two processes is as follows:

[0074] (2)

[0075] (3)

[0076] In this case, from the data distribution The sample is obtained through a forward diffusion process. Gradually convert the noise to a standard Gaussian noise The conversion is performed by Parameterize it, and the variance β t ∈[0,1] is the amount of noise added by the diffusion step t, which can be learned by reparameterization or kept constant as a hyperparameter.

[0077] It is important to note that the diffusion process allows sampling in a closed loop at any time step t. ,Right now ,in and .

[0078] Subsequently, a reverse transformation is performed based on the DTLayer layer, i.e. .because It can be used as input, so select it. Parameterization, that is, by selecting Gaussian noise in Sample Stepwise denoising yields the estimated sample The specific calculation process is as follows:

[0079] (4)

[0080] in, This represents a learnable logarithmic density gradient. For hyperparameters, It is standard Gaussian noise.

[0081] Furthermore, to better describe the high-dimensional and complex mapping relationships between runoff under extreme events, additional information c (such as uncertainties in weather forecasts, historical water levels, and soil moisture) is considered in the condition space of the backward process. The conditional information 'c' is globally mapped into the model generation process, ensuring that the model can capture and reflect the impact of fluctuations in these factors on runoff prediction. This not only improves prediction accuracy but also allows for a reasonable estimation of the uncertainty range.

[0082] Furthermore, at a high level, inspired by Diffusion-TS, the Transformer decoder is updated to a deep decomposition architecture DTLayer, such as... Figure 1 As shown, this enhances the model's ability to capture global correlations and runoff time-series patterns. Unlike Diffusion-TS, the DTLayer layer in Diffomer only employs decoders, each consisting of a Transformer block, an FFN, and a decomposition block (i.e., trend and seasonal decomposition, denoted as DecompBlock). Specifically, for the raw runoff data... and external forecast factors First, it goes through the embedding layer. Project the original input onto the depth features and In this context, d represents the projection depth. Therefore, for the l-th DTLayer, the process can be formalized as:

[0083] (5)

[0084] (6)

[0085] (7)

[0086] (8)

[0087] in, and These are the outputs of Transformer and FFN, respectively; , and These represent the seasonal component, the trend component, and the residual component, respectively; l∈{1,…, L} represents the DTLayer index corresponding to the diffusion step size t; This represents the mean function. The details of untangling the representation will be explained below.

[0088] (1) Transformer

[0089] The Transformer block contains a diffuse embedding layer, a self-attention layer, and a cross-attention layer, such as... Figure 2 As shown. Figure 2In the Transformer Decoder, three layer normalizations are used to improve model stability and accelerate convergence. This application explains the location, function, and necessity of each of these three normalizations: The first layer normalization performs self-attention computation on the target sequence. Layer normalization ensures the stability of the prediction at the current time step and mitigates gradient vanishing / exploding. The second layer normalization performs cross-attention computation on the target sequence. Layer normalization ensures the numerical stability of the fusion process and helps learn cross-sequence dependencies. The third layer normalization applies to the entire decoder output; this design is more conducive to training deep networks.

[0090] Furthermore, the DTLayer layer is the core deep decomposition architecture of the proposed Difformer model. This layer includes a Transformer decoder, FFN, and a decomposition module, performing sequence generation learning through stacked L-layer DTLayer layers. The decomposition module extracts the trend term V and periodic term S through multinomial regression and Fast Fourier Decomposition, respectively, and then obtains the residual term R based on the characteristics of the time series data. For learning with stacked L-layer DTLayer layers, the residual term R needs to be passed layer by layer, while the trend term V and periodic term S are added layer by layer. Finally, the residual term R, trend term V, and periodic term S are added together to obtain the predicted data. Therefore, Figure 2 In the diagram below, a large rectangle represents a DTLayer layer, which is stacked with L layers. The rectangles become lighter in color with each subsequent layer to distinguish them. The residual term R in the lower right corner is represented by a dashed line and passed to the next DTLayer layer. The trend term V and period term S of all DTLayer layers are added together, and then added to the residual term R passed to the L layer to obtain the output data.

[0091] For the diffusion embedding approach, sinusoidal position embedding is used to encode the diffusion step size, thereby guiding the model to perceive temporal and positional information at different diffusion stages. Then, the diffusion step size t is injected into the network using the Adaptive Layer Normalization Operator (AdaLN), which is denoted as... ,in a is an intermediate activation parameter. t and b t It is obtained by linear projection from the diffuse embedding layer. Furthermore, the self-attention and cross-attention learning processes are as follows:

[0092] (9)

[0093] (10)

[0094] in, and These are representation learning after undergoing self-attention and cross-attention mechanisms, respectively; and These represent layer normalization and multi-head attention operations, respectively.

[0095] (2) Trend synthesis

[0096] The trend component describes the smoothed underlying mean of the data, aiming to simulate the actual, slowly changing behavior of runoff. To generate a reasonable trend component, a multinomial regression model is used to analyze the trend. Modeling, the formula is as follows:

[0097] (11)

[0098] In the formula, The input trend quantity for DecompBlock is... , get; This represents the average value of the output of the l-th DTLayer block; "·" denotes tensor multiplication. Here, the slowly changing polynomial space P is a vector... power matrix, Indicates a small degree (e.g.) To simulate low-frequency behavior.

[0099] (3) Seasonal synthesis

[0100] Numerous studies have shown that FFT can effectively and adaptively identify seasonal patterns from input data. By studying periodic components (seasonality) and aperiodic components (residuals), FFT is used to select the most significant amplitude in the frequency domain, and then an inverse transform is used to return to the time domain to simulate seasonality. The calculation process is as follows:

[0101] (12)

[0102] (13)

[0103] (14)

[0104] in, , These represent the operations performed by the Discrete Fourier Transform. The phase and amplitude of the kth frequency. This indicates that the top K amplitudes are obtained, where K is a hyperparameter. k This represents the Fourier frequency of the corresponding index k; Indicates corresponding conjugate ; It is a constant, usually representing a scaling factor or rate parameter, used to adjust the frequency or phase of the cosine function.

[0105] Furthermore, by analyzing different components (i.e., trends) ,season and residual To achieve deentanglement, different forms of constraints are imposed, introducing different inductive biases into these components and making them more susceptible to learning specific semantic knowledge. The specific formula is as follows:

[0106] (15)

[0107] in, The output of the last DTLayer can be viewed as the sum of residual periodicity and other noise. L is the number of DTLayer layers. Subsequently, approximate samples are predicted based on Difformer. ,like Figure 1 The reverse process shown can be represented as follows:

[0108] (16)

[0109] in, .

[0110] Step 3: Design a joint loss function to update the weights and biases of the runoff uncertainty generation model.

[0111] In step 3, to effectively quantify the inherent physical properties of the runoff sequence, a data- and physical knowledge-driven guidance framework was adopted. This framework is primarily based on first-principles calculations and empirical models, transforming the hydrodynamic governing equations into penalty terms reflecting the prior losses formed by the physical theories of runoff forecasting. Simultaneously, it uses data to drive the loss term, optimizing the loss training of the entire model. This framework is as follows: Figure 1 As shown in (b), the physical governing equations of runoff are transformed into constraint penalty terms, providing physical guidance for the introduction of the proposed Difformer model. This "relaxes" the limiting range of the final constraint projection and quantifies the output error caused by uncertainties in the complex modeling process. These penalty terms essentially reflect prior information formed by domain knowledge and aim to characterize the pre-obtained data understanding. The specific design process of these two losses is described below.

[0112] (1) Data-driven loss function design

[0113] Data-driven loss term This is used to measure the error between generated samples and real data (such as observed runoff data). Fons et al. showed that Fourier-based loss terms are beneficial for accurate reconstruction of time-series signals, and adopted the following reweighting strategy to design a data-driven loss function, formally expressed as follows:

[0114] (17)

[0115] in, , It is a constant, i.e., 0.01; These are weights that balance the two losses. Similar to DDPM, these loss terms have their weights reduced at small diffusion steps t to force the model to focus on larger diffusion steps.

[0116] (2) Physical constraints in the simulated runoff process

[0117] For any generated runoff data, the corresponding hydrodynamic equations must be satisfied. In practice, these equations often take the form of partial differential equations (PDEs), which can serve as domain knowledge guiding Difformer predictions. Therefore, considering the PDE losses... Boundary loss and initial condition loss A loss function L, conforming to hydrodynamic constraints, is constructed to measure the deviation of the model's generated results from these physical laws. , and The definition is as follows:

[0118] (18)

[0119] (19)

[0120] (20)

[0121] In the formula, S f N represents the combination coefficients among the variables in the river network equation; t represents the current time; N represents the combination coefficients among the variables in the river network equation. f N BC N IC These represent the number of coordination points, the number of boundary points, and the number of initial points, respectively; Q is the runoff volume. BC Q IC and These represent boundary conditions, initial conditions, and predicted runoff, respectively; V α and V β These are weighting coefficients for different physical concepts, used to adjust the knowledge in the control equations.

[0122] By using runoff physics theory to guide the loss, a loss function L jointly driven by data and physics is obtained, expressed as follows:

[0123] (twenty one)

[0124] in, , and It is a penalty parameter used to control the weight of each item in the total loss function.

[0125] Current techniques suggest that the regularization term in the loss function only guarantees that the prediction result does not severely violate constraints in an average sense. However, in optimization, hard constraint projection (HCP) is often required because HCP can ensure that the given governing equations strictly satisfy a specific region (also known as constraint patching). Combining this design idea with the characteristics of runoff prediction, domain knowledge is embedded as a hard constraint into Difformer for equation discretization, matrix decomposition, and HCP operations.

[0126] Equation Discretization and Matrix Decomposition: First, the hydrodynamic equations are differentially transformed based on finite difference theory. Specifically, the PDF is discretized using a second-order central difference scheme in the x and y dimensions and a first-order backward Euler scheme in the t dimension, as shown in Equation (22). At the same time, the concept of constraint patches is introduced to apply physics to the local region, and the coordinates of each point in the constraint patch are shown in Equation (23).

[0127] (twenty two)

[0128] (twenty three)

[0129] Where x, y, and t represent the spatial and temporal coordinates of a point (in bold), respectively; , , denoted by x, y, t, the difference interval in the x, y, t directions; CP represents the coordinates of the constraint patch around the placement point x, y, t. Equation (22) is decomposed into a constraint matrix A. The constraint matrix is ​​essentially a hyperplane constrained by discrete equations in the variable space, reflecting the constraint relationships determined by the physical changes at different locations in the constraint block.

[0130] HCP: such as Figure 1 As shown in (b), the runoff constraint governing equations can be used to obtain a new predicted runoff Q that better conforms to the physical constraints through the projection matrix E. − =EQ, where To a certain extent, the predicted values ​​obtained are most similar to the value space defined by the governing equations.

[0131] An intuitive understanding of the physical guidance framework for runoff prediction: visualizing optimization as a downhill process, such as... Figure 3 As shown, the gradient differentiation process represents the gradient descent space; the X and Z axes represent the possible directions of the next gradient in each differentiation process, and the Y axis represents the time step in which the differentiation occurs.

[0132] Figure 3 In the diagram, the lowest red dot represents the global minimum, i.e., the observed runoff value; the black dot represents the initial prediction, i.e., the starting point of optimization; and the light blue surface (i.e., the river) represents the constrained hyperplane with stochastic runoff characteristics. In traditional data-driven methods, the algorithm assumes the direction of the fastest gradient descent at each location as the optimization direction and iterates along the brown dashed line, easily converging to a local optimum. Soft-constraint methods differ; throughout the optimization process, they model the deviation between prediction and observation (i.e., wave height) and the deviation from the constraints (i.e., distance from the river), and combine this with the loss value to optimize along the green dashed line. However, soft-constraint methods cannot guarantee that the result of each optimization iteration step will satisfy the threshold space of the physical constraints. Therefore, this study introduces a hard-constraint model with stochastic characteristics. It calculates the nearest position on the constrained hyperplane (i.e., the light blue surface) at each step through projection and measures the loss during optimization to ensure that each prediction follows the physical constraints (i.e., each blue dot conforms to the runoff characteristics). In summary, the consistency between model predictions and physical mechanisms helps improve the reliability and credibility of the model. The Difformer process, guided by both data and physics, can be summarized as Algorithm 1.

[0133] Algorithm 1 is as follows:

[0134] Input: Observations (xi, ti, ci, yi).

[0135] Domain knowledge: governing equations; boundary conditions; initial conditions.

[0136] Runoff prediction: Difformer model prediction yields the predicted runoff matrix. ;

[0137] Equation Discretization and Decomposition: Discretize the control equation (Equation (22)) to obtain the constraint matrix A;

[0138] Projection matrix generation: via Generate the projection matrix E;

[0139] Data sampling: Random sampling is performed on the threshold space to obtain the coordinates of the configuration points (x). j , y j , t j ), boundary condition point coordinates (x k , y k , t k ) and initial condition point coordinates (x l , y l , t l );

[0140] Joint guidance: Fine-tuning the diffusion probability model based on data and physical loss terms.

[0141] repeat:

[0142] 1. Data-driven loss: For i = 1, …, N obs

[0143] (1) According to Generate a new runoff projection matrix that conforms to physical constraints ;

[0144] (2) Calculate the observed value Q and the predicted value using equation (17). Data loss ;

[0145] 2. Control equation loss: for j = 1, …, N f

[0146] (1) Generate the placement point matrix ;

[0147] (2) Obtain the adjusted prediction matrix based on HCP. ;

[0148] (3) Calculate the control equation loss MSE using equation (18). PDE ;

[0149] 3. Boundary loss: For k = 1, ..., N BC

[0150] (1) Generate the boundary point matrix ;

[0151] (2) Obtain the adjusted prediction boundary point matrix based on HCP. ;

[0152] (3) Calculate the boundary loss MSE using equation (19). BC ;

[0153] 4. Initial loss: For l = 1, ..., N IC

[0154] (1) Generate the initial condition point matrix ;

[0155] (2) Obtain the adjusted prediction condition point matrix based on HCP. ;

[0156] (3) Calculate the initial condition loss MSE using equation (20). IC ;

[0157] 5. Joint guidance loss: Calculate the joint guidance loss L according to formula (21);

[0158] 6. Iterative update: Update the weights and biases of the Difformer based on the joint loss term;

[0159] The loop continues until the loss under the joint training guidance converges, at which point it ends.

[0160] Step 4: Train the loss convergence under joint guidance and output the runoff prediction results.

[0161] Furthermore, the effectiveness of the method provided by this invention is verified through experiments in this embodiment of the invention. The details of the experiments are as follows:

[0162] (1) Study Area and Data: This experiment focuses on four reservoir stations (Site A, Site B, Site C, and Site D) in watershed a. The experimental data covers hourly observations during the extreme drought event from July 1, 2021 to October 30, 2022, including precipitation, evaporation, and inflow data, totaling 11,688 time points. The input data consists of hourly precipitation, evaporation, and runoff data (including current data) for the previous 1 to 4 days (i.e., h=96 h) for a single station, and the output data consists of hourly runoff data for the following 1 to 3 days (i.e., h=72 h) for a single station. The runoff in watershed a is mainly converted from precipitation, and most rivers rely on rainwater replenishment. Therefore, precipitation is the main driving factor for runoff formation. The formation and changes of runoff are greatly affected by the basic characteristics of the watershed, which can be divided into two stages: runoff generation and runoff confluence. These two stages are not independent but occur simultaneously. The entire process of runoff formation begins with precipitation and continues until the rainwater converges at the watershed outlet, making it a highly complex hydrological process.

[0163] (2) Experimental Setup: 80% of the data was used for training and 20% for testing. Before experimental evaluation, the model was pre-trained to adjust hyperparameters. Cosine noise scheduling was used in the experiments, and Adam (β1, β2) = (0.9, 0.96) was employed to optimize the network. For the Difformer model, the decoder layers L = 4, the number of channels D = 64, the confidence level α = 95%, the maximum training step size T = 10000, the maximum diffusion / sampling step size t = 1000, the batch size = 64, and the number of attention heads N = 4. All experiments were repeated five times, and the average was taken to reduce randomness.

[0164] (3) Baseline model: For time series generation, this paper selects four latest models for comparison: TimeVAE, Diffwave, CotGAN and DiffTime, as well as four runoff forecasting models: STALSTM, DC-WGAN, TimeGAN and PC-LSTM. The first three are data-driven models, and the last one is a data and physics-driven model.

[0165] (4) Evaluation indicators: RMSE, CORR and NSE are used to evaluate the predictive performance of the model; PIPC and PINRW are used to quantify the quality of interval prediction.

[0166] Furthermore, this invention describes multiple unbiased estimation comparison experiments conducted using the comparative model on the runoff dataset of watershed a to verify the superiority of the proposed Difformer model. The experimental results are shown in Table 1. The data in the table show that Difformer exhibits significant advantages in interval prediction performance metrics (PICP and PINRW) and prediction accuracy metrics (RMSE, MAE, CORR, NSE) at each reservoir station. Specifically, at station A, Difformer's PICP reaches 0.876 (±0.012), a significant improvement over other models. PINRW decreases to 0.167 (±0.131), indicating a narrower interval width and higher reliability. Meanwhile, Difformer's RMSE and MAE are 0.307 and 0.210, respectively, with significantly lower prediction errors than other models. CORR and NSE reach 0.908 and 0.892, respectively, reflecting Difformer's higher fitting accuracy and stability. In the other three reservoirs, Difformer's performance is also generally superior to other baseline models. Taking station B as an example, Difformer's PICP, PINRW, RMSE, MAE, CORR, and NSE improved by 3.94% (0.862→0.896), 2.47% (0.162→0.158), 0.16% (0.623→0.618), 5.93% (0.455→0.428), 0.74% (0.946→0.953), and 0.33% (0.917→0.920) respectively compared to the baseline model, indicating that Difformer captures the temporal characteristics of runoff better than the baseline model and makes it conform to physical laws.

[0167] Further observation reveals that PC-LSTM and Difformer, guided by both data and physics, exhibit significantly improved performance metrics compared to other models (except DiffTime). The inclusion of physical constraints positively impacts model predictions. This improvement likely stems from two core advantages of the physics-guided framework: firstly, it effectively integrates domain knowledge and prior information into deep learning models, improving prediction accuracy by limiting the model's search space; secondly, it constrains physically unreasonable predictions, thereby enhancing the model's generalization ability and stability. A key reason for Difformer's superior performance compared to PC-LSTM lies in its stronger modeling capabilities and complex architecture. Difformer uses a conditional diffusion model to predict across multiple time scales, capturing not only long-term runoff trends but also effectively simulating short-term fluctuations. Furthermore, Difformer combines the advantages of physical constraints and data-driven approaches, enabling the generated data to better reflect the intrinsic physical laws of runoff. In contrast, while PC-LSTM introduces physical constraints, its model structure primarily relies on traditional LSTM networks. This type of network has limited ability to model complex nonlinear dynamics, making it difficult to fully capture subtle changes and multi-scale features in runoff sequences. Furthermore, the physical constraints of PC-LSTM are mainly achieved through simple joint predictions, failing to delve into the interaction between physical constraints and the data-driven model, resulting in slightly inferior performance compared to Difformer. DiffTime, as another diffusion model, supports the generation of trends and fixed values ​​by introducing a conditional diffusion process. These conditional constraint points are typically imposed by the underlying physical processes of runoff generation, enabling the data generated by DiffTime to closely match the distribution of real data. However, compared to Difformer, DiffTime's expressive power of physical constraints may be relatively limited, and its ability to capture nonlinear dynamics in highly complex scenarios is slightly insufficient.

[0168] Table 1 compares the runoff prediction results of all models for four stations in a certain watershed under different performance indicators.

[0169]

[0170] The prediction results in Table 1 are represented as ave(±std). In Table 1, TimeVAE is a temporal variational autoencoder, DiffWave is a diffusion waveform model, CotGAN is a co-trained generative adversarial network, DiffTime is a diffusion time model, STALSTM is a spatiotemporal attention long short-term memory network, DC-WGAN is a deep convolutional Wasserstein generative adversarial network, TimeGAN is a temporal generative adversarial network, PC-LSTM is a partially connected long short-term memory network, and Difformer is the diffusion transformer model proposed in this invention.

[0171] The evaluation indicators in Table 1 are as follows:

[0172] PICP: Predicted Interval Coverage, measures the probability that a predicted interval contains the true value; PINRW: Normalized Width of Predicted Interval, assesses the width of the predicted interval relative to the observed value; RMSE: Root Mean Square Error, measures the difference between the predicted and the true value, a commonly used indicator of prediction accuracy; MAE: Mean Absolute Error, represents the average absolute error between the predicted and the true value, used to assess prediction accuracy; CORR: Correlation Coefficient, measures the linear correlation between the predicted and the true value; the closer the value is to 1 or -1, the stronger the correlation; NSE: Nash-Stucliffe Efficiency Coefficient, assesses the goodness of fit of the model; the closer the value is to 1, the better the model fit.

[0173] also, Figures 4 to 7 The predicted runoff results and prediction intervals of all models were visualized and compared. It can be seen that PC-LSTM, Difformer, and DiffTime can more accurately capture the trends and fluctuations of runoff sequences, especially at extreme points and in areas of significant variation. Difformer performs best, as its conditional diffusion and decomposition modeling mechanism makes the predictions more consistent with physical laws and has a higher degree of agreement with real data. DiffTime and PC-LSTM follow closely, but their accuracy at extreme points is slightly lower than Difformer. In contrast, baseline models without physical constraints (especially STALSTM) have weaker fitting ability at extreme points and in fluctuating intervals, and the interval distribution of the predicted results deviates significantly from the actual values, further validating the important role of physical constraints and diffusion mechanisms in improving runoff prediction performance.

[0174] Overall, the experimental results demonstrate that the incorporation of physical knowledge significantly enhances runoff prediction models. Difformer's combined advantages in expressing physical constraints, decomposing dynamic modeling, and fitting generated data distributions make it the best-performing model to date. This also provides important insights for future runoff prediction research, namely, how to more effectively combine domain knowledge, physical laws, and deep learning methods to improve the predictive and generalization capabilities of models.

[0175] Furthermore, to verify the effectiveness and coupling reliability of Difformer, the runoff dataset from station A in the Feiyunjiang River basin was used to train the physical guidance model PC-LSTM and Difformer, and the decreasing trends of different losses of the two models were compared in the first 500 periods. As shown in Figure 8, Figure 8(a) shows the comparison of the comprehensive loss. Figure 8 Figure (b) shows the comparison of PDE losses, where the PDE loss reflects the deviation between runoff prediction and the governing equations. As can be seen from the figure, both the overall loss and PDE loss of Difformer converge faster and have lower final values ​​than PC-LSTM. This indicates that Difformer has higher reliability in capturing the coupling relationship between runoff and physical mechanisms, validating the guiding nature and effectiveness of the proposed physical constraint method in runoff uncertainty prediction. It is important to note that the adjustments made to the theoretically guided HCP before and after each projection step are often very small. Therefore, within a single iteration or time step, such small adjustments will not significantly change or affect the final prediction results.

[0176] Furthermore, to verify the robustness of Difformer in runoff time-series prediction tasks, a comparative analysis was conducted under different weather conditions, different noise levels, and outliers. Eight generative models with good performance were selected for validation, and the experimental results are shown in Table 2.

[0177] Table 2 compares the overall performance of all models in predicting runoff at station A under different weather conditions.

[0178]

[0179] (1) Comparison of prediction results under extreme hydrological conditions

[0180] The runoff dataset of Reservoir A at Station A was divided into three periods based on actual rainfall: dry season (rainfall = 0), mid-flood season (0 < rainfall ≤ 10), and flood season (rainfall > 10) to explore the comprehensive performance of all models under different weather conditions. As shown in Table 2, Difformer performed excellently on multiple metrics, especially under mid-flood and flood season conditions, significantly outperforming the baseline model. This further demonstrates its high accuracy and robustness in complex scenarios, showcasing its predictive advantages in handling extreme hydrological conditions. In contrast, DiffTime performed second only to Difformer, thanks to its powerful modeling capabilities. Although PC-LSTM, also based on physics, performed reasonably well on some metrics, its overall performance failed to match that of Difformer and DiffTime, particularly in error metrics such as RMSE and MAE. This was mainly because the hydrological process fluctuates dramatically, and traditional recurrent structures like LSTM are prone to gradient vanishing or exploding, leading to reduced prediction accuracy. Furthermore, hydrological data often contains measurement errors and environmental noise. While other generative models (such as DC-WGAN and TimeGAN) can model data distribution through adversarial mechanisms, their robustness to noise is relatively weak, easily leading to increased RMSE and MAE error indices and decreased CORR and NSE indices. Overall, the Difformer model, through its advanced architectural design, effectively captures the spatiotemporal dependencies and uncertainties in runoff prediction, exhibiting high prediction accuracy and stability under all seasonal conditions, and demonstrating significant performance advantages, especially during the flood season.

[0181] (2) Comparison of model prediction accuracy under different noise levels

[0182] The predictive performance of the model under different noise levels is as follows: Figures 9a-9d As shown in the figure, Difformer consistently outperforms most of the comparison models in terms of NSE values ​​at different noise levels (5%, 10%, 15%, and 20%), especially under low noise conditions. While its overall performance slightly decreases with increasing noise levels, its advantage remains significant. This stable performance is likely due to the physical constraint framework introduced by Difformer. By projecting the prediction matrix onto a hyperplane that satisfies runoff patterns, it effectively avoids the negative impacts of noise and outliers, ensuring consistency between the prediction results and physical constraints. Furthermore, the decomposition-based architecture design also provides effective assurance for the model's prediction accuracy.

[0183] (3) Comparison of prediction interval quality of all models under outliers

[0184] Figure 10The average PICP interval prediction quality of the model for inflow runoff at station A and station C was compared under different outlier levels (1%, 2%, 3%, 4%, and 5%). Compared with the baseline model, Difformer exhibits better interval prediction indices. This superior performance is mainly attributed to the proposed data-physics joint guidance framework, which constructs a hyperplane that conforms to the actual physical characteristics of runoff and projects the runoff prediction matrix onto this hyperplane, thus ensuring that the prediction results meet physical constraints. By introducing a reasonable constraint threshold space, the randomness in runoff physics is effectively quantified, making the output results more physically interpretable within the selectable prediction range. Furthermore, the prediction interval quality of the proposed model remains stable with increasing outlier levels, further demonstrating the effectiveness of the error-adjusted output mechanism in handling outlier interference. The error adjustment mechanism ensures the quality of the prediction interval, providing a stable and reasonable prediction range even with increasing outlier levels. This mechanism improves the robustness and reliability of the model in practical applications, providing more reliable data support for water resource planning.

[0185] Table 3 Ablation Study of Model Architecture and Components

[0186]

[0187] To evaluate the effectiveness of each design component of Diffomer, four variants were designed and compared with it: (1) w / o-FFT, i.e., the Fourier loss term was removed during training; (2) w / o-Physic, i.e., the physical guidance loss term was removed during training; (3) w / o-Decomposition, i.e., the seasonal and trend decomposition design was removed from the network; and (4) w / o-Transformer, i.e., a convolutional network was used to replace the decoder, thus removing the self-attention mechanism. Based on the experimental results, Table 3 provides a detailed performance comparison of Diffomer and its four variants in four different reservoir runoff prediction tasks. From the four evaluation metrics, the complete Diffomer model significantly outperformed the variants in PICP and NSE (higher is better) metrics, and also showed the lowest error level in PINRW and RMSE (lower is better) metrics, verifying the comprehensiveness and robustness of the model. In contrast, variants that remove the FFT and physics-guided loss terms (i.e., w / o-FFT and w / o-Physic) show a decline in performance on most metrics, indicating that these designs are crucial for improving model accuracy and generalization ability. Furthermore, variants that remove seasonality and trend decomposition designs (i.e., w / o-Decomposition) and variants that use convolution instead of Transformer (i.e., w / o-Transformer) both show significant performance degradation, particularly on the NSE metric, further demonstrating the contribution of the self-attention mechanism and trend decomposition design in the decoder to capturing complex temporal features. In summary, the ablation experiments clearly validate the effectiveness and indispensability of each design component of Diffomer.

[0188] Furthermore, fine-grained decomposition and ablation studies were conducted to verify the effectiveness of the proposed deentanglement framework. Experiments included testing different combinations of three decomposition components: residual, season, and trend. The average RMSE results for different combinations of decomposition components are shown in Table 4. The results show that the model performance decreases regardless of which component is removed, especially under scenarios with high missing rates (70%-90%), where the performance gap is more significant. This verifies that the proposed decomposed entanglement representation plays an important role in the generation task, demonstrating that the decomposition framework can effectively break down complex information in time-series data into more tractable components, thereby improving the robustness and accuracy of the model. Moreover, the decomposition design not only significantly improves the interpretability of the model without sacrificing accuracy but also further enhances the unconditional generation capability of the diffusion model when facing runoff prediction tasks with significant frequency fluctuations.

[0189] Table 4 Fine-grained decomposition-ablation analysis of runoff prediction at site A

[0190]

[0191] Furthermore, hyperparameter sensitivity analysis was also performed:

[0192] The NSE variation trends of Difformer and seven comparative models at four reservoir sites were evaluated under different output windows h, such as... Figure 11 As shown in the figure, the NSE values ​​of all models generally decrease as the prediction window increases, indicating a weakening of prediction performance over time. This is because the extended prediction window exposes the model to more uncertainty, especially for runoff predictions on longer timescales, where model errors gradually accumulate. Further observation reveals that when... At the initial stage, the Difformer model's NSE value significantly outperformed other models. However, as the prediction window h exceeded 96h, DiffTime outperformed Difformer. This is likely because Difformer combines the advantages of data-driven and physical constraints. While this combination effectively enhances the model's interpretability and physical consistency, physical constraints may limit the model's flexibility when facing complex nonlinear relationships over long time spans. This results in Difformer performing worse than DiffTime and other generative models when the prediction window is long. This is also evident in the PC-LSTM experimental results. Conversely, DiffTime may have achieved superior performance by better adapting to complex patterns over long time scales through generative methods without relying too heavily on physical models. Overall, the Difformer model outperformed the other seven comparative models across all reservoir sites, especially under different prediction windows, where its NSE value showed a relatively stable trend, demonstrating good predictive stability and adaptability.

[0193] Furthermore, this embodiment also explores the sensitivity of other hyperparameters in the Difformer model, including batch size, embedding dimension D, diffusion / sampling time step t, number of DTLayer layers L, and guidance strength (i.e., penalty parameter). ~ The comparison results are as follows: Figure 12 As shown in Table 5. Figure 12 The NSE results for four reservoir sites are shown under different parameter configurations: batch size, embedding dimension D, diffusion / sampling time step t, and DTLayer number L. As shown in the figure, Difformer performs best when batch size = 32, D = 64, t = 1000, and L = 2. Furthermore, Table 5 records the impact of different penalty parameter values ​​on model performance. From equations (17) and (21), it can be seen that the weight of each term in the joint guidance loss function is determined by the loss term. ~ To control this, different penalty scales also affect the model's prediction performance. Research has found that when maintaining... and Unchanged (i.e.) ), and The model performs best at this time. Therefore, it is initially determined that... and ,when and The prediction performance of Difformer further improved. Therefore, this set of penalty scales can maximize the predictive advantage of the model. Note that here... The default value is large because Smaller values, larger values This can prevent the model from ignoring the effects of penalty terms in the control equations.

[0194] Table 5 Comparison of RMSE results of Difformer model for predicting inflow runoff at site B under different penalty parameters

[0195]

[0196] In addition, this embodiment also performs de-entanglement verification and synthesis analysis:

[0197] The main focus was on analyzing the reconstruction performance of the proposed model for multivariate time series. Figure 13 This paper demonstrates the reconstruction performance of Difformer on the Reservoir A dataset, visualizing the true trend and seasonal patterns as well as the learned patterns. Specifically, the model first receives damaged input samples with 50 steps of noise, and then reconstructs a signal close to the real data by decomposing the trend and seasonal errors in the time series. The reconstruction results show that the trend component follows the overall shape of the signal, while the seasonal components and errors oscillate around zero. This indicates that by decomposing and reconstructing different characteristics of the time series, Difformer can effectively recover the original data, and the reconstructed samples are very close to the real situation on the ground. This result verifies the excellent performance of the Difformer model under the disentangled architecture, enabling the generated time series to not only maintain high accuracy but also possess strong interpretability.

[0198] PCA analysis was applied to visualize the extent to which the runoff data generated by eight models—TimeVAE, Diffwave, CotGAN, DiffTime, DC-WGAN, TimeGAN, PC-LSTM, and Difformer—covered the actual data distribution, in order to explore the diversity between the runoff generated by all models and the actual inflow runoff at site A. Figure 14 shows that, compared to the state-of-the-art (SOTA) methods, the Difformer model significantly increased the overlap between the synthetic runoff generated and the original data, and its synthetic data distribution more closely resembled the original data.

[0199] It should be noted that the parts in this embodiment that are the same as or similar to those in Embodiment 1 can be referred to each other, and will not be repeated in this application.

[0200] Example 3:

[0201] Based on Example 2, Example 3 of the present invention provides a watershed runoff uncertainty forecasting system jointly driven by multi-source data and physics, including:

[0202] The acquisition module is used to acquire runoff sequence data and external forecast factor data of the target watershed;

[0203] A construction module is used to build a runoff uncertainty generation model. It uses a constrained diffusion generator to perform probabilistic diffusion on runoff sequence data to generate approximate runoff data. The runoff uncertainty generation model includes a denoising diffusion probability model layer and a DTLayer learning layer. The DTLayer learning layer includes a decoder with unentangled time representation. The decoder consists of a Transformer block, an FFN, and a decomposition block.

[0204] The design module is used to design the joint loss function to update the weights and biases of the runoff uncertainty generation model;

[0205] The training module is used to train the loss convergence under joint guidance and output the runoff prediction results.

[0206] It should be noted that the system provided in this embodiment is the system corresponding to the method provided in embodiment 2. Therefore, the parts in this embodiment that are the same as or similar to those in embodiment 2 can be referred to each other, and will not be described again in this application.

Claims

1. A method for predicting watershed runoff uncertainty driven by multi-source data and physics, characterized in that, include: Step 1: Obtain runoff sequence data and external forecast factor data for the target watershed; Step 2: Construct a runoff uncertainty generation model. A constrained diffusion generator performs probabilistic diffusion on the runoff sequence data to generate approximate runoff data. The runoff uncertainty generation model includes a denoising diffusion probability model layer and a DTLayer learning layer. The DTLayer learning layer includes a decoder with a de-entangled time representation, which consists of a Transformer block, an FFN, and a decomposition block. For learning the stacked L-layer DTLayer, the residual term R needs to be passed layer by layer, while the trend term V and periodic term S are added layer by layer. The trend term V and periodic term S of all DTLayer layers are added together, and then added to the residual term R passed to the L-layer to obtain the output data. Step 3: Design a joint loss function to update the weights and biases of the runoff uncertainty generation model; in Step 3, the joint loss function includes a data-driven loss term and a physics-guided loss term; in Step 3, a reweighting strategy is used to design the data-driven loss function; the physics-guided loss term includes PDE loss, boundary loss, and initial condition loss; domain knowledge is embedded as a hard constraint into the runoff uncertainty generation model, and equation discretization, matrix decomposition, and HCP operations are performed; Step 4: Train the loss convergence under joint guidance and output the runoff prediction results.

2. The watershed runoff uncertainty forecasting method driven by multi-source data and physics as described in claim 1, characterized in that, Step 2 includes: Step 2.1: Project the original input onto deep features through a data embedding layer; the original input includes runoff sequence data and external forecast factor data; Step 2.2: Process the depth features L The DTLayer learning layer is used to obtain trend components, seasonal components, and residual components. Step 2.3: Apply different forms of constraints to the trend component, seasonal component and residual component to achieve deentanglement and obtain approximate samples predicted by the runoff uncertainty generation model.

3. A watershed runoff uncertainty forecasting system driven by multi-source data and physics, characterized in that, For performing the method according to any one of claims 1 to 2, comprising: The acquisition module is used to acquire runoff sequence data and external forecast factor data of the target watershed; A construction module is used to build a runoff uncertainty generation model. It uses a constrained diffusion generator to perform probabilistic diffusion on runoff sequence data to generate approximate runoff data. The runoff uncertainty generation model includes a denoising diffusion probability model layer and a DTLayer learning layer. The DTLayer learning layer includes a decoder with unentangled time representation. The decoder consists of a Transformer block, an FFN, and a decomposition block. The design module is used to design the joint loss function to update the weights and biases of the runoff uncertainty generation model; The training module is used to train the loss convergence under joint guidance and output the runoff prediction results.

4. A computer storage medium, characterized in that, The computer storage medium stores a computer program; when the computer program is run on the computer, it causes the computer to perform the method described in any one of claims 1 to 2.

5. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Multi-source information integration runoff prediction method based on informer model

    CN119623694A