Cascade reservoir water level perception enhanced bidirectional attention simulation method and system

By using a deep learning network model with variable-independent feature block embedding and bidirectional attention mechanism, the problems of parameter calibration difficulties and neglect of bidirectional hydraulic coupling in cascade reservoir water level simulation are solved, achieving high-precision water level prediction and physical consistency.

CN121902091APending Publication Date: 2026-04-21GUODIAN DADU RIVER POWER ENG
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUODIAN DADU RIVER POWER ENG
Filing Date
2025-12-18
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing methods for cascade reservoir water level simulation are difficult to meet real-time requirements when dealing with large-scale watersheds due to difficulties in parameter calibration and excessive computation time. Furthermore, traditional data-driven methods ignore the independence of physical variables and the two-way hydraulic coupling between upstream and downstream, resulting in low accuracy and poor physical consistency in water level prediction.

Method used

A deep learning network model employing a variable-independent feature block embedding strategy and a bidirectional attention mechanism extracts multi-scale features through one-dimensional convolutional layers and dilated convolutional kernels, constructs horizontal and vertical attention branches, captures the coupling dependencies of heterogeneous variables such as water level, flow rate, and gate opening, and achieves bidirectional hydraulic coupling feature extraction.

Benefits of technology

It improves the physical consistency and accuracy of water level simulation, enabling more precise analysis of the complex two-way hydraulic connections of cascade reservoir groups and enhancing the model's adaptability to hydrological events at different time scales.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121902091A_ABST
    Figure CN121902091A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of hydrological monitoring and forecasting, and discloses a cascade reservoir water level perception enhanced two-way attention simulation method and a cascade reservoir water level perception enhanced two-way attention simulation system. A variable independent feature block embedding strategy is adopted to map time series data of different physical dimensions into independent feature channels, a deep learning network model integrated with a bidirectional attention mechanism is constructed to extract multi-scale time series features and calculate bidirectional coupling features, and a hydraulic coupling mapping relation between cascade reservoirs is determined based on supervised learning. And finally, deducing a downstream reservoir water level evolution sequence by using the real-time operation data. According to the method, through the synergistic effect of the variable independent embedding strategy and the bidirectional attention mechanism, independent extraction of heterogeneous physical variable characteristics such as the water level and the flow and synchronous simulation of upstream and downstream hydraulic lagging and jacking effects are achieved, and the physical consistency and calculation precision of cascade reservoir group water level prediction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hydrological monitoring and forecasting technology, specifically to a method and system for enhancing bidirectional attention simulation of water level perception in cascade reservoirs. Background Technology

[0002] Cascade reservoir water level simulation is a core component of watershed water resource allocation and flood control and disaster reduction decision-making. It uses mathematical models to reenact and extrapolate the water level change process of a group of reservoirs, aiming to reveal the hydraulic connection and evolution law between upstream and downstream reservoirs, and provide data support for the joint optimization operation of hydropower stations.

[0003] Currently, the mainstream methods for simulating water levels in cascade reservoirs mainly rely on hydrodynamic models based on physical mechanisms or traditional time series analysis methods based on data-driven approaches. The former simulates water flow by solving the Saint-Venant equations, while the latter utilizes recurrent neural networks or long short-term memory networks to mine statistical patterns in historical water level data. Both methods have, to some extent, enabled the calculation and prediction of water levels in single reservoirs or simple cascade reservoirs.

[0004] However, due to the complex nonlinearity and time-varying nature of the hydraulic connections in cascade reservoir groups, existing physical models often fail to meet real-time requirements when facing large-scale watersheds due to difficulties in parameter calibration and excessive computation time. Traditional data-driven methods typically mix variables with different physical properties such as water level and flow rate, ignoring the independence of the physical characteristics of each variable. Moreover, most of them only focus on the unidirectional impact of upstream water flow on downstream, making it difficult to effectively capture the backwater effect of high downstream water levels on upstream. This results in limited accuracy of water level simulation under complex hydraulic coupling conditions, and fails to accurately reflect the two-way hydraulic linkage mechanism between cascade reservoirs. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method and system for enhancing bidirectional attention simulation of water level perception in cascade reservoirs. The aim is to solve the problems of low water level prediction accuracy and poor physical consistency caused by confusion in the extraction of physical variable features and the lack of a bidirectional hydraulic coupling mechanism between upstream and downstream in existing cascade reservoir water level simulation technologies.

[0006] To achieve the above objectives, the present invention provides the following technical solution: The first aspect of this invention provides a method for simulating bidirectional attention to enhance water level perception in cascade reservoirs.

[0007] The method specifically includes the following steps: Historical hydrological monitoring data of the cascade reservoir group was acquired and preprocessed. This historical hydrological monitoring data includes water level variables, flow variables, and engineering operation status variables (such as gate opening, unit load, or discharge plans) at upstream and downstream reservoir stations. The raw observations were Z-score standardized using the historical mean and standard deviation of each physical variable to generate a standardized multivariate time series input tensor that eliminates dimensional differences.

