Runoff prediction method and device, electronic equipment, storage medium and program product

By using multimodal decomposition and interpretable fusion of the runoff prediction pre-trained model, the problem of low accuracy of runoff prediction models in small sample watersheds was solved, and the stability and accuracy were improved, while the interpretability and cross-watershed adaptability of the model were enhanced.

CN122489983APending Publication Date: 2026-07-31SOUTH CHINA UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SOUTH CHINA UNIV OF TECH
Filing Date
2026-05-12
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing runoff prediction models struggle to effectively characterize the multi-scale features of runoff sequences in small-sample watersheds or scenarios with insufficient data, resulting in low prediction accuracy and a lack of interpretability and cross-watershed transferability, making them prone to cumulative drift and trend shift.

Method used

A runoff prediction pre-trained model is used for multimodal decomposition. The runoff sequence is decomposed into different modal components by an adaptive wavelet autoencoder (LWAE). The Transformer and BiGRU networks are combined for feature encoding, and interpretable fusion is performed through the SHAP-Attention mechanism. A physical constraint loss function is introduced to ensure the rationality and accuracy of the prediction.

Benefits of technology

It significantly improves the stability and accuracy of long-term runoff prediction, enhances the interpretability and cross-basin adaptability of the model, and can quickly adapt to basins with different climate and hydrological response mechanisms, making it suitable for scenarios with small samples or sparse data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122489983A_ABST
    Figure CN122489983A_ABST
Patent Text Reader

Abstract

This application discloses a runoff prediction method, apparatus, electronic device, storage medium, and program product. The method includes: preprocessing raw runoff sequence data to obtain preprocessed data; inputting the preprocessed data into a runoff prediction pre-training model to obtain the predicted runoff value, confidence level, and feature contribution map for explaining the causes of the prediction results corresponding to the raw runoff sequence data; the runoff prediction pre-training model is used to: obtain component sets of different modes based on runoff sequence sample data; encode the component sets and corresponding meteorological factors to obtain coded features; extract features from the coded features to obtain representational features; generate attention weights based on the feature contribution of the coded features to the prediction results; obtain the final feature representation corresponding to the representational features based on the attention weights; and output the predicted runoff value, confidence level, and feature contribution map based on the final feature representation. The embodiments of this application can improve the accuracy of runoff prediction in different scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, specifically to a runoff prediction method and device, electronic equipment, storage medium, and program product. Background Technology

[0002] Runoff forecasting, typically measured on multi-year, annual, or seasonal scales, plays a crucial role in water resource planning, reservoir operation, and drought risk assessment. However, existing runoff forecasting models suffer from the following technical limitations for long-term runoff prediction: First, runoff series often exhibit significant non-stationary characteristics, with their temporal variations encompassing multi-scale features, such as high-frequency fluctuations caused by short-term heavy rainfall events, medium-frequency variations caused by seasonal changes, and multi-year climate change trends. Existing runoff forecasting models often struggle to effectively characterize these different time-scale variations simultaneously. Second, runoff time series are driven by multiple factors, including rainfall, evapotranspiration, land use change, and climate modal changes, resulting in high-frequency fluctuations (heavy rainfall), medium-frequency variations (seasonal changes), and low-frequency trends (multi-year wet-dry variations). Existing runoff forecasting models often fail to effectively separate and utilize information from these different scales, particularly in long-term forecasts, where issues such as cumulative drift and trend shifts arise. Furthermore, these runoff forecasting models exhibit low accuracy in small sample watersheds or scenarios with insufficient data. Summary of the Invention

[0003] In view of the above problems, this application provides a runoff prediction method and apparatus, electronic device, storage medium and program product, to at least solve the technical problem of low runoff prediction accuracy in small sample watersheds or scenarios with insufficient data in the related art.

[0004] According to a first aspect of the embodiments of this application, a runoff prediction method is provided. The method includes: preprocessing raw runoff sequence data to obtain preprocessed data; wherein the raw runoff sequence data includes the flow rate and meteorological factors of the runoff sequence of a target watershed within a preset historical period; inputting the preprocessed data into a runoff prediction pre-training model to obtain a runoff prediction value corresponding to the raw runoff sequence data, a confidence level corresponding to the runoff prediction value, and a feature contribution map for interpreting the cause of the prediction result; wherein the runoff prediction pre-training model is used to: perform multimodal decomposition on the runoff sequence sample data to obtain component sets of different modes; perform feature encoding on the component sets and corresponding meteorological factors to obtain encoded features; perform parallel feature extraction on the encoded features to obtain representation features at different time scales; generate attention weights based on the feature contribution of the encoded features to the prediction result; perform interpretable fusion on the representation features based on the attention weights to obtain a final feature representation; and output the runoff prediction value, confidence level, and feature contribution map based on the final feature representation.

[0005] According to a second aspect of the embodiments of this application, a runoff prediction device is provided, the device comprising: A preprocessing unit is used to preprocess the raw runoff sequence data to obtain preprocessed data; wherein, the raw runoff sequence data includes the flow rate and meteorological factors of the runoff sequence of the target watershed within a preset historical period; The prediction unit is used to input the preprocessed data into a runoff prediction pre-training model to obtain the predicted runoff value corresponding to the original runoff sequence data, the confidence level corresponding to the predicted runoff value, and a feature contribution map for explaining the causes of the prediction results. The runoff prediction pre-training model is used to: perform multimodal decomposition on the runoff sequence sample data to obtain component sets of different modes; encode the component sets and corresponding meteorological factors to obtain coded features; perform parallel feature extraction on the coded features to obtain representation features at different time scales; generate attention weights based on the feature contribution of the coded features to the prediction results; perform interpretable fusion on the representation features based on the attention weights to obtain the final feature representation; and output the predicted runoff value, confidence level, and feature contribution map based on the final feature representation.

[0006] According to a third aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the runoff prediction method of the first aspect described above.

[0007] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the runoff prediction method of the first aspect described above when running.

[0008] According to a fifth aspect of the embodiments of this application, a computer program product is also provided, including a computer program that is executed by a processor to implement the runoff prediction method of the first aspect described above.

