Synthetic flow flood forecasting method, system and equipment fusing physical mechanism and deep learning and medium

By constructing a watershed channel cross-section network and a spatiotemporal neural network model, and combining rainfall and soil moisture characteristics, the dependence of historical floods was analyzed. This solved the problems of independent propagation time and failure to consider rainfall effects in the traditional synthetic flow method, and achieved more accurate flood inflow forecasts.

CN121541300APending Publication Date: 2026-02-17NANJING HEHAI NANZI HYDROPOWER AUTOMATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511617841.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

In the existing synthetic flow method, the correspondence between the flow at each upstream station and the propagation time of the river section is independent of each other, and the changes in propagation time with flow and flow during rainfall are not considered, which leads to the error of the predicted inflow value and peak time exceeding the acceptable range.

Method used

By acquiring cross-sectional distribution data and rainfall station data of the main stream and tributary river sections, a cross-sectional network of the watershed is constructed. The river section propagation time under different flow rates is tested, and a basic propagation time model without rainfall is constructed. Combining the spatiotemporal characteristics of rainfall and the soil moisture spatial matrix, a spatiotemporal graph neural network model is used to analyze the long-term dependencies of historical floods, construct a flow forecast model, and superimpose the inflow without rainfall and the rainfall-corrected inflow to generate a downstream flood inflow forecast.

Benefits of technology

This will allow for a more comprehensive capture of the spatiotemporal variations in rainfall and soil moisture, improving the accuracy and adaptability of flood forecasts, reducing forecast deviations under extreme weather conditions, providing more preparation time for flood control operations, and minimizing casualties and property losses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121541300A_ABST
    Figure CN121541300A_ABST
Patent Text Reader

Abstract

The invention discloses a synthetic flow flood forecasting method, system, equipment and medium fusing a physical mechanism and deep learning, and belongs to the technical field of hydrology and water resources, and the method comprises the steps: obtaining the section distribution data and rainfall site distribution data of a main stream and branch river reach, and constructing a watershed river section network; and through the watershed river section network, testing river reach basic propagation time under different flows in a rainfall-free period to obtain a flow-propagation time corresponding relation, and constructing a rainfall-free basic propagation time model based on a reverse interpolation method. According to the method, a physical mechanism and deep learning are fused, section distribution of main streams and branch streams and rainfall site data are fully utilized, watershed river channel characteristics are accurately described, river reach propagation time laws under different flows are effectively obtained, rainfall-free reservoir flow and rainfall correction inflow are comprehensively integrated, and the timeliness of downstream flood reservoir forecasting is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of hydrology and water resources, and particularly relates to a synthetic flow flood forecasting method, system, device and medium fusing physical mechanism and deep learning. BACKGROUND

[0002] In a basin with many tributary river sections, if the tributary inflow is large and the flood of the main stream and tributary interferes with each other, and the corresponding water level method and other forecasting methods do not work well, the synthetic flow method can be used. This method can better solve the problem of interference of multiple tributaries by superimposing the flows of different sections of the main stream and tributary according to the propagation time, and considering the rainfall in the period.

[0003] In the commonly used synthetic flow method, the correspondence between the flow of each upstream station and the river section propagation time is independent of each other, and for each river section, the river section propagation time adopts a fixed value, neither considering that the propagation time changes with the flow, nor considering the change of the flow during rainfall; this leads to the error of the final predicted inflow value and peak time after the superposition of each river section exceeding the qualified range. SUMMARY

[0004] To solve the above technical problems, a synthetic flow flood forecasting method fusing physical mechanism and deep learning is proposed, which comprises: acquiring section distribution data of the main stream and tributary river sections and rainfall station distribution data, and constructing a basin river section network; through the basin river section network, the basic propagation time of the river section under different flows is tested in the no-rain period to obtain the flow-propagation time correspondence, and a no-rain basic propagation time model is constructed based on the reverse interpolation method; through the no-rain basic propagation time model, a spatio-temporal graph neural network model is constructed combining the rainfall station spatio-temporal matrix and soil moisture space matrix in the rainfall period to obtain the rainfall spatio-temporal characteristics; the rainfall spatio-temporal characteristics are combined to analyze the long sequence dependence relationship of historical flood by a long sequence transformer model to obtain an interval net inflow correction term; based on the interval net inflow correction term, a flow forecasting model is constructed combining the water surface rainfall increment inflow and slope rainfall increment inflow; through the flow forecasting model, the pre-determined no-rain inflow and rainfall correction inflow are superimposed to generate downstream flood inflow prediction.

[0005] As a preferred scheme of the synthetic flow flood forecasting method fusing physical mechanism and deep learning, the method comprises: acquiring the propagation time of each river section under different flow levels to construct a flow-propagation time data table; based on the flow-propagation time data table, a reverse mapping relationship from flow to propagation time is constructed by using a nonlinear fitting method.

[0006] As a preferred scheme of the synthetic flow flood forecasting method fusing physical mechanism and deep learning, in the scheme, the constructing of the rainfall-free basic propagation time model based on the reverse interpolation method comprises: calculating the propagation time of the upstream flow sequence based on the reverse mapping relationship to obtain a propagation time sequence; processing the propagation time sequence through the integral point flow sequence reconstruction method to obtain a flow sequence of integral points arriving at the downstream; and integrating the flow sequence of integral points arriving at the downstream to obtain a downstream inflow flow process without rainfall.

[0007] As a preferred scheme of the synthetic flow flood forecasting method fusing physical mechanism and deep learning, in the scheme, the constructing of the rainfall-free basic propagation time model based on the reverse interpolation method comprises: calculating the propagation time of the upstream flow sequence based on the reverse mapping relationship to obtain a propagation time sequence; processing the propagation time sequence through the integral point flow sequence reconstruction method to obtain a flow sequence of integral points arriving at the downstream; and integrating the flow sequence of integral points arriving at the downstream to obtain a downstream inflow flow process without rainfall.

[0008] The preferred technical scheme has the beneficial effects that the spatiotemporal variation law of rainfall and soil moisture can be more comprehensively captured, the basis for flood forecasting is more sufficient, information omission is reduced, the fitting degree of the forecast is improved, the scheme can better adapt to different regional topography and climate conditions, can stably play a role in both rainy and dry regions, reduces the forecast deviation under extreme weather, accurately predicts the flood occurrence time and magnitude in advance, gains more preparation time for flood control and regulation, and reduces personnel casualties and property losses caused by floods.

[0009] As a preferred scheme of the synthetic flow flood forecasting method fusing physical mechanism and deep learning, in the scheme, the constructing of the rainfall-free basic propagation time model based on the reverse interpolation method comprises: calculating the propagation time of the upstream flow sequence based on the reverse mapping relationship to obtain a propagation time sequence; processing the propagation time sequence through the integral point flow sequence reconstruction method to obtain a flow sequence of integral points arriving at the downstream; and integrating the flow sequence of integral points arriving at the downstream to obtain a downstream inflow flow process without rainfall.

[0010] As a preferred scheme of the synthetic flood flow forecasting method combining physical mechanism and deep learning, wherein: based on the interval net inflow correction term, combined with the water surface rainfall increment inflow and the slope surface rainfall increment inflow, the flow forecasting model is constructed, including: using radar rainfall data to superimpose the river water surface vector layer, calculating the water surface net rainfall, and obtaining the water surface rainfall increment inflow; based on the previous soil wet process and continuous rainfall process of the rainfall station, combined with the interval net inflow correction term, the slope surface rainfall increment inflow is obtained; superimposing the water surface rainfall increment inflow, the slope surface rainfall increment inflow and the downstream storage flow process without rainfall, the flow forecasting model is obtained.

[0011] As a preferred scheme of the synthetic flood flow forecasting method combining physical mechanism and deep learning, wherein: through the flow forecasting model, superimposing the predetermined non-rainfall storage flow and the rainfall correction inflow, the downstream flood storage forecast is generated, including: based on the predetermined training data set, the parameters of the spatio-temporal graph neural network model and the long sequence transformer model are optimized, and the optimized rainfall correction inflow is obtained; through the test data set independent and complementary to the training data set, the optimized rainfall correction inflow is verified, and the generalized downstream storage forecast is obtained; superimposing the non-rainfall downstream storage flow process and the generalized downstream storage forecast, the final downstream flood storage forecast hydrograph is obtained.

