Search

CN-122019992-A - Gradient reservoir water temperature prediction method based on graph convolution and transducer

CN122019992ACN 122019992 ACN122019992 ACN 122019992ACN-122019992-A

Abstract

The invention discloses a gradient reservoir water temperature prediction method based on graph convolution and a Transformer, which comprises the following steps of 1, collecting historical dam front vertical water temperature, water level, delivery flow and unit water inlet bottom plate elevation data of a gradient reservoir, performing format conversion and storage, 2, building a graph rolling model, capturing space dependency relationship among reservoirs through a graph rolling network, 3, building a Transformer model, capturing long-term time sequence dependency relationship by using the Transformer, 4, performing inverse normalization and independent decoding on output results of the Transformer model, 5, training the model and verifying model errors through a test set, and 6, inputting the preprocessed data into a trained model to obtain a vertical water temperature prediction result, wherein the vertical water temperature distribution of the dam front of the gradient reservoir can be effectively simulated and predicted.

Inventors

  • WANG FEILONG
  • TANG YUCHUAN
  • ZHOU MAN
  • HU TING
  • JIAN TIEZHU
  • WANG QI
  • HUANG YUBO

Assignees

  • 中国长江三峡集团有限公司

Dates

Publication Date
20260512
Application Date
20260106

Claims (10)

  1. 1. The gradient reservoir water temperature prediction method based on graph convolution and transformation is characterized by comprising the following steps of: step 1, collecting vertical water temperature, water level, delivery flow, and unit water inlet bottom plate elevation data in front of a history dam of a cascade reservoir, and performing format conversion and storage; Step 2, building a graph rolling model, and capturing the space dependence relationship between reservoirs through a graph rolling network; Step 3, constructing a transducer model, and capturing a long-term time sequence dependency relationship by utilizing the transducer; step 4, performing inverse normalization and independent decoding on the output result of the transducer model; training a model and verifying model errors through a test set; and 6, inputting the preprocessed data into a trained model to obtain a vertical water temperature prediction result.
  2. 2. The method for predicting the water temperature of the cascade reservoir based on graph convolution and transform according to claim 1, wherein the format conversion in the step 1 specifically comprises the steps of converting an elevation-water temperature data format of vertical water temperature in front of a reservoir dam into a water depth-water temperature data format, intercepting equidistant water temperature data at intervals of fixed distances by taking the surface water temperature Gao Chengji as 0m until a proper depth is obtained, and subtracting elevation data of a water inlet bottom plate of a unit from water level data of each cascade reservoir to obtain a water inlet submerged depth.
  3. 3. The method for predicting the water temperature of the cascade reservoir based on graph convolution and Transformer, which is characterized in that in the step 1, the storage is specifically that vertical water temperature data of each cascade reservoir are independently stored as excel files, and water inlet submerged depth and outlet flow are stored as excel files of boundary conditions.
  4. 4. The method for predicting the water temperature of a step reservoir based on graph convolution and transform according to claim 1, wherein the step 2 specifically comprises the following substeps: step 2.1, carrying out normalization processing on the data, and converting the data into a 0-1 interval; Step 2.2, constructing an input data set and an output data set by adopting a sliding window technology, and dividing a training set and a verification set; step 2.3, setting up RevIN layers, and fixing the mean value and the variance of the time sequence to a uniform distribution type; step 2.4, mapping the vertical water temperature characteristics and the boundary condition characteristics respectively to enable the characteristic dimensions of different reservoirs to be consistent; And 2.5, constructing a graph convolution neural network, and fusing boundary conditions through a gating fusion mechanism.
  5. 5. The method for predicting the water temperature of the cascade reservoir based on graph convolution and transformation according to claim 4, wherein the specific process of constructing the input and output data sets in the step 2.2 is as follows: The method comprises the steps of firstly carrying out sliding window division on the vertical water temperature of each reservoir, merging vertical water temperature data sets of all reservoirs in the temperature number dimension after division due to inconsistent number of the vertical water temperature points of each reservoir, recording the number of the vertical water temperature variables of each reservoir, carrying out sliding window division on boundary variables of each reservoir, merging in the variable number dimension after division, recording the number of the variable dimensions, finally forming a vertical water temperature data set, and if the two reservoirs are in two steps, forming the dimension of [ seq_len, R0_temp_num+R1_temp_num ], and the boundary data dimension of [ seq_len, R0_BC_num+R1_BC_num ].
  6. 6. The method for predicting the water temperature of the cascade reservoir based on graph convolution and transformation according to claim 4, wherein the specific process of the step 2.4 is as follows: Because the number of the vertical water temperatures of each reservoir is possibly inconsistent, different feedforward neural networks are respectively adopted for mapping the vertical water temperatures of each reservoir to the same dimension in order to ensure the consistency of the dimensions of input data, and the formula is as follows: nn.Linear(in_channel[k],hidden_channel); wherein in_channel [ k ] is the number of vertical water temperatures of the k reservoir, and hidden_channel is the dimension after mapping; For different boundary dimensions of each reservoir, the same approach is used to map different dimension boundary conditions to the same dimension.
  7. 7. The method for predicting the water temperature of the cascade reservoir based on graph convolution and transformation according to claim 4, wherein the specific process of the step 2.5 is as follows: firstly, constructing an adjacent matrix, wherein the adjacent matrix is a unidirectional connection matrix aiming at a step reservoir, and the adjacent matrix of four reservoirs is as follows: ; then normalize the adjacent matrix and perform graph convolution propagation: ; ; wherein A is an adjacent matrix, I is an identity matrix, and D is a degree matrix; is the first The node characteristics of the layer(s), As a matrix of weights, the weight matrix, As a result of the bias term, Is an activation function; In order to integrate boundary conditions into the graph convolution model, a gating fusion mechanism is adopted: ; ; Wherein g is a gating coefficient in a gating fusion mechanism, E is an external boundary condition characteristic; In order to gate the weight matrix, Representing element-wise multiplication.
  8. 8. The method for predicting the water temperature of a step reservoir based on graph convolution and transform according to claim 1, wherein the transform model in the step 3 comprises a position code and a self-attention mechanism, the time sequence information is embodied through the position code, and the time sequence dependency relationship is captured through the self-attention mechanism.
  9. 9. The method for predicting the water temperature of a cascade reservoir based on graph convolution and transform according to claim 1, wherein in the step 4, inverse normalization is realized through RevIN layers, independent decoding adopts a feedforward neural network, and a decoding formula is as follows: nn.Linear(hidden_channel,out_channel[k]); Wherein, hidden_channel is dimension after RevIN layers of inverse normalization, out_channel [ k ] is vertical water temperature number of k reservoirs, and finally, each reservoir is subjected to 0-1 interval inverse normalization.
  10. 10. The method for predicting the water temperature of the cascade reservoir based on graph convolution and transformation according to claim 1, wherein in the step 5, the model error condition is verified by a test set after the model is trained, the test set result is displayed, the verification set result is displayed by a two-dimensional cloud graph drawing method, and the verification set result is compared with a true value cloud graph.

