TCN-LSTM-AM-based hydropower output prediction method

By combining the TCN-LSTM-AM multimodal network with hierarchical clustering, the accuracy and adaptability issues of hydropower power forecasting under complex meteorological conditions were solved, achieving more accurate and robust hydropower output forecasts and improving the efficiency of power grid scheduling and clean energy utilization.

CN120601394APending Publication Date: 2025-09-05FUJIAN HUADIAN FURUI ENERGY DEVELOPMENT CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510672205.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing hydropower power prediction methods have problems such as high model complexity, poor applicability, and limited prediction accuracy when dealing with complex and changeable meteorological conditions and nonlinear characteristics, making it difficult to meet the accuracy requirements of hydropower output prediction.

Method used

The collaborative architecture of the TCN-LSTM-AM multimodal network and hierarchical clustering preprocessing adapted to climate models are adopted. TCN extracts local fine features and long-range dependencies of time series, LSTM processes time series dynamics and retains historical key information, and AM dynamically focuses on time step features that are key to prediction. Hierarchical clustering is combined to adapt to output patterns under different climate conditions.

Benefits of technology

It has significantly improved the accuracy and robustness of hydropower output forecasts, enhanced adaptability to complex meteorological conditions, and optimized grid scheduling and clean energy utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120601394A_ABST
    Figure CN120601394A_ABST
Patent Text Reader

Abstract

The invention provides a TCN-LSTM-AM-based hydropower output prediction method, and the method comprises the steps: constructing a TCN-LSTM-AM network which employs a causal convolution and cavity convolution structure, extracts the local fine features and long-distance dependence relation of meteorological-water level-output data in a time sequence, and outputs a multi-scale feature sequence; the LSTM processes the feature sequence output by the TCN through a gating mechanism of a forgetting gate, an input gate and an output gate, adaptively retains historical key information, and outputs a hidden state sequence containing time sequence dynamics; the AM dynamically allocates attention weights to a hidden state sequence output by the LSTM, focuses on key time step features of prediction, and generates a final prediction value; classifying meteorological data based on Euclidean distance by adopting an agglomerated hierarchical clustering algorithm, dividing similar hydroelectric output mode clusters under different climate conditions, and training a TCN-LSTM-AM network for each cluster to enable the model to adapt to output laws under different climate conditions; and the trained TCN-LSTM-AM network is used to generate a next-day hydropower output prediction value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of hydropower engineering and artificial intelligence technology, and specifically relates to a hydropower output prediction method based on TCN-LSTM-AM. Background Art

[0002] The global industrialization process, accompanied by the massive consumption of fossil fuels, has brought with it a series of problems, including environmental degradation and greenhouse gas emissions. Exploring cleaner, renewable energy alternatives is a key approach to addressing this public health crisis. Hydropower relies on natural bodies of water, such as rivers and lakes, leveraging the vertical differences in the flow of water to convert gravitational potential energy into mechanical energy for turbines, which in turn generates electricity. As a mature and stable renewable energy source, hydropower plays a crucial and indispensable role in power grid dispatching and integration. However, with the continuous increase in installed hydropower capacity, some negative impacts on power supply quality and stability have begun to emerge, such as impacts on power system stability, increased complexity in dispatching centers, and issues such as overvoltage, undervoltage, and harmonics. To optimize energy allocation, ensure stable grid operation, and reduce dispatching complexity, accurate hydropower output forecasting has become a critical issue that needs to be addressed.

[0003] It is clear that hydropower generation capacity is often affected by multiple factors, among which water level is the direct factor. However, the scheduling plan determines the number and time of operation of hydropower units. Water level, meteorological factors and seasonal changes have a profound impact on the scheduling plan. The relationship between such complex influencing factors has brought unprecedented challenges to hydropower generation forecasting.

[0004] Currently, there are two main approaches to hydropower generation prediction: physical model-based methods and data-driven methods. While these methods can provide predictive results to a certain extent, they each have their own shortcomings. These shortcomings lead to low prediction accuracy when dealing with complex and changing meteorological conditions and the nonlinear characteristics of hydropower systems. Specifically, they are as follows:

[0005] The first is the method based on physical models. Although this method can reflect the physical characteristics of hydropower generation to a certain extent, it requires the establishment of a complex and precise mathematical model. This involves a large number of parameter details and variable acquisition. The model construction and solution process is highly complex and difficult to be universal. With the iteration of technology and different geographical factors, there are great differences between models. Methods based on physical mechanisms are often difficult to generalize to other hydropower stations. More importantly, the hydropower generation process is affected by a variety of nonlinear factors, such as meteorological characteristics and seasonal scheduling needs. Methods based on physical mechanisms often perform poorly when dealing with these nonlinear problems and have difficulty meeting the prediction accuracy requirements.

