Runoff prediction based on Pangu model and its model training method
By connecting the runoff prediction sub-model and the Pangu-Weather meteorological forecast model in series, the problem of inaccurate runoff prediction under long forecast periods and medium and high flow conditions is solved, achieving higher prediction accuracy and robustness.
Patent Information
- Application Number
- CN202510172629.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-02-17
AI Technical Summary
Existing data-driven runoff prediction models lack accuracy under long-term forecast conditions and are inaccurate under medium and high flow conditions.
A runoff prediction method based on the Pangu model is adopted. By connecting multiple runoff prediction sub-models in series and combining them with the Pangu-Weather meteorological prediction model, future meteorological data is used to predict runoff, reducing dependence on hydrological and physical extremes.
The accuracy and robustness of runoff forecasts are improved, especially in long forecast periods and medium to high flow conditions.
Smart Images

Figure CN120105888B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of runoff prediction, and more specifically, relates to a runoff prediction method based on a Pangu model and a model training method thereof. Background Art
[0002] To date, experts and scholars at home and abroad have conducted extensive research on short-term runoff prediction. In order to solve these problems, researchers have developed a variety of data-driven hydrological prediction models that can directly explore the relationship between input variables and output variables from a data perspective. Compared with physics-based models, these models have excellent learning efficiency, can be quickly applied to actual scenarios, and still show good adaptability even in watersheds with insufficient spatial information or short time records. Data-driven hydrological models are usually mapping relationships between multiple input features and output targets. For time series prediction, data needs to be reconstructed to adapt to standard linear and nonlinear machine learning algorithms.
[0003] However, using data-driven models alone presents a number of challenges. While they excel at capturing relationships in historical data, their accuracy typically declines as the forecast horizon (the time between the time a forecast is issued and the predicted event) increases. This limitation arises from these models' overreliance on past runoff and meteorological data, while neglecting future weather conditions. Summary of the Invention
[0004] In response to the above defects or improvement needs of the existing technology, the present application provides a runoff prediction based on the Pangu model and a model training method thereof, which aims to solve the technical problem of insufficient prediction accuracy of the existing data-driven runoff prediction model under long-forecast period conditions.
[0005] To achieve the above objectives, in a first aspect, the present application provides a runoff prediction model training method based on the Pangu model, comprising:
[0006] The runoff data time series and meteorological data time series are used as input, and the runoff data at the next moment is used as output to construct a runoff prediction sub-model;
[0007] Connect multiple runoff prediction sub-models in series, add the output of the previous runoff prediction sub-model to the input of the subsequent runoff prediction sub-model, and add the predicted meteorological data output by the Pangu model to the input of the runoff prediction sub-model. The last runoff prediction sub-model outputs the predicted runoff data for the forecast period.
[0008] The error between the predicted runoff data and the actual runoff data is used as a loss value to train multiple runoff prediction sub-models.
[0009] Preferably, the lengths of the input data time series of the multiple runoff prediction sub-models are the same.
[0010] Preferably, the Pangu model predicts a predicted meteorological data time series based on a historical meteorological data time series, and the length of the predicted meteorological data time series is equal to the forecast period.
[0011] Preferably, the number of the runoff prediction sub-models is equal to the forecast period.
[0012] Preferably, the runoff prediction sub-model is constructed based on LSTM or GRU.
[0013] Preferably, the Pangu model is specifically a Pangu-Weather model.
[0014] Preferably, the runoff prediction sub-model is specifically:
[0015] The first runoff prediction sub-model in the cascade structure is as follows:
[0016]
[0017] The non-first runoff prediction sub-model in the series structure is as follows:
[0018]
[0019] in, represents the runoff prediction sub-model function, represents the predicted runoff data, Represents forecast weather data, Represents historical meteorological data, Represents historical runoff data; the subscript represents the time, The length of the time series of input data for the runoff prediction sub-model, is the forecast period, and , Indicates from arrive Every moment of Indicates from 1 to Every moment of Indicates from arrive every moment.
[0020] Preferably, the Pangu model is specifically:
[0021]
[0022] in, Represents the Pangu model function, Represents forecast weather data, Represents historical meteorological data; the subscript represents the time, The length of the time series of input data for the runoff prediction sub-model, is the forecast period, and , Indicates from arrive Every moment of express arrive every moment.
[0023] In a second aspect, the present application provides a runoff prediction method based on the Pangu model, comprising:
[0024] Inputting a time series of historical runoff data, a time series of historical meteorological data, and a forecast period into a runoff prediction model, the runoff prediction model outputting predicted runoff data for the forecast period;
[0025] The runoff prediction model is trained by any one of the methods in the first aspect.
[0026] In a third aspect, the present application provides an electronic device comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory. When the programs stored in the memory are executed, the processor is used to execute any one of the methods in the first aspect or any one of the methods in the second aspect.
[0027] In general, the above technical solutions conceived by this application have the following beneficial effects compared with the existing technologies:
[0028] (1) This application uses a data-driven approach to predict runoff, reducing reliance on the hydrophysical extremes of the predicted basin. Even in basins where the physical causes are not yet clear, runoff prediction can be performed, effectively expanding the scope of application of the runoff prediction model of this application.
[0029] (2) The prediction accuracy of traditional time series-based runoff prediction models will drop significantly when faced with long-forecast runoff prediction. In this application, multiple runoff prediction models are connected in series, the output of the previous runoff prediction sub-model is added to the input of the subsequent runoff prediction sub-model, and the climate prediction of the Pangu model is incorporated into the runoff prediction process, thereby overcoming the problem of inaccurate runoff prediction under long-forecast conditions by traditional runoff prediction models.
[0030] (3) In daily runoff forecasting, traditional runoff prediction models demonstrate high accuracy for low-flow scenarios. However, their accuracy decreases significantly for medium- and high-flow scenarios, as these scenarios are often accompanied by dramatic changes in meteorological conditions. Because the model used in this application takes into account future meteorological forecasts, it overcomes the problem of inaccurate runoff predictions in traditional runoff prediction models for medium- and high-flow scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 This is a flow chart of the runoff prediction model training method provided in an embodiment of the present application.
[0032] Figure 2 It is a structural diagram of the runoff prediction model provided in the embodiment of the present application.
[0033] Figure 3 This is a diagram of the runoff change process in a certain river basin provided in an embodiment of the present application.
[0034] Figure 4 It is a forecast evaluation index diagram corresponding to different forecast periods provided in the embodiment of the present application.
[0035] Figure 5 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0037] The terms "first" and "second" in this specification and claims are used to distinguish different objects rather than to describe a specific order of objects. For example, "first response message" and "second response message" are used to distinguish different response messages rather than to describe a specific order of response messages.
[0038] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0039] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more, for example, multiple processing units means two or more processing units, etc.; multiple elements means two or more elements, etc.
[0040] First, the technical terms involved in the embodiments of this application are introduced.
[0041] LSTM (Long Short-Term Memory) is a special recurrent neural network (RNN) designed to solve the gradient vanishing and gradient exploding problems encountered by standard RNNs when processing long sequence data.
[0042] GRU (Gated Recurrent Unit) is an improved recurrent neural network structure proposed by Cho et al. in 2014.
[0043] Pangu Model, a series of large-scale pre-trained language models, including Pangu-Weather, a high-precision weather forecast model based on artificial intelligence.
[0044] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.
[0045] Example 1:
[0046] This embodiment discloses a runoff prediction model training method based on the Pangu model, such as Figure 1 As shown, the specific steps include:
[0047] Step 1: Prepare the dataset:
[0048] Collect measured runoff data and corresponding measured meteorological data in the study basin.
[0049] Step 2: Divide the dataset into training set and test set and normalize them:
[0050] The measured runoff data and measured meteorological data were divided into training set and test set in a ratio of 9:1 and normalized respectively.
[0051] Step 3: Build a runoff prediction model and set parameters:
[0052] The structural framework of the runoff prediction model in this embodiment is as follows Figure 2 As shown, it includes a Pangu-Weather model for climate prediction and multiple serial runoff prediction sub-models.
[0053] This runoff prediction sub-model is built based on LSTM or GRU, with parameters such as the number of network layers, the number of neurons per layer, and input and output sequences. It takes the time series of runoff data and meteorological data as input, and outputs the predicted runoff data for the next moment.
[0054] Multiple runoff prediction submodels are connected in series. The output of the preceding runoff prediction submodel is added to the input of the subsequent runoff prediction submodel. The predicted meteorological data output by the Pangu-Weather model is also added to the input of the runoff prediction submodel. The final runoff prediction submodel outputs the predicted runoff data for the forecast period. The multiple runoff prediction submodels are not independent of each other. In the series structure, the output of the preceding runoff prediction submodel is used as input by all subsequent runoff prediction submodels.
[0055] Pangu-Weather is an AI-driven weather forecast model that uses a three-dimensional Earth-specific transformer to process meteorological data, integrating spatial and temporal information with unprecedented accuracy. By mitigating cumulative forecast errors through a layered temporal aggregation strategy, this weather model surpasses traditional numerical weather forecast systems in speed and accuracy. Utilizing this AI-driven weather forecast model in runoff prediction models mitigates uncertainty about future conditions, thereby enhancing the robustness and reliability of runoff forecasts. The Pangu-Weather model generates forecasts based on observed meteorological data and automatically feeds these forecasts into various runoff prediction sub-models.
[0056] In this embodiment, the meteorological data are obtained from 77 sampling points evenly distributed in the study basin, and the air temperature at a height of 2 meters and the specific humidity at the 50 hPa and 100 hPa altitude layers are taken as the sampling points.
[0057] In this embodiment, the Panu-Weather weather forecast model is defined as:
[0058]
[0059] Indicates based on Historical meteorological data at each moment can be used to predict the future Forecast weather data at each moment. represents the Pangu-Weather model function, Indicates the 1st to Historical meteorological data at a certain moment, Indicates the A moment in the future Forecast weather data for the moment.
[0060] In this embodiment, the first runoff prediction sub-model is defined as:
[0061]
[0062] Indicates based on The historical runoff data and historical meteorological data at the moment of forecast Runoff data at the moment. represents the runoff prediction sub-model function, The predicted The predicted runoff data at time Indicates from 1 to Historical weather data at all times, Indicates from 1 to Historical runoff data at the moment; The length of the input data time series for the runoff prediction submodel.
[0063] In this embodiment, the second runoff prediction sub-model is specifically:
[0064]
[0065] Indicates the period from the second moment to the Total time The runoff data and meteorological data at the moment are used to predict the Runoff data at the moment Among them, the meteorological data includes the second moment to the Historical weather data at the moment Hedi Forecast weather data for the moment The runoff data includes the period from the 2nd moment to the 3rd moment. Historical runoff data at time Hedi Predicted runoff data at time .
[0066] In this embodiment, the third runoff prediction sub-model is specifically:
[0067]
[0068] Indicates the period from the 3rd moment to the Total time The runoff data and meteorological data at the moment are used to predict the Runoff data at the moment Among them, the meteorological data includes the 3rd moment to the Historical weather data at the moment Hedi , Forecast weather data for the moment The runoff data includes the period from the 3rd moment to the Historical runoff data at time Hedi , Predicted runoff data at time .
[0069] From the second and third runoff prediction sub-models, it can be concluded that in the series structure, the subsequent runoff prediction sub-models of the first runoff prediction sub-model should be defined as:
[0070]
[0071] in, represents the predicted runoff data, Represents forecast weather data, Represents historical meteorological data, Represents historical runoff data; the subscript represents the time, The length of the time series of input data for the runoff prediction sub-model, is the forecast period, and , Indicates from arrive Every moment of Indicates from 1 to Every moment of Indicates from arrive every moment.
[0072] In the runoff prediction model of this embodiment, the focus is first on daily runoff prediction, and then gradually expanded to multi-day prediction.
[0073] Taking the forecast period of 3 days and the time step of 5 days as an example, the first runoff prediction sub-model uses the historical runoff data and historical meteorological data of the past 5 days to predict the runoff data of the 6th day.
[0074] The second runoff prediction sub-model uses the historical runoff data and historical meteorological data of the past four days, combined with the predicted runoff data of the sixth day and the predicted meteorological data of the sixth day predicted by the Pangu-Weather model, to predict the runoff on the seventh day.
[0075] The third runoff prediction sub-model uses the historical runoff data and historical meteorological data of the past three days, combined with the predicted runoff data on the 6th and 7th days, and the predicted meteorological data on the 6th and 7th days predicted by the Pangu-Weather model to predict the runoff data for the 8th day.
[0076] Step 4: Train the model:
[0077] The training data from the training set obtained in step 2 was fed into the model for training. The Adam optimizer was used for optimization, with a learning rate of 0.001. During training, mean squared error was used as the loss function, and an early stopping mechanism was introduced: if the change in the loss function was less than a set threshold over 10 consecutive iterations, training was stopped early to prevent overfitting.
[0078] Step 5: Test the model and analyze the results:
[0079] The test data in the test set obtained in step 2 is input into the trained model for prediction. After obtaining the predicted value, the predicted value is compared with the measured value, and the prediction effect of the model is evaluated by indicators such as root mean square error and mean absolute error.
[0080] Example 2:
[0081] In order to more clearly and intuitively express the technical advantages of the runoff prediction model of the present application, a runoff prediction model based on the Pangu model of the present application is described in detail below in conjunction with the accompanying drawings and Example 2.
[0082] Example 2 uses data from a river basin in a certain region of my country. The runoff change process of a river basin is as follows: Figure 3 As shown,
[0083] Step 1: Data Collection
[0084] Daily runoff data from a specific watershed from April 16, 2015, to May 23, 2023, was selected as a sample. Based on research needs, the sample data was divided into a rate-based period and a validation period at a ratio of 9:1. The rate-based period, from April 16, 2015, to August 7, 2022, was used for model training, while the validation period, from August 8, 2022, to May 23, 2023, was used for model testing.
[0085] Meteorological data comes from the Climate Data Store platform and includes various measured data such as temperature, wind speed, air pressure, and humidity. In this study, specific humidity and surface temperature were selected as representative meteorological variables for the input model.
[0086] Step 2: Model building and training
[0087] The runoff prediction model for this application is set up as follows:
[0088] In this application's runoff prediction model, a 2023 version of the Pangu-Weather model is used. Based on experience, the runoff prediction sub-model uses a two-layer LSTM or GRU to simulate runoff relationships. The first layer contains 30 neurons, and the second layer contains 10 neurons. At each time step, the input layer contains two features: historical runoff information and historical meteorological information. The output layer is the predicted runoff value at the target time.
[0089] In order to compare the performance of the traditional runoff prediction model and the runoff prediction model of this application, the traditional runoff prediction model is constructed based on LSTM or GRU, and its runoff prediction sub-model of this application is also constructed based on LSTM or GRU, and the model parameters are exactly the same, including the number of network layers, the number of neurons in each layer, input and output sequences, etc.
[0090] The Adam optimizer was used for optimization, with a learning rate of 0.001. To prevent overfitting, the mean squared error (MSE) was used as the loss function during training, and an early stopping mechanism was introduced: if the change in the loss function over 10 consecutive iterations was less than a set threshold, training was stopped early.
[0091] Different forecast periods (2 days, 3 days, 4 days, and 5 days) were tested, and the time step was fixed at 7. The results of different indicators (Nash efficiency coefficient (NSE), Pearson correlation coefficient (R), mean absolute error (MAE), and root mean square error (RMSE)) were obtained as follows: Figure 4 shown.
[0092] Table 1 shows the Nash efficiency coefficient (NSE) for different forecast periods with a time step of 7:
[0093] Table 1
[0094]
[0095] Table 2 Pearson correlation coefficient (R) for different forecast periods with a time step of 7:
[0096] Table 2
[0097]
[0098] Table 3. Mean absolute error (MAE) for different forecast periods with a time step of 7:
[0099] Table 3
[0100]
[0101] Table 4 Root mean square error (RMSE) for different forecast periods with a time step of 7:
[0102] Table 4
[0103]
[0104] Step 3: Result Analysis
[0105] The experimental results are summarized in Tables 1 to 4. From the analysis results, it can be seen that both the traditional LSTM model and the GRU model, as well as the improved model of this application, have high prediction accuracy under the condition of a shorter forecast period (for example, a forecast period of 2 days), and the differences between the four models are small.
[0106] However, as the forecast period gradually increases, the prediction accuracy of both the traditional model and the improved model shows a certain degree of decline. However, the improved LSTM-Pangu model and GRU-Pangu model of this application show more significant advantages over the traditional model under the conditions of a longer forecast period (such as a forecast period of 5 days). For example, when the forecast period is 5 days, the NSE of the LSTM model, LSTM-Pangu model, GRU model and GRU-Pangu model are 0.6909, 0.7587, 0.6836 and 0.7642 respectively. Compared with the traditional model, the NSE of the LSTM-Pangu model is improved by about 8.1%, and the NSE of the GRU-Pangu model is improved by about 11.7%. This shows that in the long forecast period scenario, the improved model has higher robustness and accuracy for runoff prediction.
[0107] Example 3:
[0108] Input the historical runoff data time series, historical meteorological data time series and forecast period of a certain river basin into the LSTM-Pangu or GRU-Pangu runoff prediction model constructed in Example 2, and the runoff prediction model outputs the predicted runoff data for the forecast period;
[0109] Based on the method in the above embodiment, the embodiment of the present application provides an electronic device, such as Figure 5 As shown, the electronic device may include: a processor, a communications interface, a memory, and a communication bus, wherein the processor, the communications interface, and the memory communicate with each other via the communication bus. The processor may call logic instructions in the memory to execute the method of the above embodiment.
[0110] In addition, the logical instructions in the above-mentioned memory can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the existing technology, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application.
[0111] Based on the method in the above embodiment, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.
[0112] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.
[0113] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.
[0114] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium can be located in an ASIC.
[0115] The above embodiments can be implemented in whole or in part using software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions. When loaded and executed on a computer, the computer program instructions fully or partially produce the processes or functions described in the embodiments of this application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state drive (SSD)).
[0116] It will be understood that the various numerical numbers involved in the embodiments of the present application are merely distinctions for the convenience of description and are not intended to limit the scope of the embodiments of the present application.
[0117] It is easy for those skilled in the art to understand that the above is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A runoff prediction model training method based on the Pangu model, characterized in that: include: The runoff data time series and meteorological data time series are used as input, and the runoff data at the next moment is used as output to construct a runoff prediction sub-model; the runoff prediction sub-model is constructed based on LSTM or GRU; the runoff prediction sub-model is specifically: The first runoff prediction sub-model in the cascade structure is as follows: The non-first runoff prediction sub-model in the series structure is as follows: in, represents the runoff prediction sub-model function, represents the predicted runoff data, Represents forecast weather data, Represents historical meteorological data, Represents historical runoff data; the subscript represents the time, The length of the time series of input data for the runoff prediction sub-model, is the forecast period, and , Indicates from arrive Every moment of Indicates from 1 to Every moment of Indicates from arrive every moment; Multiple runoff prediction sub-models are connected in series, the output of the preceding runoff prediction sub-model is added to the input of the succeeding runoff prediction sub-model, and the predicted meteorological data output by the Pangu model is added to the input of the runoff prediction sub-model, and the last runoff prediction sub-model outputs the predicted runoff data for the forecast period; the Pangu model is specifically: in, Represents the Pangu model function, Represents forecast weather data, Represents historical meteorological data; the subscript represents the time, The length of the time series of input data for the runoff prediction sub-model, is the forecast period, and , Indicates from arrive Every moment of express arrive every moment; The error between the predicted runoff data and the actual runoff data is used as a loss value to train multiple runoff prediction sub-models.
2. The runoff prediction model training method according to claim 1, characterized in that: The lengths of the input data time series of the multiple runoff prediction sub-models are the same.
3. The runoff prediction model training method according to claim 1, characterized in that: The Pangu model predicts the time series of historical meteorological data to obtain a predicted time series of meteorological data, and the length of the predicted time series of meteorological data is equal to the forecast period.
4. The runoff prediction model training method according to claim 1, characterized in that: The number of the runoff prediction sub-models is equal to the forecast period.
5. The runoff prediction model training method according to claim 1, characterized in that: The Pangu model is specifically a Pangu-Weather model.
6. A runoff prediction method based on the Pangu model, characterized in that: include: Inputting a time series of historical runoff data, a time series of historical meteorological data, and a forecast period into a runoff prediction model, the runoff prediction model outputting predicted runoff data for the forecast period; The runoff prediction model is obtained by training using the runoff prediction model training method described in any one of claims 1-5.
7. An electronic device, characterized in that: include: at least one memory for storing a computer program; At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1 to 5 or the method according to claim 6.