[0008] A perceptually enhanced feature tensor is generated using a variable-independent feature block embedding strategy. An embedding layer is constructed that independently configures feature mapping channels for each physical variable. For each univariate sequence corresponding to a physical variable in the input data, a one-dimensional convolutional layer is used to extract features using a large-stride sliding window. The convolutional operation is restricted to the time dimension to isolate feature channels along the physical variable dimension. After feature extraction, the embedded features of all physical variables are combined to generate the perceptually enhanced feature tensor.

[0009] A deep learning network model integrating a bidirectional attention mechanism is constructed, and multi-scale features are extracted. Multiple sets of parallel one-dimensional dilated convolutional kernels are configured in the deep learning network model, each set having a different dilation rate parameter to represent different temporal receptive fields. Parallel dilated convolution operations are performed on the perceptual enhancement feature tensor using these one-dimensional dilated convolutional kernels, and the outputs of different dilation rate branches are concatenated along the channel dimension to generate a multi-scale fused feature tensor.

[0010] A bidirectional attention mechanism is used to compute bidirectional coupled features. First, the multi-scale fused feature tensor is reshaped in terms of dimensions, and features are decoupled in the variable dimension and the time dimension, so as to handle the spatial dependency between heterogeneous variables and the temporal dependency between time steps respectively.

[0011] Next, two attention computation branches are constructed in parallel or sequentially: The first is a horizontal attention branch: based on the variable dimension, an attention mechanism is built to calculate the correlation weights between different physical variable channels, thereby capturing the coupling dependencies between heterogeneous variables with different physical properties, such as water level, flow rate, and gate opening, at the same time. The second is a vertical attention branch: based on the time dimension, an attention mechanism is built to calculate the dependency weights between different time steps. In this process, by capturing the long-range dependencies of the time series, forward propagation weights characterizing the lag transmission effect of upstream discharge through the river channel evolution, and backward constraint weights characterizing the physical constraint mechanism of downstream high water levels on upstream flow backflow, are extracted.

[0012] Finally, the variable coupling features extracted by the lateral attention branch are fused with the temporal evolution features extracted by the longitudinal attention branch (e.g., by gated fusion or residual connection) to generate the final bidirectional coupling features.

[0013] A feature output sequence is generated and supervised learning is performed. The bidirectional coupled features are added as residual connection terms to the multi-scale fusion feature tensor. Layer normalization is performed on the result, and the hidden layer state tensor is output. The hidden layer state tensor is used as input to the decoder for regression prediction to obtain the predicted water level. The mean square error between the model's predicted water level and the actual observed water level is calculated. The accumulated mean square error in the time step dimension and the target variable dimension of the prediction window is used as the loss value. The backpropagation algorithm is used to drive the network parameter update, establishing the bidirectional hydraulic coupling mapping relationship between the cascade reservoirs and generating a cascade reservoir hydrological simulator.

[0014] Perform real-time simulation and projection of cascade reservoir water levels. Acquire the current real-time operating status data of the cascade reservoirs, and extract the real-time observation sequence according to the preset historical window length; if there are missing data in the real-time observation sequence, fill them in using the valid observation values ​​from the previous time. Standardize the real-time observation sequence using the mean and standard deviation determined in the preprocessing step, and input it into the cascade reservoir hydrological simulator after processing using the variable-independent feature block embedding strategy. Output the normalized predicted value of the downstream reservoir water level evolution sequence, and then perform inverse normalization to restore the normalized predicted value.

[0015] A second aspect of the present invention provides a cascade reservoir water level sensing and enhanced bidirectional attention simulation system for performing the above-described method, comprising: Data acquisition terminal and simulation server that communicates with the data acquisition terminal.

[0016] The data acquisition terminal is configured as an industrial field data communication device, used to collect water level, flow velocity and flow data of each station in the cascade reservoir in real time and transmit them to the simulation server.

[0017] The hardware architecture of a simulation server includes at least one processor, memory, and a communication bus. The memory stores computer program instructions, which, when executed by the processor, implement the following functional modules: The perceptual enhancement preprocessing module is configured as a data preprocessing operation unit. It is used to execute the variable-independent feature block embedding strategy. Through convolution operations of independent channels, it maps time-series data of different physical dimensions into independent feature channels and outputs perceptual enhancement feature tensors.

[0018] The bidirectional attention feature extraction module is configured as a network feature calculation unit. It is used to extract multi-scale temporal features based on a deep learning network model using multiple sets of parallel one-dimensional dilated convolution kernels. Subsequently, feature decoupling is performed by constructing a horizontal attention branch to capture the coupling dependency between heterogeneous physical variables such as water level and flow rate, and constructing a vertical attention branch to capture the forward propagation and backward constraint weights in the time dimension. The outputs of the two branches are then fused to calculate and generate bidirectional coupled features.

[0019] The network training optimization module is configured as a model parameter updater. It is used to calculate the mean square error between the predicted water level and the actual water level during the offline training phase, update the model parameters based on the backpropagation algorithm, establish the bidirectional hydraulic coupling mapping relationship between the cascade reservoirs, and generate a cascade reservoir hydrological simulator.

[0020] The water level simulation and extrapolation module is configured as an online simulation inference engine, used to load the hydrological simulator of the cascade reservoirs during the online operation phase and extrapolate the water level change curve of the downstream reservoirs based on the real-time input data.

