Clustering short-term runoff prediction method based on encoder-decoder and attention mechanism

CN120670882BActive Publication Date: 2026-10-23HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510834699.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2026-10-23
Estimated Expiration
2045-06-20

AI Technical Summary

Benefits of technology

(1)本申请提出了一种CA-AGRU综合预测模型,该模型结合了K-means聚类方法和基于注意力机制的编码器-解码器GRU网络,对径流序列的非线性和非平稳特征具有更好的适应性,模型的概括能力更强,能够有效地提升预测精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670882B_ABST
    Figure CN120670882B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of hydrological prediction, and specifically discloses a clustering short-term runoff prediction method based on an encoder-decoder and an attention mechanism, which comprises the following steps: clustering historical runoff data to obtain a plurality of clusters, each cluster representing a sub-data set, and the sub-data set being a data set composed of data of the same kind; training an attention time series model based on each sub-data set to obtain a trained attention time series model corresponding to each cluster; wherein the attention time series model is constructed by cascading an encoder, an attention module and a decoder, and the attention time series model is used to predict runoff data after a current time step based on runoff data before the current time step. The application can effectively improve the accuracy and reliability of runoff prediction by avoiding mutual interference of different hydrological mechanisms and capturing key driving factors in data of the same kind.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of hydrological prediction technology, and more specifically, relates to a clustering short-term runoff prediction method based on encoder-decoder and attention mechanism. Background Technology

[0002] Runoff forecasting helps us better understand the trends in river flow over a future period, guiding work in hydrological forecasting, flood control and disaster reduction, and water resource planning. At the same time, the accuracy and precision of runoff forecasts directly affect the rational utilization and management of water resources, and are of great significance for ensuring the security and stability of water resources. Due to the influence of natural meteorological conditions, watershed characteristics, and human activities, runoff sequences exhibit characteristics such as trends, randomness, and periodicity. Finding more accurate runoff prediction methods has always been a key technical issue of concern in this field. Summary of the Invention

[0003] In view of the shortcomings of the existing technology, the purpose of this application is to improve the accuracy of runoff prediction.

[0004] To achieve the above objectives, in a first aspect, this application provides a clustering-based short-term runoff prediction method based on encoder-decoder and attention mechanisms, the method comprising: Historical runoff data are clustered to obtain multiple clusters, each cluster representing a subset of data, which is a dataset composed of data of the same type. Based on each subset of the dataset, train the attention time series model and obtain the trained attention time series model corresponding to each cluster. The attention time series model is constructed by a cascaded encoder, attention module and decoder. It is used to predict runoff data after the current time step based on runoff data before the current time step.

[0005] Understandably, this application proposes a novel runoff prediction framework—the Cluster Enhanced Attention Temporal Runoff Prediction Model (CA-AGRU)—and applies this model to runoff prediction.

[0006] Specifically, by clustering historical runoff data, multiple clusters are obtained, each representing a subset of data. This subset of data can characterize a hydrological mechanism. Then, based on each subset of data, an attention-based temporal model is trained to obtain the trained attention-based temporal model corresponding to each cluster, that is, to obtain the trained attention-based temporal model corresponding to each hydrological mechanism. This can effectively avoid mutual interference between different hydrological mechanisms. At the same time, the attention-based temporal model is constructed through a cascaded encoder, attention module, and decoder. It fully utilizes the advantages of the attention mechanism and the encoder-decoder, and can more accurately capture key driving factors in similar data. This allows the model to focus on the key features that have the greatest impact on the prediction results during the prediction process, thus overcoming the limitation of existing models in capturing the complex relationships between runoff data.

[0007] Therefore, by combining the above-mentioned technical means of avoiding mutual interference between different hydrological mechanisms and the above-mentioned technical means of capturing key driving factors in similar data, this application can effectively improve the accuracy and reliability of runoff prediction.

[0008] In one possible implementation, the encoder and decoder employ a gated recurrent neural network (GRU).

[0009] In one possible implementation, the attention module is used to determine the following formula: : ; in, It is the first The decoder in the attention time-series model corresponding to each cluster (referred to as the first) Class decoder) in the The attention context vector of the step, For the first The attention time series model corresponding to each cluster (referred to as the ) The encoder in the attention-based temporal model Step-to-decoder Attention weights for each step For the first The encoder in the attention time-series model corresponding to each cluster (referred to as the first) Class encoder) in the The hidden state of the step, For the first The sequence length of the subset of data represented by each cluster.

