Natural and actually measured annual runoff forecasting method, electronic equipment and storage medium

By using long and short-term memory network models combined with sunspot data, the problem of low prediction accuracy of runoff in the middle age of the prior art is solved, and higher prediction accuracy and stronger reliability are achieved.

CN119577442APending Publication Date: 2025-03-07CHINA WATER RESOURCES BEIFANG INVESTIGATION DESIGN & RES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411626054.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The prediction accuracy of natural and measured annual runoff in the prior art is not high, and the influence of factors such as solar activity is not fully considered.

Method used

The long-term and short-term memory network model is used, and the model is trained in combination with the natural annual flow, actual annual runoff and sunspot data in the historical data set to obtain the natural annual runoff prediction model, the actual annual runoff prediction model and the sunspot prediction model. Through the sunspot forecast value and runoff prediction model, the forecast values ​​of natural annual runoff and actual annual runoff are obtained.

Benefits of technology

The accuracy of annual runoff prediction was improved, the limitations of traditional methods only considering factors such as rainfall and evaporation were overcome, and the characteristics of solar activity were fully considered, and the relationship between natural annual runoff and sunspots was constructed, which significantly improved the reliability and efficiency of the prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577442A_ABST
    Figure CN119577442A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of hydrological forecasting, and provides a natural and actually-measured annual runoff forecasting method, electronic equipment and a storage medium, and the method comprises the steps: obtaining a historical data set of a to-be-measured section, the historical data set comprising natural annual runoff, actually-measured annual runoff and sunspot actually-measured data of a corresponding time period; training the long-short-term memory network model by adopting a historical data set to obtain a natural annual runoff prediction model, an actually measured annual runoff prediction model and a sunspot prediction model; obtaining a sunspot prediction value according to the sunspot prediction model; and according to the sunspot forecast value, the natural annual runoff forecast model and the actually measured annual runoff forecast model, obtaining a natural annual runoff forecast value and an actually measured annual runoff forecast value of the section to be measured. According to the method, the runoff prediction value is solved based on the prediction value of the sunspots by constructing the long-short-term memory network model of the runoff series and the sunspot series, so that the prediction precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of hydrological forecasting, and in particular relates to a natural and measured annual runoff forecasting method, an electronic device and a storage medium. Background Art

[0002] Medium- and long-term runoff forecasts are a prerequisite for flood and drought prevention, water resource scheduling and allocation, and are also the basis for large reservoir scheduling.

[0003] Among the related technologies, machine learning algorithms represented by artificial neural networks, particle swarm optimization algorithms and support vector machines are increasingly being studied and applied in medium- and long-term runoff forecasting. First, some studies predict future runoff by analyzing the trend of runoff time series. However, related studies often only focus on runoff itself and fail to fully consider the impact of other factors. Secondly, most studies predict medium- and long-term runoff based on the evolution of runoff, precipitation, and evaporation and time memory. However, medium- and long-term rainfall and evaporation also need to be predicted. Therefore, this type of method also has certain limitations, which makes the prediction accuracy of natural and measured annual runoff not high. Summary of the invention

[0004] In view of this, the present invention provides a natural and measured annual runoff forecasting method to solve the problem of low prediction accuracy of natural and measured annual runoff in the prior art.

[0005] The present invention provides a natural and measured annual runoff forecasting method, comprising: obtaining a historical data set of a section to be measured, the historical data set comprising natural annual runoff, measured annual runoff and measured sunspot data of a corresponding time period; using the historical data set to train a long short-term memory network model to obtain a natural annual runoff forecasting model, a measured annual runoff forecasting model and a sunspot forecasting model; obtaining a sunspot forecasting value according to the sunspot forecasting model; and obtaining a natural annual runoff forecasting value and a measured annual runoff forecasting value of the section to be measured according to the sunspot forecasting value, the natural annual runoff forecasting model and the measured annual runoff forecasting model.

