Multi-source data and physics combined driven drainage basin runoff uncertainty forecasting method

By constructing the Difformer model and combining multi-source data with physical constraints, the uncertainty problem of existing runoff prediction technology under extreme weather and data sparsity is solved, and runoff prediction with higher accuracy and consistency is achieved.

CN120596859AActive Publication Date: 2025-09-05ZHEJIANG UNIV CITY COLLEGE

Patent Information

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

AI Technical Summary

Technical Problem

Existing runoff prediction technology is difficult to accurately reflect the complex nonlinear processes of the basin when faced with extreme weather and data sparsity, and there is uncertainty and parameter sensitivity, resulting in low prediction 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 denoising diffusion probability model and DTLayer learning layer, combined with data-driven loss and physical guidance loss, probability diffusion and disentanglement are performed to generate approximate runoff data.

Benefits of technology

It significantly improves the accuracy and physical consistency of runoff prediction, can effectively quantify uncertainty, overcome the influence of data sparsity and uncertainty of observation information, and improves the performance and credibility of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120596859A_ABST
    Figure CN120596859A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-source data and physics combined driven drainage basin runoff uncertainty forecasting method. The method comprises the following steps: acquiring runoff sequence data and external forecasting factor data of a target drainage basin; constructing a runoff uncertainty generation model, performing probability diffusion on the runoff sequence data through a diffusion generator with constraints, and generating approximate runoff data; designing a joint loss function to update the weight and offset terms of the runoff uncertainty generation model; training loss convergence under joint guidance, and outputting a runoff prediction result. The method has the beneficial effects that a loss function based on Fourier transform and a physical theory guide item are combined, the randomness in a runoff physical system can be effectively quantified through introduction of physical constraints, more selectable predicted values can be provided while the physical consistency of prediction results can be ensured, and the prediction accuracy of the runoff physical system is improved. The inherent random uncertainty in the physical drought and flood process is effectively quantified, so that the physical consistency and prediction precision of the model are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of runoff prediction, and in particular relates to a basin runoff uncertainty prediction method driven jointly by multi-source data and physics. Background Art

[0002] Runoff forecasting is a technique that quantitatively predicts the flow rate at a specific future timeframe at a watershed outlet by analyzing hydrological and meteorological factors such as precipitation, evaporation, and topography. The accuracy of runoff forecasts directly impacts the safe operation of water conservancy projects.

[0003] Currently, traditional runoff prediction techniques rely primarily on two types of methods. One type is based on empirical models, such as linear regression, 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 within a watershed. They also perform poorly in the face of extreme weather conditions or when data is missing. The other type is based on physical mechanisms, such as distributed hydrological models (e.g., SWAT, TOPMODEL, and VIC). These methods simulate the rainfall-runoff-confluence process, taking into account factors such as topography, soil, and vegetation, and thus better reflect the physical characteristics of hydrological processes. However, these methods are often sensitive to parameters, rely on high-precision geographic and meteorological data, are complex to calibrate, and suffer from significant uncertainty in practical applications.

[0004] In recent years, hybrid models combining data-driven 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 remain limited to single-step prediction or fixed-structure modeling, struggling to simultaneously integrate multi-source data, model long time series, and quantify uncertainty, leaving room for improvement. Furthermore, existing runoff prediction techniques are often constrained by data sparsity and observational uncertainty, resulting in low runoff prediction accuracy. Summary of the Invention

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

[0006] First, a basin runoff uncertainty forecasting method driven by multi-source data and physics is provided, including:

[0007] Step 1: Obtain the runoff series data and external prediction factor data of the target watershed;

[0008] Step 2: Construct a runoff uncertainty generation model (Difformer), which performs probability diffusion on the runoff sequence data through a constrained diffusion generator to generate approximate runoff data. The runoff uncertainty generation model includes a denoising diffusion probability model (DDPM) layer and a DTLayer learning layer. The DTLayer learning layer includes a decoder with a disentangled temporal representation. The decoder consists of a Transformer block, a FFN, and a decomposition block.

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

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

[0011] Preferably, step 2 comprises:

[0012] Step 2.1, projecting the original input into deep features through the data embedding layer; the original input includes runoff series data and external predictor data;

[0013] Step 2.2, the deep features are passed through the DTLayer learning layer of the L 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 disentanglement and obtain an approximate sample of the runoff uncertainty generation model prediction.

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

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

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

[0018] In a second aspect, a basin runoff uncertainty prediction system driven by multi-source data and physics is provided, which is used to execute any of the methods described in the first aspect, including:

[0019] An acquisition module is used to obtain the runoff series data and external prediction factor data of the target watershed;

[0020] A construction module is used to construct a runoff uncertainty generation model, which performs probability diffusion on runoff sequence data through a constrained diffusion generator to generate approximate runoff data; the runoff uncertainty generation model includes a denoising diffusion probability model layer and a DTLayer learning layer, and the DTLayer learning layer includes a decoder with a disentangled temporal representation, and the decoder is composed of a Transformer block, FFN, and a decomposition block;

[0021] A design module for designing a joint loss function to update the weights and bias terms 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] According to a third aspect, a computer storage medium is provided, wherein a computer program is stored in the computer storage medium; when the computer program is executed on a computer, the computer executes any one of the methods described in the first aspect.

[0024] In a fourth aspect, an electronic device is provided, including:

[0025] Memory, used to store computer programs;

[0026] A processor is used to execute the computer program to implement any method as described in the first aspect.

[0027] The beneficial effects of the present invention are:

[0028] 1. This paper provides a runoff uncertainty generation model based on a denoising 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 denoising diffusion probability model, but also combines a joint loss function design with a Transformer-based deep decomposition architecture to balance multi-source data fusion, long-term time series modeling, and uncertainty quantification, thereby significantly improving model performance.

