Quarary electricity consumption optimal combination prediction method under poor sample constraint

By establishing an optimal combination forecasting method for quarterly electricity consumption under lean sample constraints in the power system, using a lean parameter function library and a fruit fly optimization algorithm, the problem of unbalanced power supply in the power system is solved and quarterly electricity consumption is achieved. accurate forecasting and resource optimization.

CN118863153APending Publication Date: 2024-10-29CHINA THREE GORGES UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410894497.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

In the power system, due to the immature technology of energy storage facilities, the power supply is unbalanced. It is difficult for existing technology to accurately predict quarterly power consumption under the constraints of poor samples, which affects the operating efficiency and market competitiveness of power generation companies and power sales companies. .

Method used

By establishing an optimal combination forecasting method for quarterly electricity consumption under the constraints of poor samples, the electricity consumption data is decomposed using a poor parameter function library, and the weight of the trend component is optimized using the fruit fly optimization algorithm to improve the forecasting performance.

Benefits of technology

It achieves accurate quarterly power consumption prediction under poor sample conditions, provides scientific basis for the operation planning of power-related enterprises, and reduces resource waste and economic losses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118863153A_ABST
    Figure CN118863153A_ABST
Patent Text Reader

Abstract

The invention discloses a seasonal electricity consumption optimal combination prediction method under poor sample constraint, which comprises the following steps of: firstly, decomposing seasonal electricity consumption data into long-term, periodic and random trend components, and selecting an optimal fitting function for each component by applying a least square method and comprehensive precision; then, performing weighted combination on each fitting function, solving an optimal combination coefficient by applying a fruit fly optimization algorithm, optimizing a comprehensive precision score, obtaining model parameters, and predicting the quarterly electricity consumption; according to the method, seasonal power consumption prediction is carried out on the region with the administrative division changed through the seasonal power consumption optimal combination under the constraint of the poor sample, and a decision basis can be provided for planning and operation of a power system in the region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of quarterly electricity consumption forecasting methods, and in particular relates to an optimal combination forecasting method for quarterly electricity consumption under lean sample constraints. Background Art

[0002] In the power system, in order to maintain the stability of the system, it is necessary to pay attention to the changes in the load end at all times, so that the power generated by the power generation system is consistent with the instantaneous load, that is, to ensure the balance of supply and demand; it can effectively avoid the shortage of power supply in daily production activities and the energy loss caused by oversupply; however, since the key technology of energy storage facilities has not yet been broken through, the excess power cannot be stored on a large scale, so both power generation companies and power sales companies attach great importance to power forecasting. From the perspective of power generation companies, more power generation means waste of resources, environmental pollution and loss of economic interests; less power generation means that power generation companies have reduced control over the market, and it is very likely that other power generation companies will snatch power users away, resulting in loss of interests. From the perspective of power sales companies, buying more or less power will face unnecessary deviation assessments, causing losses to the company's interests, negatively affecting the company's reputation, and not conducive to improving the competitiveness of power sales companies in the power sales market; in summary, it is necessary to establish a supply and demand balance network between power users and power generation companies, that is, how much power users need to use, and how much power generation companies produce.

[0003] Accurate prediction of quarterly electricity consumption is crucial to the planning of power-related enterprises. Establishing a reasonable and accurate quarterly electricity consumption forecasting model is the current research focus. Due to objective reasons such as administrative division changes, organizational changes of power grid enterprises, and innovations in transmission and distribution technologies in my country, the quarterly electricity consumption data before the changes are difficult to be directly used for electricity forecasting, resulting in some regions having only more than ten sets of quarterly electricity consumption data in just a few years. This type of constraint with very few samples is called a poor sample constraint. Under this condition, the forecasting model based on a large amount of historical data is no longer applicable. Therefore, it is necessary to design an optimal combination forecasting method for quarterly electricity consumption under a poor sample constraint to solve the above problem. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a method for predicting quarterly electricity consumption optimal combination under lean sample constraints. The method aims to propose an optimal combination model for quarterly electricity consumption under lean sample constraints, which can cope with the constraints of lean samples. The model decomposes electricity consumption data through a three-category trend component function library established by a lean parameter function, selects the optimal three-category trend component function using a comprehensive accuracy index, and finally optimizes the three-category weights using a fruit fly optimization algorithm, thereby improving the prediction performance.

[0005] In order to achieve the above technical effects, the technical solution adopted by the present invention is:

[0006] The optimal combination forecasting method for quarterly electricity consumption under poor sample constraints includes the following steps:

[0007] S1, establish the three-type trend component function library of quarterly electricity consumption under the constraint of poor samples, arrange and combine the functions of the three-type trend component function library, and use the layer-by-layer separation method to obtain the parameters of the three-type trend component function under each combination;

[0008] S2, find the minimum precision score, and regard the combination of step S1 corresponding to the minimum precision score as the optimal decomposition of quarterly electricity consumption;

[0009] S3, apply the fruit fly optimization algorithm to obtain the optimal weight coefficients of the three types of trend components.

[0010] Preferably, in step S1, a three-category trend component function library of quarterly electricity consumption under lean sample constraints is established, the functions of the three-category trend component function library are arranged and combined, and the parameters of the three-category trend component functions under each combination are obtained by layer-by-layer separation method, including:

[0011] S101, collect historical samples of quarterly electricity consumption, divide the historical samples into training set, validation set and test set, and construct three types of trend components of quarterly electricity consumption, including long-term trend component T(·), periodic trend component S(·) and random fluctuation component R(·); the specific method is as follows:

[0012] Collect the historical samples of quarterly electricity consumption in a certain area, record d1, d2, …, d N is N groups of quarterly electricity consumption samples, where d t (t=1,2,…,N) is the measured sample of electricity consumption in the tth quarter;

[0013] Set the measured electricity consumption samples d1, d2, ..., d in the first M quarters M As the training set, set the measured electricity consumption samples d in the next K quarters M+1 ,d M+2 ,…,d M+K As the validation set, the remaining Q quarterly measured electricity consumption samples d M+K+1 ,d M+K+2 ,…,d N As a test set;

[0014] The quarterly electricity consumption is decomposed into the long-term trend component T(·), the periodic trend component S(·) and the random fluctuation component R(·):

[0015] d t =T(t,α)+S(t,β)+R(t,γ);

[0016] Where T(·) is the function representing the long-term trend component, α=[α1,α2,...,α p] is a parameter vector composed of p groups of parameters of T(·); β=[β1,β2,...,β q ] is the parameter vector composed of q groups of parameters of the periodic component function S(·); γ=[γ1,γ2,...,γ v ] is the parameter vector consisting of v sets of parameters of the random component function R(·);

[0017] S102, select functions with the number of parameters not exceeding 4 to establish three types of trend component function libraries, and these functions with the number of parameters not exceeding 4 are called poor parameter functions; wherein the long-term trend component T(·) is a function of time t, S(·) is a multi-class periodic function of t, and R(·) is a prediction model with the number of parameters not exceeding 4 in the pre-selected reference function library; the poor parameter function libraries of the three types of trend components are shown in Tables 1 to 3 below:

[0018]

[0019]

[0020] Table 1: Long-term trend poor parameter function library;

[0021]

[0022] Table 2: Cycle trend poor parameter function library;

[0023]

[0024] Table 3: Random volatility poor parameter function library;

[0025] S103, extracting one function from each of the three trend component function libraries to determine as the fitting method for the trend;

[0026] S104, the periodic trend component S(·) and the random fluctuation component R(·) are regarded as residuals, and the least squares method is used to obtain the parameters of the long-term trend component function; specifically:

[0027] The sum of S(t,β) and R(t,γ) is regarded as the residual, and the least squares method is applied to the training set d1,d2,…,d M Calculate α of T1(·)~T6(·) in Table 1;

[0028] S105, the random fluctuation component R(·) is regarded as the residual, the periodic trend component function is applied to fit the original sequence and the long-term trend component T(·) data, and the parameters of the periodic component function are obtained by least squares; specifically:

[0029] Considering R(t,γ) as the residual, we apply the least squares method to extract the residual from {d1-T(1,α),d2-T(2,α),…,d M-T(M,α)} to obtain β of S1(·)~S5(·) in Table 2;

[0030] S106, using the model in step S102 corresponding to the selected random fluctuation component function, to obtain the parameters of the random fluctuation component function; specifically:

[0031] Change {d1-T(1,α)-S(1,β),d2-T(2,α)-S(2,β),…,d in S105 M -T(M,α)-S(M,β)} is introduced into the pre-selected reference function library of R(·), and the γ of R1(·)~R5(·) in Table 3 are obtained in turn.

[0032] Preferably, in step S2, obtaining the minimum precision score and considering the combination corresponding to the minimum precision score as the optimal decomposition of quarterly electricity consumption includes:

[0033] S201, predict the validation set data using the three types of trend component functions determined in step S1, and calculate the mean absolute percentage error MAPE, mean absolute error MAE, root mean square error RMSE and determination coefficient R 2 Four types of accuracy indicators; specifically:

[0034] Based on the decomposition results of S104~S106, let t = M+1, M+2,…, M+K, the quarterly electricity consumption of the validation set can be predicted, and the result is The superscript “^” indicates the predicted quarterly electricity consumption. It is compared with the measured quarterly electricity consumption of the validation set and evaluated using the following four types of prediction accuracy indicators:

[0035]

[0036] Where K represents the number of predicted time steps, d t represents the measured quarterly electricity consumption of the validation set, and M represents the number of samples in the training set;

[0037] S202, using 1-R 2 Instead of R 2 , so that the power consumption prediction accuracy represented by its numerical value is consistent with the three indicators of mean absolute percentage error MAPE, mean absolute error MAE, and root mean square error RMSE;

[0038] S203, normalizing the four types of prediction accuracy indicators;

[0039] S204, summing the normalized results of the four types of accuracy indicators to obtain a comprehensive accuracy indicator;

[0040] S205, obtaining the comprehensive accuracy scores under all combination modes, and selecting the combination mode with the smallest comprehensive accuracy score as the optimal quarterly electricity consumption decomposition mode; the specific process is as follows:

[0041] Based on steps S101 to S106, there are at most 150 groups of combination types, and the four types of accuracy indicators change with the change of the combination type; due to the different dimensions of the accuracy indicators, it is difficult to obtain the overall optimal decomposition method by relying only on a single accuracy indicator, so the four types of prediction accuracy indicators are integrated into a comprehensive accuracy score by using the same direction, normalization and summation methods. Based on this, three types of component functions are selected from the 150 groups of combination types, and the steps are as follows:

[0042] Select combination type: select one of 150 combination types and calculate four types of prediction accuracy indicators;

[0043] Same direction: using 1-R 2 Instead of R 2 , so that the power consumption prediction accuracy represented by its numerical value is consistent with the other three indicators;

[0044] Normalization: In order to eliminate the impact of different dimensions among different prediction indicators, the common maximum and minimum values ​​of the four types of indicators are extracted from the existing methods and normalized; the calculation formula of the MAPE indicator is as follows:

[0045]

[0046] In the formula, is the normalized value of MAPE; h PN is the minimum value of MAPE; h PX is the maximum value of MAPE;

[0047] The calculation formula of MAE indicator is as follows:

[0048]

[0049] In the formula, is the normalized value of MAE; h MN is the minimum value of MAE; h MX is the maximum value of MAE;

[0050] The RMSE indicator calculation formula is as follows:

[0051]

[0052] In the formula, is the normalized value of RMSE; h MN is the minimum value of RMSE; h MX is the maximum value of RMSE;

[0053] R 2The indicator calculation formula is as follows:

[0054]

[0055] In the formula, For R 2 Normalized value; h QN is the minimum value of RMSE; h QX is the maximum value of RMSE;

[0056] The thresholds of the four types of accuracy indicators are as follows:

[0057]

[0058]

[0059] Table 4: Prediction accuracy index thresholds;

[0060] Sum: Sum the normalized results of the four accuracy indicators calculated in the previous step to obtain the comprehensive accuracy index G, which is expressed as follows:

[0061]

[0062] Loop: Let the loop variable i represent the combination type; i is 1, indicating the selection of the first group of combination types, and i=i+1, indicating the selection of the next group of combination types; if i is greater than 150, traverse all combination types, otherwise return to the first step of homogeneity; compare the comprehensive accuracy scores G under all combination types, and select the combination with the smallest comprehensive accuracy score G as the optimal quarterly electricity consumption decomposition method.

[0063] Preferably, in step S3, applying the fruit fly optimization algorithm to obtain the optimal weight coefficients of the three types of trend components includes:

[0064] S301, assigning different weight coefficients to the three types of trend component functions to determine optimization variables and optimization targets; specifically, including:

[0065] Assign weight coefficients ω1, ω2, and ω3 to T(·), S(·), and R(·) respectively and perform weighted summation:

[0066] d t =ω1T(t,α)+ω2S(t,β)+ω3R(t,γ);

[0067] In the formula, ω1, ω2, ω3 represent weight coefficients;

[0068] Considering ω1, ω2, and ω3 as optimization variables and the comprehensive accuracy score as the optimization target, the optimization process is expressed as follows:

[0069]

[0070] In the formula, the value range of ω is [0,10]; G represents the comprehensive accuracy index;

[0071] S302, determining four basic definitions of the fruit fly optimization algorithm;

[0072] (x, y) is the coordinate of a single fruit fly in two-dimensional space; the range of its random flight is limited to the rectangular range constrained by {a|f1≤a≤f2}∩{b|f3≤b≤f4};

[0073] The weight coefficient is the odor concentration judgment value ω of the fruit fly, which can be calculated from the coordinates (x, y) of the fruit fly's location as follows:

[0074]

[0075] The decision variable is the fruit fly population, which is set to three groups; each group consists of K fruit flies, and the position coordinates of the kth (k = 1, 2, ..., K) fruit fly in the first population are (x 1k ,y 1k ), the odor concentration judgment value is ω 1k ;

[0076] The maximum number of iterations is L, and the initial positions of the fruit flies in the three populations are Randomly generated in the range of {x|0≤x≤1}∩{y|0≤y≤1};

[0077] S303, optimizing the weight coefficient based on the four basic definitions of the fruit fly optimization algorithm, the specific process is as follows:

[0078] Initialization: Randomly initialize the position of each fruit fly, taking population 1 as an example:

[0079]

[0080] Calculate the odor concentration: According to the calculation formula of fruit fly odor concentration, calculate the odor concentration judgment values ​​of K fruit flies in the three groups of populations in turn to form the vector W:

[0081]

[0082] Objective function calculation: If the obtained ω k If the value does not exceed the limit of 10, then ω k Substitute it into the comprehensive accuracy score calculation formula to calculate and get the comprehensive accuracy score G K (G k =G1,G2,…,G K );

[0083] Optimize individuals: Based on comprehensive accuracy K Select the minimum value of comprehensive accuracy G b The corresponding ωkb , and determine G b The corresponding positions of the three fruit flies (x 1kb ,y 1kb )、(x 2kb ,y 2kb )、(x 3kb ,y 3kb );

[0084] Position update: Change the initial position calculation formula and Replace with x 1b and 1b , update the positions of all fruit flies in population 1; the remaining populations only need to and Replace with x 2b ,y 2b and x 3b ,y 3b Repeat the above steps. If the newly calculated odor concentration G b If it is lower than the value in the previous step, update G b ,ω b and the position of the fruit fly, and the search stops after the maximum number of iterations is met.

[0085] The beneficial effects of the present invention are as follows:

[0086] The present invention proposes an optimal combination forecasting method for quarterly electricity consumption under poor sample constraints. The method can cope with the poor sample constraints brought about by the change of administrative divisions in my country. The quarterly electricity consumption is decomposed through a poor parameter function library, and the optimal combination method is combined with comprehensive accuracy. After the fruit fly optimization algorithm is used to determine the method parameters for the weights of the three types of trend components, the quarterly electricity consumption is accurately predicted. The present invention can provide a scientific and accurate basis for the operation planning and power generation planning of power-related enterprises. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] Figure 1 It is a flow chart of the quarterly electricity consumption decomposition prediction method under the lean sample constraint of the present invention;

[0088] Figure 2 Flowchart of the optimal combination method for comprehensive accuracy selection;

[0089] Figure 3 Optimize three sets of weight coefficients flow chart for the fruit fly optimization algorithm;

[0090] Figure 4 This is the curve of the three trend components of Chongqing's quarterly electricity consumption that have not been optimized;

[0091] Figure 5 It is the fitting comparison curve of quarterly electricity consumption before and after the optimization of three groups of weight coefficients in Chongqing;

[0092] Figure 6 It is the fitting comparison curve of quarterly electricity consumption before and after the optimization of three groups of weight coefficients in Jilin Province;

[0093] Figure 7 This is a fitting comparison curve of quarterly electricity consumption before and after optimization of three groups of weight coefficients in Fujian Province. DETAILED DESCRIPTION

[0094] Embodiment 1:

[0095] like Figure 1 As shown in FIG. 1 , the optimal combination forecasting method for quarterly electricity consumption under the poor sample constraint includes the following steps:

[0096] S1, establish the three-type trend component function library of quarterly electricity consumption under the constraint of poor samples, arrange and combine the functions of the three-type trend component function library, and use the layer-by-layer separation method to obtain the parameters of the three-type trend component function under each combination;

[0097] S2, find the minimum precision score, and regard the combination of step S1 corresponding to the minimum precision score as the optimal decomposition of quarterly electricity consumption;

[0098] S3, apply the fruit fly optimization algorithm to obtain the optimal weight coefficients of the three types of trend components.

[0099] Preferably, in step S1, a three-category trend component function library of quarterly electricity consumption under lean sample constraints is established, the functions of the three-category trend component function library are arranged and combined, and the parameters of the three-category trend component functions under each combination are obtained by layer-by-layer separation method, including:

[0100] S101, collect historical samples of quarterly electricity consumption, divide the historical samples into training set, validation set and test set, and construct three types of trend components of quarterly electricity consumption, including long-term trend component T(·), periodic trend component S(·) and random fluctuation component R(·); the specific method is as follows:

[0101] Collect the historical samples of quarterly electricity consumption in a certain area, record d1, d2, …, d N is N groups of quarterly electricity consumption samples, where d t (t=1,2,…,N) is the measured sample of electricity consumption in the tth quarter;

[0102] Set the measured electricity consumption samples d1, d2, ..., d in the first M quarters M As the training set, set the measured electricity consumption samples d in the next K quarters M+1 ,d M+2 ,…,d M+K As the validation set, the remaining Q quarterly measured electricity consumption samples d M+K+1 ,d M+K+2 ,…,d NAs a test set;

[0103] The quarterly electricity consumption is decomposed into the long-term trend component T(·), the periodic trend component S(·) and the random fluctuation component R(·):

[0104] d t =T(t,α)+S(t,β)+R(t,γ);

[0105] Where T(·) is the function representing the long-term trend component, α=[α1,α2,...,α p ] is a parameter vector composed of p groups of parameters of T(·); β=[β1,β2,...,β q ] is the parameter vector composed of q groups of parameters of the periodic component function S(·); γ=[γ1,γ2,...,γ v ] is the parameter vector consisting of v sets of parameters of the random component function R(·);

[0106] S102, select functions with the number of parameters not exceeding 4 to establish three types of trend component function libraries, and these functions with the number of parameters not exceeding 4 are called poor parameter functions; wherein the long-term trend component T(·) is a function of time t, S(·) is a multi-class periodic function of t, and R(·) is a prediction model with the number of parameters not exceeding 4 in the pre-selected reference function library; the poor parameter function libraries of the three types of trend components are shown in Tables 1 to 3 below:

[0107]

[0108] Table 1: Long-term trend poor parameter function library;

[0109]

[0110] Table 2: Cycle trend poor parameter function library;

[0111]

[0112] Table 3: Random volatility poor parameter function library;

[0113] S103, extracting one function from each of the three trend component function libraries to determine as the fitting method for the trend;

[0114] S104, the periodic trend component S(·) and the random fluctuation component R(·) are regarded as residuals, and the least squares method is used to obtain the parameters of the long-term trend component function; specifically:

[0115] The sum of S(t,β) and R(t,γ) is regarded as the residual, and the least squares method is applied to the training set d1,d2,…,d M Calculate α of T1(·)~T6(·) in Table 1;

[0116] S105, the random fluctuation component R(·) is regarded as the residual, the periodic trend component function is applied to fit the original sequence and the long-term trend component T(·) data, and the parameters of the periodic component function are obtained by least squares; specifically:

[0117] Considering R(t,γ) as the residual, we apply the least squares method to extract the residual from {d1-T(1,α),d2-T(2,α),…,d M -T(M,α)} to obtain β of S1(·)~S5(·) in Table 2;

[0118] S106, using the model in step S102 corresponding to the selected random fluctuation component function, to obtain the parameters of the random fluctuation component function; specifically:

[0119] Change {d1-T(1,α)-S(1,β),d2-T(2,α)-S(2,β),…,d in S105 M -T(M,α)-S(M,β)} is introduced into the pre-selected reference function library of R(·), and the γ of R1(·)~R5(·) in Table 3 are obtained in turn.

[0120] like Figure 2 As shown, in step S2, the minimum precision score is obtained, and the combination corresponding to the minimum precision score is regarded as the optimal decomposition of quarterly electricity consumption, including:

[0121] S201, predict the validation set data using the three types of trend component functions determined in step S1, and calculate the mean absolute percentage error MAPE, mean absolute error MAE, root mean square error RMSE and determination coefficient R 2 Four types of accuracy indicators; specifically:

[0122] Based on the decomposition results of S104~S106, let t = M+1, M+2,…, M+K, the quarterly electricity consumption of the validation set can be predicted, and the result is The superscript “^” indicates the predicted quarterly electricity consumption. It is compared with the measured quarterly electricity consumption of the validation set and evaluated using the following four types of prediction accuracy indicators:

[0123]

[0124] Where K represents the number of predicted time steps, d t represents the measured quarterly electricity consumption of the validation set, and M represents the number of samples in the training set;

[0125] S202, using 1-R 2 Instead of R 2, so that the power consumption prediction accuracy represented by its numerical value is consistent with the three indicators of mean absolute percentage error MAPE, mean absolute error MAE, and root mean square error RMSE;

[0126] S203, normalizing the four types of prediction accuracy indicators;

[0127] S204, summing the normalized results of the four types of accuracy indicators to obtain a comprehensive accuracy indicator;

[0128] S205, obtaining the comprehensive accuracy scores under all combination modes, and selecting the combination mode with the smallest comprehensive accuracy score as the optimal quarterly electricity consumption decomposition mode; the specific process is as follows:

[0129] Based on steps S101 to S106, there are at most 150 groups of combination types, and the four types of accuracy indicators change with the change of the combination type; due to the different dimensions of the accuracy indicators, it is difficult to obtain the overall optimal decomposition method by relying only on a single accuracy indicator, so the four types of prediction accuracy indicators are integrated into a comprehensive accuracy score by using the same direction, normalization and summation methods. Based on this, three types of component functions are selected from the 150 groups of combination types, and the steps are as follows:

[0130] Select combination type: select one of 150 combination types and calculate four types of prediction accuracy indicators;

[0131] Same direction: using 1-R 2 Instead of R 2 , so that the power consumption prediction accuracy represented by its numerical value is consistent with the other three indicators;

[0132] Normalization: In order to eliminate the impact of different dimensions among different prediction indicators, the common maximum and minimum values ​​of the four types of indicators are extracted from the existing methods and normalized; the calculation formula of the MAPE indicator is as follows:

[0133]

[0134] In the formula, is the normalized value of MAPE; h PN is the minimum value of MAPE; h PX is the maximum value of MAPE;

[0135] The calculation formula of MAE indicator is as follows:

[0136]

[0137] In the formula, is the normalized value of MAE; h MN is the minimum value of MAE; h MX is the maximum value of MAE;

[0138] The RMSE indicator calculation formula is as follows:

[0139]

[0140] In the formula, is the normalized value of RMSE; h MN is the minimum value of RMSE; h MX is the maximum value of RMSE;

[0141] R 2 The indicator calculation formula is as follows:

[0142]

[0143] In the formula, For R 2 Normalized value; h QN is the minimum value of RMSE; h QX is the maximum value of RMSE;

[0144] The thresholds of the four types of accuracy indicators are as follows:

[0145]

[0146] Table 4: Prediction accuracy index thresholds;

[0147] Sum: Sum the normalized results of the four accuracy indicators calculated in the previous step to obtain the comprehensive accuracy index G, which is expressed as follows:

[0148]

[0149] Loop: Let the loop variable i represent the combination type; i is 1, indicating the selection of the first group of combination types, and i=i+1, indicating the selection of the next group of combination types; if i is greater than 150, traverse all combination types, otherwise return to the first step of homogeneity; compare the comprehensive accuracy scores G under all combination types, and select the combination with the smallest comprehensive accuracy score G as the optimal quarterly electricity consumption decomposition method.

[0150] like Figure 3 As shown, in step S3, the fruit fly optimization algorithm is applied to obtain the optimal weight coefficients of the three types of trend components, including:

[0151] S301, assigning different weight coefficients to the three types of trend component functions to determine optimization variables and optimization targets; specifically, including:

[0152] Assign weight coefficients ω1, ω2, and ω3 to T(·), S(·), and R(·) respectively and perform weighted summation:

[0153] d t=ω1T(t,α)+ω2S(t,β)+ω3R(t,γ);

[0154] In the formula, ω1, ω2, ω3 represent weight coefficients;

[0155] Considering ω1, ω2, and ω3 as optimization variables and the comprehensive accuracy score as the optimization target, the optimization process is expressed as follows:

