Short-term power load prediction method and device based on multi-model fusion
By constructing a large power load forecasting model with a multi-layer structure, combined with multiple sub-models and meteorological data, the problem of insufficient power load forecasting accuracy in the existing technology is solved, more accurate and stable short-term power load forecasting is achieved, and the power system is supported. Optimized and economical operation.
Patent Information
- Application Number
- CN202410676659.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-05-29
AI Technical Summary
Existing power load forecasting methods are difficult to achieve accurate and stable predictions. Especially when processing nonlinear and non-stationary power load data, the prediction accuracy is insufficient and difficult to capture complex seasonal, trend and periodic characteristics.
A short-term power load forecasting method based on multi-model fusion is used to build a large hierarchical forecasting model, including multiple parallel sub-models, such as KAN neural network, NGBoost, MQSAPN, RGF, SLOTH, iTransformer, etc., through optimizing parameters and iterative optimization process. Combine meteorological data for forecasting to improve the accuracy and stability of forecast results.
Through multi-model fusion and optimized parameters, the accuracy and stability of power load forecasting are significantly improved, prediction errors are reduced, more reliable short-term power load forecasting results are provided, and the optimized resource allocation and economic operation of the power system are supported.
Smart Images

Figure CN118690159A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power load forecasting, and in particular to a short-term power load forecasting method, device, electronic device and computer-readable storage medium based on multi-model fusion. Background Art
[0002] Power load forecasting plays the following important roles in the power system:
[0003] First, it can optimize resource allocation and power generation plans. For example, by predicting future electricity demand, the power system can formulate power generation plans in advance, reasonably arrange the grid operation mode and unit maintenance plan, thereby saving resources such as coal and oil, while reducing power generation and operating costs, optimizing resource allocation, and further formulating reasonable power supply construction plans.
[0004] Second, it can ensure the safe and economical operation of the power system: The accuracy and stability of load forecasting are crucial to the safe and economical operation of the power system. It helps to avoid insufficient or excessive power supply, ensure the stable operation of the power system, reduce the risk of power outages, and improve the economic and social benefits of the power system.
[0005] Third, provide a basis for the decision-making of power sales companies: In the spot market, contract signing strategies, trading strategies, etc. all rely on the results of load forecasting. Without accurate load forecasting, power sales companies cannot make quotations in the spot market, which may lead to high deviation costs.
[0006] In short, power load forecasting is crucial to the stable operation, resource optimization and economic benefits of the power system.
[0007] The existing methods of power load forecasting mainly include statistical forecasting methods and artificial intelligence methods based on machine models. Among them: statistical forecasting methods are mainly based on statistical models, time series analysis, etc., which not only have a large workload, but also often have difficulty in processing nonlinear and non-stationary power load data, and have limited ability to capture complex seasonal, trend and periodic characteristics, and the prediction accuracy is difficult to guarantee. Artificial intelligence methods are a hot topic of research, and their widely used machine models mainly include back propagation neural networks, support vector machines, convolutional neural networks (CNNs), long short-term memory networks (LSTMs), stacked denoising autoencoder networks (SDAEs) and deep belief networks (DBNs). Among them: deep learning, as an emerging research direction in the field of artificial intelligence, has been applied in the field of power load forecasting, but the prediction effect still has room for improvement.
[0008] Therefore, how to achieve accurate and stable prediction of power load data has become an urgent problem that needs to be solved. Summary of the invention
[0009] In view of this, the main purpose of the present invention is to provide a short-term power load forecasting method, device, electronic device and computer-readable storage medium based on multi-model fusion, in order to at least partially solve the above technical problems.
[0010] In order to achieve the above object, as a first aspect of the present invention, a short-term power load forecasting method based on multi-model fusion is provided, comprising the following steps:
[0011] Collect power load data and meteorological data respectively to obtain original training data;
[0012] Constructing a hierarchical prediction model, wherein the hierarchical prediction model comprises a first layer, a second layer and a third layer connected in sequence, wherein an input end of the first layer is connected to an input end of the second layer, and an output end of the first layer is connected to an input end of the third layer; and each layer comprises at least one sub-model;
[0013] Training and optimizing the parameters of each layer in the hierarchical prediction model based on the original training data;
[0014] Real-time collection of power load data and meteorological data is used as input into the trained hierarchical prediction model to predict short-term power load.
[0015] According to a preferred embodiment of the present invention, the first layer includes a plurality of first sub-models connected in parallel, the second layer includes a plurality of second sub-models connected in parallel, and the third layer includes a third sub-model.
[0016] According to a preferred embodiment of the present invention, the types of the first sub-models are different, and at least include a KAN neural network model, and at least one model selected from a natural gradient boosting machine NGBoost, a multi-head quantum self-attention neural network prediction model MQSAPN, a regularized greedy forest RGF, a SLOTH model, and an iTransformer model; the types of the second sub-models are different, and are selected from at least two of a random forest model RF and a light gradient boosting machine lightGBM; the third sub-model is a partial least squares regression model PLSR.
[0017] According to a preferred embodiment of the present invention, the training and optimizing the parameters of each layer in the hierarchical prediction model based on the original training data includes:
[0018] Initialize the parameter value range of each layer of the hierarchical prediction model and configure the initial optimization iteration number;
[0019] Randomly generate N populations, initialize the fitness of all individuals in the N populations, and configure the first optimization iteration number;
[0020] Based on the first optimization iteration number, the N populations are respectively optimized for the first time, and the fitness is updated to obtain the optimal individuals of the N populations;
[0021] The best individuals of the N populations are used as the initial population, and the number of second optimization iterations is configured to perform second optimization to obtain the individual with the best fitness.
[0022] When the current number of iterations meets the second optimization iteration number requirement, and the total number of iterations meets the initial optimization iteration number requirement, the optimal individual is output as the parameter of each layer of the hierarchical prediction model;
[0023] Wherein: N is a natural number.
[0024] According to a preferred embodiment of the present invention, each population includes m individuals, and the first optimization is performed on the N populations based on the first optimization iteration number, and the fitness is updated to obtain the optimal individuals of the N populations, including:
[0025] The steps of updating and optimizing the m individuals of each population are as follows: forming triangle topological units, global aggregation, and local aggregation are performed on the m individuals in turn to update the m individuals; calculating the fitness of the m individuals after the update, and updating the optimal individual of this iteration according to the size of the fitness;
[0026] Determine whether the current number of iterations reaches the first optimization iteration number;
[0027] If not satisfied, return to execute the step of updating and optimizing the m individuals in each population;
[0028] If it is satisfied, compare the fitness of the best individual obtained from each iteration of each population, and take the individual with the highest fitness as the best individual of the population;
[0029] Wherein: m is a natural number.
[0030] According to a preferred embodiment of the present invention, the second optimization is performed by the following formula:
[0031]
[0032] in: is the position of the i-th individual at time t, f i is the fragrance value emitted by the i-th individual, p is the conversion probability, and the optimal solution at time t is g * , Cauchy(0,1) and N(0,1) are standard Cauchy distribution and standard Gaussian distribution respectively, r∈[0,1] is a random number, T2 is the number of second optimization iterations, and are the solutions corresponding to the positions of the j-th individual and the k-th individual at time t, respectively. i and j are both natural numbers less than or equal to N.
[0033] According to a preferred embodiment of the present invention, the second optimization further comprises:
[0034] Randomly select three parent individuals of different dimensions;
[0035] Perform vertical crossover operation on the d1th dimension, d2th dimension and d3th dimension of the parent individual to generate the offspring individual;
[0036] The fitness values of the generated offspring individuals are compared with those of the parent individuals, and the individuals with better fitness values are retained as the individuals with the best fitness.
[0037] According to a preferred embodiment of the present invention, the offspring individuals are obtained by the following formula:
[0038] MS VC (i,d1)=n(qx(i,d1)+(1-q)x(i,d2))+(1-n)x(i,d3)
[0039] Among them: MS VC (i,d1) is the offspring individual obtained after the longitudinal operation, q∈[0,1] and n∈[0,1] are random numbers.
[0040] In order to solve the above technical problems, the second aspect of the present invention provides a short-term power load forecasting device based on multi-model fusion, comprising:
[0041] The acquisition module is used to respectively collect power load data and meteorological data to obtain original training data;
[0042] A construction module is used to construct a hierarchical prediction large model, wherein the hierarchical prediction large model includes a first layer, a second layer, and a third layer connected in sequence, wherein an input end of the first layer is connected to an input end of the second layer, and an output end of the first layer is connected to an input end of the third layer; and each layer includes at least one sub-model;
[0043] An optimization training module, used for training and optimizing the parameters of each layer in the hierarchical prediction model based on the original training data;
[0044] The prediction module collects power load data and meteorological data in real time and inputs them into the trained hierarchical prediction model to predict short-term power load.
[0045] In order to solve the above technical problems, the third aspect of the present invention provides an electronic device, including:
[0046] Processor; and
[0047] A memory storing computer executable instructions, which when executed cause the processor to perform the method according to any one of the above.
[0048] To solve the above technical problems, the fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, any of the methods described above is implemented.
[0049] The short-term power load forecasting method, device, electronic device and computer storage medium based on multi-model fusion provided by the present invention are constructed, trained and optimized by constructing a hierarchical forecasting large model including a three-layer structure, wherein: the hierarchical forecasting large model includes a first layer, a second layer and a third layer connected in sequence, and the input end of the first layer is connected to the input end of the second layer, and the output end of the first layer is connected to the input end of the third layer; each layer includes at least one sub-model. In this way, the real-time data (load data and meteorological data) is processed by the model in the first layer to obtain a first prediction value; the first prediction value and the data to be predicted are processed by the model in the second layer to obtain a second prediction value, and the first prediction value and the second prediction value are processed by the model in the third layer to obtain the final power load forecasting result, thereby integrating the real-time data and the prediction results of each sub-model in each layer of the hierarchical forecasting large model to improve the accuracy and stability of the prediction results.
[0050] Compared with the prior art, there are at least the following beneficial effects:
[0051] 1. By building a hierarchical prediction model, the real-time data and the prediction results of each sub-model in each layer of the hierarchical prediction model are integrated to improve the accuracy and stability of the prediction results.
[0052] 2. Each layer of sub-models is selected from different types, and multiple tree ensemble models are integrated with neural network models and quantum neural networks, which effectively utilizes the prediction capabilities of multiple models and improves the accuracy and stability of prediction results.
[0053] 3. By optimizing the parameters of each layer of the hierarchical prediction model, the model prediction error can be reduced and the accuracy of the prediction results can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to make the technical problems solved by the present invention, the technical means adopted and the technical effects achieved more clearly, the specific embodiments of the present invention will be described in detail with reference to the accompanying drawings. However, it should be noted that the accompanying drawings described below are only drawings of exemplary embodiments of the present invention, and those skilled in the art can obtain drawings of other embodiments based on these drawings without creative work.
[0055] Figure 1 It is a schematic diagram of a process of a short-term power load forecasting method based on multi-model fusion provided by an embodiment of the present invention;
[0056] Figure 2 It is a schematic diagram of the structure of the hierarchical prediction large model constructed in an embodiment of the present invention;
[0057] Figure 3 It is a schematic diagram of a process for optimizing parameters of each layer of a hierarchical prediction model according to an embodiment of the present invention;
[0058] Figure 4 It is a schematic diagram of the structural framework of a short-term power load forecasting device based on multi-model fusion provided by an embodiment of the present invention;
[0059] Figure 5 is a structural block diagram of an exemplary embodiment of an electronic device according to the present invention;
[0061] Figure 6 is a schematic diagram of an embodiment of a computer readable medium of the present invention. DETAILED DESCRIPTION
[0062] Exemplary embodiments of the present invention will now be described more fully with reference to the accompanying drawings. However, exemplary embodiments can be implemented in a variety of forms, and should not be construed as limiting the present invention to the embodiments set forth herein. On the contrary, providing these exemplary embodiments enables the present invention to be more comprehensive and complete, and is more convenient for fully conveying the inventive concept to those skilled in the art. The same reference numerals in the figures represent the same or similar elements, components or parts, and thus their repeated description will be omitted.
[0063] Under the premise of being consistent with the technical concept of the present invention, the features, structures, characteristics or other details described in a specific embodiment do not exclude that they can be combined in one or more other embodiments in a suitable manner.
[0064] In the description of specific embodiments, the features, structures, characteristics or other details described in the present invention are intended to enable those skilled in the art to fully understand the embodiments. However, it does not exclude that those skilled in the art can practice the technical solutions of the present invention without one or more of the specific features, structures, characteristics or other details.
[0065] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0066] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0067] It should be understood that although the terms "first", "second", "third", etc. may be used herein to describe various devices, elements, components or parts, this should not be limited by these terms. These terms are used to distinguish one from another. For example, a first device may also be called a second device without departing from the essential technical solution of the present invention.
[0068] The term "and / or" or "and / or" includes any one and all combinations of one or more of the associated listed items.
[0069] The embodiment of the present invention provides a short-term power load forecasting method based on multi-model fusion, such as Figure 1 As shown, the method includes:
[0070] S1, respectively collect power load data and meteorological data to obtain original training data;
[0071] Considering that the meteorological environment has a certain impact on the power load, for example, when the temperature is too low or too high, people will use electrical appliances such as air conditioners, which will obviously increase the power load. This application collects both power load data and meteorological data. Among them, meteorological data can include: temperature, humidity and air pressure.
[0072] Furthermore, in order to improve the prediction accuracy, this step can also pre-process the collected original training data, such as: missing value processing, normalization processing, etc. Among them: missing value processing can directly delete the data with missing values, or fill in the missing values through mean interpolation, high-dimensional mapping, maximum likelihood estimation, matrix completion and other methods.
[0073] In addition, the original training data can be divided into training set and test set to facilitate subsequent training and testing.
[0074] S2. Build a large hierarchical prediction model.
[0075] The hierarchical prediction large model includes a first layer, a second layer, and a third layer connected in sequence, and the input end of the first layer is connected to the input end of the second layer, and the output end of the first layer is connected to the input end of the third layer, and each layer includes at least one sub-model. In this way, the data to be processed is processed by the model in the first layer to obtain the first prediction value; the first prediction value and the data to be predicted are processed by the model in the second layer to obtain the second prediction value, and the first prediction value and the second prediction value are processed by the model in the third layer to obtain the final power load prediction result, thereby integrating the data to be processed and the prediction results of each sub-model in each layer of the hierarchical prediction large model to improve the accuracy and stability of the prediction results.
[0076] In the embodiment of the present invention, each layer of the hierarchical prediction model may include only one sub-model or multiple sub-models, and the types of each sub-model may be the same or different. If a layer includes multiple sub-models, the multiple sub-models may be connected in parallel or in series, and the present invention does not make specific restrictions. When connected in parallel, the output of each sub-model in the same layer is used as the output result of the layer, and can be input into the next layer or other layers.
[0077] In a preferred example, Figure 2 As shown, the hierarchical prediction large model includes a first layer, a second layer, and a third layer connected in sequence, and the input end of the first layer is connected to the input end of the second layer, and the output end of the first layer is connected to the input end of the third layer, and each layer includes at least one sub-model. Among them: the first layer includes multiple first sub-models in parallel, the second layer includes multiple second sub-models in parallel, and the third layer includes a third sub-model.
[0078] Optionally, the types of the first sub-models are different, including: a KAN neural network model, and at least one model selected from a natural gradient boosting machine NGBoost, a multi-head quantum self-attention neural network prediction model MQSAPN, a regularized greedy forest RGF, a SLOTH model, and an iTransformer model; the types of the second sub-models are different, and are selected from at least two of a random forest model RF and a light gradient boosting machine lightGBM; the third sub-model is a partial least squares regression model PLSR.
[0079] In a specific embodiment, Figure 2 As shown, the first layer includes: parallel NGBoost model, MQSAPN model, RGF model, SLOTH model, iTransformer model and KAN neural network model, the second layer includes: parallel RF model and lightGBM model, and the third layer includes only one PLSR model.
[0080] In this embodiment, the collected load data and meteorological data are respectively output by the NGBoost model, MQSAPN model, RGF model, SLOTH model, iTransformer model and KAN neural network model connected in parallel in the first layer, and the first prediction results obtained by predicting the load data and meteorological data from different dimensions are obtained, wherein: the NGBoost model uses Gradient Boosting to achieve prediction uncertainty estimation through probability prediction (including real-valued output). By using natural gradient, NGBoost overcomes the technical challenge of making general probability prediction difficult through gradient promotion. The MQSAPN model includes a multi-head quantum self-attention module and a variational quantum circuit prediction module. By encoding the quantum state of the input data and calculating K, Q, and V according to the time step, the Gaussian function is used to estimate the self-attention coefficient, and the data extracted from the quantum self-attention feature is encoded again into the variational prediction circuit, and the prediction result is finally obtained after circuit evolution and measurement. The RGF model is a decision tree-based boosting algorithm that improves the shortcomings of GBDT. The SLOTH model (Structured Learning and Task-based Optimization for Time Series Forecasting on Hierarchies) is a model for hierarchical time series forecasting, which includes two tree-based feature integration mechanisms, namely top-down convolution and bottom-up attention integration mechanisms, to utilize hierarchical information to improve forecasting performance. The KAN neural network model is an improvement on the MLP, inspired by the Kolmogorov-Arnold representation theorem. Unlike MLP, KAN puts learnable activation functions on weights and has excellent learning ability. iTransformer (Inverted Transformer) is an innovative time series forecasting model that aims to solve the problems of performance degradation and computational explosion of traditional Transformer models when predicting time series with large lookback windows.
[0081] Subsequently, the six first prediction results, as well as the collected load data and meteorological data, are subjected to the first fusion processing by the RF model and lightGBM model in parallel in the second layer, respectively, to obtain two second prediction results, where: the RF model is an integrated learning method that improves the accuracy and stability of classification or regression by building multiple decision trees. The lightGBM model is based on the gradient boosting framework and has faster training speed and lower memory consumption.
[0082] Finally, the 6 first prediction results output by the first layer and the 2 second prediction results output by the second layer are input into the PLSR model of the third layer to obtain the final prediction results. Among them: The PLSR model finds the basic relationship between the two matrices (X and Y) and finds the multidimensional direction of the X space to explain the multidimensional direction with the largest variance in the Y space. It is suitable when the prediction matrix has more variables than the observation and there is multicollinearity in the value of X.
[0083] S3, training and optimizing the parameters of each layer in the hierarchical prediction model based on the original training data;
[0084] In the first optimization process, the optimal parameters are continuously searched within the parameter range, where each triangular topological unit can be represented as a search individual, and similar triangular topological units of different sizes are formed by aggregation as basic evolutionary units, relying on the best individual in each triangular unit to guide the evolution of individuals in the unit. This evolutionary population not only relies on excellent individuals guided by the global approach, but also absorbs the effective positive information of the best individual in each unit, which helps to solve complex optimization problems and overcome the disadvantage of traditional methods entering local extreme values during global search.
[0085] For example, Figure 3 As shown, this step may include:
[0086] S301, initializing the parameter value range of each layer of the hierarchical prediction model, and configuring the initial optimization iteration number T0;
[0087] S302, randomly generate N populations, initialize the fitness of all individuals in the N populations, and configure the first optimization iteration number T1;
[0088] Each individual in the population is equivalent to a set of parameters (parameter 1, parameter 2, ..., parameter d) of the hierarchical prediction model, where: N is a natural number, and d is the total number of parameters of the hierarchical prediction model.
[0089] Exemplarily, the prediction accuracy of the hierarchical prediction large model can be used as the individual fitness to initialize the fitness of all individuals in the N populations.
[0090] The first optimization iteration number T1 is the upper limit of the iteration number for each population.
[0091] S303, performing first optimization on N populations respectively based on the first optimization iteration number, and updating fitness to obtain the optimal individuals of the N populations;
[0092] Assume that each population contains m individuals, where m is a natural number. The following steps can be performed:
[0093] Step s11, the step of updating and optimizing the m individuals of each population: performing triangular topological unit formation, global aggregation, and local aggregation on the m individuals in turn to update the m individuals; calculating the fitness of the m individuals after the update, and updating the optimal individual of this iteration according to the fitness;
[0094] Step s12, determining whether the current number of iterations reaches the first optimization iteration number T1;
[0095] Step s13: If not satisfied, return to step s11;
[0096] Step s14: If satisfied, compare the fitness of the best individuals obtained from each iteration of each population, and take the individual with the highest fitness as the best individual of the population; eventually, N best individuals from N populations will be obtained.
[0097] S304: Use the best individuals of the N populations as the initial population, configure the second optimization iteration number T2, perform the second optimization, and obtain the individual with the best fitness.
[0098] The second optimization is performed by the following formula:
[0099]
[0100]
[0101] in: is the position of the i-th individual at time t, f i is the fragrance value emitted by the i-th individual, p is the conversion probability, and the optimal solution at time t is g * , Cauchy(0,1) and N(0,1) are standard Cauchy distribution and standard Gaussian distribution respectively, r∈[0,1] is a random number, T2 is the number of iterations of the second optimization, that is, the upper limit of the number of iterations of each population in the second optimization, and are the solutions corresponding to the positions of the j-th individual and the k-th individual at time t, respectively. i and j are both natural numbers less than or equal to N.
[0102] The above optimization method is prone to fall into local optimum in the later stage of iteration, which is often caused by some individuals falling into local optimum in a certain dimension during the population update process. Therefore, the vertical crossover operation can be further introduced to improve the ability of the algorithm to jump out of the local optimum. Among them: the vertical crossover operation randomly selects individuals of 3 different dimensions for arithmetic crossover during the optimization process, and the other dimensions remain unchanged, so that the stagnant dimensions have the opportunity to jump out of the local optimum. Then the second optimization can also include:
[0103] s21, randomly select three parent individuals of different dimensions;
[0104] s22, perform a vertical crossover operation on the d1th dimension, d2th dimension and d3th dimension of the parent individual to generate the offspring individual;
[0105] Specifically, the offspring individual can be obtained by the following formula:
[0106] MS VC (i,d1)=n(qx(i,d1)+(1-q)x(i,d2))+(1-n)x(i,d3)
[0107] Among them: MS VC (i,d1) is the offspring individual obtained after the vertical operation, q∈[0,1] and n∈[0,1] are random numbers,
[0108] s23. Compare the fitness values of the generated offspring individuals with those of the parent individuals, and retain the individuals with better fitness values as the individuals with the best fitness.
[0109] S305, when the current number of iterations meets the second optimization iteration number requirement, and the total number of iterations meets the initial optimization iteration number requirement, output the optimal individual as the parameter of each layer of the hierarchical prediction large model;
[0110] like Figure 3 , this step may include:
[0111] s31, judging whether the current number of iterations is ≤ the second optimization iteration number T2, if it is less than or equal to, returning to step S304, if it is greater than, executing step s32;
[0112] s32. Determine whether the current total number of iterations is ≤T0. If it is less than or equal to T0, randomly select K individuals from the historical optimal individuals in the second optimization in step S304 to replace the K individuals of each population in the first optimization in step S303, and return to step S302 to continue optimization; if it is greater than T0, output the optimal solution.
[0113] Furthermore, after the optimal solution is obtained in each iteration, that is, after executing step s304, the optimal solution can be used as the parameter of the corresponding layer of the hierarchical prediction model, and the original training data in step S1 can be input into the hierarchical prediction model for training to verify the effect of this parameter optimization. After that, step S305 is executed for the next iterative optimization, or the optimal solution is output to obtain a trained and optimized hierarchical prediction model.
[0114] S4. Real-time collection of power load data and meteorological data is input into the trained hierarchical prediction model to predict short-term power load.
[0115] by Figure 2Taking the hierarchical prediction large model structure in as an example, the real-time collected load data and meteorological data can be output by the NGBoost model, MQSAPN model, RGF model, SLOTH model, iTransformer model and KAN neural network model in parallel in the first layer to obtain 6 first prediction results for predicting the load data and meteorological data from different dimensions. Subsequently, the 6 first prediction results and the collected load data and meteorological data are subjected to the first fusion processing by the RF model and lightGBM model in parallel in the second layer to obtain 2 second prediction results. Finally, the 6 first prediction results output by the first layer and the 2 second prediction results output by the second layer are input into the PLSR model of the third layer to obtain the final prediction results.
[0116] In order to prove the prediction accuracy of the short-term power load forecasting method based on multi-model fusion provided by the present invention, the power load data and meteorological data of Xi'an from December 31, 2014 to December 31, 2022 are used to train and test the model. Among them: the data from December 31, 2014 to December 31, 2021 are used for training, and the data after January 1, 2022 are used for testing. Table 1 shows the standard mean absolute error and standard root mean square error of the output results of the present invention and other prediction models.
[0117]
[0118]
[0119] Table 1: Errors between the output results of the present invention and other models
[0120] It can be clearly seen from Table 1 that the short-term power load forecasting method based on multi-model fusion of the present invention has smaller error and higher accuracy than other model forecasting methods.
[0121] Furthermore, after obtaining the short-term power load results, a power generation plan can be formulated according to the short-term power load, and the power generation plan can include: power grid operation mode and unit maintenance plan. This can optimize resource allocation, reduce operating costs, save coal and oil, reduce power generation costs, and formulate a reasonable power supply construction plan. Therefore, after step S4, the method can also include:
[0122] S5. Determine the power generation according to the short-term power load, and configure the grid operation mode and unit maintenance plan based on the power generation.
[0123] Based on the above-mentioned short-term power load forecasting method based on multi-model fusion, the embodiment of the present invention also provides a short-term power load forecasting device based on multi-model fusion, such as Figure 4 Said device comprises:
[0124] The collection module 41 is used to collect power load data and meteorological data respectively to obtain original training data;
[0125] A construction module 42 is used to construct a hierarchical prediction large model, wherein the hierarchical prediction large model includes a first layer, a second layer, and a third layer connected in sequence, wherein the input end of the first layer is connected to the input end of the second layer, and the output end of the first layer is connected to the input end of the third layer; each layer includes at least one sub-model;
[0126] A training optimization module 43, used for training and optimizing the parameters of each layer in the hierarchical prediction model based on the original training data;
[0127] The prediction module 44 is used to collect power load data and meteorological data in real time and input them into the trained hierarchical prediction model to predict short-term power load.
[0128] In one embodiment, the first layer includes a plurality of first sub-models connected in parallel, the second layer includes a plurality of second sub-models connected in parallel, and the third layer includes a third sub-model.
[0129] Furthermore, the types of the first sub-models are different, including: KAN neural network model, and at least one model selected from natural gradient boosting machine NGBoost, multi-head quantum self-attention neural network prediction model MQSAPN, regularized greedy forest RGF, SLOTH model, iTransformer model; the types of the second sub-models are different, and are selected from at least two of the random forest model RF and light gradient boosting machine lightGBM; the third sub-model is a partial least squares regression model PLSR.
[0130] The training optimization module 43 includes:
[0131] Initialization unit, used to initialize the parameter value range of each layer of the hierarchical prediction model and configure the initial optimization iteration number;
[0132] A configuration unit, used to randomly generate N populations, initialize the fitness of all individuals in the N populations, and configure the first optimization iteration number;
[0133] A first optimization unit, configured to perform a first optimization on each of the N populations based on the first optimization iteration number, and update the fitness to obtain the optimal individuals of the N populations;
[0134] The second optimization unit is used to use the best individuals of the N populations as the initial population, configure the second optimization iteration number, perform the second optimization, and obtain the individual with the best fitness.
[0135] An output unit, used for outputting the optimal individuals as parameters of each layer of the hierarchical prediction model when the current number of iterations meets the second optimization iteration number requirement and the total number of iterations meets the initial optimization iteration number requirement;
[0136] Wherein: N is a natural number.
[0137] In a specific implementation, each population includes m individuals, and the first optimization unit is used to perform the steps of updating and optimizing the m individuals of each population: forming a triangle topology unit, performing global aggregation, and performing local aggregation on the m individuals in turn to update the m individuals; calculating the fitness of the m individuals after the update, and updating the optimal individual of this iteration according to the fitness; judging whether the current number of iterations reaches the first optimization iteration number; if not, returning to perform the steps of updating and optimizing the m individuals of each population; if satisfied, comparing the fitness of the optimal individual obtained by each layer iteration of each population, and taking the individual with the highest fitness as the optimal individual of the population;
[0138] Wherein: m is a natural number.
[0139] Optionally, the second optimization unit may be performed by the following formula:
[0140]
[0141] in: is the position of the i-th individual at time t, f i is the fragrance value emitted by the i-th individual, p is the conversion probability, and the optimal solution at time t is g * , Cauchy(0,1) and N(0,1) are standard Cauchy distribution and standard Gaussian distribution respectively, r∈[0,1] is a random number, T2 is the number of second optimization iterations, and are the solutions corresponding to the positions of the j-th individual and the k-th individual at time t, respectively. i and j are both natural numbers less than or equal to N.
[0142] Furthermore, the second optimization unit is also used to: randomly select parent individuals of three different dimensions; perform vertical crossover operations on the d1th dimension, d2th dimension and d3th dimension of the parent individuals to generate offspring individuals; compare the fitness values of the generated offspring individuals with those of the parent individuals, and retain individuals with better fitness values as individuals with the best fitness.
[0143] Optionally, the offspring individuals are obtained by the following formula:
[0144] MS VC (i,d1)=n(qx(i,d1)+(1-q)x(i,d2))+(1-n)x(i,d3)
[0145] Among them: MS VC (i,d1) is the offspring individual obtained after the longitudinal operation, q∈[0,1] and n∈[0,1] are random numbers.
[0146] Those skilled in the art will appreciate that the modules in the above device embodiments may be distributed in the device as described, or may be changed accordingly and distributed in one or more devices different from the above embodiments. The modules in the above embodiments may be combined into one module, or may be further split into multiple submodules.
[0147] The electronic device embodiment of the present invention is described below, and the electronic device can be regarded as a physical implementation of the method and device embodiments of the present invention described above. The details described in the electronic device embodiment of the present invention should be regarded as a supplement to the above method or device embodiments; details not disclosed in the electronic device embodiment of the present invention can be implemented with reference to the above method or device embodiments.
[0148] Figure 5 is a structural block diagram of an exemplary embodiment of an electronic device according to the present invention. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0149] like Figure 5 As shown, the electronic device 400 of this exemplary embodiment is in the form of a general data processing device. The components of the electronic device 400 may include, but are not limited to: at least one processing unit 410, at least one storage unit 420, a bus 430 connecting different electronic device components (including the storage unit 420 and the processing unit 410), a display unit 440, etc.
[0150] The storage unit 420 stores a computer-readable program, which may be a source program or a code of a read-only program. The program may be executed by the processing unit 410, so that the processing unit 410 performs the steps of various embodiments of the present invention. For example, the processing unit 410 may perform the following steps: Figure 1 Steps shown.
[0151] Bus 430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0152] The electronic device 400 may also communicate with one or more external devices 100 (e.g., keyboard, display, network device, Bluetooth device, etc.) so that a user can interact with the electronic device 400 via these external devices 100, and / or the electronic device 400 can communicate with one or more other data processing devices (e.g., router, modem, etc.). Such communication may be performed through an input / output (I / O) interface 450, and may also be performed through a network adapter 460 with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network. The network adapter 460 may communicate with other modules of the electronic device 400 through the bus 430.
[0153] Figure 6 Schematic diagram of a computer readable medium embodiment of the present invention. Figure 6 As shown, the computer program can be stored on one or more computer-readable media. The computer-readable medium can be a readable signal medium or a readable storage medium. When the computer program is executed by one or more data processing devices, the computer-readable medium can implement the above method of the present invention, namely: collect power load data and meteorological data respectively to obtain original training data; construct a hierarchical prediction model, the hierarchical prediction model includes a first layer, a second layer and a third layer connected in sequence, and the input end of the first layer is connected to the input end of the second layer, and the output end of the first layer is connected to the input end of the third layer; each layer includes at least one sub-model; optimize the parameters of each layer in the hierarchical prediction model; use the original training data to train the optimized hierarchical prediction model; collect power load data and meteorological data in real time and input them into the trained hierarchical prediction model to predict short-term power load.
[0154] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the present invention is not inherently related to any specific computer, virtual device or electronic device, and various general devices can also implement the present invention. The above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A short-term power load forecasting method based on multi-model fusion, characterized in that: include: Collect power load data and meteorological data respectively to obtain original training data; Constructing a hierarchical prediction model, wherein the hierarchical prediction model comprises a first layer, a second layer and a third layer connected in sequence, wherein an input end of the first layer is connected to an input end of the second layer, and an output end of the first layer is connected to an input end of the third layer; and each layer comprises at least one sub-model; Training and optimizing the parameters of each layer in the hierarchical prediction model based on the original training data; Real-time collection of power load data and meteorological data is used as input into the trained hierarchical prediction model to predict short-term power load.
2. The short-term power load forecasting method based on multi-model fusion according to claim 1 is characterized in that: The first layer includes a plurality of first sub-models connected in parallel, the second layer includes a plurality of second sub-models connected in parallel, and the third layer includes a third sub-model.
3. The short-term power load forecasting method based on multi-model fusion according to claim 2 is characterized in that: The types of the first sub-models are different, and at least include a KAN neural network model, and at least one model selected from a natural gradient boosting machine NGBoost, a multi-head quantum self-attention neural network prediction model MQSAPN, a regularized greedy forest RGF, a SLOTH model, and an iTransformer model; the types of the second sub-models are different, and are selected from at least two of a random forest model RF and a light gradient boosting machine lightGBM; the third sub-model is a partial least squares regression model PLSR.
4. The short-term power load forecasting method based on multi-model fusion according to claim 1 is characterized in that: The training and optimization of the parameters of each layer in the hierarchical prediction model based on the original training data includes: Initialize the parameter value range of each layer of the hierarchical prediction model and configure the initial optimization iteration number; Randomly generate N populations, initialize the fitness of all individuals in the N populations, and configure the first optimization iteration number; Based on the first optimization iteration number, the N populations are respectively optimized for the first time, and the fitness is updated to obtain the optimal individuals of the N populations; The best individuals of the N populations are used as the initial population, and the number of second optimization iterations is configured to perform second optimization to obtain the individual with the best fitness. When the current number of iterations meets the second optimization iteration number requirement, and the total number of iterations meets the initial optimization iteration number requirement, the optimal individual is output as the parameter of each layer of the hierarchical prediction model; Wherein: N is a natural number.
5. The short-term power load forecasting method based on multi-model fusion according to claim 4 is characterized in that: Each population includes m individuals. The first optimization is performed on each of the N populations based on the first optimization iteration number, and the fitness is updated. The optimal individuals of the N populations include: The steps of updating and optimizing the m individuals of each population are as follows: forming triangle topological units, global aggregation, and local aggregation are performed on the m individuals in turn to update the m individuals; calculating the fitness of the m individuals after the update, and updating the optimal individual of this iteration according to the size of the fitness; Determine whether the current number of iterations reaches the first optimization iteration number; If not satisfied, return to execute the step of updating and optimizing the m individuals in each population; If it is satisfied, compare the fitness of the best individual obtained from each iteration of each population, and take the individual with the highest fitness as the best individual of the population; Wherein: m is a natural number.
6. The short-term power load forecasting method based on multi-model fusion according to claim 1 is characterized in that: The second optimization is performed by the following formula: in: is the position of the i-th individual at time t, f i is the fragrance value emitted by the i-th individual, p is the conversion probability, and the optimal solution at time t is g * , Cauchy(0,1) and N(0,1) are standard Cauchy distribution and standard Gaussian distribution respectively, r∈[0,1] is a random number, T2 is the number of second optimization iterations, and are the solutions corresponding to the positions of the j-th individual and the k-th individual at time t, respectively. i and j are both natural numbers less than or equal to N.
7. The short-term power load forecasting method based on multi-model fusion according to claim 6 is characterized in that: The second optimization further includes: Randomly select three parent individuals of different dimensions; Perform vertical crossover operation on the d1th dimension, d2th dimension and d3th dimension of the parent individual to generate the offspring individual; The fitness values of the generated offspring individuals are compared with those of the parent individuals, and the individuals with better fitness values are retained as the individuals with the best fitness.
8. The short-term power load forecasting method based on multi-model fusion according to claim 7 is characterized in that: The offspring individuals are obtained by the following formula: MS VC (i,d1)=n(qx(i,d1)+(1-q)x(i,d2))+(1-n)x(i,d3) Among them: MS VC (i,d1) is the offspring individual obtained after the longitudinal operation, q∈[0,1] and n∈[0,1] are random numbers.
9. A short-term power load forecasting device based on multi-model fusion, characterized in that: include: The acquisition module is used to respectively collect power load data and meteorological data to obtain original training data; A construction module is used to construct a hierarchical prediction large model, wherein the hierarchical prediction large model includes a first layer, a second layer, and a third layer connected in sequence, wherein an input end of the first layer is connected to an input end of the second layer, and an output end of the first layer is connected to an input end of the third layer; and each layer includes at least one sub-model; An optimization training module, used for training and optimizing the parameters of each layer in the hierarchical prediction model based on the original training data; The prediction module collects power load data and meteorological data in real time and inputs them into the trained hierarchical prediction model to predict short-term power load.
10. An electronic device, comprising: processor; as well as A memory storing computer executable instructions which, when executed, cause the processor to perform the method according to any one of claims 1-8.
Citation Information
Patent Citations
A short-term load forecasting method based on multi-model fusion neural network
CN109255505A
Short-term traffic flow prediction method based on gradient boosting decision tree
CN113096388A
Short-term load prediction method and system based on VDM and Stacking model fusion
CN113159361A
Rolling load prediction method based on phase-space reconstruction and multi-model fusion Stacking ensemble learning mode
CN115034426A
Household appliance demand prediction method and device, computer equipment and storage medium
CN117851781A
Cited By
Gas turbine high load and low load switching control system and method and storage medium
CN119308766A
Power load prediction method based on dual-channel cross attention network
CN119669732A
Short-term load prediction method and device based on multi-model fusion
CN120087542A
Intelligent park electric power consumption prediction method and system based on artificial intelligence
CN120146330A
