CN114971736A - Power metering material demand prediction method and device, electronic equipment and storage medium - Google Patents

Power metering material demand prediction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114971736A
CN114971736A CN202210652697.5A CN202210652697A CN114971736A CN 114971736 A CN114971736 A CN 114971736A CN 202210652697 A CN202210652697 A CN 202210652697A CN 114971736 A CN114971736 A CN 114971736A
Authority
CN
China
Prior art keywords
demand
monthly
data
lstm
quarterly
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210652697.5A
Other languages
Chinese (zh)
Inventor
叶佑春
李经儒
宋睿
丁晓飞
靳威
孙奕
董博
陈鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Power Grid Co Ltd
Measurement Center of Guangdong Power Grid Co Ltd
Original Assignee
Guangdong Power Grid Co Ltd
Measurement Center of Guangdong Power Grid Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Power Grid Co Ltd, Measurement Center of Guangdong Power Grid Co Ltd filed Critical Guangdong Power Grid Co Ltd
Priority to CN202210652697.5A priority Critical patent/CN114971736A/en
Publication of CN114971736A publication Critical patent/CN114971736A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0202Market predictions or forecasting for commercial activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Abstract

The application discloses electric power measurement material demand prediction method, device, electronic equipment and storage medium, including: preprocessing historical monthly demand data of the electric power measurement materials to generate a monthly demand data set, a quarterly demand data set and an annual demand data set of the electric power measurement materials, and respectively constructing an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model and an LSTM annual demand prediction model; and respectively inputting the data to be predicted into an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model and an LSTM annual demand prediction model to generate a monthly demand prediction result, a quarterly demand prediction result and a degree demand prediction result, and generating an electric power measurement material demand prediction result by combining the weights of the results. According to the method and the device, the monthly, quarterly and annual requirements are respectively predicted, and then the final prediction result is obtained by combining the weights of the monthly, quarterly and annual requirements, so that the accuracy of the prediction result is effectively improved.

Description