[0156]

[0157] In the formula, the value range of ω is [0,10]; G represents the comprehensive accuracy index;

[0158] S302, determining four basic definitions of the fruit fly optimization algorithm;

[0159] (x, y) is the coordinate of a single fruit fly in two-dimensional space; the range of its random flight is limited to the rectangular range constrained by {af1≤a≤f2}∩{b|f3≤b≤f4};

[0160] The weight coefficient is the odor concentration judgment value ω of the fruit fly, which can be calculated from the coordinates (x, y) of the fruit fly's location as follows:

[0161]

[0162] The decision variable is the fruit fly population, which is set to three groups; each group consists of K fruit flies, and the position coordinates of the kth (k = 1, 2, ..., K) fruit fly in the first population are (x 1k ,y 1k ), the odor concentration judgment value is ω 1k ;

[0163] The maximum number of iterations is L, and the initial positions of the fruit flies in the three populations are Randomly generated in the range of {x|0≤x≤1}∩{y|0≤y≤1};

[0164] S303, optimizing the weight coefficient based on the four basic definitions of the fruit fly optimization algorithm, the specific process is as follows:

[0165] Initialization: Randomly initialize the position of each fruit fly, taking population 1 as an example:

[0166]

[0167] Calculate the odor concentration: According to the calculation formula of fruit fly odor concentration, calculate the odor concentration judgment values ​​of K fruit flies in the three groups of populations in turn to form the vector W:

[0168]

[0169] Objective function calculation: If the obtained ω kIf the value does not exceed the limit of 10, then ω k Substitute it into the comprehensive accuracy score calculation formula to calculate and get the comprehensive accuracy score G K (G k =G1,G2,…,G K );

[0170] Optimize individuals: Based on comprehensive accuracy K Select the minimum value of comprehensive accuracy G b The corresponding ω kb , and determine G b The corresponding positions of the three fruit flies (x 1kb ,y 1kb )、(x 2kb ,y 2kb )、(x 3kb ,y 3kb );

[0171] Position update: Change the initial position calculation formula and Replace with x 1b and 1b , update the positions of all fruit flies in population 1; the remaining populations only need to and Replace with x 2b ,y 2b and x 3b ,y 3b Repeat the above steps. If the newly calculated odor concentration G b If it is lower than the value in the previous step, update G b ,ω b and the position of the fruit fly, and the search stops after the maximum number of iterations is met.

[0172] Embodiment 2:

[0173] This embodiment collects 16 sets of quarterly data from 2009 to 2012 in Chongqing to simulate the quarterly electricity consumption in the first three years of Chongqing's direct administration, and predicts the electricity consumption in the fourth quarter of the fourth year through the quarterly electricity consumption data of the first three years. The data set is divided into three parts, namely, the first 8 sets of quarterly electricity consumption data from 2009 to 2010 are used as training data, the 4 sets of quarterly electricity consumption data in 2011 are used as verification data, and the 4 sets of quarterly electricity consumption data in 2012 are used as test data.

[0174] Figure 4The three trend components and errors of Chongqing's quarterly electricity consumption are shown. It can be seen that Chongqing's quarterly electricity consumption from 2009 to 2011 is decomposed into a long-term trend component that increases with the quarter, a periodic trend component that changes with the quarter, and a random trend component with no obvious regularity. Among them, the long-term trend parameter-poor function T5(·) fits the long-term trend component of quarterly electricity consumption, which accounts for the main component of Chongqing's quarterly electricity consumption. Similarly, the periodic trend component and the random trend component are fitted by S1(·) and R5(·), respectively, and both account for a small proportion of Chongqing's quarterly electricity consumption. After the three trend components are determined, the fitting error obtained by subtracting the sum of the three trend components from the original data fluctuates around 0 billion kWh, which has a good fitting effect. Table 5 lists the top ten preferred combinations ranked by comprehensive accuracy.

[0175]

[0176] Table 5: The top ten optimal combinations of comprehensive accuracy scores in Chongqing;

[0177] In order to further reduce the comprehensive accuracy score, the fruit fly optimization algorithm is used to assign the three groups of weight coefficients to ω kb =(1.0275,1.6342,0.3144), the optimization results and fitting errors of the three trend components are as follows Figure 5 As shown in the figure, the quarterly electricity consumption of Chongqing from 2009 to 2011 under the optimized optimal combination is more consistent with the original quarterly electricity consumption data, and the comprehensive accuracy score is reduced from the original 0.2386 to 0.1712; based on this, the three types of trend component functions and weights for predicting Chongqing's electricity consumption in the fourth quarter of 2012 are determined, so as to predict the quarterly electricity consumption.

[0178] In order to illustrate the practicability of the method of the present invention, four common quarterly electricity consumption forecasting models are introduced, such as GM (1,1), SGM (1,1), TDGM (1,1) model and HW model, and compared with the prediction results of the model in this paper. The prediction results of electricity consumption in Chongqing in the fourth quarter of 2012 by the four models and the model in this paper are shown in Table 6, which shows the calculated values ​​of the four types of prediction accuracy evaluation indicators.