[0009] In this embodiment, the original runoff sequence data is preprocessed to obtain preprocessed data. The original runoff sequence data includes the flow rate and meteorological factors of the runoff sequence in the target watershed within a preset historical period. The preprocessed data is input into a runoff prediction pre-training model to obtain the runoff prediction value corresponding to the original runoff sequence data, the confidence level corresponding to the runoff prediction value, and a feature contribution map used to explain the causes of the prediction results. The runoff prediction pre-training model is used to: perform multimodal decomposition on the runoff sequence sample data to obtain component sets of different modes; and perform feature encoding on the component sets and corresponding meteorological factors to obtain... The process involves: encoding features; performing parallel feature extraction on the encoded features to obtain representational features at different time scales; generating attention weights based on the feature contribution of the encoded features to the prediction results; performing interpretable fusion on the representational features based on the attention weights to obtain the final feature representation; and outputting the runoff prediction value, confidence level, and feature contribution map based on the final feature representation. This application significantly improves the identifiability of low-frequency trends through adaptive multi-scale decomposition, thereby enhancing the stability and accuracy of long-term runoff prediction. Moreover, it can quickly adapt to watersheds with different climate and hydrological response mechanisms and is suitable for various scenarios with small samples or sparse data. Attached Figure Description

[0010] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiments below. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a schematic diagram of the application environment of an optional runoff prediction method according to an embodiment of this application; Figure 2 This is a schematic diagram of the application environment of another optional runoff prediction method according to an embodiment of this application; Figure 3 This is a flowchart illustrating a runoff prediction method according to an embodiment of this application; Figure 4 This is a schematic diagram of the architecture of a runoff prediction model according to an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a runoff prediction device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

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

[0012] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0013] According to one aspect of the present invention, a runoff prediction method is provided. Optionally, as an alternative implementation, the runoff prediction method may be applied to, but is not limited to, [examples of other methods]. Figure 1 The application environment shown includes: a terminal device 102 for user interaction, a network 104, and a server 106. User 108 can interact with terminal device 102, which runs a runoff prediction application. Terminal device 102 includes a human-computer interaction screen 1022, a processor 1024, and a memory 1026. The human-computer interaction screen 1022 displays runoff prediction results; the processor 1024 acquires raw runoff sequence data, which includes flow rate and meteorological factors of the runoff sequence in the target watershed within a preset historical time period; and the memory 1026 stores the raw runoff sequence data.

[0014] Furthermore, server 106 includes database 1062 and processing engine 1064. Database 1062 stores raw runoff sequence data and preprocessed data. Processing engine 1064 preprocesses the raw runoff sequence data to obtain preprocessed data; inputs the preprocessed data into a runoff prediction pre-training model to obtain the runoff prediction value corresponding to the raw runoff sequence data, the confidence level corresponding to the runoff prediction value, and a feature contribution map for explaining the cause of the prediction result. The runoff prediction pre-training model is used to: perform multimodal decomposition on the runoff sequence sample data to obtain component sets of different modes; encode the component sets and corresponding meteorological factors to obtain coded features; perform parallel feature extraction on the coded features to obtain representation features at different time scales; generate attention weights based on the feature contribution of the coded features to the prediction result; perform interpretable fusion on the representation features based on the attention weights to obtain the final feature representation; and output the runoff prediction value, confidence level, and feature contribution map based on the final feature representation. The client of the aforementioned terminal device 102 displays the predicted runoff value corresponding to the original runoff sequence data, the confidence level corresponding to the predicted runoff value, and a feature contribution map used to explain the cause of the prediction result.

[0015] In one or more embodiments, the runoff prediction method described above in this application can be applied to Figure 2 The application environment shown. For example... Figure 2 As shown, user 202 and user device 204 can interact. User device 204 includes a memory 206 and a processor 208. In this embodiment, user device 204 can, but is not limited to, referencing the operations performed by terminal device 102 to obtain the runoff prediction value corresponding to the original runoff sequence data, the confidence level corresponding to the runoff prediction value, and the feature contribution map used to explain the cause of the prediction result.

[0016] Optionally, the terminal device 102 and user device 204 mentioned above include, but are not limited to, mobile phones, televisions, tablets, laptops, PCs, in-vehicle electronic devices, wearable devices, and other terminals. The network 104 may include, but is not limited to, wireless networks or wired networks. The wireless network includes Wi-Fi and other networks that enable wireless communication. The wired network may include, but is not limited to, wide area networks (WANs), metropolitan area networks (MANs), and local area networks (LANs). The server 106 may include, but is not limited to, any hardware device capable of computation. The server 106 may be a single server, a server cluster consisting of multiple servers, or a cloud server. The above is merely an example, and no limitations are imposed in this embodiment.

[0017] Runoff forecasting, typically measured on multi-year, annual, or seasonal scales, plays a crucial role in water resource planning, reservoir operation, and drought risk assessment. However, existing runoff forecasting models suffer from the following technical limitations for long-term runoff prediction: First, runoff series are highly non-stationary, making it difficult to effectively utilize multi-scale characteristics. Runoff time series are driven by multiple factors, including rainfall, evapotranspiration, land use change, and climate modal changes, and their time series contain high-frequency fluctuations (heavy rainfall), medium-frequency variations (seasonal changes), and low-frequency trends (multi-year wet-dry variations). Existing runoff forecasting models struggle to effectively separate and utilize information from these different scales, especially in long-term forecasts, where issues such as cumulative drift and trend shifts occur. Furthermore, these runoff forecasting models exhibit low accuracy in small sample watersheds or scenarios with insufficient data.

[0018] To address the aforementioned technical problems, as an optional implementation method, such as Figure 3 As shown in the figure, this application provides a runoff prediction method, which includes the following steps: S302, preprocess the original runoff sequence data to obtain preprocessed data; wherein, the original runoff sequence data includes the flow rate and meteorological factors of the runoff sequence of the target watershed within a preset historical period; S304, the preprocessed data is input into the runoff prediction pre-training model to obtain the runoff prediction value corresponding to the original runoff sequence data, the confidence level corresponding to the runoff prediction value, and a feature contribution map for explaining the cause of the prediction result; wherein, the runoff prediction pre-training model is used to: perform multimodal decomposition on the runoff sequence sample data to obtain component sets of different modes; perform feature encoding on the component sets and corresponding meteorological factors to obtain encoded features; perform parallel feature extraction on the encoded features to obtain representation features at different time scales; generate attention weights based on the feature contribution of the encoded features to the prediction result; perform interpretable fusion on the representation features based on the attention weights to obtain the final feature representation; and output the runoff prediction value, confidence level, and feature contribution map based on the final feature representation.