[0012] The beneficial effects of the preferred technical scheme are: through the training data set, the parameters of the spatio-temporal graph neural network model and the long sequence transformer model are optimized, the fitting accuracy of the rainfall correction inflow is improved, the independent and complementary test data set is used to verify the optimization result, the generalization ability of the rainfall correction inflow is enhanced, the non-rainfall storage flow is superimposed with the generalized downstream storage forecast, the downstream flood storage forecast hydrograph is perfected, the rationality and comprehensiveness of the flood forecasting are effectively improved, the application range of the scheme in different hydrological scenes is widened, and a more scientific basis is provided for flood prevention and control decision-making.

[0013] As a preferred scheme of the synthetic flow flood forecasting system fusing physical mechanism and deep learning, it is characterized in that: a network construction module is used to acquire cross-section distribution data of trunk stream and tributary river sections and rainfall station distribution data, and construct a river basin river section network; a propagation module is used to test river section basic propagation time under different flows in a rainfall-free period through the river basin river section network, obtain flow-propagation time correspondence, and construct a rainfall-free basic propagation time model based on a reverse interpolation method, which is used to calculate downstream integral point inflow; a space-time module is used to construct a space-time graph neural network model by combining the rainfall-free basic propagation time model, rainfall station space-time matrix and soil moisture space matrix in a rainfall period, and obtain rainfall space-time characteristics; a transformation module is used to analyze historical flood long sequence dependence by combining the rainfall space-time characteristics through a long sequence transformer model, and obtain an interval net inflow correction term; a fusion module is used to construct a flow forecasting model based on the interval net inflow correction term, combined with water surface rainfall increment inflow and slope rainfall increment inflow; and a forecasting process generation module is used to generate downstream flood storage forecasting by superimposing pre-determined rainfall-free storage flow and rainfall correction inflow through the flow forecasting model.

[0014] A computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the synthetic flow flood forecasting method fusing physical mechanism and deep learning when executing the computer program.

[0015] A computer readable storage medium stores a computer program, and the computer program implements the steps of the synthetic flow flood forecasting method fusing physical mechanism and deep learning when executed by a processor.

[0016] The present application has the following beneficial effects: fusing physical mechanism and deep learning, fully utilizing trunk stream and tributary cross-section distribution and rainfall station data, accurately depicting river basin river characteristics, effectively obtaining river section propagation time rules under different flows, accurately capturing rainfall space-time characteristics and soil moisture space correlation, deeply mining historical flood long sequence dependence, reasonably correcting interval net inflow and propagation time, fully integrating rainfall-free storage flow and rainfall correction inflow, significantly improving the timeliness of downstream flood storage forecasting, providing a scientific basis for flood control decision-making, and helping to reduce flood disaster risk. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0018] Figure 1 A network structure diagram of a synthetic flow flood forecasting method combining physical mechanism and deep learning is provided for an embodiment of the present application.

[0019] Figure 2 A basin section distribution and rainfall site distribution diagram of a synthetic flow flood forecasting method combining physical mechanism and deep learning is provided for an embodiment of the present application.

[0020] Figure 3 A comparison diagram of a measured and predicted process line of a synthetic flow flood forecasting method combining physical mechanism and deep learning is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to make the above objectives, characteristics and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.

[0022] Embodiment 1, with reference to Figure 1 For the first embodiment of the present application, the embodiment provides a synthetic flow flood forecasting method combining physical mechanism and deep learning, comprising: S1: Obtain the section distribution data of the main stream and tributary river sections and the rainfall site distribution data, and construct a basin river section network.

[0023] S2: Through the basin river section network, test the river section basic propagation time under different flows during the rainfall-free period, obtain the flow-propagation time corresponding relationship, and construct a rainfall-free basic propagation time model based on the reverse interpolation method.

[0024] S3: Through the rainfall-free basic propagation time model, combine the rainfall site space-time matrix and the soil moisture space matrix during the rainfall period, construct a space-time graph neural network model, and obtain the rainfall space-time characteristics.

[0025] S4: Combine the rainfall space-time characteristics, analyze the historical flood long sequence dependence relationship through a long sequence transformer model, and obtain an interval net inflow correction term.

[0026] S5: Based on the interval net inflow correction term, combine the water surface rainfall incremental inflow and the slope surface rainfall incremental inflow, construct a flow forecasting model, S6: Through the flow forecasting model, superimpose the pre-determined rainfall-free inflow and the rainfall correction inflow, and generate a downstream flood inflow forecast.

[0027] It should be noted that in the existing synthetic flow method, the corresponding relationship between the flow of each upstream site and the river section propagation time is independent of each other, and for each river section, the river section propagation time adopts a fixed value, neither considering that the propagation time changes with the flow, nor considering the change of flow during rainfall, which leads to the error of the final predicted inflow value and peak time of each river section after successive superposition, exceeding the qualified range; the traditional method cannot accurately reflect the dynamic change of river propagation time, cannot effectively process the influence of rainfall on river flow, resulting in low prediction accuracy.

[0028] Therefore, in view of the above problems, the present application acquires section data to construct a river section network of a basin through steps S1-S6, accurately reflects the dynamic relationship between river section propagation time and flow by testing propagation time under different flows and constructing a basic propagation time model; then constructs a spatio-temporal graph neural network model combining the spatio-temporal matrix of rainfall and the soil moisture spatial matrix, effectively capturing the spatio-temporal characteristics of rainfall influence; then analyzes the long sequence dependence relationship of historical floods using a long sequence transformer model to accurately predict the interval net inflow correction term; finally, combines the water surface and slope rainfall increment inflow to construct a flow prediction model, significantly improves the prediction accuracy, and provides a more accurate scientific basis for flood prediction.

[0029] Embodiment 2, refer to Figure 1 The second embodiment of the present application is different from the first embodiment in that: a synthetic flow flood prediction method combining physical mechanism and deep learning further comprises: Specifically, in step S1, the section distribution data of the main stream and tributary river sections and the rainfall station distribution data are acquired to construct a river section network of a basin, including the following steps A1-A2: A1: Acquire the propagation time of each river section under different flow levels to construct a flow-propagation time data table; A2: Based on the flow-propagation time data table, a nonlinear fitting method is used to construct the reverse mapping relationship of flow to propagation time.

[0030] In the present application embodiment, in step A1, to acquire the propagation time of each river section under different flow levels and construct a flow-propagation time data table, the method is to record the propagation time of a specific river section under multiple flow conditions through observation and artificial water regulation, including the following steps A111-A113: A111: When natural flood observation conditions allow or upstream water conservancy projects can be artificially regulated, select representative distribution flow values. These flow values cover a variety of working conditions from low flow to high flow to reflect the typical change range of river flow.

[0031] A112: Set up upstream and downstream sections on selected river reaches, and use the floating buoy method to record the time it takes for the buoy to travel from the upstream section to the downstream section, which is taken as the travel time under that flow condition. Through multiple measurements and tests at different flow values, a dataset containing flow values and their corresponding travel times is constructed.

[0032] For example, in actual operation, for a certain tributary river section, in the presence of water conservancy projects upstream, artificial water diversion can be combined with power generation flow to test and record the travel time under multiple representative flow values (such as several flow values selected between the maximum and minimum annual flow of the river).

[0033] A113: Organize these measured flow and travel time data to form a detailed data table for use in subsequent steps to establish a nonlinear relationship model between flow and travel time, ensuring that the model can reflect the impact of different flows on travel time.

[0034] In an optional embodiment, to obtain the travel time of each river section under different flow levels and construct a flow-travel time data table, the method can also be to calculate the travel time through a combination of historical hydrological data analysis and hydraulic model simulation, including the following steps A121-A123: A121: Collect historical hydrological data for a specific river section, including flow process and water level process, combined with known river section information and roughness parameters.

[0035] A122: Use a professional hydraulic model (such as a one-dimensional or two-dimensional hydrodynamic model) to input historical flow data and river physical parameters, simulate water flow under different flow conditions, and extract the travel time of each river section from the simulation results.

[0036] A123: Based on the simulation results, construct a data table containing various flow levels and their corresponding travel times to make up for the limitations of field testing, especially under extreme flow conditions where artificial water diversion is difficult.

[0037] In another optional embodiment, to obtain the travel time of each river section under different flow levels and construct a flow-travel time data table, the method can also be to estimate the travel time through remote sensing image analysis and feature point tracking, including the following steps A131-A134: A131: Obtain remote sensing images taken at different flow levels, which need to have sufficient temporal and spatial resolution to capture the characteristics of water surface flow.