[0006] Data-driven methods analyze historical data and use machine learning algorithms to explore the underlying patterns in the data for prediction. However, existing data-driven methods mostly rely on a single machine learning model, such as a support vector machine, random forest, or a single neural network model. These models struggle to simultaneously capture both local data features and long-term dependencies when processing complex time series data. Furthermore, hydropower generation data exhibits significant step changes and temporal periodicity, and under extreme meteorological conditions, the data can be highly volatile. Existing data-driven methods often struggle to maintain high prediction accuracy for data subject to human control over hydropower generation. Finally, existing data-driven methods often lack effective focus on key information when processing complex meteorological and hydropower output data, making them susceptible to interference from noise and irrelevant information during the large-scale data processing process, impacting the prediction results.

[0007] In summary, existing hydropower generation power forecasting methods face challenges such as high model complexity, poor applicability, and limited prediction accuracy when dealing with complex and changing meteorological conditions and nonlinear hydropower generation data with step-like variations. Existing methods struggle to meet the precision requirements for hydropower generation power forecasting based on data such as meteorological characteristics. In the field of hydropower output forecasting, there is an urgent need for a neural network model that can effectively address these challenges and achieve accurate hydropower generation power forecasting. Summary of the Invention

[0008] Compared with existing technologies, this paper effectively solves the prediction bottleneck of traditional methods in complex scenarios through two core innovations: the collaborative architecture of the TCN-LSTM-AM multimodal network and the hierarchical clustering preprocessing adapted to climate models:

[0009] The collaborative architecture improves prediction accuracy and robustness: TCN extracts local fine features and long-range dependencies of time series through causal convolution and void convolution, LSTM processes time series dynamics and retains historical key information through a gating mechanism, and AM dynamically focuses on time step features that are critical to prediction. The three work together to make up for the shortcomings of a single model in modeling nonlinear and step data, significantly improving the accuracy of hydropower output forecasts and their robustness to complex meteorological conditions.

[0010] Hierarchical clustering enhances scenario adaptability: Agglomerative hierarchical clustering based on Euclidean distance divides meteorological data into clusters with similar output under different climate modes, and trains models for each cluster separately, enabling the model to adapt to the output patterns under different climate conditions such as flood season and dry season, thus solving the problem of poor adaptability of traditional methods to climate-changing scenarios.

[0011] Additionally, it includes:

[0012] The data preprocessing process eliminates the time deviation and dimensional differences of multi-source data through synchronization and normalization, providing high-quality input for subsequent network modeling and ensuring the stability of model training.

[0013] The causal convolution design of TCN ensures that the output depends only on historical input, avoiding future information leakage, and meeting the causal requirements of time series prediction; the hierarchical expansion of the void convolution expands the receptive field and captures long-range dependencies more comprehensively.

[0014] The LSTM gating mechanism adaptively retains historical information that is beneficial to prediction (such as the periodicity of scheduling plans) through the synergistic effect of forgetting, input, and output gates, suppresses irrelevant noise interference, and enhances the effectiveness of time series dynamic modeling.

[0015] AM's dynamic focusing function prioritizes time steps that are critical to prediction (such as the moment when scheduling instructions are issued) through attention weight distribution, reducing the impact of non-critical information and further improving the pertinence of prediction results.

[0016] In summary, through multi-dimensional technological innovation, the present invention provides a more accurate, robust, and adaptable solution for hydropower output forecasting in complex scenarios, which is of great significance for optimizing power grid scheduling and improving the efficiency of clean energy utilization.

[0017] The technical solution specifically adopted by the present invention to solve the technical problem is:

[0018] A hydropower output prediction method based on TCN-LSTM-AM:

[0019] Construct a TCN-LSTM-AM network that integrates the temporal convolutional network (TCN), the long short-term memory (LSTM) network, and the attention mechanism (AM), where:

[0020] TCN uses causal convolution and dilated convolution structures to extract local fine features and long-distance dependencies of weather-water-output data in time series and output multi-scale feature sequences.

[0021] LSTM processes the feature sequence output by TCN through the gating mechanism of forget gate, input gate and output gate, adaptively retains historical key information, and outputs a hidden state sequence containing temporal dynamics;

[0022] AM dynamically assigns attention weights to the hidden state sequence output by LSTM, focusing on the time step features that are critical to prediction and generating the final prediction value;

[0023] Using an agglomerative hierarchical clustering algorithm, we classified meteorological data based on Euclidean distance, identifying clusters of similar hydropower output patterns under different climate conditions. We then trained a TCN-LSTM-AM network for each cluster to adapt the model to the output patterns under different climate conditions.