[0019] Specifically, in this embodiment of the application, the original runoff sequence data can be the runoff sequence of the target watershed within a preset historical period. The flow rate can be the daily, monthly, or annual average flow rate at a specific watershed outlet section. These meteorological factors can include rainfall. Temperature , evapotranspiration Auxiliary factors include climate indices (El Niño-Southern Oscillation ENSO, Pacific Decadal Oscillation PDO, etc.), soil moisture, vegetation indices, and topography (such as elevation and slope).

[0020] The original runoff sequence data is preprocessed to obtain preprocessed data, which is standardized and formatted as tensor data suitable for training deep learning models. This preprocessed data is input into a runoff prediction pre-training model, and the model output includes the predicted runoff value, the corresponding confidence level, and a feature contribution map. The predicted runoff value is the predicted runoff volume at one or more future time points. The confidence level quantifies the uncertainty of the predicted value (e.g., a 95% confidence interval), providing a basis for risk assessment. The feature contribution map visually displays the specific contribution magnitude and direction of each modal component and input feature to the prediction in graphical form (e.g., force graph, summary graph), answering the question "Why did the model make this prediction?" and greatly improving the model's reliability and usability.

[0021] In this embodiment, the original runoff sequence data is preprocessed to obtain preprocessed data. The original runoff sequence data includes the flow rate and meteorological factors of the runoff sequence in the target watershed within a preset historical period. The preprocessed data is input into a runoff prediction pre-training model to obtain the runoff prediction value corresponding to the original runoff sequence data, the confidence level corresponding to the runoff prediction value, and a feature contribution map used to explain the causes of the prediction results. The runoff prediction pre-training model decomposes the runoff sequence sample data into component sets of different modalities, encodes the component sets, extracts features from the encoded data, calculates the feature contribution of each component set, converts the feature contribution into attention weights, and drives an interpretable fusion module based on the attention weights to generate the final feature representation. This application significantly improves the identifiability of low-frequency trends through adaptive multi-scale decomposition, thereby improving the stability and accuracy of long-term runoff prediction. Furthermore, it can quickly adapt to watersheds with different climate and hydrological response mechanisms, and is suitable for various scenarios with small samples or sparse data.

[0022] In one or more embodiments, before preprocessing the raw runoff sequence data to obtain preprocessed data, the method further includes: Obtain the flow data corresponding to each runoff sequence in the target watershed, and the meteorological factors corresponding to each runoff sequence, and determine the flow data and the meteorological factors as the original runoff sequence data; The process of preprocessing the raw runoff sequence data to obtain preprocessed data includes: The missing values ​​appearing in the original runoff sequence data are obtained, and the missing values ​​are added to the original runoff sequence data based on a preset interpolation algorithm; The preprocessed data is obtained by normalizing the original runoff sequence data after interpolation.

[0023] Specifically, in the embodiments of this application, the flow data corresponding to each runoff sequence can be daily average flow, monthly average flow, or annual average flow; the original runoff sequence data includes not only the historical runoff itself, but also its driving factors (meteorological factors). This forms the basis of multivariate time series forecasting. The runoff forecasting pre-trained model can learn the causal relationship between "meteorology and hydrology," rather than just the autocorrelation relationship of the runoff sequence. Based on the above causal relationship, the runoff forecasting pre-trained model can make long-term runoff forecasts.

[0024] Real-world data acquisition often results in data loss due to equipment failures, transmission interruptions, and other reasons. Missing values ​​disrupt the continuity of time series data, making model training impossible. This application utilizes methods such as linear interpolation, time series interpolation, or seasonal interpolation; the aforementioned normalization process can eliminate dimensional differences between different features. For example, runoff volume might be measured in m³ / s, ranging from 0 to 10000; rainfall might be measured in mm, ranging from 0 to 300; and temperature might be measured in °C, ranging from -20 to 40. Such significant differences in magnitude can lead to unstable model training, while normalized data, through gradient descent, can find the optimal solution more quickly and stably. The aforementioned normalization methods can include Min-Max normalization and Z-Score normalization algorithms.

[0025] In one or more embodiments, the runoff prediction method further includes: The training data corresponding to the runoff prediction pre-training model is obtained, and the runoff flow sequence in the training data is decomposed into multiple modes using a preset encoding module to obtain a set of components of multiple frequency modes; the multiple frequency modes include high-frequency mode, mid-frequency mode and low-frequency mode; the multiple frequency modes are used to characterize the flow change trend at different time scales; The component sets of the multiple frequency modes and the meteorological factors corresponding to each component set are input into a parallel feature encoding network to obtain encoded features, and long-term dependency features and short-term fluctuation features corresponding to the training data are extracted based on the encoded features. Using the encoded features as the interpretation object, calculate the contribution of each encoded feature to the model prediction result, and construct a contribution vector based on the contribution. Generate attention weights corresponding to the contribution vector, and based on the attention weights, fuse the long-term dependency features and short-term fluctuation features through a cross-attention mechanism to obtain the fused features; Based on the fusion features, runoff prediction results and feature contribution maps for explaining the influencing factors of the prediction results are generated, and the runoff prediction pre-training model is trained based on the runoff prediction results.

[0026] Specifically, in this embodiment, the preset encoding module is a learnable wavelet autoencoder (LWAE). The LWAE can adaptively decompose the input raw runoff sequence to generate... A set of non-overlapping modal components: The LWAE consists of a learnable decomposition filter bank (encoder) and a learnable reconstruction filter bank (decoder). The decomposition filter bank is used to extract modal components at different frequencies (scales). The LWAE employs a composite loss function. Conduct training to ensure the effectiveness and stability of the decomposition:

[0027]

[0028] =

