Daily electric quantity prediction method, system and device considering multiple factors and medium
By using a pre-trained LightGBM model in daily electricity forecasting, combining historical electricity consumption and related characteristics, the prediction efficiency and accuracy problems of the existing technology in multi-factor situations are solved, and more efficient and accurate daily electricity forecasting is achieved.
Patent Information
- Application Number
- CN202510115965.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-06-03
AI Technical Summary
In the prior art, daily electricity forecasting is inefficient and has low accuracy when processing large-scale data and multi-factors.
The daily electricity forecasting method that considers multiple factors is adopted. By obtaining historical data, the pre-trained LightGBM model is selected, and the historical data is substituted into the model to output the predicted daily electricity data. The model is trained in a gradient-up tree by historical electricity consumption and various industry characteristics related to electricity.
Improve the accuracy and comprehensiveness of daily electricity forecasts, and can more effectively handle large-scale data and multi-factor situations.
Smart Images

Figure CN120087523A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power data mining, and particularly to a daily power consumption prediction method, system, device and medium considering multiple factors. Background Art
[0002] In the field of daily power consumption prediction in the power industry, the existing technologies mainly include traditional methods based on time series analysis, regression analysis, etc., as well as system simulations based on physical models. However, with the development of the power system and the increase in data volume, relevant departments have increasingly higher requirements for the accuracy of power load prediction. Traditional methods show certain limitations in dealing with large-scale data and complex factors.
[0003] In recent years, machine learning algorithms have been increasingly widely applied in daily power consumption prediction. Among them, the LightGBM algorithm is an efficient gradient boosting framework. By optimizing the construction method of decision trees, gradient calculation methods and parallel computing technologies, it can achieve good prediction performance in large-scale data and high-dimensional feature spaces, and has the advantages of high efficiency, flexibility, and ease of use.
[0004] Currently, in actual power system prediction, traditional methods often have difficulty fully considering the diversity and complexity of power consumption changes, especially for daily power consumption prediction affected by multiple factors. In addition, due to the complexity of the power system and the increase in data volume, traditional methods are often inefficient and inaccurate in dealing with large-scale data and multiple factors. Summary of the Invention
[0005] In order to solve the problem that the existing technologies are often inefficient and inaccurate in dealing with large-scale data and multiple factors, the present invention proposes a daily power consumption prediction method considering multiple factors, including:
[0006] Obtain historical data before the day to be predicted;
[0007] Based on the industry characteristics to which the day to be predicted belongs, select the corresponding pre-trained LightGBM model;
[0008] Substitute the historical data before the day to be predicted into the selected pre-trained LightGBM model, and output the power consumption data of the day to be predicted;
[0009] Wherein, the pre-trained LightGBM models corresponding to each industry characteristic are obtained by training the LightGBM algorithm in the form of gradient boosting trees using the historical power consumption of each industry characteristic and the industry characteristics related to power consumption.
[0010] Optionally, the training of the LightGBM model includes:
[0011] Obtain historical electricity consumption and various industry characteristics related to electricity consumption;
[0012] Normalize the historical electricity consumption and various industry characteristics related to electricity consumption;
[0013] Construct training sets for various industry characteristics by respectively combining the normalized historical electricity consumption with various industry characteristics;
[0014] Train the LightGBM algorithm in the way of gradient boosting tree based on the training sets of various industry characteristics to obtain the trained LightGBM models corresponding to various industry characteristics;
[0015] Among them, the various industry characteristics related to electricity consumption are the various industry characteristics closely related to load impact selected by using correlation analysis.
[0016] Optionally, the determination of the various industry characteristics related to electricity consumption includes:
[0017] Obtain historical electricity consumption and various industry characteristics;
[0018] Calculate the correlation between historical electricity consumption and various industry characteristics by using Pearson correlation coefficient analysis;
[0019] Determine the various industry characteristics related to electricity consumption based on the correlation between the historical electricity consumption and various industry characteristics.
[0020] Optionally, the correlation between the historical electricity consumption and various industry characteristics is calculated according to the following formula:
[0021]
[0022] In the formula, ρ represents the Pearson correlation coefficient; X represents the average value of variable X; Y represents the average value of variable Y; X is the characteristic closely related to load impact; Y is the load; n represents the number of samples included in the variable, i represents the sample serial number, X i is the i-th characteristic closely related to load impact, and Y i is the load corresponding to the i-th characteristic.
[0023] Optionally, the training of the LightGBM algorithm in the way of gradient boosting tree based on the training sets of various industry characteristics to obtain the trained LightGBM models corresponding to various industry characteristics includes:
[0024] Step 1: Initialize the number of iterations and set the maximum number of iterations;
[0025] Step 2: Calculate the loss function values of the training data in the training set according to the loss function;
[0026] Step 3: Determine whether the loss function value converges. If it converges, go to Step 6; otherwise, go to Step 4.
[0027] Step 4: Determine whether the number of iterations reaches the maximum number of iterations. If it reaches, go to Step 6; otherwise, increment the number of iterations by 1 and go to Step 5.
[0028] Step 5: Calculate the gradient and Hessian matrix of the samples, determine the optimal split point, adjust the update step size of the LightGBM model parameters through the learning rate, and simultaneously update the LightGBM model parameters based on the update step size, then return to Step 2.
[0029] Step 6: Optimize the objective function based on the loss function, terminate the iteration, and obtain the trained LightGBM model.
[0030] Optionally, the calculation formula of the objective function is:
[0031] objective(θ) = loss(θ) + regularization(θ)
[0032] where objective(θ) is the objective function, loss(θ) is the loss function, and regularization(θ) is the regularization term.
[0033] Optionally, the learning rate adjustment formula is:
[0034]
[0035] In the formula, learning rate(t) is the learning rate, learning_rate_0 is the initial learning rate, decay_rate is the depth of the tree, and t is the time.
[0036] On the other hand, the present invention also discloses a daily power consumption prediction system considering multiple factors, including:
[0037] An acquisition module, configured to acquire historical data before the day to be predicted;
[0038] A selection module, configured to select a corresponding pre-trained LightGBM model based on the industry characteristics of the day to be predicted;
[0039] A prediction module, configured to substitute the historical data before the day to be predicted into the selected pre-trained LightGBM model and output the power consumption data of the day to be predicted.
[0040] Among them, the pre-trained LightGBM models corresponding to the characteristics of each industry are obtained by training the LightGBM algorithm in the way of gradient boosting tree using the historical electricity consumption of each industry characteristic and the industry characteristics related to electricity consumption.
[0041] Optionally, it further includes a model training module for: training the LightGBM model.
[0042] Optionally, the model training module includes:
[0043] Obtain the historical electricity consumption and the industry characteristics related to electricity consumption;
[0044] A processing sub-module for normalizing the historical electricity consumption and the industry characteristics related to electricity consumption;
[0045] A training set construction sub-module for constructing a training set of each industry characteristic from the normalized historical electricity consumption and each industry characteristic respectively;
[0046] A training sub-module for training the LightGBM algorithm in the way of gradient boosting tree based on the training set of each industry characteristic to obtain the trained LightGBM model corresponding to each industry characteristic;
[0047] Among them, the industry characteristics related to electricity consumption are the industry characteristics closely related to load impact screened by using correlation analysis.
[0048] Optionally, the training sub-module is specifically used for:
[0049] Step 1: Initialize the number of iterations and set the maximum number of iterations;
[0050] Step 2: Calculate the loss function value of the training data in the training set according to the loss function;
[0051] Step 3: Judge whether the loss function value converges. If it converges, go to Step 6; otherwise, go to Step 4;
[0052] Step 4: Judge whether the number of iterations reaches the maximum number of iterations. If it reaches, go to Step 6; otherwise, add 1 to the number of iterations and go to Step 5;
[0053] Step 5: Calculate the gradient and Hessian matrix of the sample, determine the best split point, and adjust the update step size of the LightGBM model parameters through the learning rate. At the same time, update the LightGBM model parameters based on the update step size, and return to Step 2;
[0054] Step 6: Optimize the objective function based on the loss function, terminate the iteration, and obtain the trained LightGBM model.
[0055] Optionally, the calculation formula of the objective function is:
[0056] objective(θ) = loss(θ) + regularization(θ)
[0057] where objective(θ) is the objective function, loss(θ) is the loss function, and regularization(θ) is the regularization term.
[0058] Optionally, the learning rate adjustment formula is:
[0059]
[0060] In the formula, learning rate(t) is the learning rate, learning_rate_0 is the initial learning rate, decay_rate is the depth of the tree, and t is the time.
[0061] On the other hand, the present application also provides an electronic device, including: at least one processor and a memory; the processor and the memory are connected by a bus;
[0062] The memory is used to store one or more programs;
[0063] When the one or more programs are executed by the at least one processor, the above-mentioned method for predicting daily power consumption considering multiple factors is implemented.
[0064] On the other hand, the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the above-mentioned method for predicting daily power consumption considering multiple factors is implemented.
[0065] Compared with the prior art, the beneficial effects of the present invention are:
[0066] The present invention provides a method for predicting daily power consumption considering multiple factors, including: obtaining historical data before the day to be predicted; substituting the historical data before the day to be predicted into a pre-trained LightGBM model to output power consumption data for the predicted day; wherein, the pre-trained LightGBM model is obtained by training the LightGBM algorithm in the form of a gradient boosting tree using historical daily power consumption and various industry characteristics related to power consumption. The trained LightGBM model adopted by the present invention is trained separately using various industry characteristics related to power consumption, and the daily power consumption is predicted according to different industry characteristics, improving the accuracy and comprehensiveness of the prediction. Description of the Drawings
[0067] Figure 1Flow chart of a daily power consumption prediction method considering multiple factors according to the present invention;
[0068] Figure 2 Overall flow chart of the daily power consumption prediction considering multiple factors according to the present invention;
[0069] Figure 3 Schematic diagram of the structure of an electronic device according to the present invention. Detailed implementation manners
[0070] The present invention incorporates comprehensive considerations of various factors such as holidays, major festivals, and extreme weather, gives full play to the advantages of the LightGBM algorithm in large-scale data and high-dimensional feature spaces, deepens the application of integral power in power verification, realizes the monitoring and analysis of power flow, provides a more reliable and efficient short-term load prediction scheme for the power system, and provides better control, planning, and operation support.
[0071] Example 1:
[0072] A daily power consumption prediction method considering multiple factors, as Figure 1 shown, includes:
[0073] Step S1: Obtain historical data before the day to be predicted;
[0074] Step S2: Based on the industry characteristics of the day to be predicted, select the corresponding pre-trained LightGBM model;
[0075] Step S3: Substitute the historical data before the day to be predicted into the selected pre-trained LightGBM model, and output the power consumption data of the day to be predicted;
[0076] Among them, the pre-trained LightGBM models corresponding to each industry characteristic are obtained by training the LightGBM algorithm in the form of gradient boosting trees using the historical power consumption of each industry characteristic and the industry characteristics related to power consumption.
[0077] The present invention proposes a daily power consumption prediction method considering multiple factors. The following further introduces each step of the present invention: Figure 2 Before step S1, introduce the nouns involved in the present invention.
[0078] Definition of nouns:
[0079] Meteorological factor: A factor predicted according to the influence coefficients of various parameters related to weather;
[0080] Legal holiday factor: A factor predicted by weighted average according to the year-on-year ratio in the same period of the past three years;
[0081]
[0082] Major event factor: A factor predicted based on the impact coefficients of similar or like events.
[0083] Step S1: Obtain the historical data before the prediction date, specifically including:
[0084] Data collection: Select parameters related to the power system load: climate data such as daily maximum, minimum, average temperature / humidity, precipitation, etc., and the year-on-year and month-on-month changes in electricity consumption of various industries on a daily basis. Maintain data such as legal holidays, special holidays (ethnic minority holidays), major events, lunar calendar, solar calendar, etc. as required as the input data for the model.
[0085] Step S1 also includes preprocessing the data.
[0086] Data preprocessing: First, it is necessary to clean the original data, including removing duplicate data, handling missing values and outliers, etc. Then, normalize the data input into the model to ensure that the input data is within the interval [0,1].
[0087] The formula is as follows:
[0088] x = (x in - x min ) / (x max - x min ) (1)
[0089] In the formula, x represents the data after normalization processing, and after processing, it is within the range of the interval [0,1]; x in represents the data before normalization processing; x min is the minimum value in the input data sample; x max is the maximum value in the input data sample.
[0090] Next, perform feature selection. Through correlation analysis, screen out the parameters with the greatest correlation with the power load, and establish the training set features. Use the Pearson correlation coefficient and the Spearman correlation coefficient for analysis, and screen out the features closely related to the load impact for input, so as to improve the prediction accuracy of the model. The calculation formula of the Pearson correlation coefficient is shown in Equation (2), denoted as ρ, and its value is between [-1,1]. When the absolute value of ρ is closer to 1, it represents a stronger linear correlation between the two variables, and when ρ is equal to 0, it means that there is no correlation between the two variables.
[0091]
[0092] In the formula, ρ represents the Pearson correlation coefficient; represents the average value of variable X; represents the average value of variable Y; n represents the number of samples included in the variable.
[0093] Before step S2, the training of the LightGBM model is first introduced, and the training process will be introduced in detail below.
[0094] The training of the LightGBM model includes:
[0095] Obtain historical electricity consumption and various industry characteristics related to electricity;
[0096] Normalize the historical electricity consumption and various industry characteristics related to electricity;
[0097] Construct training sets for various industry characteristics by respectively combining the normalized historical electricity consumption with various industry characteristics;
[0098] Based on the training sets of the various industry characteristics, train the LightGBM algorithm in the way of gradient boosting tree to obtain the trained LightGBM models corresponding to the various industry characteristics;
[0099] Among them, the various industry characteristics related to electricity are the various industry characteristics that are screened out by using correlation analysis and are closely related to the load impact.
[0100] Optionally, the determination of the various industry characteristics related to electricity includes:
[0101] Obtain historical electricity consumption and various industry characteristics;
[0102] Use Pearson correlation coefficient analysis to calculate the correlation between historical electricity consumption and various industry characteristics;
[0103] Determine the various industry characteristics related to electricity based on the correlation between the historical electricity consumption and the various industry characteristics.
[0104] Optionally, the correlation between the historical electricity consumption and the various industry characteristics is calculated according to the following formula:
[0105]
[0106] In the formula, ρ represents the Pearson correlation coefficient; represents the average value of variable X; represents the average value of variable Y; X is the characteristic closely related to the load impact; Y is the load; n represents the number of samples included in the variable, i represents the sample serial number, X i is the i-th characteristic closely related to the load impact, Y i is the load corresponding to the i-th characteristic.
[0107] Optionally, the training of the LightGBM algorithm in the way of gradient boosting tree based on the training sets of the various industry characteristics to obtain the trained LightGBM models corresponding to the various industry characteristics includes:
[0108] Step 1: Initialize the number of iterations and set the maximum number of iterations;
[0109] Step 2: Calculate the loss function values of the training data in the training set according to the loss function;
[0110] Step 3: Determine whether the loss function values converge. If they converge, go to Step 6; otherwise, go to Step 4;
[0111] Step 4: Determine whether the number of iterations reaches the maximum number of iterations. If it reaches, go to Step 6; otherwise, increment the number of iterations by 1 and go to Step 5;
[0112] Step 5: Calculate the gradient and Hessian matrix of the samples, determine the optimal splitting point, adjust the update step size of the LightGBM model parameters through the learning rate, and at the same time update the LightGBM model parameters based on the update step size, and return to Step 2;
[0113] Step 6: Optimize the objective function based on the loss function, terminate the iteration, and obtain the trained LightGBM model.
[0114] Optionally, the calculation formula of the objective function is:
[0115] objective(θ)=loss(θ)+regularization(θ) (3)
[0116] where objective(θ) is the objective function, loss(θ) is the loss function, and regularization(θ) is the regularization term.
[0117] Optionally, the learning rate adjustment formula is:
[0118]
[0119] In the formula, learning rate(t) is the learning rate, learning_rate_0 is the initial learning rate, decay_rate is the depth of the tree, and t is the time.
[0120] The training of the LightGBM model specifically includes:
[0121] Train using historical data. Select the actual daily electricity consumption values for the previous N days as the dependent variable of the model. At the same time, collect various industry characteristics related to electricity, including meteorological factors (such as minimum, maximum, average temperature, humidity, etc.), legal holiday factors, major event factors, etc., as independent variables. Classify the dates into working days, weekends, legal holidays, major event days, etc. If the prediction day is a working day, select the mean of the electricity sample data for the nearest 3 working days as the prediction data; if the prediction day is a weekend, select the mean of the electricity sample data for the nearest 1 weekend (two days) as the prediction data; if the prediction day is a legal holiday, conduct a weighted prediction based on the year-on-year ratio for the same period in the recent three years (the ratio for the recent three years is 5:3:2); if it is a major event day, then make a prediction based on the impact coefficient of similar or comparable events.
[0122] Use the gradient boosting tree method to train the LightGBM algorithm. The model fits the training data according to the loss function loss(θ), and gradually optimizes the prediction performance of the model. The calculation formula for the objective function is:
[0123] objective(θ)=loss(θ)+regularization(θ) (3)
[0124] Among them, objective(θ) represents the objective function, loss(θ) is the loss function, and regularization(θ) is the regularization term.
[0125] During the model training process, LightGBM gradually optimizes the objective function in a gradient boosting manner. In each iteration, the best split point is determined by calculating the gradient and Hessian matrix of the samples to minimize the objective function. The calculation formula for the splitting criterion is:
[0126]
[0127] Among them, g i and h i are the first-order and second-order gradients of the i-th child node (sample) respectively, λ is the regularization parameter, γ is the minimum loss reduction value of the leaf node, gain is the splitting gain, I left is the left child node of the i-th child node (sample), I right is the right child node of the i-th node, and I is the i-th node.
[0128] LightGBM controls the update step size of the model parameters in each iteration through learning rate adjustment. The learning rate adjustment formula is:
[0129]
[0130] Adjust the following parameters:
[0131] Learning rate: Set to 0.1 to control the update step of the model parameters in each iteration;
[0132] Maximum depth of the tree (max_depth): Set to 6 to limit the maximum depth of the decision tree and avoid overfitting;
[0133] Number of leaf nodes (num_leaves): Set to 30 to control the number of leaf nodes in each tree, which affects the complexity and generalization ability of the model.
[0134] Step S2: Based on the industry characteristics of the day to be predicted, select the corresponding pre-trained LightGBM model.
[0135] The industry characteristics here include: meteorological factors (such as minimum, maximum, average temperature, humidity, etc.), legal holiday factors, major event factors, and other industry characteristics related to electricity consumption.
[0136] Step S3: Substitute the historical data before the day to be predicted into the selected pre-trained LightGBM model to output the electricity consumption data of the day to be predicted.
[0137] Load forecasting: Call the trained LightGBM model to output the predicted electricity consumption data for the next day. This model is applicable to different types of daily electricity consumption forecasting tasks such as electricity sales volume, total social electricity consumption, and user electricity consumption.
[0138] Embodiment 2:
[0139] The present invention based on the same inventive concept also provides a daily electricity consumption forecasting system considering multiple factors, including:
[0140] An acquisition module for acquiring historical data before the day to be predicted;
[0141] A selection module for selecting the corresponding pre-trained LightGBM model based on the industry characteristics of the day to be predicted;
[0142] A prediction module for substituting the historical data before the day to be predicted into the selected pre-trained LightGBM model to output the electricity consumption data of the day to be predicted;
[0143] Among them, the pre-trained LightGBM models corresponding to each industry characteristic are obtained by training the LightGBM algorithm in the way of gradient boosting tree with the historical electricity consumption of each industry characteristic and the industry characteristics related to electricity consumption.
[0144] Optionally, it further includes a model training module for: training the LightGBM model.
[0145] Optionally, the model training module includes:
[0146] Obtain historical electricity consumption and industry characteristics related to electricity;
[0147] A processing sub-module for normalizing the historical electricity consumption and industry characteristics related to electricity;
[0148] A training set construction sub-module for constructing a training set of each industry characteristic from the normalized historical electricity consumption and each industry characteristic;
[0149] A training sub-module for training the LightGBM algorithm in the manner of gradient boosting tree based on the training set of each industry characteristic to obtain a trained LightGBM model corresponding to each industry characteristic;
[0150] Among them, the industry characteristics related to electricity are the industry characteristics closely related to load impact screened by correlation analysis.
[0151] Optionally, the training sub-module is specifically used for:
[0152] Step 1: Initialize the number of iterations and set the maximum number of iterations;
[0153] Step 2: Calculate the loss function value of the training data in the training set according to the loss function;
[0154] Step 3: Determine whether the loss function value converges. If it converges, go to Step 6; otherwise, go to Step 4;
[0155] Step 4: Determine whether the number of iterations reaches the maximum number of iterations. If it reaches, go to Step 6; otherwise
[0156] add 1 to the number of iterations and go to Step 5;
[0157] Step 5: Calculate the gradient and Hessian matrix of the sample, determine the best split point, and adjust the update step size of the LightGBM model parameters through the learning rate. At the same time, update the LightGBM model parameters based on the update step size and return to Step 2;
[0158] Step 4: Determine whether the number of iterations reaches the maximum number of iterations. If it reaches, go to Step 6; otherwise
[0159] Step 6: Optimize the objective function based on the loss function, terminate the iteration, and obtain the trained LightGBM
[0160] model.
[0161] Optionally, the calculation formula of the objective function is:
[0162] objective(θ) = loss(θ) + regularization(θ) (3)
[0163] Among them, objective(θ) is the objective function, loss(θ) is the loss function, and regularization(θ)
[0164] is the regularization term.
[0165] Optionally, the learning rate adjustment formula is as follows:
[0166]
[0167] In the formula, learning rate(t) is the learning rate, learning_rate_0 is the initial learning rate, decay_rate is
[0168] the depth of the tree, and t is the time.
[0169] Embodiment 3
[0170] As Figure 3 shown, the present invention further provides an electronic device, which may be a computer device, a single-chip microcomputer device, a smart mobile device, etc. The electronic device in this embodiment may include a processor, a memory, a transceiver component, etc. The memory, the processor, and the transceiver component are connected through a bus; the memory can be used to store an execution program, and the exemplary execution program may include instructions; the processor is used to execute the instructions stored in the memory. The mem
[0171] ory can also be used to store data, and the data can be called and / or modified when the instructions are executed.
[0172] The processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, and is suitable for implementing one or more instructions. Specifically, it is suitable for loading and executing one or more instructions in the storage medium to implement the corresponding method flow or corresponding function, so as to implement the steps of a daily power prediction method considering multiple factors in the above embodiments.
[0173] Embodiment 4
[0174] Based on the same inventive concept, the present invention also provides a readable storage medium, specifically an electronic device-readable storage medium (Memory). The electronic device-readable storage medium is a memory device in the electronic device and is used to store programs and data. It can be understood that the storage medium here can include both the built-in storage medium in the electronic device and, of course, the extended storage medium supported by the electronic device. The storage medium provides a storage space, and this storage space stores the operating system of the terminal. And, in this storage space, there are also stored one or more instructions suitable for being loaded and executed by the processor. These instructions can be one or more execution programs (including program codes). It should be noted that the storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. By the processor loading and executing one or more instructions stored in the storage medium, the steps of a method for predicting daily power consumption considering multiple factors in the above-mentioned embodiments can be realized.
[0175] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0176] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for realizing the function specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0177] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device realizes the function in the process Figure 1 one process or multiple processes and / or blocksFigure 1 The functions specified in one or more boxes.
[0178] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one Figure 1 process or more processes and / or boxes Figure 1 or more boxes.
[0179] The above are only embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included within the scope of the claims of the present invention pending approval.
Claims
1. A daily electricity consumption prediction method considering multiple factors, characterized in that: include: Obtain historical data before the day to be predicted; Based on the industry characteristics of the predicted day, select the corresponding pre-trained LightGBM model; Substitute the historical data before the day to be predicted into the selected pre-trained LightGBM model, and output the electricity data of the day to be predicted; Among them, the pre-trained LightGBM model corresponding to each industry characteristic is obtained by training the LightGBM algorithm using the gradient boosting tree method based on the historical electricity consumption of each industry characteristic and the characteristics of each industry related to electricity.
2. The method according to claim 1, characterized in that The training of the LightGBM model includes: Obtain historical electricity consumption and characteristics of each industry related to electricity consumption; Normalize historical electricity consumption and characteristics of various industries related to electricity consumption; The training sets of each industry’s characteristics are constructed by normalizing the historical electricity consumption and the characteristics of each industry; Based on the training set of the characteristics of each industry, the LightGBM algorithm is trained using a gradient boosting tree to obtain a trained LightGBM model corresponding to the characteristics of each industry; Among them, the characteristics of various industries related to electricity are the characteristics of various industries that are closely affected by load and screened out through correlation analysis.
3. The method according to claim 2, characterized in that The determination of the characteristics of each industry related to electricity volume includes: Obtain historical electricity consumption and characteristics of each industry; Pearson correlation coefficient analysis was used to calculate the correlation between historical electricity consumption and the characteristics of each industry; Based on the correlation between the historical electricity consumption and the characteristics of each industry, the characteristics of each industry related to electricity consumption are determined.
4. The method according to claim 3, characterized in that The correlation between the historical electricity consumption and the characteristics of each industry is calculated as follows: In the formula, ρ represents the Pearson correlation coefficient; represents the mean value of variable X; represents the average value of variable Y; X is the feature that is closely related to load; Y is the load; n represents the number of samples contained in the variable, i represents the sample number, and X i is the i-th feature that is closely affected by the load, Y i is the load corresponding to the i-th feature.
5. The method according to claim 2, characterized in that The training set based on the characteristics of each industry uses a gradient boosting tree to train the LightGBM algorithm to obtain a trained LightGBM model corresponding to the characteristics of each industry, including: Step 1: Initialize the number of iterations and set the maximum number of iterations; Step 2: Calculate the loss function value of the training data in the training set according to the loss function; Step 3: Determine whether the loss function value converges, if so, proceed to step 6, otherwise proceed to step 4; Step 4: Determine whether the number of iterations reaches the maximum number of iterations. If so, proceed to step 6. Otherwise, add 1 to the number of iterations and proceed to step 5. Step 5: Calculate the gradient and Hessian matrix of the sample, determine the optimal split point, and adjust the update step size of the LightGBM model parameters through the learning rate. At the same time, update the LightGBM model parameters based on the update step size and return to step 2; Step 6: Optimize the objective function based on the loss function, terminate the iteration, and obtain the trained LightGBM model.
6. The method according to claim 5, characterized in that The calculation formula of the objective function is: objective(θ)=loss(θ)+regularization(θ) Among them, objective(θ) is the objective function, loss(θ) is the loss function, and regularization(θ) is the regularization term.
7. The method according to claim 5, characterized in that The learning rate adjustment formula is: In the formula, learning rate(t) is the learning rate, learning_rate_0 is the initial learning rate, decay_rate is the depth of the tree, and t is the time.
8. A daily electricity forecasting system considering multiple factors, characterized in that: include: An acquisition module is used to obtain historical data before the day to be predicted; A selection module is used to select a corresponding pre-trained LightGBM model based on the industry characteristics of the day to be predicted; A prediction module is used to substitute the historical data before the day to be predicted into the selected pre-trained LightGBM model and output the electricity data of the day to be predicted; Among them, the pre-trained LightGBM model corresponding to each industry characteristic is obtained by training the LightGBM algorithm using the gradient boosting tree method based on the historical electricity consumption of each industry characteristic and the characteristics of each industry related to electricity.
9. An electronic device, characterized in that: include: at least one processor and memory; The memory and the processor are connected via a bus; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, a daily electricity consumption prediction method considering multiple factors as described in any one of claims 1 to 7 is implemented.
10. A readable storage medium, characterized in that: An execution program is stored thereon, and when the execution program is executed, a daily electricity consumption prediction method considering multiple factors as described in any one of claims 1 to 7 is implemented.