[0179] Model used MAPE% MAE RMSE <![CDATA[R 2 ]]> This article model 8.9615 16.3373 17.9608 3.2643 GM(1,1) 16.5127 29.5738 30.6840 9.5273 SGM(1,1) 12.6745 23.5653 28.3700 8.1444 TDGM(1,1) 13.7824 24.5834 25.7651 6.7175 HW Model 9.7045 17.9554 20.3280 4.1815

[0180] Table 6: Chongqing's electricity consumption forecast evaluation indicators for the fourth quarter of 2012;

[0181] It can be seen from the calculation results in Table 6 that, compared with the existing methods, the calculation results of the four types of prediction accuracy indicators of the method of the present invention are all the lowest values, which can better cope with the constraints of lean samples. Even if there are only 12 quarters of historical electricity consumption samples, it has high prediction accuracy and has certain practical application value.

[0182] To further illustrate the wide applicability of this method, a total of 44 sets of quarterly electricity consumption data were collected in Jilin and Fujian from 2010 to 2020, of which the data from the first 32 quarters were training sets, the data from the four quarters of 2019 were validation sets, and the data from the last four quarters were test sets.

[0183] Figure 6 This is the comparison result before and after the optimization of quarterly electricity consumption in Jilin Province. The three trend components of quarterly electricity consumption in Jilin Province from 2010 to 2019 were fitted by T1(·), S2(·) and R4(·), and the fruit fly optimization algorithm was used to assign the three groups of weight coefficients as ωkb=(1.0282, 1.5514, 0.6578); after optimization, the comprehensive accuracy score under the optimal combination method was reduced from the original 0.1244 to 0.04242.

[0184] Figure 7 This is the comparison result before and after the optimization of quarterly electricity consumption in Jilin Province. The three trend components of quarterly electricity consumption in Fujian Province from 2010 to 2019 were fitted by T5(·), S2(·) and R2(·). The fruit fly optimization algorithm assigned the three groups of weight coefficients as ωkb=(1.0242, 1.7168, 0.7464); after optimization, the comprehensive accuracy score under the optimal combination method was reduced from the original 1.2527 to 0.0929.

[0185] Table 7 shows the comparison of the prediction accuracy errors of the two provinces. The method of the present invention is compared with the SGM (1, 1) model, the SARIMA model and the HW model. It can be seen that the MAPE of the proposed model in the prediction of electricity consumption in Jilin Province in the fourth quarter of 2020 is 2.47%, and the prediction result is excellent. In the prediction of electricity consumption in Fujian Province in the fourth quarter of 2020, the four evaluation indicators of the proposed model are the minimum values, and its MAPE is 7.03%, 36.17% and 12.12% lower than the three comparison models, respectively.

[0186]

[0187] Table 7: Evaluation indicators of electricity consumption forecast of four types of models in Jilin and Fujian in 2020;

[0188] From the results of the above embodiments, it can be seen that the present invention is used to perform optimal combination forecasting of quarterly electricity consumption under lean sample constraints; first, the quarterly electricity consumption data is decomposed into three types of components: long-term, periodic, and random. The least squares method and comprehensive accuracy are used to divide each type of component to select the best fitting function. Then, each fitting function is weighted and combined, and the fruit fly optimization algorithm is used to obtain the optimal combination coefficient, optimize the comprehensive accuracy score, and obtain the model parameters. Sixteen groups of quarterly electricity consumption data for the first four years of Chongqing's direct administration were collected to verify the model in this paper. The results show that the model can achieve a MAPE of 8.9615% for the fourth year's quarterly electricity consumption forecast, which is lower than the existing four types of forecasting models.

Claims

1. The optimal combination forecasting method for quarterly electricity consumption under poor sample constraints is characterized by: The following steps are involved: S1, establish the three-type trend component function library of quarterly electricity consumption under the constraint of poor samples, arrange and combine the functions of the three-type trend component function library, and use the layer-by-layer separation method to obtain the parameters of the three-type trend component function under each combination; S2, find the minimum precision score, and regard the combination of step S1 corresponding to the minimum precision score as the optimal decomposition of quarterly electricity consumption; S3, apply the fruit fly optimization algorithm to obtain the optimal weight coefficients of the three types of trend components.