[0029] 2. The present invention combines a Fourier transform-based loss function with physical theory guidance. 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 random uncertainty inherent in the physical drought and flood process, overcomes the constraints of existing technologies such as data sparsity and uncertainty in observation information, and thus enhances the physical consistency and prediction accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1The overall framework diagram of Difformer for runoff uncertainty forecasting provided by the present invention; Figure 2 A detailed expansion diagram of the Difformer model structure provided by the present invention;

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

[0032] Figure 4 Schematic diagram of the interval forecast results of all the comparison models provided by the present invention at the reservoir at site A; wherein (a) is the interval forecast result of the TimeVAE model at the reservoir at site A, (b) is the interval forecast result of the Diffwave model at the reservoir at site A, (c) is the interval forecast result of the CotGAN model at the reservoir at site A, (d) is the interval forecast result of the DiffTime model at the reservoir at site A, (e) is the interval forecast result of the STALSTM model at the reservoir at site A, (f) is the interval forecast result of the DC-WGAN model at the reservoir at site A, (g) is the interval forecast result of the TimeGAN model at the reservoir at site A, (h) is the interval forecast result of the PC-LSTM model at the reservoir at site A, and (i) is the interval forecast result of the Difformer model at the reservoir at site A;

[0033] Figure 5 Schematic diagram of the interval forecast results of all the comparison models provided by the present invention at the site B reservoir; wherein (a) is the interval forecast result of the TimeVAE model at the site B reservoir, (b) is the interval forecast result of the Diffwave model at the site B reservoir, (c) is the interval forecast result of the CotGAN model at the site B reservoir, (d) is the interval forecast result of the DiffTime model at the site B reservoir, (e) is the interval forecast result of the STALSTM model at the site B reservoir, (f) is the interval forecast result of the DC-WGAN model at the site B reservoir, (g) is the interval forecast result of the TimeGAN model at the site B reservoir, (h) is the interval forecast result of the PC-LSTM model at the site B reservoir, and (i) is the interval forecast result of the Difformer model at the site B reservoir;

[0034] Figure 6Schematic diagram of the interval forecast results of all the comparison models provided by the present invention at the site C reservoir; wherein (a) is the interval forecast result of the TimeVAE model at the site C reservoir, (b) is the interval forecast result of the Diffwave model at the site C reservoir, (c) is the interval forecast result of the CotGAN model at the site C reservoir, (d) is the interval forecast result of the DiffTime model at the site C reservoir, (e) is the interval forecast result of the STALSTM model at the site C reservoir, (f) is the interval forecast result of the DC-WGAN model at the site C reservoir, (g) is the interval forecast result of the TimeGAN model at the site C reservoir, (h) is the interval forecast result of the PC-LSTM model at the site C reservoir, and (i) is the interval forecast result of the Difformer model at the site C reservoir;

[0035] Figure 7 Schematic diagram of the interval forecast results of all the comparison models provided by the present invention at the site D reservoir; wherein (a) is the interval forecast result of the TimeVAE model at the site D reservoir, (b) is the interval forecast result of the Diffwave model at the site D reservoir, (c) is the interval forecast result of the CotGAN model at the site D reservoir, (d) is the interval forecast result of the DiffTime model at the site D reservoir, (e) is the interval forecast result of the STALSTM model at the site D reservoir, (f) is the interval forecast result of the DC-WGAN model at the site D reservoir, (g) is the interval forecast result of the TimeGAN model at the site D reservoir, (h) is the interval forecast result of the PC-LSTM model at the site D reservoir, and (i) is the interval forecast result of the Difformer model at the site D reservoir;

[0036] Figure 8 Schematic diagram of the loss trend of Difformer and PC-LSTM in the first 500 periods provided by the present invention; (a) is the comprehensive loss comparison, Figure 8 Middle (b) is the comparison of PDE loss;

[0037] Figure 9a Comparison results of NSE values ​​of runoff inflow at four stations predicted by all models under 5% noise level; Figure 9b Comparison results of NSE values ​​of runoff inflow at four stations predicted by all models under 10% noise level; Figure 9c Comparison results of NSE values ​​of runoff inflow at four stations predicted by all models under 15% noise level; Figure 9d Comparison results of NSE values ​​of runoff inflow at four stations predicted by all models under 20% noise level;

[0038] Figure 10Schematic diagram showing the comparison of the average PICP value results of all models provided by the present invention under the inflow runoff anomaly values ​​of Site A and Site C with different outlier levels; wherein (a) is the average PICP value result of all models under the inflow runoff anomaly values ​​of Site A with different outlier levels, and (b) is the average PICP value result of all models under the inflow runoff anomaly values ​​of Site C with different outlier levels;

[0039] Figure 11 Schematic diagram of the impact of the forecast window length on the performance of runoff forecasting at four sites for all models provided by the present invention; (a) is the impact of the forecast window length on the performance of runoff forecasting at site A for all models, (b) is the impact of the forecast window length on the performance of runoff forecasting at site B for all models, (c) is the impact of the forecast window length on the performance of runoff forecasting at site C for all models, and (d) is the impact of the forecast window length on the performance of runoff forecasting at site D for all models;

[0040] Figure 12 Schematic diagram of the predictive ability of the other four hyperparameters in the Difformer model provided by the present invention under different settings; (a) is a schematic diagram of the predictive ability of the Difformer model under different settings of the batch size, (b) is a schematic diagram of the predictive ability of the Difformer model under different settings of the embedding dimension, (c) is a schematic diagram of the predictive ability of the Difformer model under different settings of the sampling time step, and (d) is a schematic diagram of the predictive ability of the Difformer model under different settings of the number of DTLayer layers;

[0041] Figure 13 The present invention provides a schematic diagram of visualizing the performance of the Difformer reconstruction with a decomposed configuration, taking site A as an example;