[0010] In one possible implementation, It is determined by the following formula: ; in, For the first In the attention time-series model corresponding to each cluster, the encoder of the first cluster... Step-to-decoder Step similarity score, For the first In the attention time-series model corresponding to each cluster, the encoder of the first cluster... Step-to-decoder Step similarity score, For variables.

[0011] In one possible implementation, It is determined by the following formula: ; in, For the rating vector, This represents the hyperbolic tangent activation function. To query the transformation matrix, The key transformation matrix is... For the first The decoder in the attention time-series model corresponding to each cluster is in the... The hidden state of the previous time step.

[0012] In one possible implementation, the decoder is used based on , and ,Sure ; in, For the first The decoder in the attention time-series model corresponding to each cluster is in the... The output of the previous time step. For the first The decoder in the attention time-series model corresponding to each cluster is in the... The hidden state of the previous time step. For the first The decoder in the attention time-series model corresponding to each cluster is in the... Output of the current time step.

[0013] In one possible implementation, the decoder is specifically used to determine via the following formula : ; ; in, This represents the formula by which a gated recurrent neural network determines the hidden state at the current time step. For the first The decoder in the attention time-series model corresponding to each cluster is in the... The hidden state of the step, This is the weight matrix. To predict the step size.

[0014] In one possible implementation, the clustering method is specifically K-means clustering.

[0015] In one possible implementation, after training the attention-based temporal model, the following is also included: Obtain new runoff data; Based on the Euclidean distance between the new runoff data and the cluster centers of each cluster, the target cluster to which the new runoff data belongs is determined by finding the minimum Euclidean distance. Input new runoff data into the attention time series model corresponding to the target cluster, and obtain the runoff prediction results output by the attention time series model; The new runoff data refers to the runoff data before the current time step, while the runoff prediction result represents the runoff data after the current time step predicted by the attention time series model.

[0016] In a second aspect, this application provides an electronic device, comprising: at least one memory for storing a program; and at least one processor for executing the program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to execute the method described in the first aspect or any possible implementation thereof.

[0017] It is understandable that the beneficial effects of the second aspect mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.

[0018] Overall, the technical solutions conceived in this application have the following beneficial effects compared with the prior art: (1) This application proposes a CA-AGRU integrated prediction model, which combines the K-means clustering method and the encoder-decoder GRU network based on the attention mechanism. It has better adaptability to the nonlinear and non-stationary characteristics of runoff sequences, and the model has stronger generalization ability, which can effectively improve the prediction accuracy.

[0019] (2) Experiments show that the CA-AGRU model proposed in this application has two major advantages compared with the baseline model: First, the CA-AGRU model predicts runoff more accurately and has a smaller error with the measured runoff; Second, in the case of sudden runoff changes, the CA-AGRU model proposed in this application can adaptively focus on key hydrological periods and show better prediction performance. Attached Figure Description

[0020] Figure 1This is an overall architecture diagram of clustering short-term runoff prediction based on encoder-decoder and attention mechanism provided in the embodiments of this application; Figure 2 This is a flowchart of the CA-AGRU model provided in the embodiments of this application; Figure 3 This is a comparison chart of the LSTM and CA-AGRU predictions of daily runoff at Dongjing Station in 2019, provided in an embodiment of this application. Figure 4 This is a comparison chart of daily runoff predictions from GRU and CA-AGRU at Dongjing Station in 2019, provided in an embodiment of this application. Figure 5 This is a comparison chart of the 2019 daily runoff AGRU and CA-AGRU predictions for the Dongjing station, provided in an embodiment of this application. Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0021] To facilitate a clearer understanding of the various embodiments of this application, some relevant background knowledge will be introduced as follows.

[0022] Deep learning technology has made significant progress in runoff forecasting, greatly improving its accuracy and reliability. Currently, the application of deep learning in hydrological-runoff forecasting focuses on time-series modeling algorithms. While these algorithms can capture the time dependence of data, they often fail to fully consider the complex interactions and interferences between different hydrological mechanisms. Furthermore, although introducing clustering methods into deep learning models can classify data and uncover potential patterns to some extent, traditional combinations of clustering and deep learning still face problems such as insufficient feature extraction and loss of key information, making it difficult for models to accurately capture the inherent patterns in runoff data.

[0023] Therefore, this application proposes a clustering-based short-term runoff prediction model based on an encoder-decoder structure and an attention mechanism. This model considers the non-stationarity and multi-scale characteristics of runoff data and incorporates an attention mechanism into the modeling process, enabling the model to focus on the key features that have the greatest impact on the prediction results. This overcomes the limitation of existing models in capturing the complex relationships between runoff data and provides a technical reference for short-term runoff prediction.