[0029] in, The L2 norm of the difference between the original runoff sequence and the sum of all modal components is used to reconstruct the loss function to ensure that the sum of all decomposed modes can accurately reconstruct the original runoff sequence. Here is the spectral sparsity regularization function. To calculate the sum of the spectral energy (amplitude) of all modal components and use it as a regularization penalty term to constrain the tight support of each modal component in the frequency domain and prevent mode aliasing; For the original runoff sequence, Let be the modal components of any frequency. Low-frequency modes mainly reflect long-term trend changes on a multi-year scale, for example, the next 10 years will enter a relatively dry period; the components of mid-frequency modes can predict seasonal changes within the year, for example, predicting the runoff during the wet season and the runoff during the dry season next year; high-frequency modes mainly reflect the rapid fluctuation characteristics caused by short-term rainfall or extreme weather events, such as changes in flood peaks.

[0030] After extracting the long-term dependency features and short-term fluctuation features corresponding to the training data through a parallel feature encoding network, the long-term dependency features and short-term fluctuation features are weighted and fused using the interpretability index (SHAP) through the interpretability fusion module (SHAP-Attention); specifically, it includes the following three steps: 1. Contribution Calculation: The SHAP interpretability algorithm is used to calculate the contribution of each modal component. Using the intermediate features obtained after feature encoding of multimodal components as the explanatory objects, the contribution of each intermediate feature to the model prediction results is calculated, and a contribution vector is constructed based on the contribution. .

[0031] 2. Attention Weight Generation: The contribution vector is generated using the following formula. Normalize and map to attention weights This is used to guide the feature fusion process.

[0032] ; in , This is the weight matrix. For bias vectors, For activation functions; 3. Integration Mechanism: [The following text appears to be incomplete and requires further context: "will..."] By incorporating the Cross-Attention mechanism, the final fused features are generated. :

[0033] Among them, among them, It is a scaling factor for the gating signal or attention weight matrix, which can give higher fusion weights to modes with high SHAP values ​​(i.e. modes with high contribution); It is a long-term dependency characteristic. It exhibits short-term fluctuation characteristics.

[0034] Runoff prediction values ​​are generated based on the fused features, along with a feature contribution map to explain the causes of the prediction results. The runoff prediction values ​​include future runoff values ​​at multiple time scales and corresponding confidence intervals. The feature contribution map includes explanatory information based on SHAP values, feature importance ranking, and feature dependencies. The feature contribution map is used to characterize the degree of influence of different features on the prediction results.

[0035] The parallel feature encoding network includes a Transformer network and a BiGRU network. The process involves inputting the component sets of the multiple frequency modes and the corresponding meteorological factors into the parallel feature encoding network to extract the long-term dependency features and short-term fluctuation features corresponding to the training data, including: The component sets of the multiple frequency modes and the meteorological factors corresponding to each component set are input into the Transformer network to obtain a first feature matrix including the long-term dependency features. The component sets of the multiple frequency modes and the meteorological factors corresponding to each component set are input into the BiGRU network to obtain a second feature matrix including the short-term fluctuation characteristics.

[0036] Specifically, the Transformer network in this embodiment employs a Multi-Head Attention mechanism, focusing on capturing long-term dependencies and cross-year trend changes in different modal sequences, and outputting a feature matrix. (First characteristic matrix).

[0037] This application utilizes a bidirectional gated recurrent unit (BiGRU) to focus on learning the rapid response behavior and drastic fluctuations in modes caused by short-term rainfall events, and outputs a feature matrix. (Second characteristic matrix).

[0038] In one or more embodiments, the runoff prediction method further includes: The runoff prediction pre-trained model is optimized using a consistency constraint loss function; the consistency constraint loss function includes at least one of the following: prediction error loss function, water balance constraint loss function, trend smoothing constraint loss function, and uncertainty estimation constraint loss function. The parameters of the runoff prediction pre-trained model are fine-tuned using local data from different watersheds to adapt the runoff prediction pre-trained model to the hydrological response mechanisms of the different watersheds.

[0039] Specifically, in the embodiments of this application, the prediction error loss function ensures the accuracy of the prediction results, driving the model's predicted values ​​to be as close as possible to the actual observed values; the water balance constraint loss function ensures the physical rationality of the prediction results, ensuring that long-term predictions satisfy the principle of watershed water conservation. It is used to penalize prediction results that seriously violate the water balance law and can also effectively prevent the cumulative drift problem commonly found in long-term predictions; the trend smoothing constraint loss function ensures the smoothness of the prediction trend line, conforming to the continuous and gradual characteristics of natural hydrological processes, and can also suppress unreasonable fluctuations on the prediction trend line, making the long-term prediction trend more stable and reliable. The uncertainty estimation constraint loss function enables the model to quantify the uncertainty of the prediction, output confidence intervals, and provide decision-makers with a basis for risk assessment.

[0040] In one example, the above consistency constraint loss function ;in, These are the weighting coefficients. For prediction error loss function, For water balance constraint loss function, For trend smoothing constrained loss function, The constraint loss function is used for uncertainty estimation.

[0041] A "pre-trained model" is obtained by training the model on one or more large watersheds with abundant data. During this stage, the model learns general "hydrological knowledge" and "multi-scale feature mapping relationships." Then, on a target watershed with scarce data, the parameters of the pre-trained model are fine-tuned using a small amount of local data. This fine-tuning method requires only a small amount of data to adapt the powerful pre-trained model to the new watershed. Specifically, because different watersheds have different underlying surface conditions such as climate, topography, geology, and vegetation, their "rainfall-runoff" hydrological response mechanisms vary. The fine-tuning process allows the model to quickly learn and adapt to these mechanisms.

[0042] In one or more embodiments, the prediction error loss function includes: root mean square error function, mean absolute error function, or efficiency coefficient loss function; The water balance constraint loss function is a loss function constructed based on precipitation, evapotranspiration and runoff. The trend smoothing constraint loss function is a loss function obtained by calculating the second difference of the predicted sequence; The uncertainty estimation constraint loss function includes prediction variance, standard deviation, or confidence interval width.

[0043] Specifically, the prediction error loss function Loss functions such as root mean square error (RMSE), mean absolute error (MAE), or Nash-Sutcliffe efficiency coefficient (NSE) can be used.