[0038] A132: Identify obvious feature points on the water surface (such as water surface texture, floating objects, etc.) on the remote sensing images, and use image processing techniques to track these feature points across time-series images.

[0039] A133: Calculate the average flow velocity of the water body under different flow conditions according to the displacement distance of the feature points and the time interval of the image, and then estimate the propagation time of each river section.

[0040] A134: Aggregate these propagation times estimated based on remote sensing data and match them with the corresponding flow values to form a flow-propagation time data table, which serves as an auxiliary data source, especially for remote river sections that are difficult to measure or model in the field.

[0041] It should be noted that the purpose of obtaining flow-propagation time data in different ways is to establish a reliable relationship between flow and propagation time, and these data will be used for subsequent nonlinear fitting to ensure that the propagation time can be reasonably estimated under various flow conditions, thereby providing data support for the construction of the non-rainfall-based propagation time model.

[0042] Further, in step S2, through the river channel section network of the basin, the river section basic propagation time under different flow rates is tested during the non-rainfall period to obtain the flow-propagation time corresponding relationship, and a non-rainfall-based propagation time model is constructed based on the reverse interpolation method, including the following steps B1-B3: B1: Based on the reverse mapping relationship, the upstream flow sequence is calculated to obtain the propagation time sequence; B2: The propagation time sequence is processed by the integral point flow sequence reconstruction method to obtain the integral point flow sequence arriving at the downstream; B3: The integral point flow sequence arriving at the downstream is integrated to obtain the non-rainfall downstream inflow flow process.

[0043] In the embodiment of the present application, in step B2, the integral point flow sequence arriving at the downstream is obtained by processing the propagation time sequence through the integral point flow sequence reconstruction method, which is achieved by time correction and reconstruction of upstream flow data according to upstream integral point flow and calculated propagation time, including the following steps B211-B213: B211: For each integral point outflow data of the upstream, the time point at which the flow actually arrives at the downstream is determined according to the propagation time calculated in step B1. Since the propagation time is usually not an integral point value, the time at which the flow arrives at the downstream may not be an integral point.

[0044] B212: Process these non-integral point flow data arriving at the downstream, for example, for a certain upstream integral point flow and its corresponding non-integral point propagation time, the corresponding upstream flow value at the time point exactly reaching the downstream integral point time is inversely calculated according to the linear change relationship between adjacent upstream integral point flows.

[0045] B213: Through this time correction and reconstruction, the originally scattered non-instantaneous flow sequences are transformed into a series of flow values ​​arriving at the downstream instantaneous time. These instantaneous flow sequences will provide normalized data for subsequent calculation of the total inflow process using convolution formulas.

[0046] In an optional embodiment, for processing the propagation time series through the hourly traffic sequence reconstruction method to obtain the traffic sequence arriving downstream at the hour, the method can also be to use the time step adjustment and weighted average method, including the following steps B221-B223: B221: Identify the non-integer portions in the propagation time series corresponding to the upstream hourly outflow, and adjust these non-integer propagation times according to the required time interval (e.g., hourly step) to make them fall into the nearest hourly time step.

[0047] B222: For each downstream time step, if there are multiple flows from upstream that, after their propagation time is adjusted, all fall within that time step, then these flows are weighted and averaged according to the proximity of their propagation times to obtain the flow value arriving downstream at that hour.

[0048] B223: This method ensures that there is a representative inflow value at each downstream point, avoiding data loss and providing a continuous data stream for subsequent flow aggregation calculations.

[0049] In another optional embodiment, for processing the propagation time series using the hourly flow sequence reconstruction method to obtain the flow sequence arriving downstream at the hour, the method can also be to use a frequency domain reconstruction method based on Fourier transform, including the following steps B231-B234: B231: Convert the upstream flow sequence into a frequency domain representation and obtain its frequency components through Fourier transform.

[0050] B232: Analyze the propagation time series, treat it as a time delay, and correct the phase of the flow in the frequency domain.

[0051] B233: Transform the corrected frequency domain representation back into the time domain to obtain the continuous flow process after propagation time correction.

[0052] B234: Extract the flow value corresponding to the downstream time step at the hour from the continuous flow process to form the flow sequence that arrives downstream at the hour. This method is particularly suitable for handling complex flow fluctuations.

[0053] It should be noted that, regardless of the reconstruction method used, the purpose is to transform the upstream hourly outbound flow data into a flow sequence that arrives downstream at fixed time intervals (e.g., at the hour) by taking into account its corresponding propagation time.

[0054] Furthermore, in step S3, a spatiotemporal graph neural network model is constructed using a no-rainfall basic propagation time model, combined with the spatiotemporal matrix of rainfall stations and the soil moisture spatial matrix during rainfall periods, to obtain the spatiotemporal characteristics of rainfall, including the following steps C1-C3: C1: Integrate the spatiotemporal matrix of rainfall stations with the soil moisture spatial matrix to construct a multi-source input feature field; C2: Based on the spatial adjacency relationship of the sites, establish a spatial dependency model of rainfall and soil moisture; C3: By using a spatiotemporal joint modeling mechanism, spatial dependence and time series dynamics are integrated to generate spatiotemporal features that characterize the impact of rainfall.

[0055] In this embodiment of the application, step C2 involves establishing a spatial dependency model between rainfall and soil moisture based on the spatial adjacency relationship of rain gauge stations. This is achieved by constructing a graph structure to represent the spatial topological relationship of rainfall stations and using graph convolution operations to capture spatial correlations, including the following steps C211-C213: C211: First, based on the geospatial location information (such as latitude and longitude) of each rainfall station, determine their spatial adjacency. This relationship can be established by calculating the distance between stations, determining whether they are within a specific radius, or based on the water system connectivity of the basin, forming a graph structure in which each rainfall station represents a node in the graph.

[0056] C212: Then, using the principle of Graph Convolutional Networks (GNNs), spatial convolution operations are performed on the rainfall and soil moisture features of each rain gauge station on the same time slice. This operation ensures that the features of each station not only contain its own information, but also incorporate the rainfall and soil moisture status information of its neighboring stations, thereby capturing the spatial interaction and propagation effects of rainfall and soil moisture.

[0057] For example, at a specific moment, the rainfall intensity of a rain gauge station will be affected by the rainfall intensity of its surrounding rain gauge stations, or the soil moisture in a certain area will affect the runoff characteristics of its surrounding area. Graph convolution operations can effectively simulate this spatial interdependence.

[0058] C213: In this way, the spatial dependence model of rainfall and soil moisture can quantify and represent the distribution and interaction patterns of rainfall and soil moisture in the watershed space, providing important spatial dimension features for subsequent spatiotemporal joint modeling, and avoiding information loss caused by simple averaging or independent processing.

[0059] In an optional embodiment, for establishing a spatial dependency model of rainfall and soil moisture based on site spatial adjacency, the method can also be to establish the spatial dependency model using a distance-weighted average method, including the following steps C221-C223: C221: For each rainfall station, calculate its geographical distance to all other rainfall stations within the watershed.

[0060] C222: Based on these distances, assign a weight to each neighboring site. Generally, the closer the site is, the greater the weight, and the farther the site is, the smaller the weight.

[0061] C223: When calculating the rainfall or soil moisture characteristics of a certain station, its own characteristics are weighted and averaged with the characteristics of all neighboring stations to reflect the spatial mutual influence and form a spatial dependence model of rainfall and soil moisture.

[0062] In another optional embodiment, for establishing a spatial dependency model of rainfall and soil moisture based on site spatial adjacency, the method can also be to adopt a spatial dependency model based on physical connectivity, including the following steps C231-C234: C231: Analyze the water system network and topographic features within the watershed to identify physical connectivity paths between rainfall stations, such as through rivers and ditches.

[0063] C232: Construct an adjacency matrix based on physical connectivity. If there is a direct hydrological connection between two stations, they are considered to be adjacent.

[0064] C233: Based on this, graph neural networks or other models suitable for graph structure data are used to capture the patterns of rainfall and soil moisture transmission and influence through hydrological pathways.

[0065] C234: Establish a spatially dependent model that better reflects hydrophysical processes to more accurately reflect the spatial distribution characteristics of rainfall and soil moisture and their mutual influence.

