Load prediction method, device and electronic equipment of power system

By combining multiple LightGBM models and optimizing parameters using the MFO algorithm, a target model was constructed, which solved the problem of low accuracy in power system load forecasting, achieved accurate forecasting of power system load, and improved forecast accuracy and stability.

CN120150115BActive Publication Date: 2026-02-13STATE GRID BEIJING ELECTRIC POWER CO +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510219733.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2026-02-13
Estimated Expiration
2045-02-26

AI Technical Summary

Technical Problem

Existing power system load forecasting methods have low accuracy, especially when dealing with complex nonlinear relationships, and deep learning models are time-consuming to train and are easily affected by initial parameters.

Method used

Multiple LightGBM models are used as the base models. The target meta-model is constructed by stacking the models and the MFO algorithm is used to optimize the model parameters. The target model is constructed by combining cross-validation and loss function optimization to improve prediction accuracy.

Benefits of technology

By combining the outputs of multiple basic models to construct a meta-model, the overfitting and underfitting problems of a single model are mitigated, the robustness of the model is enhanced, accurate prediction of power system load is achieved, and the prediction accuracy is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120150115B_ABST
    Figure CN120150115B_ABST
Patent Text Reader

Abstract

The application discloses a load prediction method and device of a power system and electronic equipment. It relates to the field of power load prediction. The method comprises the following steps: obtaining historical load data of the power system in a preset period; inputting the historical load data into a target model to obtain predicted load data at a target time, wherein the target model comprises a plurality of target base models and a target meta model, the predicted results output by the plurality of target base models based on the historical load data are used as input data of the target meta model, and the target meta model processes the input data to obtain the predicted load data. Through the application, the problem of low load prediction accuracy of the power system in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of power load prediction, in particular to a load prediction method and device of a power system and an electronic device. BACKGROUND

[0002] With the expansion of the scale of the power system, the importance of power load prediction is increasingly prominent. Accurate prediction results play an important role in the dispatching operation of the power system, which is conducive to improving the operation efficiency of the power system, reducing the operation cost, and avoiding the deterioration of the operation state of the power system caused by power accidents.

[0003] In related technologies, load prediction methods mainly rely on time series analysis and regression models, which have advantages in dealing with linear relationships and historical data. However, with the increasing complexity and volatility of power load, the limitations of these methods become more and more obvious.

[0004] In addition, with the development of data mining, artificial intelligence and other technologies, deep learning technology has been gradually applied in power load prediction, which can handle complex nonlinear relationships and achieve good prediction results. Deep learning technology can solve the model complexity adjustment problem through parameter optimization, effectively improving the prediction accuracy. However, the deep learning model training takes a long time, and the model parameters need to be selected manually or initialized randomly, which is easily affected by the initial parameters. This leads to the problem of low accuracy of load prediction in related technologies.

[0005] In view of the problem of low accuracy of load prediction of the power system in related technologies, no effective solution has been proposed so far. SUMMARY

[0006] The main purpose of the present application is to provide a load prediction method, device and electronic equipment of a power system to solve the problem of low accuracy of load prediction of the power system in related technologies.

[0007] In order to achieve the above purpose, according to one aspect of the present application, a load prediction method of a power system is provided. The method comprises: obtaining historical load data of the power system in a preset period; inputting the historical load data into a target model to obtain predicted load data at a target time, wherein the target model comprises a plurality of target base models and a target meta model, the predicted results output by the plurality of target base models based on the historical load data are taken as input data of the target meta model, and the target meta model processes the input data to obtain the predicted load data.

[0008] Optionally, the target model is obtained by: obtaining a load record of the power system, extracting a plurality of groups of load data from the load record, extracting sample historical load data and sample predicted load data from each group of load data; determining the sample historical load data and the sample predicted load data of each group of load data as a group of training samples, to obtain a plurality of groups of training samples; performing multiple iteration training on each base model and the meta model through the plurality of groups of training samples, to obtain a training result after each iteration training, wherein the training result after each iteration training includes a plurality of to-be-determined base models and a to-be-determined meta model, and each iteration training adjusts parameters of the base model and the meta model through a preset optimization algorithm; determining a first loss function of the plurality of base models and a second loss function of the meta model, and determining the target model from the training result after each iteration training by minimizing function values of the first loss function and the second loss function.

[0009] Optionally, the performing multiple iteration training on each base model and the meta model through the plurality of groups of training samples, to obtain a training result after each iteration training, includes: for each iteration training, training the plurality of base models through the plurality of groups of training samples, to obtain a plurality of to-be-determined base models; determining a group of prediction results output by the plurality of base models for each group of training samples, to obtain a group of prediction results of each group of training samples; determining the group of prediction results of each group of training samples and the sample predicted load data in the training sample as an updated group of training samples, to obtain an updated plurality of groups of training samples; training the meta model based on the updated plurality of groups of training samples, to obtain the to-be-determined meta model.

[0010] Optionally, the training the plurality of base models through the plurality of groups of training samples, to obtain a plurality of to-be-determined base models, includes: for each base model, dividing the plurality of groups of training samples into a plurality of folds through a preset cross-validation method, wherein the plurality of folds are mutually exclusive sets with equal sample quantities; determining a target fold from the plurality of folds, training the base model with folds other than the target fold as a training set, to obtain a to-be-screened base model; verifying the to-be-screened base model with the target fold as a verification set, to determine a prediction error of the to-be-screened base model; repeatedly performing the steps of determining a target fold from the plurality of folds, training the base model with folds other than the target fold as a training set, to obtain a to-be-screened base model, until all folds are verified as the target fold to obtain a group of prediction errors; determining the to-be-screened base model corresponding to the minimum prediction error in the group of prediction errors as the to-be-determined base model.

[0011] Optionally, adjusting the parameters of the base model and the meta model by the preset optimization algorithm comprises: initializing a plurality of groups of parameters by the preset optimization algorithm, wherein each group of parameters represents parameters of the plurality of base models and the meta model in one iteration process; calculating a prediction error of a training result corresponding to each group of parameters to obtain a group of prediction errors, and determining a group of parameters corresponding to a minimum prediction error in the group of prediction errors as a target group of parameters; in each iteration training process, updating other groups of parameters except the target group of parameters, and calculating a prediction error of the updated other groups of parameters, and in a case where the prediction error of the updated other groups of parameters is less than the prediction error of the target group of parameters, determining the updated other groups of parameters as an updated target group of parameters.

[0012] Optionally, determining the first loss function of the plurality of base models comprises: for each base model, determining a first prediction result of a current iteration round of the target training sample and a second prediction result of a last iteration; calculating a sum of the first prediction result and the second prediction result to obtain a prediction result term; inputting the sample prediction load data of the target training sample and the prediction result term into a mean square error formula to obtain a loss term of the target training sample, and calculating a sum of the loss terms of the plurality of groups of training samples to obtain the first loss function.

[0013] Optionally, determining the second loss function of the meta model comprises: for each group of training samples, determining an output result of inputting the prediction results of the plurality of base models into the meta model to obtain an output result term; inputting the sample prediction load data of the target training sample and the output result term into a mean square error formula to obtain a loss term of the target training sample, and calculating a sum of the loss terms of the plurality of groups of training samples to obtain the second loss function.

[0014] To achieve the above object, according to another aspect of the present application, a load prediction device of a power system is provided. The device comprises: an acquisition unit configured to acquire historical load data of the power system in a preset period; and an input unit configured to input the historical load data into a target model to obtain predicted load data at a target time, wherein the target model comprises a plurality of target base models and a target meta model, the plurality of target base models output prediction results based on the historical load data as input data of the target meta model, and the target meta model processes the input data to obtain the predicted load data.

[0015] To achieve the above object, according to another aspect of the present application, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the load prediction method of the power system described in the various embodiments of the present application.

[0016] According to the application, the following steps are adopted: historical load data of a power system in a preset period is acquired; the historical load data is input into a target model to obtain predicted load data at a target time, wherein the target model comprises a plurality of target base models and a target meta model, the plurality of target base models output prediction results based on the historical load data as input data of the target meta model, and the target meta model processes the input data to obtain the predicted load data, thereby solving the problem of low load prediction accuracy of the power system in the related art. The target meta model is constructed by combining the outputs of the plurality of target base models, thereby effectively reducing the overfitting and underfitting problems that may exist in a single model, enhancing the robustness of the target model, and predicting the load of the power system through the target model, thereby achieving accurate prediction of the power load. Furthermore, the effect of improving the load prediction accuracy of the power system is achieved. BRIEF DESCRIPTION OF DRAWINGS

[0017] The accompanying drawings, which form a part of this application, are included to provide a further understanding of the application and are incorporated in and constitute a part of this application. The embodiments of this application, and their

[0018] Figure 1 is a flowchart of a load prediction method of a power system according to an embodiment of the application;

[0019] Figure 2 is a structural schematic diagram of a target model according to an embodiment of the application;

[0020] Figure 3 is a structural schematic diagram of an optional target model according to an embodiment of the application;

[0021] Figure 4 is a comparison schematic diagram of model prediction results according to an embodiment of the application;

[0022] Figure 5 is a comparison schematic diagram of model prediction results of an additional data set according to an embodiment of the application;

[0023] Figure 6 is a schematic diagram of a load prediction device of a power system according to an embodiment of the application;

[0024] Figure 7 is a schematic diagram of an electronic device according to an embodiment of the application. DETAILED DESCRIPTION

[0025] It should be noted that the embodiments and features in the application can be combined with each other without conflict. The application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0026] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application, so that those skilled in the art can better understand the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work should be within the scope of protection of the present application.

[0027] It should be noted that the terms "first", "second" and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily limit to those clearly listed steps or units, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0028] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for display, analyzed data, etc.) involved in the present disclosure are all information and data authorized by the user or authorized by all parties.

[0029] It should be noted that the collected information is information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards in relevant regions, necessary security measures are taken, do not violate public order and good customs, and provide corresponding operation portal for user to choose authorization or refusal.

[0030] The present application will be described below in conjunction with the preferred implementation steps, Figure 1 The flowchart of the load prediction method of the power system provided by the embodiments of the present application is shown in FIG. 1, which comprises the following steps: Figure 1

[0031] Step S101, obtaining the historical load data of the power system in a preset period.

[0032] ​In step S101, the preset period can be set according to expert experience, for example, one day, one hour, one minute, one second, etc. The historical load data can be short-term fluctuations of the power system load recorded at a high frequency (such as once every 15 minutes or once every 30 minutes) within the preset period. The historical load data can also include the influence of multiple variables such as weekdays, weekends, holidays, seasonal changes, weather conditions, etc. to reflect the complexity and dynamics of load demand.

[0033] In step S102, the historical load data is input into the target model to obtain predicted load data at the target time, wherein the target model includes multiple target base models and a target meta model, the multiple target base models output prediction results based on the historical load data as input data of the target meta model, and the target meta model processes the input data to obtain the predicted load data.

[0034] In step S102, the target model can be a model obtained by combining multiple target base models through stacking technology and constructing a target meta model based on the outputs of the multiple target base models. Both the base model and the meta model used for training can be a LightGBM (Light Gradient Boosting Machine) model. The LightGBM model uses gradient boosting decision trees to process samples. The model is gradually optimized by minimizing the residual error of the loss function. In each iteration, the LightGBM model learns from the residual error obtained in the last iteration. By using this information, the LightGBM model fits a new decision tree, thereby enhancing its prediction ability.

[0035] For example, multiple base models for load prediction are established using LightGBM, which are used as the base layer in the stacking framework. The outputs of the base models are combined into a new feature vector as the input of the meta model. Another LightGBM model is introduced as the meta model to further fuse and predict the outputs of the base models. The MFO (Moth-Flame Optimization) algorithm is used to optimize the hyperparameters of the entire stacking framework, including the parameters of the base models and the meta model, to improve the performance of load prediction.

[0036] Figure 2 is a structural diagram of the target model provided by the embodiments of the present application, as shown in Figure 2 The target model using the stacking technology includes two stages, the first stage is the training of the base model. In the first stage, multiple base models (i.e. M1, M2, …, Mn in Figure 2 ) are trained, and each model independently fits the training data. The training sample where x i is the feature vector, and y i is the corresponding target value. n different base models are used to train the data.

[0037] For each base model mj, output the predicted value. The basic model can be represented by the following expression:

[0038]

[0039] The predictions from the n base models will be combined into a new feature vector. This serves as the input to the second-stage metamodel. The metamodel can be represented by the following expression:

[0040]

[0041] The second stage is the training of the meta-model. The meta-model (i.e., ...) Figure 2 The meta-model in the first stage accepts the predictions of all the base models in the first stage (i.e., Figure 2 The model is trained using P1, P2, ..., Pn as input features. The meta-model learns how to best combine these predictions to improve the final prediction performance.

[0042] The input to the meta-model f is a feature vector. It consists of the prediction results of all the basic models in the first stage, and its goal is to predict the final output.

[0043]

[0044] The power system load forecasting method provided in this application acquires historical load data of the power system within a preset period; inputs the historical load data into a target model to obtain predicted load data at a target time. The target model includes multiple target basic models and a target meta-model. The prediction results output by the multiple target basic models based on the historical load data serve as input data for the target meta-model. The target meta-model processes the input data to obtain the predicted load data, thus solving the problem of low load forecasting accuracy in related technologies. By combining the outputs of multiple target basic models to construct the target meta-model, the overfitting and underfitting problems that may exist in a single model are effectively mitigated, enhancing the robustness of the target model. By using the target model to predict the power system load, accurate power load forecasting is achieved, thereby improving the load forecasting accuracy of the power system.

[0045] To improve the accuracy of load prediction, the base model and the meta model are trained by training samples to obtain a target model. Optionally, in the power system load prediction method provided in the embodiments of the present application, the target model is obtained in the following manner: obtaining load records of a power system, extracting a plurality of sets of load data from the load records, and extracting sample historical load data and sample predicted load data from each set of load data; determining the sample historical load data and the sample predicted load data of each set of load data as a set of training samples to obtain a plurality of sets of training samples; performing multiple iterations of training on each base model and meta model by using the plurality of sets of training samples to obtain a training result after each iteration of training, wherein the training result after each iteration of training includes a plurality of undetermined base models and an undetermined meta model, and each iteration of training adjusts the parameters of the base model and the meta model by using a preset optimization algorithm; determining a first loss function of the plurality of base models and a second loss function of the meta model, and determining the target model from the training result after each iteration of training by minimizing the function values of the first loss function and the second loss function.

[0046] In some examples, the load records are extracted from a database of the power system. For example, the power load data in the past period of time, covering daily, weekly, monthly and annual load changes, and other factors related to load, such as weather conditions, holidays, weekdays, etc. Then, the power load data is preprocessed, such as cleaning and normalization, to improve the data quality. From the load records, a plurality of sets of load data under different time periods or different conditions are selected, and each set of data contains historical load data (i.e., sample historical load data) in a specific time period and load data (i.e., sample predicted load data) in a target prediction period. For example, the data can be divided according to conditions such as season, day type (weekday and non-weekday), time interval (peak and non-peak period), etc. to improve the adaptability of the model to the characteristics of the load.

[0047] For each set of load data, the historical load data is input as a feature, and the load data in the prediction period is output as a target to construct a training sample. Different base models are used for training. When constructing the sample, the time sequence and periodicity of the data need to be considered to ensure that the model can capture the dynamic changes of the load. A plurality of sets of training samples are used to train each base model, and the base model can be a LightGBM model or other appropriate machine learning model. At the same time, the outputs of all base models are combined into a new feature vector as the input of the meta model. The meta model can also be a LightGBM model, which is used to integrate the predictions of a plurality of base models to improve the overall prediction accuracy.

[0048] In each iteration training, the parameters of the base model and the meta model are adjusted using the MFO (Moth-Flame Optimization, a heuristic optimization algorithm) algorithm, i.e., a preset optimization algorithm, including but not limited to learning rate, maximum leaf node number, number of trees, etc. The MFO algorithm performs global optimization by simulating the spiral flight path of a moth to find the optimal parameter configuration that minimizes the loss function. During the iterative training process, the MFO algorithm continuously adjusts the parameters until the loss function reaches the preset convergence condition (e.g., the function value of the first loss function is less than the preset first threshold, and the function value of the second loss function is less than the preset second threshold).

[0049] The first loss function is used to evaluate the prediction error of the base model, which can be mean squared error, normalized mean absolute error, or normalized root mean square error, etc. The second loss function is used to evaluate the performance of the meta model, which can also select one of the above indicators. By evaluating the results after each iteration training, i.e., by minimizing the function values of the first loss function and the second loss function, the best base model set and meta model are determined. Specifically, from the multiple iteration training results obtained from multiple training samples, those model configurations that minimize the first loss function and the second loss function are selected as the target model.

[0050] It should be noted that the calculation formula of the normalized mean absolute error is as follows:

[0051]

[0052] The calculation formula of the normalized root mean square error (NRMSE) is as follows:

[0053]

[0054] where p t represents the normalized measured load value corresponding to time t, represents the normalized load prediction value output by the prediction model corresponding to time t; N represents the number of power data training samples.

[0055] This embodiment significantly improves the accuracy of load prediction by training the target model, combining the efficiency of LightGBM and the advantages of stacked ensemble learning, as well as the optimization capability of the MFO algorithm. By combining the outputs of multiple base models to construct a meta model, the overfitting and underfitting problems that may exist in a single model are effectively alleviated, and the robustness of the prediction model is enhanced. More accurate load prediction is achieved, providing strong support for the planning, scheduling and operation of the power system.

[0056] Optionally, in the power system load prediction method provided by the embodiments of the present application, the plurality of basic models and the meta-model are iteratively trained by the plurality of sets of training samples, and the training result after each iteration is obtained, including: for each iteration, a plurality of basic models are trained by the plurality of sets of training samples, and a plurality of pending basic models are obtained; a set of prediction results output by the plurality of basic models for each set of training samples is determined, and a set of prediction results for each set of training samples is obtained; the set of prediction results for each set of training samples and the sample prediction load data in the training sample are determined as an updated set of training samples, and an updated plurality of sets of training samples are obtained; and the meta-model is trained based on the updated plurality of sets of training samples, and a pending meta-model is obtained.

[0057] In some examples, for each iteration, the basic models are trained using the LightGBM algorithm from the plurality of sets of training samples. The number of basic models can be 3 to 5 to ensure complementarity between models and reduce redundancy. During training, each basic model independently learns the sample historical load data in each set of training samples and predicts the sample prediction load data in the training sample. After training, each basic model outputs a set of prediction results for each set of training samples. These prediction results reflect the prediction performance of the basic model on a specific training sample. Since the basic models can have different prediction errors and biases, combining the prediction results of these models can reduce the uncertainty of single model prediction.

[0058] The prediction results output by the plurality of basic models for each set of training samples are combined with the sample prediction load data in the set of training samples to form an updated set of training samples. The updated training sample includes the original prediction target (i.e., the sample prediction load data) and the prediction results generated by the basic model as additional feature inputs. The meta-model can be a LightGBM model, and the meta-model learns how to combine the outputs of the basic models to predict the sample prediction load data.

[0059] Through the above steps, each iteration of training can produce a set of pending basic models and a pending meta-model, as well as related optimization parameters. This iterative and optimization process continues until the preset convergence condition is met or the maximum number of iterations is reached, thereby finally determining the model configuration with the best prediction performance. Such an iterative training process ensures that the target model can learn more comprehensive and complex patterns from historical load data, providing a more accurate and reliable solution for load prediction of power systems.

[0060] To avoid overfitting when training the meta-model, a preset cross-validation method is used to train the base model. Optionally, in the power system load prediction method provided in the embodiments of the present application, a plurality of base models are trained by a plurality of sets of training samples, and a plurality of to-be-determined base models are obtained, including: for each base model, the plurality of sets of training samples are divided into a plurality of folds by the preset cross-validation method, where the plurality of folds are mutually exclusive sets with equal sample quantities; a target fold is determined from the plurality of folds, and the base model is trained by taking the folds other than the target fold as a training set to obtain a to-be-screened base model; the target fold is taken as a validation set to verify the to-be-screened base model, and the prediction error of the to-be-screened base model is determined; the step of determining the target fold from the plurality of folds and training the base model by taking the folds other than the target fold as a training set to obtain the to-be-screened base model is repeatedly performed until all the folds are taken as the target fold to verify the to-be-screened base model, and a set of prediction errors is obtained; and the to-be-screened base model corresponding to the minimum prediction error in the set of prediction errors is determined as the to-be-determined base model.

[0061] In some examples, the preset cross-validation method can be a K-fold cross-validation method, and the plurality of sets of training samples are divided into K folds, each target fold D k (K-1) folds are taken as a training set. The training process of cross-validation can be represented by the following formula:

[0062]

[0063] For each base model, K times of training and verification are performed, and the prediction results of the validation set of each fold are collected to calculate the prediction error. The prediction error can be a normalized mean absolute error or a normalized root mean square error. The to-be-determined base model is screened through the prediction error.

[0064] The embodiments train the base model by the cross-validation method, ensure that the to-be-determined base model finally selected has the smallest prediction error in the prediction task, and thus improve the accuracy and reliability of the entire target model load prediction. This helps to avoid overfitting of the target model on a specific data set and ensures that the target model also has good prediction accuracy on unseen data.

[0065] In order to improve the generalization ability and stability of the target model, the parameters of the base model and the meta model are optimized by a preset optimization algorithm. Optionally, in the power system load prediction method provided in the embodiments of the present application, adjusting the parameters of the base model and the meta model by the preset optimization algorithm comprises: initializing a plurality of parameter groups by the preset optimization algorithm, wherein each parameter group represents the parameters of the plurality of base models and meta models in one iteration process; calculating the prediction error of the training result corresponding to each parameter group to obtain a group of prediction errors, and determining the parameter group corresponding to the minimum prediction error in the group of prediction errors as the target parameter group; in each iteration training process, updating the other parameter groups except the target parameter group, and calculating the prediction error of the updated other parameter groups, and in the case that the prediction error of the updated other parameter groups is less than the prediction error of the target parameter group, determining the updated other parameter groups as the updated target parameter group.

[0066] In some examples, first, a plurality of parameter groups are initialized using a preset optimization algorithm such as the MFO algorithm. These parameter groups cover all the hyperparameters of the base models and the meta models, such as the learning rate, the maximum leaf node number, the number of trees in the base models, and the corresponding parameters of the meta models. Each parameter group represents the parameter configuration of all models in one iteration process. For each parameter group, the training samples are predicted using the corresponding model configuration (including the base models and the meta models) to obtain the training result corresponding to each parameter group. Then, the difference between these prediction results and the actual sample prediction load data is calculated to obtain a group of prediction errors, which can be represented by normalized mean absolute error or normalized root mean square error and other indicators.

[0067] From the calculated group of prediction errors, the parameter group with the smallest prediction error is selected as the target parameter group. This means that the model configuration corresponding to this parameter group can produce the lowest prediction error in the current iteration, and is the best among all parameter configurations. In each iteration process, the MFO algorithm is used to update the other parameter groups except the target parameter group. The MFO algorithm searches and updates the parameter space through the simulation behavior between the moth and the flame, trying to find a parameter configuration that can further reduce the prediction error. The updated parameter group is used to retrain the model, and the prediction error is calculated again. If the prediction error produced by the updated parameter group is less than the prediction error of the current target parameter group, then this parameter group is determined as the new target parameter group, replacing the old target parameter group.

[0068] The embodiment iteratively optimizes the parameters of the base model and the meta model through the MFO algorithm, gradually approaches and determines the optimal parameter combination that minimizes the model prediction error. It ensures that the target model can achieve the best performance when processing the power load prediction task. Through continuous iteration and parameter updating, the final model can learn more accurate patterns from historical load data, reduce prediction error, and improve prediction reliability.

[0069] In the process of training the base model, the first loss function needs to be determined. Optionally, in the power system load prediction method provided in the embodiments of the present application, determining the first loss function of the plurality of base models comprises: for each base model, determining a first prediction result of a current iteration round of the target training sample and a second prediction result of the last iteration; calculating the sum of the first prediction result and the second prediction result to obtain a prediction result term; inputting the sample prediction load data of the target training sample and the prediction result term into a mean square error formula to obtain a loss term of the target training sample, and calculating the sum of the loss terms of the plurality of groups of training samples to obtain the first loss function.

[0070] In some examples, given a training dataset Where xi is the feature vector (i.e., sample historical load data), yi is the target value (i.e., sample prediction load data), and the first loss function of the base model can be as follows:

[0071]

[0072] Where F t-1 (x) is the prediction result of the base model in the t-1th round (i.e., the second prediction result of the last iteration), and f t (x) is a newly constructed decision tree in the tth round (i.e., the first prediction result of the current iteration round). The loss function may be a mean square error formula.

[0073] In each iteration, the base model needs to minimize the residual of the loss function. First, calculate the residual (i.e., negative gradient) of the tth round, and the calculation formula of the residual can be as follows:

[0074]

[0075] Then, fit a new decision tree f t (x) to fit the residual, and the expression is as follows:

[0076]

[0077] The update formula of the base model after iteration is as follows:

[0078] F t (x) = Ft-1 (x)+ηf t (x) (10)

[0079] wherein, η is a learning rate, used to control the step size of each iteration.

[0080] The embodiment determines the first loss function of the base model, the construction of the first loss function is the basis for optimizing the parameters of the base model, and the mean square error can sensitively capture the prediction error, guiding the MFO algorithm to adjust the parameters of the base model.

[0081] In the process of training the meta model, it is necessary to determine the second loss function. Optionally, in the power system load prediction method provided in the embodiment of the present application, determining the second loss function of the meta model comprises: for each group of training samples, determining the output result of inputting the prediction results of the plurality of base models into the meta model to obtain an output result item; inputting the sample prediction load data of the target training sample and the output result item into the mean square error formula to obtain a loss item of the target training sample, calculating the sum of the loss items of the plurality of groups of training samples to obtain the second loss function.

[0082] In some examples, the second loss function can be as follows:

[0083]

[0084] wherein, y i is the sample prediction load data, is the output result item, indicates the mean square error formula. The embodiment determines the second loss function, which reflects the difference between the prediction result of the meta model and the actual target value. By calculating the sum of the loss items of the plurality of groups of training samples, the second loss function is formed, which provides a clear target for the optimization of the meta model parameters. The optimization of the second loss function aims to find the best configuration of the meta model parameters to reduce the prediction error.

[0085] According to another embodiment of the present application, an optional target model is provided, Figure 3 is a structural schematic diagram of the optional target model according to the embodiment of the present application, as Figure 3As shown, Input Data is the training sample, Original data reconstruction is the training process of the base model, and five-fold cross-validation is used to train the base model. The training sample dataset is divided into five folds: Train1, Train2, Train3, Train4, and TrainN. These five folds are used in turn as the validation set Test, and the remaining folds are used as the training set. The base model can use five LightGBM models as the base model. The initial result contains the prediction results of the five base models: Result1, Result2, Result3, Result4, and ResultN. These results are used as training data for the meta-model, and the meta-model outputs the final prediction result, i.e., the final prediction result.

[0086] In the process of training the optional target model, the MFO algorithm is used to optimize the key hyperparameters of each LightGBM model, including learning rate (lr), maximum leaf node number (num_leaves), and number of trees (n_estimators). Through careful parameter optimization by the MFO algorithm, the optional target model has good generalization ability, and can also automatically select the best parameter configuration to support load prediction tasks.

[0087] In some computing examples, the system parameters of the optional target model used are the optimal values obtained after more than 50 iterations of optimization by the MFO algorithm, and the final parameter configuration results are presented in detail in Table 1. Table 1 shows the parameters of the base model in the optional target model.

[0088] Table 1

[0089]

[0090] The data in Table 1 clearly shows that there are significant differences between the parameters of the base models. The stacking model fusion strategy cleverly utilizes the differences between the base models to achieve a complementary effect, thereby further improving the prediction accuracy and stability.

[0091] The optional target model provided by the present embodiment seamlessly integrates the MFO algorithm with LightGBM-Stacking. By leveraging the heuristic optimization capabilities of the MFO algorithm and the ensemble learning advantages of LightGBM-Stacking, the accuracy and reliability of load forecasting are improved. The optional target model adopts a two-layer structure design, which not only enhances the learning effect but also reduces the redundancy and complexity of the prediction model. In the first layer, multiple different LightGBM models are integrated and used as base models. In the second layer, another LightGBM model serves as the meta-model for the final prediction.

[0092] During the training process, the training set is strategically divided into three parts, following the principle of cross-validation. This approach ensures a comprehensive and robust evaluation of the model performance. The predicted values from the base model layer are generated in N iterations and then combined into a new training set. This newly constructed set serves as the training input for the second layer prediction model, enabling it to learn from the outputs of the base models. Similarly, the N prediction sets output from the test data set of the base models create a new test data set, which is also used to train the second layer model, further improving its prediction accuracy. The final prediction is derived by integrating the outputs of both layers, effectively combining their strengths to provide a more accurate and reliable prediction.

[0093] To emphasize the superiority of the optional target model proposed by the present embodiment, a comparative analysis of the prediction performance of traditional machine learning models and their model fusion systems is conducted. Specifically, the single model LightGBM, XGBoost, and the Stacking model fusion method combining GBDT and XGBoost are compared with the optional target model proposed by the present embodiment to verify its superiority. During the comparison process, the parameters of each model are optimized using the MFO algorithm to ensure fairness and accuracy. Figure 4 is a comparison diagram of model prediction results according to the embodiments of the present application, as shown in Figure 4 the figure shows an enlarged view of the prediction curve for a specific day, making the comparison of the prediction results of each model clearer for observation and analysis.

[0094] From Figure 4It can be seen that among the five models considered, the optional target model proposed in this embodiment performs best in terms of prediction performance. It shows the highest curve fitting degree and is always closest to the true value curve, indicating its superior accuracy and reliability in prediction. In contrast, the prediction curves of the two single models XGBoost and LightGBM deviate greatly from the true value curve, highlighting their limitations in prediction performance. The prediction accuracy of the model using stacking fusion is significantly higher than that of several single models. Specifically, after stacking fusion, the prediction curve fitting degree of XGBoost is significantly improved, proving the effectiveness of the stacking method in improving prediction accuracy. Although the other four comparative models can also achieve good prediction results, they are still slightly inferior to the optional target model proposed in this embodiment. This further verifies the effectiveness and superiority of the optional target model proposed in this embodiment in achieving accurate and reliable prediction. Table 2 compares the prediction accuracy of the above five models.

[0095] Table 2

[0096] model Normalized mean absolute error (%) Normalized root mean square error (%) XGBoost 5.24 7.99 LightGBM 4.92 7.54 XGBoost+stacking 4.05 6.54 GBDT+stacking 4.23 7.01 proposed 3.64 5.81

[0097] From Table 2, it can be seen that the prediction error of the proposed model (i.e. the optional target model) proposed in this embodiment is the lowest and performs best. Specifically, its normalized mean absolute error is 1.6% lower than XGBoost, 1.28% lower than LightGBM, 0.41% lower than XGBoost+Stacking, and 0.59% lower than GBDT+Stacking. This data comparison further confirms the superiority and effectiveness of the optional target model proposed in this embodiment.

[0098] In order to verify the good generalization ability of the optional target model, a comparative experiment was conducted using additional data sets. The experimental data comes from real power load data in a specific region, covering the period from January 2019 to December 2020. These data are used as the training data set, with 48 sampling points per day and a sampling period of 30 minutes. The prediction target of this experiment is to predict the load in 2021. The model building platform is consistent with the above experiment to ensure the consistency of the experimental environment. Figure 5 is a comparison diagram of model prediction results of the additional data set provided according to the embodiments of the present application, as Figure 5 shown, in the test of the additional data set, the prediction effect of the optional target model proposed in this embodiment is still the best, fully verifying that the model has good generalization ability and excellent performance on different data sets. This result further proves the stability and applicability of the proposed model. Table 3 compares the prediction accuracy of the above five models on the additional data set.

[0099] Table 3

[0100] model Normalized mean absolute error (%) Normalized root mean square error (%) XGBoost 4.30 6.12 LightGBM 3.89 5.01 XGBoost+stacking 3.32 4.70 GBDT+stacking 3.63 5.23 proposed 2.78 3.42

[0101] Table 3 provides detailed prediction error statistics of the five prediction models on the additional dataset. By comparative analysis, it can be seen that the prediction error of the optional target model proposed in this embodiment is still the smallest, indicating that the best prediction performance is achieved on this dataset. This data result again confirms the superiority and generalization ability of the optional target model.

[0102] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from here.

[0103] The embodiments of the present application also provide a load prediction device of a power system. It should be noted that the load prediction device of the power system in the embodiments of the present application can be used to execute the load prediction method for the power system provided by the embodiments of the present application. The load prediction device provided by the embodiments of the present application is introduced as follows.

[0104] Figure 6 is a schematic diagram of the load prediction device of the power system provided by the embodiments of the present application. As shown in Figure 6 , the device comprises:

[0105] The acquisition unit 601 is configured to acquire historical load data of the power system in a preset period.

[0106] The input unit 602 is configured to input the historical load data into a target model to obtain predicted load data at a target time, wherein the target model comprises a plurality of target base models and a target meta model, the plurality of target base models output prediction results based on the historical load data as input data of the target meta model, and the target meta model processes the input data to obtain the predicted load data.

[0107] The load prediction device of the power system provided in the embodiment of the present application acquires the historical load data of the power system in a preset period through the acquisition unit 601; the input unit 602 inputs the historical load data into a target model to obtain the predicted load data at a target time, wherein the target model comprises a plurality of target base models and a target meta model, the predicted results output by the plurality of target base models based on the historical load data are taken as the input data of the target meta model, and the target meta model processes the input data to obtain the predicted load data, thereby solving the problem of low load prediction accuracy of the power system in the related art, effectively reducing the overfitting and underfitting problems that may exist in a single model by combining the outputs of the plurality of target base models to construct the target meta model, enhancing the robustness of the target model, and achieving accurate prediction of the power load by predicting the load of the power system through the target model. Therefore, the effect of improving the load prediction accuracy of the power system is achieved.

[0108] Optionally, in the load prediction device of the power system provided in the embodiment of the present application, the device further comprises: an extraction unit, configured to acquire a load record of the power system, extract a plurality of groups of load data from the load record, and extract sample historical load data and sample predicted load data from each group of load data; a first determination unit, configured to determine the sample historical load data and the sample predicted load data of each group of load data as a group of training samples to obtain a plurality of groups of training samples; a training unit, configured to perform multiple iteration training on each base model and meta model through the plurality of groups of training samples to obtain a training result after each iteration training, wherein the training result after each iteration training comprises a plurality of to-be-determined base models and a to-be-determined meta model, and each iteration training adjusts the parameters of the base model and the meta model through a preset optimization algorithm; and a second determination unit, configured to determine a first loss function of the plurality of base models and a second loss function of the meta model, and determine the target model from the training result after each iteration training by minimizing the function values of the first loss function and the second loss function.

[0109] Optionally, in the load prediction device of the power system provided in the embodiment of the present application, the training unit comprises: a first training module, configured to train the plurality of base models through the plurality of groups of training samples to obtain the plurality of to-be-determined base models for each iteration training; a first determination module, configured to determine a group of prediction results output by the plurality of base models for each group of training samples to obtain a group of prediction results of each group of training samples; a second determination module, configured to determine the group of prediction results of each group of training samples and the sample predicted load data in the training sample as an updated group of training samples to obtain updated plurality of groups of training samples; and a second training module, configured to train the meta model based on the updated plurality of groups of training samples to obtain the to-be-determined meta model.

[0110] Optionally, in the power system load prediction device provided by the embodiment of the present application, the first training module comprises: a division submodule, configured to divide, for each base model, a plurality of sets of training samples into a plurality of folds by a preset cross-validation method, wherein the plurality of folds are mutually exclusive sets with equal sample quantities; a first determination submodule, configured to determine a target fold from the plurality of folds, and train the base model using the folds other than the target fold as a training set to obtain a to-be-screened base model; a verification submodule, configured to verify the to-be-screened base model using the target fold as a verification set to determine a prediction error of the to-be-screened base model; an execution submodule, configured to repeatedly perform the steps of determining a target fold from the plurality of folds, and training the base model using the folds other than the target fold as a training set to obtain a to-be-screened base model until all the folds are used as the target fold to verify the to-be-screened base model, and obtaining a set of prediction errors; and a second determination submodule, configured to determine the to-be-screened base model corresponding to the minimum prediction error in the set of prediction errors as a to-be-determined base model.

[0111] Optionally, in the power system load prediction device provided by the embodiment of the present application, the training unit comprises: an initialization module, configured to initialize a plurality of sets of parameters by a preset optimization algorithm, wherein each set of parameters represents the parameters of the plurality of base models and the meta model in one iteration process; a first calculation module, configured to calculate the prediction error of the training result corresponding to each set of parameters to obtain a set of prediction errors, and determine the set of parameters corresponding to the minimum prediction error in the set of prediction errors as a target set of parameters; and an update module, configured to update, in each iteration training process, the other sets of parameters except the target set of parameters, and calculate the prediction error of the updated other sets of parameters, and in the case that the prediction error of the updated other sets of parameters is less than the prediction error of the target set of parameters, determine the updated other sets of parameters as an updated target set of parameters.

[0112] Optionally, in the power system load prediction device provided by the embodiment of the present application, the second determination unit comprises: a third determination module, configured to determine, for each base model, a first prediction result of a current iteration round of the target training sample and a second prediction result of a last iteration; a second calculation module, configured to calculate the sum of the first prediction result and the second prediction result to obtain a prediction result item; and a first input module, configured to input the sample predicted load data of the target training sample and the prediction result item into a mean square error formula to obtain a loss item of the target training sample, calculate the sum of the loss items of the plurality of sets of training samples to obtain a first loss function.

[0113] Optionally, in the power system load prediction device provided by the embodiment of the application, the second determination unit comprises: a fourth determination module, configured to determine, for each set of training samples, an output result of inputting the prediction results of the plurality of base models into the meta model to obtain an output result item; and a second input module, configured to input the sample prediction load data of the target training sample and the output result item into a mean square error formula to obtain a loss item of the target training sample, and calculate the sum of the loss items of the plurality of sets of training samples to obtain the second loss function.

[0114] The power system load prediction device comprises a processor and a memory, the acquisition unit 601 and the input unit 602 are stored in the memory as program units, and the corresponding functions are realized by executing the program units stored in the memory by the processor.

[0115] The processor comprises a core, and the core retrieves the corresponding program units from the memory. One or more than one core can be arranged, and the power system load prediction accuracy can be improved by adjusting the core parameters.

[0116] The memory can comprise a non-permanent memory in a computer readable medium, a random access memory (RAM) and / or a non-volatile memory such as a read-only memory (ROM) or a flash memory (flash RAM), and the memory comprises at least one memory chip.

[0117] The embodiment of the application provides a computer readable storage medium, which stores a program, and the program is executed by a processor to realize the power system load prediction method.

[0118] The embodiment of the application provides a processor, which is used for running a program, and the program is executed to realize the power system load prediction method.

[0119] Figure 7 is a schematic diagram of an electronic device provided by the embodiment of the application. As shown in Figure 7 The electronic device 701 comprises a processor, a memory and a program stored in the memory and capable of running on the processor, and the processor realizes the following steps when executing the program: acquiring historical load data of a power system in a preset period; inputting the historical load data into a target model to obtain prediction load data at a target time, wherein the target model comprises a plurality of target base models and a target meta model, the prediction results output by the plurality of target base models based on the historical load data are used as input data of the target meta model, and the target meta model processes the input data to obtain the prediction load data. The device in the present application can be a server, a PC, a PAD, a mobile phone and the like.

[0120] The application further provides a computer program product, which is suitable for executing the program of the following method steps when executed on a data processing device: obtaining historical load data of a power system in a preset period; inputting the historical load data into a target model to obtain predicted load data at a target time, wherein the target model comprises a plurality of target base models and a target meta model, the plurality of target base models output a prediction result based on the historical load data as input data of the target meta model, and the target meta model processes the input data to obtain the predicted load data.

[0121] Those skilled in the art will understand that embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0122] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in a flow or multiple flows and / or blocks Figure 1 The functions specified in a flow or multiple flows and / or blocks

[0123] These computer program instructions can also be stored in a computer-readable memory capable of guiding a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including instruction devices that implement the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in a flow or multiple flows and / or blocks Figure 1 The functions specified in a flow or multiple flows and / or blocks

[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in a flow or multiple flows and / or blocks Figure 1 The functions specified in a flow or multiple flows and / or blocks

[0125] In one typical arrangement, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0126] Memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory, etc. Memory is an example of computer readable storage media.

[0127] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.

[0128] It should also be noted that the terms "comprising," "including," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0129] Those skilled in the art will appreciate that embodiments of the present application can be devised for a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.

[0130] The above merely provides an example of the present application, and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall fall into the scope of claims of the present application.

Claims

1. A load forecasting method for a power system, characterized in that, include: Obtain historical load data of the power system within a preset period; The historical load data is input into the target model to obtain the predicted load data at the target time. The target model includes multiple target basic models and one target meta-model. The prediction results output by the multiple target basic models based on the historical load data are used as the input data of the target meta-model. The target meta-model processes the input data to obtain the predicted load data. The target model is obtained as follows: Load records of the power system are acquired; multiple sets of load data are extracted from the load records; sample historical load data and sample predicted load data are extracted from each set of load data; the sample historical load data and sample predicted load data of each set of load data are determined as a set of training samples, resulting in multiple sets of training samples; each basic model and meta-model are iteratively trained using the multiple sets of training samples to obtain the training results after each iteration, wherein the training results after each iteration include multiple undetermined basic models and one undetermined meta-model; the parameters of the basic models and the meta-model are adjusted using a preset optimization algorithm during each iteration; a first loss function for the multiple basic models and a second loss function for the meta-model are determined; the target model is determined from the training results after each iteration by minimizing the function values ​​of the first loss function and the second loss function. The process of adjusting the parameters of the base model and the meta-model using a preset optimization algorithm includes: initializing multiple sets of parameters using the preset optimization algorithm, where each set of parameters represents the parameters of multiple base models and meta-models in one iteration; calculating the prediction error of the training results corresponding to each set of parameters to obtain a set of prediction errors, and determining the parameter set corresponding to the smallest prediction error in the set of prediction errors as the target parameter set; updating other parameter sets except the target parameter set in each iteration of training, and calculating the prediction error of the updated other parameter sets; if the prediction error of the updated other parameter sets is less than the prediction error of the target parameter set, the updated other parameter sets are determined as the updated target parameter set. The determination of the first loss function for multiple base models includes: for each base model, determining the first prediction result of the current iteration and the second prediction result of the previous iteration for the target training sample; calculating the sum of the first prediction result and the second prediction result to obtain a prediction result term; inputting the sample prediction load data of the target training sample and the prediction result term into the mean square error formula to obtain the loss term of the target training sample; and calculating the sum of the loss terms of the multiple training samples to obtain the first loss function. The determination of the second loss function of the meta-model includes: for each group of training samples, determining to input the prediction results of multiple base models into the output result of the meta-model to obtain an output result term; inputting the sample prediction load data of the target training sample and the output result term into the mean square error formula to obtain the loss term of the target training sample; and calculating the sum of the loss terms of the multiple groups of training samples to obtain the second loss function.

2. The method according to claim 1, characterized in that, The training results after each iteration are obtained by performing multiple training iterations on each base model and meta-model using the multiple sets of training samples. For each iteration of training, multiple base models are trained using the multiple sets of training samples to obtain the multiple undetermined base models; Determine a set of prediction results output by the multiple base models for each set of training samples, and obtain a set of prediction results for each set of training samples; The prediction results of each training sample and the sample prediction load data in the training sample are determined as the updated training sample, and multiple updated training samples are obtained. The meta-model is trained based on the updated multiple sets of training samples to obtain the undetermined meta-model.

3. The method according to claim 2, characterized in that, Multiple base models are trained using the multiple sets of training samples, resulting in the following multiple undetermined base models: For each base model, the multiple sets of training samples are divided into multiple folds using a preset cross-validation method, wherein the multiple folds are mutually exclusive sets with an equal number of samples; The target fold is determined from the plurality of folds, and the base model is trained using the folds other than the target fold from the plurality of folds as the training set to obtain the base model to be screened. The target fold is used as a validation set to validate the basic model to be screened, and the prediction error of the basic model to be screened is determined. Repeat the steps of determining the target fold from the plurality of folds, training the base model with the folds other than the target fold from the plurality of folds as the training set, and obtaining the base model to be screened, until all folds are used as target folds to verify the base model to be screened, and obtain a set of prediction errors; The basic model to be screened corresponding to the smallest prediction error in the set of prediction errors is determined as the undetermined basic model.

4. A load forecasting device for a power system, characterized in that, include: The acquisition unit is used to acquire historical load data of the power system within a preset period; An input unit is used to input the historical load data into a target model to obtain the predicted load data at a target time. The target model includes multiple target basic models and a target meta-model. The prediction results output by the multiple target basic models based on the historical load data are used as the input data of the target meta-model. The target meta-model processes the input data to obtain the predicted load data. An extraction unit is used to acquire the load records of the power system, extract multiple sets of load data from the load records, and extract sample historical load data and sample predicted load data from each set of load data; a first determination unit is used to determine the sample historical load data and sample predicted load data of each set of load data as a set of training samples, thereby obtaining multiple sets of training samples; a training unit is used to perform multiple iterative training on each basic model and meta-model using the multiple sets of training samples, thereby obtaining the training results after each iteration, wherein the training results after each iteration include multiple undetermined basic models and one undetermined meta-model, and the parameters of the basic model and the meta-model are adjusted by a preset optimization algorithm in each iteration; a second determination unit is used to determine the first loss function of the multiple basic models and the second loss function of the meta-model, and determine the target model from the training results after each iteration by minimizing the function values ​​of the first loss function and the second loss function; The training unit includes: an initialization module for initializing multiple sets of parameters using the preset optimization algorithm, wherein each set of parameters represents the parameters of multiple base models and meta-models in one iteration; a first calculation module for calculating the prediction error of the training results corresponding to each set of parameters, obtaining a set of prediction errors, and determining the set of parameters corresponding to the smallest prediction error in the set of prediction errors as the target parameter set; and an update module for updating other parameter sets except the target parameter set in each iteration of training, and calculating the prediction error of the updated other parameter sets, and determining the updated other parameter sets as the updated target parameter set if the prediction error of the updated other parameter sets is less than the prediction error of the target parameter set. The second determining unit includes: a third determining module, used for determining, for each base model, the first prediction result of the current iteration and the second prediction result of the previous iteration for the target training sample; a second calculation module, used for calculating the sum of the first prediction result and the second prediction result to obtain a prediction result term; and a first input module, used for inputting the sample prediction load data of the target training sample and the prediction result term into the mean square error formula to obtain the loss term of the target training sample, and calculating the sum of the loss terms of the multiple sets of training samples to obtain the first loss function. The second determining unit includes: a fourth determining module, used for determining, for each group of training samples, the prediction results of multiple base models are input into the output result of the meta-model to obtain an output result item; and a second input module, used for inputting the sample prediction load data of the target training sample and the output result item into the mean square error formula to obtain the loss item of the target training sample, and calculating the sum of the loss items of the multiple groups of training samples to obtain the second loss function.

5. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the load forecasting method for the power system according to any one of claims 1 to 3.

6. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the load forecasting method for the power system according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Federal learning modeling method based on stacking ensemble learning algorithm

    CN117273176A

  • Hybrid clustering and stacking integrated deep learning photovoltaic output prediction method and system

    CN119382063A