[0024] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0025] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0026] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple processing units means two or more processing units, multiple elements means two or more elements, etc.

[0027] The embodiments of this application are described below with reference to the accompanying drawings.

[0028] The embodiments of this application cluster historical runoff data to generate multiple stable subsets, and then train specialized runoff prediction models for different subsets. An attention mechanism and an encoder-decoder structure are added to the prediction models to enhance the model's learning of spatiotemporal features and alleviate the gradient vanishing problem in deep learning models. The main components include: (1) overall architecture, (2) K-means clustering, (3) attention-based temporal model AGRU, (4) classification prediction, and (5) comparative experiments.

[0029] (1) Overall architecture; like Figure 1 As shown, the model consists of K-means clustering and the attention-based temporal model AGRU, which includes an encoder GRU, an attention module, and a decoder GRU. GRU (Gated Recurrent Unit) is a type of gated recurrent neural network.

[0030] (2) K-means clustering; K-means clustering was used to cluster the runoff data of the target watershed. Input sequence ,in It is the feature dimension. Represents the input sequence The t-th data point in the dataset, where t ranges from 1 to T, and each... All include The features include rainfall data from weather stations and runoff data from reservoirs; It is the length of the input sequence.

[0031] K-means is a distance-based unsupervised clustering algorithm that iteratively divides data into groups. Each data point belongs to a non-overlapping cluster, such that it belongs to the cluster whose center is closest to it. First, a random selection is made. We use 10 data points as the initial cluster centers, and then for each point in the dataset, we calculate its distance to the cluster center. The Euclidean distance between each cluster center is used to assign it to the cluster corresponding to the nearest cluster center.

[0032] ; in, Data points The 3D eigenvalues It is the first The centroid of a cluster, Center of mass The 1-dimensional eigenvalues.

[0033] Based on the current cluster assignment, the center of each cluster is recalculated, that is, the mean of all points within the cluster is calculated as the new cluster center, as shown in the following formula: ; in, Refers to the first Each cluster contains all the data points assigned to that cluster. Indicates the first The number of data points in each cluster.

[0034] Repeat the above steps until the cluster centers no longer change, or the maximum number of iterations is reached. Final output. A subset.

[0035] ; in, It is the first Sub-datasets of the class This is the classification result.

[0036] (3) Attention-based temporal model AGRU; The attention-based temporal model AGRU proposed in this application includes an encoder GRU, an attention module, and a decoder GRU.

[0037] (3.1) Encoder GRU; An encoder can encode an input sequence into a fixed-length context vector, capturing all the important information of the input sequence. This application uses a GRU to implement this function, which encodes the first... Sub-datasets of the class The input is processed in a GRU-based encoder to obtain all hidden states. : ; in, For the first Class encoder at time step The hidden state, For the first The sequence length of the sub-dataset.

[0038] (3.2) Attention module; In this application, after the encoder completes the encoding, the final hidden state is not directly input into the decoder. Instead, it undergoes a transformation through an attention mechanism to generate the context variables required by the decoder. The attention mechanism can dynamically allocate weights to different input elements, enabling the model to focus on the most relevant information while ignoring other unimportant information. Therefore, the context vector obtained through the attention mechanism transformation can more accurately capture the key driving factors in similar data.

[0039] The attention mechanism takes a query and a set of key-value pairs as input. It first calculates weight coefficients for different value vectors based on the correlation between the current query vector and different key vectors. Then, it performs a weighted sum of the value vectors based on these weight coefficients to obtain the final attention value. The attention mechanism in this application is combined with an encoder-decoder architecture. For the decoder's... Step, calculate its context vector using the following formula: ; ; ; in, For the first Encoder-decoder class encoder first Step-to-decoder Step similarity score, The rating vector is a learnable parameter vector. This represents the hyperbolic tangent activation function. To query the transformation matrix, Let be the key transformation matrix. For the first The hidden state of the decoder at the previous time step. For the first Class encoder at time step The hidden state. For the first Encoder-decoder class encoder first Step-to-decoder Attention weights for each step This is a temporary variable whose value range is 1~ . It is the first Class decoder The attention context vector for each step.