[0024] The trained TCN-LSTM-AM network is used to generate the next day's hydropower output forecast.

[0025] Furthermore, the data preprocessing includes the following steps:

[0026] Collect historical hydropower output data, real-time reservoir water level data, historical reservoir water level data, and meteorological data including at least one of precipitation, temperature, and wind speed;

[0027] Unify the time steps of different types of data into a preset interval to form a continuous time series;

[0028] Normalize the synchronized time series data and map each dimension of data to the interval [0,1] to eliminate dimensional differences.

[0029] The normalized time series data is constructed as the input feature vector X = {x1, x2, ..., x t}, where x t Represents the multi-dimensional input features at time step t, which serves as the input of the TCN-LSTM-AM network.

[0030] Furthermore, the dilated convolution of the TCN adopts a hierarchical expansion design, where the dilation value of the upper convolution layer is twice that of the lower layer to expand the receptive field; the causal convolution ensures that the output of the TCN depends only on historical input to avoid future information leakage.

[0031] Furthermore, the LSTM is adapted to the temporal dynamic modeling of hydropower data through the following design:

[0032] Gating mechanism function: Through the synergistic effect of the forget gate, input gate, and output gate, it adaptively retains historical information that is beneficial to hydropower output prediction and discards irrelevant information;

[0033] Input-output association: Receive the feature sequence output by TCN as input, process the temporal dynamic relationship therein, and output a hidden state sequence containing temporal context information, providing multi-dimensional feature representation for AM's attention focus.

[0034] Furthermore, the AM is designed to adapt to the key features of hydropower data by focusing on:

[0035] Input association: Receive the hidden state sequence output by LSTM, which contains the multi-scale features extracted by TCN and the temporal dynamic information processed by LSTM, as input;

[0036] Dynamic focusing function: By calculating the attention weight of the hidden state at each time step, it prioritizes the time step features that are critical to hydropower output prediction;

[0037] Noise suppression: By normalizing the attention distribution, the interference of non-critical time steps is reduced, and the attention value focused on the key features is generated as the final prediction value.

[0038] Furthermore, the hierarchical clustering preprocessing for climate model adaptation includes the following steps:

[0039] The hydropower output data after data preprocessing is used as N samples;

[0040] Calculate the similarity between samples based on Euclidean distance and construct an N×N dimensional distance matrix;

[0041] Initially, each sample is a cluster, and clusters are merged according to the minimum distance principle until the preset number of clusters is met or all samples are merged into one cluster;

[0042] The final cluster labels were determined based on the cluster dendrogram, and clusters of similar hydropower output patterns under different climate conditions were identified;

[0043] A TCN-LSTM-AM network is trained for each cluster of similar hydropower output patterns to make the model adapt to the output patterns under different climatic conditions.

[0044] Furthermore, the TCN-LSTM-AM network is trained using root mean square error as a loss function.

[0045] Furthermore, the similar hydropower output pattern clusters under different climatic conditions include a high-fluctuation cluster in the wet season and a low-fluctuation cluster in the dry season, which correspond to the hydropower output patterns in the rainy season and the dry season, respectively.

[0046] And, a hydropower output prediction system based on TCN-LSTM-AM, including:

[0047] Data preprocessing module: used to obtain historical hydropower output data, water level data and meteorological data, perform synchronization and normalization processing, and obtain time series input data;

[0048] Hierarchical clustering module: This module uses an agglomerative hierarchical clustering algorithm to cluster meteorological data based on Euclidean distance, identifying clusters of similar hydropower output patterns under different climate conditions and training a TCN-LSTM-AM network for each cluster.

[0049] Multimodal network module: includes TCN submodule, LSTM submodule and AM submodule, among which:

[0050] TCN submodule: used to extract local features and long-distance dependencies of time series through causal convolution and dilated convolution, and output feature sequences;

[0051] LSTM submodule: used to process through the gating mechanism of forget gate, input gate and output gate, and output the hidden state sequence;

[0052] AM submodule: used to dynamically assign attention weights to the hidden state sequence and generate attention values;

[0053] Prediction output module: used to output the attention value as the predicted hydropower output value.

[0054] And, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the program.

[0055] A non-transitory computer-readable storage medium stores a computer program, which implements the steps of the method described above when executed by a processor.

[0056] Compared with the prior art, the present invention and its preferred embodiments have at least the following beneficial effects:

[0057] Collaborative architecture improves prediction accuracy and robustness: Traditional data-driven methods mostly rely on a single model (such as LSTM or CNN), which makes it difficult to capture the local features, long-range dependencies and key information of the time series at the same time. In the present invention, TCN extracts the local fine features and long-range dependencies of the time series through causal convolution and dilated convolution. LSTM processes the feature sequence output by TCN through a gating mechanism, retaining historical key information and suppressing irrelevant noise. AM dynamically focuses on the time step features that are critical to prediction (such as the time when the scheduling instruction is issued). The synergistic effect of the three significantly improves the modeling ability of complex characteristics such as nonlinearity and step characteristics of hydropower data, and enhances the accuracy of prediction and robustness to extreme meteorological conditions.

[0058] Hierarchical clustering enhances scenario adaptability: Traditional methods often rely on global training or simple matching of similar days, making it difficult to adapt to hydropower output patterns under different climatic conditions. This invention uses an agglomerative hierarchical clustering algorithm to divide meteorological data into clusters with similar output under different climatic modes (e.g., high-fluctuation clusters during the wet season, low-fluctuation clusters during the dry season) based on Euclidean distance. A model is trained for each cluster, enabling the model to adapt to output patterns under different climatic conditions (e.g., focusing on precipitation characteristics during the rainy season and water level characteristics during the dry season). This addresses the poor adaptability of traditional methods to climatically variable scenarios.

[0059] The data preprocessing process provides high-quality input for subsequent network modeling through synchronization (unifying the time steps of multi-source data) and normalization (eliminating dimensional differences), ensuring the stability and convergence efficiency of model training.

[0060] The causal convolution design of TCN ensures that the output depends only on historical input, avoiding future information leakage and meeting the causal requirements of time series prediction; the hierarchical expansion of the void convolution expands the receptive field and more comprehensively captures long-range dependencies (such as the delayed response of downstream water levels to upstream rainfall).

[0061] The gating mechanism of LSTM adaptively retains historical information that is beneficial to prediction (such as the periodic law of dry season scheduling) through the synergistic effect of the forget gate, input gate and output gate, discards irrelevant noise (such as non-critical meteorological fluctuations), and enhances the effectiveness of time series dynamic modeling.

[0062] AM's dynamic focusing function prioritizes time step features that are critical to prediction (such as the time step corresponding to extreme precipitation events) through attention weight allocation, reducing the interference of non-critical information and further improving the pertinence of prediction results.

[0063] In summary, through multi-dimensional technological innovation, the present invention provides a more accurate, robust, and adaptable solution for hydropower output forecasting in complex scenarios, which is of great significance for optimizing power grid scheduling and improving the efficiency of clean energy utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0065] Figure 1 This is a TCN structure diagram of an embodiment of the present invention;

[0066] Figure 2 This is a schematic diagram of the LSTM structure of an embodiment of the present invention;

[0067] Figure 3 This is a flow chart of a hydropower output prediction method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0068] In order to make the features and advantages of the present invention more clearly understood, the following embodiments are given for detailed description:

[0069] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in this specification have the same meanings as those commonly understood by those skilled in the art to which this application belongs.

[0070] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.

[0071] To address these challenges, an embodiment of the present invention proposes a hydropower output prediction method that integrates a temporal convolutional network (TCN), a long short-term memory neural network (LSTM), and an attention mechanism (AM) neural network, and develops a corresponding data processing flow in a targeted manner. First, through the parallel computing capability and long-term dependency capture capability of TCN, the long-term dependencies in time series data and the complex nonlinear relationship between meteorological factors and hydropower output are processed and captured. Secondly, the meteorological characteristics in the time series and the short-term and long-term dependencies in hydropower output are quantified through the LSTM memory unit structure, and meteorological data with time lag effects can be focused on. Finally, the introduction of the attention mechanism further enhances the model's ability to focus on key time steps, enabling the model to more accurately capture the meteorological factors that have the greatest impact on hydropower output.

[0072] This method abandons the establishment of a physical model of the hydropower station and the quantification and adjustment of precise parameters. Instead, it uses weather characteristic data that can be measured and obtained in real time and water level data obtained from different rain gauges and hydropower stations to explore the potential correlation between these data and hydropower output, and then provide reference suggestions for the next day's hydropower output scheduling plan.

[0073] Its main design points include:

[0074] (1) A neural network model integrating TCN, LSTM and AM was constructed to predict hydropower output, and the root mean square error was used as the loss function for training to improve the nonlinear fitting ability of the model.

[0075] (2) A hydropower generation power prediction method based on the TCN-LSTM-AM model is proposed. The method mainly includes data processing based on hierarchical clustering and hydropower output prediction using neural networks. Using the hierarchical clustering method, complex and variable meteorological data are analyzed to classify different data categories caused by different climate conditions. Corresponding neural network models are trained using data from different categories, effectively improving the applicability and accuracy of the neural network training model.