Power metering material demand prediction method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of power grid data analysis, in particular to a demand forecasting method and device for electric power metering materials, electronic equipment and a storage medium.
Background
The electric power material management is a basic work of an electric power enterprise, and directly involves aspects such as electric power engineering construction, company cost management and safe production. The electric energy metering material is one of the most important materials of electric power materials, and mainly comprises various types of electric energy meters, a metering voltage, a current transformer and a device (comprising a combined junction box and a secondary wire) for metering electric energy, which is formed by connecting a secondary circuit of the current transformer, and acquisition equipment (comprising various types of load control terminals, concentrators and collectors) for acquiring electric energy data. Along with the rapid increase of the investment scale of power grid construction, the proportion of electric energy metering materials in the whole power grid investment is larger and larger, the requirement on electric energy metering is higher and higher, and the required amount of money for metering the materials is bound to be continuously increased. Therefore, the effective prediction of the demand of the electric energy metering materials is beneficial to the promotion of lean management work of the electric energy metering materials.
However, at present, when predicting the demand of electric power metering materials, workers often make predictions by experience and intuition or use a simple regression prediction method to predict the demand. Obviously, the method is too dependent on manual experience, a large amount of manpower and material resources are consumed, and due to the fact that work of actual workers is uneven, the accuracy of the prediction result under the method cannot be guaranteed.
Disclosure of Invention
The application aims to provide a method and a device for forecasting demand of electric power measurement materials, electronic equipment and a storage medium, and the method and the device are used for solving the problems of high cost and low accuracy in the existing electric power measurement material demand forecasting mode.
In order to achieve the above object, the present application provides a demand forecasting method for electric power measurement materials, including:
preprocessing historical monthly demand data of the electric power measurement materials to generate a monthly demand data set, a quarterly demand data set and an annual demand data set of the electric power measurement materials;
respectively constructing an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model and an LSTM annual demand prediction model based on a monthly demand data set, a quarterly demand data set and an annual demand data set of the electric power measurement materials;
respectively inputting data to be predicted into an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model and an LSTM annual demand prediction model to generate a monthly demand prediction result, a quarterly demand prediction result and a degree demand prediction result;
and generating a power metering material demand forecasting result according to the monthly demand forecasting result, the quarterly demand forecasting result, the annual demand forecasting result and the weight corresponding to each result.
Further, the preprocessing the historical monthly demand data of the electric power measurement materials to generate a monthly demand data set, a quarterly demand data set and an annual demand data set of the electric power measurement materials includes:
rejecting abnormal data in the historical monthly demand data, and compensating the abnormal data according to the average value of the two historical monthly demand data before and after the abnormal data; the abnormal data is data of which historical monthly demand data is in a preset range;
normalizing all the compensated historical monthly demand data to generate a plurality of target monthly demand data;
obtaining a monthly demand data set according to a plurality of target monthly demand data; adding data belonging to the same quarter of the same year in a plurality of target monthly demand data to generate a quarter demand data set; and adding data belonging to the same year in the plurality of target monthly demand data to generate an annual demand data set.
Further, the building of an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model, and an LSTM annual demand prediction model based on the monthly demand data set, the quarterly demand data set, and the annual demand data set of the electricity metering material includes:
respectively taking monthly, quarterly and annual historical data as input, respectively taking a monthly demand data set, a quarterly demand data set and an annual demand data set as output of a model, and constructing a monthly training sample, a quarterly training sample and an annual training sample; the historical data comprises weather data, power generation equipment output and reliability data, date attribute data and power grid dispatching data;
and training the original LSTM model by using the monthly training samples, the quarterly training samples and the annual training samples respectively until the model is converged, and generating an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model and an LSTM annual demand prediction model.
Further, the method for predicting the demand of the power metering materials further comprises the step of judging whether the model converges or not according to an average absolute error loss function;
when the value of the mean absolute error loss function reaches a preset value, the model converges.
Further, the method for forecasting the demand of the power metering material further comprises the step of setting network parameters of an original LSTM model, wherein the learning rate is set to be 0.001, and the iteration times are set to be 1000.
Further, the generating a demand forecast result of the electricity metering material according to the monthly demand forecast result, the quarterly demand forecast result, the annual demand forecast result and the weight corresponding to each result includes:
T=a·Y moon +b·Y quarter +c·Y year
wherein T is the forecast result of the demand of the power measurement material, Y moon For monthly demand forecasts, Y quarter Predicting results, Y, for seasonal demand year For the annual demand forecast, a, b, c are weight parameters respectively.
The application still provides an electric power measurement material demand prediction device, includes:
the preprocessing module is used for preprocessing historical monthly demand data of the electric power measurement materials to generate a monthly demand data set, a quarterly demand data set and an annual demand data set of the electric power measurement materials;
the model construction module is used for respectively constructing an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model and an LSTM annual demand prediction model based on a monthly demand data set, a quarterly demand data set and an annual demand data set of the electric power measurement materials;
the prediction module is used for respectively inputting data to be predicted into the LSTM monthly demand prediction model, the LSTM quarterly demand prediction model and the LSTM annual demand prediction model to generate a monthly demand prediction result, a quarterly demand prediction result and a annual demand prediction result;
and the prediction result generation module is used for generating a power metering material demand prediction result according to the monthly demand prediction result, the quarterly demand prediction result, the annual demand prediction result and the weight corresponding to each result.
Further, the preprocessing module comprises:
the deleting unit is used for eliminating abnormal data in the historical monthly demand data and compensating the abnormal data according to the average value of the two historical monthly demand data before and after the abnormal data; the abnormal data is data of which historical monthly demand data is in a preset range;
the compensation unit is used for carrying out normalization processing on all the compensated historical monthly requirement data to generate a plurality of target monthly requirement data;
the data set generating unit is used for obtaining a monthly requirement data set according to a plurality of target monthly requirement data; adding data belonging to the same quarter of the same year in a plurality of target monthly demand data to generate a quarter demand data set; and adding data belonging to the same year in the plurality of target monthly demand data to generate an annual demand data set.
The present application further provides an electronic device, comprising:
one or more processors;
a memory coupled to the processor for storing one or more programs;
when executed by the one or more processors, the one or more programs cause the one or more processors to implement the electricity metering supplies demand forecasting method of any one of the above.
The present application also provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the power metering material demand prediction method as described in any one of the above.
Compared with the prior art, the beneficial effects of this application lie in:
the application discloses a demand forecasting method, a demand forecasting device, electronic equipment and a storage medium for electric power metering supplies, wherein the demand forecasting device comprises the following steps: preprocessing historical monthly demand data of the electric power measurement materials to generate a monthly demand data set, a quarterly demand data set and an annual demand data set of the electric power measurement materials, and respectively constructing an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model and an LSTM annual demand prediction model; and respectively inputting the data to be predicted into an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model and an LSTM annual demand prediction model to generate a monthly demand prediction result, a quarterly demand prediction result and a degree demand prediction result, and generating an electric power measurement material demand prediction result by combining the weights of the results. According to the method and the device, the monthly, quarterly and annual requirements are respectively predicted, and then the final prediction result is obtained by combining the weights of the monthly, quarterly and annual requirements, so that the accuracy of the prediction result is effectively improved.
Drawings
In order to more clearly illustrate the technical solution of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic diagram of an LSTM network according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a method for forecasting demand for electric power measurement materials according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart of the sub-steps of step S10 in FIG. 2;
fig. 4 is a schematic flow chart illustrating a method for forecasting demand for power metering supplies according to another embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electric power measurement material demand prediction apparatus according to an embodiment of the present application;
FIG. 6 is a schematic diagram of the sub-modules of the pre-processing module 01 of FIG. 5;
FIG. 7 is a schematic block diagram of a sub-module of the model building module 02 of FIG. 5;
fig. 8 is a schematic structural diagram of a demand forecasting apparatus for power metering supplies according to another embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be understood that the step numbers used herein are for convenience of description only and are not intended as limitations on the order in which the steps are performed.
It is to be understood that the terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The terms "comprises" and "comprising" indicate the presence of the described features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The term "and/or" refers to and includes any and all possible combinations of one or more of the associated listed items.
It should be noted that the demand forecast of the existing power metering materials usually depends on manual forecast, and staff often need to make the forecast by experience and intuition, or adopt a simple regression forecasting method to make the forecast. However, this method too depends on manual experience, not only a large amount of manpower and material resources are consumed, but also the prediction result is often inaccurate due to uneven work of actual workers, so this embodiment aims to provide an LSTM model-based method for predicting demand for electric power metering supplies, which obtains a final prediction result by respectively predicting monthly, quarterly and annual demands and combining weights of the demands, thereby achieving the purpose of effectively improving accuracy of the prediction result.
Referring to fig. 1, to assist understanding, an embodiment of the present application first provides a schematic diagram of the operation of an LSTM network. As shown in fig. 1, the working principle of LSTM can be divided into the following three steps:
the first step determines which information to discard from the state of the previous cell, the output h of the previous cell being input t-1 And current time input data x t . The expression is as follows:
f t =σ(W f ·[h t-1 ,x t ]+b f );
wherein sigma is sigmoid activation function, W f To forget weight, b f To forget the bias. Of output f t The value range is 0-1, which determines what information is allowed to pass and what information is retained.
If f is t If the output is 0, the state information of the previous unit is completely forgotten and cannot be input into the current unit; if f is t The output is 1, the state information of the previous cell is all preserved by the current cell.
The second step determines what is memorized in the current unit state, and the expression is as follows:
i t =σ(W i ·[h t-1 ,x t ]+b i ),
Figure BDA0003688216360000071
wherein, W i As input weights, b i For input bias, W c Is cell weight, b c For cell biasing, i t Is a control signal that controls which new input information can be updated to the current state;
Figure BDA0003688216360000072
new information is generated.
Figure BDA0003688216360000073
The result of (c) determines what information can be remembered in the current state cell. And adding the discarded and reserved information with the memorized information to obtain new state information.
The third step is to determine what the current state outputs, and the expression is as follows:
o t =σ(W o [h t-1 ,x t ]+b o ),h t =o t ×tanh(C t );
wherein, W o As output weights, b o To output the bias, this step determines what information is output.
After the operation principle of the LSTM network is introduced, a method for predicting the demand of electric power metering supplies based on the LSTM network is provided. Referring to fig. 2, fig. 2 schematically illustrates a flow chart of a demand forecasting method for power metering supplies according to an embodiment of the present application. As shown in fig. 2, the method for forecasting demand for electricity metering material includes steps S10 to S40. The method comprises the following steps:
and S10, preprocessing the historical monthly demand data of the electric power measurement materials to generate a monthly demand data set, a quarterly demand data set and an annual demand data set of the electric power measurement materials.
Before this step is performed, it is usually necessary to obtain the historical monthly demand data of the electricity metering materials. In this embodiment, the historical monthly requirement data may be historical monthly requirement data input by a user, or historical monthly requirement data directly acquired from a specified storage address.
Further, step S10 is executed to obtain a monthly requirement data set, a quarterly requirement data set and an annual requirement data set by processing the historical monthly requirement data.
Since the historical monthly demand data acquired in the above steps may be irregular, and direct use may affect the accuracy of the subsequent modeling, before modeling, the historical monthly demand data needs to be processed accordingly to ensure the normativity of the historical monthly demand data.
As shown in fig. 3, in an exemplary embodiment, step S10 further includes the following sub-steps:
s101, eliminating abnormal data in the historical monthly demand data, and compensating the abnormal data according to the average value of the two historical monthly demand data before and after the abnormal data; the abnormal data is data of which the historical monthly demand data is within a preset range.
In this step, a minimum threshold and a maximum threshold may be usually set, and when the data is in the range between the minimum threshold and the maximum threshold, that is, in the preset range, the data is retained; and when the data is larger than the maximum threshold or smaller than the minimum threshold, determining that the data exceeds the range of the normal data, namely the data is abnormal data, and eliminating the part of the data to ensure that all the data is in a normal range. For example, the maximum threshold may be set to 1000, and the minimum threshold may be set to 600, in which case, data greater than 1000 or data less than 600 is abnormal data and needs to be removed.
Further, the abnormal data are compensated according to the average value of the two historical monthly demand data before and after the abnormal data.
In a preferred embodiment, the abnormal data may be compensated in this step according to an average value of past and future synchronization historical monthly demand data of the abnormal data.
Specifically, taking the example that the data of month 7 is abnormal data, after the abnormal data is deleted, the data of month 7 can be supplemented according to the average value of the data of month 6 and month 8 in the same year. However, there may be cases where historical monthly demand data varies greatly over the month. For example, 7 months per year is a peak period of the demand of electricity metering supplies, and the demand is much higher than 6 months and 8 months in the same year, and at this time, the abnormal data is supplemented by the average value of 6 months and 8 months, so that the supplemented data is greatly different from the actual data. The abnormal data can be supplemented by the average value of the historical monthly demand data of the same month in the previous year and the historical monthly demand data of the same month in the next year. The specific manner of use may be determined according to actual conditions, and the embodiments of the present application are not particularly limited.
As another preferred embodiment, the missing data may be supplemented according to an average value of two previous and next historical monthly demand data of the missing data in this step.
It can be understood that, in addition to the case that the data is abnormal, a missing case may exist, and the missing data may be supplemented according to an average value of two historical monthly requirement data before and after the missing data. Of course, the missing data may be supplemented with an average value of the historical monthly demand data of the same month in the previous year and the historical monthly demand data of the same month in the next year. The specific manner to be adopted may be determined according to actual conditions, and the present application is not particularly limited.
And S102, normalizing all the compensated historical monthly requirement data to generate a plurality of target monthly requirement data.
Specifically, in this step, normalization processing is performed by the following formula:
Figure BDA0003688216360000091
in the formula, X norm Is normalized data, namely target monthly demand data, X is historical demand data, X is min For the smallest of the historical demand data, X max The largest data in the historical demand data.
S103, obtaining a monthly requirement data set according to the target monthly requirement data; adding data belonging to the same quarter of the same year in a plurality of target monthly demand data to generate a quarter demand data set; and adding data belonging to the same year in the plurality of target monthly demand data to generate an annual demand data set.
In the embodiment of the application, the target quarter demand data is obtained by adding three target monthly demand data of the same quarter, and the target year demand data is obtained by adding twelve target monthly demand data of the same year. For example, target monthly demand data of 1 month, 2 months and 3 months in the same year are added to obtain a target quarterly demand data, and it should be noted that target monthly demand data of three months are not added to obtain a quarterly demand data, and it is not a target quarterly demand data as if three target monthly demand data of 3 to 5 months in the same year are added. One target quarterly demand data refers specifically to the sum of three target demand table data from 1 to 3 months, or from 4 to 6 months, or from 7 to 9 months, or from 10 to 12 months. Similarly, the target annual demand data refers to the sum of target monthly demand data of 12 months in the same year.
Preferably, continuous N1 month degree demand data are selected from the month demand data to form a month demand data set; selecting continuous N2 quarterly demand data from the quarterly demand data to form a quarterly demand data set; and selecting continuous N3 annual requirement data from the annual requirement data to form an annual requirement data set. Wherein N1, N2 and N3 are positive integers of 2 or more. In the process of establishing the LSTM model, the more data, the more accurate the prediction result, so that the values of N1, N2, and N3 may be selected as large as possible according to the actual situation, which is not specifically limited in the present application.
S20, respectively constructing an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model and an LSTM annual demand prediction model based on the monthly demand data set, the quarterly demand data set and the annual demand data set of the electric power measurement materials.
Specifically, the method comprises the following steps:
2.1) establishing an LSTM monthly demand prediction model based on the monthly demand data set:
in the step, a target monthly requirement data set is divided into a target monthly requirement training set and a target monthly requirement verification set; training an LSTM monthly demand prediction model based on a target monthly demand training set, and adjusting parameters of the LSTM monthly demand prediction model based on a target monthly demand verification set, thereby establishing the LSTM monthly demand prediction model.
2.2) building an LSTM quarterly demand prediction model based on the quarterly demand data set:
in the step, dividing a target quarterly demand data set into a target quarterly demand training set and a target quarterly demand verification set; training an LSTM quarterly demand prediction model based on a target quarterly demand training set, and adjusting parameters of the LSTM quarterly demand prediction model based on a target quarterly demand verification set, so that the LSTM quarterly demand prediction model is established.
2.3) establishing an LSTM annual demand prediction model based on the annual demand data set:
in the step, a target annual demand data set is divided into a target annual demand training set and a target annual demand verification set; training an LSTM annual demand prediction model based on a target annual demand training set, and adjusting parameters of the LSTM annual demand prediction model based on a target annual demand verification set, so that the LSTM annual demand prediction model is established.
It should be noted that, in the embodiments of the present application, the order of 2.1), 2.2), and 2.3) to construct the model is not limited.
In one embodiment, when the model is constructed, monthly, quarterly and annual historical data are respectively used as input, a monthly demand data set, a quarterly demand data set and an annual demand data set are respectively used as output of the model, and a monthly training sample, a quarterly training sample and an annual training sample are constructed; the historical data comprises weather data, power generation equipment output and reliability data, date attribute data and power grid dispatching data;
in this embodiment, when the LSTM model is established, data needs to be divided into a training set and a verification set, the division ratio includes, but is not limited to, 7: 3, and the ratio may be adjusted according to an actual situation, which is not specifically limited in this application. The training set is used for training the LSTM model, and the verification set is used for adjusting parameters of the LSTM whole model.
Wherein the parameter comprises a forgetting weight W f Forgetting bias b f Input weight W i Input bias b i Output weight W o And an output offset b o
Specifically, taking the example of establishing an LSTM monthly demand prediction model as an example for explanation:
training set of target monthly [ X ] moon0 ,X moon1 ,...,X moon(n) ]And as an input sequence of the LSTM monthly demand prediction model, training the LSTM monthly demand prediction model. Wherein, X moon(n) Is the historical demand data of the nth month. Reuse target monthly verification set [ X ] moon(n+1) ,X moon(n+2) ,...,X moon(n+m) ]And adjusting parameters of the LSTM monthly demand prediction model to establish the LSTM monthly demand prediction model.
And training the original LSTM model by using the monthly training samples, the quarterly training samples and the annual training samples respectively until the model is converged, and generating an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model and an LSTM annual demand prediction model.
In a specific embodiment, the training of the model further includes determining whether the model converges according to an average absolute error loss function; when the value of the mean absolute error loss function reaches a preset value, the model converges.
In this step, the average absolute error loss function, also called MAE loss function difference (MAE), is another commonly used regression loss function, which is the sum of the absolute values of the differences between the target value and the predicted value, and represents the average error magnitude of the predicted value, and does not need to consider the direction of the error. In this embodiment, by setting a predetermined value, for example, 1.1, when the output value of the MAE loss function is 1.1, the model can be considered to be converged. It should be understood that 1.1 is only a preferred mode of the present embodiment, and the size thereof can be set according to actual needs, and the present application is not limited in any way.
In a specific embodiment, the model training further includes setting network parameters of the original LSTM model, including setting a learning rate of 0.001 and a number of iterations of 1000.
And S30, inputting the data to be predicted into the LSTM monthly demand prediction model, the LSTM quarterly demand prediction model and the LSTM annual demand prediction model respectively, and generating a monthly demand prediction result, a quarterly demand prediction result and a annual demand prediction result.
In the embodiment of the application, monthly demand data, quarterly demand data and annual demand data are respectively output from the three LSTM models, and the three data are combined to predict the demand of the power metering materials of the month to be predicted, so that the perception capability of the predicted demand result on different time periods is improved, and the predicted result is more accurate.
In a specific embodiment, the input month to be predicted is a sequence value of the month to be predicted. For example, the monthly requirement training set forms a training sequence [ X moon0 ,X moon1 ,...,X moon(n) ]Where 0, 1.. n represents a sequence value, and the lunar degrees are sorted in time sequence starting with the sequence value of the first data in the training set as 0, it should be noted that the lunar degrees here includes the lunar degrees after the first lunar degree in the training setAnd obtaining a sequence value t of the month to be predicted by the historical month and the month to be predicted. The sequence value of the quarter of the month to be predicted and the sequence value of the year of the month to be predicted are obtained by the same method, which is not described herein again.
In addition, the present embodiment does not limit the order of generating the monthly demand forecast result, the quarterly demand forecast result, and the quarterly demand forecast result.
And S40, generating a power metering material demand forecasting result according to the monthly demand forecasting result, the quarterly demand forecasting result, the annual demand forecasting result and the weight corresponding to each result.
Specifically, the electric power measurement material demand prediction result is generated by adopting the following formula:
T=a·Y moon +b·Y quarter +c·Y year
wherein Y is the forecasting result of the demand of the power measurement material, Y moon For monthly demand forecasts, Y quarter Predicting results, Y, for seasonal demand year For the annual demand prediction result, a, b and c are weight parameters respectively.
In the embodiment of the application, a, b and c can establish an equation set through the predicted demand results and the corresponding actual demand results of the three models, so as to obtain the values of a, b and c. For example, 5 months in 19 years are selected to obtain the prediction demand results of the three models to obtain 3 prediction values, an equation can be established after the actual values in 5 months in 19 years are obtained, an equation set can be established after the prediction values and the actual values in the other two months are selected, and the values of a, b and c are solved according to the equation set. And after the values of a, b and c are determined, weighting and summing are carried out by combining respective prediction results, and then the prediction result of the demand of the electric power metering material can be generated.
In summary, the power metering material demand prediction results are finally obtained by combining the weights of the power metering material demand prediction results, and the prediction accuracy is effectively improved.
It can be understood that, as time goes on, the predicted result may become less and less accurate, so the LSTM model needs to be updated within a certain time, so that the LSTM demand prediction model realizes a self-learning function to ensure the accuracy of the predicted result. And after the actual demand result of the month to be predicted is obtained, storing the result for use in updating the LSTM model.
Specifically, referring to fig. 4, after step S40 is executed, the forecast result of the demand of the electricity metering material is usually compared with the actual demand result of the pre-stored data to be forecasted, and then step S60 is executed, that is, whether the absolute value of the difference between the forecast result of the demand of the electricity metering material and the actual demand result is greater than the error threshold is determined, if yes, step S70 is executed, the actual demand result is imported into the historical demand data, and then step S50 is executed, and the historical monthly demand data of the electricity metering material is obtained again for iteration. If not, returning to the step S30, and continuing to predict until the absolute value of the difference between the prediction result of the demand of the electric power metering material and the actual demand result is less than or equal to the error threshold. Preferably, the error threshold may be set to 50, and if the absolute value of the difference between the demand prediction result and the actual demand result is greater than 50, it may be determined that the error of the predicted demand result is not within the error range, otherwise, it may be considered to be within the error range. However, 50 is only a preferred value of the error threshold, and can be flexibly adjusted in practical applications, and is not limited herein.
Referring to fig. 5, an embodiment of the present application further provides a device for predicting demand of power metering materials, including:
the preprocessing module 01 is used for preprocessing historical monthly demand data of the electric power measurement materials to generate a monthly demand data set, a quarterly demand data set and an annual demand data set of the electric power measurement materials;
the model building module 02 is used for respectively building an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model and an LSTM annual demand prediction model based on a monthly demand data set, a quarterly demand data set and an annual demand data set of the electric power measurement materials;
the prediction module 03 is used for inputting data to be predicted into the LSTM monthly demand prediction model, the LSTM quarterly demand prediction model and the LSTM annual demand prediction model respectively to generate a monthly demand prediction result, a quarterly demand prediction result and a annual demand prediction result;
and the prediction result generation module 04 is used for generating a power metering material demand prediction result according to the monthly demand prediction result, the quarterly demand prediction result, the annual demand prediction result and the weight corresponding to each result.
As an alternative embodiment, the preprocessing module 01 further includes three sub-modules, as shown in fig. 6, specifically:
the deleting unit 011 is used for eliminating abnormal data in the historical monthly demand data and compensating abnormal data according to the average value of the two historical monthly demand data before and after the abnormal data; the abnormal data is data of which historical monthly demand data is in a preset range;
a compensation unit 012, configured to perform normalization processing on all the compensated historical monthly demand data to generate a plurality of target monthly demand data;
a data set generating unit 013, configured to obtain a monthly requirement data set according to the multiple target monthly requirement data; adding data belonging to the same quarter of the same year in a plurality of target monthly demand data to generate a quarter demand data set; and adding data belonging to the same year in the plurality of target monthly demand data to generate an annual demand data set.
Referring to fig. 7, as an alternative embodiment, the model building module 02 includes:
the data dividing unit 021 is used for dividing the target monthly requirement data set into a target monthly requirement training set and a target monthly requirement verification set; the system is also used for dividing the target quarterly demand data set into a target quarterly demand training set and a target quarterly demand verification set; the system is also used for dividing the target annual demand data set into a target annual demand training set and a target annual demand verification set;
a training unit 022, configured to train an LSTM monthly demand prediction model based on the target monthly demand training set, and adjust parameters of the LSTM monthly demand prediction model based on the target monthly demand validation set, so as to establish the LSTM monthly demand prediction model; the LSTM quarterly demand forecasting model is trained based on the target quarterly demand training set, and parameters of the LSTM quarterly demand forecasting model are adjusted based on the target quarterly demand verification set, so that the LSTM quarterly demand forecasting model is established; the method is also used for training the LSTM annual demand prediction model based on the target annual demand training set and adjusting parameters of the LSTM annual demand prediction model based on the target annual demand verification set, so that the LSTM annual demand prediction model is established.
Referring to fig. 8, as an alternative embodiment, the power metering material demand forecasting device may further include:
and the data acquisition module 05 is used for acquiring historical monthly demand data of the electric power metering materials.
And the judging module 06 is configured to judge whether an absolute value of a difference between the power metering material demand prediction result and the actual demand result is greater than an error threshold.
And the importing module 07 is configured to import the actual demand result into the historical demand data if the absolute value of the difference is greater than the error threshold.
It can be understood that the demand forecasting device for electric metering materials provided in this embodiment is configured to execute the demand forecasting method for electric metering materials provided in any one of the above embodiments, and therefore, the beneficial effects achieved by the demand forecasting device for electric metering materials provided in any one of the above implementation manners can be referred to, and are not further described herein.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, where the electronic device 700 may include: at least one processor 701, e.g., a CPU, at least one network interface 705, a user interface 704, a memory 702, at least one communication bus 703 and a display screen. Wherein a communication bus 803 is used to enable connection communication between these components. The user interface 704 may include, but is not limited to, a touch screen, a keyboard, a mouse, a joystick, and the like. The network interface 705 may optionally include a standard wired interface or a wireless interface (e.g., a WIFI interface or a bluetooth interface), and the network interface 705 may establish a communication connection with the server. The memory 702 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). As shown in fig. 7, memory 702, which is a type of computer storage medium, may include an operating system, a network communication module, a user interface module, and program instructions.
It should be noted that the network interface 705 may be connected to an acquirer, a transmitter or other communication module, and the other communication module may include, but is not limited to, a WiFi module, a bluetooth module, etc., and it is understood that the electronic device 700 may also include an acquirer, a transmitter and other communication module, etc. in this embodiment of the present application.
The processor 701 may be configured to call program instructions stored in the memory 702, and may perform the method provided by any of the above embodiments.
An embodiment of the present application also provides a computer storage medium having stored therein instructions, which when run on a computer or processor, cause the computer or processor to perform one or more of the steps of any of the above embodiments. The above-mentioned respective constituent modules of the electronic device may be stored in the computer-readable storage medium if they are implemented in the form of software functional units and sold or used as independent products.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)), or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. And the aforementioned storage medium includes: various media capable of storing program codes, such as a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, and an optical disk. The technical features in the present examples and embodiments may be arbitrarily combined without conflict.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A demand forecasting method for electric power measurement materials is characterized by comprising the following steps:
preprocessing historical monthly demand data of the electric power measurement materials to generate a monthly demand data set, a quarterly demand data set and an annual demand data set of the electric power measurement materials;
respectively constructing an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model and an LSTM annual demand prediction model based on a monthly demand data set, a quarterly demand data set and an annual demand data set of the electric power measurement materials;
respectively inputting data to be predicted into an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model and an LSTM annual demand prediction model to generate a monthly demand prediction result, a quarterly demand prediction result and a degree demand prediction result;
and generating a power metering material demand forecasting result according to the monthly demand forecasting result, the quarterly demand forecasting result, the annual demand forecasting result and the weight corresponding to each result.
2. The method for forecasting demand for electric power measurement materials according to claim 1, wherein the preprocessing the historical monthly demand data of the electric power measurement materials to generate a monthly demand data set, a quarterly demand data set and an annual demand data set of the electric power measurement materials comprises:
rejecting abnormal data in the historical monthly demand data, and compensating the abnormal data according to the average value of the two historical monthly demand data before and after the abnormal data; the abnormal data is data of which historical monthly demand data is in a preset range;
normalizing all the compensated historical monthly demand data to generate a plurality of target monthly demand data;
obtaining a monthly demand data set according to a plurality of target monthly demand data; adding data belonging to the same quarter of the same year in a plurality of target monthly demand data to generate a quarter demand data set; and adding data belonging to the same year in the plurality of target monthly demand data to generate an annual demand data set.
3. The method of claim 1, wherein the constructing an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model, and an LSTM annual demand prediction model based on the monthly demand data set, the quarterly demand data set, and the annual demand data set of the electricity metering material comprises:
respectively taking monthly, quarterly and annual historical data as input, respectively taking a monthly demand data set, a quarterly demand data set and an annual demand data set as output of a model, and constructing a monthly training sample, a quarterly training sample and an annual training sample; the historical data comprises weather data, power generation equipment output and reliability data, date attribute data and power grid dispatching data;
and training the original LSTM model by using the monthly training samples, the quarterly training samples and the annual training samples respectively until the model is converged, and generating an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model and an LSTM annual demand prediction model.
4. The method according to claim 3, further comprising determining whether the model converges with an average absolute error loss function;
when the value of the mean absolute error loss function reaches a preset value, the model converges.
5. The method of claim 3 further comprising setting network parameters of the original LSTM model, including setting a learning rate of 0.001 and a number of iterations of 1000.
6. The method for forecasting demand for electric power measurement materials according to claim 1, wherein the generating forecast results for demand for electric power measurement materials according to the monthly demand forecast results, the quarterly demand forecast results, the annual demand forecast results, and the weights corresponding to the respective results comprises:
Y=a·Y moon +b·Y quarter +c·Y year
wherein Y is the forecasting result of the demand of the power measurement material, Y moon For monthly demand forecasts, Y quarter Predicting results, Y, for seasonal demand year For the annual demand prediction result, a, b and c are weight parameters respectively.
7. An electric power measurement material demand prediction device, characterized by comprising:
the preprocessing module is used for preprocessing historical monthly demand data of the electric power measurement materials to generate a monthly demand data set, a quarterly demand data set and an annual demand data set of the electric power measurement materials;
the model construction module is used for respectively constructing an LSTM monthly demand prediction model, an LSTM quarterly demand prediction model and an LSTM annual demand prediction model based on a monthly demand data set, a quarterly demand data set and an annual demand data set of the electric power measurement materials;
the prediction module is used for respectively inputting data to be predicted into the LSTM monthly demand prediction model, the LSTM quarterly demand prediction model and the LSTM annual demand prediction model to generate a monthly demand prediction result, a quarterly demand prediction result and a annual demand prediction result;
and the prediction result generation module is used for generating a power metering material demand prediction result according to the monthly demand prediction result, the quarterly demand prediction result, the annual demand prediction result and the weight corresponding to each result.
8. The electricity metering material demand forecasting device of claim 7, wherein the preprocessing module comprises:
the deleting unit is used for eliminating abnormal data in the historical monthly demand data and compensating the abnormal data according to the average value of the two historical monthly demand data before and after the abnormal data; the abnormal data is data of which historical monthly demand data is in a preset range;
the compensation unit is used for carrying out normalization processing on all the compensated historical monthly requirement data to generate a plurality of target monthly requirement data;
the data set generating unit is used for obtaining a monthly requirement data set according to a plurality of target monthly requirement data; adding data belonging to the same quarter of the same year in a plurality of target monthly demand data to generate a quarter demand data set; and adding data belonging to the same year in the plurality of target monthly demand data to generate an annual demand data set.
9. An electronic device, comprising:
one or more processors;
a memory coupled to the processor for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the electricity metering supplies demand forecasting method of any of claims 1-6.
10. A computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the electricity metering supplies demand forecasting method of any of claims 1-6.
CN202210652697.5A 2022-06-10 2022-06-10 Power metering material demand prediction method and device, electronic equipment and storage medium Pending CN114971736A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210652697.5A CN114971736A (en) 2022-06-10 2022-06-10 Power metering material demand prediction method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210652697.5A CN114971736A (en) 2022-06-10 2022-06-10 Power metering material demand prediction method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114971736A true CN114971736A (en) 2022-08-30