[0021] This invention provides a method and system for enhancing bidirectional attention simulation of water level sensing in cascade reservoirs. It offers the following advantages: 1. This invention employs a variable-independent feature block embedding strategy, using one-dimensional convolution operations on independent channels to isolate time-series data of different physical dimensions such as water level, flow rate, and gate opening. This approach helps avoid feature confusion caused by heterogeneous physical variables in the shallow layers of deep learning networks, ensuring that the model can independently capture the specific changing patterns of a single physical variable, thereby improving the accuracy of the input feature tensor in representing the physical process.

[0022] 2. This invention utilizes a feature decoupling strategy to construct a bidirectional attention architecture that includes horizontal and vertical branches. By constructing a horizontal attention branch, it is possible to deeply explore the coupling dependencies between heterogeneous physical variables such as water level, flow rate, and gate opening. By constructing a vertical attention branch, it is possible to simultaneously capture the hysteresis transmission effect of upstream discharge and the backwater physical constraint of downstream high water level in the time dimension. Compared with traditional mixed input extrapolation, this variable and time decoupling bidirectional branch mechanism can more accurately analyze the complex bidirectional hydraulic connections in cascade reservoir groups, significantly improving the physical consistency of water level simulation results and the interpretability of the model.

[0023] 3. This invention configures multiple sets of parallel one-dimensional dilated convolutional kernels with different dilation rates in the network model, achieving synchronous coverage of receptive fields at different times. This structure enables the model to extract both local instantaneous hydrological fluctuations and long-term water level evolution trends at the same feature level, which helps to solve the problem that a single convolutional kernel cannot simultaneously adapt to short-term flood processes and long-term dry periods, thus enhancing the model's adaptability to hydrological events at different time scales. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of the method flow of the present invention; Figure 2 This is a system framework diagram of the present invention.

[0025] Among them, 100 is the data acquisition terminal; 200 is the simulation server; 210 is the perception enhancement preprocessing module; 220 is the bidirectional attention feature extraction module; 230 is the network training optimization module; and 240 is the water level simulation and deduction module. Detailed Implementation

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

[0027] Reference Figure 1 This invention provides a method for enhancing bidirectional attention simulation of water level perception in cascade reservoirs, the method comprising: Step S1: Perform data-aware enhancement preprocessing based on variable-independent embedding.

[0028] Historical hydrological monitoring data of the cascade reservoir group was acquired, including the operational sequences of upstream and downstream reservoir stations. The historical hydrological monitoring data was cleaned and normalized. A variable-independent feature block embedding strategy was adopted to map time-series data of different physical dimensions into independent feature channels, maintaining the independence of water level, flow rate, and gate opening variables in the feature space, and generating a perceptual-enhanced feature tensor.

[0029] Step S2: Construct a multi-scale hydrological simulation network integrating a bidirectional attention mechanism.

[0030] A deep learning network model based on the ModernTCN architecture was constructed. Multiple sets of parallel one-dimensional dilated convolutional kernels were configured in the network model to extract multi-scale temporal receptive field features of the feature tensor. A bidirectional attention computation unit was configured in the network model to perform feature decoupling. The vertical attention branch was used to calculate the forward hydraulic propagation weights from upstream to downstream stations and the backward hydraulic backlash weights from downstream to upstream stations in the time dimension, and the horizontal attention branch was used to capture the coupling dependencies between variables. Furthermore, a channel-aware enhancement module was configured in the network model to adaptively generate feature response weights for each physical variable channel, thereby enhancing the perception of key physical variable features.

[0031] Step S3: Train the hydrological simulation network to establish a two-way hydraulic coupling mapping relationship.

[0032] The historical hydrological monitoring data processed in step S1 is divided into training and validation sets. The training set is input into the network model constructed in step S2, and the network parameters are iteratively updated by minimizing the loss function between the predicted and actual water levels. During training, the longitudinal attention branch in the network is used to automatically learn the time-delay characteristics of flow propagation between cascade reservoirs and the nonlinear constraint mechanism of backwater. At the same time, the feature weights of each physical variable are dynamically recalibrated with the help of the channel perception enhancement module to strengthen the expression of key information, thereby generating a convergent cascade reservoir hydrological simulator with physical interpretability.

[0033] Step S4: Perform real-time simulation and projection of the water levels in the cascade reservoirs.

[0034] The system acquires real-time operational status data and scheduling instructions for the cascade reservoirs. After preprocessing with enhanced perception in step S1, this data is input into the hydrological simulator trained in step S3. The simulator outputs a sequence of downstream reservoir water level evolution within a preset future time window, serving as the physical status basis for joint scheduling of the cascade reservoirs or decisions in the electricity spot market.

[0035] Reference Figure 2 The present invention also provides a cascade reservoir water level sensing enhanced bidirectional attention simulation system for performing the above method.

[0036] The system includes a data acquisition terminal 100 and a simulation server 200 that is communicatively connected to the data acquisition terminal 100.

[0037] The data acquisition terminal 100 is configured as an industrial field data communication device, used to collect water level, flow velocity, flow rate and unit operating data of each station in the cascade reservoir in real time, and transmit the collected data synchronously to the simulation server 200.