[0044] The water balance equation for the basin is: ;in, This represents the precipitation at time t. This represents the amount of evapotranspiration at time t. Indicates runoff volume. Temperature is primarily used for evapotranspiration estimation or as a model input feature. This represents the change in watershed water storage, used to characterize the combined changes in soil water, groundwater, and surface water. For annual or multi-year scale predictions, due to... Difficult to observe directly, therefore this application uses... A water balance constraint loss function is constructed by penalizing the cumulative deviation within the time window. This is to ensure that long-term forecast results satisfy the principle of water conservation.

[0045] Where t is the duration window; The above formula represents the cumulative difference between precipitation P, evapotranspiration E and model-predicted runoff Q within a time window (e.g., one year or a multi-year period). The cumulative difference for each time window is squared (i.e., the L2 norm) and converted into a penalty term. The penalties for all time windows are summed to obtain the total physical constraint loss.

[0046] Trend smoothing constraint loss function This can be expressed as the following formula:

[0047] in, This represents the predicted runoff volume of the model at time t. This represents the predicted runoff volume of the model at time t+1. This represents the predicted runoff volume of the model at time t-1.

[0048] Uncertainty estimation constraint loss function It is obtained by estimating the prediction uncertainty (such as prediction variance) through a constrained model.

[0049] In one or more embodiments, the meteorological factors include at least one of the following: rainfall, air temperature, evapotranspiration, climate index, soil moisture, vegetation index, and topography.

[0050] Long-term runoff forecasting (typically on multi-year or annual-seasonal scales) plays a crucial role in water resource planning, reservoir operation, and drought risk assessment. However, existing data-driven models suffer from the following key technical shortcomings in long-term runoff forecasting: First, runoff sequences are highly non-stationary, making it difficult to effectively utilize multi-scale features. Runoff time series are driven by multiple factors, including rainfall, evapotranspiration, land use change, and climate modal changes, and their time series contain high-frequency fluctuations (heavy rainfall), medium-frequency variations (seasonal changes), and low-frequency trends (multi-year wet-dry variations). Traditional deep learning models (such as LSTM and Transformer attention networks) typically model the original sequence directly, making it difficult to effectively separate and utilize information from these different scales. Second, existing data-driven models lack physical consistency, leading to unreliable prediction results. Relying solely on data-driven methods easily predicts runoff sequences that do not conform to water balance relationships, especially in long-term forecasts where problems such as cumulative drift and trend shifts can occur. Third, the models lack interpretability and are difficult to use for engineering scheduling decisions. Deep networks are often black-box models, making it difficult to quantify the contribution of different input features (rainfall, temperature, climate indices, etc.) in a specific year, leading to difficulties for engineering departments in trusting and applying the model results. Fourth, the cross-basin transferability is weak. Hydrological response mechanisms differ between different basins, and existing methods show a significant decline in prediction performance in small sample basins or scenarios with insufficient data.

[0051] Therefore, there is an urgent need for a long-term runoff prediction method that combines multi-scale modeling capabilities, physical consistency, interpretability, and transferability. Based on this, this application proposes a long-term runoff prediction method based on adaptive multi-scale decomposition and interpretable fusion networks to address the aforementioned technical problems. Specific technical objectives are as follows: First, it improves prediction stability and accuracy by automatically decomposing the multi-scale structure of runoff sequences, thereby effectively separating and modeling information at different scales. Second, it enhances the responsiveness to complex changes by capturing information at different frequencies (long-term dependence / short-term drastic fluctuations) through parallel networks, improving the responsiveness to extreme events and long-term trend changes. Third, it enhances model credibility and transparency by introducing interpretability mechanisms, quantifying feature contributions, and feeding the interpretation results back to model training, thereby improving model credibility. Fourth, it ensures physical rationality by suppressing cumulative drift and trend shifts in predictions through physical constraints (such as water balance constraints), ensuring the physical rationality of long-term predictions. Fifth, it improves cross-basin generalization ability by possessing cross-basin adaptability, applicable to watershed predictions of different data scales and different climate regions.

[0052] Combination Figure 4 As shown, the structure of the long-term runoff prediction model in this application includes the following parts: 1. Input data: Raw historical data (such as runoff, precipitation, temperature, etc.).

[0053] 2. Multi-scale decomposition: The runoff sequence is decomposed into multiple independent modal components through an adaptive multi-scale decomposition module. Automatic modal decomposition of the runoff sequence is achieved through a learnable wavelet autoencoder (LWAE), which automatically generates high-frequency, mid-frequency, and low-frequency modal components.

[0054] 3. Input each modal component in parallel into the Transformer branch (to capture long-term dependence and cross-year trend changes) and the BiGRU branch (to learn short-term sharp fluctuations and rapid response behavior) for feature encoding.

[0055] 4. SHAP Contribution Calculation and Attention Fusion: The interpretability index (SHAP value) of the interpretable fusion module (SHAP-Attention) is used to calculate the contribution of each modal feature and convert it into attention weights, driving the interpretable fusion module to generate the final feature representation. Specifically, intermediate features obtained after feature encoding of multimodal components are used as interpretation objects. The contribution of each intermediate feature to the model prediction output is calculated based on the feature contribution analysis method to obtain the corresponding contribution vector. The feature contribution analysis method includes an interpretability calculation method based on SHAP value, used to quantify the marginal contribution of each intermediate feature to the prediction result. The corresponding attention weights are generated according to the contribution vectors. Based on the attention weights, long-term dependent features and short-term fluctuating features are weighted and fused through an attention mechanism to obtain the final feature representation.

[0056] 5. Predicting output: During model training, a physical consistency constraint loss function (including water balance constraint loss) is introduced. Loss due to long-term trend smoothing constraint Optimization is performed to ensure the physical plausibility of long-term prediction results. After interpretable attention fusion, the model can output the final runoff prediction value. Specifically, the long-term runoff prediction method of this application includes the following main steps: Step 1: Data Preparation and Preprocessing. Acquire time series data of the target watershed, including runoff sequences. Rainfall Temperature , evapotranspiration Auxiliary factors include climate indices (ENSO, PDO, etc.), soil moisture, vegetation indices, and topography. Missing values ​​are interpolated, and all input data are standardized or normalized to reshape the input sequence into a format suitable for training deep learning models.