[0006] In some embodiments, the historical data set is used to train the long short-term memory network model to obtain the natural annual runoff prediction model, the measured annual runoff prediction model and the sunspot prediction model, which specifically includes: constructing a corresponding long short-term memory network model according to the historical data set; configuring training options; according to the training options, using the training data to train the corresponding long short-term memory network model; using the test data to evaluate the performance of the corresponding long short-term memory network model that has completed the training, to obtain the natural annual runoff prediction model, the measured annual runoff prediction model and the sunspot prediction model.

[0007] In some implementations, obtaining a historical data set of the section to be measured specifically includes: selecting historical sequence data; and dividing the historical sequence data into a model calibration data set and a model verification data set.

[0008] In some embodiments, constructing a corresponding long short-term memory network model based on the historical data set specifically includes: constructing the corresponding long short-term memory network model based on a model calibration data set and a model verification data set.

[0009] In some embodiments, the natural annual runoff prediction model and the measured annual runoff prediction model are multi-input single-output models, and the sunspot prediction model is a single-input single-output model; wherein the multiple inputs of the natural annual runoff prediction model include the difference between the natural annual runoff and the measured sunspot data, and the single output is the natural annual runoff forecast value; the multiple inputs of the measured annual runoff prediction model include the difference between the measured annual runoff and the measured sunspot data, and the single output is the measured annual runoff forecast value; the single input of the sunspot prediction model is the measured sunspot data, and the single output is the sunspot forecast value.

[0010] In some embodiments, the natural annual runoff forecast value and the measured annual runoff forecast value of the section to be measured are obtained based on the sunspot forecast value, the natural annual runoff prediction model and the measured annual runoff prediction model, specifically including: constructing the optimal solution of the natural annual runoff prediction model and the optimal solution of the measured annual runoff prediction model for the section to be measured based on the sunspot forecast value; obtaining the natural annual runoff forecast value according to the optimal solution of the natural annual runoff prediction model; obtaining the measured annual runoff forecast value according to the optimal solution of the measured annual runoff prediction model.

[0011] In some embodiments, the optimal solution of the natural annual runoff prediction model and the optimal solution of the measured annual runoff prediction model of the section to be measured are constructed based on the sunspot forecast value, specifically including: for the measured annual runoff, constructing the optimal solution with the minimum error, the mathematical description is as follows: MIN Obj M,n+1 =R M,pr (t n+1 )-R M,l (t n+1 )|; Constraints: R M,pr (t n+1 )=F LSTM,M (SP pr (t n+1 ),D M (t n+1 )); R M,l (t n+1 )=SPpr (t n+1 )+D M (t n+1 );where R M,l is the measured annual runoff obtained according to the constraint conditions, R M,pr (t n+1 ) is the predicted value of the measured annual runoff, SP pr (t n+1 ) is the sunspot prediction value, D M (t n+1 ) is the difference between the measured annual runoff and the measured data of sunspots; for the natural annual runoff prediction, the optimal solution with the minimum error is constructed, and the mathematical description is as follows: MIN Obj N,n+1 =|R N,pr (t n+1 )-R N,l (t n+1 )|; Constraints: R N,pr (t n+1 )=F LSTM,N (SP pr (t n+1 ),D N (t n+1 )); R N,l (t n+1 )=SP pr (t n+1 )+D N (t n+1 );where R N,l is the natural annual runoff obtained according to the constraints, R N,pr (t n+1 ) is the natural annual runoff forecast value, SP pr (t n+1 ) is the sunspot prediction value, D N (t n+1 ) is the difference between the natural annual runoff and the measured sunspot data.

[0012] In some embodiments, a particle swarm optimization algorithm is used to obtain the natural annual runoff forecast value and the measured annual runoff forecast value.

[0013] In a second aspect, the present invention also provides an electronic device, comprising: at least one processor; a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: obtain a historical data set of a section to be measured, the historical data set comprising natural annual runoff, measured annual runoff and measured sunspot data for a corresponding period of time; use the historical data set to train a long short-term memory network model to obtain a natural annual runoff prediction model, a measured annual runoff prediction model and a sunspot prediction model; obtain a sunspot prediction value based on the sunspot prediction model; and obtain a natural annual runoff forecast value and a measured annual runoff forecast value of the section to be measured based on the sunspot prediction value, the natural annual runoff prediction model and the measured annual runoff prediction model.

