Water diversion channel ice period water temperature intelligent prediction method based on QPSO-BiGRU
Through the QPSO-BiGRU intelligent prediction method, combined with quantum particle swarm optimization and bidirectional gating recurrent neural network, the existing problems of low water temperature prediction accuracy and short prediction period are solved, and efficient and accurate multi-step prediction of water temperature is achieved, supporting water temperature during the ice age stable forecast and water transfer safety.
Patent Information
- Application Number
- CN202411200419.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-03
AI Technical Summary
The existing water temperature prediction methods have problems such as low prediction accuracy, short prediction period and long model debugging time, which is difficult to meet the accurate and timely prediction needs of water temperature during the water diversion channel, affecting the safety and efficiency of water transport.
Using an intelligent prediction method based on QPSO-BiGRU, combining quantum particle swarm optimization algorithm and bidirectional gating recurrent neural network, we automatically optimize the model hyperparameters, and build an efficient multi-step intelligent prediction model for water temperature, simplifying the parameter rate determination process and improving prediction accuracy and efficiency.
It significantly improves the reliability and forecast period of multi-step water temperature prediction, shortens the model debugging time, enhances prediction accuracy, adapts to complex nonlinear water temperature changes, meets the needs of water temperature prediction during the ice age, and supports the safe and stable operation of water diversion channels.
Smart Images