[0066] It should be noted that the spatial dependence model of rainfall and soil moisture aims to capture how rainfall and soil moisture information at different rainfall stations within the watershed interact. This helps overcome the errors caused by simple surface averaging of rainfall in traditional methods, ensuring that the model can fully utilize spatial information.

[0067] Furthermore, in step S4, combining the spatiotemporal characteristics of rainfall, the long-sequence dependency of historical floods is analyzed using a long-sequence transformer model to obtain the interval net inflow correction term, including the following steps D1-D4: D1: Eliminating upstream outflows during historical floods without rainfall, we obtain the net inflow process within the interval; D2: Construct the encoder input sequence, including rainfall processes and soil wetting processes at rain gauge stations; D3: The encoder input sequence is processed through a multi-head self-attention layer and a feedforward neural network layer to obtain long sequence encoding features; D4: By combining long sequence coding features and rainfall spatiotemporal features through the decoder cross-attention layer, the interval net inflow correction term is obtained.

[0068] In this embodiment of the application, step D3, which involves processing the encoder input sequence through a multi-head self-attention layer and a feedforward neural network layer to obtain long sequence encoding features, utilizes a self-attention mechanism to capture long-term dependencies within the input sequence and enhances feature representation through nonlinear transformation, including the following steps D311-D313: D311: The constructed encoder input sequence (containing rainfall and soil wetting processes at rain gauge stations) is input into the encoder part of the Transformer model. The encoder contains multiple stacked layers, each consisting of a multi-head self-attention layer and a feedforward neural network layer.

[0069] D312: In a multi-head self-attention layer, the model can learn information from different "representation subspaces" of the input sequence simultaneously. This means it can focus on various relationships between elements at different positions in the input sequence in parallel, such as the lag relationship between historical rainfall and soil wetness, or changes in rainfall patterns at different points in time.

[0070] For example, one focus might be on capturing the cumulative effects of long-term rainfall, while another focus might be on the impact of short-term abrupt changes in rainfall intensity on soil moisture.

[0071] D313: After processing by the self-attention layer, the sequence enters a feedforward neural network layer. This layer performs nonlinear transformation and processing on the information output by the self-attention layer, further enhancing the model's expressive power and the depth of feature extraction, thereby obtaining long sequence coding features that can effectively characterize the long sequence dependencies of historical floods.

[0072] In an optional embodiment, for processing the encoder input sequence through a multi-head self-attention layer and a feedforward neural network layer to obtain long sequence encoded features, the method can also be to combine a multi-head self-attention layer with positional encoding with a convolutional neural network, including the following steps D321-D323: D321: Before feeding the encoder input sequence into the multi-head self-attention layer, additional position encoding is added to provide position information of the elements in the sequence, because the standard self-attention mechanism is position-independent.

[0073] D322: Combines a multi-head self-attention layer with a one-dimensional convolutional neural network layer to replace or assist the feedforward neural network layer in order to capture the features of time series in a local range, thereby better integrating local and global temporal dependencies.

[0074] D323: This combination enables the model to capture long sequence dependencies while also effectively processing local patterns in the sequence, thereby obtaining richer and more comprehensive long sequence encoding features.

[0075] In another alternative embodiment, for processing the encoder input sequence through a multi-head self-attention layer and a feedforward neural network layer to obtain long sequence encoded features, the method can also be to adopt a hierarchical encoder structure and a gating mechanism, including the following steps D331-D334: D331: Construct a hierarchical encoder structure where the lower layers encode short-term, local rainfall and soil moisture features, while the higher layers integrate these local features to encode long-term, global dependencies.

[0076] D332: Introduce gating mechanisms between each layer of the encoder, such as using a gated recurrent unit (GRU) or a variant of a long short-term memory network (LSTM), to control the flow of information, allowing the model to selectively remember and forget information.

[0077] D333: Through this hierarchical and gating structure, the model can more effectively process complex long-sequence data, abstracting and extracting time-dependent features at different granularities layer by layer.

[0078] D334: The final long sequence coding features not only contain comprehensive historical information, but can also be effectively represented according to different time scales, providing a more refined input for the subsequent decoder to generate interval net inflow correction terms.

[0079] It should be noted that the use of multi-head self-attention layers and feedforward neural network layers to process the encoder input sequence aims to fully explore the deep temporal relationships of rainfall and soil moisture processes in historical flood sequences. These long-sequence encoded features form the basis for calculating the interval net inflow correction term. They can overcome the "memory bottleneck" problem that traditional models may encounter when processing long-term series data, thus more accurately reflecting the watershed's response to historical rainfall and soil moisture changes.

[0080] Furthermore, in step S5, based on the interval net inflow correction term, and combining the incremental inflow from surface rainfall and the incremental inflow from slope rainfall, a flow forecasting model is constructed. This model is then used to overlay a pre-determined inflow without rainfall with the rainfall-corrected inflow to generate a downstream flood inflow forecast, including the following steps E1-E3: E1: By overlaying radar rainfall data with a river surface vector layer, the net rainfall on the water surface is calculated to obtain the incremental inflow of rainfall on the water surface; E2: Based on the soil wetting process and continuous rainfall process of the rainfall station in the early stage, combined with the interval net inflow correction term, the incremental inflow of slope rainfall is obtained; E3: The flow forecasting model is obtained by superimposing the incremental inflow of surface rainfall, the incremental inflow of slope rainfall, and the downstream inflow process when there is no rainfall.

[0081] In this embodiment of the application, in step E2, based on the soil wetting process and continuous rainfall process of the rainfall station in the early stage, and combined with the interval net inflow correction term, the incremental inflow of slope rainfall is obtained. The method is to use a trained spatiotemporal graph neural network and a Transformer model to predict the incremental inflow generated by slope runoff according to real-time rainfall and soil wetting information, including the following steps E211-E213: E211: Real-time anterior soil moisture processes and continuous rainfall processes from rainfall stations are used as inputs and fed into pre-trained spatiotemporal graph neural network models and transformer models. These models have learned the complex nonlinear relationships between rainfall, soil moisture, and inter-regional net inflow using historical flood data.

[0082] E212: The spatiotemporal graph neural network model first captures the spatial distribution characteristics and temporal dynamic changes of rainfall and soil moisture, generating spatiotemporal rainfall features. Subsequently, the transformer model utilizes these spatiotemporal rainfall features, combined with long-term dependencies of historical floods, to output an accurate interval net inflow correction term.

[0083] For example, when rainfall increases in a certain area and soil moisture has reached a certain level, the model will infer, based on the learned patterns, that slope runoff will increase significantly and quantify it as a corresponding incremental inflow.

[0084] E213: Finally, the net inflow correction term for this interval is used as an estimate of the incremental inflow from slope rainfall. This estimate reflects the additional water entering the river channel via slope runoff, taking into account the effects of rainfall and soil wet dynamics. This allows the model to more accurately reflect the impact of rainfall on flood processes, compensating for the inadequacy of slope runoff estimation in traditional methods.