[0038] The simulation server 200 is internally configured with a perception enhancement preprocessing module 210, a bidirectional attention feature extraction module 220, a network training optimization module 230, and a water level simulation and extrapolation module 240.

[0039] The perception enhancement preprocessing module 210 is configured as a time-series data feature engineering processor, used to receive data transmitted by the data acquisition terminal 100 and perform variable-independent feature block embedding operations. By isolating the feature channels of different physical variables in the embedding layer, the perception enhancement preprocessing module 210 enhances the model's ability to perceive the changing trend of a single physical quantity and outputs channel-independent feature tensors.

[0040] The bidirectional attention feature extraction module 220 is configured as a deep neural network building unit to establish a network structure containing multiple sets of parallel one-dimensional dilated convolutional layers, decoupled bidirectional attention layers, and a channel-aware enhancement module. The bidirectional attention feature extraction module 220 performs feature decoupling and reconstruction: it uses the longitudinal attention branch to calculate the forward propagation features representing the evolution of water flow from upstream to downstream, and the backward constraint features representing the reverse constraint effect of downstream water level on upstream tailwater level; it uses the lateral attention branch to capture inter-variable dependencies; and it uses the channel-aware enhancement module to adaptively recalibrate the feature channels, generating the final bidirectional coupled features.

[0041] The network training optimization module 230 is configured as a model parameter updater, used to perform supervised learning training on the network based on historical data, adjust the network weights through the backpropagation algorithm, establish the hydraulic-electric coupling mapping relationship between cascade reservoirs, and generate an executable hydrological simulator file.

[0042] The water level simulation and inference module 240 is configured as an online simulation inference engine, which is used to load the trained hydrological simulator file, infer the water level change curve of the downstream reservoir according to the real-time input dispatch instructions, and output the simulation results through the visualization interface or send them to the external dispatch system.

[0043] The core principles and specific implementation details of the technical solution of the present invention will be further elaborated below in conjunction with the above steps S1 to S4.

[0044] Step S1 performs data-aware enhancement preprocessing based on variable-independent embedding. Step S1 specifically includes the following sub-steps: Step S101: Acquire historical hydrological monitoring data of the cascade reservoir group and perform data cleaning. The historical hydrological monitoring data is collected from the monitoring and data acquisition systems of the cascade hydropower stations. The data includes multi-dimensional time series variables, specifically upstream reservoir water level sequences, downstream reservoir water level sequences, inflow sequences, outflow sequences, and turbine guide vane opening sequences. For data gaps caused by sensor failures or communication interruptions, linear interpolation is used for filling; for outliers caused by signal interference, the Laida criterion is used for identification and removal.

[0045] The specific algorithms for the data cleaning described above can be implemented by those skilled in the art using existing data processing toolkits, and are well-known technologies in the field, so they will not be elaborated here.

[0046] Step S102 involves normalizing the cleaned historical hydrological monitoring data. Since water level, flow rate, and aperture have different physical dimensions and orders of magnitude, directly inputting them into the network would lead to unstable gradient updates. Therefore, the Z-Score normalization method is used to transform each physical variable to conform to a standard normal distribution with a mean of 0 and a standard deviation of 1. The normalization calculation formula is as follows: ; In the formula, For the first Time of the first The original observation values ​​of each physical variable; For the first time window in history The mean of each physical variable; For the first time window in history The standard deviation of each physical variable; These are the normalized data values.

[0047] After normalization, a standardized multivariate time series input tensor is generated. Its dimensions are defined as follows: ; In the formula, Input tensors for multivariate time series; It is the set of real numbers; This refers to the number of physical variables, i.e., the number of channels; This represents the time step of the historical observation sequence.

[0048] Step S103: Perform variable-independent feature block embedding. This embodiment uses an independent channel convolution strategy instead of the traditional full-feature hybrid embedding to maintain the independent feature attributes of each physical variable. First, the block length is set to... The sliding step size is Based on the length of the input sequence Calculate the number of time blocks generated The formula for calculating the number of time blocks is as follows: ; In the formula, Number of time blocks; The length of the input sequence; This is the block length; This is the sliding step size; For constant terms that include boundary padding; This indicates the floor function.

[0049] Build includes An independent channel embedding layer for the input tensor The Middle A univariate sequence of physical variables We use a one-dimensional convolutional layer to extract features through a sliding window. The calculation formula for this embedding operation is as follows: ; In the formula, For the first Embedded feature tensors corresponding to each physical variable; For the first Time series input of one physical variable; This is a one-dimensional convolution operation function, where the kernel size is equal to the block length. The convolution stride is equal to the sliding stride. Furthermore, the convolution operation is performed only in the time dimension and does not involve interactions between variable dimensions.

[0050] For including The overall input of each variable, and the final output is the embedded feature tensor. The dimensions are defined as follows: ; In the formula, The output is the embedded feature tensor; The number of physical channels; Number of time blocks; The feature dimension is the one after embedding and mapping.

[0051] This processing method forcibly isolates the feature channels of different physical variables at the embedding layer, generating feature tensors. This serves as input data for subsequent bidirectional attention simulation networks.