[0042] Figure 14 The PCA diagram of the water level at site A with a prediction interval of h = 72h, synthesized by TimeVAE, Diffwave, CotGAN, DiffTime, DC-WGAN, TimeGAN, PC-LSTM, and Difformer, provided by the present invention. DETAILED DESCRIPTION

[0043] The present invention will be further described below with reference to the following examples. The following examples are provided only to facilitate understanding of the present invention. It should be noted that, without departing from the principles of the present invention, it is possible for a person skilled in the art to make various modifications to the present invention, and such improvements and modifications fall within the scope of the claims of the present invention.

[0044] Example 1:

[0045] As we all know, due to the influence of extreme weather and human activities, runoff time series often show complex patterns in real-world scenarios. In order to improve the accuracy of basin runoff prediction, this paper provides a basin runoff uncertainty prediction method driven by multi-source data and physics:

[0046] Given A runoff sequence with time steps and external predictors (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. Considering the necessity of physical constraints, a constrained diffusion generator is used. N runoff series datasets Perform probability diffusion and randomly generate approximate runoff data , which is designed to transform the Gaussian vector The quantity is mapped into a signal that is most similar to the signal in the runoff series dataset DATA, where T is the total diffusion step. In the method of the present invention, the following runoff time series model with trend and multiple seasonality is mainly considered.

[0047] (1)

[0048] Among them, x j represents the runoff sequence observed at time j, ζ j represents the trend component at time j, s i,j represents the i-th seasonal component at that moment, r j represents the noise and outliers at time j.

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

[0050] Specifically, the basin runoff uncertainty prediction method driven by multi-source data and physics includes the following steps:

[0051] Step 1: Obtain the runoff series data and external prediction factor data of the target basin.

[0052] For example, we collect hydrological and meteorological multi-source data from N stations in the target basin and obtain A runoff sequence with time steps and external predictors (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.

[0053] Step 2: Construct a runoff uncertainty generation model, perform probability diffusion on the runoff sequence data through a constrained diffusion generator 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 disentangled time representation, and the decoder consists of a Transformer block, FFN and a decomposition block.

[0054] For example, a constrained diffusion generator is used N runoff series datasets Perform probability diffusion and randomly generate approximate runoff data .

[0055] Specifically, step 2 includes:

[0056] Step 2.1: Project the original input to deep features through the data embedding layer; the original input includes runoff series data and external predictor data.

[0057] For example, for the original runoff data and external predictors , first through the data embedding layer Projecting the original input to deep features and In [1], d is the projection depth. The data embedding layer encodes the raw input (i.e., runoff data and external predictor data) into high-dimensional deep features. This embedding layer primarily handles the initial representation learning of the input data and serves as the front-end encoding structure of the entire model.

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

[0059] For example, and The features are passed through the DTLayer learning layer of the L layer to obtain the seasonal component , trend component and the residual component .

[0060] Step 2.3: Apply different forms of constraints to the trend component, seasonal component, and residual component to achieve disentanglement and obtain an approximate sample of the runoff uncertainty generation model prediction.

[0061] For example, by analyzing different components (i.e., trend components , seasonal components and the residual component ) impose different forms of constraints to achieve disentanglement and obtain approximate samples predicted by Difformer .

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

[0063] Specifically, according to the prediction sample Generate data-driven loss term and the physical guidance loss term MSE PDE 、MSE BC 、MSE IC Finally, the loss function L driven jointly by data and physics is obtained to update the weights and bias terms of Difformer.

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

[0065] Example 2:

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

[0067] Step 1: Obtain the runoff series data and external prediction factor data of the target basin.

[0068] Step 2: Construct a runoff uncertainty generation model, perform probability diffusion on the runoff sequence data through a constrained diffusion generator 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 disentangled time representation, and the decoder consists of a Transformer block, FFN and a decomposition block.

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

[0070] (2)

[0071] (3)

[0072] In this case, from the data distribution The samples go through the forward diffusion process Gradually noisy to a standard Gaussian noise , where the conversion is done by Parameterized, and the variance β t ∈[0,1] is the amount of noise added with the diffusion step size t, which can be learned by reparameterization or kept constant as a hyperparameter.

[0073] Note that the diffusion process allows closed-form sampling at any time step t. ,Right now ,in and .

[0074] Then, the reverse transformation is performed based on the DTLayer layer, that is, .because Can be used as input, so choose Parameterize, that is, by selecting Gaussian noise in The sample Stepwise denoising to obtain estimated samples , the specific calculation process is as follows:

[0075] (4)

[0076] in, represents a learnable log density gradient, is a hyperparameter, is standard Gaussian noise.

[0077] In addition, in order to better describe the high-dimensional and complex mapping relationship between runoff under extreme events, additional information c (such as weather forecasts, historical water levels, soil moisture and other uncertainty sources) is considered in the conditional space of the backward process, that is, 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 the accuracy of the prediction, but also provides a reasonable estimate of the uncertainty range.

[0078] In addition, 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 in Figure 2, the model is able to capture global correlation and runoff time series patterns. Unlike Diffusion-TS, the DTLayer layer in Diffomer only uses a decoder, and each decoder consists of a Transformer block, FFN, and a decomposition block (i.e., trend and seasonal decomposition, denoted as DecompBlock). Specifically, for the original runoff data and external predictors , first through the embedding layer Projecting the original input to deep features and In the example, d is the projection depth. Then, for the lth layer DTLayer, the process can be formalized as follows:

[0079] (5)

[0080] (6)

[0081] (7)

[0082] (8)

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

[0084] (1) Transformer

[0085] The Transformer block includes a diffusion embedding layer, a self-attention layer, and a cross-attention layer, such as Figure 2 shown. Figure 2In the Transformer Decoder, the three layer normalizations (LayerNormalization) that appear are used to improve the stability of the model and accelerate the convergence speed. This application explains the location, function and necessity of these three normalizations one by one: The first layer normalization is used to perform self-attention calculations on the target sequence. Layer normalization ensures the stability of the current time step prediction and alleviates the gradient disappearance / explosion. The second layer normalization is used to perform cross-attention calculations on the target sequence. Layer normalization ensures the numerical stability of the fusion process and helps learn cross-sequence dependencies. The third layer normalization is applied after the entire decoder output. This design is more friendly to the training of deep networks.

[0086] In addition, the DTLayer layer is the core of the proposed Difformer model, a deep decomposition architecture. This layer contains the Transformer decoder, FFN, and decomposition modules, and performs sequence generation learning by stacking L layers of DTLayer layers. The decomposition module extracts the trend term V and the period term S respectively through polynomial regression and fast Fourier decomposition, and then obtains the residual term R according to the data characteristics of the time series data. For learning with stacked L layers of DTLayer, the residual term R needs to be passed layer by layer, and the trend term V and the period term S are added layer by layer. Finally, the residual term R, trend term V, and period term S are added to obtain the predicted data. Therefore, Figure 2 The large rectangle in the figure below represents a DTLayer layer, which is stacked with L layers. The color of the rectangle becomes lighter as you go down the layer to distinguish them. The residual term R in the lower right corner is represented by a dotted line and is 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.

[0087] For the diffusion embedding method, sinusoidal position embedding is used to encode the diffusion step, thereby guiding the model to perceive the temporal position information at different diffusion stages. Then, the diffusion step t is injected into the network using the adaptive layer normalization operator (AdaLN), which is expressed as ,in is the intermediate activation parameter, a t and b t It is obtained by linear projection of the diffusion embedding layer. In addition, the self-attention and cross-attention learning process is as follows:

[0088] (9)

[0089] (10)

[0090] in, and Representation learning after self-attention and cross-attention mechanisms respectively; and Represent layer normalization and multi-head attention operations respectively.

[0091] (2) Trend synthesis

[0092] The trend component describes the smoothed underlying mean of the data and is intended to simulate the actual slowly changing behavior of runoff. To generate a reasonable trend component, a polynomial regressor is used to regress the trend Modeling, the formula is as follows:

[0093] (11)

[0094] Where, is the input trend quantity of DecompBlock, , get; represents the average value of the output of the lth DTLayer block; “·” is tensor multiplication. Here, the slowly varying polynomial space P is a vector The power matrix of Indicates a small degree (e.g. ) to simulate low-frequency behavior.

[0095] (3) Seasonal synthesis

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

[0097] (12)

[0098] (13)

[0099] (14)

[0100] in, , Represents discrete Fourier operations The phase and amplitude of the kth frequency after . Indicates the Top K amplitudes, where K is a hyperparameter. k represents the Fourier frequency corresponding to index k; Represents the corresponding conjugate ; is a constant, usually representing a scaling factor or rate parameter, used to adjust the frequency or phase of the cosine function.

[0101] In addition, by analyzing the different components (i.e. trend ,season and residuals ) imposes different forms of constraints to achieve disentanglement, introduces different inductive biases into these components, and makes it easier for them to learn specific semantic knowledge. The specific formula is as follows:

[0102] (15)

[0103] in, is the output of the last layer DTLayer, which can be regarded as the sum of residual periodicity and other noise. L is the number of layers of DTLayer. Then, according to the approximate sample predicted by Difformer ,like Figure 1 The reverse process shown can be expressed as follows:

[0104] (16)

[0105] in, .

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

[0107] In step 3, in order to effectively quantify the inherent physical properties of the runoff series, a guidance framework jointly driven by data and physical knowledge is adopted. This framework is mainly based on first principles and empirical models, transforming the hydrodynamic control equation into a penalty term that reflects the prior loss formed by the physical theory of runoff forecasting. At the same time, the data-driven loss term is combined to optimize the loss training of the entire model. This framework is as follows Figure 1 As shown in (b), the physical governing equations for runoff are converted into constraint penalties, providing physical guidance for the introduction of the proposed Difformer model. This relaxes the limits of the final constraint projection and quantifies the output error caused by uncertainties in the complex modeling process. These penalties essentially reflect prior information formed by domain knowledge and aim to represent pre-acquired data understanding. The specific design process of these two losses is described below.

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

[0109] Data-driven loss term It is used to measure the error between the generated samples and the real data (such as observed runoff data). Fons et al. showed that the Fourier-based loss term is conducive to the accurate reconstruction of time series signals. The following reweighting strategy is used to design the data-driven loss function, which is formally expressed as follows:

[0110] (17)

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

[0112] (2) Physical constraints in simulated runoff

[0113] For any generated runoff data, the corresponding hydrodynamic equation must be satisfied. In practice, this equation often appears in the form of partial differential equations (PDEs), which can serve as domain knowledge to guide Difformer predictions. Therefore, considering the PDE loss , boundary loss and initial condition loss , construct a loss function L that complies with the hydrodynamic constraints to measure the deviation of the model generation results from these physical laws. 、 and is defined as follows:

[0114] (18)

[0115] (19)

[0116] (20)

[0117] Where S f is the combination coefficient between the variables of the river network equation; t is the current time; N f 、N BC 、N IC represent the number of coordination points, the number of boundaries, and the number of initial points respectively; Q is the runoff, Q BC , Q IC and are boundary conditions, initial conditions and predicted runoff respectively; V α and V β It is the weight coefficient of different physical knowledge, which is used to adjust the knowledge in the control equation.

[0118] Using runoff physics theory to guide the loss, we obtain the loss function L driven jointly by data and physics, which is expressed as follows:

[0119] (twenty one)

[0120] in, 、 and is the penalty parameter, which is used to control the weight of each term in the total loss function.

[0121] Existing techniques assume that regularization in loss functions only ensures that predictions do not severely violate constraints on average. However, hard constraint projection (HCP) is often more desirable in optimization because it ensures that the given governing equations are strictly satisfied within a specific region (also known as a constraint patch). Combining this design approach with the characteristics of runoff prediction, domain knowledge is embedded as hard constraints within the Difformer, performing equation discretization, matrix factorization, and HCP operations.

[0122] 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). Simultaneously, the concept of a constraint patch is introduced to impose physics on the local region. The coordinates of each point in the constraint patch are shown in Equation (23).

[0123] (twenty two)

[0124] (twenty three)

[0125] Where x, y, and t represent the coordinates of a configuration point (in bold) in space and time, respectively; 、 、 represents the difference interval in the x, y, and t directions; CP represents the coordinates of the constraint patch around the configuration point x, y, and t. The constraint matrix A is obtained by matrix decomposition of Equation (22). The constraint matrix is ​​essentially a hyperplane constrained by discrete equations in the variable space, reflecting the constraint relationship determined by the physical changes at different locations in the constraint block.

[0126] HCP: Figure 1 As shown in (b), the runoff constraint control equation can be used to obtain a new predicted runoff Q that is more in line with 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.

[0127] Intuitive understanding of the physics-based framework for runoff prediction: Visualizing the optimization as a downhill process, e.g. Figure 3 As shown, the gradient differentiation process represents the gradient descent space; the X-axis and Z-axis represent the possible directions of the next gradient in each differentiation process, and the Y-axis represents the time step where the differentiation occurs.

[0128] Figure 3 In the figure, 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 the optimization; and the light blue surface (i.e., the river) represents the constrained hyperplane with random runoff characteristics. Traditional data-driven methods assume that the direction of fastest gradient descent at each location is the optimization direction and iterate along the brown dashed line, easily converging to a local optimum. Soft-constraint methods differ. Throughout the optimization process, they model the deviation between the prediction and the observation (i.e., wave height) and the deviation from the constraint (i.e., distance from the river), and combine this with the loss to optimize along the green dashed line. However, soft-constraint methods cannot ensure that the results of each optimization iteration meet the threshold space of the physical constraints. Therefore, this study introduces a hard-constraint model with random characteristics. By projecting each step onto the constrained hyperplane (i.e., the light blue surface), the loss is measured during the optimization process to ensure that each prediction adheres to the physical constraints (i.e., each blue dot conforms to the regularity of the runoff characteristics). In summary, consistency between model predictions and physical mechanisms helps improve model reliability and credibility. The Difformer process under the joint guidance of data and physics can be summarized as Algorithm 1.

[0129] Algorithm 1 is as follows:

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

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

[0132] Runoff prediction: Difformer model prediction to obtain the predicted runoff matrix ;

[0133] Equation discretization and decomposition: Discretize the control equation (Equation (22)) to obtain the constraint matrix A;

[0134] Projection matrix generation: through Generate projection matrix E;

[0135] Data sampling: Randomly sample 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 the coordinates of the initial condition point (x l , y l , t l );

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

[0137] repeat:

[0138] 1. Data-driven loss: for i = 1, …, N obs

[0139] (1) According to Generate a new runoff projection matrix that complies with physical constraints ;

[0140] (2) Calculate the observed value Q and the predicted value through formula (17) Data loss ;

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

[0142] (1) Generate configuration point matrix ;

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

[0144] (3) Calculate the control equation loss MSE through formula (18) PDE ;

[0145] 3. Boundary loss: for k = 1,…, N BC

[0146] (1) Generate boundary point matrix ;

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

[0148] (3) Calculate the boundary loss MSE through formula (19) BC ;

[0149] 4. Initial loss: for l = 1,…,N IC

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

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

[0152] (3) Calculate the initial condition loss MSE by formula (20) IC ;

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

[0154] 6. Iterative update: Update the weights and biases of the Difformer according to the joint loss term;

[0155] The cycle ends until the loss under the joint guidance of training converges.

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

[0157] In addition, the present invention also verifies the effectiveness of the method provided by the present invention through experiments. The implementation details of the experiments are as follows:

[0158] (1) Study area and data: This experiment takes four reservoir sites (site A, site B, site C and site D reservoirs) in basin a as the research objects. The experimental data covers the hourly observation results under the extreme drought event from July 1, 2021 to October 30, 2022, including precipitation, evaporation, and reservoir runoff data, totaling 11,688 moments. The input of the study is the hourly precipitation, evaporation and runoff data (including current data) of a single site from 1 to 4 days before (i.e. = 96 h), and the output is the hourly runoff data of a single site from 1 to 3 days after (i.e. h = 72 h). The runoff in basin a is mainly converted from precipitation, and most rivers rely on rainwater for recharge. Therefore, precipitation is the main driving factor for runoff formation. The formation and change of runoff are greatly affected by the basic characteristics of the basin. Specifically, it 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 outlet of the basin. It is a highly complex hydrological process.

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

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

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

[0162] Furthermore, this paper describes multiple unbiased estimation comparison experiments using comparison models on a runoff dataset from Basin A to validate the superiority of the proposed Difformer model. The experimental results are shown in Table 1. The data in the table show that Difformer demonstrates significant advantages in interval prediction performance metrics (PICP and PINRW) and prediction accuracy metrics (RMSE, MAE, CORR, and NSE) at each reservoir site. Specifically, at Site A, Difformer's PICP reached 0.876 (±0.012), a significant improvement over the other models. PINRW dropped to 0.167 (±0.131), indicating a narrower interval width and higher reliability. Furthermore, Difformer's RMSE and MAE were 0.307 and 0.210, respectively, significantly lower than those of the other models. CORR and NSE reached 0.908 and 0.892, respectively, reflecting Difformer's superior fitting accuracy and stability. At the other three reservoirs, Difformer also outperformed the other baseline models in most cases. Taking site B as an example, Difformer's PICP, PINRW, RMSE, MAE, CORR, and NSE are respectively 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) compared to the second-best baseline model. This shows that Difformer better captures the temporal characteristics of runoff than the baseline model and makes it conform to physical laws.