[0085] In an optional embodiment, for the incremental inflow of slope rainfall based on the soil wetting process and continuous rainfall process of the rainfall station, combined with the interval net inflow correction term, the method can also be to combine the physical runoff model with the correction term, including the following steps E221-E223: E221: First, using traditional physical runoff models (such as the Xin'anjiang model, conceptual hydrological models, etc.), input the pre-soil wetting process and continuous rainfall process of the rainfall station to calculate the preliminary slope runoff process.

[0086] E222: Then, the obtained interval net inflow correction term is used as a supplement or correction to the physical runoff model to adjust the preliminary calculated slope runoff in order to make up for the possible errors in the physical model under complex watershed conditions.

[0087] E223: The final corrected runoff process is the slope rainfall increment inflow, which combines the interpretability of physical mechanisms with the fitting ability of deep learning.

[0088] In another optional embodiment, for the incremental inflow of slope rainfall based on the soil wetting process and continuous rainfall process of the rainfall station, combined with the interval net inflow correction term, the method can also be to use a remote sensing runoff generation model and machine learning correction, including the following steps E231-E234: E231: Using remote sensing data (such as soil moisture, vegetation index, etc.) combined with rainfall information, slope runoff is estimated through a remote sensing runoff model.

[0089] E232: Collect data on the difference between historical remote sensing runoff estimates and actual runoff.

[0090] E233: Construct a machine learning model (such as support vector machine, random forest, etc.), use these differential data as training samples, and use the interval net inflow correction term as input features to train the model to correct the estimation bias of the remote sensing runoff model.

[0091] E234: Using remote sensing runoff results corrected by machine learning models as incremental slope rainfall inflow, this method makes full use of multi-source data and advanced machine learning technology.

[0092] It should be noted that accurate estimation of incremental inflow from slope rainfall is an integral part of flow forecasting models. Whether predicted directly through deep learning models or corrected by combining physical models or remote sensing runoff generation models, the goal is to more comprehensively and accurately reflect the impact of rainfall on watershed runoff generation, thereby improving the accuracy of the final flood forecast.

[0093] Furthermore, in step S6, a downstream flood inflow forecast is generated by superimposing a pre-determined inflow without rainfall and a rainfall-corrected inflow using a flow forecast model, including the following steps F1-F3: F1: Based on a pre-determined training dataset, optimize the parameters of the spatiotemporal graph neural network model and the long sequence transformer model to obtain the optimized rainfall-corrected inflow; F2: Validate the optimized rainfall-corrected inflow using a test dataset that is independent of and complementary to the training dataset, and obtain a generalized downstream inflow forecast; F3: By superimposing the downstream inflow process without rainfall with the generalized downstream inflow forecast, the final downstream flood inflow forecast process line is obtained.

[0094] In this embodiment of the application, step F1, which optimizes the parameters of the spatiotemporal graph neural network model and the long sequence transformer (Transformer) model based on the training set to obtain the optimized rainfall correction inflow, is carried out by iteratively training and adjusting the internal parameters of the model to minimize the forecast error, including the following steps F111-F113: F111: Prepare a training set containing a large amount of historical rainfall, soil moisture, and actual inflow data. This dataset is used for the model's learning process, with one portion of the data serving as the model's input and the other portion serving as the reference true values ​​for the model's output.

[0095] F112: During the training phase, the model generates forecast results based on the input data and compares them with the actual inflow traffic data in the training set. A loss function (e.g., peak relative error) is defined to quantify the deviation between the forecast results and the actual values. The model utilizes an adaptive gradient descent optimization method to progressively adjust all internal parameters of the spatiotemporal graph neural network and the transformer model based on the gradient calculated from the loss function.

[0096] For example, in a certain training iteration, if the downstream inflow information predicted by the model deviates from the actual observation, the model will automatically adjust its internal connection weights and bias terms based on this deviation, so that the prediction results can be closer to the true values ​​in the next iteration.

[0097] F113: This parameter optimization process involves multiple iterations until the model's prediction error on the training set converges to an acceptable level, or until a preset number of training iterations are reached. The final model parameters are fully learned and optimized, enabling the generation of more accurate rainfall-corrected inflows.

[0098] In an optional embodiment, the optimized rainfall-corrected inflow is obtained by optimizing the parameters of the spatiotemporal graph neural network model and the long sequence transformer model based on a predetermined training dataset, which can be achieved by adopting a phased training strategy, including the following steps F121-F123: F121: First, the spatiotemporal graph neural network model is trained independently so that it can effectively extract the spatiotemporal features of rainfall from the spatiotemporal matrix of rain gauge stations and the soil moisture spatial matrix.

[0099] F122: Subsequently, the features output by the trained spatiotemporal graph neural network model are used as one of the inputs to train the long sequence transformer model, so that it can combine these features and the long sequence dependency of historical floods to generate the interval net inflow correction term.

[0100] F123: This phased training strategy simplifies the model optimization process and ensures the effectiveness of each component, thereby obtaining optimized rainfall-corrected inflow.

[0101] In another optional embodiment, to optimize the parameters of the spatiotemporal graph neural network model and the long sequence transformer model based on a predetermined training dataset to obtain the optimized rainfall-corrected inflow, the method can also be to employ a transfer learning and fine-tuning strategy, including the following steps F131-F134: F131: Use a spatiotemporal graph neural network and transformer model pre-trained on a general and large-scale dataset as the initial model.

[0102] F132: For a specific historical flood training set in this basin, the pre-trained model is fine-tuned, adjusting some or all of its parameters to adapt it to the geographical and hydrological characteristics of this basin.

[0103] F133: During fine-tuning, a lower learning rate can be used to avoid destroying the general features already learned in the pre-trained model.

[0104] F134: This transfer learning and fine-tuning strategy can accelerate model convergence and improve training efficiency, especially when training data is relatively limited, and can more effectively obtain optimized rainfall-corrected inflow.

[0105] It should be noted that optimizing model parameters is fundamental to ensuring the accuracy of flood forecasts. Whether end-to-end training, phased training, or transfer learning are employed, the goal is to enable the spatiotemporal graph neural network and transformer model to learn the complex relationships between rainfall, soil wetness, and watershed runoff to the greatest extent possible. This will generate more accurate rainfall corrections in actual forecasts, providing reliable corrections for the final flood forecast.

[0106] Example 3, referring to Figures 1-3 This is the third embodiment of the present invention, which differs from the previous two embodiments in that: a synthetic flow flood forecasting method that integrates physical mechanisms and deep learning further includes, in order to verify and explain the technical effects used in this method, comparing experimental results with scientific demonstration methods to verify the real effect of this method.

[0107] In the early stages of method implementation, necessary basic data acquisition and network construction are required. Specifically, this step corresponds to S1, which involves acquiring cross-sectional distribution data of the main stream and tributary river sections, as well as rainfall station distribution data, and using this as a basis to construct the watershed river cross-sectional network, such as... Figure 1 As shown, the spatial distribution of red cross-section stations and green rainfall stations within the basin is clearly displayed, providing geographic information on river morphology and rainfall monitoring.

[0108] During the model training phase, the downstream inflow information (Y1, Y2, Y) from the training set is used to optimize the model parameters. Specifically, Y1 represents the spatial features output by the ST-GNN model, Y2 represents the temporal dependency features output by the Transformer model, Y is the actual predicted downstream inflow information, and X is the interval rainfall and upstream flow information. By comparing Y1, Y2, and Y, the model can be continuously adjusted to improve forecast accuracy.

[0109] During the model testing phase, downstream inflow information (Y1, Y2, Y) was used as a test set to verify the model's generalization ability. Similarly, Y1 and Y2 represent spatial and temporal characteristics, respectively, while Y is the actual predicted downstream inflow information, and X represents the interval rainfall and upstream flow information. The test results show that the model performs well even on unseen data, validating its effectiveness and robustness.

[0110] The method includes the following steps: Step 1, during periods without rainfall, testing the basic propagation time of different flow rates in each river channel. This application explicitly proposes in S2 that, through a network of river channel cross-sections in the basin, the basic propagation time of different flow rates in river sections should be tested during periods without rainfall to obtain the flow-propagation time correspondence, and a basic propagation time model without rainfall should be constructed based on the inverse interpolation method. Specifically, under natural flood observation conditions, if a hydropower station is located upstream, artificial water regulation can be carried out in conjunction with the power generation flow, selecting a flow value with a representative distribution. Using the buoy method, upper and lower cross-sections are set up on the river channel, and the buoy drift time is recorded as the propagation time. Red indicates cross-section stations, and green indicates rainfall stations.

[0111] Table 1. Propagation time of floodwaters in the main stream

[0112] Station 1 and Station 2 are section numbers. For "Station 1-Station 2", Station 1 is the upstream station and Station 2 is the downstream station.

[0113] Table 2. Tributary flood propagation time

[0114] Under natural conditions, due to limitations in flow and velocity measurement, it is impossible to test all flows. Therefore, at certain times, tests are conducted on some typical flows. Typical flows are estimated based on the annual maximum and minimum flow values ​​of upstream stations. For example, if the annual maximum flow value is 2000 cubic meters per second and the minimum is 100 cubic meters per second, typical flows can be selected in the order of 100, 500, 1000, 1500, and 2000 cubic meters per second.

[0115] The propagation timeline of the main stream flood shows that, due to the close proximity of stations 2 and 3, the propagation time is 0.5 hours when the flow rate reaches 1000 cubic meters per second, and the flow rate is usually controlled within 1000 cubic meters per second. However, because the flow rate frequently changes, even if upstream stations may artificially adjust water flow in conjunction with power generation, the power generation flow cannot be arbitrarily adjusted and must be adjusted according to power generation load instructions. Therefore, when it is necessary to test the propagation time under certain typical flow rates, it is necessary to estimate in advance when the pre-designed typical flow rate is likely to occur and select an appropriate time for testing.

[0116] As can be seen from the data in the table above, there is an irregular and non-linear relationship between traffic and propagation time. For example, the propagation time often shows precise values ​​such as 0.6 hours, 2.3 hours, and 10.3 hours.

[0117] Step 2: Predict downstream inflow under no-rain conditions using inverse interpolation. Flood forecasts typically use time intervals of 1 hour, 3 hours, and 6 hours. Therefore, it's necessary to calculate the flow rate corresponding to these time intervals based on the flow rate and propagation time array. This method uses inverse interpolation from time to flow rate to calculate the upstream outflow at the hour. The hour here refers to Beijing time, and the time standard is consistent with the final flood forecast result.

[0118] Common formulas for water flow propagation time include power functions, exponential functions, hyperbolic functions, and logarithmic-linear functions. However, due to the large number of data points here, a single simple function cannot pass through all points. Therefore, piecewise linearity and smoothing methods are used for fitting.

[0119] Step 2: Backward interpolation of time to flow rate. Taking station 11-station 1 as an example, the propagation times for flow rates of 100, 500, 1000, 1500, 2000, and 2500 cubic meters per second are 10, 6, 4, 3, 2, and 1 hour, respectively. Backward interpolation of time to flow rate is performed on these data to calculate the corresponding flow rate propagation time t.

[0120] Perform piecewise linear interpolation between lnQ and t: Taking station 11-station 1 as an example, the propagation time for traffic of 100, 500, 1000, 1500, 2000, and 2500 is 10, 6, 4, 3, 2, and 1 hour, respectively. Perform reverse interpolation from time to traffic to calculate t.

[0121] Perform piecewise linear interpolation between lnQ and t: Interval 1: lnQ∈[4.605,6.215] Slope m1=(6−10) / (6.215−4.605)=(−4) / 1.61≈−2.484 The propagation time is t = 10 − 2.484(lnQ − 4.605). Interval 2: lnQ∈[6.215,6.908] Slope m2=(4−6) / (6.908−6.215)=(−2) / 0.693≈−2.886t=6−2.886(lnQ−6.215) Interval 3: lnQ∈[6.908,7.313] Slope m3=(3−4) / (7.313−6.908)=(−1) / 0.405≈−2.469t=4−2.469(lnQ−6.908) Interval 4: lnQ∈ [7.313,7.601] Slope m4=(2−3) / (7.601−7.313)=(−1) / 0.288≈−3.472t=3−3.472(lnQ−7.313) Interval 5: lnQ∈[7.601,7.824] Slope m5=(1−2) / (7.824−7.601)=(−1) / 0.223≈−4.484t=2−4.484(lnQ−7.601) The slopes of the piecewise linear functions change significantly at the interval boundaries, so fitting a smooth function to the entire function can be considered. Since Q and t change inversely—meaning the greater the flow rate and the faster the velocity, the shorter the propagation time—power functions, exponential functions, hyperbolic functions, and logarithmic linear functions can be considered for fitting.

[0122] Compare the applicability of these functions: (1) When the flow rate is extremely large or extremely small, the power function may approach infinity when Q approaches 0, which is not consistent with the actual physical situation.

[0123] (2) The exponential function decreases rapidly in the early stage, but for large flow rates, the predicted propagation time will approach zero sharply, which may underestimate the actual propagation time. This is because the flow velocity is still limited by factors such as river slope and roughness, which does not match the actual situation.

[0124] (3) Log-linear function: When Q is large, T may become negative, which obviously has no physical meaning.

[0125] (4) Hyperbolic function: When Q approaches infinity, T approaches... (A non-zero positive integer); as Q approaches 0, T will not become infinitely large, but will tend towards a finite value. Both ends are consistent with actual physical logic; therefore, a hyperbola is chosen for fitting.

[0126] Try using a hyperbola for fitting.

[0127] Experience shows that, in many cases, the relationship between flow rate Q and propagation time T approximately satisfies a hyperbolic equation of the following form: (1) in, Traffic propagation time. Minimum propagation time. When the traffic is very high, the propagation time will approach this limit. . Upstream flow. : Minimum upstream flow rate. When the flow rate approaches... At this point, the propagation time will tend to infinity. This can be understood as a state of extremely slow flow, close to stagnation. : Comprehensive parameters of river channel characteristics.

[0128] To solve for t, equation (1) is rewritten in the following format: (2) We select the three points (100,10), (1000,4), and (2500,1) for approximate fitting, and substitute these three points into (2) to list the system of equations: (3) (4) (5) (3)-(4): (6) (7) (4)-(5): (8) (9) (7 / (9):) (10) (11) =-928.72 (12) Substitute (12) into (7). (13) =13227 (14) Substitute (100,10) into (2). (15) =-2.86 Will =-928.72、 =13227、 Substituting -2.86 into (2), we obtain the fitting formula: (16) According to the formula, when It is possible to calculate when it is very small It's very large, which is realistic.

[0129] examine When =500: The actual measurement was 6, which is close to the target. Actual test result 3, close; The actual measurement was 2, which is close.

[0130] The overall error is small, and the fitting formula is usable. Based on the fitting formula, the propagation time at the hour is calculated.

[0131] Specifically, the propagation time of the upstream flow at each time point is calculated based on the fitted formula (14). Assuming the upstream hourly outflow sequence used for calculation is: 90, 200, 350, 500, 450, 400, 350, 300, 250, 200, 150, 100, 50 cubic meters per second, the calculated propagation times are: 10.1, 8.9, 7.5, 6.4, 6.7, 7.1, 7.5, 7.9, 8.4, 8.9, 9.4, 10.0, 10.7 hours. Since the propagation times calculated from the upstream hourly outflow values ​​are relatively scattered, they cannot be directly convolved and superimposed when forecasting the downstream hourly inflow; therefore, correction is required.

[0132] Taking the first time point as an example, the flow rate is 90 cubic meters per second, and the propagation time is 10.1 hours. Therefore, the upstream data point with a propagation time of 10 hours should be data from some time point before the initial 90 cubic meters per second. Assuming the previous time point's data was 80 cubic meters per second, since the flow rate data used in the calculation are all hourly, the data between 80 and 90 cubic meters per second is assumed to change linearly. Therefore, the flow rate 0.1 hours before the first time point is calculated as: 90 − (90 − 80) / 6 ≈ 88.3 cubic meters per second. The corrected flow rate is then 88.3 cubic meters per second.

[0133] At the second time point, the flow rate is 200 cubic meters per second, and the propagation time is 8.9 hours. Therefore, the upstream data point with a propagation time of 9 hours should be the data 0.1 hours after 200 cubic meters per second, which is 200 + (350 − 200) / 6 ≈ 225 cubic meters per second.

[0134] Following this pattern, we obtain the flow rate and propagation time at each point downstream on the hour. After the above data processing, the flow rate and time reaching downstream are: 88.3 cubic meters / second, 10 hours; 225 cubic meters / second, 9 hours; and so on.

[0135] Based on the processed flow and propagation time arrays, the total inflow process is calculated using the existing convolution formula.

[0136] Step 3: Deep Learning-Based Correction of Inflow Forecast During Rainfall Periods. During rainfall periods, river flow changes due to factors such as surface rainfall and confluence with surrounding slopes, leading to variations in propagation time. These variations differ depending on factors such as the prior soil moisture index, rainfall intensity, and the location of the storm center. Therefore, this application constructs a spatiotemporal graph neural network model corresponding to S3 to obtain the spatiotemporal characteristics of rainfall, and further corresponds to S4 by analyzing the long-sequence dependencies of historical floods using a long-sequence transformer model to obtain the interval net inflow correction term. ST-GNN captures the spatiotemporal characteristics before and during rainfall periods, and uses the Transformer model to analyze historical flood data of the basin, analyzing long-sequence dependencies to overcome the memory bottleneck that other models may have with extremely long sequences. Figure 1 The diagram shown illustrates the overall network structure adopted in this application.

[0137] The model structure of ST-GNN is as follows: A typical ST-GNN consists of two core modules stacked alternately or in parallel: a spatial convolution module and a temporal convolution module.

[0138] Module 1: Spatial Convolution Module - Capturing Spatial Dependencies.

[0139] This module is responsible for working on a single time slice, that is, at the same time, learning how a node is influenced by its neighboring spatial nodes. For example, at time t1, the spatial convolution module receives the features (such as rainfall) of all nodes at time t1, and then calculates a new "spatial augmentation" feature for each node that includes information about its neighboring rain gauges, based on the connectivity of the graph.

[0140] Module 2: Temporal Convolution Module - Capturing "Temporal Dependencies".

[0141] This module is responsible for working on the time series of a single node, that is, learning the historical change patterns of a single node. For example, the temporal convolution module will receive the feature sequence of rain gauge 1 over the past 12 time steps [t1,t2,...,t12] and output a "temporal context" feature containing historical information that can predict future traffic.

[0142] The two core modules are combined in a spatial-temporal manner.

[0143] The process is as follows: First, the data from each time slice is input into the spatial convolution module and spatial convolution is performed separately, resulting in 12 "enhanced snapshots" that already contain spatial information. Then, these 12 enhanced snapshots for each node are fed into the temporal convolution module to learn the temporal pattern. Finally, the prediction result is output. In other words, we first understand the rainfall situation of the entire watershed at each moment, and then analyze the temporal changes of each rain gauge.

[0144] The input and output parameters of ST-GNN are as follows: An ST-GNN typically requires three core inputs: (1) The node feature matrix (X) mainly reflects the total number of rain gauge stations, the area represented by each station, and the number of historical time periods for each station; For example: station_num=3, station_area=100, 200, 300 square kilometers, seq_len=12.

[0145] (2) Graph structure / adjacency matrix (A), which mainly reflects the spatial relationship between each station and is expressed in latitude and longitude; For example: Rain gauge 1, longitude, latitude; Rain gauge 2, longitude, latitude; Rain gauge 3, longitude, latitude.

[0146] Training process: Data preparation: Organize historical rainfall and runoff data into (X,A) pairs and prepare the corresponding true values ​​flow_true.

[0147] Define the model: Instantiate an ST-GNN model and determine all its structural parameters.

[0148] Define the loss function: use peak relative error (Loss = (model's predicted value flow_forecast - actual flow_true) / actual flow_true).

[0149] Optimizer: Use the Adam optimizer to tune the model parameters to minimize the loss function.

[0150] Iterative training: The data is fed into the model in batches to obtain the prediction flow_forecast.

[0151] Calculate the loss.

[0152] Call optimizer.zero_grad() to clear the gradients from the previous round.

[0153] Call Loss.backward() to perform backpropagation and calculate the gradient.

[0154] Call optimizer.step() to update all parameters of the model.

[0155] Validation and testing: Perform prediction tests on datasets that were not used for training to evaluate model performance.

[0156] A spatial model of rain gauges is needed, as each watershed has a certain number of rain gauges. Currently, the composite flow method does not consider the impact of rainfall; other forecasting models use areal rainfall as the rainfall input, which largely homogenizes the rainfall amount. In reality, the rainfall at each rain gauge is generally unequal. Therefore, a spatial model is needed to understand the location information of each rain gauge and use the rainfall at each station to replace the areal rainfall, avoiding errors caused by homogenization.

[0157] Based on using the rainfall at each station to represent the areal rainfall, since the rainfall at each station also varies over time, it is necessary to construct a spatiotemporal model to record the rainfall at each time point of each rain gauge station.

[0158] For each rain gauge station, historical rainfall data is used to analyze the soil moisture conditions in the area where each station is located. For example, during prolonged drought, the soil moisture is 0; after several days of heavy rainfall, the soil moisture is Im. This allows for the construction of a spatial model of soil moisture, avoiding errors caused by homogenization. Im represents the maximum initial loss in mm. Currently, it is generally accepted that after a prolonged winter drought, before the first rain of the flood season, if there are more than 15 consecutive days without rain, the soil moisture is considered to be 0, indicating extremely dry soil; if there are more than 15 consecutive days of heavy rainfall, the soil moisture is Im, indicating that the soil moisture has reached its maximum. The spatial resolution of the soil moisture model is determined by the coverage area of ​​the rain gauge station.

[0159] The above models from previous floods are used to construct a long-sequence STG-Transformer model.

[0160] Leveraging its self-attention mechanism, it captures long-sequence dependencies and performs hydrological time series prediction, thus overcoming the memory bottleneck that LSTM may have with extremely long sequences.

[0161] Taking a certain watershed section as an example: Suppose there are M rain gauges in the region, and the set of gauges is denoted as S = {s1, s2, ..., sm}. Each gauge... Corresponding spatial coordinates (xi, yi); Suppose that the research time range includes N consecutive time steps (such as hours or days), the time set is denoted as T={t1,t2,...,tn}, and the time step size is Δt (such as Δt=1 hour).

[0162] Define a "rainfall spatiotemporal matrix" R ∈ RM × N, where the elements represent stations. The amount of rainfall, namely: Step 3: Construct a soil wet model. The soil wet set is denoted as W={w1,w2,...,wm}, and the soil wetness w1 at each station corresponds to the spatial coordinates (xi,yi). Step 4: Processing the Inter-regional Net Inflow. After removing the upstream hourly outflow during periods of no rainfall (upstream flow information) from historical flood data, the remaining inflow is the inflow after the impact of inter-regional rainfall, referred to as the inter-regional net inflow, forming a database of the relationship between inter-regional rainfall and inter-regional net inflow. This application proposes in S5 that a flow forecasting model should be constructed based on the inter-regional net inflow correction term, combined with incremental inflow from surface rainfall and incremental inflow from slope rainfall.

[0163] Step 5: Process the incremental inflow caused by surface rainfall. Using radar rainfall data overlaid with a river surface vector map layer (GIS), calculate the net surface rainfall in real time. This represents the total net rainfall over the water surface. This represents the total rainfall over the water surface. It is the average loss coefficient. For water surface area, The evaporation loss rate can be considered constant during rainfall; since surface rainfall does not require runoff, it is directly converted into incremental surface inflow.

[0164] Step 6: Process the incremental inflow formed by slope rainfall. Using the previous soil moisture and continuous rainfall information from each rain gauge as input, and the interval net inflow as output, construct the STG-Transformer (meta-learner) model, where: Input parameters include: (1) The soil wetting process at each rain gauge station.

[0165] (2) The continuous rainfall process at each rain gauge station.

[0166] Output parameters: Interval net inflow process.

[0167] Key points: (1) Since both rainfall and soil moisture are time series, the model needs to be able to capture the temporal dependencies.

[0168] (2) Rainfall will not be immediately converted into flow; there is a delayed watershed response process.

[0169] (3) The relationship between soil moisture, rainfall and flow is highly nonlinear (for example, when the soil is dry, there is more infiltration and less runoff; when the soil is saturated, there is less infiltration and more runoff).

[0170] Assuming there are N rain gauge stations in watershed A, construct an input data sample. Tables 3 and 4 show examples of one sample of input data: Table 3

[0171] Table 4

[0172] Output sample: Table 5 shows the net inflow within a given interval. A sample is constructed, and the following is an example of the output data for one sample:

[0173] In S6, the downstream flood inflow forecast process is obtained by superimposing a predetermined inflow without rainfall and a rainfall-corrected inflow using a flow forecast model.

[0174] Step 6: Model training and validation. Deep learning is performed using 70% of the historical data of a certain watershed. After training, the remaining 30% is used for validation, improving the early warning accuracy by more than 5%.

[0175] The accuracy here is measured by the peak error required in the "GBT 22482-2008 Hydrological Information Forecasting Specification". Table 6 shows the historical forecast results of the top 70% of deep learning applications.

[0176] Table 7 shows the last 30% of historical forecast results used for verification.

[0177] In summary, by utilizing the above-mentioned technical solution of this application, this application uses the time-to-flow inverse interpolation method to solve the basic propagation time when there is no rainfall, and then combines the spatiotemporal matrix of rainfall, and uses STG-Transformer deep learning to finally generate the final forecast results for flood forecasting, thereby avoiding the accumulation of errors caused by using a fixed propagation time and ignoring the impact of rainfall on flow.

[0178] Figure 3This figure compares the measured and predicted process curves, demonstrating the contrast between the actual observed flood inflow process and the flood inflow process predicted by the method described in this application. The figure clearly presents the degree of matching between the predicted and measured process curves over time, including a comparative analysis of peak flow, peak occurrence time, and the shape of the flood process curve. This further demonstrates the significant advantages of the synthetic flow flood forecasting method of this invention, which integrates physical mechanisms and deep learning, compared to traditional methods.

[0179] Example 4, the fourth embodiment of the present invention, differs from the previous three embodiments in that it is a synthetic flow flood forecasting system integrating physical mechanisms and deep learning. It includes a network construction module for acquiring cross-sectional distribution data of the main stream and tributary river sections, as well as rainfall station distribution data, to construct a watershed river cross-sectional network; a propagation module for testing the basic propagation time of river sections under different flow rates during periods of no rainfall using the watershed river cross-sectional network, obtaining the flow-propagation time correspondence, and constructing a basic propagation time model without rainfall based on inverse interpolation to calculate the downstream hourly inflow; and a spatiotemporal module for using data from the watershed river cross-sectional network without rainfall. The rain propagation time model combines the spatiotemporal matrix of rainfall stations and the soil moisture spatial matrix during rainfall periods to construct a spatiotemporal graph neural network model, obtaining the spatiotemporal characteristics of rainfall. The transformation module combines the spatiotemporal characteristics of rainfall and analyzes the long-sequence dependencies of historical floods through a long-sequence transformer model to obtain the interval net inflow correction term. The fusion module combines the interval net inflow correction term with the incremental inflow of surface rainfall and incremental inflow of slope rainfall to construct a flow forecast model. The forecast process generation module superimposes the predetermined inflow without rainfall and the rainfall correction inflow into the flow forecast model to generate the downstream flood inflow forecast.

[0180] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a 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 a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0181] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0182] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0183] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented in combination with any of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0184] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A synthetic flow flood forecasting method integrating physical mechanisms and deep learning, characterized in that: include, Obtain cross-sectional distribution data of the main stream and tributary river sections, as well as rainfall station distribution data, to construct a cross-sectional network of the watershed river channels; Using the river cross-section network of the basin, the basic propagation time of the river section under different flow rates was tested during the no-rainfall period to obtain the correspondence between flow rate and propagation time, and a basic propagation time model without rainfall was constructed based on the inverse interpolation method. By using the aforementioned no-rainfall basic propagation time model, combined with the spatiotemporal matrix of rainfall stations and the soil moisture spatial matrix during rainfall periods, a spatiotemporal graph neural network model is constructed to obtain the spatiotemporal characteristics of rainfall. Based on the aforementioned spatiotemporal characteristics of rainfall, the long-sequence dependency of historical floods is analyzed using a long-sequence transformer model to obtain the interval net inflow correction term; Based on the aforementioned interval net inflow correction term, and combined with the incremental inflow from surface rainfall and the incremental inflow from slope rainfall, a flow forecasting model is constructed. By superimposing a predetermined inflow without rainfall and a rainfall-corrected inflow using the aforementioned flow forecast model, a downstream flood inflow forecast is generated.