[0076] The following is a detailed description of the embodiments of the present invention:

[0077] 1 Data processing method of hierarchical clustering

[0078] Hierarchical clustering is a widely used clustering method that achieves hierarchical clustering of samples by constructing a dendrogram of clusters. The "root" of the dendrogram contains all samples, and the dendrogram is divided into multiple "branches" based on specific criteria, with each "branch" representing a cluster. Hierarchical clustering algorithms are categorized into agglomerative and divisive methods. The agglomerative method calculates the distance between two small clusters and clusters them according to a linkage criterion. It requires less computation and is highly efficient. Therefore, the present invention uses the agglomerative method to cluster hydropower output data.

[0079] This method treats each initial sample as a cluster, and then starts merging them according to a certain distance principle. As the merging proceeds, the number of clusters decreases. If all samples belong to the same cluster, or the number of clusters meets the preset termination criteria, the merging stops.

[0080] In the clustering process, the present invention uses the most widely used Euclidean distance to describe the similarity of samples. i =[x i1 ,x i2 ,…,x iT ] and X j =[x j1 ,x j2 ,…,x jT ], the Euclidean distance function formula is shown in formula (1):

[0081]

[0082] When the sample X i and X j The more similar they are, the ij The smaller the value of . By calculating formula (1), we can finally get an N×N dimensional sample distance matrix D:

[0083]

[0084] For the hydropower output data collected from the hydropower station, the hierarchical clustering process of this embodiment is as follows:

[0085] (1) Processing the hydropower output data to obtain a hydropower output data matrix;

[0086] (2) Taking the hydropower output data of N days as N data samples, calculate the Euclidean distance between samples and form the distance matrix between samples;

[0087] (3) Each sample forms a cluster, with a total of N clusters;

[0088] (4) Calculate the distance between different clusters based on the linkage criteria;

[0089] (5) Select the two clusters with the smallest distance between them and merge them into a new cluster. At this time, N-1 clusters remain;

[0090] (6) Repeat steps (4) and (5) until all samples are merged into one cluster;

[0091] (7) Based on the clustering situation, a cluster dendrogram is formed;

[0092] (8) According to the required number of clusters, determine the cluster labels and complete hierarchical clustering.

[0093] 2 Hydropower output prediction model

[0094] 2.1 Temporal Convolutional Neural Network

[0095] TCN is a deep learning architecture designed specifically for processing sequence data. It combines the powerful feature extraction capabilities of convolutional neural networks (CNNs) with the modeling capabilities of recurrent neural networks (RNNs) for time series data. TCNs build a deep network structure by stacking multiple convolutional layers. Each layer receives the output of the previous layer as input, extracting high-level features from time series data layer by layer. Figure 1 The network architecture of TCN is shown, which mainly includes structures such as one-dimensional convolution, causal convolution, and void convolution.

[0096] Figure 1 The figure shows a four-layer TCN neural network with a convolution kernel of 3. The first layer is the input layer, and the second hidden layer has a dilation of 1. This is a conventional one-dimensional convolution operation. However, the dilation size of each layer is doubled, skipping more pixels and ensuring a wider range of perception for the upper layers. Here, the neurons in the top layer can sense a total of 15 input data points. Each layer of the network has the same dimensionality, which is the characteristic of the fully convolutional architecture.

[0097] In the hydropower output prediction task, the input of TCN is historical hydropower output data and its water level data, precipitation data, represented as a time series X = {x1, x2, ..., x t}, where x t Represents the input feature vector at time step t. TCN extracts local features and long-distance dependencies in the time series through convolution operations, and outputs a feature sequence in represents the feature vector extracted at time step t.

[0098] 2.2 Long Short-Term Memory Neural Network

[0099] LSTM demonstrates significant advantages in forecasting hydropower output based on meteorological data. Its unique structural design effectively captures long-term dependencies in time series data. Through its internal memory cells and forget gate mechanism, LSTM adaptively retains historical information that is useful for forecasting while ignoring irrelevant information, thereby improving the accuracy and robustness of the forecast model. LSTM also effectively handles nonlinear relationships, which is particularly critical for the complex and ever-changing mapping between meteorological data and hydropower output.

[0100] The core structure of the LSTM consists of three key gating mechanisms: the forget gate, the input gate, and the output gate. These gating mechanisms control the flow of information, enabling the LSTM to adaptively retain historical information that is beneficial for prediction while ignoring irrelevant information, thereby improving the model's prediction accuracy and robustness.

[0101] The forget gate determines what information the model will discard from the cell state. t is the output of the forget gate.