[0163] Further observation reveals that the performance metrics of PC-LSTM and Difformer, guided by both data and physics, significantly improve compared to other models (except DiffTime). The inclusion of physical constraints has a positive impact on model predictions. This improvement may stem from two core advantages of the physics-based framework: first, it effectively integrates domain knowledge and prior information into the deep learning model, improving prediction accuracy by restricting the model's search space; second, it constrains physically unreasonable predictions, thereby enhancing the model's generalization and stability. Difformer's superior performance to PC-LSTM stems primarily from its stronger modeling capabilities and complex architectural design. Using a conditional diffusion model, Difformer predicts across multiple timescales, capturing long-term runoff trends while 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 inherent physical laws of runoff. In contrast, while PC-LSTM incorporates physical constraints, its model structure primarily relies on traditional LSTM networks. This network has limited ability to model complex nonlinear dynamics, making it difficult to fully capture the subtle changes and multi-scale characteristics of runoff sequences. Furthermore, the physical constraints of PC-LSTM are primarily implemented through simple joint predictions, failing to deeply explore the interaction between physical constraints and data-driven models, resulting in slightly inferior performance to Difformer. DiffTime, another diffusion model, supports the generation of trends and fixed values ​​by introducing a conditional diffusion process. These conditional constraints are typically imposed by the underlying physical processes of runoff generation, allowing the data generated by DiffTime to be highly consistent with the real data in terms of distribution. However, compared to Difformer, DiffTime may have a more limited ability to express physical constraints, and its ability to capture nonlinear dynamics in highly complex scenarios is slightly insufficient.