[0040] (3.3) Decoder GRU; The decoder generates the output sequence based on the context vector. At each time step, the decoder generates the output for the current time step based on the output of the previous time step, the hidden state of the previous time step, and the current context vector. In this application, the runoff value of the last time step in the input sequence is used. As the initial input of the GRU-based decoder The last hidden state output by the encoder The initial state of the GRU-based decoder The decoder state is updated after computation by the GRU. and obtained the first Class decoder in the Step output prediction : ; ; in, This is the weight matrix. To predict the step size, For the first Class decoder in the The final hidden state of the step.

[0041] Repeat the above steps. The final predicted output of the model can be obtained in one step. : .

[0042] (4) Classification prediction; After training on N subsets, N independent prediction models will be obtained. For example... Figure 2 As shown, for new input data First, calculate the Euclidean distance between the new data and the centroid of each category to determine the category n to which the new data belongs. Then, call the corresponding nth model to predict the runoff and output the final runoff prediction value.

[0043] (5) Comparative experiment; The following comparative experimental analysis uses the Beipanjiang River basin as the experimental subject. The Beipanjiang River is a major tributary of the Hongshui River, the upper reaches of the Xijiang River in the Pearl River Basin. It originates from the northwest foot of the Maxiong Mountain in the Wumeng Mountains of Zhanyi District, Yunnan Province, flowing through Yunnan and Guizhou provinces. It is 449 kilometers long, with a total drop of 1985 meters, an average gradient of 4.42‰, a drainage area of ​​26,557 square kilometers, an average annual flow at its estuary of 390 cubic meters per second, and an average annual runoff of 384.9 million cubic meters. This application selects the intake section of the Dongjing Hydropower Station as the main research object. The regional dataset in this application includes runoff data collected from four hydropower stations and rainfall data measured from six meteorological stations, covering five years of daily data from January 1, 2015 to December 31, 2019. The four hydropower stations are all located on the main stream of the Beipanjiang River, from upstream to downstream: Shannipo Hydropower Station, Guangzhao Hydropower Station, Mamaya Hydropower Station, and Dongjing Hydropower Station. Six weather stations are located around the hydroelectric power station. Rainfall falls to the ground and forms surface runoff, which then flows into rivers.

[0044] (5.1) Baseline model: This embodiment selects three models for comparison, including Long Short-Term Memory Neural Network (LSTM), Gated Recurrent Unit (GRU), and Attention Temporal Model (AGRU).

[0045] (5.2) Model hyperparameter settings: The algorithm was written in Python. For the total dataset spanning five years and each classified subset, the data from the first four years were used as the training set, and the data from the remaining year was used as the test set. The maximum number of iterations for the LSTM, GRU, and AGRU models was 100, and the maximum number of iterations for the CA-AGRU model was 200. All models had three neural network layers with 64 neurons per layer, a 20% exit probability for each layer, and used the Adam optimizer with the mean squared error (MSE) loss function and a learning rate of 0.001. The batch size for each sample was 64. All experiments were repeated three times, and the average results were used. In this application, all models were implemented using the "PyTorch 1.9.0" framework in Python and ran in a Python 3.8 environment.

[0046] (5.3) Evaluation indicators for prediction accuracy: These include the Nash-Sutcliffe Efficiency coefficient (NSE), Root Mean Square Error (RMSE), and Mean Absolute Error (MAE), all of which are calculated for each prediction window and over the entire dataset. Figure 3This is a comparison chart of LSTM and CA-AGRU predictions of daily runoff at Dongjing Station in 2019, provided in an embodiment of this application. Figure 4 This is a comparison chart of daily runoff predictions from GRU and CA-AGRU at Dongjing Station in 2019, provided in an embodiment of this application. Figure 5 This is a comparison chart of the 2019 daily runoff AGRU and CA-AGRU predictions for the Dongjing station, provided in an embodiment of this application.

[0047] Table 1. Prediction results of various models in the daily runoff forecasting process at Dongqing Station

[0048] (5.4) Results Analysis: As shown in Table 1, compared with the baseline model, the CA-AGRU proposed in this application has the best predictive performance. The RMSE of this model is 108.3034 m3 / s, MAE is 66.31 m3 / s, and NSE is 0.8172. Compared with the worst-performing baseline model LSTM, CA-AGRU significantly reduces RMSE and MAE by 17.84% and 10.79%, respectively, and improves NSE by 8.80%. Compared with the best-performing baseline model AGRU, CA-AGRU still reduces RMSE and MAE by 11.31% and 3.83%, respectively, and improves NSE by 4.96%. This result fully verifies the superiority of the CA-AGRU model in runoff prediction.

