Hydropower station water flow prediction method and system
By combining variational mode decomposition with the LSTM-SVM model, the problems of low accuracy and weak generalization ability in hydropower station water flow prediction are solved, and high-accuracy and strong generalization ability water flow prediction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-04-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies for predicting water flow in hydropower stations suffer from low prediction accuracy and weak generalization ability, especially poor adaptability to different watersheds and climatic conditions.
Variational mode decomposition (VMD) technology is used to decompose historical water flow data into several IMF components. For each component, a water flow prediction model with LSTM and SVM network layers is constructed. Temporal features are extracted through the LSTM network, and water flow is predicted by combining the good predictive ability of the SVM.
It improves the accuracy of water flow prediction and the generalization ability of the model, effectively filters out noise interference, and is suitable for large-scale applications.
Smart Images

Figure CN121787633A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of hydropower station water flow prediction technology, specifically relating to a method and system for predicting hydropower station water flow. Background Technology
[0002] Predicting the inflow of water into hydropower stations provides essential data for optimized scheduling and plays a vital role in the safe and economical operation of hydropower stations and the development and utilization of water resources. Meanwhile, with the advent of the era of big data and artificial intelligence, artificial intelligence big data technology, with artificial neural networks at its core, has been applied in various fields. Among these, long short-term memory (LSTM) neural networks have significant advantages in time series forecasting and perform well in hydrological time series forecasting; therefore, they have been widely used in the field of water flow prediction.
[0003] Currently, when predicting water flow, water flow data is usually directly used as input data and input into the long short-term memory neural network. However, this method has the following shortcomings: (1) Water flow sequence data is affected by many internal and external uncertainties and has the characteristics of nonlinearity, time-varying and dynamics. That is, it is a nonlinear stationary sequence containing multiple frequency and trend components. Therefore, directly using it as model input data may make it difficult for the network to effectively capture effective features, and the noise components in the sequence may also interfere with the model prediction, thus reducing the prediction accuracy; (2) The traditional single LSTM model has the problem of weak generalization ability and poor adaptability to flow prediction under different watershed and climate conditions. Therefore, based on the above shortcomings, how to provide a method for predicting hydropower station water flow with high prediction accuracy and strong generalization ability has become an urgent problem to be solved. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for predicting water flow in hydropower stations, in order to solve the problems of low prediction accuracy and weak generalization ability in the existing technology.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: Firstly, a method for predicting the water flow of a hydropower station is provided, including: Obtain historical daily inflow data for the hydropower station; Variational mode decomposition is performed on the historical daily inflow water data to obtain several IMF component data, and the water flow prediction model corresponding to each IMF component data is obtained. Each IMF component data is input into its corresponding water flow prediction model to obtain multiple local water flow prediction data for the hydropower station on the target date. Based on each local water flow prediction data, the water flow prediction sequence for the hydropower station on the target date is derived. Any water flow prediction model includes: an LSTM network layer, a fully connected layer, and an SVM network layer connected in sequence; The LSTM network layer is used to perform feature extraction processing on the IMF component data input to any of the water flow prediction models to obtain water flow time-series features, and then input the water flow time-series features into the fully connected layer. A fully connected layer is used to perform feature mapping processing on the time-series features of water flow to obtain water flow mapping features, wherein the dimension of the water flow mapping features is equal to the input dimension of the SVM network layer. An SVM network layer is used to predict water flow based on the water flow mapping features, so as to obtain local water flow prediction data corresponding to the IMF component data input to any of the water flow prediction models.
[0006] Based on the above disclosure, after obtaining historical daily inflow data of a hydropower station, this invention first performs variational mode decomposition on the data to decompose it into several IMF component data. Then, a flow prediction model is constructed for each IMF component. Next, each IMF component is input into its corresponding flow prediction model to obtain multiple local flow prediction data for the hydropower station on the target day. Finally, based on these multiple local flow prediction data, a flow prediction sequence for the target day can be generated. Thus, by performing variational mode decomposition on the historical daily inflow data, the complexity of the input data can be reduced, and effective information in the sequence (i.e., each IMF component represents the sequence) can be effectively extracted. The system extracts fluctuation information at different time scales and filters out noise components, which facilitates the model's capture of input sequence features and reduces noise interference with model prediction, thereby improving the accuracy of model prediction. Furthermore, the water flow prediction model provided by this invention consists of an LSTM network and an SVM model. This invention utilizes the powerful ability of the LSTM network to process long-period sequences for temporal feature extraction, and then leverages the excellent prediction and generalization capabilities of the SVM model to predict water flow while simultaneously improving model generalization. Therefore, by combining variational mode empirical decomposition with LSTM and SVM models, this invention improves the accuracy of water flow prediction and the model's generalization ability, making it highly suitable for large-scale applications and promotion.
[0007] In one possible design, historical daily inflow data includes: historical water flow data of the hydropower station for several consecutive days prior to the target date; This includes obtaining historical daily inflow data for hydropower stations, including: Based on historical water flow data over several consecutive days, the reference flow data for the target day is determined. Calculate the maximum information coefficient between the reference flow data and each historical water flow data; From the historical water flow data of several consecutive days, the historical water flow data with the largest information coefficient greater than the preset value is selected, and the selected historical water flow data is used to construct the historical daily inflow water flow data.
[0008] In one possible design, the LSTM network layer in any water flow prediction model contains a number of sequentially connected improved LSTM cells, wherein the number of improved LSTM cells is equal to the length of the target component data, and the target component data is the IMF component data input to the any water flow prediction model. The k-th improved LSTM cell in the LSTM network layer is used to receive the water flow component data at the k-th time step in the target component data, and to receive the output feature vector and cell state feature vector at the (k-1)-th time step. The output feature vector and cell state feature vector at the (k-1)-th time step are the output feature vector and cell state feature vector of the (k-1)-th improved LSTM cell. The k-th improved LSTM cell is also used to generate the output feature vector and cell state feature vector at the k-th time step based on multiple forget gates and multiple input gates, and according to the water flow component data at the k-th time step, as well as the output feature vector and cell state feature vector at the (k-1)-th time step. When k is K, the output feature vector of the k-th LSTM cell is the water flow time series feature, k is a positive integer, and K is the total number of improved LSTM cells.
[0009] In one possible design, the k-th improved LSTM cell includes: a first forget gate, a second forget gate, a third forget gate, a first input gate, a second input gate, a third input gate, and an output gate; The first forget gate is used to generate a first feature vector based on the output feature vector at the (k-1)th time step and the water flow component data at the kth time step, and then transmits it to the first input gate and the third forget gate respectively; The first input gate is used to generate a second feature vector based on the output feature vector at the (k-1)th time step and the water flow component data at the kth time step, and then transmit it to the third input gate; The first input gate is also used to perform a dot product operation on the first feature vector and the second feature vector to generate a third feature vector, which is then output to the third forget gate and the third input gate. The second forget gate is used to generate a fourth feature vector based on the output feature vector at the (k-1)th time step and the water flow component data at the kth time step, and then output it to the third forget gate; The third forget gate is used to generate a seventh feature vector based on the fourth feature vector, the third feature vector, and the first feature vector, and then transmit it to the output gate. The second input gate is used to generate an eighth feature vector based on the output feature vector at the (k-1)th time step and the water flow component data at the kth time step, which is then transmitted to the output gate, and to generate a ninth feature vector which is then output to the third input gate. The third input gate is used to generate the twelfth feature vector based on the ninth feature vector, the third feature vector, and the second feature vector, and then transmit it to the output gate. The output gate is used to generate the cell state feature vector and the output feature vector at the k-th time step based on the seventh feature vector, the twelfth feature vector, the eighth feature vector, the output feature vector at the (k-1)-th time step, the cell state feature vector at the (k-1)-th time step, and the water flow component data at the k-th time step.
[0010] In one possible design, a third forget gate is used to perform a dot product operation on the fourth and third feature vectors to obtain a fifth feature vector, and to calculate the difference between the first and third feature vectors to obtain a sixth feature vector. The third forget gate is also used to sum the sixth and fifth eigenvectors to obtain the seventh eigenvector. The third input gate is used to perform a dot product operation on the ninth feature vector and the third feature vector to obtain the tenth feature vector, and to subtract the third feature vector from the second feature vector to obtain the eleventh feature vector, so as to sum the eleventh feature vector and the tenth feature vector to obtain the twelfth feature vector and output it to the output gate. Correspondingly, the output gate is used to perform a dot product operation on the seventh feature vector and the cell state feature vector at the (k-1)th time step to obtain the thirteenth feature vector, and to perform a dot product operation on the twelfth feature vector and the eighth feature vector to obtain the fourteenth feature vector. The output gate is used to sum the fourteenth and thirteenth feature vectors to generate the cell state feature vector at the k-th time step, and to generate the fifteenth feature vector based on the output feature vector at the (k-1)-th time step and the water flow component data at the k-th time step. The output gate is also used to generate the output feature vector at the k-th time step based on the cell state feature vector at the k-th time step and the fifteenth feature vector.
[0011] In one possible design, the various water flow prediction models are constructed in the following manner; Obtain the training dataset, which includes sample IMF component data corresponding to several sample daily inflow water flow data of the hydropower station; Based on the training dataset and using the improved bat algorithm, the parameters of the target model are optimized to obtain the optimal model parameters of the target model, wherein the target model includes various untrained water flow prediction models. Based on the optimal model parameters, various water flow prediction models are constructed.
[0012] In one possible design, based on the training dataset and using an improved bat algorithm, the target model's parameters are optimized to obtain the optimal model parameters, including: Obtain the bat population at the nth iteration, where the initial value of n is 1. When n is 1, the bat population at the nth iteration is the initial population, and each initial bat individual in the initial population corresponds to a set of initial model parameters of the target model. Generate target models for each individual bat in the bat population, and train each target model using the training dataset. After training, calculate the fitness of each individual bat based on the loss function value of each target model. Based on the fitness of each individual bat, the globally optimal individual is determined in the nth iteration; Determine if the iteration stopping condition is met; If not, for any individual bat in the bat population, generate a random number corresponding to that individual bat, and determine whether the pulse emission rate of that individual bat is less than the random number. If not, select the bat individual with the highest fitness and the second highest fitness from the bat population to be designated as the first and second designated individuals, respectively. Based on the first and second designated individuals, the position of any bat individual is updated to obtain the updated bat individual. After all bat individuals have been polled, the bat population at the (n+1)th iteration is obtained. Increment n by 1 and obtain the bat population at the nth iteration until the iteration stopping condition is met. Based on the globally optimal individual at the time the iteration stopping condition is met, determine the optimal model parameters.
[0013] In one possible design, the position of any bat individual is updated based on a first designated individual and a second designated individual to obtain the updated position of the bat individual, including: The first update parameter is calculated based on the fitness of the first specified individual and the fitness of any bat individual, and the second update parameter is calculated based on the fitness of the second specified individual and the fitness of any bat individual. The speed update factor is calculated using the first update parameter and the second update parameter; Based on the speed update factor, the speed of any individual bat is updated to obtain the updated speed; Using the updated velocity, update the position of any individual bat to obtain the updated position of any individual bat.
[0014] Secondly, a hydropower station water flow prediction system is provided, comprising: The acquisition unit is used to acquire historical daily inflow water data of the hydropower station; The decomposition unit is used to perform variational mode decomposition on the historical daily inflow water data to obtain several IMF component data, and to obtain the water flow prediction model corresponding to each IMF component data. The water flow prediction unit is used to input the data of each IMF component into their respective water flow prediction models to obtain multiple local water flow prediction data of the hydropower station on the target day, and to derive the water flow prediction sequence of the hydropower station on the target day based on each local water flow prediction data. Any water flow prediction model includes: an LSTM network layer, a fully connected layer, and an SVM network layer connected in sequence; The LSTM network layer is used to perform feature extraction processing on the IMF component data input to any of the water flow prediction models to obtain water flow time-series features, and then input the water flow time-series features into the fully connected layer. A fully connected layer is used to perform feature mapping processing on the time-series features of water flow to obtain water flow mapping features, wherein the dimension of the water flow mapping features is equal to the input dimension of the SVM network layer. An SVM network layer is used to predict water flow based on the water flow mapping features, so as to obtain local water flow prediction data corresponding to the IMF component data input to any of the water flow prediction models.
[0015] Thirdly, a hydropower station water flow prediction device is provided. Taking the device as an electronic device as an example, it includes a memory, a processor, and a transceiver that are connected in sequence. The memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the hydropower station water flow prediction method as described in the first aspect or any possible design in the first aspect.
[0016] Fourthly, a storage medium is provided, on which instructions are stored, which, when executed on a computer, perform the hydropower station water flow prediction method as described in the first aspect or any possible design of the first aspect.
[0017] Fifthly, a computer program product containing instructions is provided, which, when executed on a computer, causes the computer to perform the hydropower station water flow prediction method as described in the first aspect or any possible design of the first aspect.
[0018] Beneficial effects: (1) This invention performs variational mode decomposition on historical daily inflow water data before inputting it into the water flow prediction model. This reduces the complexity of the input data and effectively extracts the effective information in the sequence while filtering out noise components. This makes it easier for the model to capture the features of the input sequence and reduces the interference of noise on the model prediction. Based on this, the accuracy of the model prediction can be improved. At the same time, the water flow prediction model provided by this invention consists of an LSTM network and an SVM model. That is, this invention uses the powerful ability of the LSTM network to process long-period sequences to extract time-series features, and then uses the good prediction and generalization ability of the SVM to predict water flow and improve the generalization ability of the model. Thus, by combining variational mode empirical decomposition with LSTM and SVM models, this invention can improve the accuracy of water flow prediction and the generalization ability of the model, making it very suitable for large-scale application and promotion. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating the steps of the hydropower station water flow prediction method provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of the water flow prediction model provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of the improved LSTM cell provided in an embodiment of the present invention; Figure 4 This is a structural diagram of a hydropower station water flow prediction system provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the accompanying drawings is only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.
[0021] It should be understood that although the terms first, second, etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit, without departing from the scope of the exemplary embodiments of the invention.
[0022] It should be understood that the term "and / or" that may appear in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist simultaneously. The term " / and" that may appear in this document describes another relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this document generally indicates that the related objects before and after it are in an "or" relationship.
[0023] Example: See Figure 1 As shown, the hydropower station water flow prediction method provided in this embodiment combines variational mode empirical decomposition with LSTM and SVM models. This improves the model's generalization ability while reducing the complexity of the input data. It can also effectively extract effective information from the sequence and filter out noise components, thereby facilitating the model to capture input sequence features and reducing the interference of noise on model prediction. Based on this, the accuracy of model prediction can be improved. Therefore, this method provides a water flow prediction technology with strong generalization ability and high accuracy, making it very suitable for large-scale application and promotion. For example, this method can be run on the water flow prediction end. Optionally, the water flow prediction end can be, but is not limited to, a personal computer or a server. It is understood that the aforementioned execution subject does not constitute a limitation on the embodiments of this application. Accordingly, the operation steps of this method can be, but are not limited to, the steps S1 to S3 below.
[0024] S1. Obtain historical daily inflow water flow data of the hydropower station; In this embodiment, the historical daily inflow water flow data may include, but is not limited to, the historical water flow data of the hydropower station for several consecutive days before the target date; Since the water flow data is time series data, as its length increases, the range of dependencies between sequences that the model needs to capture will become longer, thus increasing data processing time and reducing processing efficiency; Based on this, this embodiment needs to select as many historical water flow data as possible that have a greater impact on the prediction sequence, thereby reducing the data processing length while ensuring prediction accuracy; Optionally, this embodiment uses the maximum information coefficient to measure the impact of historical water flow data of different days on the target day, the process of which is shown in steps S11 to S13 below.
[0025] S11. Based on historical water flow data for several consecutive days, determine the reference flow data for the target day. In this embodiment, since the flow rate of the target day is unknown, the average of historical water flow data for several consecutive days can be used as the reference flow data for the target day. This will allow for the calculation of the maximum information coefficient between the reference flow data and different historical water flow data. The process is shown in step S12 below.
[0026] S12. Calculate the maximum information coefficient between the reference flow data and each historical water flow data. In this embodiment, the maximum information coefficient is a measure of the strength of the relationship between two variables, and it is particularly suitable for capturing nonlinear and linear relationships. Therefore, the larger the maximum information coefficient between the reference flow data and the historical water flow data, the greater its influence on the water flow of the target day. Based on this, this embodiment selects historical water flows with a maximum information coefficient greater than the preset value by setting a preset value, as data that has a greater impact on the prediction sequence. Based on this, historical daily inflow water flow data is constructed, and the process is shown in step S13 below.
[0027] S13. From the historical water flow data of several consecutive days, select historical water flow data with a maximum information coefficient greater than a preset value, and use the selected historical water flow data to construct the historical daily inflow water flow data; in this embodiment, for example, but not limited to setting the preset value to 0.7, that is, select historical water flow data with a maximum information coefficient greater than 0.7, and sort the selected historical water flow data in descending order of maximum information coefficient, thereby generating historical daily inflow water flow data; of course, the reference flow data is only used for the calculation of the maximum information coefficient, and it is not used as prediction data.
[0028] Thus, after constructing historical daily inflow water data through the aforementioned steps S11 to S13, the data can be decomposed to reduce data complexity and the impact of noise on water flow prediction.
[0029] The data decomposition process is shown in step S2 below.
[0030] S2. Perform variational mode decomposition on the historical daily inflow water data to obtain several IMF component data, and obtain the water flow prediction model corresponding to each IMF component data. In specific implementation, the variational mode decomposition algorithm (VMD) is a signal decomposition method. In the process of decomposing the components, it iteratively searches for the optimal solution of the variational model to determine the frequency center and bandwidth of each component, thereby adaptively realizing the frequency domain partitioning of the signal and the effective separation of each component, which has high decomposition accuracy and good noise resistance. In this way, the IMF component data obtained by performing variational mode decomposition on the historical daily inflow water data can represent the fluctuation information at different time scales, and the nonlinearity, non-stationarity and complexity of the decomposed IMF component data are significantly reduced compared to the original signal. Therefore, this operation can reduce the complexity of the input data, effectively extract the effective information in the sequence, and filter out noise components, thereby facilitating the model to capture the features of the input sequence and reducing the interference of noise on the model prediction.
[0031] After completing the variational mode decomposition of historical daily inflow water data, water flow prediction can be performed. In this embodiment, multiple water flow prediction models are constructed, the number of which is the same as the number of IMF component data. That is, one IMF component data corresponds to one water flow prediction model. Based on this, based on each IMF component data and the corresponding water flow prediction model, accurate prediction of the water flow data of the hydropower station on the target day can be achieved. The process is shown in step S3 below.
[0032] S3. Input each IMF component data into its corresponding water flow prediction model to obtain multiple local water flow prediction data of the hydropower station on the target day, and based on each local water flow prediction data, derive the water flow prediction sequence of the hydropower station on the target day; in this embodiment, it is equivalent to establishing water flow prediction models for each decomposed IMF component data to perform flow prediction, and finally summing and reconstructing to obtain the water flow prediction result of the hydropower station on the target day.
[0033] To address the weak generalization capability of traditional single TLSM networks, this embodiment provides a water flow prediction model that combines LSTM and SVM networks, namely: See [link to relevant documentation]. Figure 2 As shown, any water flow prediction model may include, but is not limited to, a sequentially connected LSTM network layer, a fully connected layer, and an SVM network layer.
[0034] Specifically, the LSTM network layer is used to perform feature extraction processing on the IMF component data input to any of the water flow prediction models to obtain water flow time-series features, and then input the water flow time-series features into the fully connected layer. In this embodiment, the powerful ability of the LSTM network layer to process long-period sequences is used to perform deep mining on the input data (i.e., IMF component data), capture long-term dependencies in the input data, and gradually extract high-dimensional feature representations of the sequence through the hidden layer states to obtain the corresponding time-series features (which usually contain information such as the trend and periodicity of the input data).
[0035] Furthermore, this embodiment improves the structure of the traditional LSTM network to enhance its ability to extract features from the input IMF component data. Optionally, for example, the LSTM network layer in any water flow prediction model contains a number of sequentially connected improved LSTM cells, wherein the number of improved LSTM cells is equal to the length of the target component data, and the target component data is the IMF component data input to the water flow prediction model.
[0036] In this embodiment, after performing variational mode decomposition on the historical daily inflow water flow data, the length of the resulting IMF component data is the same as that of the historical daily inflow water flow data. For example, if the historical daily inflow water flow data contains water flow data for 6 days, then there are 6 improved LSTM cells.
[0037] Simultaneously, the k-th improved LSTM cell in the LSTM network layer is used to receive the water flow component data at the k-th time step in the target component data, and to receive the output feature vector and cell state feature vector at the (k-1)-th time step, wherein the output feature vector and cell state feature vector at the (k-1)-th time step are the output feature vector and cell state feature vector of the (k-1)-th improved LSTM cell; at the same time, the k-th improved LSTM cell is also used to generate the output feature vector and cell state feature vector at the k-th time step based on multiple forget gates and multiple input gates, and according to the water flow component data at the k-th time step, and the output feature vector and cell state feature vector at the (k-1)-th time step.
[0038] Thus, each improved LSTM cell in the LSTM network layer receives the cell state features and output features output by the previous improved LSTM cell, and also acquires the water flow component data at its corresponding time step; then it generates the cell state and output features of the current time step and transmits them to the next improved LSTM cell; based on this, the temporal features of the input data can be extracted.
[0039] Of course, when k is K, the output feature vector of the kth LSTM cell in the entire LSTM network layer is the water flow time series feature, where k is a positive integer (initial value is 1) and K is the total number of the improved LSTM cells.
[0040] Furthermore, the improved LSTM cell provided in this embodiment, compared to the traditional LSTM cell, adds a forget gate and an input gate, forming a feature extraction structure based on multi-level gates.
[0041] Optional, see Figure 3 As shown, the k-th improved LSTM cell mentioned above may include, but is not limited to, a first forget gate, a second forget gate, a third forget gate, a first input gate, a second input gate, a third input gate, and an output gate; wherein, the feature extraction process of the aforementioned multi-level gates is as follows: See Figure 3 As shown, the first forget gate is used to generate a first feature vector based on the output feature vector at the (k-1)th time step and the water flow component data at the kth time step, and transmits them to the first input gate and the third forget gate respectively; wherein, in this embodiment, the first feature vector can be generated by, but is not limited to, the following formula.
[0042] ; In the formula, Represents the first eigenvector. This represents the sigmoid activation function. These represent the water flow component data at time step k and the output feature vector at time step (k-1), respectively. Indicates the weight of the first forget gate. This indicates the bias of the first forget gate.
[0043] After the first forget gate generates the first feature vector and transmits it to the first input gate and the third forget gate, the first input gate is used to generate the second feature vector based on the output feature vector of the (k-1)th time step and the water flow component data of the kth time step, and transmit it to the third input gate. It is also used to perform a dot product operation on the first feature vector and the second feature vector to generate the third feature vector, which is then output to the third forget gate and the third input gate.
[0044] Optionally, for example but not limited to, the following formulas can be used to generate the second and third feature vectors. ; ; In the formula, Represents the second eigenvector. This represents the weight of the first input gate. This indicates the bias of the first input gate. Denotes the third eigenvector, and This represents the dot product operation.
[0045] See Figure 3 As shown, the first input gate transmits the second feature vector to the third input gate, and the third feature vector is transmitted to the third forget gate and the third input gate. Then, the second forget gate can generate the fourth feature vector based on the output feature vector of the (k-1)th time step and the water flow component data of the kth time step, and output it to the third forget gate.
[0046] Specifically, the formula for generating the fourth eigenvector is: ; In the formula, Represents the fourth eigenvector. This represents the activation function. Indicates the weight of the second forget gate. This indicates the bias of the second forget gate.
[0047] Thus, the third forget gate can perform further feature extraction based on the received feature vector. The process is as follows: the third forget gate is used to generate a seventh feature vector based on the fourth feature vector, the third feature vector, and the first feature vector, and then transmit it to the output gate.
[0048] In this embodiment, see Figure 3 As shown, the feature extraction process of the third forget gate is as follows: The third forget gate is used to perform a dot product operation on the fourth feature vector and the third feature vector to obtain the fifth feature vector, and to calculate the difference between the first feature vector and the third feature vector to obtain the sixth feature vector; then, the third forget gate can be used to sum the sixth feature vector and the fifth feature vector to obtain the seventh feature vector, which is then transmitted to the output gate.
[0049] Specifically, the seventh eigenvector can be represented as: ; In the formula, This represents the seventh eigenvector.
[0050] After completing the data processing for the forget gate, the data processing for the input gate can then be described; see [link to relevant documentation]. Figure 3 As shown, the second input gate is used to generate an eighth feature vector based on the output feature vector at the (k-1)th time step and the water flow component data at the kth time step, which is then transmitted to the output gate, and to generate a ninth feature vector which is output to the third input gate.
[0051] Optionally, for example but not limited to, the following formula can be used to generate the eighth and ninth feature vectors.
[0052] ; ; In the formula, Represents the eighth eigenvector. This represents the ninth eigenvector. This indicates the weight of the second input gate. This indicates the bias of the second input gate.
[0053] Thus, after the second input gate completes the feature information extraction, it can enter the third input gate for further feature extraction. That is, the third input gate is used to generate the twelfth feature vector based on the ninth feature vector, the third feature vector, and the second feature vector, and then transmit it to the output gate.
[0054] For details, see Figure 3 As shown, the feature extraction process of the third input gate is as follows: The third input gate is used to perform a dot product operation on the ninth feature vector and the third feature vector to obtain the tenth feature vector, and to subtract the third feature vector from the second feature vector to obtain the eleventh feature vector, so as to sum the eleventh feature vector and the tenth feature vector to obtain the twelfth feature vector and output it to the output gate.
[0055] In this embodiment, the calculation formula for the twelfth eigenvector is shown below: ; In the formula, This represents the twelfth eigenvector.
[0056] Thus, after the third input gate outputs the twelfth feature vector, the output gate can be used to generate the cell state feature vector and output feature vector at the kth time step. That is, the output gate is used to generate the cell state feature vector and output feature vector at the kth time step based on the seventh feature vector, the twelfth feature vector, the eighth feature vector, the output feature vector at the (k-1)th time step, the cell state feature vector at the (k-1)th time step, and the water flow component data at the kth time step.
[0057] For details, see Figure 3As shown, the output gate is used to perform a dot product operation on the seventh feature vector and the cell state feature vector at the (k-1)th time step to obtain the thirteenth feature vector, and to perform a dot product operation on the twelfth feature vector and the eighth feature vector to obtain the fourteenth feature vector; then, it is used to sum the fourteenth and thirteenth feature vectors to generate the cell state feature vector at the kth time step, and to generate the fifteenth feature vector based on the output feature vector at the (k-1)th time step and the water flow component data at the kth time step; finally, the output feature vector at the kth time step can be generated based on the cell state feature vector at the kth time step and the fifteenth feature vector.
[0058] The cell state feature vector at the k-th time step can be represented as: ; In the formula, This represents the cell state feature vector at the k-th time step. This represents the cell state feature vector at the (k-1)th time step.
[0059] Furthermore, the fifteenth eigenvector can be represented as: ; In the formula, This represents the fifteenth eigenvector. The weights and biases of the output gates are represented in that order.
[0060] Finally, for example, but not limited to, the following formula can be used to generate the output feature vector at the k-th time step: ; In the formula, This represents the output feature vector at the k-th time step.
[0061] Thus, based on the aforementioned description of LSTM cells, this embodiment uses ReLU as the activation function in the second forget gate and output gate. The reason is that ReLU has a simple gradient calculation, which can effectively reduce the amount of computation and speed up the calculation process compared with other activation functions such as Sigmoid. At the same time, ReLU as an activation function can make the information output of some cells zero, ensuring the sparsity of the output, reducing the dependency relationship between information vectors, and alleviating the overfitting problem.
[0062] Meanwhile, the aforementioned multi-level gated LSTM cells differ from traditional LSTM cells in that they utilize two levels of forget gates and output gates, which interact with each other, ultimately merging into a third forget gate and a third input gate. In these LSTM cells, the outputs of the ReLU and Sigmoid activation functions are both between 0 and 1, controlling the degree of feature information retention. The forget gate controls whether to store the cell state information from the previous time step. The information is stored in the new cell state, while the input gate controls whether the candidate cell state information C2 is stored in the new cell state. Furthermore, when the forget gate and output gate output 0, it means that all information is completely discarded; when their output is 1, it means that all information is completely retained; and when their output is (0,1), it means that a certain degree of cell information is retained, and the larger the output value, the more information is retained.
[0063] Therefore, in the multi-level gated LSTM cell provided in this embodiment, the first-level forget gate and input gate are responsible for the initial analysis and screening of features. The information retained is further analyzed and screened by the second-level forget gate and input gate, and finally summarized by the third-level forget gate and input gate to the output gate. Thus, based on the aforementioned two-layer screening mechanism, this embodiment can more accurately extract detailed features from the input IMF component data, thereby improving the accuracy of subsequent water flow prediction.
[0064] Thus, after extracting the temporal features of the IMF component data input to any water flow prediction model through the aforementioned improved LSTM network layer, it can be transmitted to the fully connected layer for feature mapping.
[0065] See Figure 2 As shown, the fully connected layer is used to perform feature mapping processing on the time-series features of water flow to obtain water flow mapping features. The feature mapping adjusts the dimension of the water flow mapping features to be the same as the input dimension of the SVM network layer so that it can be used as the input of the SVM network layer for water flow prediction. That is, the SVM network layer is used to predict water flow based on the water flow mapping features to obtain the local water flow prediction data corresponding to the IMF component data input to any water flow prediction model.
[0066] Based on this, by using the aforementioned LSTM+SVM network, water flow prediction can be established for each IMF component data to obtain the corresponding local water flow prediction data. Then, by summing the data, the complete water flow prediction sequence of the hydropower station on the target day can be reconstructed. Then, it can be sent to the hydropower station control terminal so that the hydropower station control terminal can carry out the operation control of the hydropower station based on the water flow prediction sequence.
[0067] Furthermore, the water flow prediction model provided in this embodiment has improved generalization ability compared to a single LSTM network for the following reasons: (1) Combination of feature extraction and classification / regression; LSTM models are good at processing time series data and can extract long-term dependencies and complex patterns. These features, as inputs to SVM models, provide richer and more abstract information. SVM models perform well in classification and regression tasks, especially when dealing with high-dimensional feature spaces. They determine decision boundaries by finding support vectors, thereby improving the generalization ability of the model; (2) Minimization of structural risk; SVM models are based on the principle of minimizing structural risk and aim to find the decision boundary that achieves the best balance between training error and model complexity. This allows SVM models to generalize better when facing unseen data, thereby reducing the risk of overfitting; (3) Reduction of training data volume; SVM models usually require less data for training, especially when using kernel tricks, because it relies on support vectors rather than the entire dataset. Therefore, it means that LSTM-SVM models can be trained on less data, that is, they can still maintain good prediction performance when training data is insufficient, thereby improving the generalization ability of the model.
[0068] Therefore, through the hydropower station water flow prediction method described in detail in steps S1 to S3 above, this invention combines variational mode empirical decomposition with LSTM and SVM models. This can improve the generalization ability of the model while reducing the complexity of the input data, and can effectively extract the effective information in the sequence and filter out noise components. This makes it easier for the model to capture the features of the input sequence and reduce the interference of noise on the model prediction. Based on this, the accuracy of the model prediction can be improved. Thus, this method provides a water flow prediction technology with strong generalization ability and high accuracy, which is very suitable for large-scale application and promotion.
[0069] In one possible design, the second aspect of this embodiment provides a specific construction process for each water flow prediction model in the first aspect of the embodiment, that is, a parameter optimization process, the implementation steps of which may be, but are not limited to, as shown in steps S4 to S6 below.
[0070] S4. Obtain the training dataset, which includes sample IMF component data corresponding to several sample daily inflow water flow data of the hydropower station. In this embodiment, this is equivalent to obtaining several sample daily inflow water flow data, and then performing variational mode decomposition on each sample daily inflow water flow data to obtain the sample IMF component data corresponding to each sample daily inflow water flow data. Then, the label data (i.e., the predicted real water flow data) of each sample daily inflow water flow data is obtained. Finally, the training dataset is formed based on the aforementioned data.
[0071] After obtaining the training dataset, this embodiment uses the improved bat algorithm to optimize the model parameters, as shown in step S5 below.
[0072] S5. Based on the training dataset and using the improved bat algorithm, perform parameter optimization on the target model to obtain the optimal model parameters of the target model, wherein the target model includes various untrained water flow prediction models.
[0073] In practical applications, the improved bat algorithm can be used as an example to perform parameter optimization, but is not limited to the steps S51 to S58 below.
[0074] S51. Obtain the bat population at the nth iteration, where n is initially 1. When n is 1, the bat population at the nth iteration is the initial population, and each initial bat individual in the initial population corresponds to a set of initial model parameters for the target model. In specific implementation, parameters can be initialized for each untrained water flow prediction model to obtain a set of model parameters for each untrained water flow prediction model. Then, the set of model parameters for each untrained water flow prediction model is used to form the total model parameters of the target model, that is, the total model parameters of the target model can be expressed as: ,in, Let N represent the model parameters of the Nth untrained water flow prediction model, where N represents the total number of water flow prediction models. By performing multiple initializations, multiple sets of total model parameters for the target model can be obtained. Finally, each set of total model parameters is used as the position vector of an initial bat individual, and the initial velocity vector, initial pulse emission loudness, and initial pulse emission rate of the initial bat individual are set to obtain the initial population.
[0075] Optionally, the aforementioned set of model parameters may include, but is not limited to, the weights and biases of each gate in the LSTM network layer, and the parameters and penalty factors of the kernel function in the SVM network layer.
[0076] After obtaining the initial population, it can be used as the bat population for the first iteration, and then the population can be updated. The process is shown in steps S52 to S57 below.
[0077] S52. Generate target models for each individual bat in the bat population, and train each target model using the training dataset. After training, calculate the fitness of each individual bat based on the loss function value of each target model.
[0078] In this embodiment, the fitness calculation process is illustrated using any individual bat in a bat population as an example: First, based on the overall model parameters corresponding to the position vector of any individual bat, the model parameters of each untrained water flow prediction model are determined. Then, the model parameters are substituted into each untrained water flow prediction model to obtain multiple prediction sub-models (i.e., forming the target model corresponding to any individual bat). Next, a batch of sample daily inflow water flow data is extracted from the training dataset as the training sub-data. The sample IMF component data corresponding to each sample daily inflow water flow data in the training sub-data is input into the prediction sub-model to obtain the local water flow prediction data corresponding to each sample IMF component data. By calculating the local predicted water flow data of all sample IMF component data of a given sample day's inflow water flow, we can obtain the water flow prediction sequence corresponding to that sample day's inflow water flow data. After traversing all training sub-data in this batch, we can obtain multiple water flow prediction sequences corresponding to sample days' inflow water flow data. Finally, by comparing the water flow prediction sequences corresponding to each sample day's inflow water flow data in this batch with their respective label data (e.g., calculating the mean squared error), we can obtain the loss function value of the target model for any given bat individual. Then, the reciprocal of the loss function value can be used as the fitness of that given bat individual.
[0079] Thus, after calculating the fitness of each bat individual in the nth iteration in the aforementioned manner, the globally optimal individual in the current iteration can be determined, as shown in step S53 below.
[0080] S53. Based on the fitness of each individual bat, determine the globally optimal individual for the nth iteration. In this embodiment, for example, but not limited to, first select the individual with the highest fitness from the fitness of each individual bat; then, determine whether the highest fitness is greater than the fitness of the globally optimal individual for the (n-1)th iteration; if so, then take the individual bat with the highest fitness as the globally optimal individual for the nth iteration; otherwise, do not update the globally optimal individual, that is, the globally optimal individual for the nth iteration is still the globally optimal individual for the (n-1)th iteration; of course, the globally optimal individual for the first iteration is the individual with the highest fitness in the bat population for the first iteration.
[0081] After determining the globally optimal individual in the current iteration, it can be determined whether the iteration stopping condition is met, as shown in step S54 below.
[0082] S54. Determine whether the iteration stopping condition is met; in this embodiment, the iteration stopping condition is, for example, that n reaches the maximum number of iterations, or that the fitness of the globally optimal individual at the nth iteration is greater than or equal to the fitness threshold; if the aforementioned iteration stopping condition is not met, then population update is required, and the process is as shown in step S55 below.
[0083] S55. If not, for any individual bat in the bat population, generate a random number corresponding to that individual bat, and determine whether the pulse emission rate of that individual bat is less than the random number; in this embodiment, the value range of the random number is (0,1); wherein, when the pulse emission rate of that individual bat is greater than or equal to the random number, a global search is required, the process of which is shown in steps S56 and S57 below.
[0084] S56. If not, select the bat individual with the highest fitness and the bat individual with the second highest fitness from the bat population, and designate them as the first designated individual and the second designated individual, respectively.
[0085] After selecting the bat individuals with the highest and second highest fitness, the location of any bat individual can be updated based on this, as shown in step S57 below.
[0086] S57. Based on the first designated individual and the second designated individual, update the position of any bat individual to obtain the updated bat individual, and obtain the bat population at the (n+1)th iteration after all bat individuals have been polled; in this embodiment, the following steps S57a to S57d are used as an example to update the position of any bat individual.
[0087] S57a. Calculate a first update parameter based on the fitness of the first specified individual and the fitness of any bat individual, and calculate a second update parameter based on the fitness of the second specified individual and the fitness of any bat individual; in specific implementation, the absolute value of the difference between the fitness of the first specified individual and the fitness of any bat individual is used as the first update parameter; similarly, the absolute value of the difference between the fitness of the second specified individual and the fitness of any bat individual is used as the second update parameter.
[0088] Thus, after obtaining the two update parameters, the speed update factor can be calculated, as shown in step S57b below.
[0089] S57b. Calculate the speed update factor using the first update parameter and the second update parameter; in specific applications, the following formula can be used, but is not limited to, to calculate the speed update factor.
[0090] ; In the formula, This represents the speed update factor. These represent control coefficients (with values of 0.6 and 0.2 respectively). These represent the first update parameter and the second update parameter, respectively.
[0091] After the speed update factor is calculated, speed update can be performed, as shown in step S57c below.
[0092] S57c. Based on the speed update factor, update the speed of any individual bat to obtain the updated speed; in specific implementation, for example, but not limited to, the following formula can be used to update the speed of any individual bat.
[0093] ; In the formula, This represents the updated velocity corresponding to any individual bat. This represents the velocity of any individual bat at the nth iteration. This represents the position of any individual bat at the nth iteration. This represents the pulse frequency of any individual bat during the nth iteration. These represent the first designated individual and the second designated individual, respectively.
[0094] In this embodiment, the formula for calculating the pulse frequency is: In the formula, These represent the minimum pulse frequency and the maximum pulse frequency, respectively. This represents a random number between (0, 1).
[0095] After the velocity update is completed, the position update can be performed, as shown in step S57d below.
[0096] S57d. Using the updated velocity, update the position of any individual bat to obtain the updated position of any individual bat.
[0097] In this embodiment, the following methods can be used, but are not limited to, for position updates.
[0098] ; In the formula, This refers to any of the aforementioned individual bats after the update. This represents the position adjustment coefficient, where, for example, the position adjustment coefficient is 2.
[0099] Thus, the velocity update formula shows that it is related to the velocity update factor and the best and second-best individuals. The velocity update factor is related to the fitness of the best and second-best individuals; that is, this embodiment uses adaptive adjustment of the velocity update factor value to update the velocity and determine the position update. This is equivalent to continuously adjusting the velocity update factor value based on individual differences during the iteration process, thereby adjusting the velocity vector and updating the position vector. Based on this, it can adapt to the position optimization of individuals at different stages, thus increasing the algorithm's ability to search for positions at different stages. Simultaneously, the position update formula introduces a periodic function instead of a fixed coefficient value, which can diffuse the fluctuations in the bat pulse frequency into the changes in position, thus enabling the bat's position to maintain continuous updating capabilities, thereby maintaining the diversity and distribution of the population.
[0100] Furthermore, in the aforementioned step S55, if the pulse emission rate of any individual bat is less than the random number, then the local search phase begins. This embodiment also improves the local search process, as shown below: Step 1: Generate a Gaussian perturbation vector and calculate the average amplitude of all individual bats.
[0101] In this embodiment, the dimension of the Gaussian perturbation vector is the same as the temperature of the position vector of any individual bat, and its internal elements follow a constant. The Gaussian distribution is used; mean amplitude is the average of the pulse emission loudness of all individual bats; thus, after obtaining the aforementioned parameters, the position of any individual bat can be updated.
[0102] Step 2: Based on the Gaussian perturbation vector and the average amplitude, update the position of any individual bat to obtain the updated individual bat.
[0103] In this embodiment, the following formula can be used, but is not limited to, for position updates.
[0104] ; In the formula, These represent the average amplitude and the Gaussian perturbation vector, respectively.
[0105] Thus, by incorporating Gaussian perturbation into the local search process, the ability of individual bats to explore within local areas can be increased, enabling them to find local optima more effectively. At the same time, the randomness of Gaussian perturbation can break the convergence trend of the algorithm near local optima, preventing the algorithm from getting stuck in local optima and failing to find the global optimum.
[0106] Thus, after updating the position of any individual bat, the positions of the remaining individual bats can be updated in the same way as described above. Then, the pulse emission amplitude and pulse emission rate are updated using the traditional bat algorithm. After the update is completed, the updated individual bats can be used to form the bat population for the (n+1)th iteration. Finally, the above process can be iteratively repeated until the iteration stopping condition is met. The iterative process is shown in step S58 below.
[0107] S58. Increment n by 1 and obtain the bat population at the nth iteration until the iteration stopping condition is met. Based on the globally optimal individual at the iteration stopping condition, determine the optimal model parameters.
[0108] In this embodiment, when the population iterates to the point where the iteration stops, the optimal model parameters, that is, the optimal parameters of each water flow prediction model, can be determined based on the position vector corresponding to the globally optimal individual when the iteration stops.
[0109] After finding the optimal model parameters through the aforementioned steps S51 to S58, various water flow prediction models can be constructed based on these parameters, as shown in step S6 below.
[0110] S6. Based on the optimal model parameters, construct various water flow prediction models.
[0111] Thus, by going through the aforementioned steps S1 to S6, the model parameters can be optimized to obtain the optimal model parameters. Then, the optimal model parameters can be used to construct various water flow prediction models. Finally, the water flow of the hydropower station can be predicted based on the model. The process can be referred to the first aspect of the embodiment, and will not be repeated here.
[0112] like Figure 4 As shown, the third aspect of this embodiment provides a hardware system for implementing the hydropower station water flow prediction method described in the first and second aspects of the embodiments, comprising: The acquisition unit is used to acquire historical daily inflow water flow data of the hydropower station.
[0113] The decomposition unit is used to perform variational mode decomposition on the historical daily inflow water data to obtain several IMF component data, and to obtain the water flow prediction model corresponding to each IMF component data.
[0114] The water flow prediction unit is used to input the data of each IMF component into their respective water flow prediction models to obtain multiple local water flow prediction data of the hydropower station on the target day, and based on each local water flow prediction data, to derive the water flow prediction sequence of the hydropower station on the target day.
[0115] Any water flow prediction model includes: an LSTM network layer, a fully connected layer, and an SVM network layer connected in sequence.
[0116] The LSTM network layer is used to perform feature extraction processing on the IMF component data input to any of the water flow prediction models to obtain water flow time series features, and then input the water flow time series features into the fully connected layer.
[0117] A fully connected layer is used to perform feature mapping processing on the time-series features of water flow to obtain water flow mapping features, wherein the dimension of the water flow mapping features is equal to the input dimension of the SVM network layer.
[0118] An SVM network layer is used to predict water flow based on the water flow mapping features, so as to obtain local water flow prediction data corresponding to the IMF component data input to any of the water flow prediction models.
[0119] The working process, working details and technical effects of the system provided in this embodiment can be found in the first and second aspects of the embodiment, and will not be repeated here.
[0120] like Figure 5 As shown, the fourth aspect of this embodiment provides a hydropower station water flow prediction device. Taking the device as an electronic device as an example, it includes: a memory, a processor, and a transceiver connected in sequence. The memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the hydropower station water flow prediction method as described in the first and second aspects of the embodiments.
[0121] For specific examples, the memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out (FIFO) memory, and / or first-in-last-out (FILO) memory, etc.; specifically, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor, also known as the CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state.
[0122] In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. For example, the processor may not be limited to microprocessors of the STM32F105 series, reduced instruction set computer (RISC) microprocessors, x86 architecture processors, or processors with integrated neural network processing units (NPUs). The transceiver may be, but is not limited to, a Wi-Fi transceiver, a Bluetooth transceiver, a General Packet Radio Service (GPRS) transceiver, a ZigBee (a low-power LAN protocol based on the IEEE 802.15.4 standard) transceiver, a 3G transceiver, a 4G transceiver, and / or a 5G transceiver. Furthermore, the device may also include, but is not limited to, a power module, a display screen, and other necessary components.
[0123] The working process, working details and technical effects of the electronic device provided in this embodiment can be found in the first and second aspects of the embodiment, and will not be repeated here.
[0124] The fifth aspect of this embodiment provides a storage medium for storing instructions containing the hydropower station water flow prediction method described in the first and second aspects of the embodiments. That is, the storage medium stores instructions that, when the instructions are run on a computer, execute the hydropower station water flow prediction method as described in the first and second aspects of the embodiments.
[0125] The storage medium refers to a carrier for storing data, which may include, but is not limited to, floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or memory sticks. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0126] The working process, working details and technical effects of the storage medium provided in this embodiment can be found in the first and second aspects of the embodiment, and will not be repeated here.
[0127] The sixth aspect of this embodiment provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform the hydropower station water flow prediction method as described in the first and second aspects of the embodiments, wherein the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0128] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for predicting water flow in a hydropower station, characterized in that, include: Obtain historical daily inflow data for the hydropower station; Variational mode decomposition is performed on the historical daily inflow water data to obtain several IMF component data, and the water flow prediction model corresponding to each IMF component data is obtained. Each IMF component data is input into its corresponding water flow prediction model to obtain multiple local water flow prediction data for the hydropower station on the target date. Based on each local water flow prediction data, the water flow prediction sequence for the hydropower station on the target date is derived. Any water flow prediction model includes: an LSTM network layer, a fully connected layer, and an SVM network layer connected in sequence; The LSTM network layer is used to perform feature extraction processing on the IMF component data input to any of the water flow prediction models to obtain water flow time-series features, and then input the water flow time-series features into the fully connected layer. A fully connected layer is used to perform feature mapping processing on the time-series features of water flow to obtain water flow mapping features, wherein the dimension of the water flow mapping features is equal to the input dimension of the SVM network layer. An SVM network layer is used to predict water flow based on the water flow mapping features, so as to obtain local water flow prediction data corresponding to the IMF component data input to any of the water flow prediction models.
2. The method according to claim 1, characterized in that, Historical daily inflow data includes: historical water flow data of the hydropower station for several consecutive days prior to the target date; This includes obtaining historical daily inflow data for hydropower stations, including: Based on historical water flow data over several consecutive days, the reference flow data for the target day is determined. Calculate the maximum information coefficient between the reference flow data and each historical water flow data; From the historical water flow data of several consecutive days, the historical water flow data with the largest information coefficient greater than the preset value is selected, and the selected historical water flow data is used to construct the historical daily inflow water flow data.
3. The method according to claim 1, characterized in that, The LSTM network layer in any water flow prediction model contains a number of sequentially connected improved LSTM cells, wherein the number of improved LSTM cells is equal to the length of the target component data, and the target component data is the IMF component data input to the water flow prediction model. The k-th improved LSTM cell in the LSTM network layer is used to receive the water flow component data at the k-th time step in the target component data, and to receive the output feature vector and cell state feature vector at the (k-1)-th time step. The output feature vector and cell state feature vector at the (k-1)-th time step are the output feature vector and cell state feature vector of the (k-1)-th improved LSTM cell. The k-th improved LSTM cell is also used to generate the output feature vector and cell state feature vector at the k-th time step based on multiple forget gates and multiple input gates, and according to the water flow component data at the k-th time step, as well as the output feature vector and cell state feature vector at the (k-1)-th time step. When k is K, the output feature vector of the k-th LSTM cell is the water flow time series feature, k is a positive integer, and K is the total number of improved LSTM cells.
4. The method according to claim 3, characterized in that, The k-th improved LSTM cell includes: a first forgetting gate, a second forgetting gate, a third forgetting gate, a first input gate, a second input gate, a third input gate, and an output gate; The first forget gate is used to generate a first feature vector based on the output feature vector at the (k-1)th time step and the water flow component data at the kth time step, and then transmits it to the first input gate and the third forget gate respectively; The first input gate is used to generate a second feature vector based on the output feature vector at the (k-1)th time step and the water flow component data at the kth time step, and then transmit it to the third input gate; The first input gate is also used to perform a dot product operation on the first feature vector and the second feature vector to generate a third feature vector, which is then output to the third forget gate and the third input gate. The second forget gate is used to generate a fourth feature vector based on the output feature vector at the (k-1)th time step and the water flow component data at the kth time step, and then output it to the third forget gate; The third forget gate is used to generate a seventh feature vector based on the fourth feature vector, the third feature vector, and the first feature vector, and then transmit it to the output gate. The second input gate is used to generate an eighth feature vector based on the output feature vector at the (k-1)th time step and the water flow component data at the kth time step, which is then transmitted to the output gate, and to generate a ninth feature vector which is then output to the third input gate. The third input gate is used to generate the twelfth feature vector based on the ninth feature vector, the third feature vector, and the second feature vector, and then transmit it to the output gate. The output gate is used to generate the cell state feature vector and the output feature vector at the k-th time step based on the seventh feature vector, the twelfth feature vector, the eighth feature vector, the output feature vector at the (k-1)-th time step, the cell state feature vector at the (k-1)-th time step, and the water flow component data at the k-th time step.
5. The method according to claim 4, characterized in that, The third forget gate is used to perform a dot product operation on the fourth feature vector and the third feature vector to obtain the fifth feature vector, and to calculate the difference between the first feature vector and the third feature vector to obtain the sixth feature vector. The third forget gate is also used to sum the sixth and fifth eigenvectors to obtain the seventh eigenvector. The third input gate is used to perform a dot product operation on the ninth feature vector and the third feature vector to obtain the tenth feature vector, and to subtract the third feature vector from the second feature vector to obtain the eleventh feature vector, so as to sum the eleventh feature vector and the tenth feature vector to obtain the twelfth feature vector and output it to the output gate. Correspondingly, the output gate is used to perform a dot product operation on the seventh feature vector and the cell state feature vector at the (k-1)th time step to obtain the thirteenth feature vector, and to perform a dot product operation on the twelfth feature vector and the eighth feature vector to obtain the fourteenth feature vector. The output gate is used to sum the fourteenth and thirteenth feature vectors to generate the cell state feature vector at the k-th time step, and to generate the fifteenth feature vector based on the output feature vector at the (k-1)-th time step and the water flow component data at the k-th time step. The output gate is also used to generate the output feature vector at the k-th time step based on the cell state feature vector at the k-th time step and the fifteenth feature vector.
6. The method according to claim 1, characterized in that, The various water flow prediction models were constructed in the following manner; Obtain the training dataset, which includes sample IMF component data corresponding to several sample daily inflow water flow data of the hydropower station; Based on the training dataset and using the improved bat algorithm, the parameters of the target model are optimized to obtain the optimal model parameters of the target model, wherein the target model includes various untrained water flow prediction models. Based on the optimal model parameters, various water flow prediction models are constructed.
7. The method according to claim 6, characterized in that, Based on the training dataset and using the improved bat algorithm, parameter optimization is performed on the target model to obtain the optimal model parameters, including: Obtain the bat population at the nth iteration, where the initial value of n is 1. When n is 1, the bat population at the nth iteration is the initial population, and each initial bat individual in the initial population corresponds to a set of initial model parameters of the target model. Generate target models for each individual bat in the bat population, and train each target model using the training dataset. After training, calculate the fitness of each individual bat based on the loss function value of each target model. Based on the fitness of each individual bat, the globally optimal individual is determined in the nth iteration; Determine if the iteration stopping condition is met; If not, for any individual bat in the bat population, generate a random number corresponding to that individual bat, and determine whether the pulse emission rate of that individual bat is less than the random number. If not, select the bat individual with the highest fitness and the second highest fitness from the bat population to be designated as the first and second designated individuals, respectively. Based on the first and second designated individuals, the position of any bat individual is updated to obtain the updated bat individual. After all bat individuals have been polled, the bat population at the (n+1)th iteration is obtained. Increment n by 1 and obtain the bat population at the nth iteration until the iteration stopping condition is met. Based on the globally optimal individual at the time the iteration stopping condition is met, determine the optimal model parameters.
8. The method according to claim 7, characterized in that, Based on the first designated individual and the second designated individual, the position of any bat individual is updated to obtain the updated position of the bat individual, including: The first update parameter is calculated based on the fitness of the first specified individual and the fitness of any bat individual, and the second update parameter is calculated based on the fitness of the second specified individual and the fitness of any bat individual. The speed update factor is calculated using the first update parameter and the second update parameter; Based on the speed update factor, the speed of any individual bat is updated to obtain the updated speed; Using the updated velocity, update the position of any individual bat to obtain the updated position of any individual bat.
9. A hydropower station water flow prediction system, characterized in that, include: The acquisition unit is used to acquire historical daily inflow water data of the hydropower station; The decomposition unit is used to perform variational mode decomposition on the historical daily inflow water data to obtain several IMF component data, and to obtain the water flow prediction model corresponding to each IMF component data. The water flow prediction unit is used to input the data of each IMF component into their respective water flow prediction models to obtain multiple local water flow prediction data of the hydropower station on the target day, and to derive the water flow prediction sequence of the hydropower station on the target day based on each local water flow prediction data. Any water flow prediction model includes: an LSTM network layer, a fully connected layer, and an SVM network layer connected in sequence; The LSTM network layer is used to perform feature extraction processing on the IMF component data input to any of the water flow prediction models to obtain water flow time-series features, and then input the water flow time-series features into the fully connected layer. A fully connected layer is used to perform feature mapping processing on the time-series features of water flow to obtain water flow mapping features, wherein the dimension of the water flow mapping features is equal to the input dimension of the SVM network layer. An SVM network layer is used to predict water flow based on the water flow mapping features, so as to obtain local water flow prediction data corresponding to the IMF component data input to any of the water flow prediction models.
10. A computer program product containing instructions, characterized in that, When the instructions are executed on the computer, the computer performs the hydropower station water flow prediction method as described in any one of claims 1 to 8.