[0052] In this embodiment, by adopting a variable-independent feature block embedding strategy and utilizing the sliding mapping of large kernel convolution in the time dimension, long-term time-series data is transformed into high-dimensional feature blocks. At the same time, the channel independence of different physical attributes such as water level and flow rate is forcibly maintained in the input layer, realizing the decoupling of physical features. This helps the model to accurately extract the independent contribution weight of a single physical factor to water level evolution in subsequent network layers.

[0053] Step S2 involves constructing a multi-scale hydrological simulation network integrating a bidirectional attention mechanism. Step S2 specifically includes the following sub-steps: Step S201: Construct a multi-scale temporal feature extraction layer based on hollow spatial pyramid pooling. The embedded feature tensor generated in step S1... To input the network and capture the physical characteristics of flood evolution and wave disturbances at different time scales in cascade reservoirs, multiple sets of parallel one-dimensional dilated convolutional kernels are configured. A set of dilation rate parameters is defined. Each hole rate parameter corresponds to a different temporal receptive field. For the input feature tensor... The calculation formula for multi-scale feature extraction by performing parallel convolution operations is as follows: ; In the formula, In order to achieve a high void ratio The feature output tensor; The embedded feature tensor output in step S1; These are the convolution kernel weight parameters corresponding to the porosity. This is a one-dimensional dilated convolution operation function, where the sampling interval between the elements of the convolution kernel is set to... .

[0054] The output features of different porosity branches are concatenated along the channel dimension to generate a multi-scale fused feature tensor. The dimensions are defined as follows: ; In the formula, For multi-scale fusion feature tensors; This is a tensor splicing operation; This represents the total feature dimension after concatenation. The number of channels is a variable. This represents the number of time blocks. This parallel multi-scale structure enables the network to simultaneously extract hydrological fluctuation features across different time spans.

[0055] Step S202: Construct a bidirectional hydraulic coupling attention computation unit. After the multi-scale feature extraction layer, a bidirectional attention mechanism is configured to resolve the hydraulic coupling relationship between the cascade reservoirs. This unit is configured to compute the temporal dependency weights within the input sequence, encompassing both the forward propagation dependency representing downstream flow and the backward constraint dependency representing backwater backwater.

[0056] First, the multi-scale fused feature tensor... Mapped to query matrices respectively Key matrix Sum matrix The mapping calculation formula is as follows: ; In the formula, , , These are the query, key, and value matrices for the attention mechanism, respectively. , , These are the corresponding learnable linear projection weight matrices. The bidirectional coupled attention score matrix is ​​calculated using the scaled dot product attention algorithm. The calculation formula is as follows: ; In the formula, This is the bidirectional coupled attention score matrix; The feature dimension of the key matrix; This represents the matrix transpose operation; It is a normalized exponential function.

[0057] During this calculation process, the attention matrix Capable of capturing long-distance time dependence: On the one hand, the weighting of historical flow rates to current water levels reflects the lag transmission effect of upstream discharge; On the other hand, by weighting the current downstream water level with the characteristics of the upstream tailwater level, the physical constraint mechanism of the water flow is reflected.

[0058] Step S203: Generate a feature output sequence with physical perception capabilities. Utilize the calculated bidirectional coupled attention score matrix. Log-value matrix Weighted reconstruction is performed, and the final hidden layer state sequence is output through residual connections and layer normalization operations. The formulas for weighted reconstruction and normalization are as follows: ; In the formula, This refers to the hidden layer state tensor after attention weighting and normalization. This is a layer normalization operation used to stabilize the gradient distribution during network training; This represents the result of a weighted summation of the feature values ​​using attention weights; For residual connection terms, the original multi-scale feature information is preserved.

[0059] The above state tensor Multi-scale time-delay information and bidirectional hydraulic coupling weights are integrated and used as input to the decoder for regression prediction of the final water level.

[0060] In this embodiment, a water level perception enhancement simulation architecture integrating void space pyramid pooling and bidirectional attention mechanism is constructed. The long and short time delay features of flood wave propagation are extracted in parallel using multi-void convolution kernels. The global receptive field of the attention matrix is ​​used to simultaneously capture the upstream-to-downstream flow evolution mechanism and the downstream-to-upstream backwater backwater mechanism. Thus, a deep simulation of the bidirectional hydraulic coupling relationship of cascade reservoirs is achieved at the network structure level, which helps to improve the prediction accuracy of the model for dynamic water level changes under non-steady flow conditions.

[0061] Step S3 performs network parameter training and global loss optimization. Step S3 specifically includes the following sub-steps: Step S301: Construct a time-series supervised learning sample set. Based on the standardized multivariate time series input tensor generated in step S1... The sliding window technique is used to construct training sample pairs. First, the length of the historical input window is set to... The predicted window length is Divide a continuous time series into input sequences. With the corresponding target label sequence The correspondence between the sample partitions is as follows: ; ; In the formula, Input the sequence to the model, containing data from time [time]. At that time All N physical variable data; To supervise the target sequence, it includes time... At that time Water level observation data at the target station; This is the current end time of the sliding window.

[0062] The partitioned sample set is divided into a training set, a validation set, and a test set according to a preset ratio for model parameter learning and performance evaluation.