[0057] Step 2: Adaptive Multi-Scale Decomposition. A learnable wavelet autoencoder (LWAE) is used to process the runoff sequence preprocessed in Step 1. Perform end-to-end multi-scale decomposition and automatically generate A set of non-overlapping modal components In this application, high-frequency, mid-frequency, and low-frequency modes are not manually set by fixed frequency thresholds, but are automatically formed by the adaptive multi-scale decomposition module during end-to-end training based on the dominant time scale of the modal components. Specifically, modal components with shorter dominant time scales reflecting short-term rapid fluctuations in the runoff sequence are defined as high-frequency modes; modal components with dominant time scales at seasonal or intra-annual levels reflecting periodic variations are defined as mid-frequency modes; and modal components with longer dominant time scales reflecting multi-year trends are defined as low-frequency modes.

[0058] In one example, It can represent a set of modal components containing low-frequency trend information. The above classification is for functional description and does not constitute a limitation on a specific frequency range.

[0059] 1. LWAE Structure: An LWAE consists of a learnable decomposition filter bank (encoder) and a learnable reconstruction filter bank (decoder). The decomposition filter bank is used to extract modal components at different frequencies (scales).

[0060] 2. Constraint Objective: LWAE employs a composite loss function for training to ensure the effectiveness and stability of the decomposition. Reconstruction loss : Ensure that the sum of all decomposed modes can accurately reconstruct the original sequence.

[0061]

[0062] in, The loss function is reconstructed using the L2 norm of the difference between the sum of all decomposed modes and the original runoff sequence, ensuring that the sum of all decomposed modes accurately reconstructs the original runoff sequence. Spectral sparsity regularization This constrains the tight support of each modal component in the frequency domain to prevent mode aliasing. =

[0063] Total decomposition loss:

[0064] Step 3: Parallel Feature Encoding Network. The set of modal components obtained from Step 2 is then processed. Other meteorological input factors are input in parallel to two heterogeneous deep learning branches for feature extraction: 1. Transformer Branch (Long-Term Dependency Encoding): Employs a Multi-Head Attention mechanism to focus on capturing long-term dependencies and cross-year trend information in different modal sequences, outputting a feature matrix. .

[0065] 2. BiGRU Branch (Short-Term Fluctuation Encoding): Employs a Bidirectional Gated Recurrent Unit (BiGRU) to focus on learning the rapid response behavior and drastic fluctuations caused by short-term rainfall events in the modality, outputting a feature matrix. .

[0066] Step 4: Interpretable fusion module (SHAP-Attention).

[0067] This module utilizes the interpretability index (SHAP value) to... The encoded features are weighted and fused to achieve "interpretation-driven feature fusion".

[0068] 1. Contribution Calculation: The SHAP interpretability algorithm is used to calculate the contribution of each modal component. Using the intermediate features obtained after feature encoding of multimodal components as the explanatory objects, the contribution of each intermediate feature to the model prediction results is calculated, and a contribution vector is constructed based on the contribution. .

[0069] 2. Attention Weight Generation: This involves generating the contribution vector. Normalize and convert into attention weights ,

[0070] in , This is the weight matrix. For bias vectors, For activation functions; 3. Integration Mechanism: [The following text appears to be incomplete and requires further context: "will..."] By incorporating the Cross-Attention mechanism, the final fused features are generated. :

[0071] Among them, among them, As a scaling factor for the gating signal or attention weight matrix, it enables modes with high SHAP values ​​(i.e., modes with high contribution) to receive higher fusion weights.

[0072] Step 5: Physical consistency constraint loss function. The model's total loss function. For prediction error loss The weighted sum of the physical constraint loss term:

[0073] in: These are the weighting coefficients.

[0074] 2. Water balance constraints This is used to ensure that long-term runoff forecasts satisfy the watershed water balance principle. Within a given time scale, the watershed water balance relationship is expressed as:

[0075] in, Indicates time Rainfall, This represents the amount of evapotranspiration at the corresponding time. Indicates runoff volume. Temperature is primarily used for evapotranspiration estimation or as a model input feature. This represents the change in watershed water storage, used to characterize the combined changes in soil water, groundwater, and surface water. For annual or multi-year scale predictions, Difficult to observe directly, therefore, in this invention, by... The cumulative deviation within the time window is penalized, and a water balance constraint loss function is constructed to ensure that the long-term prediction results satisfy the principle of water conservation. For annual / multi-year scale predictions, the cumulative input and output on the annual scale should be balanced.

[0076]

[0077] Where t is the duration window; 3. Smoothing constraint of long-term trends By using second-order difference constraints (or smoothing regularization), drastic and unreasonable fluctuations in the prediction trend line are penalized, ensuring the physical smoothness of the long-term runoff prediction trend.

[0078] 4. Uncertainty Estimation Constraints : The constraint model estimates the uncertainty of prediction (such as prediction variance).

[0079] Step 6: Model Training and Cross-Basin Adaptation. A cross-basin pre-training and target basin fine-tuning approach is employed, using a domain adaptation strategy to achieve rapid transfer to basins with limited data, thereby improving the model's adaptability to different climate / hydrological regions.

[0080] Step 7: Long-term runoff prediction and interpretation output. The final output includes: 1. Prediction output, multi-scale runoff trend prediction value and confidence interval; the prediction output includes multi-scale runoff trend prediction value and corresponding prediction uncertainty interval, wherein the uncertainty interval is obtained by uncertainty quantification of the prediction model output, preferably calculated by multiple random sampling prediction, quantile regression or probability distribution modeling, and is used to characterize the confidence range of the long-term runoff prediction results.

[0081] 2. Explanation of output: Contribution interpretation diagrams (such as SHAP diagrams) based on different modes and meteorological factors of the SHAP algorithm are used to characterize the degree of influence of different features on the prediction results.

[0082] This application has the following significant advantages and effects compared to the prior art: (1) High long-term prediction accuracy: Through adaptive multi-scale decomposition, the identifiability of low-frequency trends is significantly improved, thereby improving the stability and accuracy of long-term prediction.