[0014] In a third aspect, the present invention provides a storage medium storing a computer program, which, when executed by a processor, implements any one of the natural and measured annual runoff forecasting methods.

[0015] The beneficial effects of the present invention are:

[0016] 1. The present invention improves the prediction accuracy by constructing a long short-term memory network model of the runoff series and the sunspot series and solving the runoff prediction value based on the predicted value of the sunspot.

[0017] 2. The present invention proposes a natural and measured annual runoff forecasting method based on particle swarm optimization algorithm and long short-term memory network by effectively utilizing sunspot data. It not only overcomes the deficiency that the traditional medium- and long-term runoff forecasting method only considers factors such as rainfall and evaporation and cannot obtain accurate predictions of such factors, but also fully considers the characteristics of solar activity, constructs a new objective function, effectively constructs the relationship between sunspots and annual runoff, and solves the annual runoff forecasting problem to a certain extent. The invention is highly operable, has high practicality and scalability, provides a new idea for improving the accuracy of medium- and long-term runoff forecasting, and provides effective technical support for basin hydrological process simulation and forecasting and warning of extreme hydrological events.

[0018] 3. The present invention first constructs a single-input single-output long short-term memory network model based on the historical sunspot series. Secondly, based on the historical sunspot and annual runoff series, a multi-input single-output long short-term memory network model is constructed. Then, the sunspot forecast value at the next moment is used to construct a multi-input single-output long short-term memory network model and a linear equation as an optimization problem with constraints. Finally, the particle swarm optimization algorithm is used to solve the annual runoff forecast value at the next moment. Compared with the traditional annual runoff forecasting method, it has the advantages of high accuracy, strong reliability, and less input, which can greatly improve the efficiency of runoff forecasting, and has strong universality, and can be applied to flood control, water resource utilization and large reservoir scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the specific implementation of the present invention or the technical solution in the prior art, the following briefly introduces the drawings required for use in the specific implementation or the prior art description. Obviously, the drawings described below are some implementations of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A flow chart of a natural and measured annual runoff forecasting method according to an embodiment of the present invention;

[0021] Figure 2 A flow chart of a natural and measured annual runoff forecasting method according to another embodiment of the present invention;

[0022] Figure 3 The figure is a block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0024] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0025] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0026] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0027] In related technologies, the amount of medium- and long-term runoff is mainly affected by climate factors and human activities. Meteorological factors are mainly solar activity and atmospheric circulation. Therefore, establishing a medium- and long-term runoff forecasting method based on sunspots is a feasible and effective forecasting idea. However, there are few studies and applications of medium- and long-term runoff forecasting based on machine learning algorithms based on sunspot data.

[0028] Combine the following Figures 1 to 3 , describing an embodiment of the present invention.

[0029] like Figure 1 and Figure 2 As shown, according to an embodiment of the invention, a natural and measured annual runoff forecasting method is provided, comprising the following steps:

[0030] Step S101: Acquire a historical data set of the section to be measured, the historical data set including natural annual runoff, measured annual runoff and measured sunspot data of the corresponding period.

[0031] Step S103: Use historical data sets to train the long short-term memory network model to obtain a natural annual runoff prediction model, a measured annual runoff prediction model and a sunspot prediction model.

[0032] Step S105: obtaining a sunspot prediction value according to the sunspot prediction model.

[0033] Step S107: According to the sunspot forecast value, the natural annual runoff forecast model and the measured annual runoff forecast model, the natural annual runoff forecast value and the measured annual runoff forecast value of the section to be measured are obtained.

[0034] In this embodiment, the Long-Short Term Memory (LSTM) is a time recursive neural network. LSTM controls the flow of information by introducing three gating units: input gate, forget gate and output gate, and maintains a cell state internally to memorize long-term dependencies. These gating mechanisms enable the LSTM network to better capture long-term dependencies.

[0035] The mathematical expression of LSTM is expressed by program, which can include the following equation:

[0036] [\begin{align}f_t&=\sigma(Wf\cdot[h{t-1},x_t]+b_f)\i_t&=\sigma(Wi\cdot[h{t-1},x_t]+b_i)\\tilde{C}_t&=\tanh(WC\cd ot[h{t-1},x_t]+b_C)\C_t&=ft\cdotC{t-1}+i_t\cdot\tilde{C}_t\o_t&=\sigma(Wo\cdot[h{t-1},x_t]+b_o)\h_t&=o_t\cdot\ta nh(C_t)\end{align}].

[0037] In the natural and measured annual runoff forecasting method of this embodiment, for a specific section ψ, the natural annual runoff R of the section ψ is obtained. N (t1,...,t n ) and the measured annual runoff R M (t1,...,t n ), the measured data of sunspots in the same period SP M (t1,...,t n ), N is natural, M is measured, t is time, and n is quantity. Using long short-term memory network to carry out the next moment t of sunspot n+1 The predicted value of SP pr (t n+1 ), pr is the predicted value. Then, the natural annual runoff, the measured annual runoff and the measured sunspot data of the same period are used to calibrate a long short-term memory network model. At the next moment, the natural flow forecast value R at that moment is obtained based on the sunspot forecast value and the long short-term memory network model. N,pr (t n+1 ) and the predicted value of annual runoff R M,pr(t n+1 ). This method can not only construct the relationship between sunspots and annual runoff, but also predict the annual runoff at the next moment through the predicted value of sunspots, thus improving the prediction accuracy of annual runoff.

[0038] Further, based on step S103, the long short-term memory network model is trained using the historical data set to obtain the natural annual runoff prediction model, the measured annual runoff prediction model and the sunspot prediction model, which specifically includes the following steps:

[0039] Step S1031: Construct a corresponding long short-term memory network model based on the historical data set.

[0040] Step S1033: Configure training options.

[0041] Step S1035: According to the training options, the corresponding long short-term memory network model is trained using the training data.

[0042] Step S1037: using the test data to evaluate the performance of the corresponding long short-term memory network model that has completed training, and obtaining a natural annual runoff prediction model, a measured annual runoff prediction model and a sunspot prediction model.

[0043] In this embodiment, the corresponding long-short-term memory network model constructed according to the natural annual runoff of the historical data set is the natural annual runoff prediction model, the corresponding long-short-term memory network model constructed according to the measured annual runoff of the historical data set is the measured annual runoff prediction model, and the corresponding long-short-term memory network model of the corresponding time period constructed according to the measured sunspot data of the historical data set is the sunspot prediction model.

[0044] Among them, when building the corresponding long short-term memory network model, the layerGraph function is used to create a network graph, and then the network structure is defined by adding long short-term memory network layers, fully connected layers, etc.

[0045] In this embodiment, the training options are configured, including normalization of input data, selection of loss function and optimizer, etc. The training options can be set using the trainingOptions function. LSTM,SP (SP M (t1,...,t n )) , pass in the model, training data, and training options, and then use the test data to evaluate the performance of the trained LSTM network model. Pass the input data of the validation data set into the model, and use the trained LSTM network model to make predictions. The output results of the model prediction can be obtained through the predict function.

[0046] Further, based on step S101, a historical data set of the section to be measured is obtained, which specifically includes:

[0047] Step S1011: Select historical sequence data.

[0048] Step S1013: Divide the historical sequence data into a model calibration data set and a model verification data set.

[0049] In this embodiment, the longest possible historical time series data is selected and the historical time series data is organized into a long short-term memory network model calibration data set Ψ=[R N (t1,...,t m ),R M (t1,...,t m ),SP M (t1,...,t m )] and the validation dataset Φ=[R N (t m ,...,t n ),R M (t m ,...,t n ),SP M (t m ,...,t n )].

[0050] Furthermore, step S1031, constructing a corresponding long short-term memory network model according to the historical data set, specifically includes: constructing a corresponding long short-term memory network model according to the model calibration data set and the model verification data set.

[0051] In this embodiment, the sunspot, natural runoff (three survey data) and measured runoff data of the research section from 1956 to 2016 were collected, with a time step of 1 year. The first 70% from 1956 to 2006 was divided into the model calibration data set, and the last 30% was divided into the model verification data set.

[0052] Furthermore, the natural annual runoff prediction model and the measured annual runoff prediction model are multi-input single-output models, and the sunspot prediction model is a single-input single-output model; wherein, the multiple inputs of the natural annual runoff prediction model include the difference between the natural annual runoff and the measured sunspot data, and the single output is the natural annual runoff forecast value; the multiple inputs of the measured annual runoff prediction model include the difference between the measured annual runoff and the measured sunspot data, and the single output is the measured annual runoff forecast value; the single input of the sunspot prediction model is the measured sunspot data, and the single output is the sunspot forecast value.

[0053] In this embodiment, the LSTM network model includes a single-input single-output LSTM network model and a multi-input single-output LSTM network model. Taking the construction of a sunspot prediction model as an example, a single-input single-output LSTM network is created, a network graph is created using the layerGraph function, and then the network structure is defined by adding LSTM network layers, fully connected layers, etc.; the single input is SP M (t1,...,t n ), single output is SP M (t1,...,t n ).

[0054] Among them, a long short-term memory network model is calibrated using the natural annual runoff, measured annual runoff and measured sunspot data in the same period.

[0055] Create a multi-input and single-output LSTM network, use the layerGraph function to create a network graph, and then define the network structure by adding LSTM layers, fully connected layers, etc.

[0056] Among them, the multiple inputs of the long short-term memory network model of natural annual runoff include sunspot measured data SP M (t1,...,t n ) and D N (t1,...,t n )=R N (t1,...,t n )-SP M (t1,...,t n ), the single output is R N,pr (t1,...,t n ).

[0057] The multi-input of the long short-term memory network model of measured annual runoff includes the measured sunspot data SP M (t1,...,t n ) and D M (t1,...,t n )=R M (t1,...,t n )-SP M (t1,...,t n ), the single output is R M,pr (t1,...,t n ).

[0058] The subsequent steps are performed according to step S1031 to step S1037 to obtain two long short-term memory network models F LSTM,M (SP pr (t n+1 ),DM (t n+1 )) and F LSTM,N (SP pr (t n+1 ),D N (t n+1 )).

[0059] The work of the multi-input and single-output long short-term memory network model was realized by using the data sets of the natural annual runoff series and the measured natural runoff series.

[0060] Further, based on step S107, the natural annual runoff forecast value and the measured annual runoff forecast value of the section to be measured are obtained according to the sunspot forecast value, the natural annual runoff forecast model and the measured annual runoff forecast model, which specifically includes the following steps:

[0061] Step S1071: constructing the optimal solution of the natural annual runoff prediction model and the optimal solution of the measured annual runoff prediction model for the section to be measured based on the sunspot forecast value.

[0062] Step S1073: Obtain the natural annual runoff forecast value according to the optimal solution of the natural annual runoff prediction model.

[0063] Step S1075: Obtain the forecast value of the measured annual runoff according to the optimal solution of the measured annual runoff prediction model.

[0064] At the next moment, construct the sunspot prediction value SP pr (t n+1 ) and long short-term memory network models, improving the prediction quality.

[0065] Based on step S1071, the optimal solution of the natural annual runoff prediction model of the section to be measured and the optimal solution of the natural annual runoff prediction model are constructed based on the sunspot forecast value, which specifically includes the following steps:

[0066] For the measured annual runoff, the optimal solution to minimize the construction error is mathematically described as follows:

[0067] MIN Obj M,n+1 =|R M,pr (t n+1 )-R M,l (t n+1 )| (1)

[0068] Constraints:

[0069] R M,pr (t n+1 )=F LSTM,M (SP pr (t n+1 ),D M(t n+1 )) (2)

[0070] R M,l (t n+1 )=SP pr (t n+1 )+D M (t n+1 ) (3)

[0071] In the formula, R M,l is the measured annual runoff obtained according to the constraint conditions, R M,pr (t n+1 ) is the predicted value of the measured annual runoff, SP pr (t n+1 ) is the sunspot prediction value, D M (t n+1 ) is the difference between the measured annual runoff and the measured sunspot data.

[0072] For natural annual runoff prediction, the optimal solution to minimize the construction error is mathematically described as follows:

[0073] MIN Obj N,n+1 =|R N,pr (t n+1 )-R N,l (t n+1 )| (4)

[0074] Constraints:

[0075] R N,pr (t n+1 )=F LSTM,N (SP pr (t n+1 ),D N (t n+1 )) (5)

[0076] R N,l (t n+1 )=SP pr (t n+1 )+D N (t n+1 ) (6)

[0077] In the formula, R N,l is the natural annual runoff obtained according to the constraints, R N,pr (t n+1 ) is the natural annual runoff forecast value, SP pr (t n+1 ) is the sunspot prediction value, D N (t n+1 ) is the difference between the natural annual runoff and the measured sunspot data.

[0078] R of two long short-term memory network models for annual runoff in the calibration and testing stages 2 is greater than 0.80, which is a good performance, which means that solar activity has a significant impact on runoff generation. Overall, the LSTM network model of natural runoff is a little better than the LSTM network model of measured runoff. For example, during the calibration stage, the mean absolute error increased from 7.6% for natural runoff to 9.8% for measured runoff.

[0079] Furthermore, the particle swarm optimization algorithm is used to obtain the natural annual runoff forecast value and the measured annual runoff forecast value.

[0080] The particle swarm optimization algorithm is used to obtain the natural annual runoff forecast value R at that moment. N,pr (t n+1 ) and the predicted value of annual runoff R M,pr (t n+1 ).

[0081] Particle swarm optimization is a group-based intelligence algorithm. It imitates the social behavior of a group of birds looking for food sources or a group of fish protecting themselves from predators. The movement of each particle is coordinated by a velocity with magnitude and direction. At any moment, the position of each particle is affected by its best position and the position of the best particle in the problem space. The performance of the particle is measured by the fitness value.

[0082] The particle swarm optimization algorithm formula is:

[0083]

[0084] In the formula, is particle a in the kth cycle.

[0085] is particle a in the k+1th cycle.

[0086] ω is the inertial weight;

[0087] c b is the acceleration coefficient, b=1,2.

[0088] rand b is a random number in [0,1].

[0089] is the current position of particle a in the kth cycle.

[0090] is the position of particle a in the k+1th cycle.

[0091] pbest a is the optimal position of particle a.

[0092] gbest is the position of the best particle in a sample.

[0093] S53, the calculation steps of particle swarm optimization algorithm are as follows:

[0094] a) Initialize the population, including the upper and lower limits of the search space and two learning factors c b and c b , the maximum number of iterations T of the algorithm, the upper and lower limits of each particle's velocity. Randomly initialize the position and velocity of each particle in the population.

[0095] b) Calculate the fitness value of each particle according to the fitness function, save the optimal position of each particle, save the individual best fitness value and the best position of the group so far.

[0096] c) Update the speed and position according to the speed and position update formula.

[0097] d) Calculate the fitness value of each particle after the update, and compare the best fitness value of each particle with the fitness value at its historical optimal position. If it is better, its current position is used as the optimal position of the particle.

[0098] e) For each particle, compare the fitness value corresponding to its optimal position with the optimal fitness value of the population. If they are optimal, update the optimal position and the optimal fitness value of the population.

[0099] f) Determine whether the searched result meets the stopping condition, that is, reaches the maximum number of iterations or meets the accuracy requirement. If the stopping condition is met, output the optimal value, otherwise go to step c) and continue running until the condition is met.

[0100] Of course, other algorithms can also be used to calculate the natural annual runoff forecast value and the measured annual runoff forecast value, which will not be elaborated here.

[0101] According to the "Specifications for Hydrological Information Forecasting (GB / T 22482-2008)", the absolute error percentage, 20% error value as the allowable error and pass rate are used to evaluate the accuracy of medium- and long-term runoff forecasts.

[0102] The prediction qualification rate of natural runoff, that is, the proportion of absolute errors less than 20%, is greater than 85%, meeting the Class A forecast standard of "Hydrological Information Forecast Specification GBT 22482-2008".

[0103] like Figure 3As shown, the present invention also provides an electronic device, comprising: at least one processor 110; a memory 120 communicatively connected to the at least one processor; wherein the memory 120 stores instructions executable by the at least one processor 110, and the instructions are executed by the at least one processor 110 so that the at least one processor 110 can implement the following steps:

[0104] Step S101: Acquire a historical data set of the section to be measured, the historical data set including natural annual runoff, measured annual runoff and measured sunspot data of the corresponding period.

[0105] Step S103: Use historical data sets to train the long short-term memory network model to obtain a natural annual runoff prediction model, a measured annual runoff prediction model and a sunspot prediction model.

[0106] Step S105: obtaining a sunspot prediction value according to the sunspot prediction model.

[0107] Step S107: According to the sunspot forecast value, the natural annual runoff forecast model and the measured annual runoff forecast model, the natural annual runoff forecast value and the measured annual runoff forecast value of the section to be measured are obtained.

[0108] Electronic device is intended to refer to various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers.

[0109] Electronic devices may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the invention described and / or claimed herein.

[0110] The present invention also provides a storage medium storing a computer program. When the computer program is executed by a processor, the steps of implementing any one of the natural and measured annual runoff forecasting methods are as follows:

[0111] Step S101: Acquire a historical data set of the section to be measured, the historical data set including natural annual runoff, measured annual runoff and measured sunspot data of the corresponding period.

[0112] Step S103: Use historical data sets to train the long short-term memory network model to obtain a natural annual runoff prediction model, a measured annual runoff prediction model and a sunspot prediction model.

[0113] Step S105: obtaining a sunspot prediction value according to the sunspot prediction model.

[0114] Step S107: According to the sunspot forecast value, the natural annual runoff forecast model and the measured annual runoff forecast model, the natural annual runoff forecast value and the measured annual runoff forecast value of the section to be measured are obtained.

[0115] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0116] In the context of the present invention, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or apparatus. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing.

[0117] Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of machine readable storage media may include electrical connections based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0118] Obviously, the above embodiments are merely examples for clear description and are not limitations of the implementation methods.

[0119] For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. However, the obvious changes or modifications derived from this are still within the protection scope of the invention.

Claims

1. A natural and measured annual runoff forecasting method, characterized in that: include: Acquire a historical data set of the section to be measured, wherein the historical data set includes natural annual runoff, measured annual runoff, and measured sunspot data of a corresponding period; The historical data set is used to train the long short-term memory network model to obtain a natural annual runoff prediction model, a measured annual runoff prediction model and a sunspot prediction model; Obtaining a sunspot forecast value according to the sunspot prediction model; According to the sunspot forecast value, the natural annual runoff forecast model and the measured annual runoff forecast model, the natural annual runoff forecast value and the measured annual runoff forecast value of the section to be measured are obtained.

2. The natural and measured annual runoff forecasting method according to claim 1, characterized in that: The long short-term memory network model is trained using the historical data set to obtain a natural annual runoff prediction model, a measured annual runoff prediction model and a sunspot prediction model, which specifically include: Constructing a corresponding long short-term memory network model according to the historical data set; Configure training options; According to the training options, the corresponding long short-term memory network model is trained using the training data; The performance of the corresponding long short-term memory network model that has completed training is evaluated using test data to obtain the natural annual runoff prediction model, the measured annual runoff prediction model and the sunspot prediction model.

3. The natural and measured annual runoff forecasting method according to claim 2, characterized in that: Obtain the historical data set of the section to be measured, including: Select historical sequence data; The historical sequence data is divided into a model calibration data set and a model verification data set.

4. The natural and measured annual runoff forecasting method according to claim 3 is characterized in that: Constructing a corresponding long short-term memory network model according to the historical data set specifically includes: constructing the corresponding long short-term memory network model according to a model calibration data set and a model verification data set.