[0102] f t =α(W f [h t-1 ,x t +b f ]) (3)

[0103] exist Figure 2 In the forget gate of LSTM, α represents the activation function, W f Represents the weight of the forget gate, x t Represents the input of the current model, h t-1 represents the output of the previous sequence model, b f Represents the bias of the forget gate. The input gate can be divided into two parts. One part is to find the cell states that need to be updated. The other part is to update the information that needs to be updated into the cell state. As shown in formula (4):

[0104]

[0105] In the above input gate structure, i t Represents the cell state to be updated, x t Represents the input of the current model, C t Represents the new cell state created using tanh. The forget gate finds the information that needs to be forgotten f tAfter that, multiply it by the old state, discard the information that needs to be discarded, and then add the result to i t *C t The cell state is updated. The output gate is shown in formula (5):

[0106]

[0107] In the output gate, a Sigmoid activation function layer is used to determine which information should be output. Subsequently, the cell state is multiplied by the tanh function result and the output result of the Sigmoid gate to determine the final output information.

[0108] In the hydropower output prediction task, the input of LSTM is the feature sequence H extracted by TCN. TCN LSTM processes the input sequence through the gate machine and outputs a hidden state sequence in Represents the hidden state at time step t. The hidden state sequence of LSTM contains the contextual information of the time series, providing rich feature representation for the subsequent attention mechanism.

[0109] 2.3 Attention Mechanism

[0110] As a strategy for achieving rational resource allocation, the attention mechanism can prioritize important tasks and alleviate information overload when computing power is limited. In neural network training, the model focuses on information that is critical to the current task and ignores less important information, thereby efficiently processing the task. This paper uses a soft attention mechanism, which first calculates a weighted average of all input information before inputting it into the neural network for further processing.

[0111] The calculation of the attention value first calculates the attention distribution on all input information, by defining an attention variable z∈[1,N] to represent the index position of the selected information, that is, z=i to indicate that the i-th input information is selected, and then calculates the probability α of selecting the i-th input information given q and X. i :

[0112]

[0113] Among them, s(x i ,q) is the attention scoring function used to measure the difference between query q and input information x i The correlation between them. Common scoring functions include dot product attention and additive attention.

[0114] After getting the attention distribution α iAfterwards, the attention mechanism aggregates the input information by weighted average to generate attention. The calculation formula of attention value is as follows:

[0115]

[0116] Through the above calculations, the attention mechanism can dynamically adjust the model's attention to the input information, thereby more effectively capturing features that are critical to the prediction task.

[0117] In the hydropower output prediction task, the input of the attention mechanism is the hidden state sequence H of LSTM LSTM The attention mechanism first calculates the attention weight α for each time step t , indicating the importance of the hidden state of this time step to the prediction task. The calculation formula of attention weight is as follows:

[0118]

[0119] Among them, e t is the attention scoring function used to measure the query q and input information The correlation between them. Common scoring functions include dot product attention and additive attention.

[0120] After getting the attention weight α t Afterwards, the attention mechanism summarizes the hidden state sequence by weighted average to generate the attention value c:

[0121]

[0122] The attention value c is used as the final output of the model, i.e. the predicted hydropower output value.

[0123] 2.4 Overall neural network structure

[0124] like Figure 3 As shown, the overall neural network structure of the TCN-LSTM-AM model provided in this embodiment is designed specifically for hydropower output forecasting tasks. It aims to deeply analyze the characteristics of hydropower output data to improve the accuracy of hydropower output forecasting. The following is a detailed introduction to the model structure:

[0125] Input layer: The input of the model is historical hydropower output data and related meteorological data, which is represented as a time series X = {x1, x2, ..., x t}, where x T represents the input feature vector at time step t.

[0126] TCN part: First, the hydropower output data and its related meteorological data are received as input sequences. The input sequence X is processed by the convolution layer of TCN. The convolution layer extracts the local features and long-distance dependencies in the time series and the nonlinear changes in the hydropower output data layer by layer, and the output is a feature sequence. As the input of the subsequent LSTM part.

[0127] LSTM part: feature sequence H extracted by TCN TCN As the input of LSTM, the memory unit and forget gate mechanism inside LSTM are used to process the long-term dependencies and complex nonlinear relationships in the hydropower output data, and adaptively retain historical information that is beneficial to the prediction and ignore irrelevant information. The output is a hidden state sequence These states contain the contextual information of the time series and provide rich feature representations for the subsequent attention mechanism.

[0128] AM part: AM part uses the output hidden state of LSTM to sequence the hidden state of LSTM LSTM The column is used as the input of the attention mechanism. The attention mechanism can focus on the information that is more critical to the prediction and reduce the attention of other irrelevant information, thereby improving the efficiency and accuracy of the prediction task. The attention mechanism calculates the attention weight α for each time step t , and generates the attention value c by weighted average.