Family

ID=82961315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210652697.5A Pending CN114971736A (en) 2022-06-10 2022-06-10 Power metering material demand prediction method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114971736A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116629754A (en) * 2023-07-24 2023-08-22 广东电网有限责任公司广州供电局 Electric power storage material storage capacity tension time section and inventory peak prediction method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116629754A (en) * 2023-07-24 2023-08-22 广东电网有限责任公司广州供电局 Electric power storage material storage capacity tension time section and inventory peak prediction method
CN116629754B (en) * 2023-07-24 2023-12-22 广东电网有限责任公司广州供电局 Electric power storage material storage capacity tension time section and inventory peak prediction method

Similar Documents

Publication Publication Date Title
Yu et al. Reliability constraint stochastic UC by considering the correlation of random variables with Copula theory
CN110969285B (en) Prediction model training method, prediction device, prediction equipment and medium
CN112566196B (en) Heterogeneous network access selection method based on smart grid and related equipment
CN111198799A (en) Machine room power consumption early warning method, system, terminal and storage medium based on LSTM
CN112182118B (en) Target object prediction method based on multiple data sources and related equipment thereof
CN115034519A (en) Method and device for predicting power load, electronic equipment and storage medium
CN114971736A (en) Power metering material demand prediction method and device, electronic equipment and storage medium
CN113312578B (en) Fluctuation attribution method, device, equipment and medium of data index
CN114118570A (en) Service data prediction method and device, electronic equipment and storage medium
CN111476411B (en) Photovoltaic power station generating capacity calculation method and server
CN113988398A (en) Wind turbine generator power prediction method and device, electronic equipment and storage medium
CN113807593A (en) Data quantity and data quality prediction method and system based on power dispatching
CN113962874A (en) Bus load model training method, device, equipment and storage medium
CN109993374B (en) Cargo quantity prediction method and device
CN114282881A (en) Depreciation measuring and calculating method and device, storage medium and computer equipment
CN114611805A (en) Net load prediction method and device, electronic equipment and storage medium
CN109284874B (en) Method, device and equipment for predicting daily generated energy of photovoltaic power station and storage medium
CN113705929A (en) Spring festival holiday load prediction method based on load characteristic curve and typical characteristic value fusion
CN110414875B (en) Capacity data processing method and device, electronic equipment and computer readable medium
CN112561732A (en) Method and device for optimizing active power scheduling of power system and readable storage medium
CN111178780A (en) Operation and maintenance strategy setting method and device, storage medium and electronic equipment
CN115169653A (en) Load prediction method and device of power system and storage medium
CN114117902A (en) Method, device, equipment and storage medium for constructing new user load prediction model
CN115292384A (en) Electricity consumption data generation method and electricity consumption data generation device
CN116805182A (en) Industrial increment value and acceleration prediction method, system, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination