A hydrological forecast intelligent method, electronic equipment and storage medium
By constructing a gated cyclic unit prediction model through an adaptive optimization algorithm, the component sequences of hydrological flow are decomposed and processed, solving the problem of insufficient accuracy in traditional hydrological forecasting and achieving high-precision hydrological forecasting results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2026-03-27
AI Technical Summary
Traditional hydrological forecasting methods struggle to meet the accuracy requirements of practical engineering projects when faced with complex characteristics such as nonlinearity, fluctuation, and periodicity.
An adaptive optimization algorithm is used to construct a gated cyclic unit prediction model. Hydrological flow is decomposed into component sequences of different frequencies through variational mode decomposition. After normalization, the model is divided into training and test sets. The optimal parameters are used for prediction, and the predicted values of the component sequences are superimposed to obtain the final predicted value.
It significantly improves the accuracy of hydrological forecasts and the generalization ability of models, enabling reasonable and feasible forecast results in complex situations, and improving the efficiency of parameter optimization and the stability of models.
Smart Images

Figure CN115345077B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of hydrological forecasting, and particularly relates to a hydrological forecasting intelligent method, an electronic device and a storage medium. BACKGROUND
[0002] Hydrological forecasting is an effective non-engineering measure to alleviate and solve water safety problems such as flood and drought disaster early warning. Basin hydrological forecasting is an important condition for water conservancy planning and construction, water resources optimal allocation and sustainable development of human society. Accurate and reliable hydrological forecasting information is of great significance to the safe, stable and economic operation of hydropower energy and its interconnected power system and the promotion of social and economic sustainable development. However, with the rapid development of China's water conservancy and hydropower industry in recent years, combined with the strong influence of human activities, the spatio-temporal evolution law of the basin hydrological process is more complex, which leads to the distortion and failure of traditional hydrological forecasting methods such as gated recurrent unit prediction, and the prediction accuracy is difficult to meet the actual engineering requirements. SUMMARY
[0003] The technical problem to be solved by the present application is to provide a hydrological forecasting intelligent method and system to solve the hydrological forecasting problems caused by complex characteristics such as nonlinearity, volatility and periodicity.
[0004] To solve the above technical problems, the present application provides the following technical solutions:
[0005] Firstly, the present application provides a hydrological forecasting intelligent method, comprising the following steps:
[0006] S1, collecting the flow of a hydrological forecasting section, and performing hourly period-by-period inspection on the flow according to a preset time period. If the flow of any time period is abnormal or missing, the abnormal or missing flow of the time period is corrected and the flow data is updated;
[0007] S2, dividing the flow into a plurality of component sequences with different frequency information, and performing normalization processing on the component sequences to obtain normalized component sequences;
[0008] S3, dividing the normalized component sequences into a training set and a test set according to a preset proportion;
[0009] S4, constructing a gated recurrent unit prediction model based on the training set, and obtaining an optimal prediction model and optimal parameters of the model by using an adaptive optimization algorithm;
[0010] S5, inputting the sample component sequences in step S3, and applying the optimal prediction model obtained in step S4 to obtain the prediction value of the component sequences;
[0011] S6, superimposing the prediction values of the component sequences to obtain the final prediction value.
[0012] Further, in the aforementioned step S1, the hourly inspection according to the preset time period is performed according to the following formula:
[0013] ,
[0014]
[0015] wherein, represents the measured flow of the time period ; represents the allowable error of the time period ; represents the total number of data; , respectively represent the adjustment coefficients.
[0016] Further, the aforementioned step S2 comprises the following sub-steps:
[0017] S2.1, using the variational mode decomposition method to divide the flow into component sequences with different frequency information:
[0018] ,
[0019] wherein, represents the component sequence;
[0020] S2.2, the component sequence in step S2.1 is normalized according to the following formula:
[0021] ,
[0022] wherein, , respectively represent the normalized data and the original data of the component sequence in the time period ; the normalized component sequence is obtained according to the following formula:
[0023] wherein, represents the normalized component sequence.
[0024] Further, in the aforementioned step S3, the normalized component sequence is divided into a training set and a test set according to the following formula:
[0025]
[0026]
[0027] in, , They represent the training set, respectively. The input sample set and the output sample set in the data; , They represent the test set respectively. The input sample set and output sample set are given in the figure. P is the number of samples in the training set, and M is the number of preset early influence factors.
[0028] Furthermore, the aforementioned step S4 includes the following sub-steps:
[0029] S4.1, Let the component sequence counter... Set the inner loop counter Randomly generated within the feasible region Each individual is as follows:
[0030]
[0031] in Indicates the first During the nth iteration Individual; Indicates the first During the nth iteration The first individual One variable value; Indicates the number of variables;
[0032] S4.2 For each individual, based on the model parameters Training set The corresponding gated recurrent unit prediction model is calculated, and then the corresponding fitness value is calculated using the following formula:
[0033]
[0034] in Indicates the first During the nth iteration Prediction model of gated cyclic units corresponding to each individual; This represents the function for calculating fitness values;
[0035] S4.3 Calculate the following formula: The globally optimal individual at the next iteration :
[0036] ;
[0037] S4.4 Update the positions of all individuals using the mutation exploration strategy according to the following formula:
[0038]
[0039]
[0040]
[0041] wherein, represents a random number uniformly distributed in the interval [0,1], ; represents the number of iterations; , respectively represent the first updated individual, intermediate individual in the first iteration; , respectively represent the upper limit, lower limit of the variable; represents a random number uniformly distributed in the interval [0,1]; S4.5, let the inner loop counter
[0042] ; and determine whether the number of iterations reaches the preset maximum number, if yes, take the obtained in the last iteration as the best model parameter of the first normalized component sequence, and the corresponding model is denoted as , otherwise return to execute step S4.2;
[0043] S4.6, let the component sequence counter , determine whether is less than or equal to , if yes, return to execute step S4.1, otherwise stop calculation and obtain the optimal prediction model of all normalized component sequences.
[0044] Further, in the step S6, the prediction values of all component sequences are superimposed to obtain the final prediction value according to the following formula:
[0045]
[0046] wherein, represents the final prediction value; represents the weight value of the first component sequence.
[0047] The application also proposes an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method when executing the computer program.
[0048] Finally, the application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the method of the application.
[0049] Compared with the prior art, the application has the following advantages and beneficial effects:
[0050] 1. The adaptive optimization algorithm constructed by the application utilizes different individuals to traverse the search space, which can effectively improve the convergence speed and global exploration performance, has the advantages of clear logic, simple structure, easy implementation, etc., can significantly improve the parameter optimization efficiency and result accuracy, and provides an effective method for model parameter optimization.
[0051] 2. The application decomposes the complex nonlinear hydrological sequence into a plurality of relatively stable component sequences, uses a gated recurrent unit as a basic prediction component, and superimposes the predictions of different component sequences, which can effectively reduce the difficulty of prediction modeling, integrate the advantages of multiple models to reduce the bias of a single model, improve the model generalization ability and performance, and obtain reasonable and feasible prediction results in different situations, thereby providing a new technology for high-precision hydrological prediction. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 The flowchart of the application.
[0053] Figure 2 The schematic diagram of the gated recurrent unit prediction model used by the application.
[0054] Figure 3 The schematic diagram of the prediction result 1 of the application and the artificial neural network ANN.
[0055] Figure 4 The schematic diagram of the prediction result 2 of the application and the artificial neural network ANN. DETAILED DESCRIPTION
[0056] In order to better understand the technical content of the application, specific embodiments are described below with reference to the accompanying drawings.
[0057] Aspects of the application are described in this application with reference to the accompanying drawings, which show many illustrative embodiments. The embodiments of the application are not limited to the drawings described. It should be understood that the application is implemented by any one of the above-mentioned concepts and embodiments, and the concepts and embodiments described in detail below, because the disclosed concepts and embodiments of the application are not limited to any implementation. In addition, some aspects of the application can be used alone or in any suitable combination with other aspects of the application.
[0058] As Figure 1As shown, a flow chart of an intelligent hydrological forecasting method includes the following steps:
[0059] S1, collect the flow of the hydrological forecasting section, and perform hourly period-by-period inspection according to the preset period according to the following formula:
[0060]
[0061]
[0062] wherein, represents the measured flow of the period ; represents the allowable error of the period ; represents the total number of data; , respectively represent the adjustment coefficients.
[0063] S2, the variation mode decomposition method is used to divide the flow into component sequences with different frequency information:
[0064]
[0065] wherein, represents the th component sequence;
[0066] The component sequence is normalized according to the following formula:
[0067]
[0068] wherein, , respectively represent the normalized data and the original data of the th component sequence in the period ; the normalized component sequence is obtained according to the following formula:
[0069]
[0070] wherein, represents the th normalized component sequence.
[0071] S3, the th normalized component sequence is divided into a training set and a test set according to the following formula:
[0072]
[0073]
[0074] wherein, , respectively represent input sample set, output sample set in training set ; , respectively represent input sample set, output sample set in testing set , P is the number of samples in the training set, and M is the preset early impact factor number.
[0075] S4, based on the training set, a gated recurrent unit prediction model is constructed, as shown in Figure 2 , an adaptive optimization algorithm is used to obtain the optimal prediction model and the optimal parameters of the model; specifically, the following sub-steps are included:
[0076] S4.1, let the component sequence counter , let the inner loop counter , randomly generate individuals in the feasible region as follows:
[0077]
[0078] wherein represents the th individual at the th iteration; represents the th variable value of the th individual at the th iteration; represents the number of variables;
[0079] S4.2, for each individual, the corresponding gated recurrent unit prediction model is calculated according to the model parameters , training set , and then the corresponding fitness value is calculated using the following formula:
[0080]
[0081] wherein represents the gated recurrent unit prediction model corresponding to the th individual at the th iteration; represents the fitness value calculation function;
[0082] S4.3, the global optimal individual at the th iteration is calculated as follows:
[0083] ;
[0084] S4.4, update the position of all individuals by using the mutation exploration strategy according to the following formula:
[0085]
[0086]
[0087]
[0088] wherein, represents a random number uniformly distributed in the interval [0, 1], ; represents the number of cycles; , respectively represent the first updated, intermediate individual at the th iteration; , respectively represent the upper limit and the lower limit of the variable; represents a random number uniformly distributed in the interval [0, 1];
[0089] S4.5, let the inner loop counter ; and determine whether the number of cycles reaches the preset maximum number, if yes, take the obtained by the last iteration as the best model parameter of the th normalized component sequence, and the corresponding model is denoted as , otherwise return to execute step S4.2;
[0090] S4.6, let the component sequence counter , determine whether is less than or equal to , if yes, return to execute step S4.1, otherwise stop calculation and obtain the optimal prediction model of all normalized component sequences.
[0091] S5, obtain the prediction value of the component sequence according to the following formula:
[0092] wherein, represents the prediction value of the th component sequence.
[0093] S6, superimpose the prediction values of all component sequences to obtain the final prediction value:
[0094]
[0095] wherein, represents the final prediction value; represents the weight value of the th component sequence.
[0096] Figure 3 、 Figure 4 The prediction results of the application and artificial neural network (ANN) under different influence factors are respectively.The prediction flow process of the application method is closer to the measured process, can better reflect the actual flow peak and overall fluctuation process, and the correlation coefficient is obviously better than that of the comparison method.It can be known that the method effectively integrates the advantages of different methods, can significantly improve the prediction accuracy while keeping the stability of the model.
[0097] The application further provides an electronic device, including a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to realize the steps of the method.
[0098] Finally, the application provides a computer readable storage medium, which stores a computer program, wherein the computer program is executed by the processor to realize the steps of the method.
[0099] The implementation of each module of the above system is one-to-one corresponding to the method flow steps in the embodiment, so it is not described here.
[0100] Although the application has been described as above with the preferred embodiments, it is not intended to limit the application. Those skilled in the art can make various modifications and improvements without departing from the spirit and scope of the application. Therefore, the protection scope of the application should be defined by the claims.
Claims
1. A smart method for hydrological forecasting, characterized in that, Includes the following steps: S1. Collect the flow rate at the hydrological forecast section, and verify the flow rate time period by time according to the preset time period. If the flow rate of any time period is abnormal or missing, correct the abnormal or missing flow rate of that time period and update the flow rate data; verify the preset time period by time according to the following formula: , , in, Indicates time period The measured flow rate; Indicates time period The allowable error; Indicates the total number of data; , These represent adjustment coefficients; S2, Divide the traffic into The process involves taking component sequences with different frequency information, normalizing these sequences, and obtaining normalized component sequences. Specifically, the process includes the following sub-steps: S2.1, The flow rate is divided into the following categories using the variational mode decomposition method: A component sequence with different frequency information: , in, Indicates the first A component sequence; S2.
2. Normalize the component sequences in step S2.1 using the following formula: , in, , They represent the first The component sequence in the time period Normalized data and original data; the normalized component sequence is obtained as follows: , in, Indicates the first A normalized component sequence; S3. Divide the normalized component sequences into training and test sets according to a preset ratio; S4. Based on the training set, construct a gated recurrent unit prediction model, and use an adaptive optimization algorithm to obtain the optimal prediction model and its optimal parameters; specifically including the following sub-steps: S4.1, Let the component sequence counter... Set the inner loop counter Randomly generated within the feasible region Each individual is as follows: , in Indicates the first During the nth iteration Individual; Indicates the first During the nth iteration The first individual One variable value; Indicates the number of variables; S4.2 For each individual, based on the model parameters Training set The corresponding gated recurrent unit prediction model is calculated, and then the corresponding fitness value is calculated using the following formula: , in Indicates the first During the nth iteration Prediction model of gated cyclic units corresponding to each individual; This represents the function for calculating fitness values; and They represent the training set, respectively. The input sample set and output sample set are given in the training set; P is the number of samples in the training set. S4.3 Calculate the following formula: The globally optimal individual at the next iteration : ; S4.4 Update the positions of all individuals using the mutation exploration strategy according to the following formula: , , , in, Represents a uniformly distributed random number in the interval [0,1]. ; Indicates the number of loop iterations; , They represent the first During the nth iteration One updated individual, intermediate individual; , These represent the upper and lower limits of the variable, respectively. express Uniformly distributed random numbers within an interval; S4.5, Set the inner loop counter It also checks if the number of iterations has reached the preset maximum; if so, it uses the result from the last iteration. As the first The optimal model parameters for each normalized component sequence are denoted as: Otherwise, return to step S4.2; S4.6, Let the component sequence counter... ,judge Is it less than or equal to? If yes, return to step S4.1; otherwise, stop the calculation and obtain the optimal prediction model for all normalized component sequences. S5. Using the sample component sequence from step S3 as input, apply the optimal prediction model obtained in step S4 to obtain the predicted value of the component sequence. S6. The predicted values of the component sequences are superimposed using the following formula to obtain the final predicted value: , in, This represents the final predicted value; Indicates the first The weight values of each component sequence. Indicates the first Predicted values for each component sequence.
2. The intelligent hydrological forecasting method according to claim 1, characterized in that, In step S3, the following formula is used to process the first... The normalized component sequences are divided into training sets. and test set : , , in, , They represent the training set, respectively. The input sample set and the output sample set in the data; , They represent the test set respectively. The input sample set and output sample set are given in the figure. P is the number of samples in the training set, and M is the number of preset early influence factors.
3. The intelligent hydrological forecasting method according to claim 2, characterized in that, In step S5, the predicted values of the component sequences are obtained according to the following formula; , in, Indicates the first Predicted values for each component sequence.
4. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 3.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.