[0164] Table 1 Comparison of runoff prediction results of all models at four stations in a basin under different performance indicators

[0165]

[0166] The prediction results in Table 1 are expressed as ave(±std). In Table 1, TimeVAE is a temporal variational autoencoder, DiffWave is a diffusion waveform model, CotGAN is a collaboratively 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.

[0167] The evaluation indicators in Table 1 are as follows: PICP: Prediction interval coverage, used to measure the probability that the prediction interval contains the true value; PINRW: Normalized prediction interval width, used to evaluate the width of the prediction interval relative to the size of the observed value; RMSE: Root mean square error, used to measure the difference between the predicted value and the true value, which is a commonly used indicator of prediction accuracy; MAE: Mean absolute error, which represents the average of the absolute errors between the predicted value and the true value, used to evaluate the accuracy of the prediction; CORR: Correlation coefficient, used to measure the linear correlation between the predicted value and the true value. The closer the value is to 1 or -1, the stronger the correlation; NSE: Nash-Stewcliffe efficiency coefficient, used to evaluate the goodness of fit of the model. The closer the value is to 1, the better the model fit.

[0168] also, Figures 4 to 7 The runoff prediction results and prediction intervals for all models are visualized and compared. It can be seen that PC-LSTM, Difformer, and DiffTime are able to more accurately capture the trends and fluctuations of the runoff series, especially at extreme points and within intervals with large fluctuations. Difformer performs best, based on its conditional diffusion and decomposition modeling mechanisms, making its predictions more consistent with physical laws and more consistent with real data. DiffTime and PC-LSTM follow closely behind, but are slightly less accurate than Difformer at extreme points. In contrast, baseline models without physical constraints (particularly STALSTM) have weaker fitting capabilities at extreme points and within fluctuation intervals, and the interval distribution of their predictions also deviates significantly from the true values, further validating the important role of physical constraints and diffusion mechanisms in improving runoff prediction performance.

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