Description

Gradient reservoir water temperature prediction method based on graph convolution and transducer Technical Field The invention relates to the technical field of hydraulic engineering, in particular to a gradient reservoir water temperature prediction method based on graph convolution and a transform. Background The water temperature of the reservoir is an important parameter affecting the aquatic ecological environment and the safety of hydraulic buildings, the distribution rule of the reservoir is directly related to fish reproduction, water eutrophication prevention and control in the watershed and the temperature stress safety of a dam concrete structure, and the reservoir water temperature is one of the core reference bases of cascade reservoir dispatching, ecological protection and engineering operation and maintenance. At present, the traditional reservoir water temperature prediction method is mainly developed based on a physical model or a single time sequence model, but under a cascade reservoir scene, the method has obvious application limitations: (1) The step reservoirs form an upstream-downstream coupling relation through water flow communication, the water temperature of the downstream water reservoir can be directly influenced by the temperature of the downstream water reservoir, but the traditional method is mainly aimed at modeling of a single reservoir, and the space conduction effect between reservoirs cannot be effectively described; (2) The fusion capability of external factors such as boundary conditions is limited, namely the boundary conditions such as water level, delivery flow and the like are key factors influencing the water temperature change, but the fusion mode of the traditional model on the external features and the water temperature features is simpler, and the association rule between the external features and the water temperature features is difficult to fully mine; (3) The condition that different reservoirs have different vertical observation points cannot be processed at the same time, the hydrologic observation conditions of different cascade reservoirs are different, the number of vertical water temperature observation points is often inconsistent, and the traditional model is difficult to adapt to the unified modeling requirement of the heterogeneous data; (4) The modeling capability of the long-term time sequence dependency relationship is insufficient, namely, the water temperature change is a multi-time scale coupling process, the problem of time sequence information loss easily occurs when the traditional time sequence model processes long-period water temperature data, and the medium-term and long-term water temperature change trend is difficult to accurately predict. Aiming at the problems, the related technical field is urgent to need a water temperature prediction method capable of simultaneously considering cascade reservoir space association, heterogeneous data adaptation, external condition fusion and long time sequence modeling so as to improve the accuracy and applicability of cascade reservoir water temperature prediction and provide more reliable technical support for scientific dispatching and ecological protection of the cascade reservoir. Disclosure of Invention The invention aims to overcome the defects, and provides a cascade reservoir water temperature prediction method based on graph convolution and Transformer, which can effectively simulate and predict the vertical water temperature distribution in front of a dam of a cascade reservoir. In order to solve the technical problems, the invention adopts the technical scheme that the step reservoir water temperature prediction method based on graph convolution and transform comprises the following steps: step 1, collecting vertical water temperature, water level, delivery flow, and unit water inlet bottom plate elevation data in front of a history dam of a cascade reservoir, and performing format conversion and storage; Step 2, building a graph rolling model, and capturing the space dependence relationship between reservoirs through a graph rolling network; Step 3, constructing a transducer model, and capturing a long-term time sequence dependency relationship by utilizing the transducer; step 4, performing inverse normalization and independent decoding on the output result of the transducer model; training a model and verifying model errors through a test set; and 6, inputting the preprocessed data into a trained model to obtain a vertical water temperature prediction result. Preferably, the format conversion in the step 1 specifically includes converting an elevation-water temperature data format of vertical water temperature in front of a reservoir dam into a water depth-water temperature data format, intercepting equidistant water temperature data at intervals of fixed distance by taking surface water temperature Gao Chengji as 0m until a proper depth is obtained, and subtracting elevation dat