[0049] Furthermore, comparing the performance of AGRU and GRU models reveals that introducing an encoder-decoder architecture and attention mechanism on top of GRU reduces RMSE and MAE by 1.96% and 2.62%, respectively, while improving NSE by 0.94%. Although the improvement is relatively small, AGRU can identify key hydrological periods in the runoff sequence, enhancing its ability to capture hydrological dynamics. When runoff processes experience abrupt changes, AGRU can more accurately reflect the nonlinear characteristics of the runoff process than GRU, thus exhibiting better predictive performance. This indicates that in hydrological time series forecasting, the synergistic effect of the attention mechanism and encoder-decoder structure can optimize predictive performance, but their individual contributions are still limited by the strong nonlinearity and stochasticity of the hydrological process itself.

[0050] Based on the methods in the above embodiments, this application provides an electronic device. Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 6As shown, the electronic device may include a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute the methods in the above embodiments.

[0051] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0052] Based on the methods in the above embodiments, this application provides a computer-readable storage medium storing a computer program that, when run on a processor, causes the processor to execute the methods in the above embodiments.

[0053] Based on the methods in the above embodiments, this application provides a computer program product that, when run on a processor, causes the processor to execute the methods in the above embodiments.

[0054] It is understood that the processor in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor can be a microprocessor or any conventional processor.

[0055] The method steps in this application embodiment can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an ASIC.

[0056] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0057] It is understood that the various numerical designations used in the embodiments of this application are merely for the convenience of description and are not intended to limit the scope of the embodiments of this application.

[0058] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A clustering-based short-term runoff prediction method based on encoder-decoder and attention mechanisms, characterized in that, include: Historical runoff data are clustered to obtain multiple clusters, each cluster representing a subset of data, which is a dataset composed of data of the same type. Based on each subset of the dataset, train the attention time series model and obtain the trained attention time series model corresponding to each cluster. The attention time series model is constructed by a cascaded encoder, attention module and decoder. The attention time series model is used to predict the runoff data after the current time step based on the runoff data before the current time step. The encoder and decoder employ a gated recurrent neural network (GRU). The attention module is determined by the following formula : ; in, It is the first The decoder in the attention time-series model corresponding to each cluster is in the... The attention context vector of the step, For the first The encoder in the attention time-series model corresponding to each cluster is the first... Step-to-decoder Attention weights for each step For the first The encoder in the attention time-series model corresponding to each cluster is at the _th The hidden state of the step, For the first The sequence length of the subset of data represented by each cluster; It is determined by the following formula: ; in, For the first In the attention time-series model corresponding to each cluster, the encoder of the first cluster... Step-to-decoder Step similarity score, For the first In the attention time-series model corresponding to each cluster, the encoder of the first cluster... Step-to-decoder Step similarity score, As a variable; It is determined by the following formula: ; in, For the rating vector, This represents the hyperbolic tangent activation function. To query the transformation matrix, The key transformation matrix is... For the first The decoder in the attention time-series model corresponding to each cluster is in the... The hidden state of the step; Decoder is used for based , and ,Sure ; in, For the first The decoder in the attention time-series model corresponding to each cluster is in the... Step output, For the first The decoder in the attention time-series model corresponding to each cluster is in the... The hidden state of the step, For the first The decoder in the attention time-series model corresponding to each cluster is in the... Step output; The decoder is specifically used to determine the following formula : ; ; in, This represents the formula by which a gated recurrent neural network determines the hidden state at the current time step. For the first The decoder in the attention time-series model corresponding to each cluster is in the... The hidden state of the step, This is the weight matrix. To predict the step size.

2. The clustering short-term runoff prediction method based on encoder-decoder and attention mechanism according to claim 1, characterized in that, The clustering method is specifically K-means clustering.

3. The clustering short-term runoff prediction method based on encoder-decoder and attention mechanism according to any one of claims 1-2, characterized in that, After training the attention-based temporal model, the following is also included: Obtain new runoff data; Based on the Euclidean distance between the new runoff data and the cluster centers of each cluster, the target cluster to which the new runoff data belongs is determined by finding the minimum Euclidean distance. Input new runoff data into the attention time series model corresponding to the target cluster, and obtain the runoff prediction results output by the attention time series model; The new runoff data refers to the runoff data before the current time step, while the runoff prediction results represent the runoff data after the current time step predicted by the attention time series model.

4. An electronic device, characterized in that, include: At least one memory for storing computer programs; At least one processor is configured to execute a program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to perform the method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Medium and long term runoff prediction method based on transverse and longitudinal attention

    CN118013866A

  • Runoff prediction method based on improved Transform model

    CN119089943A