Figure CN119066136A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of water conservancy engineering informationization, and in particular relates to a multi-step intelligent prediction method for water temperature. Background Art
[0002] The method for predicting water temperature in diversion channels during the glacial period is one of the important technical means to simulate and predict water temperature changes in water transfer and diversion projects, and is also one of the important non-engineering measures to reduce disasters in water conservancy projects under complex winter environments. The method for predicting water temperature in diversion channels during the glacial period has been widely used in protecting river ecosystems and ensuring the safe operation of water transfer and diversion projects. Water temperature prediction can effectively prevent ice damage and ensure the stable operation of water transfer and diversion projects, which has certain practical significance for protecting people's lives and property and social and economic development.
[0003] The sudden drop in temperature in winter has led to the risk of freezing during the project's ice-time water delivery, which has seriously affected the normal operation and water supply efficiency of the project. In order to ensure the safety of water delivery in winter, the current water delivery method of the middle line project in winter is mostly carried out under the ice cover. However, the water supply capacity of the main canal during the ice period has dropped significantly, and the contradiction between the increasing water demand in the receiving area and the water supply capacity of the project has become more prominent. Therefore, how to accurately and timely predict the water temperature of the water diversion channel during the ice period, ensure the safety of water delivery in the water diversion channel during the ice period, improve the water delivery efficiency of the project during the ice period, and give full play to the benefits of the project is an important issue that needs to be studied urgently.
[0004] At present, when conducting water temperature prediction research, it is often analyzed and studied through prototype observation, experimental research and numerical simulation, that is, simulation calculation is performed through assumed parameters. Due to problems such as low observation accuracy, model scale and parameter setting, the current research methods are difficult to achieve ideal results. In addition, the selection and adjustment of model parameters often require a lot of trial and error processes. The complexity and calculation amount of the model make it difficult to ensure the global optimality of its prediction results, which makes it face huge workload and time cost problems when applied on a large scale, and it is impossible to guarantee the applicability and accuracy of the model under different conditions. In addition, although the currently widely used single-step prediction method can provide relatively accurate short-term predictions in some cases, in actual applications, the multi-step prediction method can provide water temperature information for multiple time steps and support more complex decision-making processes. Through multi-step prediction, we can have a deeper understanding of the dynamic changes of water temperature in the ice age and reveal the temperature trends and fluctuations in the future. This is of great significance for optimizing resource allocation and avoiding resource waste or shortages caused by inaccurate predictions.
[0005] With the continuous development of artificial intelligence technology, many advanced intelligent algorithms have been applied to solve various optimization problems in the context of water temperature prediction, and have achieved good results. The QPSO algorithm and the BiGRU model are important branches of artificial intelligence technology. The main features of the QPSO algorithm are the group search strategy and information exchange between groups, which can usually solve the problem in a time significantly lower than that required by conventional computing methods. The BiGRU model has the advantages of simple rules, strong versatility and good performance. It can obtain information in both the forward and reverse propagation of the network, fully explore the information characteristics of the sequence, improve the prediction accuracy of the method, and perform well in processing time series data. In addition, the QPSO algorithm applies quantum theory to particle behavior, updates the particle position based on the average optimal particle position of the quantum particle group and uses the contraction and expansion factor to avoid the particle swarm algorithm from easily falling into the local optimal problem and enhances the global convergence ability. The BiGRU model overcomes the problems of gradient vanishing and gradient explosion in traditional recurrent neural networks, can learn long-term and short-term dependencies, and at the same time, simplifies the complex gate structure inside the long and short-term memory model, reduces the number of network training parameters, and has higher computational efficiency.
[0006] Recurrent Neural Networks (RNNs) have been successfully applied in many fields. The internal state of RNNs can be used to process time-related sequences. GRU is different from traditional RNNs in that it can learn long-term and short-term dependencies. At the same time, the complex gate structure inside LSTM is simplified to obtain a GRU that only contains reset and update gates, which reduces the number of network training parameters and has higher computational efficiency. Summary of the invention
[0007] In view of the problems of low prediction accuracy, short forecast period and long model debugging time in existing water temperature prediction methods, the present invention provides an intelligent prediction method for ice age water temperature in water diversion channels based on QPSO-BiGRU. The QPSO algorithm is combined with the BiGRU model to obtain a water temperature prediction model with parameter adaptive intelligent calibration. Combined with efficient model adaptive intelligent calibration, high-precision multi-step intelligent prediction of water temperature is achieved.
[0008] In order to achieve the above-mentioned object of the invention, the present invention adopts the following technical solutions:
[0009] An intelligent prediction method for water temperature in a water diversion channel during the glacial period based on QPSO-BiGRU includes the following steps:
[0010] The water temperature data including the input meteorological operation factors including the minimum temperature, daily average temperature, flow, sliding three-day negative accumulated temperature, and sliding three-day temperature were obtained and normalized;
[0011] The intelligent prediction model of water temperature in the diversion channel during the ice period based on QPSO-BiGRU is constructed. The water temperature data of meteorological operation factors, namely the minimum temperature, daily average temperature, flow, sliding three-day negative accumulated temperature, sliding three-day temperature sum and the station water temperature sequence WT from the previous (t-1) day to (ts) day are used. (t-1) , WT (t-2) ,……WT (t-s) Together they serve as the input factors of the model, t represents the current prediction time, and s represents the input step length of the station water temperature series;
[0012] Initialize the parameters of the QPSO algorithm, and obtain the parameters corresponding to the particle with the best fitness value through iteration as the hyperparameters of the optimized BiGRU model;
[0013] Construct a decision model based on the prediction model ontology of the BiGRU unit, and simultaneously calculate and analyze the predicted water temperature decision information at the current time t by two GRU unit states As shown below:
[0014]
[0015] In the formula, and represents the output of the forward and backward propagation of two GRU units, and Represents the weights of the forward and backward propagation of two GRU units;
[0016] The QPSO algorithm is used to automatically optimize the learning rate and the number of hidden layer neuron nodes of the BiGRU model, and the parameters corresponding to the particles with the best fitness value in the QPSO algorithm are used as the hyperparameters of the optimized BiGRU model.
[0017] Calculate the average value of the optimal position of the particle population and update the particle position based on the average value; repeat steps 3 to 4 until the maximum number of iterations is reached. After the iteration, update the particle position as the optimal position gbest of the global particle. At the optimal position gbestg, obtain the particle with the best fitness value as the optimal solution. The model parameters corresponding to the particle and related to the water temperature change process are used as the hyperparameters of the optimized BiGRU model.
[0018] According to the hyperparameters of the optimized BiGRU model and the water temperature intelligent prediction model based on QPSO-BiGRU, multi-step intelligent prediction calculation of water temperature is realized, and the water temperature prediction results are output.
[0019] Compared with the existing water temperature prediction method, the beneficial effects and advantages of the present invention are:
[0020] 1) When dealing with complex nonlinear water temperature change problems, it can more efficiently capture the characteristics of water temperature changes, improve the reliability and forecast period of multi-step predictions, and adapt to a variety of water temperature influencing factors, thereby better meeting the needs of water temperature prediction in the ice age of water diversion channels;
[0021] 2) It is not only innovative and advanced in theory, but also has important practical significance and broad application prospects in practical applications, and can provide effective technical support for the prediction of water temperature in water diversion channels during the glacial period;
[0022] 3) Combining the advantages of the QPSO algorithm and the BiGRU model, simplifying the calibration process of model parameters, significantly shortening the model debugging time, and improving the model calibration and usage efficiency;
[0023] 4) The error caused by the hyperparameter setting of the prediction model is reduced, and the accuracy of multi-step intelligent prediction of water temperature is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a schematic diagram of the overall process of an intelligent prediction method of water temperature in a water diversion channel during glacial period based on QPSO-BiGRU of the present invention;
[0025] Figure 2 Schematic diagram of the structure of the GRU internal unit and the BiGRU unit, (a) the structure of the GRU internal unit, (b) the structure of the BiGRU unit;
[0026] Figure 3 3 is a schematic diagram of the multi-step intelligent prediction results of winter water temperature in a specific embodiment of the present invention, (3a) to (3g) are the multi-step intelligent prediction results of water temperature in the forecast period of 1d to 7d respectively. DETAILED DESCRIPTION
[0027] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0028] like Figure 1 As shown, a water temperature intelligent prediction method based on the QPSO-BiGRU model of the present invention comprises the following steps:
[0029] Step 1: obtain input factor data and perform normalization processing, that is, obtain water temperature data of meteorological operation factors including minimum temperature, daily average temperature, flow, sliding three-day negative accumulated temperature, and sliding three-day temperature;
[0030] Among them, it also includes normalizing the water temperature data of the meteorological operation factor to be between [0,1] to improve the convergence efficiency of the BiGRU model; Regarding the determination of the input factor station water temperature sequence: Since the change of water temperature has strong autocorrelation and time continuity, the input step length s of the station water temperature (WT) sequence is determined by the partial autocorrelation analysis method (PACF) under the 95% confidence interval;
[0031] Step 2: Construct an intelligent prediction model for water temperature in the diversion channel during the glacial period based on QPSO-BiGRU. The input of the intelligent prediction model for water temperature in the diversion channel during the glacial period based on QPSO-BiGRU is the water temperature data of meteorological operation factors, namely, the minimum temperature, daily average temperature, flow, sliding three-day negative accumulated temperature, sliding three-day temperature sum, and the station water temperature sequence WT from the previous (t-1) day to (ts) day (t-1) , WT (t-2) ,……WT (t-s) The input factors are used together as input factors, t represents the current prediction time, s represents the input step length of the station water temperature (WT) sequence, and the input factors are input into the water temperature multi-step intelligent prediction model, and the output is the water temperature prediction value WT of the water diversion channel in the ice period with different prediction periods from 1d to 7d. (t) , WT (t+1) ,……,WT (t+6) ;
[0032] The QPSO algorithm described in this method applies quantum theory to particle behavior and improves the particle swarm algorithm in two main aspects. On the one hand, the particle's movement speed is no longer considered, and the particle position is updated according to the average optimal particle position of the quantum particle swarm, which avoids the particle swarm algorithm from easily falling into the local optimal problem, allowing particles to search for the global optimal solution more efficiently. On the other hand, the contraction and expansion factor is used to control the update of the particle position, which enhances the global convergence ability. The specific principles are as follows:
[0033]
[0034] P i (t+1)=α·pbest i (t)+(1-α)gbest j (t) (2)
[0035]
[0036] In the formula, x i is the position of the particle, N is the total number of particles, pbest i is the average position of the ith particle, mbest is the historical average best position of the particle, gbest jis the position of the optimal particle in the entire population, α and β are random numbers uniformly distributed in [0,1], and β is the contraction and expansion factor, which can control the rapid convergence of particles and avoid the local swing of particles at the optimal value, so that the algorithm can find the global optimal solution more easily;
[0037] The intelligent prediction model of water temperature in the ice age of the water diversion channel based on QPSO-BiGRU is constructed by combining the quantum-behaved particle swarm optimization (QPSO) algorithm and the bidirectional gated recurrent unit (BiGRU) model. The specific description is as follows:
[0038] 2.1, first initialize the QPSO algorithm, that is, initialize the parameters of the QPSO algorithm, including the particle population size, the maximum number of iterations, and the coefficient β that controls the particle convergence speed. Among them, the particle population is set as a set of model parameters related to the water temperature change process, including the hyperparameters of the BiGRU model and the weights of the meteorological operation factors related to water temperature. The weights determine the degree of influence of each meteorological factor on the water temperature prediction; the particle population size indicates the number of particles considered simultaneously in the water temperature prediction optimization process. A larger population size means that the model can explore different water temperature change processes in a wider parameter space; the maximum number of iterations indicates the maximum number of iterations allowed by the QPSO algorithm in the process of optimizing the parameters of the water temperature prediction model. The appropriate number of iterations enables the model to better capture the law of water temperature changes; the coefficient β that controls the particle convergence speed is used to adjust the agility of the water temperature prediction model in finding the optimal parameter combination, ensuring that the model can not only stably predict common water temperatures, but also flexibly respond to complex water temperature changes caused by extreme weather;
[0039] 2.2, set the fitness function of the QPSO algorithm, that is, the mean square error (MSE) of the water temperature value predicted by the input meteorological operation factor is used as the fitness function:
[0040]
[0041] In the formula, is the water temperature prediction value of the i-th iteration; y i is the true value of water temperature at the i-th iteration, and n represents the total number of iterations;
[0042] 2.3, the decision model of the prediction model ontology is constructed based on the BiGRU unit, which is described as follows:
[0043] 1) If Figure 2 (a) shows the internal unit of GRU, the reset gate R in GRU t and update gate Z t The input value at the current time t and the hidden state h at the time t-1 t-1 Decision. Using the reset gate R tThe adjustment model's memory of historical temperature, flow and other meteorological operating conditions determines whether and to what extent the model considers the water temperature information at past moments when predicting the current water temperature; the update gate Z is used to t Weigh the influence of past historical water temperature status and current meteorological conditions to determine the extent to which the model uses the forecast status of the previous moment to update the current forecast results. When the update gate is large, the model is more inclined to maintain the water temperature forecast trend of the previous moment, which is suitable for situations where the water temperature changes more smoothly. When the update gate is small, the model will rely more on the input data at the current moment to adjust the water temperature forecast, which is suitable for situations where the water temperature changes more drastically. Reset gate R t and update gate Z t The expression is as follows:
[0044] Z t =σ(W Z ·[h t-1 ,x t ]) (5)
[0045] R t =σ(W R ·[h t-1 ,x t ]) (6)
[0046] Where W Z and W R is the weight matrix of the reset gate and the update gate, which adjusts the proportion of information transmission according to the influence of meteorological factors (such as air temperature and flow) on the current water temperature, where W Z Used to control the current time t, W R It is used to control the role of the water temperature information at the previous moment t-1 in the updating and resetting process. σ represents the sigmoid function, which is used to weight and standardize the water temperature information. t-1 is the hidden state at time t-1;
[0047] In the GRU unit, through the candidate hidden unit Calculate and analyze the candidate predicted water temperature decision information at the current time t, the candidate hidden unit The expression is as follows:
[0048]
[0049] Where W represents the weight obtained from the reset gate, which determines the degree to which the water temperature information at the previous moment is retained in the update at the current moment; represents the activation function, usually tanh / relu, which is used to extract the nonlinear relationship between current meteorological factors and historical water temperature information, helping the model to better capture the potential impact of complex meteorological conditions on water temperature.
[0050] Finally, the hidden layer information of the current time t is output As shown in the following formula.
[0051]
[0052] The unidirectional network in the GRU unit only extracts information forward along the current state, but cannot extract subsequent sequence information. The BiGRU unit can obtain information during both the forward and reverse propagation of the network, so it can not only take into account the impact of past meteorological conditions on water temperature, but also extract useful information features from possible future meteorological trends. BiGRU can fully explore the trend characteristics of changes in historical meteorological factors, such as the gradual rise or fall of temperature, the periodic fluctuation of flow, etc.; at the same time, it can use speculation or predictions about possible changes in future meteorological factors, such as a sudden drop in temperature, a sharp increase in flow, or other abnormal meteorological conditions, to judge in advance the impact that these changes may have on the current water temperature, so that the water temperature forecast not only depends on the meteorological changes that have occurred, but also takes into account the drastic changes that may occur in the future. This fusion of two-way information enables the model to better identify and adapt to the complex impact of sudden meteorological events on water temperature, fully explore the information characteristics of the sequence, and help improve the prediction accuracy.
[0053] like Figure 2 (b) shows the BiGRU unit. The bidirectional gated recurrent unit (BiGRU) is a variant of the recurrent neural network (RNN) that can overcome the problems of gradient disappearance and gradient explosion in traditional RNNs.
[0054] In the BiGRU unit, the bidirectional hidden layer information at the current time t is The two GRU unit states simultaneously calculate and analyze the predicted water temperature decision information at the current time t, and the bidirectional hidden layer information The expression is as follows:
[0055]
[0056] In the formula, and represents the output of the forward and backward propagation of two GRU units, and Represents the weights of the forward and backward propagation of the two GRU units. By superimposing the forward and backward propagation, the feature information is fully extracted to further improve the prediction accuracy of the method;
[0057] 2.4, initialize the learning rate and number of hidden layer neuron nodes of the BiGRU model;
[0058] Step 3: Use the fitness function of the QPSO algorithm to find the optimal parameter combination of the water temperature prediction model and evaluate the model fitness of the QPSO algorithm. Specifically, the parameters corresponding to the particles with the best fitness values in the QPSO algorithm are used as the hyperparameters of the optimized BiGRU model. Through the optimization of the QPSO algorithm, the BiGRU model can automatically adjust the parameter combination to achieve higher prediction accuracy. The specific description is as follows:
[0059] The fitness function of the QPSO algorithm is used to calculate the optimal position of each particle in the particle population and the global optimal position, and the learning rate and the number of hidden layer neuron nodes of the BiGRU model are automatically optimized; the optimal position of a particle means that the optimal prediction result of the water temperature prediction model is obtained under the parameter combination corresponding to all iterations of the particle, and the minimum mean square error is achieved between the optimal water temperature prediction value and the actual water temperature value; the global optimal position means that in the entire particle population, all particles find the optimal parameter combination of the water temperature prediction model in all iterations;
[0060] The QPSO algorithm is used to determine the optimal value of the hyperparameters; in each iteration, the QPSO algorithm generates a water temperature prediction value based on the parameter settings of the current particle, compares it with the true value, and calculates the mean square error (MSE). For each particle, if the MSE in the current iteration is lower than the minimum MSE of the particle in the previous iteration, the optimal position pbest of the particle is updated to the current parameter settings, and the current minimum MSE is recorded; in the entire population, if the current MSE of a particle is lower than the minimum MSE recorded by any previous particle, the global optimal position g is updated. best Set the current parameters for the particle and record the global minimum MSE. Through this process, the optimal position of the particle and the global optimal position are continuously updated, so as to find a set of parameter combinations that can make the water temperature prediction model with the highest accuracy;
[0061] Step 4: Calculate the average value of the optimal position of the particle group and update the particle position according to the average value; repeat steps 3 to 4 until the maximum number of iterations is reached. After the iteration, update the particle position as the optimal position gbest of the global particle. At the optimal position gbestg, the particle with the best fitness value is obtained as the optimal solution. The model parameters corresponding to the particle and related to the water temperature change process are used as the hyperparameters of the optimized BiGRU model.
[0062] According to the hyperparameters of the optimized BiGRU model obtained in step 4 and the water temperature intelligent prediction model based on QPSO-BiGRU constructed in step 2, the multi-step intelligent prediction calculation of water temperature is realized, and the multi-step intelligent prediction of water temperature in different forecast periods from 1d to 7d is performed, and the predicted value WT of water temperature in the water diversion channel during the ice age is output. (t) , WT (t+1) ,……,WT(t+6) prediction results.
[0063] Step six, prediction result evaluation, use indicators such as NSE, R, RMSE and MAE to analyze and evaluate the prediction results of the method.
[0064] The specific implementation process of the present invention is described as follows:
[0065] An intelligent water temperature prediction model was established, and the QPSO algorithm was used to automatically optimize the learning rate and the number of hidden layer neuron nodes of the BiGRU model to determine the optimal value of the hyperparameters. The input data included meteorological operating conditions, namely the lowest temperature, daily average temperature, flow, sliding three-day negative accumulated temperature, sliding three-day temperature, and water temperature from the previous (t-1) day to (ts) day, and finally output the water temperature forecast values for different forecast periods from 1d to 7d. According to the established multi-step intelligent water temperature prediction method, considering the influence of various influencing factors on water temperature changes, multi-step intelligent water temperature prediction was carried out to forecast water temperature forecast values for different forecast periods from 1d to 7d.
[0066] S1, data preprocessing and normalization;
[0067] The winter influencing factors of a station from 2020 to 2022 are used as input data, and the meteorological operation factors and water temperature are normalized to be between [0,1] to improve the convergence efficiency of the BiGRU model. The input data include the meteorological operation conditions of the typical station in Beijuma, namely the minimum temperature, daily average temperature, flow, sliding three-day negative accumulated temperature, sliding three-day temperature and the water temperature (WT) sequence from the previous (t-1) day to (ts) day. Among them, the input step length s of the station water temperature (WT) sequence is determined by the partial autocorrelation analysis method (PACF) at a 95% confidence interval. Finally, the input and output factors of the multi-step intelligent prediction method for water temperature are determined, as shown in Table 1.
[0068] Table 1
[0069]
[0070] S2, model initialization. Initialize the parameters of the QPSO algorithm, including the particle population size, the maximum number of iterations, and the coefficient β that controls the particle convergence speed;
[0071] S3, model fitness evaluation. Initialize the learning rate and number of hidden layer neuron nodes of the BiGRU model, and then evaluate the fitness of the current particle;
[0072] S4, update particle positions. Calculate the average value of the optimal position of the particle group and update the particle positions;
[0073] S5, model hyperparameter determination;
[0074] The learning rate in the BiGRU model affects the training effect, and the number of hidden layer neuron nodes affects the prediction performance. This method uses QPSO to automatically optimize the learning rate and the number of hidden layer neuron nodes of the BiGRU model to determine the optimal value of the hyperparameters and improve the prediction accuracy of the model. After the iteration, the particle with the best fitness value is selected as the optimal solution, and the parameters corresponding to the particle are the hyperparameters of the optimized BiGRU model. The input and output data volume of the multi-step intelligent prediction method for water temperature is small. At the same time, in order to improve the efficiency of the model operation and reduce resource occupation and loss, the number of hidden layers is set to 1;
[0075] S6, model calculation, according to the optimal particle position, set the model hyperparameters, build a multi-step intelligent prediction method of water temperature based on the QPSO-BiGRU model, and carry out multi-step intelligent prediction of water temperature;
[0076] S7, prediction result evaluation, using NSE, R, RMSE and MAE and other indicators to analyze and evaluate the prediction results, and at the same time compare and analyze with the prediction results of QPSO-SVM and QPSO-BP methods to evaluate the accuracy of QPSO-BiGRU water temperature multi-step intelligent prediction method. The prediction results of winter water temperature at a typical station by QPSO-BiGRU water temperature multi-step intelligent prediction method of the present invention are as follows: Figure 3 As shown in Table 2, the prediction result index evaluation.
[0077] Table 2
[0078]
[0079]
[0080] The results show that the QPSO-BiGRU model has excellent and stable prediction performance in water temperature prediction at different forecast periods.
[0081] Finally, it should be noted that the above content is only used to illustrate the technical solution of the present invention, rather than to limit the scope of protection of the present invention. Simple modifications or equivalent substitutions of the technical solution of the present invention by ordinary technicians in this field do not deviate from the essence and scope of the technical solution of the present invention.
Claims
1. A QPSO-BiGRU-based intelligent prediction method for water temperature in diversion channels during glacial periods, characterized in that: The following steps are involved: The water temperature data including the input meteorological operation factors including the minimum temperature, daily average temperature, flow, sliding three-day negative accumulated temperature, and sliding three-day temperature were obtained and normalized; The intelligent prediction model of water temperature in the diversion channel during the ice period based on QPSO-BiGRU is constructed. The water temperature data of meteorological operation factors, namely the minimum temperature, daily average temperature, flow, sliding three-day negative accumulated temperature, sliding three-day temperature sum and the station water temperature sequence WT from the previous (t-1) day to (ts) day are used. (t-1) , WT (t-2) ,……WT (t-s) Together they serve as the model input factors, t represents the current prediction time, and s represents the input step length of the station water temperature series; Initialize the parameters of the QPSO algorithm, and obtain the parameters corresponding to the particle with the best fitness value through iteration as the hyperparameters of the optimized BiGRU model; Construct a decision model based on the prediction model ontology of the BiGRU unit, and simultaneously calculate and analyze the predicted water temperature decision information at the current time t by the two GRU unit states As shown below: In the formula, and represents the output of the forward and backward propagation of two GRU units, and Represents the weights of the forward and backward propagation of two GRU units; The QPSO algorithm is used to automatically optimize the learning rate and the number of hidden layer neuron nodes of the BiGRU model, and the parameters corresponding to the particles with the best fitness value in the QPSO algorithm are used as the hyperparameters of the optimized BiGRU model. Calculate the average value of the optimal position of the particle population and update the particle position based on the average value; repeat steps 3 to 4 until the maximum number of iterations is reached. After the iteration, update the particle position as the optimal position gbest of the global particle. At the optimal position gbestg, obtain the particle with the best fitness value as the optimal solution. The model parameters corresponding to the particle and related to the water temperature change process are used as the hyperparameters of the optimized BiGRU model. According to the hyperparameters of the optimized BiGRU model and the water temperature intelligent prediction model based on QPSO-BiGRU, multi-step intelligent prediction calculation of water temperature is realized, and the water temperature prediction results are output.
2. The intelligent prediction method for water temperature in the glacial period of a water diversion channel based on QPSO-BiGRU as claimed in claim 1 is characterized in that: in, In each iteration, the QPSO algorithm generates a water temperature prediction value based on the parameter settings of the current particle, compares it with the true value, and calculates the mean square error (MSE). For each particle, if the MSE in the current iteration is lower than the minimum MSE of the particle in the previous iteration, the optimal position p of the particle is updated. best is the current parameter setting, and records the current minimum MSE; in the entire population, if the current MSE of a particle is lower than the minimum MSE recorded by any particle before, the global optimal position g is updated. best Set the current parameters for the particle and record the global minimum MSE. In this process, the optimal position of the particle and the global optimal position are continuously updated to find a set of parameter combinations that make the water temperature prediction model most accurate.
3. The intelligent prediction method for water temperature in the glacial period of a water diversion channel based on QPSO-BiGRU as claimed in claim 1, characterized in that: The updated value determines whether the prediction model is more inclined to maintain the water temperature prediction trend of the previous moment or whether the prediction model is more dependent on the input data at the current moment to adjust the water temperature prediction.
4. The intelligent prediction method for water temperature in the glacial period of a water diversion channel based on QPSO-BiGRU as claimed in claim 1 is characterized in that: The prediction results are multi-step intelligent prediction values of water temperature for different forecast periods from one day to seven days.
5. The intelligent prediction method for water temperature in the glacial period of a water diversion channel based on QPSO-BiGRU as claimed in claim 1, characterized in that: The mean square error of the water temperature value predicted by the input meteorological operation factor is used as the fitness function, as shown in the following formula: In the formula, is the water temperature prediction value of the i-th iteration, y i is the true value of the water temperature at the i-th iteration, and n represents the total number of iterations.
6. The method for intelligently predicting water temperature in a water diversion channel during glacial period based on QPSO-BiGRU as claimed in claim 1, characterized in that: The two GRU units in the BiGRU unit have reset gates R t and update gate Z t , reset gate R t Used to adjust the prediction model's memory of meteorological operating conditions; update gate Z t Used to weigh the impact of past historical water temperature states against current meteorological conditions; Reset Gate R t and update gate Z t The expression is as follows: R t =σ(W R ·[h t-1 ,x t ]) Z t =σ(W Z ·[h t-1 ,x t ]) Where W Z and W R is the weight matrix of the reset gate and the update gate, σ is the sigmoid function, h t-1 is the hidden state at time t-1; In the GRU unit, through the candidate hidden unit Calculate and analyze the candidate predicted water temperature decision information at the current time t, the candidate hidden unit The expression is as follows: Where W is the weight obtained from the reset gate, which determines the degree to which the water temperature information at the previous moment is retained in the update at the current moment. is the activation function; Hidden layer information at the current time t As shown below: and The value of is the hidden layer information of a single GRU unit output at the current time t
Citation Information
Patent Citations
Air quality prediction optimization method based on dynamic adaptive particle swarm
CN116256468A
Grain storage ventilation temperature prediction method for optimizing CNN-BiGRU-Attention network model based on IPSO algorithm
CN116720620A
Network security situation prediction method for optimizing TCAN-BiGRU based on SSA and IQPSO
CN117768164A
Cited By
Hydropower engineering comprehensive monitoring method and system based on digital twinning
CN119830774A
Comprehensive monitoring method and system for hydropower projects based on digital twins
CN119830774B