[0170] In addition, to verify the effectiveness and coupling reliability of Difformer, the physical guidance model PC-LSTM and Difformer were trained using the inflow runoff dataset of Station A in the Feiyun River Basin, and the decline trends of different losses of the two in the first 500 periods were compared. As shown in Figure 8, Figure 8 (a) shows the comprehensive loss comparison. Figure 8 Figure (b) shows a comparison of PDE loss, which reflects the deviation between the runoff prediction and the governing equation. As can be seen from the figure, both the comprehensive loss and PDE loss of Difformer converge faster than those of PC-LSTM and reach lower final values. This demonstrates that Difformer is more reliable in capturing the coupling relationship between runoff and physical mechanisms, validating the guidance and effectiveness of the proposed physical constraint method in runoff uncertainty prediction. It is important to note that the theoretically guided HCP often makes small adjustments before and after each projection step. Therefore, within a single iteration or time step, these minor adjustments do not significantly change or impact the final prediction results.

[0171] Furthermore, to verify the robustness of Difformer in the runoff time series forecasting task, a comparative analysis was conducted under different weather conditions, noise levels, and outliers. The eight generative models that performed well in the previous study were selected for validation. The experimental results are shown in Table 2.

[0172] Table 2. Comprehensive performance comparison of all models for runoff prediction at site A under different weather conditions

[0173]

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

[0175] Based on actual rainfall, the runoff dataset for reservoir site A was divided into 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 well across multiple metrics, significantly outperforming the baseline model under mid-flood and flood season conditions. This further demonstrates its high accuracy and robustness in complex scenarios and its predictive advantages in handling extreme hydrological conditions. In contrast, DiffTime performed second only to Difformer, thanks to its powerful modeling capabilities. While the similarly physics-driven PC-LSTM performed well in some metrics, its overall performance fell short of Difformer and DiffTime, particularly in error metrics such as RMSE and MAE. This is primarily due to the drastic fluctuations in hydrological processes, which can easily lead to vanishing or exploding gradients in traditional recurrent structures such as LSTM, resulting in reduced prediction accuracy. Furthermore, hydrological data often suffers from measurement errors and environmental noise. While other generative models (such as DC-WGAN and TimeGAN) can model data distributions through adversarial mechanisms, their robustness to noise is relatively weak, which can easily lead to increased RMSE and MAE error metrics and decreased CORR and NSE metrics. Overall, the Difformer model, through its advanced architectural design, effectively captures the spatiotemporal dependencies and uncertainties in runoff forecasting, demonstrating high prediction accuracy and stability across all seasons, particularly during flood season, where it exhibits significant performance advantages.

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