2. The synthetic flow flood forecasting method integrating physical mechanisms and deep learning as described in claim 1, characterized in that: Using the aforementioned river cross-sectional network, the basic propagation time of river sections under different flow rates was tested during periods of no rainfall, yielding the corresponding flow-propagation time relationship, including... Obtain the propagation time of each river section under different flow levels, and construct a flow-propagation time data table; Based on the flow-propagation time data table, a nonlinear fitting method is used to construct an inverse mapping relationship between flow and propagation time.

3. The synthetic flow flood forecasting method integrating physical mechanisms and deep learning as described in claim 2, characterized in that: The construction of the rainfall-free basic propagation time model based on the inverse interpolation method includes... Based on the reverse mapping relationship, the propagation time of the upstream flow sequence is estimated to obtain the propagation time series. The propagation time series is processed by the hourly traffic sequence reconstruction method to obtain the traffic sequence arriving downstream at the hour. By integrating the flow sequence arriving downstream at the top of the hour, the downstream inflow process without rainfall is obtained.

4. The synthetic flow flood forecasting method integrating physical mechanisms and deep learning as described in claim 3, characterized in that: By using the aforementioned no-rainfall basic propagation time model, combined with the spatiotemporal matrix of rainfall stations and the soil moisture spatial matrix during rainfall periods, a spatiotemporal graph neural network model is constructed to obtain the spatiotemporal characteristics of rainfall, including: Integrate the spatiotemporal matrix of rainfall stations with the soil moisture spatial matrix to construct a multi-source input feature field; Based on the spatial adjacency relationship of the sites, a spatial dependency model of rainfall and soil moisture is established; By integrating spatial dependence and temporal dynamics through a spatiotemporal joint modeling mechanism, spatiotemporal features characterizing the impact of rainfall are generated.