[0129] Output layer: The attention value c is used as the final output of the model, that is, the predicted hydropower output value.

[0130] Through this structure, the TCN-LSTM-AM model fully leverages the fine local features of time series, grasps the global evolutionary trends, and accurately reflects the dynamic characteristics of hydropower generation. This neural network structure, designed for hydropower output forecasting, provides a new solution for accurate hydropower generation forecasting.

[0131] The embodiments of the present invention above design a TCN-LSTM-AM neural network model that organically integrates TCN, LSTM and AM, processes and extracts features of meteorological data with nonlinear and complex dynamic changes, predicts hydropower output with step changes, and improves the applicability and accuracy of the prediction.

[0132] First, in the data processing stage, data of different types and time scales are synchronized and normalized, and a hierarchical clustering algorithm is used to perform cluster analysis on meteorological data. Daily output data with similar hydropower output patterns in different seasons are found. Based on the clustering results, model training is performed for different categories of data separately. In this way, the applicability and accuracy of the model are improved.

[0133] By integrating TCN, LSTM, and AM, the proposed model effectively captures local features, long-term dependencies, and key information in hydropower output data. The convolutional structure of TCN efficiently captures local features and long-range dependencies in time series, effectively addressing nonlinear variations in the data. The introduction of LSTM enhances the model's ability to memorize contextual information in the time series, further improving the stability and continuity of predictions. Furthermore, AM dynamically adjusts the model's attention to input information, focusing on features that are critical to the prediction task, thereby improving prediction accuracy and robustness.

[0134] This solution significantly improves the performance of hydropower generation prediction. Through the coordinated cooperation of TCN, LSTM, and AM, the proposed method not only fully utilizes the local fine features of the time series, but also grasps the global evolution trend, thereby more accurately reflecting the dynamic characteristics of hydropower generation.

[0135] In summary, the proposed TCN-LSTM-AM hydropower generation power forecasting method, by integrating advanced time series analysis techniques, addresses data non-stationarity and nonlinearity, significantly improving forecast accuracy and robustness. Compared to physical mechanism-based methods and single-model data-driven methods, this method demonstrates greater adaptability and predictive capabilities in the complex and changing hydropower generation environment, providing a new solution for the accurate forecasting of hydropower generation power.

[0136] Based on the same inventive concept, the present invention also provides a computer device, which includes: one or more processors and a memory for storing one or more computer programs; the program includes program instructions, and the processor is used to execute the program instructions stored in the memory. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is used to implement one or more instructions, specifically for loading and executing one or more instructions in a computer storage medium to implement the above method.

[0137] It should be further explained that, based on the same inventive concept, the present invention also provides a computer storage medium having a computer program stored thereon, which executes the above method when executed by a processor. The storage medium can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or component.

[0138] It should be noted that, unless otherwise defined, the technical or scientific terms used in the present invention should have the usual meanings understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship may also change accordingly.

[0139] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other manner. Any person skilled in the art may utilize the above-disclosed technical content to modify or modify the present invention into equivalent embodiments. However, any simple modifications, equivalent variations, and modifications to the above embodiments that do not depart from the technical content of the present invention and are based on the technical essence of the present invention remain within the scope of protection of the present invention.

[0140] The present invention is not limited to the above-mentioned optimal implementation mode. Anyone can derive various other forms of hydropower output prediction methods based on TCN-LSTM-AM under the inspiration of the present invention. All equal changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.

Claims

1. A hydropower output prediction method based on TCN-LSTM-AM, characterized by: Construct a TCN-LSTM-AM network that integrates the temporal convolutional network (TCN), the long short-term memory (LSTM) network, and the attention mechanism (AM), where: TCN uses causal convolution and dilated convolution structures to extract local fine features and long-distance dependencies of weather-water-output data in time series and output multi-scale feature sequences. LSTM processes the feature sequence output by TCN through the gating mechanism of forget gate, input gate and output gate, adaptively retains historical key information, and outputs a hidden state sequence containing temporal dynamics; AM dynamically assigns attention weights to the hidden state sequence output by LSTM, focusing on the time step features that are critical to prediction and generating the final prediction value; Using an agglomerative hierarchical clustering algorithm, we classified meteorological data based on Euclidean distance, identifying clusters of similar hydropower output patterns under different climate conditions. We then trained a TCN-LSTM-AM network for each cluster to adapt the model to the output patterns under different climate conditions. The trained TCN-LSTM-AM network is used to generate the next day's hydropower output forecast.

