Water transfer project water conveyance hydraulic depth learning simulation calculation method and system
Patent Information
- Application Number
- CN202611333020.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-09-25
AI Technical Summary
在实际工程中,明渠-暗渠转换节点易因过流能力不匹配引发壅水甚至溢流风险,现有模型无法在特征层面捕捉此拓扑突变
[0017]本发明的有益效果是:缓解了传统水动力模型计算耗时长的问题,有利于长距离复合调水工程生态补水效果的动态评估。相关技术效果,将在下文结合具体实施例进行详细描述。
Smart Images

Figure CN122819007A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of digital twin water conservancy technology, specifically a deep learning simulation calculation method and system for water conveyance hydraulics in water transfer projects. Background Technology
[0002] In recent years, inter-basin water transfer projects have been primarily used to alleviate ecological crises in arid and water-scarce regions and restore the ecological environment of the water-receiving areas. To guide water transfer scheduling, it is necessary to conduct quantitative assessments of the water conveyance process along the main water transfer lines and the ecological water replenishment effects on the water-receiving areas.
[0003] Currently, the assessment of water transfer processes in water diversion projects mainly relies on traditional one-dimensional hydrodynamic numerical simulation software, such as MIKE11. However, for long-distance water transfer trunk lines, such as those spanning hundreds of kilometers and containing complex topologies, such as those with frequent alternations between open and culvert channels, traditional numerical models require small time and space steps for iterative calculations when solving the Saint-Venant equations. This results in long simulation times, typically ranging from minutes to hours, which cannot meet the needs of real-time simulation and rapid online scheduling under digital twin platforms.
[0004] Based on this, the inventors, through literature review and technical analysis, verified that existing solutions still need improvement to address the problem of long calculation times for traditional hydrodynamic models.
[0005] Furthermore, the following shortcomings also exist:
[0006] Deep learning surrogate models are gradually being introduced into the field of hydrodynamic prediction. However, existing deep learning surrogate models still have the following problems when applied to complex long-distance water transfer projects:
[0007] First, existing models typically treat channels as homogeneous flow fields, lacking a mechanism to detect abrupt changes in cross-sectional flow capacity. In practical engineering, open-channel to culvert transition nodes are prone to backflow or even overflow risks due to flow capacity mismatch, and existing models cannot capture this topological abrupt change at the feature level.
[0008] Secondly, in the extraction of spatiotemporal features, the traditional cross-attention mechanism has the technical problem that the output does not change over time, and the spatial features are difficult to perceive the dynamic impact of real-time boundary flow, which makes the model unable to simulate local hydraulic mutations under high flow conditions.
[0009] Third, when introducing physical constraints, such as the Physical Information Neural Network (PINN) for model training, the residuals of the conventional continuity equation have the problem of inconsistent area change rate and flow term dimensions, making it difficult for the model to converge stably under long-distance and complex working conditions.
[0010] In addition, in terms of the comprehensive evaluation of the ecological water replenishment effect, the existing decomposition of water conveyance losses (evaporation, leakage, and tank storage) often relies on post-event manual differential statistics, which has a lag effect.
[0011] Meanwhile, in calculating the comprehensive evaluation index, the traditional entropy weight method, which is widely used, assigns static constant weights to each evaluation indicator, failing to reflect the dynamic changes in the importance of water replenishment ecological indicators across different years. Furthermore, if recurrent neural networks are used for time-series prediction, overfitting is prone to occur when the annual evaluation data sample size is small. Summary of the Invention
[0012] The purpose of this invention is to at least alleviate the problem of long calculation times in traditional hydrodynamic models. This invention provides a deep learning simulation calculation method and system for water conveyance hydraulics in water transfer projects, specifically employing the following technical solution:
[0013] Acquire cross-sectional data and boundary condition data along the water conveyance main line, extract geometric features, and construct a channel topology encoding vector that includes the characteristics of changes in conveying capacity and the impact of backwater.
[0014] The geometric features, channel topology encoding vectors, and boundary condition data are input into the spatiotemporal deep learning proxy model. The model uses flow-aware spatial feature modulation and time-varying cross-attention mechanism to fuse features and output the predicted values of flow, water depth, evaporation and leakage losses for each section.
[0015] Based on the predicted values of flow rate, evaporation and leakage losses, and combined with the mass conservation principle, the change in tank storage is calculated, and the decomposition of water conveyance loss by multiple mechanisms is completed.
[0016] Based on the decomposition results of water loss through multiple mechanisms, the annual change rate of the evaluation index is calculated, and the static weights are integrated to construct an adaptive dynamic weight. The dynamic comprehensive evaluation index is then calculated to complete the assessment of the ecological water replenishment effect.
[0017] The beneficial effects of this invention are: it alleviates the problem of long calculation time in traditional hydrodynamic models, and is conducive to the dynamic evaluation of the ecological water replenishment effect of long-distance composite water transfer projects. The related technical effects will be described in detail below with reference to specific embodiments. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a deep learning simulation calculation method for water conveyance in a water transfer project, as described in this application.
[0019] Figure 2 This is a schematic diagram illustrating a process for constructing a channel topology encoding vector that includes characteristics of changes in transport capacity and backlog impacts, as described in this application.
[0020] Figure 3This is a schematic diagram of a feature fusion process using flow-aware spatial feature modulation and time-varying cross-attention mechanism as described in this application.
[0021] Figure 4 This is a schematic diagram of a process in this application that outputs the predicted values of flow rate, water depth, and evaporation and leakage losses at each cross-section, and calculates the change in tank storage by combining the mass conservation principle.
[0022] Figure 5 This is a flowchart illustrating the training process of a spatiotemporal deep learning agent model according to this application. Detailed Implementation
[0023] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first," "second," etc., in the specification and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein. Furthermore, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0025] To overcome the above shortcomings, combined with Figures 1 to 5 The present application will be further illustrated with reference to specific embodiments.
[0026] Accordingly, some nouns or terms appearing in the description of the embodiments of this application shall be interpreted as follows:
[0027] Among them, the spatial encoder is also known as the channel spatial encoder;
[0028] Basic data for each section, such as section dimensions, bottom slope, roughness coefficient, etc.
[0029] System boundary condition data, such as inflow at the canal head and meteorological data along the route.
[0030] In some cases, static features, namely geometric features, are coupled with channel topology encoding vectors;
[0031] Dynamic features, i.e. boundary condition data.
[0032] This application discloses a deep learning simulation method for water conveyance in water transfer projects, which can be executed using electronic devices, cloud servers, or digital twin hydraulic computing platforms. This method couples hydrodynamic physical mechanisms with a deep learning architecture to alleviate the technical problems of long computation times and difficulty in supporting rapid online evaluation across multiple scenarios in traditional numerical simulations for long-distance water transfer projects with complex open-channel and culvert topologies.
[0033] Accordingly, the method includes the following steps:
[0034] S100: Acquire cross-sectional data and boundary condition data along the water conveyance main line, as well as ecological environment monitoring data of the water receiving area, extract geometric features, and construct a channel topology encoding vector that includes the characteristics of changes in conveying capacity and the impact of backlog.
[0035] In the parametric modeling stage of the water transfer project, the long-distance water transfer trunk line is discretized into multiple calculation sections along the route, and the basic data of each section and the boundary condition data of the system are obtained.
[0036] Based on the basic data, the conventional geometric features of each section are extracted.
[0037] Furthermore, prior knowledge of fluid mechanics is introduced for feature engineering construction. Specifically, by quantifying the differences in hydraulic transport capacity between adjacent sections and the spatial influence range of backlog and return water curves, a unique channel topology encoding vector is constructed for each section, enabling the subsequent network to perceive topological abrupt changes and backlog risk areas in the channel.
[0038] S200 inputs geometric features, channel topology encoding vectors, and boundary condition data into a pre-trained spatiotemporal deep learning proxy model. It then uses flow-aware spatial feature modulation and time-varying cross-attention mechanism to fuse features and outputs predicted values of flow, water depth, evaporation, and leakage losses for each cross section.
[0039] Static and dynamic features are input together into a spatiotemporal deep learning proxy model that has been pre-trained offline.
[0040] Within this proxy model, two feature fusion actions are performed;
[0041] First, by using flow utilization rate to modulate spatial features element by element, the model can adaptively enhance or reduce the focus on features of preset high-risk sections according to the current input flow rate.
[0042] Secondly, a time-varying cross-attention mechanism is adopted to concatenate the sequence features and spatial features of the target time to generate a query vector, so that the fused spatiotemporal features have time-varying characteristics.
[0043] After feature fusion is completed, a parallel multi-head physical decoder can be used to directly output the predicted flow rate and water depth of each section at each time step, as well as the predicted evaporation loss and leakage loss constrained by a non-negative activation function.
[0044] S300, based on predicted values of flow rate, water depth, evaporation and leakage losses, and combined with mass conservation to calculate changes in tank storage, completes the decomposition of water conveyance losses through multiple mechanisms.
[0045] After obtaining the predicted values, a multi-mechanism water conveyance loss decomposition is performed. Considering that directly using a neural network to allocate all loss components may easily lead to conflicts with physical conservation laws, such as causing problems like repeated allocation of tank storage capacity, this step adopts a strategy that combines direct output with indirect calculation.
[0046] Accordingly, the difference between the predicted flow rates of adjacent cross sections is used as the benchmark for the total water volume change, from which the predicted evaporation loss and leakage loss directly output by the proxy model are deducted.
[0047] Meanwhile, following the law of conservation of mass, the rate of change of water volume in the channel section calculated from the predicted water depth is used as a constraint term, and the change in tank storage is indirectly calculated by subtraction. This process, while suppressing physical conflicts in network prediction, achieves automatic decomposition of the three loss mechanisms: evaporation, leakage, and tank storage.
[0048] S400 determines evaluation indicators based on the decomposition results of water loss through multiple mechanisms and ecological environment monitoring data, calculates the annual change rate of the evaluation indicators, integrates static weights to construct adaptive dynamic weights, and calculates a dynamic comprehensive evaluation index to complete the assessment of the ecological water replenishment effect.
[0049] The decomposition results of water loss from multiple mechanisms, such as total water replenishment efficiency and the proportion of loss in each segment, are used together with ecological and environmental monitoring data of the water-receiving area, such as vegetation area and groundwater level, as evaluation indicators.
[0050] Accordingly, the annual standardized rate of change of each evaluation index is calculated; then, the static weights reflecting the overall dispersion of the indexes are combined with the rate of change response terms reflecting the drastic time series changes of the indexes to construct adaptive dynamic weights.
[0051] Among them, the static weights can be obtained by executing the conventional entropy weight method.
[0052] Therefore, the more drastic the change in a certain evaluation indicator in a preset year, the greater the increase in its weight.
[0053] In this case, the normalized values of the evaluation indicators for the corresponding year are weighted and summed using adaptive dynamic weights to calculate the final dynamic comprehensive evaluation index, thereby completing the quantitative assessment of the ecological water replenishment effect of the water diversion project.
[0054] On the other hand, an exemplary scheme describing the parametric modeling and channel topology coding method of water conveyance trunk lines is to extract geometric features and construct a channel topology coding vector containing features of changes in conveying capacity and backlog impact during the parametric modeling stage of water transfer projects, so that the subsequent deep learning proxy model has the ability to perceive physical topology.
[0055] In practice, the following steps are included:
[0056] That is, the water transfer trunk line of the water transfer project is discretized into N along the direction of the project. _s There are several cross-sections, and adjacent cross-sections constitute a channel segment. Extract P from each cross-section. _i The geometric eigenvector g _i :
[0057] g _i =[A _max,i ,P _w,i ,R _t’,i B _top,i Z _bot,i ,n _i ,k _i ];
[0058] In the formula:
[0059] A _max,i Indicates the maximum cross-sectional area through which water flows;
[0060] P _w,i This indicates the wetted perimeter corresponding to the design water depth;
[0061] R _t’,i Indicates the hydraulic radius;
[0062] B _top,i Indicates the top width;
[0063] Z _bot,i Indicates the elevation of the canal bottom;
[0064] n _i This represents the Manning roughness coefficient;
[0065] k _i Indicates the permeability coefficient;
[0066] i is the traversal index.
[0067] Furthermore, a channel topology encoding vector incorporating characteristics of changes in transport capacity and backwater impact is constructed, as follows:
[0068] (a) Calculate the maximum transport capacity of each cross-section under full-flow conditions based on the cross-sectional roughness, maximum flow area, hydraulic radius, and bottom slope. For each cross-section P... _i The maximum conveying capacity Q under full-flow conditions was calculated based on Manning's formula. _cap,i ,Right now:
[0069] Q _cap,i =(1 / n _i A _max,i (R _t’,i ) 2 / 3 (S _0,i ) 1 / 2 ;
[0070] In the formula:
[0071] S _0,i This refers to the bottom slope of this section of the canal;
[0072] For the open channel section, A _max,i Take the cross-sectional area corresponding to the design water depth;
[0073] For the culvert section, A _max,i Take the full area of the tube.
[0074] (b) Calculate the ratio of the maximum transport capacity of adjacent cross sections to obtain the hydraulic transport capacity ratio (φ). _i ) hyd ,Right now:
[0075] (φ _i ) hyd =Q _cap,i / Q _cap,i+1 ;
[0076] When (φ _i ) hyd When the value is greater than 1, it indicates that the upstream section has a greater transport capacity than the downstream section, and the downstream section constitutes a bottleneck, posing a risk of backflow.
[0077] When (φ _i ) hyd When the ratio is approximately 1, it indicates that the transport capacity of adjacent cross sections is matched and the water flow transitions smoothly. Compared with the existing technology that only uses the area ratio to characterize abrupt changes, the hydraulic transport capacity ratio introduced in this embodiment integrates three factors: area, roughness, and bottom slope. It can distinguish between two hydraulic situations: a decrease in area but an increase in bottom slope (transport capacity does not necessarily decrease) and a decrease in area and a decrease in bottom slope (transport capacity decreases).
[0078] (c) Based on the channel segment parameters upstream of the channel type conversion node, the normal water depth is calculated back using the Manning formula;
[0079] Based on the normal water depth and bottom slope, the characteristic length of backwater is estimated, and the distance from each cross-section to the channel type conversion node is normalized using the characteristic length of backwater, so as to obtain the normalized distance of backwater influence length.
[0080] When (φ _i ) hyd When the value is greater than 1, the backwater caused by the downstream bottleneck will flow upstream. According to the theory of constant gradually varied flow, the characteristic influence length of the backwater curve can be approximated as:
[0081] L _bw,m =h _n,m / S _0,m ;
[0082] In the formula:
[0083] h _n,m The normal water depth of the channel section upstream of node m under the design flow rate is calculated by back-calculation using the Manning formula.
[0084] S _0,m This is the bottom slope of this canal section.
[0085] Next, the influence length L is used. _bw,m Normalize the distance:
[0086] (δ _i ) bw =|x _i -x _trans,m | / L _bw,m ;
[0087] In the formula:
[0088] x _i For section P _i Mileage;
[0089] x _trans,m For distance P _i Mileage of the most recent channel type conversion node.
[0090] Accordingly, the normalized distances of backwater in both upstream and downstream directions are taken and denoted as (δ) _i ) bw,up and (δ) _i ) bw,down When the normalized distance is less than 1, it indicates that the cross-section is within the backwater influence zone;
[0091] Using the characteristic length of the backwater flow as a substitute for the total channel length for normalization can improve the spatial resolution of the backwater impact area, thereby locating the backwater risk area.
[0092] (d) Extract the ratio of the maximum hydraulic transport capacity from the headworks to the current cross-section as the cumulative bottleneck index along the route:
[0093] This indicator is used to capture problems encountered by the water flow from the headworks to the current cross-section. When there are multiple transition nodes in the water conveyance main, the BSI... _i It will increment the jump at each conversion node, enabling the network to perceive the global constraint information of existing bottlenecks upstream.
[0094] Among them, the bottleneck cumulative index (BSI) along the path corresponds to the i-th calculation section. _i =max _1≤j≤i (φ _i ) hyd ;
[0095] Above, max _1≤j≤i That is, the maximum value of the corresponding hydraulic index is taken for all cross sections j=1,2,...,i.
[0096] (e) Calculate the relative rate of change of area between adjacent sections as the transition gradient Γ of the sections. _i ;
[0097] Г _i =(A _max,i+1 -A _max,i ) / A _max,i ;
[0098] In the above formula:
[0099] A _max,i+1 This represents the maximum water flow area of the (i+1)th cross section.
[0100] Among them, when Г _i A value less than 0 indicates cross-sectional contraction; when Г _i A value greater than 0 indicates cross-sectional expansion. This index reflects the abruptness of the purely geometric transition and can complement the ratio of hydraulic transport capacity to other comprehensive factors.
[0101] (f) The channel segment type identifier, the normalized distance of backwater impact length, the hydraulic transport capacity ratio, the cumulative bottleneck index along the channel, and the cross-sectional transition gradient are spliced together to generate the channel topology encoding vector c. _i ,Right now:
[0102] c _i =[τ _i ,(δ _i ) bw,up ,(δ _i ) bw,down ,(φ _i ) hyd BSI _i ,Г _i ];
[0103] In the formula:
[0104] τ_i This serves as an identifier for the channel segment type, and can specifically be a one-hot encoded vector, such as τ. _i ∈{[1,0,0],[0,1,0],[0,0,1]}, which correspond to different channel types such as open channel, culvert, and aqueduct.
[0105] In this case, the geometric eigenvector g _i With channel topology encoding vector c _i The vectors are spliced together to form the complete feature vector f for each cross-section. _i =[g _i ||c _i ]; || indicates a concatenation operation;
[0106] f _i This will serve as the spatial input to the spatiotemporal deep learning proxy model, enabling the model to perceive the hydraulic abrupt changes caused by the topological changes of composite channels (especially the open channel to culvert transition nodes) without performing complex three-dimensional fluid dynamics calculations.
[0107] This application introduces the hydraulic transport capacity ratio and the normalized distance of backlog influence length based on the constant gradually varying flow theory to construct a channel topology encoding vector. This enables the network to perceive hydraulic abrupt changes caused by flow capacity mismatch at open channel-to-culvert transition nodes, improves the spatial resolution of the backlog influence zone, and thus captures the backlog and overflow risks that are likely to occur in actual engineering projects.
[0108] According to embodiments of this application, optional implementations of feature fusion and network architecture design for a proxy model are described, particularly how to utilize flow-aware spatial feature modulation and time-varying cross-attention mechanisms for feature fusion. This architecture design can be used to alleviate the problem of drastic changes in spatial state with temporal boundary conditions in long-distance water diversion proxy models.
[0109] In practical implementation, feature fusion is performed using flow-aware spatial feature modulation and time-varying cross-attention mechanisms, including:
[0110] That is, the data in the spatial and temporal dimensions are encoded independently. The cross-sectional feature sequence, which is concatenated with the geometric features and the channel topology encoding vector, is input into the spatial encoder to extract spatial features.
[0111] Accordingly, a one-dimensional convolutional network, Conv1D, is used to extract local features from the cross-sectional features. The specific formula can be expressed as follows:
[0112] (h _i ) SE =Conv1D(f _i-r:i+r );
[0113] In the formula:
[0114] r is the radius of the one-sided receptive field of the convolution kernel;
[0115] Among them, (h _i ) SE ∈R d _t’ d represents the spatial features extracted from the i-th cross section. _t’ R represents the hidden layer dimension, and R represents the set of real numbers.
[0116] Since the input features contain topological information such as cross-sectional transition gradients and hydraulic transport capacity ratios, the convolutional kernel can automatically capture abrupt gradients at open channel-to-underground channel transition nodes, thereby encoding backlog risk at the feature level.
[0117] Furthermore, the time series x(t) of boundary condition data (such as headworks inflow, meteorological data, etc.) is input into a time-series encoder to extract sequence features. Accordingly, a two-layer gated recurrent unit (GRU) network is employed.
[0118] (h _t ) TE =GRU(x(t),(h _t-1 ) TE );
[0119] In the formula:
[0120] (h _t ) TE ∈R d _t’ , representing the sequence characteristics at time t;
[0121] (h _t-1 ) TE The sequence characteristics represent time t+1.
[0122] Furthermore, a spatial feature modulation mechanism based on flow perception is introduced. The maximum transport capacity of each cross-section is calculated based on its roughness, maximum flow area, hydraulic radius, and bottom slope. The ratio of the inflow at the canal head to the maximum transport capacity of each cross-section is then calculated to obtain the flow utilization rate ρ. _i (t)=Q _in (t) / Q _cap,i ;
[0123] In the formula:
[0124] Q _in (t) reflects the inflow rate at the head of the canal at time t;
[0125] Q _cap,i Reflects section P _i Maximum conveying capacity;
[0126] ρ _i(t) reflects the proportion of the current operating flow to the maximum flow capacity of the section. When it is close to or exceeds 1, it indicates that the section is in a state of full load or overload, and the risk of backflow increases.
[0127] Furthermore, by using flow utilization rate to modulate spatial features element-wise through an activation function, the modulated spatial features [(h] are obtained. _i ) SE ] tilde (t)=(h _i ) SE ⊙σ(w _mod •ρ _i (t)+b _mod );
[0128] In the formula:
[0129] [(h _i ) SE (t)] tilde This represents the cross-sectional spatial feature vector after flow sensing modulation at time t.
[0130] w _mod ∈R d _t’ b _mod ∈R d _t’ Both are trainable parameter vectors;
[0131] σ() is the Sigmoid activation function;
[0132] ⊙ represents element-wise multiplication;
[0133] • Indicates scalar multiplication.
[0134] In this mechanism, when the flow utilization rate of a certain section is high, the output of the activation function approaches 1, the spatial characteristics of the section are preserved or amplified, and the network is guided to pay more attention to high-risk sections.
[0135] Conversely, the feature weights are reduced.
[0136] Next, the time-varying cross-attention fusion module is entered. The modulation spatial features are concatenated with the sequence features at the target time to generate the query vector Q. _i,t =W _Q [[(h _i ) SE ] tilde (t)||(h _t ) TE ];
[0137] In the formula:
[0138] W _Q ∈R d_t’ ×2d _t’ is a trainable weight matrix, and × is used to represent the matrix dimension;
[0139] || indicates a splicing operation.
[0140] Furthermore, using the full-time sequence features as key and value vectors, the attention weight α is calculated through a cross-attention mechanism. _i,t,t’ The fused spatiotemporal features f are obtained by weighted summation with the value vector. _i,t The specific calculation process can be described by the following formula:
[0141] α _i,t,t’ ={exp((Q _i,t ) T W _K (h _t’ ) TE ) / sqrt(d _t’ )} / {∑ _t’’=1 N_t [exp((Q _i,t ) T W _K (h _t’’ ) TE )] / sqrt(d _t’’ )};
[0142] f _i,t =∑ _t’=1 N_t [α _i,t,t’ •W _V (h _t’ ) TE ];
[0143] In the formula:
[0144] W _K \W _V ∈R d_t’×d_t’ , represents the trainable parameter matrix;
[0145] N _t This represents the total number of steps in the time series. This allows the final fused output to exhibit spatiotemporal evolution characteristics.
[0146] According to the embodiments of this application, when the length of the water conveyance trunk line is short or the number of discrete calculation sections N is... _s When the number of cross-sections is less than the preset number, and the channel structure is relatively uniform with no obvious topological abrupt changes, the channel spatial encoder can be replaced with a fully connected spatial encoder to improve inference speed and simplify the network structure. Specifically, this includes:
[0147] After flattening the feature vectors of all cross sections, the data are input into a multilayer perceptron (MLP) to extract global spatial features.
[0148] Accordingly, the cross-attention mechanism is replaced by a fully connected fusion structure, which directly concatenates the global spatial features, sequence features, and sequence features at the target time with the feature vector of the current section, and then processes them through a multilayer perceptron to obtain the fused features.
[0149] For example, (h _i ) SE =MLP([f _1 ||f _2 ||...||f _N_s ]);
[0150] f _i,t =MLP([(h _i ) SE ||(h _t ) TE ||f _i ]);
[0151] In the formula, f _i Let i be the feature vector of the i-th cross-section, i = 1, 2, ..., N _s ;
[0152] (h _t ) TE Let be the sequence characteristics at time t.
[0153] Under this architecture, (h) _t ) TE It contains time-varying information and can achieve spatiotemporal feature fusion with lower computational overhead in some scenarios.
[0154] In this embodiment, a time-varying cross-attention mechanism is designed to concatenate the target time-series features with spatial features to generate a query vector, ensuring the time-varying nature of the fused features. At the same time, a spatial feature element-by-element modulation mechanism based on flow utilization is introduced, enabling the proxy model to amplify the feature attention of high-risk sections according to the size of the real-time boundary flow, thereby simulating local hydraulic mutations under high flow conditions.
[0155] In some embodiments, the predicted values of flow rate, water depth, and evaporation and leakage losses for each cross-section are output, and the changes in tank storage are calculated in conjunction with mass conservation, specifically including:
[0156] That is, a multi-head physical decoder (MHPD) is constructed, and the fused spatiotemporal features are input into multiple parallel decoding sub-networks to achieve structured output of different physical quantities.
[0157] For the hydrodynamic state variables, the fused spatiotemporal features are input into two parallel fully connected decoding subnetworks, which output the predicted flow and water depth values for each cross section. The specific calculations are as follows:
[0158] Q _hat_i (t)=f _Q (f _i,t ;θ _Q );
[0159] h _hat_i (t)=f_h(f _i,t ;θ _h );
[0160] In the formula:
[0161] Q _hat_i (t) represents the cross section P _i The predicted flow rate at time t. _hat Represents the hat symbol;
[0162] h _hat_i (t) represents the corresponding predicted water depth;
[0163] f _Q and f _h These are trainable parameters θ. _Q and θ _h The two fully connected layers have no activation function in the last layer to accommodate positive and negative fluctuations and continuous value ranges of flow and water depth.
[0164] Accordingly, for the water conveyance loss variable, the fused spatiotemporal features are input into a decoding sub-network with a non-negative activation function, and the predicted values of evaporation loss and leakage loss for each cross section are output. The specific calculations are as follows:
[0165] E _hat_i (t)=Softplus(f _E (f _i,t ;θ _E ));
[0166] S _hat_i (t)=Softplus(f _S (f _i,t ;θ _S ));
[0167] In the formula:
[0168] E _hat_i (t) and S _hat_i (t) represents the evaporation loss rate and leakage loss rate of the canal section at time t, respectively;
[0169] f _E and f _SFor the corresponding two fully connected layers, the parameters are θ and θ. _E and θ _S ;
[0170] Softplus() is a non-linear activation function used to ensure that the evaporation and leakage rates output by the network are always non-negative, thus conforming to the actual situation.
[0171] Furthermore, the predicted flow area is determined based on the predicted water depth and the geometric characteristics of the cross-section, and the rate of change of water storage volume in the channel section is calculated in conjunction with the channel length. Correspondingly, the predicted flow area A is obtained by looking up the relationship between the predicted water depth and the geometric characteristics of the cross-section. _hat_i (t)=A(h _hat_i (t);g _i ).
[0172] Furthermore, the rate of change of water storage volume V in the canal section is calculated. _rate,i (t)={[A _hat_i (t+1)-A _hat_i (t)]•Δx _i} / Δt;
[0173] In the formula:
[0174] Δx _i Let be the length of the i-th canal segment;
[0175] Δt is the time step;
[0176] V _rate,i (t) characterizes the rate of change of static geometric water storage volume caused by water depth fluctuations;
[0177] A() is the feature mapping function.
[0178] In this case, based on the difference in flow predictions between adjacent cross sections, the predicted values of evaporation loss and leakage loss are subtracted, and the rate of change in water storage volume in the channel section is subtracted to calculate the change in channel storage volume, c. _hat_i (t)=Q _hat_i (t)-Q _i+1_hat (t)-E _hat_i (t)-S _hat_i (t)-V _rate,i (t);
[0179] In the formula:
[0180] c _hat_i (t) represents the final calculated change in water storage, i.e., the dynamic water volume residual.
[0181] Under ideal conditions of mass conservation, this value should approach 0;
[0182] However, in the actual operation of long-distance composite channels (such as alternating open and culvert channels), due to local backwater fluctuations, water energy dissipation, and dynamic residuals in model inference during the water flow evolution process, this term characterizes the dynamic channel storage change that is not fully covered by static geometric volume changes.
[0183] In this invention, the residual of the continuity equation is modified into the form of the rate of change of water storage volume in the channel section, which alleviates the training collapse problem caused by the inconsistency between the area change rate and the dimensions of the flow term in the traditional physical information neural network PINN, and ensures the stable convergence of the model in the long-distance water transfer scenario.
[0184] Meanwhile, by directly predicting evaporation and leakage through a multi-head network and calculating the change in tank storage by combining mass conservation, the lag of traditional post-hoc differential statistics and the problem of repeated allocation of tank storage caused by pure data-driven methods are suppressed, realizing the closed-loop and automatic decomposition of water conveyance losses through multiple mechanisms.
[0185] In another embodiment, an exemplary scheme describing a training method for a physically constrained spatiotemporal deep learning proxy model can be used to alleviate the technical problems of weak generalization ability and physical inconsistencies in purely data-driven models under long-distance water diversion scenarios.
[0186] In practice, the training process of the spatiotemporal deep learning proxy model includes the following steps:
[0187] That is, a training dataset containing labels for flow rate, water depth, evaporation, and leakage is generated based on simulated data. Accordingly, a calibrated hydrodynamic numerical model, such as MIKE11, or other hydrodynamic numerical models capable of solving the one-dimensional Saint-Venant equations, is used.
[0188] Furthermore, design simulation schemes with multiple factor combinations;
[0189] Variation factors include, but are not limited to, inflow rate at the canal head, air temperature, and relative humidity;
[0190] The Latin hypercube sampling method was used to extract multiple working conditions from the above factor space. For each working condition, a numerical model was run to extract the output variables of each section at each time step, which were used as the label values of the training data.
[0191] The label values include: cross-sectional flow rate, water depth, evaporation rate of the channel section, and leakage rate.
[0192] Furthermore, a total loss function is constructed, L, which is composed of the data fitting loss term L. _data Mass conservation constraint loss term L _mc And the residual loss term L in the momentum equation _sv Combining these elements, its expression is:
[0193] L=L _data +λ_mc L _mc +λ _sv L _sv ;
[0194] In the formula:
[0195] λ _mc and λ _sv The hyperparameters used to control the strength of physical constraints.
[0196] Furthermore, the predicted values of flow rate, water depth, evaporation, and leakage are used to calculate the data fitting loss term with the corresponding label values;
[0197] Introducing dimensional balance weights, the specific calculation formula is as follows:
[0198] L _data =[1 / (N _s •N _t )]∑ _i=1 N_s ∑ _t=1 N_t [w _Q (Q _i (t)-Q _hat_i (t)) 2
[0199] +w _h (h _i (t)-h _hat_i (t)) 2 +w _E (E _i (t)-E _hat_i (t)) 2 +w _S (S _i (t)-S _hat_i (t)) 2 ];
[0200] In the formula:
[0201] N _s The total number of cross-sections;
[0202] N _t This represents the total number of time steps.
[0203] Q _hat_i (t), h _hat_i (t), E _hat_i (t), S _hat_i (t) represents the predicted values of flow rate, water depth, evaporation, and leakage output by the network, respectively;
[0204] w _Q w_h w _E w _Sis the balance weight coefficient for each physical quantity, and its value is the reciprocal of the square of the standard deviation of the corresponding physical quantity in the training set.
[0205] Furthermore, based on the difference in flow predictions between adjacent cross sections, the predicted values of evaporation and seepage losses, and the rate of change in water storage volume of the canal section calculated from the predicted water depth, the mass conservation constraint loss term is calculated.
[0206] In this step, the residuals of the continuity equation are corrected to the form of the rate of change of water storage volume in the canal section. The specific formula is as follows:
[0207] L _mc =[1 / (N _s -1)•N _t ]∑ _i=1 N_s-1 ∑ _t=1 N_t [(Q _hat_i (t)-Q _hat_i+1 (t)-E _hat_i (t)-S _hat_i (t)-
[0208] [A _hat_i (t+1)-A _hat_i (t)]•Δx _i / Δt] 2 ];
[0209] In the formula:
[0210] A _hat_i (t) represents the cross-sectional area calculated based on the predicted water depth and known cross-sectional geometric features;
[0211] Δx _i Let be the length of the i-th channel segment;
[0212] Δt is the time step.
[0213] After correction, the dimensions of the volume change rate term are unified with those of the flow rate, evaporation, and leakage terms, ensuring stable convergence of the network in long-distance water transfer scenarios.
[0214] Furthermore, based on the time rate of change of the flow forecast, the spatial rate of change of the momentum flux calculated from the flow and depth forecasts, the water level gradient determined by the depth forecast, and the friction gradient calculated from the depth and flow forecasts, the residual loss term of the momentum equation is calculated. The specific formula is as follows:
[0215] L _sv =[1 / (N _s -1)•N _t ]∑ _i=1 N_s-1 ∑_t=1 N_t [(Q _hat_i (t+1)-Q _hat_i (t)) / Δt)+((β _hat_i+1 (t)-β _hat_i (t)) / Δx _i )+g•A _hat_i (t)((Z _hat_i+1 (t)-Z _hat_i (t)) / Δx _i )+g•A _hat_i (t)(S _hat_f,i (t)) 2 ];
[0216] In the formula:
[0217] β _hat_i (t)=[Q _hat_i (t)] 2 / A _hat_i (t) represents the momentum flux term;
[0218] Z _hat_i (t)=Z _bot,i +h _hat_i (t) represents the predicted water level, where Z _bot,i The elevation of the canal bottom;
[0219] g is the acceleration due to gravity;
[0220] S _hat_f,i (t) represents the friction gradient, calculated using the Manning formula, i.e.:
[0221] S _hat_f,i (t)=(n _i ) 2 Q _hat_i (t)•|Q _hat_i (t)| / ((A _hat_i (t)) 2 R _hat_ (t) 4 / 3 ); where R _hat_ (t) represents the predicted hydraulic radius, and || represents the absolute value operation. This loss term minimizes the residual of the Saint-Venant momentum equation, ensuring that the network prediction not only satisfies mass conservation but also conforms to the laws of fluid dynamics.
[0222] In this case, the spatiotemporal deep learning surrogate model is iteratively trained using the total loss function. For the training strategy, gradient descent optimizers such as Adam can be used, with a gradual increase strategy for the hyperparameters.
[0223] In the early stages of training, a smaller value is used to allow the network to fit the data features first.
[0224] As the training rounds increase, the value is gradually increased to the final set value, thus gradually tightening the physical constraints. The deterministic coefficients and mass conservation residuals of each physical quantity are calculated in real time on the validation set. The deterministic coefficients and mass conservation residuals are considered to meet the preset accuracy requirements.
[0225] The early stopping mechanism is triggered to complete the model training process.
[0226] Before proceeding, the composition of the evaluation index system needs to be determined.
[0227] The evaluation indicators are derived from two parts: the first part consists of water conveyance efficiency indicators, including but not limited to total water replenishment efficiency, leakage rate of each canal section, and evaporation loss rate; the second part consists of ecological environment monitoring data of the water-receiving area, including but not limited to river and lake surface area, groundwater level change in the water-receiving area, and vegetation coverage index. These two parts of indicators are combined to form a comprehensive evaluation indicator system containing several evaluation indicators.
[0228] In practice, the annual rate of change of the evaluation indicators is calculated, and adaptive dynamic weights are constructed by integrating static weights. The dynamic comprehensive evaluation index is then calculated, including the following steps:
[0229] That is, the original time series of the evaluation indicators are normalized and the standard deviation of the normalized series is calculated.
[0230] Suppose there are n evaluation indicators, such as the surface area of rivers and lakes, the groundwater level in the water-receiving area, and the cumulative ecological water replenishment, and T evaluation years;
[0231] Obtain the original time series of each indicator;
[0232] Optionally, the min-max normalization method is used to map it to the [0,1] interval to obtain the normalized time series (s). _j ) t Calculate the standard deviation σ of the normalized value of this indicator over the entire period. _j :
[0233] σ _j =sqrt((1 / (T-1))∑ _t=1 T ((s _j ) t -s' _j ) 2 ;
[0234] In the formula:
[0235] s' _j Let be the normalized average of the j-th indicator over T years. The standard deviation is used to characterize the overall volatility of the indicator throughout the entire period.
[0236] Furthermore, based on the differences in normalized values and standard deviations between adjacent years, the annual standardized rate of change Δ(s) of each evaluation indicator is calculated. _j ) t =|(s _j ) t -(s _j ) t-1 | / σ _j ;
[0237] In the first year (t=1), take (s) _j ) t =0; where t=2,3,...,T;
[0238] By using the standard deviation as the denominator, the influence of the inherent differences in the magnitude of change of different indicators is suppressed, making the rate of change comparable among different indicators.
[0239] Next, static weights are calculated based on the time-series information entropy of each evaluation indicator. Using the traditional entropy weight method, based on the dispersion of data distribution for each indicator across all evaluation years, time-independent static entropy weights (w) are calculated. _j ) ent This static weight provides a robust baseline for adaptive dynamic adjustment, preventing extreme weight shifts when the amount of data is limited.
[0240] Based on this, the annual standardized rate of change is scaled and adjusted using a preset rate of change response coefficient, multiplied by the static weights, and then normalized to generate adaptive dynamic weights. The adaptive dynamic weight (w) of the j-th indicator in year t is... _j ) t The calculation formula is:
[0241] (w _j ) t =(w _j ) ent •(1+γ•Δ(s _j ) t ) / [∑ _k=1 n (w _k ) ent •(1+γ•Δ(s _k ) t ];
[0242] In the formula:
[0243] γ is the rate of change response coefficient, which controls the magnitude of dynamic adjustment, and is generally not less than 0.
[0244] In the above formula, indicators with larger rates of change are enhanced based on the baseline weight provided by the entropy weight. For example, when an indicator (such as the area of a certain body of water) expands in a certain year, its Δ(s) _j ) t Larger, correspondingly (w) _j ) t This improvement allows the composite index to reflect key ecological changes of the year.
[0245] When γ=0, the method automatically degenerates into the static entropy weight method, forming a continuous transition.
[0246] In this embodiment, a one-year leave-for-cross validation strategy is used for parameter optimization. The specific method includes:
[0247] Each of the T evaluation years is taken as a verification year. The static entropy weight and the standardized rate of change of the indicators are recalculated using the data of the remaining T-1 years, and the comprehensive evaluation index of the verification year is predicted.
[0248] Within the range of [0,5], γ is traversed and searched with a set step size. The γ value that best preserves the order of the comprehensive evaluation index sequence of the verification year, that is, the value that is most consistent with the expert evaluation ranking or the known long-term trend of ecological improvement, is selected as the final rate of change response coefficient.
[0249] Furthermore, the normalized values of the evaluation indicators for the corresponding years are weighted and summed using adaptive dynamic weights to obtain the dynamic comprehensive evaluation index. The dynamic comprehensive evaluation index E for year t is... t The calculation formula is:
[0250] E t =∑ _j=1 n (w _j ) t (s _j ) t ;
[0251] In the formula:
[0252] E t This output format is compatible with traditional static evaluation indices.
[0253] While outputting the comprehensive evaluation index, it can also simultaneously output interpretable diagnostic information, such as extracting the names of the top three dynamically weighted indicators for the current year and their corresponding (s) _j ) t The values, as well as the indicators with the largest weight increases compared to static weights, provide decision-makers with an explanation of which indicator changes primarily drive the overall evaluation for the year.
[0254] As an alternative, when the evaluation period is long and the evaluation index system has clear phased characteristics, the sliding window entropy weight method can be used to replace the rate-of-change-driven adaptive dynamic weight calculation. Specifically, this includes:
[0255] In each evaluation year t, a sliding window is used within the range [t-W+1, t], where W is the preset window width; the dynamic weight (w) of the j-th indicator is calculated using the data within the sliding window. _j ) t =(1-(e _j ) [t-W+1:t] ) / (∑ _k=1 n (1-(e _k ) [t-W+1:t] );
[0256] In the formula:
[0257] n is the total number of evaluation indicators;
[0258] (e _j ) [t-W+1:t] Let be the information entropy of the normalized value of the j-th indicator within the sliding window. The dynamic comprehensive evaluation index is obtained by weighted summation of the normalized values of the evaluation indicators for the corresponding year using dynamic weights.
[0259] This scheme can automatically capture and amplify the weights of indicators with increased variability within a window during long-term evaluations, maintaining consistency with the physical logic of the rate of change-driven method. It also eliminates the need to explicitly set the γ parameter, making it suitable for water diversion projects with long-sequence monitoring data.
[0260] In practice, the multi-scenario evaluation and optimal scheduling strategy selection steps include the following processes:
[0261] That is, sampling is performed within a preset water transfer decision parameter space to generate multiple candidate water replenishment scenarios that include different headwater flow rates, water transfer durations, and water transfer start months.
[0262] Accordingly, the water diversion decision parameter space is defined, including:
[0263] Headwork flow rate, duration of water diversion, and month of commencement of water diversion;
[0264] Several candidate water replenishment scenarios are generated in the parameter space using methods such as uniform sampling, Latin hypercube sampling, or orthogonal experimental design.
[0265] Each candidate water replenishment scenario corresponds to a set of preset meteorological and hydrological boundary conditions time series data.
[0266] Furthermore, the boundary condition data of multiple candidate water replenishment scenarios are input into the trained spatiotemporal deep learning proxy model for batch inference, resulting in cross-sectional prediction data and multi-mechanism water conveyance loss decomposition results for each candidate water replenishment scenario.
[0267] Accordingly, the boundary condition data of several candidate water replenishment scenarios are packaged into batch tensors and input into the surrogate model all at once. Thanks to the parallel computing capabilities of deep learning models on hardware accelerators, such as GPUs, the surrogate model can perform forward propagation computation on these batch tensors, achieving fast batch inference. The reduced time consumption of batch inference can be used to improve the computational efficiency of multi-scenario evaluation.
[0268] Based on this, the inference output includes the predicted flow rate and water depth at each cross section of the entire channel at each time step under all candidate water replenishment scenarios, as well as the decomposed prediction results of water conveyance losses due to multiple mechanisms such as evaporation, leakage, and tank storage.
[0269] Next, the total water replenishment efficiency is calculated based on the cumulative water flow at the downstream section and the cumulative water flow at the head of the canal, and the operating cost index is determined based on the total water lifting volume and the number of operating days.
[0270] For any candidate water replenishment scenario, the total input water volume (also known as the total water lifting volume) at the headworks section and the total output water volume at the downstream control section (such as the lake inflow section) during the water transfer period are calculated by integrating the flow prediction value output by the surrogate model over the time dimension. This yields the effective water delivery volume. The total water replenishment efficiency η is defined as follows: _total for:
[0271] η _total =W _out,total / W _in,total ;
[0272] In the formula:
[0273] W _out,total This refers to the cumulative water flow at the downstream control section.
[0274] W _in,total This represents the cumulative water flow at the head section of the canal.
[0275] At the same time, an operating cost proxy index, Cost, is constructed. This index comprehensively considers the power consumption of pumping stations, equipment depreciation, and daily management costs. Its value is positively correlated with the total water lifting volume and the number of days of water transfer operation.
[0276] In this scenario, the objective function value for each candidate water replenishment scenario is calculated using the operating cost index weighted by the total water replenishment efficiency and a preset cost weighting coefficient. The candidate water replenishment scenario with the largest objective function value is then output as the optimal water replenishment scheme. Accordingly, for each candidate water replenishment scenario, the following objective function value J=η is constructed and calculated. _total-μ•Cost;
[0277] In the formula:
[0278] μ is a preset cost weighting coefficient used to adjust the relative importance of water replenishment efficiency and operating costs in comprehensive decision-making.
[0279] By iterating through and calculating the objective function value J of all candidate water replenishment scenarios, and globally sorting them, the scenario with the largest J value is selected as the recommended optimal water replenishment scheme and output. This optimal water replenishment scheme can provide decision support for the scheduling of water transfer projects.
[0280] Based on the constructed spatiotemporal deep learning agent model, this invention reduces the computation time of the hydrodynamic state of the entire channel and the multi-mechanism loss decomposition, making it possible to complete the batch reasoning of a large number of candidate water replenishment scenarios in a short time, and providing online decision support for finding the optimal scheduling strategy that comprehensively considers water replenishment efficiency and operating costs.
[0281] This application abandons complex time-series prediction networks that are susceptible to small sample limitations, and instead integrates the annual standardized rate of change of evaluation indicators with traditional static entropy weights to construct adaptive dynamic weights. While preserving the robust baseline of entropy weights, it assigns higher weights to ecological indicators that undergo drastic changes within a preset year, reflecting the phased evolution of the ecological environment restoration process in the water-receiving area.
[0282] According to an embodiment of this application, a deep learning simulation computing system for water conveyance in water transfer projects is provided. This system is a software architecture or virtual device entity used to execute the method of this application. It can be deployed on cloud servers, edge computing nodes, or digital twin water conservancy computing platforms to achieve a fully automated closed loop from data acquisition, feature processing, rapid inference to decision visualization.
[0283] In practical implementation, the deep learning-based rapid evaluation system for the ecological water replenishment effect of water diversion projects includes the following modules:
[0284] The data acquisition and feature engineering module is used to acquire cross-sectional data and boundary condition data along the water conveyance main line, as well as ecological environment monitoring data of the water receiving area, extract geometric features, and construct a channel topology encoding vector that includes the characteristics of changes in conveying capacity and the impact of backlog.
[0285] Accordingly, this module interfaces with the SCADA system, hydrological monitoring network, and meteorological station to acquire headwater flow, water level, and meteorological data in real time or offline. Simultaneously, the module incorporates a physical feature extraction algorithm, which can calculate the maximum transport capacity and hydraulic transport capacity ratio of each cross-section based on the Manning formula, and estimate the backwater characteristic length based on the constant gradually varying flow theory. This results in the generation of a channel topology encoding vector that explicitly encodes the hydraulic abrupt change characteristics of the open channel-to-culvert transition node.
[0286] The deep learning inference module is used to input geometric features, channel topology encoding vectors, and boundary condition data into a pre-trained spatiotemporal deep learning proxy model. It utilizes flow-aware spatial feature modulation and a time-varying cross-attention mechanism for feature fusion, outputting predicted values for flow rate, water depth, and evaporation and leakage losses at each cross-section. This module deploys a deep learning network trained with physical constraints, such as mass conservation and dimensionless residuals of the momentum equation.
[0287] The evaluation and analysis module is used to calculate the changes in tank storage based on the predicted values of flow rate, water depth, evaporation and leakage losses, combined with the mass conservation law, and to complete the decomposition of water conveyance losses by multiple mechanisms.
[0288] Based on the decomposition results of water loss through multiple mechanisms and ecological environment monitoring data, evaluation indicators were determined, the annual change rate of the evaluation indicators was calculated, static weights were integrated to construct adaptive dynamic weights, and a dynamic comprehensive evaluation index was calculated to complete the assessment of the ecological water replenishment effect.
[0289] Furthermore, to enhance the system's engineering usability and interactivity, the system also includes a subsystem module for display and early warning based on a visual decision-making layer. Specific functions include:
[0290] First, a dynamic visualization of water depth and flow distribution along the channel is displayed through a visual interface, along with spatial distribution heat maps showing the decomposition of evaporation, leakage, and storage losses. Managers can intuitively observe the head evolution process and the spatial aggregation characteristics of water loss through the front-end interface.
[0291] Second, it has an intelligent early warning function. When the predicted water depth of any section output by the deep learning inference module exceeds the design water depth, or when the flow utilization rate determined by the ratio of the inflow rate at the canal head to the maximum conveying capacity of each section exceeds a preset threshold, the system immediately triggers a backlog and overflow warning for the open channel-to-culvert transition node, alerting dispatchers that there is a safety hazard in the current flow conditions.
[0292] Third, when the system performs multi-scenario batch inference, the comparative analysis of multiple scenarios outputs a comparative report including the time series curves of the dynamic comprehensive evaluation index under different water replenishment scenarios and the optimal water replenishment scheme. This function receives the results of multi-scenario batch inference, comprehensively considers the total water replenishment efficiency and operating cost, and automatically selects the water replenishment scenario with the largest objective function value, providing direct decision support for the scientific scheduling of water transfer projects.
[0293] Furthermore, an electronic device and a corresponding computer-readable storage medium are provided;
[0294] Electronic devices include a memory and a processor; the memory stores computer programs.
[0295] When a processor executes a computer program, it can implement the methods provided in any of the claims of this application.
[0296] In terms of hardware structure, electronic devices can be independent servers, workstations, personal computers, or distributed computing clusters composed of multiple computers;
[0297] The processor may include a central processing unit (CPU), a graphics processing unit (GPU), a tensor processor (TPU), or other hardware chips dedicated to accelerating deep learning.
[0298] When electronic devices perform batch inference of spatiotemporal deep learning agent models, they can improve the speed of numerical simulation models.
[0299] The memory may include high-speed random access memory (RAM) or non-volatile memory (ROM, flash memory, hard disk, etc.) for persistent storage of historical hydrological data, meteorological data, network model weight parameters, and comprehensive evaluation index library;
[0300] Electronic devices also include communication interfaces for data exchange with external data acquisition networks (such as hydrological telemetry systems).
[0301] Furthermore, this embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements all the steps of the method described in the foregoing embodiments. The computer-readable storage medium can be any medium capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0302] In one possible scenario, λ _mc and λ _sv The initial value can be set to 0.01, and gradually increased after a preset number of training epochs. The hidden layer dimension is set to 128, and the radius of the receptive field r of the convolutional kernel on one side is set to 3.
[0303] Specifically, conventional hyperparameter tuning methods such as grid search and Bayesian optimization can be used to determine the specific values of the above parameters, and their specific values can be adaptively adjusted according to the channel scale and data volume.
[0304] In some cases, the preset number of cross-sections can be 30.
[0305] In some scenarios, constructing a channel topology encoding vector that includes the characteristics of changes in transport capacity and the impact of backlog requires constructing a hydrodynamic model such as MIKE11 to simulate the ecological water replenishment process, extracting features such as the channel topology encoding vector of changes in transport capacity and the impact of backlog from the hydrodynamic model simulation results, and inputting them into a spatiotemporal deep learning surrogate model.
[0306] The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, units, or modules, and may be electrical or other forms.
[0307] The order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments.
[0308] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0309] It should be noted that those skilled in the art can make several improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A deep learning simulation calculation method for water conveyance hydraulics in water transfer projects, characterized in that, include: Acquire cross-sectional data and boundary condition data along the water conveyance main line, extract geometric features, and construct a channel topology encoding vector that includes the characteristics of changes in conveying capacity and the impact of backwater. The geometric features, channel topology encoding vectors, and boundary condition data are input into the spatiotemporal deep learning proxy model. The model uses flow-aware spatial feature modulation and time-varying cross-attention mechanism to fuse features and output the predicted values of flow, water depth, evaporation and leakage losses for each section. Based on the predicted values of flow rate, evaporation and leakage losses, and combined with the mass conservation principle, the change in tank storage is calculated, and the decomposition of water conveyance loss by multiple mechanisms is completed. Based on the decomposition results of water loss through multiple mechanisms, the annual change rate of the evaluation index is calculated, and the static weights are integrated to construct an adaptive dynamic weight. The dynamic comprehensive evaluation index is then calculated to complete the assessment of the ecological water replenishment effect.
2. The method according to claim 1, characterized in that, Construct a channel topology encoding vector that includes characteristics of changes in transport capacity and backwater impact, including: Based on the cross-sectional roughness, maximum flow area, hydraulic radius, and bottom slope, calculate the maximum transport capacity of each cross-section under full-flow conditions. Calculate the ratio of the maximum transport capacity of adjacent cross sections to obtain the hydraulic transport capacity ratio; Based on the normal water depth and bottom slope upstream of the channel type conversion node, the backwater characteristic length is estimated. The distance from each section to the channel type conversion node is normalized using the backwater characteristic length to obtain the normalized distance of the backwater influence length. Extract the maximum hydraulic transport capacity ratio from the head of the canal to the current section as the cumulative bottleneck index along the canal, and calculate the relative change rate of area of adjacent sections as the section transition gradient. The channel section type identifier, the normalized distance of backlog impact length, the hydraulic transport capacity ratio, the cumulative bottleneck index along the channel, and the cross-sectional transition gradient are spliced together to generate a channel topology coding vector.
3. The method according to claim 1, characterized in that, Feature fusion is performed using flow-aware spatial feature modulation and a time-varying cross-attention mechanism, including: The cross-sectional feature sequence, which is spliced with geometric features and channel topology encoding vectors, is input into the spatial encoder to extract spatial features; The boundary condition data is input into a time encoder to extract sequence features; Calculate the ratio of the inflow rate at the canal head to the maximum transport capacity of each section to obtain the flow utilization rate; By utilizing flow utilization rate and applying an activation function, spatial features are modulated element by element to obtain modulated spatial features; The query vector is generated by concatenating the modulation spatial features with the sequence features at the target time. The full-time sequence features are used as the key vector and value vector. The attention weight is calculated through a cross-attention mechanism and then weighted and summed with the value vector to obtain the fused spatiotemporal features.
4. The method according to claim 3, characterized in that, Output the predicted flow rate, water depth, and evaporation and leakage losses for each cross-section, and calculate the change in tank storage based on mass conservation, including: The fused spatiotemporal features are input into multiple parallel decoding sub-networks, and the predicted flow rate and water depth of each section are output. The fused spatiotemporal features are input into a decoding sub-network with a non-negative activation function, and the predicted values of evaporation loss and leakage loss for each section are output. The predicted water passage area is determined based on the predicted water depth and the geometric characteristics of the cross section, and the rate of change of water storage volume in the channel section is calculated in combination with the length of the channel section. The change in water storage volume is calculated by subtracting the predicted values of evaporation loss and leakage loss from the difference in flow rate between adjacent cross sections and the rate of change of water storage volume in the channel section.
5. The method according to claim 1, characterized in that, The training process of the spatiotemporal deep learning surrogate model includes: A training dataset containing labels for flow rate, water depth, evaporation, and leakage was generated based on simulated data. Construct a total loss function, which includes a data fitting loss term, a mass conservation constraint loss term, and a momentum equation residual loss term. The data fitting loss term is calculated by using the predicted values of flow rate, water depth, evaporation, and leakage with the corresponding label values; The mass conservation constraint loss term is calculated based on the difference in flow predictions between adjacent cross sections, the predicted values of evaporation and seepage losses, and the rate of change of water storage volume in the channel section calculated from the predicted water depth. The residual loss term of the momentum equation is calculated based on the time rate of change of the flow forecast, the spatial rate of change of the momentum flux, the water level gradient determined by the water depth forecast, and the friction gradient calculated based on the water depth forecast and the flow forecast. The spatiotemporal deep learning agent model is iteratively trained using the total loss function.
6. The method according to claim 1, characterized in that, The annual rate of change of the evaluation indicators is calculated, and adaptive dynamic weights are constructed by integrating static weights. The resulting dynamic comprehensive evaluation index includes: The original time series of the evaluation indicators are normalized, and the standard deviation of the normalized series is calculated. Based on the differences in normalized values and standard deviations between adjacent years, the annual standardized rate of change of each evaluation indicator is calculated. Static weights are calculated based on the time-series information entropy of each evaluation indicator. The annual standardized rate of change is scaled and adjusted using the rate of change response coefficient, multiplied by the static weights, and then normalized to generate adaptive dynamic weights. By using adaptive dynamic weights to weight and sum the normalized values of the evaluation indicators for the corresponding year, a dynamic comprehensive evaluation index is obtained.
7. The method according to claim 1, characterized in that, After completing the ecological water replenishment effect assessment, it also includes: Sampling was performed within the water replenishment decision parameter space to generate multiple candidate water replenishment scenarios, including different headwork flow rates, water transfer durations, and water transfer start months. Boundary condition data of multiple candidate water replenishment scenarios are input into a trained spatiotemporal deep learning proxy model for batch inference to obtain cross-sectional prediction data and multi-mechanism water conveyance loss decomposition results for each candidate water replenishment scenario. The total water replenishment efficiency is calculated based on the cumulative water flow at the downstream section and the cumulative water flow at the head of the canal. The operating cost index is determined based on the total water lifting volume and the number of operating days. The objective function value of each candidate water replenishment scenario is calculated using the total water replenishment efficiency and the weighted operating cost index. The candidate water replenishment scenario with the largest objective function value is output as the optimal water replenishment scheme.
8. A deep learning simulation calculation system for water conveyance in water transfer projects, characterized in that, include: The data acquisition and feature engineering module is used to acquire cross-sectional data and boundary condition data along the water conveyance main line, extract geometric features, and construct a channel topology encoding vector that includes the characteristics of changes in conveying capacity and the impact of backlog. The deep learning inference module is used to input geometric features, channel topology encoding vectors and boundary condition data into the spatiotemporal deep learning proxy model. It uses flow-aware spatial feature modulation and time-varying cross-attention mechanism to fuse features and output the predicted values of flow, water depth and evaporation and leakage losses for each section. The evaluation and analysis module is used to calculate the changes in tank storage based on the predicted values of flow rate, evaporation and leakage losses, combined with the mass conservation law, and to complete the decomposition of water conveyance losses by multiple mechanisms. Based on the decomposition results of water conveyance loss through multiple mechanisms, the annual rate of change of evaluation indicators is calculated, and adaptive dynamic weights are constructed by integrating static weights to obtain a dynamic comprehensive evaluation index.
9. The system according to claim 8, characterized in that, It also includes a visualization decision-making module, which is used for: The system displays dynamic visualizations of water depth and flow distribution along the channel through a visual decision-making interface, as well as spatial distribution heat maps of evaporation, leakage, and storage losses. When the predicted water depth at any section exceeds the design water depth, or the flow utilization rate exceeds the preset threshold, a backlog and overflow warning is triggered for the open channel-to-culvert transition node. In the multi-scenario comparative analysis, the output includes time-series curves of dynamic comprehensive evaluation index under different water replenishment scenarios and a comparative report of the optimal water replenishment scheme.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, The processor executes the method as described in any one of claims 1 to 7 when executing a computer program.