5. The synthetic flow flood forecasting method integrating physical mechanisms and deep learning as described in claim 4, characterized in that: Based on the aforementioned spatiotemporal characteristics of rainfall, the long-sequence dependencies of historical floods are analyzed using a long-sequence transformer model, yielding the interval net inflow correction term, which includes: By removing the upstream outflow from historical floods without rainfall, the net inflow process of the interval is obtained; Construct the encoder input sequence, including rainfall processes at rain gauge stations and soil wetting processes; The encoder input sequence is processed by a multi-head self-attention layer and a feedforward neural network layer to obtain long sequence encoding features; By combining long sequence coding features and rainfall spatiotemporal features through a decoder cross-attention layer, the interval net inflow correction term is obtained.

6. The synthetic flow flood forecasting method integrating physical mechanisms and deep learning as described in claim 5, characterized in that: Based on the aforementioned interval net inflow correction term, and combining the incremental inflow from surface rainfall and the incremental inflow from slope rainfall, a flow forecasting model is constructed, including: By overlaying radar rainfall data with a river surface vector map layer, the net rainfall on the water surface is calculated to obtain the incremental inflow of rainfall on the water surface; Based on the soil wetting process and continuous rainfall process of the rainfall station, and combined with the interval net inflow correction term, the incremental inflow of slope rainfall is obtained; By superimposing the incremental inflow from surface rainfall, the incremental inflow from slope rainfall, and the downstream inflow without rainfall, a flow forecasting model is obtained.