[0083] (2) Strong physical credibility: The addition of water conservation and trend smoothing constraints effectively avoids the cumulative drift and trend shift that occur in the long-term prediction of pure deep learning models, ensuring the physical rationality of the prediction results.

[0084] (3) Strong model interpretability: The SHAP-Attention fusion module can not only provide clear contribution analysis (such as the contribution of low-frequency modes and climate indexes), but also improve the transparency and reliability of the model.

[0085] (4) Good cross-basin generalization ability: The model adopts a domain adaptive strategy, which enables it to quickly adapt to basins with different climate and hydrological response mechanisms, and is suitable for scenarios with small samples or sparse data.

[0086] (5) Suitable for engineering applications: The prediction results have trend stability, interpretability and physical consistency, and can be directly used for engineering decisions such as water resource scheduling and planning.

[0087] According to another aspect of the embodiments of this application, such as Figure 5 As shown, a runoff prediction device is also provided, characterized in that the device comprises: A preprocessing unit is used to preprocess the raw runoff sequence data to obtain preprocessed data; wherein, the raw runoff sequence data includes the flow rate and meteorological factors of the runoff sequence of the target watershed within a preset historical period; The prediction unit is used to input the preprocessed data into a runoff prediction pre-training model to obtain the predicted runoff value corresponding to the original runoff sequence data, the confidence level corresponding to the predicted runoff value, and a feature contribution map for explaining the causes of the prediction results. The runoff prediction pre-training model is used to: perform multimodal decomposition on the runoff sequence sample data to obtain component sets of different modes; encode the component sets and corresponding meteorological factors to obtain coded features; perform parallel feature extraction on the coded features to obtain representation features at different time scales; generate attention weights based on the feature contribution of the coded features to the prediction results; perform interpretable fusion on the representation features based on the attention weights to obtain the final feature representation; and output the predicted runoff value, confidence level, and feature contribution map based on the final feature representation.

[0088] In this embodiment, the original runoff sequence data is preprocessed to obtain preprocessed data. The original runoff sequence data includes the flow rate and meteorological factors of the runoff sequence in the target watershed within a preset historical period. The preprocessed data is input into a runoff prediction pre-training model to obtain the runoff prediction value corresponding to the original runoff sequence data, the confidence level corresponding to the runoff prediction value, and a feature contribution map used to explain the causes of the prediction results. The runoff prediction pre-training model is used to: perform multimodal decomposition on the runoff sequence sample data to obtain component sets of different modes; and perform feature encoding on the component sets and corresponding meteorological factors to obtain... The process involves: encoding features; performing parallel feature extraction on the encoded features to obtain representational features at different time scales; generating attention weights based on the feature contribution of the encoded features to the prediction results; performing interpretable fusion on the representational features based on the attention weights to obtain the final feature representation; and outputting the runoff prediction value, confidence level, and feature contribution map based on the final feature representation. This application significantly improves the identifiability of low-frequency trends through adaptive multi-scale decomposition, thereby enhancing the stability and accuracy of long-term runoff prediction. Moreover, it can quickly adapt to watersheds with different climate and hydrological response mechanisms and is suitable for various scenarios with small samples or sparse data.

[0089] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described runoff prediction method is also provided. This electronic device may be... Figure 1 The terminal device or server shown. This embodiment uses the electronic device as a server as an example for illustration. Figure 6 As shown, the electronic device includes a memory 602 and a processor 604. The memory 602 stores a computer program, and the processor 604 is configured to execute the steps in any of the above method embodiments via the computer program.

[0090] like Figure 6 As shown, the electronic device includes a memory 602 and a processor 604. The memory 602 stores a computer program, and the processor 604 is configured to execute the steps in any of the above method embodiments via the computer program.

[0091] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program: S1, preprocess the original runoff sequence data to obtain preprocessed data; wherein, the original runoff sequence data includes the flow rate and meteorological factors of the runoff sequence of the target watershed within a preset historical period; S2, the preprocessed data is input into the runoff prediction pre-training model to obtain the runoff prediction value corresponding to the original runoff sequence data, the confidence level corresponding to the runoff prediction value, and a feature contribution map for explaining the cause of the prediction result; wherein, the runoff prediction pre-training model is used to: perform multimodal decomposition on the runoff sequence sample data to obtain component sets of different modes; perform feature encoding on the component sets and corresponding meteorological factors to obtain encoded features; perform parallel feature extraction on the encoded features to obtain representation features at different time scales; generate attention weights based on the feature contribution of the encoded features to the prediction result; perform interpretable fusion on the representation features based on the attention weights to obtain the final feature representation; and output the runoff prediction value, confidence level, and feature contribution map based on the final feature representation.

[0092] Alternatively, as those skilled in the art will understand, Figure 6 The structure shown is for illustrative purposes only. Figure 6 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 6 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 6 The different configurations shown.

[0093] The memory 602 can be used to store software programs and modules, such as the program instructions or modules corresponding to the runoff prediction method in this embodiment. The processor 604 executes various functional applications and data processing by running the software programs and modules stored in the memory 602, thereby realizing the aforementioned runoff prediction method. The memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 602 may further include memory remotely located relative to the processor 604, and these remote memories can be connected to terminal devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 602 may be used, but is not limited to, storing raw runoff sequence data, etc., which will not be elaborated further in this example.

[0094] Optionally, the transmission device 606 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 606 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 606 is a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0095] In addition, the above-mentioned electronic device also includes: a display 608 for displaying the runoff prediction value, the confidence level corresponding to the runoff prediction value, and a feature contribution map for explaining the cause of the prediction result; and a connection bus 610 for connecting the various module components in the above-mentioned electronic device.

[0096] In one or more embodiments, this application also provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the above-described runoff prediction method. The computer program is configured to execute the steps of any of the above-described method embodiments when running.

