Multi-scale basin flow prediction method and system fusing physical constraints
By combining the iTransformer model with physical constraints, the problem of the lack of interpretability in flow prediction of deep learning models is solved, and high-precision flow prediction under complex hydrological conditions is achieved, improving the adaptability and reliability of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA INST OF WATER RESOURCES & HYDROPOWER RES
- Filing Date
- 2026-05-28
- Publication Date
- 2026-07-21
AI Technical Summary
Existing deep learning models lack physical interpretability in flow prediction, making it difficult to provide reliable results under complex hydrological conditions. Furthermore, insufficient flow data in data-scarce regions affects the accuracy and universality of the models.
The iTransformer model is adopted, which combines time series data and physical information. Hydrological features are extracted through multi-head self-attention mechanism and convolutional filter. Physical constraints, such as extreme rainstorms, long-term droughts, and monotonic relationship between rainfall and flow, are introduced into the loss function to improve the physical consistency and interpretability of the model.
It improves the accuracy of flow forecasting and the physical consistency of the model, enhances its adaptability and reliability under complex hydrological conditions, and enables high-precision forecasting in areas with scarce data.
Smart Images

Figure CN122432787A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of water conservancy data acquisition technology, specifically to a multi-scale watershed flow prediction method, system, processor, and machine-readable storage medium that integrates physical constraints. Background Technology
[0002] Against the backdrop of climate change and intensifying human activities, the need for water resource management and natural disaster early warning is becoming increasingly urgent. Flow forecasting, as an important research area in hydrology, is not only a crucial technological foundation for flood warning and disaster prevention and mitigation, but also plays a key role in water resource planning, ecological protection, and climate change adaptation. Accurate flow forecasting can help policymakers effectively allocate water resources, reduce flood risks, and protect people's lives and property, while also providing a scientific basis for understanding the impact of climate change on the hydrological cycle.
[0003] In recent years, deep learning technology has been gradually applied to flow forecasting due to its powerful capabilities in pattern recognition and time series forecasting. However, these data-driven models often lack interpretability of physical processes, making it difficult to provide physically meaningful results under complex hydrological conditions. This "black box" problem limits their credibility and generalizability in practical applications, especially in decision-making under high-risk environments. To overcome this deficiency, researchers have attempted to introduce methods of embedding physical information, such as Physical Information Neural Networks (PINN), Physically Guided Deep Learning (PGDL), and Explainable Artificial Intelligence (XAI), to achieve better simulation and prediction of hydrological physical processes by combining physical constraints with data-driven models.
[0004] Furthermore, many river basins suffer from insufficient flow data due to a scarcity of observation stations or limited data collection conditions. For these data-scarce regions, combining the powerful predictive capabilities of deep learning with hydrophysical knowledge is a current research hotspot and challenge. Therefore, exploring a deep learning model that can integrate physical constraints can not only improve the accuracy of flow prediction but also enhance the model's interpretability and generalizability, which is of significant practical importance for strengthening flood early warning capabilities and optimizing water resource management. Summary of the Invention
[0005] The purpose of this application is to provide a multi-scale watershed flow prediction method, system, processor, and machine-readable storage medium that integrates physical constraints, so as to improve the flow prediction accuracy of the flow prediction model.
[0006] To achieve the above objectives, the first aspect of this application provides a multi-scale watershed flow prediction method that integrates physical constraints. The method includes: S1, acquiring time-series data and physical information of a target watershed; the time-series data includes historical meteorological data and hydrological variables of the target watershed collected at a fixed time frequency, and the physical information includes geographical features, soil properties, and hydrological patterns of the target watershed; S2, constructing an initial iTransformer model based on the physical information; S3, creating training samples using the time-series data; S4, training the initial iTransformer model using the training samples to obtain a flow prediction model for the target watershed; and S5, predicting flow data of the target watershed using the flow prediction model.
[0007] Based on the first aspect, in this embodiment of the application, the mathematical model expression of the hydrological law is as follows: (1); In equation (1), , and These represent the target watershed in the three-dimensional coordinate system. axis, shaft and Unit width flow rate in three axial directions; , , and These represent the target watershed at time step. The data include flow rate, rainfall, evapotranspiration, and changes in soil moisture content.
[0008] Based on the first aspect, in this embodiment of the application, the initial iTransformer model includes: an embedding layer module, used to embed the time series data and physical information into a high-dimensional space, and to combine the historical meteorological data, hydrological variables, physical information and time features to generate feature vectors through fixed encoding or learnable encoding.
[0009] Based on the first aspect, in this embodiment of the application, the initial iTransformer model includes: an encoder, used to extract hydrological sequence features of the target watershed at multiple scales based on a multi-head self-attention mechanism and a convolutional filter; wherein, the calculation formula for the self-attention mechanism is: (2); In equation (2), These represent the query vector, key vector, and value vector, respectively. Indicates the scaling factor. Represents the key vector The transpose of .
[0010] Based on the first aspect, in this embodiment of the application, the loss function of the initial iTransformer model is: (3); In equation (3), This represents the error between the model's predicted value and the actual value. This represents the traditional mean square error loss. This represents the loss due to physical constraints.
[0011] Based on the first aspect, in the embodiments of this application, the traditional mean square error loss The calculation formula is as follows: (4); In equation (4), This represents the weight value of the traditional mean squared error loss term; where, (4-1); In equation (4-1), Represents sample size. Represents the predicted step size. Represents the time step Predicted traffic, Represents the time step The actual traffic.
[0012] Based on the first aspect, in the embodiments of this application, the physical constraint loss includes extreme rainstorm constraint loss. Long-term drought-constrained losses The monotonic relationship between rainfall and flow rate constrains losses. Constraint loss due to the monotonic relationship between evapotranspiration and flow rate The expressions for the losses of the above constraint terms are as follows:
[0013] (5)
[0014] In equation (5), the function This represents the mapping relationship between each input feature and the predicted flow in the iTransformer model. Represents the activation function. Represents the length of the input sequence. Representing the Each sample point at time step Extremely heavy rainfall, Represents the time step No rainfall. and Representing the first Each sample point at time step Rainfall and evapotranspiration, and Representing the first Each sample point at time step Increased rainfall and evapotranspiration, Represents the sample size of extremely heavy rainfall. and These represent the time steps for extremely heavy rainfall and periods without rainfall, respectively. and These represent the quantities of different levels of increase in rainfall and evaporation, respectively; the physical constraint loss The calculation formula is as follows: (6); In equation (6), , , These represent the weight values of the corresponding constraint term losses.
[0015] Secondly, embodiments of this application provide a multi-scale watershed flow prediction system that integrates physical constraints. The system includes: an acquisition module for acquiring time-series data and physical information of a target watershed; the time-series data includes historical meteorological data and hydrological variables of the target watershed collected at a fixed time frequency; the physical information includes geographical features, soil properties, and hydrological patterns of the target watershed; a model building module for constructing an initial iTransformer model based on the physical information; a sample production module for producing training samples using the time-series data; a model training module for training the initial iTransformer model using the training samples to obtain a flow prediction model for the target watershed; and a flow prediction model for predicting flow data of the target watershed.
[0016] Thirdly, embodiments of this application provide a processor configured to execute the above-described multi-scale watershed flow prediction method incorporating physical constraints.
[0017] Fourthly, embodiments of this application provide a machine-readable storage medium storing instructions that, when executed by a processor, configure the processor to perform the aforementioned multi-scale watershed flow prediction method incorporating physical constraints.
[0018] The solution provided in this application has at least the following beneficial effects:
[0019] This application proposes a multi-scale watershed flow prediction method and system that integrates physical constraints. By introducing the concepts of Physical Information Neural Network (PINN) and Physically Guided Deep Learning (PGDL), it embeds fundamental hydrological principles into a deep learning model. This not only improves the accuracy of flow prediction but also significantly enhances the model's physical consistency and interpretability. Traditional deep learning methods are often "black box models" that cannot effectively reflect the hydrological mechanisms underlying flow changes. In contrast, this invention incorporates physical constraints into the loss function, ensuring that the prediction results satisfy the fundamental principles of hydrological science, thus greatly improving the model's adaptability and reliability under complex hydrological conditions.
[0020] Flow prediction can be applied to flood early warning, demonstrating the significant research and application value of combining deep learning with physical laws. In the future, this method can be further extended to other water conservancy fields, such as water resource allocation, river and lake ecological restoration, and hydrological response research under climate change. Through continuous optimization and expansion, this technology is expected to become a general-purpose intelligent tool for solving water conservancy problems, providing more scientific and efficient technical support for the construction of smart water conservancy.
[0021] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description
[0022] The accompanying drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the following detailed description to explain the embodiments of this application, but do not constitute a limitation on the embodiments of this application. In the drawings:
[0023] Figure 1 A flowchart illustrating a multi-scale watershed flow prediction method that incorporates physical constraints is shown schematically.
[0024] Figure 2 This illustration shows a schematic diagram of the algorithm flow of the iTransformer model in an embodiment of this application;
[0025] Figure 3 The schematic diagram illustrates the structure of a multi-scale watershed flow prediction system that incorporates physical constraints.
[0026] Explanation of reference numerals in the attached figures
[0027] 1-Acquisition module; 2-Model building module; 3-Sample creation module; 4-Model training module; 5-Traffic prediction model. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for illustration and explanation of the embodiments of this application and are not intended to limit the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0029] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.
[0030] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0031] Example 1
[0032] like Figure 1 As shown, the first aspect of this application provides a multi-scale watershed flow prediction method that integrates physical constraints. The method includes:
[0033] S1. Acquire time series data and physical information of the target watershed; the time series data includes historical meteorological data (time series of meteorological and hydrological variables such as historical flow, rainfall, temperature, and evaporation) and hydrological variables (flow velocity, water level, and flow) of the target watershed collected at a fixed time frequency. These data are collected at a fixed time frequency (such as hourly or daily) and constitute the main input source of the model; the physical information includes the geographical features of the target watershed (such as altitude, slope, and land cover type), soil characteristics (such as soil type and permeability), and / or hydrological laws (such as continuity equations and water balance constraints).
[0034] Specifically, the mathematical model expression for the aforementioned hydrological laws is as follows:
[0035] (1);
[0036] In equation (1), the first part represents the continuity equation, which is based on the principle of mass conservation and is one of the basic equations describing water flow; the second part represents the water balance constraint, which clearly controls the relationship between the input and output of water. , and These represent the target watershed in the three-dimensional coordinate system. axis, shaft and Unit width flow rate in three axial directions; , , and These represent the target watershed at time step. The data include flow rate, rainfall, evapotranspiration, and changes in soil moisture content.
[0037] By integrating the above features, the model can consider both historical observations and the physical characteristics and natural laws of the watershed, thereby achieving more accurate flow prediction. Each input feature undergoes appropriate preprocessing (such as handling missing values and standardization) to ensure its suitability for subsequent embedding layers and encoder processing.
[0038] S2. Construct an initial iTransformer model based on the physical information;
[0039] In this embodiment, the initial iTransformer model includes the following modules: embedding layer, encoder, and loss function. Figure 2 As shown, the algorithm flow of the iTransformer model is as follows:
[0040] 1) Model Input: Responsible for statistical processing of input data, incorporating the influence of geographic information and watershed attributes, and performing normalization operations on time-series meteorological data (e.g., rainfall, evapotranspiration, direct sunlight time, etc.) to eliminate differences between different units. At the same time, it integrates the physical constraint information of the watershed to provide high-quality input features for subsequent embedding layers and encoders.
[0041] 2) Embedding Layer Module: Tailored to the characteristics of time-series data, this module dynamically embeds each feature dimension into a high-dimensional space. It then combines temporal features, physical information, and observational data to generate feature vectors using either fixed or learnable encoding methods. This module integrates watershed hydrological characteristics and physical laws to ensure consistency of the input data across both the temporal and physical dimensions.
[0042] Specifically, the embedding layer is used to embed time-series data and physical information into a high-dimensional space, providing a foundation for subsequent feature extraction. Based on multiple hydrological time-series features, the embedding method is used to convert feature variables into fixed or learnable vector representations, combined with timeF encoding or learned encoding strategies. For the basic hydrological laws of the watershed, physical information is encoded into specific feature vectors, which are input into the model along with the observation data. The coupling embedding formula is as follows:
[0043] ;in Features The embedding vector.
[0044] 3) Encoder Module: Based on a multi-head self-attention mechanism and multi-scale feature extraction technology, this module captures the nonlinear correlations in time-series data and extracts the dependencies between multi-dimensional features. The encoder is the core of the iTransformer model, employing a multi-head self-attention mechanism and convolutional filters to achieve multi-scale extraction of hydrological features. Specifically, the encoder captures the global dependencies between meteorological and hydrological variables through a multi-head attention mechanism (requiring transpose operations for both time and feature dimensions). The attention calculation formula is as follows:
[0045] (2);
[0046] In equation (2), These represent the query vector, key vector, and value vector, respectively. Indicates the scaling factor. Represents the key vector The transpose of .
[0047] By incorporating convolutional filters and moving window averaging operations into the encoder, multi-scale hydrological sequence features are extracted, enhancing the model's ability to capture long-term temporal dependencies.
[0048] 4) Loss Function Module: Based on multi-head self-attention mechanism and multi-scale feature extraction technology, this module captures the nonlinear correlations in time series data and extracts the dependencies between multi-dimensional features. Through the collaborative work of convolutional filters and attention mechanisms, it enhances the model's ability to capture long-term temporal dependencies. In this embodiment, the loss function consists of two parts: the traditional mean squared error (MSE) loss and the physical constraint loss. The loss function of the initial iTransformer model is:
[0049] (3);
[0050] In equation (3), This represents the error between the model's predicted value and the actual value. This represents the traditional mean square error loss. This represents the loss due to physical constraints.
[0051] The traditional mean square error loss The calculation formula is as follows:
[0052] (4);
[0053] In equation (4), This represents the weight value of the traditional mean squared error loss term; where, (4-1); In equation (4-1), Represents sample size. Represents the predicted step size. Represents the time step Predicted traffic, Represents the time step The actual traffic.
[0054] The physical constraint loss includes the extreme rainfall constraint loss based on hydrological principles. Long-term drought-constrained losses The monotonic relationship between rainfall and flow rate constrains losses. Constraint loss due to the monotonic relationship between evapotranspiration and flow rate The expressions for the losses of the above constraint terms are as follows:
[0055] (5)
[0056] In equation (5), the function This represents the mapping relationship between each input feature and the predicted flow in the iTransformer model. Represents the activation function. Represents the length of the input sequence. Representing the Each sample point at time step Extremely heavy rainfall, Represents the time step No rainfall. and Representing the first Each sample point at time step Rainfall and evapotranspiration, and Representing the first Each sample point at time step Increased rainfall and evapotranspiration, Represents the sample size of extremely heavy rainfall. and These represent the time steps for extremely heavy rainfall and periods without rainfall, respectively. and These represent the different levels of increase in rainfall and evaporation, respectively.
[0057] Therefore, physical constraint loss The formula for calculation is:
[0058] (6);
[0059] In equation (6), , , These represent the weight values of the corresponding constraint term losses.
[0060] The model loss function is obtained by weighted summation of each loss term. That is, the objective function for training and optimizing the iTransformer model.
[0061] (7)
[0062] 5) Model output: The iTransformer model is used to generate the flow prediction sequence of the target watershed, and the prediction results are optimized by combining hydrological knowledge. Finally, a high-precision flow prediction result that conforms to physical laws is output.
[0063] S3. Use time series data to create training samples;
[0064] S4. Use the training samples to train the initial iTransformer model to obtain the flow prediction model for the target watershed.
[0065] S5. Use the flow prediction model to predict the flow data of the target watershed.
[0066] The initial iTransformer model extracts multi-scale temporal features from the input historical observation data (time series data) and directly outputs the flow prediction value for the target time step. Since the encoder has captured the global dependencies of the input sequence, the flow prediction model can accurately predict the flow change trend in future time steps. The predicted values are inversely normalized to convert them back to the original physical quantities, thus ensuring the interpretability and usability of the output results in practical applications.
[0067] The flow prediction model ensures that the prediction results conform to the basic laws of hydrology through embedded physical consistency constraints. This mechanism effectively reduces the occurrence of unreasonable predictions and improves the applicability of the prediction results in real-world scenarios. The superiority of the model's prediction performance is verified using evaluation metrics (such as mean squared error (MSE), Nash efficiency coefficient (NSE), and Pearson correlation coefficient r) by comparing the model with actual observation data.
[0068] Example 2
[0069] This embodiment provides a multi-scale watershed flow prediction system that integrates physical constraints, such as... Figure 3 As shown, the system includes: an acquisition module 1, used to acquire time-series data and physical information of the target watershed; the time-series data includes historical meteorological data and hydrological variables of the target watershed collected at a fixed time frequency, and the physical information includes the geographical features, soil properties, and hydrological patterns of the target watershed; a model building module 2, used to build an initial iTransformer model based on the physical information; a sample production module 3, used to produce training samples using the time-series data; a model training module 4, used to train the initial iTransformer model using the training samples to obtain a flow prediction model for the target watershed; and a flow prediction model 5, used to predict the flow data of the target watershed.
[0070] In addition, this embodiment also provides a processor configured to execute the multi-scale watershed flow prediction method that incorporates physical constraints as described in Embodiment 1.
[0071] In addition, this embodiment also provides a machine-readable storage medium storing instructions that, when executed by a processor, configure the processor to perform the multi-scale watershed flow prediction method incorporating physical constraints as described in Embodiment 1.
[0072] See Example 1 for details, which will not be repeated here.
[0073] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0074] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.
[0075] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0076] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0077] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0078] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0079] Computer-readable media include both permanent and non-permanent, removable and non-removable media, which can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0080] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0081] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A multi-scale watershed flow prediction method incorporating physical constraints, characterized in that, The method includes: Acquire time-series data and physical information of the target watershed; the time-series data includes historical meteorological data and hydrological variables of the target watershed collected at a fixed time frequency, and the physical information includes the hydrological patterns of the target watershed. Construct an initial iTransformer model based on the physical information; Training samples were created using time series data; The initial iTransformer model is trained using training samples to obtain the flow prediction model for the target watershed. The flow prediction model is used to predict flow data for the target watershed.
2. The multi-scale watershed flow prediction method integrating physical constraints according to claim 1, characterized in that, The mathematical model expression for the hydrological laws is as follows: (1) In equation (1), , and These represent the target watershed in the three-dimensional coordinate system. axis, shaft and Unit width flow rate in three axial directions; , , and These represent the target watershed at time step. The data include flow rate, rainfall, evapotranspiration, and changes in soil moisture content.
3. The multi-scale watershed flow prediction method integrating physical constraints according to claim 1, characterized in that, The initial iTransformer model includes: The embedding layer module is used to embed the time series data and physical information into a high-dimensional space, and to combine the historical meteorological data, hydrological variables, physical information and time features to generate feature vectors through fixed encoding or learnable encoding.
4. The multi-scale watershed flow prediction method integrating physical constraints according to claim 1, characterized in that, The initial iTransformer model includes: The encoder is used to extract hydrological sequence features of the target watershed at multiple scales based on a multi-head self-attention mechanism and convolutional filters. The calculation formula for the self-attention mechanism is as follows: (2) In equation (2), These represent the query vector, key vector, and value vector, respectively. Indicates the scaling factor. Represents the key vector The transpose of .
5. The multi-scale watershed flow prediction method integrating physical constraints according to claim 1, characterized in that, The loss function of the initial iTransformer model is: (3) In equation (3), This represents the error between the model's predicted value and the actual value. This represents the traditional mean square error loss. This represents the loss due to physical constraints.
6. The multi-scale watershed flow prediction method incorporating physical constraints according to claim 5, characterized in that, The traditional mean square error loss The calculation formula is as follows: (4) In equation (4), This represents the weight value of the traditional mean squared error loss term; where, (4-1); In equation (4-1), Represents sample size. Represents the predicted step size. Represents the time step Predicted traffic, Represents the time step The actual traffic.
7. The multi-scale watershed flow prediction method integrating physical constraints according to claim 6, characterized in that, The physical constraint loss includes extreme rainstorm constraint loss. Long-term drought-constrained losses The monotonic relationship between rainfall and flow rate constrains losses. Constraint loss due to the monotonic relationship between evapotranspiration and flow rate The expressions for the losses of the above constraint terms are as follows: (5) In equation (5), the function This represents the mapping relationship between each input feature and the predicted flow in the iTransformer model. Represents the activation function. Represents the length of the input sequence. Representing the Each sample point at time step Extremely heavy rainfall, Represents the time step No rainfall. and Representing the first Each sample point at time step Rainfall and evapotranspiration, and Representing the first Each sample point at time step Increased rainfall and evapotranspiration, Represents the sample size of extremely heavy rainfall. and These represent the time steps for extremely heavy rainfall and periods without rainfall, respectively. and These represent the quantities of different levels of increase in rainfall and evaporation, respectively. The physical constraint loss The calculation formula is as follows: (6) In equation (6), , , These represent the weight values of the corresponding constraint term losses.
8. A multi-scale watershed flow prediction system integrating physical constraints, characterized in that, The system includes: The acquisition module is used to acquire time series data and physical information of the target watershed; the time series data includes historical meteorological data and hydrological variables of the target watershed collected at a fixed time frequency, and the physical information includes the geographical features, soil properties and hydrological patterns of the target watershed; The model building module is used to build an initial iTransformer model based on the physical information; The sample creation module is used to create training samples from time series data. The model training module is used to train the initial iTransformer model using training samples to obtain the flow prediction model for the target watershed. Traffic forecasting models are used to predict traffic data for a target watershed.
9. A processor, characterized in that, It is configured to perform the multi-scale watershed flow prediction method that incorporates physical constraints as described in any one of claims 1 to 7.
10. A machine-readable storage medium storing instructions thereon, characterized in that, When executed by a processor, this instruction causes the processor to be configured to perform the multi-scale watershed flow prediction method incorporating physical constraints as described in any one of claims 1 to 7.