[0177] The prediction performance of the model under different noise levels is as follows Figure 9a-9d As shown in the figure, under different noise levels (5%, 10%, 15%, 20%), Difformer's NSE value performance is always better than most of the comparison models, especially under low noise conditions. As the noise level increases, although the overall performance decreases slightly, its advantage remains obvious. The reason for this stable performance may be the physical constraint framework introduced by Difformer. By projecting the prediction matrix onto a hyperplane that satisfies the runoff law, it effectively avoids the negative impact of noise and outliers and ensures the consistency of the prediction results with the physical constraints. On the other hand, the decomposition-based architecture design also provides an effective guarantee for the prediction accuracy of the model.

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

[0179] Figure 10The average PICP interval prediction quality of the model's runoff inflow series at Site A and Site C was compared under different outlier levels (1%, 2%, 3%, 4%, and 5%). Compared to the baseline model, Difformer demonstrated superior interval prediction metrics. This superior performance is primarily attributed to the proposed data-physics-inspired framework, which constructs a hyperplane consistent with the actual runoff physics and projects the runoff prediction matrix onto this hyperplane, ensuring that the prediction results meet physical constraints. By introducing a reasonable constraint threshold space, the stochastic nature of runoff physics is effectively quantified, ensuring that the output results are physically interpretable within a range of selectable prediction values. 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. This error-adjusted mechanism ensures the quality of the prediction interval, maintaining a stable and reasonable prediction range even with increasing outlier levels. This mechanism enhances the robustness and reliability of the model in practical applications, providing more reliable data support for water resources planning.

[0180] Table 3 Ablation study of model architecture and components

[0181]

[0182] To evaluate the effectiveness of each design component of Difformer, four variants were designed and compared: (1) w / o-FFT, which removes the Fourier loss term during training; (2) w / o-Physic, which removes the physical guidance loss term during training; (3) w / o-Decomposition, which removes the seasonality and trend decomposition design from the network; and (4) w / o-Transformer, which replaces the decoder with a convolutional network, thereby 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 full Diffomer model significantly outperforms its variants in terms of PICP and NSE (higher is better), and also shows the lowest error level in terms of PINRW and RMSE (lower is better), verifying the comprehensiveness and robustness of the model. In contrast, variants removing the FFT and physics-guided loss terms (i.e., w / o-FFT and w / o-Physic) show decreased performance across most metrics, demonstrating the importance of these designs in improving model accuracy and generalization. Furthermore, variants removing seasonality and trend decomposition (i.e., w / o-Decomposition) and replacing the Transformer with convolutions (i.e., w / o-Transformer) both show significant performance degradation, particularly in the NSE metric, further demonstrating the contribution of the decoder's self-attention mechanism and trend decomposition design to capturing complex temporal features. In summary, ablation experiments clearly demonstrate the effectiveness and indispensability of each of the Diffomer design components.

[0183] In addition, a fine-grained decomposition ablation study was conducted to validate the effectiveness of the proposed disentanglement framework. The experiments tested different combinations of the three decomposition components: residual, seasonal, and trend. The average RMSE results for different decomposition component combinations are shown in Table 4. The results show that regardless of which component is removed, the model performance degrades, and the performance gap is particularly significant when the missing rate is high (70%-90%). This confirms the important role of the proposed decomposition disentanglement representation in the generation task and demonstrates that the decomposition framework can effectively split the complex information in time series data into more manageable components, thereby improving the model's robustness and accuracy. Furthermore, the decomposition design not only significantly improves the model's interpretability without sacrificing accuracy, but also further enhances the unconditional generation capability of the diffusion model for runoff prediction tasks with significant frequency fluctuations.

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

[0185]

[0186] Furthermore, a hyperparameter sensitivity analysis was performed:

[0187] The NSE variation trends of Difformer and seven comparison models at four reservoir sites under different output windows h were evaluated, e.g. Figure 11 As shown in the figure, as the prediction window increases, the NSE values ​​of all models generally decrease, indicating that the prediction performance has weakened over time. This is because the extension of the prediction window makes the model face more uncertainties, especially for runoff predictions with longer time scales, the model error will gradually accumulate. Further observation shows that when When the prediction window h exceeds 96 hours, the Difformer model's NSE value significantly outperforms the other models. However, as the prediction window h exceeds 96 hours, DiffTime surpasses Difformer. This may be due to Difformer's combination 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 faced with complex nonlinear relationships over long timescales, resulting in Difformer's underperformance compared to DiffTime and other generative models when the prediction window is long. This is also evident in the experimental results of PC-LSTM. In contrast, DiffTime may achieve superior performance through a generative approach, perhaps without relying heavily on physical models, better adapting to complex patterns over long timescales. Overall, the Difformer model outperformed the other seven compared models at all reservoir sites. In particular, its NSE value showed a relatively stable trend across different prediction windows, demonstrating good predictive stability and adaptability.

[0188] In addition, this example 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 and as shown in Table 5. Figure 12 The NSE results of the four reservoir sites under different parameter configurations of batch size, embedding dimension D, diffusion / sampling time step t, and DTLayer layer number L are shown. As can be seen from the figure, Difformer performs best when batchsize=32, D=64, t=1000, and L=2. In addition, Table 5 records the impact of different penalty parameter values ​​on model performance. As can be seen from equations (17) and (21), the weight of each term in the joint guidance loss function is determined by the loss term ~ To control, different penalty scales will also affect the forecast performance of the model. and unchanged (i.e. ), and The model performance is the best when and ,when and The prediction performance of Difformer is further improved when . Therefore, this set of penalty scales can maximize the prediction advantage of the model. The default value is larger because The value of is smaller, the larger This prevents the model from ignoring the effects of penalty terms in the control equations.