[0097] Optionally, in this embodiment, the computer-readable storage medium described above may be configured to store a computer program for performing the following steps: S1, preprocess the original runoff sequence data to obtain preprocessed data; wherein, the original runoff sequence data includes the flow rate and meteorological factors of the runoff sequence of the target watershed within a preset historical period; S2, the preprocessed data is input into the runoff prediction pre-training model to obtain the runoff prediction value corresponding to the original runoff sequence data, the confidence level corresponding to the runoff prediction value, and a feature contribution map for explaining the cause of the prediction result; wherein, the runoff prediction pre-training model is used to: perform multimodal decomposition on the runoff sequence sample data to obtain component sets of different modes; perform feature encoding on the component sets and corresponding meteorological factors to obtain encoded features; perform parallel feature extraction on the encoded features to obtain representation features at different time scales; generate attention weights based on the feature contribution of the encoded features to the prediction result; perform interpretable fusion on the representation features based on the attention weights to obtain the final feature representation; and output the runoff prediction value, confidence level, and feature contribution map based on the final feature representation.

[0098] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0099] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0100] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention.

[0101] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0102] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

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

Claims

1. A runoff prediction method, characterized in that, The method includes: The raw runoff sequence data is preprocessed to obtain preprocessed data; wherein, the raw runoff sequence data includes the flow rate and meteorological factors of the runoff sequence of the target watershed within a preset historical period; The preprocessed data is input into a runoff prediction pre-training model to obtain the predicted runoff value corresponding to the original runoff sequence data, the confidence level corresponding to the predicted runoff value, and a feature contribution map for explaining the causes of the prediction results. The runoff prediction pre-training model is used to: perform multimodal decomposition on the runoff sequence sample data to obtain component sets of different modes; encode the component sets and corresponding meteorological factors to obtain coded features; perform parallel feature extraction on the coded features to obtain representational features at different time scales; generate attention weights based on the feature contribution of the coded features to the prediction results; perform interpretable fusion on the representational features based on the attention weights to obtain the final feature representation; and output the predicted runoff value, confidence level, and feature contribution map based on the final feature representation.

2. The method according to claim 1, characterized in that, Before preprocessing the raw runoff sequence data to obtain preprocessed data, the process further includes: Obtain the flow data corresponding to each runoff sequence in the target watershed, and the meteorological factors corresponding to each runoff sequence, and determine the flow data and the meteorological factors as the original runoff sequence data; The process of preprocessing the raw runoff sequence data to obtain preprocessed data includes: The missing values ​​appearing in the original runoff sequence data are obtained, and the missing values ​​are added to the original runoff sequence data based on a preset interpolation algorithm; The preprocessed data is obtained by normalizing the original runoff sequence data after interpolation.

3. The method according to claim 1 or 2, characterized in that, The method further includes: The training data corresponding to the runoff prediction pre-training model is obtained, and the runoff flow sequence in the training data is decomposed into multiple modes using a preset encoding module to obtain a set of components of multiple frequency modes, wherein the multiple frequency modes include high frequency mode, mid frequency mode and low frequency mode; the multiple frequency modes are used to characterize the flow change trend at different time scales; The component sets of the multiple frequency modes and the meteorological factors corresponding to each component set are input into a parallel feature encoding network to obtain encoded features, and long-term dependency features and short-term fluctuation features corresponding to the training data are extracted based on the encoded features. Using the encoded features as the interpretation object, calculate the contribution of each encoded feature to the model prediction result, and construct a contribution vector based on the contribution. Generate attention weights corresponding to the contribution vector, and based on the attention weights, fuse the long-term dependency features and short-term fluctuation features through a cross-attention mechanism to obtain the fused features; Based on the fusion features, runoff prediction results and feature contribution maps for explaining the influencing factors of the prediction results are generated, and the runoff prediction pre-training model is trained based on the runoff prediction results.

4. The method according to claim 3, characterized in that, The parallel feature encoding network includes a Transformer network and a BiGRU network. The process involves inputting the component sets of the multiple frequency modes and the corresponding meteorological factors into the parallel feature encoding network to extract the long-term dependency features and short-term fluctuation features corresponding to the training data, including: The component sets of the multiple frequency modes and the meteorological factors corresponding to each component set are input into the Transformer network to obtain a first feature matrix including the long-term dependency features. The component sets of the multiple frequency modes and the meteorological factors corresponding to each component set are input into the BiGRU network to obtain a second feature matrix including the short-term fluctuation characteristics.

5. The method according to claim 3, characterized in that, The method further includes: The runoff prediction pre-trained model is optimized using a consistency constraint loss function; the consistency constraint loss function includes at least one of the following: prediction error loss function, water balance constraint loss function, trend smoothing constraint loss function, and uncertainty estimation constraint loss function. The parameters of the runoff prediction pre-trained model are fine-tuned using local data from different watersheds to adapt the runoff prediction pre-trained model to the hydrological response mechanisms of the different watersheds.

6. The method according to claim 5, characterized in that, The prediction error loss function includes: root mean square error function, mean absolute error function, or efficiency coefficient loss function; The water balance constraint loss function is a loss function constructed based on precipitation, evapotranspiration and runoff. The trend smoothing constraint loss function is a loss function obtained by calculating the second difference of the predicted sequence; The uncertainty estimation constraint loss function includes prediction variance, standard deviation, or confidence interval width.

7. The method according to claim 1, characterized in that, The meteorological factors include at least one of the following: Rainfall, temperature, evapotranspiration, climate index, soil moisture, vegetation index, and topography.

8. A runoff prediction device, characterized in that, The device includes: A preprocessing unit is used to preprocess the raw runoff sequence data to obtain preprocessed data; wherein, the raw runoff sequence data includes the flow rate and meteorological factors of the runoff sequence of the target watershed within a preset historical period; The prediction unit is used to input the preprocessed data into a runoff prediction pre-training model to obtain the predicted runoff value corresponding to the original runoff sequence data, the confidence level corresponding to the predicted runoff value, and a feature contribution map for explaining the causes of the prediction results. The runoff prediction pre-training model is used to: perform multimodal decomposition on the runoff sequence sample data to obtain component sets of different modes; encode the component sets and corresponding meteorological factors to obtain coded features; perform parallel feature extraction on the coded features to obtain representation features at different time scales; generate attention weights based on the feature contribution of the coded features to the prediction results; perform interpretable fusion on the representation features based on the attention weights to obtain the final feature representation; and output the predicted runoff value, confidence level, and feature contribution map based on the final feature representation.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by a processor to implement the method as described in any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that, The computer program is executed by a processor to implement the method according to any one of claims 1 to 7.