Power plant coal inventory prediction method and system based on bayesian optimization lgbm
By optimizing the LightGBM model using Bayesian methods and combining it with weather forecast data, the problem of ignoring the influence of weather and seasons in existing technologies has been solved, enabling accurate prediction of coal inventory at power plants, especially improving the accuracy of predictions in the short to medium term.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-20
- Publication Date
- 2026-03-27
AI Technical Summary
Existing coal inventory forecasting algorithms for power plants ignore the influence of factors such as weather and seasons, resulting in inaccurate forecasts.
The LightGBM model based on Bayesian optimization was adopted, and historical data and weather forecast data were combined. The hyperparameters of the LightGBM model were optimized by Bayesian optimization algorithm to predict the coal inventory of power plants.
It has enabled more accurate coal inventory forecasting, especially in the short to medium term, providing a reliable basis for prediction.
Smart Images

Figure CN115759342B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power plant coal inventory forecasting technology, specifically relating to a power plant coal inventory forecasting method and system based on Bayesian optimized LGBM. Background Technology
[0002] Accurate forecasting of coal inventories at power plants is a crucial prerequisite for the smooth implementation of power plant supply guarantee policies. Simultaneously, for coal suppliers, understanding downstream power plant coal inventory data allows for the prediction of supply risks. Power plant coal inventories exhibit cyclical, random, and seasonal characteristics, influenced by coal input, consumption, and weather conditions. However, existing power plant coal inventory forecasting algorithms rely solely on historical data such as power generation and consumption, neglecting the impact of weather and seasonal factors, resulting in inaccurate predictions. Summary of the Invention
[0003] Purpose of the invention: To address the problems existing in the prior art, this invention provides a method for predicting coal inventory in power plants based on Bayesian optimized LGBM, which can accurately predict the coal inventory of power plants.
[0004] Technical Solution: This invention discloses a method for predicting coal inventory in power plants based on Bayesian optimized LGBM, including a training phase and a prediction phase. The training phase includes:
[0005] Step 1: Construct an original sample set based on historical data. The original sample set consists of samples r from day 1 to day k, representing the state sequences s1, s2, ..., s. k-1 ,s k The coal consumption of the power plant on day k+1, c k+1 Composition: r = ((s1,s2,…,s) k-1 ,s k ),c k+1 );
[0006] Where the state s on day k k Including the power plant coal consumption c on day k k The highest temperature in the power transmission area minimum temperature Weather status w k and d k Month m k Year y k Season k :
[0007] Normalize the samples in the original sample set to obtain the training sample set;
[0008] Step 2: Construct an LGBM model, which is used to predict the power plant coal consumption on day k+1 based on the state sequence of days 1, 2, ..., k.
[0009] Step 3: Train the LGBM model using the Bayesian optimization algorithm to optimize the hyperparameters. The specific steps are as follows:
[0010] S1. Randomly initialize the hyperparameters of the LGBM model, set them to x0, and calculate the loss function value loss0 under the hyperparameter x0 based on the training sample set.
[0011] x0 and loss0 form the initial dataset D0 = {(x0, loss0)}; initialize the maximum number of iterations N; initialize the current iteration number t = 1; initialize the minimum loss value loss. min =loss0, initialize the optimal hyperparameter x best =x0;
[0012] S2. Calculate the likelihood function:
[0013] Where P(x) i |f) represents the hyperparameter x i The probability of x under the current distribution function f(x), i Let be the hyperparameter of the i-th sample in the dataset;
[0014] The distribution function f(x) is a Gaussian process using the Matern kernel:
[0015] f(x)~N(μ(x),K Matern (x,x′))
[0016] Where μ(x) is the mean of the hyperparameters in the dataset, K Matern (x,x′) is the Matern kernel function, where x and x′ are hyperparameters in the dataset;
[0017] Calculate the posterior distribution: P(x|D) t-1 ) = Likehood * f(x);
[0018] S3. Calculate the PI function value based on the posterior distribution: PI(x|D) t-1 )=P((f(x)≥f(x + )+ε)|D t-1 );
[0019] in ε≥0 is a preset parameter;
[0020] Obtain the value of x corresponding to the maximum value of the PI function, and use it as the hyperparameter x for the current iteration. t :
[0021]
[0022] S4. Calculate the hyperparameter x for the current iteration. t The corresponding objective function value: loss t =f(x) t );
[0023] If loss t <loss min Update loss min =loss t And update the optimal hyperparameter x best =x t ;
[0024] S5, (x) t loss t Add D t In the process, we obtain the dataset D for the current iteration. t =D t-1 ∪(x t loss t );
[0025] S6. If t < N, increment t by one and jump to step S2 for the next iteration;
[0026] If t = N, then the optimal hyperparameter x best As hyperparameters after optimization of the LGBM model;
[0027] The prediction stage is as follows:
[0028] Step 4: Obtain the state sequence of the current date and the state of the previous k-1 days, input the state sequence into the trained LGBM model, and the LGBM model outputs the predicted coal consumption for the day after the current date.
[0029] Calculate the coal inventory for the day following the current date, based on the current coal inventory and transportation plan.
[0030] Furthermore, the aforementioned methods for forecasting coal inventory at power plants also include:
[0031] Step 5: Obtain the highest and lowest temperatures and weather conditions for each day within the next M days from the current date for the power plant's transmission area based on the weather forecast;
[0032] Based on step 4, obtain the power plant's coal consumption for the next 1 to M+1 days from the current date, and calculate the coal inventory for the next 1 to M+1 days from the current date based on the transportation plan for the next 1 to M+1 days.
[0033] Furthermore, step 5 first obtains the geographical location of the power plant's transmission area, and then retrieves the highest temperature, lowest temperature, and weather conditions for each day within the next M days from the current date from a weather forecast website.
[0034] On the other hand, this invention also discloses a power plant coal inventory forecasting system based on Bayesian optimized LGBM, comprising:
[0035] The training sample set construction module is used to construct the original sample set based on historical data and normalize the samples in the original sample set to obtain the training sample set.
[0036] The LGBM model is used to predict the coal consumption of power plants on day k+1 based on the state sequence of days 1, 2, ..., k.
[0037] The hyperparameter optimization module is used to train the LGBM model using the Bayesian optimization algorithm and optimize the hyperparameters. The specific steps are as follows:
[0038] S1. Randomly initialize the hyperparameters of the LGBM model, set them to x0, and calculate the loss function value loss0 under the hyperparameter x0 based on the training sample set.
[0039] x0 and loss0 form the initial dataset D0 = {(x0, loss0)}; initialize the maximum number of iterations N; initialize the current iteration number t = 1; initialize the minimum loss value loss. min =loss0, initialize the optimal hyperparameter x best =x0;
[0040] S2. Calculate the likelihood function:
[0041] Where P(x) i |f) represents the hyperparameter x i The probability of x under the current distribution function f(x), i Let be the hyperparameter of the i-th sample in the dataset;
[0042] The distribution function f(x) is a Gaussian process using the Matern kernel:
[0043] f(x)~N(μ(x),K Matern (x,x′))
[0044] Where μ(x) is the mean of the hyperparameters in the dataset, K Matern (x,x′) is the Matern kernel function, where x and x′ are hyperparameters in the dataset;
[0045] Calculate the posterior distribution: P(x|D) t-1 ) = Likehood * f(x);
[0046] S3. Calculate the PI function value based on the posterior distribution: PI(x|D) t-1 )=P((f(x)≥f(x + )+ε)|D t-1 );
[0047] in ε≥0 is a preset parameter;
[0048] Obtain the value of x corresponding to the maximum value of the PI function, and use it as the hyperparameter x for the current iteration. t :
[0049]
[0050] S4. Calculate the hyperparameter x for the current iteration. t The corresponding objective function value: loss t =f(x) t );
[0051] If loss t <loss min Update loss min =loss t And update the optimal hyperparameter x best =x t ;
[0052] S5, (x) t loss t Add D t In the process, we obtain the dataset D for the current iteration. t =D t-1 ∪(x t loss t );
[0053] S6. If t < N, increment t by one and jump to step S2 for the next iteration;
[0054] If t = N, then the optimal hyperparameter x best As hyperparameters after optimization of the LGBM model.
[0055] Furthermore, the aforementioned power plant coal inventory forecasting system also includes a weather forecast data acquisition module; the weather forecast data acquisition module is used to obtain the highest temperature, lowest temperature, and weather conditions for each day within the next M days from the current date in the power plant's transmission area based on the weather forecast.
[0056] Furthermore, the weather forecast data acquisition module first obtains the geographical location of the power plant's transmission area, and then retrieves the highest temperature, lowest temperature, and weather conditions for each day within the next M days from the current date from the weather forecast website.
[0057] On the other hand, the present invention also discloses a computer storage medium storing a computer program that, when executed by a processor, implements the above-mentioned power plant coal inventory prediction method.
[0058] On the other hand, the present invention also discloses a computer 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 implement the above-mentioned power plant coal inventory prediction method.
[0059] Beneficial effects: The power plant coal inventory forecasting method disclosed in this invention, based on Bayesian optimization LGBM, is based on multi-factor correlation analysis of power plant coal inventory and combined with the LightGBM model. It quickly determines the local optimum values of relevant hyperparameters through Bayesian optimization to achieve coal consumption forecasting. Furthermore, it forecasts coal inventory by analyzing the relationship between coal intake, coal consumption, and inventory. It also combines weather forecast data to forecast short- and medium-term coal inventory, providing reliable predictions for power plants and coal supply methods. Attached Figure Description
[0060] Figure 1 This is a graph showing the inventory change trend of a power plant in the example.
[0061] Figure 2 The following is a graph showing the coal unloading volume, coal consumption, and inventory of a power plant in the example.
[0062] Figure 3 This is a flowchart of the power plant coal inventory forecasting method disclosed in this invention.
[0063] Figure 4 This is a schematic diagram of the composition of the power plant coal inventory prediction system disclosed in this invention.
[0064] Figure 5 This is a schematic diagram of the composition of the computer device disclosed in this invention. Detailed Implementation
[0065] This embodiment uses a power plant located in a city in East China as an example to further illustrate the present invention. The power plant's transmission area is the city where it is located; that is, the power plant's geographical location is the geographical location of the transmission area. Historical data of the power plant is obtained, including historical coal intake for 2020-2021, total coal consumption of the four generating units, and daily inventory. Meteorological data such as daily maximum temperature, daily minimum temperature, and weather conditions for the city where the power plant is located for 2020-2021 are obtained from the meteorological department, and the season for each day is determined by combining the date.
[0066] The trend of coal inventory changes at the power plant from 2020 to 2021 is as follows: Figure 1 As shown, from an overall annual perspective, the average power plant inventory in 2020 was higher than in 2021. Coal inventories in both 2020 and 2021 showed slight increases after October, exhibiting a certain cyclical pattern. The power plant's daily coal unloading (i.e., coal intake), coal consumption, and inventory for the entire year of 2020 are as follows: Figure 2 As shown in (a)-(c), from Figure 2 It can be seen that the daily coal intake remained relatively stable throughout 2020, and there was a certain negative correlation between annual coal consumption and inventory. In addition, the trend of daily coal consumption throughout the year also showed seasonal characteristics, with the overall coal consumption level in summer and winter being higher than that in the transitional season, consistent with the peak electricity consumption seasons of summer and winter.
[0067] like Figure 3 As shown, this invention discloses a method for predicting coal inventory in power plants based on Bayesian optimized LGBM, including a training phase and a prediction phase. The training phase includes:
[0068] Step 1: Construct an original sample set based on historical data. The original sample set consists of samples r from day 1 to day k, representing the state sequences s1, s2, ..., s. k-1 ,s k The coal consumption of the power plant on day k+1, c k+1 Composition: r = ((s1,s2,…,s) k-1 ,s k ),c k+1 );
[0069] Where the state s on day k k Including the power plant coal consumption c on day k k Highest temperature minimum temperature Weather status w k 、day d k Month m k Year y k Season k :
[0070] The weather conditions are coded as sunny, cloudy, partly cloudy, overcast, rainy, and snowy; and the seasons are determined and coded according to the meteorological department's division of seasons: March to May is spring, June to August is summer, September to November is autumn, and December to February of the following year is winter.
[0071] In this embodiment, the value of k is set to 5, that is, the coal consumption on the 6th day is predicted based on the status of the 1st to 5th days.
[0072] To eliminate the differences between features of different magnitudes, the samples in the original sample set are normalized to obtain the training sample set. This embodiment uses the min-max normalization method to perform a linear transformation on each dimension of the features. The calculation formula is as follows: Where F * F represents the features after normalization, and F represents the features before normalization. min and F max These are the minimum and maximum values of feature F in the original sample set, respectively;
[0073] Step 2: Construct an LGBM model, which is used to predict the power plant coal consumption on day k+1 based on the state sequence of days 1, 2, ..., k.
[0074] Lightweight Gradient Boosting Machine (LGBM) is an algorithm implemented within the Gradient Boosting Decision Tree (GBDT) framework. Proposed by Microsoft, LightGBM is an efficient implementation of the GBDT algorithm, characterized by its speed, distributed nature, and high performance. LightGBM employs many efficient techniques to achieve low memory usage, higher training efficiency, and higher accuracy. These optimization techniques primarily include histogram algorithms, leaf-by-leaf growth algorithms, gradient one-sided sampling, and the application of mutually exclusive feature binding. LGBM was initially designed to address the memory and speed issues encountered by GBDT with massive datasets. It utilizes numerous efficient techniques to achieve lower memory consumption, faster running speed, higher accuracy, and better application in industrial practice. The main hyperparameters of the LGBM algorithm are shown in Table 1.
[0075] Table 1
[0076]
[0077]
[0078] Step 3: Train the LGBM model using the Bayesian optimization algorithm to optimize the hyperparameters; the optimized hyperparameters in this invention are the vector composed of the 6 parameters in Table 1. The specific steps are as follows:
[0079] S1. Randomly initialize the hyperparameters of the LGBM model, setting them to x0, and calculate the loss function value loss0 under the hyperparameter x0 based on the training sample set:
[0080] Where Num is the number of samples in the training sample set. Let c(n) be the actual normalized coal consumption of power plants in the nth sample of the training sample set, and c(n) be the predicted coal consumption of power plants obtained by the LGBM model based on the nth sample of the training sample set.
[0081] x0 and loss0 form the initial dataset D0 = {(x0, loss0)}; initialize the maximum number of iterations N; initialize the current iteration number t = 1; initialize the minimum loss value loss. min =loss0, initialize the optimal hyperparameter x best =x0;
[0082] S2. Calculate the likelihood function:
[0083] Where P(x) i |f) represents the hyperparameter x i The probability of x under the current distribution function f(x), i Let be the hyperparameter of the i-th sample in the dataset;
[0084] The distribution function f(x) is a Gaussian process using the Matern kernel:
[0085] f(x)~N(μ(x),K Matern (x,x′))
[0086] Where μ(x) is the mean of the hyperparameters in the dataset, K Matern (x,x′) is the Matern kernel function, where x and x′ are hyperparameters in the dataset;
[0087] Calculate the posterior distribution: P(x|D) t-1 ) = Likehood * f(x);
[0088] S3. Calculate the PI function value based on the posterior distribution: PI(x|D) t-1 )=P((f(x)≥f(x + )+ε)|D t-1 );
[0089] in ε≥0 is a preset parameter;
[0090] Obtain the value of x corresponding to the maximum value of the PI function, and use it as the hyperparameter x for the current iteration. t :
[0091]
[0092] S4. Calculate the hyperparameter x for the current iteration. t The corresponding objective function value: loss t =f(x) t );
[0093] If loss t <loss min Update loss min =loss t And update the optimal hyperparameter x best =x t ;
[0094] S5, (x) t loss t Add D t In the process, we obtain the dataset D for the current iteration. t =D t-1 ∪(x t loss t );
[0095] S6. If t < N, increment t by one and jump to step S2 for the next iteration;
[0096] If t = N, then the optimal hyperparameter x best As hyperparameters after optimization of the LGBM model;
[0097] After steps 1-3, a trained prediction model is obtained. Prediction is then made based on this model.
[0098] Step 4: Obtain the state sequence of the current date and the state of the previous k-1 days, input the state sequence into the trained LGBM model, and the LGBM model outputs the predicted coal consumption for the day after the current date.
[0099] Calculate the coal inventory for the day following the current date, based on the current coal inventory and transportation plan.
[0100] In addition, it can also predict inventory levels for the next few days:
[0101] Step 5: Obtain the highest and lowest temperatures and weather conditions for each day within the next M days from the current date for the power plant's transmission area based on the weather forecast;
[0102] Specifically, weather forecast results for the power plant's transmission area can be manually entered or obtained through web scraping. When using web scraping, the geographical location of the power plant's transmission area is first obtained, and then the highest temperature, lowest temperature, and weather conditions for each day within the next M days from the current date are retrieved from the weather forecast website.
[0103] Step 4 sequentially obtains the power plant's coal consumption for the next 1 to M+1 days from the current date, and calculates the coal inventory for the next 1 to M+1 days from the current date based on the transportation plan for the next 1 to M+1 days, thereby achieving short- to medium-term coal inventory forecasting. In this embodiment, the value of M is set to 9; that is, using the status data from the 1st to the 5th day and the weather forecast data from the 6th to the 15th day, the coal inventory for the 6th to the 16th day is predicted.
[0104] This embodiment also discloses a system for implementing the above-mentioned power plant coal inventory forecasting method, such as... Figure 4 As shown, it includes:
[0105] Training sample set construction module 1 is used to construct the original sample set based on historical data and normalize the samples in the original sample set to obtain the training sample set.
[0106] LGBM Model 2, wherein the LGBM model is used to predict the coal consumption of power plants on day k+1 based on the state sequence of days 1, 2, ..., k;
[0107] Hyperparameter optimization module 3 is used to train the LGBM model using the Bayesian optimization algorithm and optimize the hyperparameters. The specific steps are as described in steps S1-S6 above.
[0108] Weather forecast data acquisition module 4; the weather forecast data acquisition module is used to acquire the highest temperature, lowest temperature and weather conditions for each day within M days from the current date based on the weather forecast.
[0109] The weather forecast data acquisition module can obtain weather forecast results for the power plant's transmission area by web crawling. First, it obtains the geographical location of the power plant's transmission area, and then crawls the highest temperature, lowest temperature, and weather conditions of the geographical location for each day within M days from the current date on the weather forecast website.
[0110] This embodiment uses East China as an example to evaluate the performance of the above coal inventory forecasting method, and compares the predicted value with the actual value. Three evaluation indicators are used, including root mean squared error (RMSE), mean absolute error (MAE), and correlation coefficient (CC).
[0111] First, the historical data of the power plant from 2020 to 2021 was normalized and divided into training and testing sets. Data from 2020 and January to October 2021 were used as the training set, and data from November to December 2021 were used as the testing set. The LGBM model was first trained using the training set according to step 3. After 100 iterations, the optimal hyperparameter values of the model are shown in Table 2.
[0112] Table 2
[0113] name numerical values num_leaves 6 learning_rate 0.09 bagging_fraction 0.94 feature_fraction 0.22 max_depth 5 min_child_weight 50
[0114] After determining the optimal hyperparameters of the LGBM model, validation was performed using a test set. This embodiment compares the prediction method disclosed in this invention with three other regression algorithms: ridge regression, neural networks, and support vector regression. Table 3 shows the comparison results of the evaluation metrics of the prediction method disclosed in this invention with other algorithms on the test set. Among the four models, the RMSE and MAE of the proposed model are the smallest, and the correlation coefficient is the largest. Whether from the perspective of the error between predicted and actual values or the degree of correlation between predicted and actual values, the prediction method disclosed in this invention exhibits the best prediction performance and the best generalization ability among the four methods.
[0115] Table 3
[0116] Model RMSE MAE CC Ridge Return 2.447*10-4 0.112 0.455 Neural Networks 0.00219 0.186 0.146 Support Vector Regression 0.331 0.639 0.171 The method of the present invention 2.348*10-4 0.099 0.644
[0117] The present invention also discloses a computer storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned method for predicting coal inventory in power plants.
[0118] The present invention also discloses a computer device, such as Figure 5 As shown, it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-mentioned power plant coal inventory prediction method.
Claims
1. A power plant coal inventory prediction method based on Bayesian optimization LGBM, comprising a training stage and a prediction stage, characterized in that, The training stage comprises: Step 1: Construct an original sample set based on historical data. The original sample set consists of samples r from day 1 to day k, representing the state sequences s1, s2, ..., s. k-1 ,s k The coal consumption of the power plant on day k+1, c k+1 Composition: r = ((s1,s2,…,s) k-1 ,s k ),c k+1 ); wherein the state s of the kth day k including the power plant coal consumption c of the kth day k , the highest and lowest temperature weather state w of the power plant power transmission area k , and the day d k , the month m k , the year y k , the season l k : normalizing the samples in the original sample set to obtain a training sample set; Step 2, constructing an LGBM model, the LGBM model being used to predict the power plant coal consumption on the k+1 day according to the state sequence on the 1, 2, …, k day; Step 3, training the LGBM model by using a Bayesian optimization algorithm to optimize the hyperparameters, and the specific steps are as follows: S1, randomly initializing the hyperparameters of the LGBM model as x0, and calculating the loss function value loss0 under the hyperparameters x0 according to the training sample set; x0and loss0form an initial data set D0= {(x0, loss0)}; initialize a maximum number of iterations N; initialize a current number of iterations t = 1; initialize a minimum loss value loss min = loss0, initialize an optimal hyperparameter x best = x0; S2, calculating the likelihood function: where P(x i |f) represents the probability of the hyperparameters x i under the current distribution function f(x), x i is the hyperparameters in the i-th sample in the data set; The distribution function f(x) is a Gaussian process using a Matern kernel: f(x) ~ N(μ(x), K Matern (x, x') ) where μ(x) is the mean of the hyperparameters in the dataset, K Matern (x, x') is the Matern kernel function, x, x' are both hyperparameters in the dataset; Compute posterior distribution: P(x|D t-1 ) = Likehood * f(x); S3, compute the PI function value based on the posterior distribution: PI(x|D t-1 ) = P((f(x) ≥ f(x + )+ ε | D t-1 ); Wherein ε≥0 is a preset parameter; The x corresponding to the maximum value of the PI function value is taken as the hyperparameter x of the current iteration t : S4, compute hyperparameters x for current iteration t Corresponding objective function value: loss t = f(x t ); If loss t <loss min , update loss min =loss t , and update the optimal hyperparameters x best =x t ; S5, add (x t , loss t ) to D t , obtaining the dataset D t of the current iteration D t-1 ∪(x t , loss t ); S6, if t < N, let t plus one, jump to step S2 for next iteration; If t = N, then the optimal hyperparameters x best as the hyperparameters optimized for the LGBM model; The prediction stage is: Step 4, obtaining the current date and the state of the previous k-1 days to form a state sequence, inputting the state sequence into the trained LGBM model, and the LGBM model outputting the predicted coal consumption on the next day of the current date; According to the coal inventory of the current date and the transportation plan, the coal inventory on the next day of the current date is calculated; Step 5, obtaining the maximum temperature, minimum temperature and weather state of each day in the next M days of the current date in the power plant power transmission area according to the weather forecast; According to step 4, the power plant coal consumption from the current date to the next M+1 days is obtained in turn; and the coal inventory from the current date to the next M+1 days is calculated according to the transportation plan. wherein ; Wherein, Num is the number of samples in the training sample set, is the normalized actual power plant coal consumption of the nth sample in the training sample set, and c(n) is the predicted power plant coal consumption obtained by the LGBM model according to the nth sample in the training sample set.
2. The power plant coal inventory prediction method of claim 1, wherein, The step 5 first obtains the geographical position of the power plant power transmission area, and then crawls the maximum temperature, minimum temperature and weather state of each day in the next M days of the current date at the geographical position on the weather forecast website.
3. A power plant coal inventory prediction system based on Bayesian optimization LGBM, characterized by, It comprises: a training sample set construction module (1) for constructing an original sample set according to historical data, normalizing the samples in the original sample set, and obtaining a training sample set; an LGBM model (2) used to predict the power plant coal consumption on the k+1 day according to the state sequence on the 1, 2, …, k day; a hyperparameter optimization module (3) for training the LGBM model by using a Bayesian optimization algorithm to optimize the hyperparameters, and the specific steps are as follows: S1, randomly initializing the hyperparameters of the LGBM model as x0, and calculating the loss function value loss0 under the hyperparameters x0 according to the training sample set; x0and loss0form an initial data set D0= {(x0, loss0)}; initialize a maximum number of iterations N; initialize a current number of iterations t = 1; initialize a minimum loss value loss min = loss0, initialize an optimal hyperparameter x best = x0; S2, calculating the likelihood function: where P(x i |f) represents the probability of the hyperparameters x i under the current distribution function f(x), x i is the hyperparameters in the i-th sample in the data set; The distribution function f(x) is a Gaussian process using a Matern kernel: f(x) ~ N(μ(x), K Matern (x, x') ) where μ(x) is the mean of the hyperparameters in the dataset, K Matern (x, x') is the Matern kernel function, x, x' are both hyperparameters in the dataset; Compute posterior distribution: P(x|D t-1 ) = Likehood * f(x); S3, compute the PI function value based on the posterior distribution: PI(x|D t-1 ) = P((f(x) ≥ f(x + )+ ε | D t-1 ); Wherein ε≥0 is a preset parameter; The x corresponding to the maximum value of the PI function value is taken as the hyperparameter x of the current iteration t : S4, compute the hyperparameters x of the current iteration t Corresponding objective function value: loss t = f(x t ); If loss t <loss min , update loss min =loss t , and update the optimal hyperparameters x best =x t ; S5, add (x t , loss t ) to D t , obtaining the data set D t of the current iteration = D t-1 ∪(x t , loss t ); S6, if t < N, let t plus one, jump to step S2 for next iteration; If t = N, then the optimal hyperparameters x best as the hyperparameters optimized for the LGBM model; a weather forecast data acquisition module (4) for obtaining the maximum temperature, minimum temperature and weather state of each day in the next M days of the current date in the power plant power transmission area according to the weather forecast; The weather forecast data acquisition module (4) firstly acquires the geographical position of the power transmission area of the power plant, and then crawls the maximum temperature, the minimum temperature and the weather state of each day in the next M days of the current date of the geographical position on the weather forecast website; wherein ; Wherein, Num is the number of samples in the training sample set, is the normalized actual coal consumption of the nth sample in the training sample set, and c(n) is the predicted coal consumption of the power plant obtained by the LGBM model according to the nth sample in the training sample set.
4. A computer storage medium having stored thereon a computer program, characterized in that The computer program, when executed by a processor, implements the power plant coal inventory prediction method of any one of claims 1-2.
5. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The computer program, when executed by a processor, implements the power plant coal inventory prediction method of any one of claims 1-2.