[0063] Step S302: Construct the prediction decoding layer and calculate the prediction loss function. The hidden layer state tensor output in step S2 is then used... The input is fed into a fully connected decoding layer, which maps the high-dimensional feature space back to the physical target space to generate the future water level prediction sequence. The calculation formula for the prediction decoding is as follows: ; In the formula, The predicted water level sequence output by the model; For the flattening operation, the time and feature dimensions are unfolded into a one-dimensional vector; This is the weight matrix of the output layer; This is the bias vector for the output layer.

[0064] The mean squared error is used as the loss function to measure the deviation between the predicted water level and the actual water level. To meet the multi-objective prediction needs of covering cascade reservoir groups, the loss function is accumulated simultaneously along the time step and variable dimensions. The calculation formula is as follows: ; In the formula, This represents the loss value for the current training batch; Batch size; To predict the window length; The number of target variables; For the first The sample at the th The prediction step size is the first The true observed values ​​of each target variable; This is the corresponding model prediction value.

[0065] Step S303: Perform iterative parameter optimization based on backpropagation. The Adam optimizer is used to optimize the calculated loss value. All learnable parameters in the network are updated, including the convolutional weights of the embedding layer in step S1, the dilated convolutional kernel weights and attention projection matrix in step S2, and the output layer weights in this step. The parameter update follows the gradient descent principle, and the parameter iterative update formula is as follows: ; In the formula, For the first The set of model parameters at the next iteration; The learning rate; The first moment estimate of the gradient; This is the second moment estimate of the gradient; To prevent smoothing constants with a denominator of zero.

[0066] By repeatedly performing forward propagation to calculate the loss and backpropagation to update the parameters on the training set, until the loss function is reached. The training process of the model is completed when it converges on the validation set or reaches the preset number of training rounds.

[0067] In this embodiment, by constructing an end-to-end supervised learning framework and using the mean squared error loss function to drive the global optimization of network parameters, the convolutional kernel weights and attention weights inside the model can adaptively fit the historical hydrological patterns of the cascade reservoirs. This transforms the variable-independent features in the preprocessing stage and the bidirectional coupling mechanism in the feature extraction stage into specific water level prediction capabilities, ensuring that the model has high-precision generalization ability on unseen test samples.

[0068] Step S4 involves real-time simulation and projection of the water levels in the cascade reservoirs. Step S4 specifically includes the following sub-steps: Step S401: Construct a real-time simulation input sequence. Establish a communication connection with the data acquisition terminal 100 and acquire the current operating status data of the cascade reservoir group at a preset sampling frequency. Based on the preset historical window length, extract time window data to construct a real-time observation sequence. The time range of the extracted data is defined as follows: ; In the formula, This is a time-capture window for real-time simulation. The current moment; The length of the history input window.

[0069] A real-time observation sequence was constructed based on the aforementioned time window. The sequence contains The number of channels is consistent with the number of physical variables defined in step S1. If there is data loss due to communication delay, zero-order hold-up filling is performed using the valid observations from the current and previous times to ensure real-time data continuity.

[0070] Step S402: Perform online data preprocessing based on parameter reuse. The statistical parameters calculated and stored in step S102, namely the mean and standard deviation of each physical variable in the training set, are used to preprocess the real-time observation sequence. The standardization transformation is performed using the following formula: ; In the formula, The input values ​​are standardized. For the first in the real-time observation sequence The original values ​​of each physical variable; The first phase determined for the training phase The mean of each physical variable; The first phase determined for the training phase The standard deviation of each physical variable; This refers to the channel index of the physical variable, with a value range of 1 to... .

[0071] After standardization, the variable-independent feature block embedding strategy of step S103 is invoked to map the processed sequence into a real-time feature embedding tensor. .

[0072] Step S403: Load the trained model for forward inference. Read the optimized and converged model parameter set from step S3. Embedding real-time features into tensors The data is input into a cascade reservoir hydrological simulator. The model sequentially performs multi-scale dilated convolution, bidirectional hydraulically coupled attention calculation, and decoding mapping, outputting a normalized predicted water level sequence. The calculation process is shown below: ; In the formula, To normalize the prediction tensor; Embed the tensor of the real-time features output in step S402.

[0073] Step S404: Perform inverse normalization on the prediction results and output the results. To obtain physically meaningful water level values, retrieve the corresponding statistical parameter pairs based on the physical attribute index of the target variable. Perform an inverse transform. For the first... The first prediction step size The inverse normalization calculation formula for the target variable is as follows: ; In the formula, This is the restored predicted water level. The normalized predicted value output by the model; For the first The standard deviation of each target variable in the training set; For the first The mean of each target variable in the training set; To predict the time step index within the window; The channel index for the target variable.

[0074] The generated future water level evolution sequence is output to the dispatch decision system as a boundary condition for formulating flood control dispatching plans or power generation plans.

[0075] In this embodiment, by reusing the statistical parameters and network weights from the training phase, the bidirectional hydraulic coupling law learned in offline training is transferred to the online simulation scenario, realizing rapid simulation of the future water level of cascade reservoirs and providing data support for the refined scheduling of reservoir groups.