2. The hydropower output prediction method based on TCN-LSTM-AM according to claim 1 is characterized by: The data preprocessing comprises the following steps: Collect historical hydropower output data, real-time reservoir water level data, historical reservoir water level data, and meteorological data including at least one of precipitation, temperature, and wind speed; Unify the time steps of different types of data into a preset interval to form a continuous time series; Normalize the synchronized time series data and map each dimension of data to the interval [0,1] to eliminate dimensional differences. The normalized time series data is constructed as the input feature vector X={x1, x2, …, x t }, where x t Represents the multi-dimensional input features at time step t, which serves as the input of the TCN-LSTM-AM network.

3. The hydropower output prediction method based on TCN-LSTM-AM according to claim 1 is characterized by: The dilated convolution of the TCN adopts a hierarchical expansion design, where the dilation value of the upper convolution layer is twice that of the lower layer to expand the receptive field; the causal convolution ensures that the output of the TCN depends only on historical input to avoid future information leakage.

4. The hydropower output prediction method based on TCN-LSTM-AM according to claim 1 is characterized by: The LSTM is adapted to the temporal dynamic modeling of hydropower data through the following design: Gating mechanism function: Through the synergistic effect of the forget gate, input gate, and output gate, it adaptively retains historical information that is beneficial to hydropower output prediction and discards irrelevant information; Input-output association: Receive the feature sequence output by TCN as input, process the temporal dynamic relationship therein, and output a hidden state sequence containing temporal context information, providing multi-dimensional feature representation for AM's attention focus.

5. The hydropower output prediction method based on TCN-LSTM-AM according to claim 1 is characterized by: The AM is designed to adapt to the key features of hydropower data by focusing on the following: Input association: Receive the hidden state sequence output by LSTM, which contains the multi-scale features extracted by TCN and the temporal dynamic information processed by LSTM, as input; Dynamic focusing function: By calculating the attention weight of the hidden state at each time step, it prioritizes the time step features that are critical to hydropower output prediction; Noise suppression: By normalizing the attention distribution, the interference of non-critical time steps is reduced, and the attention value focused on the key features is generated as the final prediction value.

6. The hydropower output prediction method based on TCN-LSTM-AM according to claim 1 is characterized by: The hierarchical clustering preprocessing for climate model adaptation includes the following steps: The hydropower output data after data preprocessing is used as N samples; Calculate the similarity between samples based on Euclidean distance and construct an N×N dimensional distance matrix; Initially, each sample is a cluster, and clusters are merged according to the minimum distance principle until the preset number of clusters is met or all samples are merged into one cluster; The final cluster labels were determined based on the cluster dendrogram, and clusters of similar hydropower output patterns under different climate conditions were identified; A TCN-LSTM-AM network is trained for each cluster of similar hydropower output patterns to make the model adapt to the output patterns under different climatic conditions.

7. The hydropower output prediction method based on TCN-LSTM-AM according to claim 1 is characterized by: The TCN-LSTM-AM network is trained using root mean square error as the loss function.

8. The hydropower output prediction method based on TCN-LSTM-AM according to claim 1 is characterized by: The similar hydropower output pattern clusters under different climatic conditions include a high-fluctuation cluster in the wet season and a low-fluctuation cluster in the dry season, which correspond to the hydropower output patterns in the rainy season and the dry season, respectively.

9. A hydropower output prediction system based on TCN-LSTM-AM, characterized in that: include: Data preprocessing module: used to obtain historical hydropower output data, water level data and meteorological data, perform synchronization and normalization processing, and obtain time series input data; Hierarchical clustering module: This module uses an agglomerative hierarchical clustering algorithm to cluster meteorological data based on Euclidean distance, identifying clusters of similar hydropower output patterns under different climate conditions and training a TCN-LSTM-AM network for each cluster. Multimodal network module: includes TCN submodule, LSTM submodule and AM submodule, among which: TCN submodule: used to extract local features and long-distance dependencies of time series through causal convolution and dilated convolution, and output feature sequences; LSTM submodule: used to process through the gating mechanism of forget gate, input gate and output gate, and output the hidden state sequence; AM submodule: used to dynamically assign attention weights to the hidden state sequence and generate attention values; Prediction output module: used to output the attention value as the predicted hydropower output value.

10. An electronic device, characterized in that: It includes a processor and a memory; the memory stores a computer program, and when the computer program is executed by the processor, it implements the hydropower output prediction method based on TCN-LSTM-AM according to any one of claims 1 to 8.

Citation Information

Cited By

  • Non-technical line loss state evaluation method based on multi-scale spatial-temporal feature fusion in low-voltage distribution network environment

    CN121882971A