7. The synthetic flow flood forecasting method integrating physical mechanisms and deep learning as described in claim 6, characterized in that: By superimposing a pre-determined inflow without rainfall and a rainfall-corrected inflow using the aforementioned flow forecast model, a downstream flood inflow forecast is generated, including: Based on a pre-determined training dataset, the parameters of the spatiotemporal graph neural network model and the long sequence transformer model are optimized to obtain the optimized rainfall-corrected inflow. The optimized rainfall-corrected inflow was validated using a test dataset that is independent of and complementary to the training dataset, and a generalized downstream inflow forecast was obtained. By superimposing the downstream inflow process without rainfall and the generalized downstream inflow forecast, the final downstream flood inflow forecast process line is obtained.

8. A synthetic flow flood forecasting system integrating physical mechanisms and deep learning, employing a synthetic flow flood forecasting method integrating physical mechanisms and deep learning as described in any one of claims 1 to 7, characterized in that, include: The network construction module is used to acquire cross-sectional distribution data of the main stream and tributary river sections, as well as rainfall station distribution data, to construct a cross-sectional network of the watershed river channels. The propagation module is used to test the basic propagation time of river sections under different flow rates during periods of no rainfall through the cross-sectional network of the river basin, obtain the correspondence between flow rate and propagation time, and construct a basic propagation time model without rainfall based on the inverse interpolation method to calculate the downstream inflow at the top of the hour. The spatiotemporal module is used to construct a spatiotemporal graph neural network model by combining the spatiotemporal matrix of rainfall stations and the soil moisture spatial matrix during rainfall periods, based on the aforementioned no-rainfall basic propagation time model, to obtain the spatiotemporal characteristics of rainfall; The transformation module is used to combine the spatiotemporal characteristics of rainfall and analyze the long-sequence dependency of historical floods through a long-sequence transformer model to obtain the interval net inflow correction term. The fusion module is used to construct a flow forecast model based on the interval net inflow correction term, combined with the incremental inflow of surface rainfall and the incremental inflow of slope rainfall; The forecast process generation module is used to generate a downstream flood inflow forecast by superimposing a predetermined inflow without rainfall and a rainfall-corrected inflow on the flow forecast model.

9. A computer device comprising a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of a synthetic flow flood forecasting method integrating physical mechanisms and deep learning as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the steps of a synthetic flow flood forecasting method integrating physical mechanisms and deep learning as described in any one of claims 1 to 7.