5. The natural and measured annual runoff forecasting method according to any one of claims 1 to 4, characterized in that: The natural annual runoff prediction model and the measured annual runoff prediction model are multi-input single-output models, and the sunspot prediction model is a single-input single-output model; wherein, the multiple inputs of the natural annual runoff prediction model include the difference between the natural annual runoff and the measured sunspot data, and the single output is the natural annual runoff forecast value; the multiple inputs of the measured annual runoff prediction model include the difference between the measured annual runoff and the measured sunspot data, and the single output is the measured annual runoff forecast value; the single input of the sunspot prediction model is the measured sunspot data, and the single output is the sunspot forecast value.

6. The natural and measured annual runoff forecasting method according to claim 5, characterized in that: According to the sunspot forecast value, the natural annual runoff forecast model and the measured annual runoff forecast model, the natural annual runoff forecast value and the measured annual runoff forecast value of the section to be measured are obtained, specifically including: Constructing the optimal solution of the natural annual runoff prediction model and the optimal solution of the measured annual runoff prediction model for the section to be measured based on the sunspot forecast value; Obtaining the natural annual runoff forecast value according to the optimal solution of the optimal solution of the natural annual runoff prediction model; The predicted value of the measured annual runoff is obtained according to the optimal solution of the predicted model of the measured annual runoff.

7. The natural and measured annual runoff forecasting method according to claim 6, characterized in that: Constructing the optimal solution of the natural annual runoff prediction model and the optimal solution of the measured annual runoff prediction model of the section to be measured based on the sunspot forecast value specifically includes: For the measured annual runoff, the optimal solution to minimize the construction error is mathematically described as follows: MIN Obj M,n+1 =|R M,pr (t n+1 )-R M,l (t n+1 )| Constraints: R M,pr (t n+1 )=F LSTM,M (SP pr (t n+1 ),D M (t n+1 )) R M,l (t n+1 )=SP pr (t n+1 )+D M (t n+1 ) In the formula, R M,l is the measured annual runoff obtained according to the constraint conditions, R M,pr (t n+1 ) is the predicted value of the measured annual runoff, SP pr (t n+1 ) is the sunspot prediction value, D M (t n+1 ) is the difference between the measured annual runoff and the measured data of sunspots; For natural annual runoff prediction, the optimal solution to minimize the construction error is mathematically described as follows: MIN Obj N,n+1 =|R N,pr (t n+1 )-R N,l (t n+1 )| Constraints: R N,pr (t n+1 )=F LSTM,N (SP pr (t n+1 ),D N (t n+1 )) R N,l (t n+1 )=SP pr (t n+1 )+D N (t n+1 ) In the formula, R N,l is the natural annual runoff obtained according to the constraints, R N,pr (t n+1 ) is the natural annual runoff forecast value, SP pr (t n+1 ) is the sunspot prediction value, D N (t n+1 ) is the difference between the natural annual runoff and the measured sunspot data.

8. The natural and measured annual runoff forecasting method according to claim 7, characterized in that: The natural annual runoff forecast value and the measured annual runoff forecast value are obtained by using a particle swarm optimization algorithm.

9. An electronic device, characterized in that: include: at least one processor (110); a memory (120) communicatively coupled to the at least one processor (110); The memory (120) stores instructions executable by the at least one processor (110), and the instructions are executed by the at least one processor (110) to enable the at least one processor (110) to: Acquire a historical data set of the section to be measured, wherein the historical sequence data includes natural annual runoff, measured annual runoff, and measured sunspot data of a corresponding period; Using the historical data set, the long short-term memory network model is trained to obtain a natural annual runoff prediction model, a measured annual runoff prediction model and a sunspot prediction model; Obtaining a sunspot forecast value through the sunspot prediction model; Based on the sunspot forecast value, the natural annual runoff prediction model and the measured annual runoff prediction model, the natural annual runoff forecast value and the measured annual runoff forecast value of the section to be measured are obtained.

10. A storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the natural and measured annual runoff forecasting method as described in any one of claims 1 to 8 is implemented.