[0189] Table 5 Comparison of RMSE results of the Difformer model for site B inflow runoff prediction under different penalty parameters

[0190]

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

[0192] The main analysis is on the reconstruction performance of the proposed model for multivariate time series. Figure 13 The reconstruction effect of Difformer on the site A reservoir dataset was demonstrated, that is, visualizing the true trend and seasonal patterns as well as the learned patterns. Specifically, the model first receives corrupted 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 part follows the overall shape of the signal, while the seasonal component and error oscillate around zero. This shows that by decomposing and reconstructing the different characteristics of the time series, Difformer can effectively restore the original data, and the reconstructed samples are very close to the ground truth. This result verifies the excellent performance of the Difformer model under the disentanglement architecture, so that the generated time series can not only maintain high accuracy but also have strong interpretability.

[0193] PCA analysis was applied to visualize the extent to which the runoff data distribution generated by the eight models, TimeVAE, Diffwave, CotGAN, DiffTime, DC-WGAN, TimeGAN, PC-LSTM, and Difformer, covered the distribution of the real data, in order to explore the diversity between the runoff generated by all models and the actual runoff entering the reservoir at Site A. As shown in Figure 14, compared with the SOTA method, the overlap between the synthetic runoff generated by the Difformer model and the original data is significantly increased, and the distribution of its synthetic data is closer to the original data.

[0194] It should be noted that the parts in this embodiment that are the same or similar to those in Example 1 can be referenced to each other and will not be described in detail in this application.

[0195] Example 3:

[0196] Based on Example 2, Example 3 of the present invention provides a basin runoff uncertainty prediction system driven by multi-source data and physics, including:

[0197] An acquisition module is used to obtain the runoff series data and external prediction factor data of the target watershed;

[0198] A construction module is used to construct a runoff uncertainty generation model, which performs probability diffusion on runoff sequence data through a constrained diffusion generator to generate approximate runoff data; the runoff uncertainty generation model includes a denoising diffusion probability model layer and a DTLayer learning layer, and the DTLayer learning layer includes a decoder with a disentangled temporal representation, and the decoder is composed of a Transformer block, FFN, and a decomposition block;

[0199] A design module for designing a joint loss function to update the weights and bias terms of the runoff uncertainty generation model;

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

[0201] It should be noted that the system provided in this embodiment is a system corresponding to the method provided in Example 2. Therefore, the parts in this embodiment that are the same or similar to those in Example 2 can be referenced to each other and will not be repeated in this application.

Claims

1. A basin runoff uncertainty prediction method driven by multi-source data and physics, characterized by: include: Step 1: Obtain the runoff series data and external prediction factor data of the target watershed; Step 2: Construct a runoff uncertainty generation model, perform probability diffusion on the runoff sequence data through a constrained diffusion generator, and generate approximate runoff data; the runoff uncertainty generation model includes a denoising diffusion probability model layer and a DTLayer learning layer, and the DTLayer learning layer includes a decoder with a disentangled temporal representation, and the decoder consists of a Transformer block, FFN, and a decomposition block; Step 3: Design a joint loss function to update the weights and bias terms of the runoff uncertainty generation model; Step 4: Train the loss convergence under joint guidance and output the runoff prediction result.

2. The basin runoff uncertainty prediction method driven by multi-source data and physics according to claim 1 is characterized in that: Step 2 includes: Step 2.1, projecting the original input into deep features through the data embedding layer; the original input includes runoff series data and external predictor data; Step 2.2: The depth features are passed through L The DTLayer learning layer of the layer obtains the trend component, seasonal component and residual component; Step 2.3: Apply different forms of constraints to the trend component, seasonal component, and residual component to achieve disentanglement, and obtain an approximate sample of the runoff uncertainty generation model prediction.

3. The basin runoff uncertainty prediction method driven by multi-source data and physics according to claim 2 is characterized in that: In step 2, the Transformer block includes a diffusion embedding layer, a self-attention layer, and a cross-attention layer. The diffusion embedding layer uses sinusoidal position embedding to encode the diffusion step.

4. The basin runoff uncertainty prediction method driven by multi-source data and physics according to claim 3 is characterized in that: In step 3, the joint loss function includes a data-driven loss term and a physics-guided loss term.

5. The basin runoff uncertainty prediction method driven by multi-source data and physics according to claim 4 is characterized in that: In step 3, a reweighting strategy is used to design a data-driven loss function; the physical guidance loss term includes PDE loss, boundary loss and initial condition loss.

6. A basin runoff uncertainty forecasting system driven by multi-source data and physics, characterized by: Used to perform the method according to any one of claims 1 to 5, comprising: An acquisition module is used to obtain the runoff series data and external prediction factor data of the target watershed; A construction module is used to construct a runoff uncertainty generation model, which performs probability diffusion on runoff sequence data through a constrained diffusion generator to generate approximate runoff data; the runoff uncertainty generation model includes a denoising diffusion probability model layer and a DTLayer learning layer, and the DTLayer learning layer includes a decoder with a disentangled temporal representation, and the decoder is composed of a Transformer block, FFN, and a decomposition block; A design module for designing a joint loss function to update the weights and bias terms 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.

7. A computer storage medium, characterized in that The computer storage medium stores a computer program; when the computer program is run on a computer, the computer executes the method according to any one of claims 1 to 5.

8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Industrial park short-term load prediction method and system based on Diffusion-Transform-AR model

    CN119154249A

  • Cotton assorting resultant yarn quality prediction method based on mixed deep learning model

    CN119599503A

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

    CN119623694A

  • Method and device for retraining a machine learning system

    DE102023211185A1

  • Metaverse generation network for providing three-dimensional lesson environment

    WO2025159275A1

Cited By

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

    CN122132784A

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

    CN122132784B