[0076] The data acquisition terminal 100 is configured as an industrial field data communication device, such as a programmable logic controller (PLC) or a remote terminal unit (RTU), and is deployed at the upstream water level station, tailrace water level station, and flow monitoring station of the cascade reservoir.

[0077] The data acquisition terminal 100 is used to collect water level, flow velocity, flow rate and unit operating data of each station in the cascade reservoir in real time, and transmits the collected data synchronously to the simulation server 200 through industrial communication protocols such as ModbusTCP or IEC60870-5-104.

[0078] The simulation server 200 is an industrial server equipped with a high-performance computing unit (GPU). Its hardware architecture includes at least one processor, memory, and a communication bus. The memory stores computer program instructions, which, when executed by the processor, implement the various steps of the aforementioned cascade reservoir water level perception-enhanced bidirectional attention simulation method.

[0079] Functionally, the simulation server 200 is internally configured with a perception enhancement preprocessing module 210, a bidirectional attention feature extraction module 220, a network training optimization module 230, and a water level simulation and deduction module 240.

[0080] The perception enhancement preprocessing module 210 is configured as a data preprocessing operation unit, used to receive data transmitted by the data acquisition terminal 100 and perform the variable-independent feature block embedding operation in step S1. The perception enhancement preprocessing module 210 first cleans and standardizes the raw data, and then isolates the feature space of different physical variables such as water level, flow rate, and opening degree by constructing independent convolution channels in the embedding layer, and transmits the generated input tensor to the bidirectional attention feature extraction module 220.

[0081] The bidirectional attention feature extraction module 220 is configured as a network feature calculation unit, used to perform the forward propagation operation in the network structure of step S2. This module contains the operational logic of the hollow spatial pyramid pooling layer and the bidirectional attention layer, specifically used for: Multi-scale temporal features are extracted using multiple sets of parallel one-dimensional dilated convolution kernels, and bidirectional coupling features in the spatiotemporal dimension are calculated using an attention mechanism. The output is a hidden layer state tensor containing forward hydraulic propagation and backward hydraulic backing information.

[0082] The network training optimization module 230 is configured as a model parameter updater, used for supervised learning of the network based on historical data during the offline training phase. This module divides historical hydrological monitoring data into training samples, measures the deviation between the predicted water level and the actual water level using the mean square error loss function in step S3, adjusts the network weights using the backpropagation algorithm, establishes the hydraulic-to-electric coupling mapping relationship between the cascade reservoirs, generates a converged model parameter file, and stores it in memory.

[0083] The water level simulation and extrapolation module 240 is configured as an online simulation inference engine, used to load pre-trained model parameters during online operation. This module receives real-time input data on the operating status of cascade reservoirs and dispatch instructions, calls the perception enhancement preprocessing module 210 and the bidirectional attention feature extraction module 220 to perform feature calculations, and executes the decoding and denormalization operations in step S4 to extrapolate the water level change curve of the downstream reservoir within a preset future time window. The water level simulation and extrapolation module 240 also sends the simulation results to an external power spot trading system and flood control dispatching system via a RESTful API interface or a database intermediate table.

[0084] In this embodiment, through the collaborative work of the data acquisition terminal 100 and the simulation server 200, combined with hardware computing power and software algorithms, a complete process from data perception to physical simulation is realized, effectively supporting the intelligent scheduling and operation of the cascade reservoir group under complex working conditions.

Claims

1. A method for simulating bidirectional attention to enhance water level perception in cascade reservoirs, characterized in that, Includes the following steps: Historical hydrological monitoring data of the cascade reservoir group is acquired and preprocessed. A variable-independent feature block embedding strategy is adopted to map the time series data of different physical dimensions in the historical hydrological monitoring data into independent feature channels, thereby generating a perception-enhanced feature tensor. Construct a deep learning network model integrating a bidirectional attention mechanism, use the deep learning network model to extract multi-scale temporal features of the perceptually enhanced feature tensor, and use the bidirectional attention mechanism to calculate bidirectional coupled features; The perception-enhanced feature tensor is input into the deep learning network model, and supervised learning is performed based on the deviation between the predicted water level and the actual water level to establish the bidirectional hydraulic coupling mapping relationship between the cascade reservoirs and generate a cascade reservoir hydrological simulator. The system acquires real-time operational status data of the cascade reservoirs, processes it using the variable-independent feature segmentation embedding strategy, inputs it into the cascade reservoir hydrological simulator, and outputs the water level evolution sequence of the downstream reservoirs.

2. The method for enhancing bidirectional attention simulation of water level perception in cascade reservoirs according to claim 1, characterized in that, The variable-independent feature segmentation embedding strategy specifically includes: Construct an independent embedding layer adapted to the number of physical variables. The independent embedding layer contains multiple parallel one-dimensional convolutional channels, which are used to map the univariate sequence of each physical variable to a feature space of a preset dimension. For each physical variable in the input data, a sliding window mapping is performed using the corresponding one-dimensional convolution channel with a preset convolution stride to project the local window data in the time dimension into a high-dimensional feature vector. The convolution stride is configured to perform dimensionality reduction sampling on long-term sequences to reduce computational cost, and the high-dimensional feature vectors after mapping all physical variables are stacked in the variable dimension to generate the perceptual-enhanced feature tensor.

3. The method for enhancing bidirectional attention simulation of water level perception in cascade reservoirs according to claim 1, characterized in that, The extraction of the multi-scale temporal features specifically includes: In the deep learning network model, multiple sets of parallel one-dimensional dilated convolutional kernels are configured, and each set of one-dimensional dilated convolutional kernels is set with different dilation rate parameters to characterize different temporal receptive fields; Parallel dilated convolution operations are performed on the perceptual enhancement feature tensor using the one-dimensional dilated convolution kernel, and the outputs of branches with different dilation rates are concatenated in the channel dimension to generate a multi-scale fused feature tensor.

4. The method for enhancing bidirectional attention simulation of water level perception in cascade reservoirs according to claim 1, characterized in that, The process of calculating bidirectional coupling features using the bidirectional attention mechanism includes: The multi-scale fusion feature tensor is decoupled in both the variable dimension and the time dimension; Constructing a lateral attention branch: Calculating the correlation weights between different physical variable channels to capture the coupling dependencies between heterogeneous variables such as water level, flow rate, and gate opening; Constructing a longitudinal attention branch: Calculating the dependency weights between different time steps, capturing the forward propagation weights characterizing the hysteresis transmission effect of upstream discharge and the backward constraint weights characterizing the physical constraint mechanism of water flow backing; The outputs of the horizontal attention branch and the vertical attention branch are fused to generate the bidirectional coupled feature.

5. The method for enhancing bidirectional attention simulation of water level perception in cascade reservoirs according to claim 1, characterized in that, The process by which the deep learning network model generates the feature output sequence specifically includes: The weighted reconstruction result is added to the multi-scale fusion feature tensor, which serves as the residual connection term; The summed result is subjected to layer normalization, the hidden layer state tensor is output, and the hidden layer state tensor is used as the input of the decoder for water level regression prediction. The channel perception enhancement module is configured to: perform a global average pooling operation on the perception-enhanced feature tensor or feature embedding to obtain global receptive field statistics, and adaptively generate feature response weights for each physical variable channel through a gating mechanism (such as a fully connected layer), and recalibrate the feature channels to enhance the expressive power of key physical variables.

6. The method for enhancing bidirectional attention simulation of water level perception in a cascade reservoir according to claim 1, characterized in that, When establishing the two-way hydraulic coupling mapping relationship between cascade reservoirs, the supervised learning process specifically includes: The mean square error between the water level predicted by the model and the actual observed water level is calculated. The mean squared error accumulated in the time step dimension and the target variable dimension of the prediction window is used as the loss value, and the network parameters are updated based on the backpropagation algorithm.

7. The method for enhancing bidirectional attention simulation of water level perception in cascade reservoirs according to claim 1, characterized in that, Preprocessing of the historical hydrological monitoring data includes: The Z-Score normalization method is used to transform each physical variable to generate a normalized multivariate time series input tensor.

8. The method for enhancing bidirectional attention simulation of water level perception in a cascade reservoir according to claim 7, characterized in that, The real-time simulation and projection of water levels in cascade reservoirs also includes: The real-time observation sequence is extracted according to the preset historical window length. If there is missing data, the valid observation value of the previous time step is used to fill it in. The mean and standard deviation determined in the preprocessing are used to standardize the real-time observation sequence, and then the predicted normalized water level value is denormalized back.

9. The method for enhancing bidirectional attention simulation of water level perception in a cascade reservoir according to claim 1, characterized in that, The historical hydrological monitoring data and real-time operational status data include the operational sequences of upstream reservoir stations and downstream reservoir stations. The operational sequences include at least water level variables, flow rate variables, and engineering operational status variables (such as gate opening, unit load, or outflow plan).

10. A cascade reservoir water level sensing and enhanced bidirectional attention simulation system, characterized in that, The method for enhancing bidirectional attention to water level perception in a cascade reservoir, as described in any one of claims 1-9, comprises: A data acquisition terminal and a simulation server communicatively connected to the data acquisition terminal; the data acquisition terminal is configured as an industrial field data communication device, used to collect water level, flow velocity and flow rate data of each station in the cascade reservoir in real time and transmit them to the simulation server. The hardware architecture of the simulation server includes at least one processor, a memory, and a communication bus. The memory stores computer program instructions, which, when executed by the processor, implement the following functional modules: The perception enhancement preprocessing module is configured as a data preprocessing operation unit, used to execute the variable-independent feature block embedding strategy and output a perception-enhanced feature tensor. The bidirectional attention feature extraction module is configured as a network feature calculation unit, used to extract multi-scale temporal features based on the deep learning network model, and to calculate bidirectional coupling features using the bidirectional attention mechanism; The network training optimization module is configured as a model parameter updater, used to establish the bidirectional hydraulic coupling mapping relationship between the cascade reservoirs during the offline training phase and generate the cascade reservoir hydrological simulator. The water level simulation and extrapolation module is configured as an online simulation inference engine, used to load the hydrological simulator of the cascade reservoirs during the online operation phase, and extrapolate the water level change curve of the downstream reservoirs based on the real-time input data.