2. The optimal combined forecasting method for quarterly electricity consumption under lean sample constraints according to claim 1 is characterized in that: In step S1, a three-category trend component function library of quarterly electricity consumption under the constraint of lean samples is established, the functions of the three-category trend component function library are arranged and combined, and the parameters of the three-category trend component functions under each combination are obtained by layer-by-layer separation method, including: S101, collect historical samples of quarterly electricity consumption, divide the historical samples into training set, validation set and test set, and construct three types of trend components of quarterly electricity consumption, including long-term trend component T(·), periodic trend component S(·) and random fluctuation component R(·); the specific method is as follows: Collect quarterly electricity consumption history samples, record d1, d2, …, d N is N groups of quarterly electricity consumption samples, where d t (t=1,2,…,N) is the measured sample of electricity consumption in the tth quarter; Set the measured electricity consumption samples d1, d2, ..., d in the first M quarters M As the training set, set the measured electricity consumption samples d in the next K quarters M+1 ,d M+2 ,…,d M+K As the validation set, the remaining Q quarterly measured electricity consumption samples d M+K+1 ,d M+K+2 ,…,d N As a test set; The quarterly electricity consumption is decomposed into the long-term trend component T(·), the periodic trend component S(·) and the random fluctuation component R(·): d t =T(t,α)+S(t,β)+R(t,γ); Where T(·) is the function representing the long-term trend component, α=[α1,α2,...,α p ] is a parameter vector composed of p groups of parameters of T(·); β=[β1,β2,...,β q ] is the parameter vector composed of q groups of parameters of the periodic component function S(·); γ=[γ1,γ2,...,γ v ] is the parameter vector consisting of v sets of parameters of the random component function R(·); S102, select functions with a number of parameters not greater than 4 to establish a three-type trend component function library, wherein the long-term trend component T(·) is a function of time t, S(·) is a multi-type periodic function of t, and R(·) is a prediction model with a number of parameters not greater than 4 in the function library; S103, extracting one function from each of the three trend component function libraries to determine as the fitting method for the trend; S104, the periodic trend component S(·) and the random fluctuation component R(·) are regarded as residuals, and the least squares method is used to obtain the parameters of the long-term trend component function; S105, the random fluctuation component R(·) is regarded as the residual, the periodic trend component function is applied to fit the data of the original sequence and the long-term trend component T(·), and the parameters of the periodic component function are obtained by least squares; S106, using the model in step S102 corresponding to the selected random fluctuation component function, to obtain the parameters of the random fluctuation component function.

3. The optimal combined forecasting method for quarterly electricity consumption under lean sample constraints according to claim 2 is characterized in that: In step S2, the minimum precision score is obtained, and the combination corresponding to the minimum precision score is regarded as the optimal decomposition of the quarterly electricity consumption, including: S201, predict the validation set data using the three types of trend component functions determined in step S1, and calculate the mean absolute percentage error MAPE, mean absolute error MAE, root mean square error RMSE and determination coefficient R 2 Four types of accuracy indicators; S202, using 1-R 2 Instead of R 2 , so that the power consumption prediction accuracy represented by its numerical value is consistent with the three indicators of mean absolute percentage error MAPE, mean absolute error MAE, and root mean square error RMSE; S203, normalizing the four types of prediction accuracy indicators; S204, summing the normalized results of the four types of accuracy indicators to obtain a comprehensive accuracy indicator; S205, obtaining comprehensive accuracy scores under all combination methods, and selecting the combination method with the smallest comprehensive accuracy score as the optimal quarterly electricity consumption decomposition method.

4. The optimal combined forecasting method for quarterly electricity consumption under lean sample constraints according to claim 1 is characterized in that: In step S3, the fruit fly optimization algorithm is applied to obtain the optimal weight coefficients of the three types of trend components, including: S301, assigning different weight coefficients to the three types of trend component functions to determine optimization variables and optimization targets; specifically, including: Assign weight coefficients ω1, ω2, and ω3 to T(·), S(·), and R(·) respectively and perform weighted summation: d t =ω1T(t,α)+ω2S(t,β)+ω3R(t,γ); In the formula, ω1, ω2, ω3 represent weight coefficients; Considering ω1, ω2, and ω3 as optimization variables and the comprehensive accuracy score as the optimization target, the optimization process is expressed as follows: In the formula, the value range of ω is [0,10]; G represents the comprehensive accuracy index; S302, determining four basic definitions of the fruit fly optimization algorithm; (x, y) is the coordinate of a single fruit fly in two-dimensional space; the range of its random flight is limited to the rectangular range constrained by {af1≤a≤f2}∩{b|f3≤b≤f4}; The weight coefficient is the odor concentration judgment value ω of the fruit fly, which can be calculated from the coordinates (x, y) of the fruit fly's location as follows: The decision variable is the fruit fly population, which is set to three groups; each group consists of K fruit flies, and the position coordinates of the kth (k = 1, 2, ..., K) fruit fly in the first population are (x 1k ,y 1k ), the odor concentration judgment value is ω 1k ; The maximum number of iterations is L, and the initial positions of the fruit flies in the three populations are Randomly generated in the range of {x|0≤x≤1}∩{y|0≤y≤1}; S303, optimizing the weight coefficient based on the four basic definitions of the fruit fly optimization algorithm, the specific process is as follows: Initialization: Randomly initialize the position of each fruit fly: Calculate the odor concentration: According to the calculation formula of fruit fly odor concentration, calculate the odor concentration judgment values ​​of K fruit flies in the three groups of populations in turn to form the vector W: Objective function calculation: If the obtained ω k If the value does not exceed the limit of 10, then ω k Substitute it into the comprehensive accuracy score calculation formula to calculate and get the comprehensive accuracy score G K (G k =G1,G2,…,G K ); Optimize individuals: Based on comprehensive accuracy K Select the minimum value of comprehensive accuracy G b The corresponding ω kb , and determine G b The corresponding positions of the three fruit flies (x 1kb ,y 1kb )、(x 2kb ,y 2kb )、(x 3kb ,y 3kb ); Position update: Change the initial position calculation formula and Replace with x 1b and 1b , update the positions of all fruit flies in population 1; the remaining populations only need to and Replace with x 2b ,y 2b and x 3b ,y 3b Repeat the above steps. If the newly calculated odor concentration G b If it is lower than the value in the previous step, update G b ,ω b and the position of the fruit fly, and the search stops after the maximum number of iterations is met.