WO2022021727A1 - Urban complex electricity consumption prediction method and apparatus, electronic device, and storage medium - Google Patents

Urban complex electricity consumption prediction method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2022021727A1
WO2022021727A1 PCT/CN2020/134505 CN2020134505W WO2022021727A1 WO 2022021727 A1 WO2022021727 A1 WO 2022021727A1 CN 2020134505 W CN2020134505 W CN 2020134505W WO 2022021727 A1 WO2022021727 A1 WO 2022021727A1
Authority
WO
WIPO (PCT)
Prior art keywords
electricity consumption
sequence
prediction
input
power consumption
Prior art date
Application number
PCT/CN2020/134505
Other languages
French (fr)
Chinese (zh)
Inventor
杨德州
王赟中
夏懿
王飞
李万伟
李正辉
魏勇
胡安龙
薛国斌
李惠庸
李敏
彭婧
梁魁
平常
万小花
韩建锋
陈庆胜
李玉科
李麟鹤
杨昌海
张中丹
田云飞
宋汶秦
李康平
冯燕军
张建辉
甄钊
王忠飞
薛远天
梁从斌
王俊杰
任惠
Original Assignee
国网甘肃省电力公司
国网甘肃省电力公司经济技术研究院
华北电力大学
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 国网甘肃省电力公司, 国网甘肃省电力公司经济技术研究院, 华北电力大学 filed Critical 国网甘肃省电力公司
Publication of WO2022021727A1 publication Critical patent/WO2022021727A1/en

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
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • 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/045Combinations of networks
    • 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/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Definitions

  • the invention relates to the field of data processing, in particular to a method, device, electronic device and storage medium for predicting power consumption of an urban complex.
  • the so-called "urban complex” is a kind of building complex that integrates the five core functions of business office, hotel and catering, commercial sales, apartment residence and cultural and entertainment complex in geographical space, and establishes a mutual relationship between each part.
  • the dynamic relationship of interdependence finally forms a multi-functional and efficient "city within a city”.
  • the complex load structure and huge spatial scale make urban complexes become a large-scale electricity customer in the urban power grid.
  • accurate electricity forecast helps complex users to rationally and flexibly arrange energy consumption methods to achieve the purpose of energy conservation and emission reduction.
  • energy storage and distributed photovoltaics can be utilized in different periods according to the results of electricity forecasting; in addition, for power companies, accurate electricity forecasting helps them formulate flexible maintenance, scheduling and marketing plans, thereby ultimately reducing power supply costs.
  • the monthly electricity consumption forecasting methods for urban complexes are generally divided into two categories according to different forecasting algorithms: forecasting methods based on mathematics or statistics (time series method, grey forecasting method) and artificial intelligence forecasting methods (neural network forecasting method). method, support vector machine regression method).
  • forecasting methods based on mathematics or statistics time series method, grey forecasting method
  • artificial intelligence forecasting methods neural network forecasting method
  • method support vector machine regression method
  • the artificial intelligence prediction method it is necessary to use the historical monthly electricity consumption data of the entire urban complex to train a single-step prediction model to predict the electricity consumption for a period of time in the future.
  • This method has certain limitations: first, it directly predicts the overall monthly electricity consumption of the urban complex, and it is impossible to accurately grasp the characteristics of its internal load components; Low historical monthly data, the amount of this type of data is small, and the number of samples that can be constructed to train the model is limited, which increases the risk of overfitting the prediction model, which ultimately leads to low prediction accuracy; finally, the load in the urban complex
  • the structure is complex, the electricity consumption behavior is highly volatile, and the predictability of the electricity consumption sequence is low, resulting in low prediction accuracy. Therefore, the existing electricity consumption forecasting methods for urban complexes have the problem of low forecasting accuracy.
  • the embodiment of the present invention provides a method for predicting the power consumption of an urban complex, which can improve the accuracy of the power consumption prediction of the urban complex.
  • an embodiment of the present invention provides a method for predicting electricity consumption in an urban complex, including:
  • the electricity consumption prediction result of the complex is obtained by calculation.
  • the calendar label is a week label
  • the step of dividing the historical hourly electricity consumption sequence according to preset calendar labels to reduce the dimension to obtain the first electricity consumption sequence for each calendar label Specifically include:
  • the step of performing nonlinear dimensionality reduction on the first power consumption sequence in the time dimension to obtain the second power consumption sequence specifically includes:
  • the preset self-encoding network is obtained by training with preset dimension reduction parameters.
  • the self-encoding network includes an encoding network
  • the encoding network includes a first input layer, a first hidden layer, and a first output layer, wherein the output of the first input layer is the same as the first hidden layer.
  • the input of the containing layer is connected
  • the output of the first hidden layer is connected to the input of the first output layer
  • the first input layer includes M ⁇ k neurons
  • the first output layer includes M neurons
  • the dimension reduction parameter is k
  • M and k are both positive integers.
  • nonlinear dimension reduction is performed on the first power consumption sequence in the time dimension through a preset auto-encoding network.
  • the steps specifically include:
  • the first power consumption sequence is sequentially input to the first input layer, the first hidden layer and the first output layer to obtain an M-dimensional second power consumption sequence.
  • the self-encoding network further includes a decoding network, and the second power consumption sequence is input into a preset prediction neural network for prediction, and a first power consumption prediction result based on the calendar tag is obtained.
  • the steps include:
  • the M-dimensional prediction result is input into a preset decoding network for decoding, and the M ⁇ k-dimensional first electricity consumption prediction result is obtained.
  • the decoding network includes a second input layer, a second hidden layer, and a second output layer, wherein the output of the second input layer is connected to the input of the second hidden layer, and the first The output of the two hidden layers is connected to the input of the second output layer, the second input layer includes M neurons, the second output layer includes M ⁇ k neurons, and the M-dimensional prediction
  • the result is input into a preset decoding network for decoding, and the steps of obtaining the M ⁇ k-dimensional first electricity consumption prediction result specifically include:
  • the M-dimensional second power consumption sequence is sequentially input to the second input layer, the second hidden layer, and the second output layer to obtain an M ⁇ k-dimensional first power consumption prediction result.
  • the step of calculating the electricity consumption forecast result of the complex based on the first electricity consumption forecast result specifically includes:
  • the second electricity consumption prediction results corresponding to the various types of electricity consumption entities are added to obtain the electricity consumption prediction result of the complex.
  • an embodiment of the present invention further provides a device for predicting electricity consumption in an urban complex, wherein the device includes:
  • the acquisition module is used to acquire the historical hourly electricity consumption sequence of various types of electricity consumption entities in the urban complex;
  • a first dimension reduction module configured to split the historical hourly electricity consumption sequence according to preset calendar tags for dimension reduction, to obtain a first electricity consumption sequence for each calendar tag;
  • a second dimension reduction module configured to perform nonlinear dimension reduction of the first electricity consumption sequence in the time dimension to obtain a second electricity consumption sequence
  • a prediction module configured to input the second power consumption sequence into a preset prediction neural network for prediction, and obtain a first power consumption prediction result based on the calendar tag;
  • a calculation module configured to calculate the electricity consumption prediction result of the complex based on the first electricity consumption prediction result.
  • an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, when the processor executes the computer program.
  • an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the urban complex electricity consumption provided by the embodiment of the present invention is realized. Steps in the Quantitative Forecasting Method.
  • the historical hourly electricity consumption sequence of various types of electricity-consuming entities in the urban complex is obtained; the historical hourly electricity consumption sequence is divided according to preset calendar labels to reduce the dimension, to obtain a specific calendar for each calendar.
  • the first electricity consumption sequence of the tag perform nonlinear dimension reduction on the first electricity consumption sequence in the time dimension to obtain a second electricity consumption sequence; input the second electricity consumption sequence into a preset prediction
  • the neural network performs prediction to obtain a first electricity consumption prediction result based on the calendar tag; and based on the first electricity consumption prediction result, calculates and obtains the electricity consumption prediction result of the complex.
  • the resolution of the training samples can be effectively increased, thereby preventing the over-fitting of the prediction model and improving the accuracy of electricity consumption forecasting.
  • FIG. 1 is a flowchart of a method for predicting electricity consumption in an urban complex provided by an embodiment of the present invention
  • FIG. 2 is a structural diagram of an apparatus for predicting electricity consumption in an urban complex provided by an embodiment of the present invention
  • FIG. 3 is a structural diagram of a first dimension reduction module provided by an embodiment of the present invention.
  • FIG. 4 is a structural diagram of a prediction module provided by an embodiment of the present invention.
  • FIG. 5 is a structural diagram of a computing module provided by an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for predicting electricity consumption in an urban complex provided by an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps:
  • the electricity consuming entities in the urban complex can be classified to obtain different types of electricity consuming entities, and the above electricity consuming entities can be understood as buildings or areas that need electricity.
  • the above-mentioned electricity-consuming entities can be classified according to the functions of buildings or areas, for example, they can be divided into buildings or areas such as business, catering, commercial, residential, and cultural and entertainment complexes.
  • a building is used as an example for description. Different building functions lead to large differences in electricity consumption characteristics of different types of buildings. Classifying the buildings in the urban complex according to their building functions and then predicting them separately can effectively improve the prediction accuracy.
  • N represents the number of historical hourly points that can be collected.
  • T Indicates the electricity consumption in the future period
  • T indicates the total number of hours in the future period. For example, if the future period is the next month, then Represents the electricity consumption in the next month, and T represents the total hourly points in the next month.
  • the above historical hourly electricity consumption sequence can be used as input data in forward reasoning, and can be used as a sample data set when training the prediction model to train the prediction model.
  • a city complex as the collection object of the electricity consumption sequence, and collect the historical hourly electricity consumption data of various types of buildings in its interior for a total of 36 months from January 1, 2017 to December 31, 2019.
  • the data sampling interval is 1 hour.
  • the electricity consumption data from the 1st to 22nd months are used as the training set, the data from the 23rd to 29th months are used as the validation set, and the electricity consumption data from the 30th to 36th months are used as the test set.
  • the prediction model constructed by the historical hourly electricity consumption sequence to predict the electricity consumption of T hours in the next month can effectively increase the training samples of the prediction model, that is, to increase the resolution of electricity consumption. rate, thereby preventing overfitting of the predictive model.
  • the preset calendar label may be a weekday label or a ten-day label
  • the above-mentioned weekday label is, for example, a Monday label, a Tuesday label, a Wednesday label, a Thursday label, a Friday label, a Saturday label, and a Sunday label.
  • the above ten-day labels are for example: early-day labels, mid-day labels, late-day labels, etc.
  • the above-mentioned splitting and dimensionality reduction is, for example, splitting the historical hourly electricity consumption sequence into seven first electricity consumption sequences corresponding to the weekday label according to the week label.
  • the historical hourly electricity consumption sequence is divided into three first electricity consumption sequences corresponding to the ten-day label.
  • the prediction accuracy of a prediction model tends to decrease as the prediction step size (ie, the dimension of the sequence) increases.
  • the above-mentioned first electricity consumption sequence can be expressed as:
  • Wi represents the week “ i ", Represents the first hour-based electricity consumption sequence of the historical week “i”, and represents the hourly data points of the historical week “i” that can be collected.
  • i represents the first power consumption sequence for Monday.
  • a sequence compression mapping function f can be defined such that:
  • M 24/k
  • k ⁇ N+, M ⁇ N+, k represents the dimensionality reduction parameter (also called the compression scale)
  • k and M are both positive integers, denoted k ⁇ K.
  • the first power consumption sequence The dimension of will be reduced from w i to w i /k, and the second electric quantity sequence can be expressed as:
  • the prediction neural network may select a BP neural network.
  • the input and output of the above-mentioned BP neural network are as follows:
  • Input is the input and Output is the output.
  • the output of the BP neural network can be used as the first electricity consumption prediction result.
  • the first electricity consumption prediction result based on the calendar tag for various types of electricity consumption entities within a period of time can be obtained.
  • the seven first electricity consumption forecast results of various types of electricity consumption entities from Monday to Sunday in the next month are obtained, that is, the electricity forecast results of each day from Monday to Sunday in the next month.
  • the electricity forecast results are added together, and finally the total electricity consumption forecast result of the urban complex is obtained.
  • the forecast in this embodiment of the present invention may be a monthly forecast.
  • the above calendar label is a week label, and the above step 102 may include:
  • the historical hourly electricity consumption sequence can be Decomposition, and then reduce the to-be-predicted step size (also called sequence dimension) of the split sequence of each class of electricity-consuming entities. have to.
  • the historical hourly electricity consumption sequence is It is divided into seven series according to its week label: the historical hourly electricity consumption sequence of all Mondays to the historical hourly electricity consumption series of all Sundays.
  • the seven historical power consumption sequences can also be referred to as the first power consumption sequence, and the first power consumption sequence can be expressed as:
  • Wi represents the week “ i ", Represents the first hour-based electricity consumption sequence of the historical week “i”, and represents the hourly data points of the historical week “i” that can be collected.
  • i represents the first power consumption sequence for Monday.
  • T i represents the hour number of the week "i" in the next month, and the following conditions are met:
  • the monthly electricity consumption forecast results of various types of electricity consumption entities can be obtained by accumulating 7 parts of the forecast results. Record the hourly electricity consumption sequence to be predicted for week "i" in the next month as:
  • the foregoing step 103 may include:
  • Non-linear dimensionality reduction is performed on the first power consumption sequence in the time dimension through a preset self-encoding network; wherein, the above-mentioned self-encoding network is obtained by training with preset dimensionality reduction parameters.
  • a sequence compression mapping function f can be defined such that:
  • M 24/k
  • k ⁇ N+, M ⁇ N+, k represents the dimensionality reduction parameter (also called the compression scale)
  • k and M are both positive integers, denoted k ⁇ K.
  • the first power consumption sequence The dimension of will be reduced from w i to w i /k, and the second electric quantity sequence can be expressed as:
  • the dimension of the hourly electricity consumption sequence to be predicted is also reduced from w i to w i /k, which can be written as:
  • the choice of compression scale directly affects the final prediction accuracy.
  • the sequence dimension reduction parameter is too large, which will cause The number of data points included is reduced, which in turn leads to a large reduction in the number of training samples, which ultimately reduces the accuracy of the prediction model; if the sequence compression scale is too small, it cannot be effectively reduced
  • the dimension of that is, the step size to be predicted is still large, and the accuracy of the multi-step prediction model cannot be guaranteed at this time.
  • the different sequence compression mapping methods obtained The predictability is also different. Since the focus of the present invention is the latter, rather than finding the optimal compression scale, the present invention selects the value of the compression scale k to be 6.
  • the dimensionality reduction of the first electricity consumption sequence can be realized by additive aggregation, for example, it can be performed by the following formula:
  • the embodiment of the present invention also provides a nonlinear dimension reduction based on an auto-encoding network, which realizes the dimension reduction of the time series of electricity consumption by extracting nonlinear features in the electricity consumption sequence.
  • the self-encoding network consists of an encoding network (the first half of the self-encoding network) and a decoding network (the second half of the self-encoding network).
  • an encoding network can be used to non-linearly map high-dimensional input data (that is, the first power consumption sequence) to a low-dimensional encoding sequence (that is, the second power consumption sequence), and the encoding sequence can be decoded by decoding
  • the network reconstructs the input data. Therefore, the encoded sequence after dimension reduction can accurately represent the input data, that is, the loss of information is smaller, and the predictability of the sequence after dimension reduction is improved.
  • the encoding network includes a first input layer, a first hidden layer, and a first output layer, wherein the output of the first input layer is connected to the input of the first hidden layer, and the first hidden layer is The output of the first output layer is connected to the input of the first output layer, the first input layer includes M ⁇ k neurons, the first output layer includes M neurons, the dimension reduction parameter is k, and M and k are both positive integers,
  • the above-mentioned steps of performing nonlinear dimensionality reduction on the first power consumption sequence in the time dimension through a preset self-encoding network according to the dimensionality reduction parameters specifically include:
  • the first power consumption sequence is input into the first input layer, the first hidden layer and the first output layer in sequence to obtain an M-dimensional second power consumption sequence.
  • an auto-encoding network may be trained for the first power consumption sequence obtained in step 102 .
  • the above step 103 may include:
  • the prediction neural network may select a BP neural network.
  • the input and output of the above-mentioned BP neural network are as follows:
  • Input is the input and Output is the output.
  • the output of the BP neural network can be used as the first electricity consumption prediction result.
  • the above-mentioned decoding network may include a second input layer, a second hidden layer, and a second output layer, wherein the output of the second input layer is connected to the input of the second hidden layer, and the second hidden layer
  • the output of the second output layer is connected to the input of the second output layer
  • the second input layer includes M neurons
  • the second output layer includes M ⁇ k neurons
  • the M-dimensional prediction result is input into the preset decoding network for decoding
  • the M-dimensional second power consumption sequence is sequentially input to the second input layer, the second hidden layer, and the second output layer to obtain an M ⁇ k-dimensional first power consumption prediction result.
  • the above-mentioned encoding network, prediction network, and decoding network can jointly form a prediction model.
  • the first output layer of the encoding network corresponds to the middle layer 1
  • the second input layer of the decoding network corresponds to the middle layer 2, as shown in Table 1:
  • the number of neurons in the first input layer twenty four The number of neurons in the first hidden layer 12 Number of neurons in the first output layer (middle layer 1) 4 Number of neurons in the second input layer (middle layer 2) 4 Number of neurons in the second hidden layer 12 Number of neurons in the second output layer twenty four
  • the input and output (equal to the input) training samples of the neural network are as follows:
  • the trained neural network After obtaining the trained neural network, use its first half (self-encoding network) to reduce the dimension of the first power consumption sequence, that is, the high-dimensional first power consumption sequence
  • Each 24 points in the coder are input into the encoder in turn, and then the output of the first output layer is extracted, which is the low-dimensional coding sequence, that is, the second power consumption sequence.
  • the second power consumption sequence is predicted by the prediction network to obtain the prediction result, and then the prediction result is input into the decoding network for decoding, which can effectively improve the prediction accuracy.
  • the multi-step prediction results of the 7 second electricity consumption series are obtained through the prediction network Afterwards, the second half of the trained neural network (ie, the decoding network) is used to decode the prediction result into the electricity consumption prediction result to obtain the first electricity consumption prediction result. That is, every 4 points in the prediction result of the low-dimensional coding sequence are input into the decoding network in turn, and then the result of the second output layer is extracted to obtain the second power consumption prediction result, and the second power consumption
  • the forecast result is taken as the forecast result of hourly electricity consumption of week "i" in the next month.
  • the above step 105 may include:
  • the second electricity consumption forecast results of various types of electricity consumption entities based on the above calendar are calculated and obtained; the second electricity consumption forecast results corresponding to the above various types of electricity consumption entities are added to obtain Electricity consumption forecast results for urban complexes.
  • the first electricity consumption prediction result of each type of electricity consumption entity based on the calendar tag within a period of time can be obtained.
  • the seven first electricity consumption forecast results of various types of electricity consumption entities from Monday to Sunday in the next month are obtained, that is, the electricity forecast results of each day from Monday to Sunday in the next month.
  • the electricity forecast results are added together, and finally the total electricity consumption forecast result of the urban complex is obtained.
  • the historical hourly power consumption sequence of various types of power-consuming entities in the urban complex is obtained; the historical hourly power consumption sequence is divided according to preset calendar tags to reduce the dimension, and obtain the specific calendar for each calendar.
  • the first electricity consumption sequence of the tag perform nonlinear dimension reduction on the first electricity consumption sequence in the time dimension to obtain a second electricity consumption sequence; input the second electricity consumption sequence into a preset prediction
  • the neural network performs prediction to obtain a first electricity consumption prediction result based on the calendar tag; and based on the first electricity consumption prediction result, calculates and obtains the electricity consumption prediction result of the complex.
  • the resolution of the training samples can be effectively increased, thereby preventing the over-fitting of the prediction model, thereby improving the prediction accuracy; Compared with the direct use of urban complex electricity consumption to forecast, it can make the electricity forecast result more accurate
  • the method for predicting the electricity consumption of an urban complex provided by the embodiment of the present invention can be applied to devices such as mobile phones, monitors, computers, and servers that can predict the electricity consumption of an urban complex.
  • FIG. 2 is a schematic structural diagram of an apparatus for predicting electricity consumption in an urban complex provided by an embodiment of the present invention. As shown in FIG. 2, the apparatus includes:
  • the obtaining module 201 is used to obtain the historical hourly electricity consumption sequence of various types of electricity consuming entities in the urban complex;
  • a first dimension reduction module 202 configured to perform dimension reduction by dividing the historical hourly electricity consumption sequence according to preset calendar labels to obtain a first electricity consumption sequence for each calendar label;
  • the second dimension reduction module 203 is configured to perform nonlinear dimension reduction of the first electricity consumption sequence in the time dimension to obtain a second electricity consumption sequence
  • a prediction module 204 configured to input the second power consumption sequence into a preset prediction neural network for prediction, and obtain a first power consumption prediction result based on the calendar tag;
  • the calculation module 205 is configured to calculate the electricity consumption prediction result of the urban complex based on the first electricity consumption prediction result.
  • the calendar label is a week label
  • the first dimension reduction module 202 includes:
  • a splitting unit 2021 configured to split the historical hourly electricity consumption sequence according to preset week labels to reduce dimensions, and obtain electricity consumption sequences for each week label;
  • the aligning unit 2022 is configured to align the power consumption sequence for each week tag to obtain a first power consumption sequence for each week tag.
  • the second dimensionality reduction module 203 is specifically further configured to perform nonlinear dimensionality reduction on the time dimension of the first electricity consumption sequence through a preset self-encoding network;
  • the preset self-encoding network is obtained by training with preset dimension reduction parameters.
  • the self-encoding network includes an encoding network
  • the encoding network includes a first input layer, a first hidden layer, and a first output layer, wherein the output of the first input layer is the same as the first hidden layer.
  • the input of the containing layer is connected
  • the output of the first hidden layer is connected to the input of the first output layer
  • the first input layer includes M ⁇ k neurons
  • the first output layer includes M neurons
  • the dimensionality reduction parameter is k
  • M and k are both positive integers.
  • the 203 is also used to input the first power consumption sequence into the first input layer, the first hidden layer and the first output in sequence. layer to obtain the M-dimensional second electricity consumption sequence.
  • the self-encoding network further includes a decoding network
  • the prediction module 204 includes:
  • the first prediction unit 2041 is configured to input the M-dimensional second power consumption sequence into a prediction neural network for prediction, and obtain an M-dimensional prediction result;
  • the second prediction unit 2042 is configured to input the M-dimensional prediction result into a preset decoding network for decoding to obtain an M ⁇ k-dimensional first electricity consumption prediction result.
  • the decoding network includes a second input layer, a second hidden layer, and a second output layer, wherein the output of the second input layer is connected to the input of the second hidden layer, and the first The output of the two hidden layers is connected to the input of the second output layer, the second input layer includes M neurons, the second output layer includes M ⁇ k neurons, and the second prediction unit 2042 specifically further It is used to input the M-dimensional second power consumption sequence into the second input layer, the second hidden layer and the second output layer in sequence, so as to obtain an M ⁇ k-dimensional first power consumption prediction result.
  • the computing module 205 includes:
  • a first calculation unit 2051 configured to calculate and obtain second power consumption prediction results of various power consumption entities based on the calendar according to the first power consumption prediction result;
  • the second calculation unit 2052 is configured to add the second electricity consumption prediction results corresponding to the various types of electricity consumption entities to obtain the electricity consumption prediction result of the complex.
  • the apparatus for predicting the power consumption of an urban complex provided by the embodiment of the present invention can be applied to devices such as mobile phones, monitors, computers, and servers that can predict the power consumption of urban complexes.
  • the apparatus for predicting the power consumption of an urban complex provided by the embodiment of the present invention can realize the various processes implemented by the method for predicting the power consumption of an urban complex in the above method embodiments, and can achieve the same beneficial effects. In order to avoid repetition, details are not repeated here.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. As shown in FIG. 6, it includes: a memory 602, a processor 601, and a memory 602 and a processor A computer program running on 601, which:
  • the processor 601 is used for calling the computer program stored in the memory 602, and performs the following steps:
  • the electricity consumption prediction result of the urban complex is obtained by calculation.
  • the calendar label is a week label
  • the processor 601 performs the division and dimension reduction of the historical hourly electricity consumption sequence according to the preset calendar label to obtain the first usage for each calendar label.
  • the steps of the power sequence include:
  • the step performed by the processor 601 to perform nonlinear dimensionality reduction of the first power consumption sequence in the time dimension to obtain a second power consumption sequence specifically includes:
  • the preset self-encoding network is obtained by training with preset dimension reduction parameters.
  • the self-encoding network includes an encoding network
  • the encoding network includes a first input layer, a first hidden layer, and a first output layer, wherein the output of the first input layer is the same as the first hidden layer.
  • the input of the containing layer is connected
  • the output of the first hidden layer is connected to the input of the first output layer
  • the first input layer includes M ⁇ k neurons
  • the first output layer includes M neurons
  • the dimensionality reduction parameter is k
  • M and k are both positive integers.
  • the first power consumption sequence is analyzed in the time dimension through a preset self-encoding network.
  • the steps for nonlinear dimensionality reduction include:
  • the first power consumption sequence is sequentially input to the first input layer, the first hidden layer and the first output layer to obtain an M-dimensional second power consumption sequence.
  • the self-encoding network further includes a decoding network
  • the processor 601 performs the inputting the second power consumption sequence into a preset prediction neural network for prediction, and obtains the first power consumption based on the calendar tag.
  • the steps of the electricity prediction result include:
  • the M-dimensional prediction result is input into a preset decoding network for decoding, and the M ⁇ k-dimensional first electricity consumption prediction result is obtained.
  • the decoding network includes a second input layer, a second hidden layer, and a second output layer, wherein the output of the second input layer is connected to the input of the second hidden layer, and the first The outputs of the two hidden layers are connected to the inputs of the second output layer, the second input layer includes M neurons, the second output layer includes M ⁇ k neurons, and the processing performed by the processor 601 to perform the
  • the M-dimensional prediction result is input into a preset decoding network for decoding, and the steps of obtaining the M ⁇ k-dimensional first electricity consumption prediction result specifically include:
  • the M-dimensional second power consumption sequence is sequentially input to the second input layer, the second hidden layer, and the second output layer to obtain an M ⁇ k-dimensional first power consumption prediction result.
  • the step performed by the processor 601 to obtain the power consumption forecast result of the complex based on the first power consumption forecast result specifically includes:
  • the second electricity consumption prediction results corresponding to the various types of electricity consumption entities are added to obtain the electricity consumption prediction result of the complex.
  • the above-mentioned electronic devices may be devices such as mobile phones, monitors, computers, servers, etc., which can be applied to predict the electricity consumption of urban complexes.
  • the electronic device provided in the embodiment of the present invention can realize the various processes realized by the method for predicting the electricity consumption of the urban complex in the above method embodiment, and can achieve the same beneficial effect. In order to avoid repetition, details are not repeated here.
  • Embodiments of the present invention further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, each of the methods for predicting electricity consumption in urban complexes provided by the embodiments of the present invention is implemented. process, and can achieve the same technical effect, in order to avoid repetition, it is not repeated here.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM for short), and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • General Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Tourism & Hospitality (AREA)
  • Artificial Intelligence (AREA)
  • Marketing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Evolutionary Biology (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Molecular Biology (AREA)
  • Game Theory and Decision Science (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

An urban complex electricity consumption prediction method and apparatus, an electronic device, and a storage medium. The method comprises: acquiring historical hourly electricity consumption sequences of each type of electricity consumption entities in an urban complex (101); performing splitting and dimensionality reduction on the historical hourly electricity consumption sequences according to preset calendar tabs to obtain first electricity consumption sequences for the calendar tabs (102); performing non-linear dimensionality reduction on the first electricity consumption sequences in a time dimension to obtain second electricity consumption sequences (103); inputting the second electricity consumption sequences into a preset predictive neural network for prediction to obtain a first electricity consumption prediction result based on the calendar tabs (104); and obtaining an electricity consumption prediction result of the complex by calculation on the basis of the first electricity consumption prediction result (105). The electricity consumption prediction result of the urban complex can thus be more accurate.

Description

城市综合体用电量预测方法、装置、电子设备及存储介质Electricity consumption forecasting method, device, electronic equipment and storage medium for urban complex 技术领域technical field
本发明涉及数据处理领域,尤其涉及一种城市综合体用电量预测方法、装置、电子设备及存储介质。The invention relates to the field of data processing, in particular to a method, device, electronic device and storage medium for predicting power consumption of an urban complex.
背景技术Background technique
所谓“城市综合体”,就是一种以建筑群为基础,将商务办公、旅店餐饮、商业销售、公寓住宅和文娱综合五大核心功能在地理空间进行融合,并在各部分之间建立一种互相依存的能动关系,最终形成的一个多功能、高效率的“城中之城”。复杂的负荷结构和巨大的空间尺度使得城市综合体成为城市电网中的一类大型用电客户。对于城市综合体本身而言,准确的电量预测有助于综合体用户合理灵活地安排用能方式,达到节能减排的目的。例如,可以根据电量预测的结果分时段利用储能和分布式光伏;此外,对于电力企业而言,准确的电量预测有助于其制定灵活的检修、调度和营销计划,从而最终降低供电成本。The so-called "urban complex" is a kind of building complex that integrates the five core functions of business office, hotel and catering, commercial sales, apartment residence and cultural and entertainment complex in geographical space, and establishes a mutual relationship between each part. The dynamic relationship of interdependence finally forms a multi-functional and efficient "city within a city". The complex load structure and huge spatial scale make urban complexes become a large-scale electricity customer in the urban power grid. For the urban complex itself, accurate electricity forecast helps complex users to rationally and flexibly arrange energy consumption methods to achieve the purpose of energy conservation and emission reduction. For example, energy storage and distributed photovoltaics can be utilized in different periods according to the results of electricity forecasting; in addition, for power companies, accurate electricity forecasting helps them formulate flexible maintenance, scheduling and marketing plans, thereby ultimately reducing power supply costs.
目前,针对城市综合体的月度用电量预测方法根据预测算法的不同,一般分为两类:基于数学或统计学的预测方法(时间序列法、灰色预测法)和人工智能预测方法(神经网络法、支持向量机回归法)。现有研究表明,基于数学或统计学的预测方法在可解释性上较强,但是缺乏灵活性和准确性。相反,人工智能预测方法相较于传统预测方法,虽然可解释性较差,但是更适用于高维度、非线性、高复杂度的城市综合体用电量预测。通常情况下,采用人工智能预测法时,需要利用城市综合体整体的历史月度用电量数据训练一个单步预测模型来预测未来一段时间的用电量。这种方法有一定的局限性:首先,直接对城市综合体整体的月度用电量进行预测,无法精确把握其内部各负荷成分的特点;其次,构建单步预测模型使用的数据往往是分辨率较低的历史月度数据,该类型数据的数量较少,可以构建用来训练模型的样本数有限,这增加了预测模型过拟合的风险,最终使得预测精度低下;最后,城市综合体内的负荷构成复杂,用电行为波动性较高,用电量序列的可预测性较低,从而导致预测精度 低下。因此,现有的城市综合体用电量预测方法存在预测精度低下的问题。At present, the monthly electricity consumption forecasting methods for urban complexes are generally divided into two categories according to different forecasting algorithms: forecasting methods based on mathematics or statistics (time series method, grey forecasting method) and artificial intelligence forecasting methods (neural network forecasting method). method, support vector machine regression method). Existing research shows that prediction methods based on mathematics or statistics are more interpretable, but lack flexibility and accuracy. On the contrary, compared with traditional forecasting methods, although the interpretability of artificial intelligence forecasting methods is poor, it is more suitable for high-dimensional, nonlinear, and high-complexity urban complex electricity consumption forecasting. Usually, when using the artificial intelligence prediction method, it is necessary to use the historical monthly electricity consumption data of the entire urban complex to train a single-step prediction model to predict the electricity consumption for a period of time in the future. This method has certain limitations: first, it directly predicts the overall monthly electricity consumption of the urban complex, and it is impossible to accurately grasp the characteristics of its internal load components; Low historical monthly data, the amount of this type of data is small, and the number of samples that can be constructed to train the model is limited, which increases the risk of overfitting the prediction model, which ultimately leads to low prediction accuracy; finally, the load in the urban complex The structure is complex, the electricity consumption behavior is highly volatile, and the predictability of the electricity consumption sequence is low, resulting in low prediction accuracy. Therefore, the existing electricity consumption forecasting methods for urban complexes have the problem of low forecasting accuracy.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种城市综合体用电量预测方法,能够提高城市综合体用电量预测的精度。The embodiment of the present invention provides a method for predicting the power consumption of an urban complex, which can improve the accuracy of the power consumption prediction of the urban complex.
第一方面,本发明实施例提供一种城市综合体用电量预测方法,包括:In a first aspect, an embodiment of the present invention provides a method for predicting electricity consumption in an urban complex, including:
获取城市综合体中各类型用电实体的历史小时用电量序列;Obtain the historical hourly electricity consumption sequence of various types of electricity consumption entities in the urban complex;
将所述历史小时用电量序列根据按预设的日历标签进行拆分降维,得到针对各个日历标签的第一用电量序列;Splitting the historical hourly power consumption sequence according to preset calendar tags to reduce the dimension to obtain a first power consumption sequence for each calendar tag;
将所述第一用电量序列在时间维度上进行非线性降维,得到第二用电量序列;Performing nonlinear dimensionality reduction on the first power consumption sequence in the time dimension to obtain a second power consumption sequence;
将所述第二用电量序列输入预设的预测神经网络进行预测,得到基于所述日历标签的第一用电量预测结果;Inputting the second power consumption sequence into a preset prediction neural network for prediction, and obtaining a first power consumption prediction result based on the calendar tag;
基于所述第一用电量预测结果,计算得到所述综合体的用电量预测结果。Based on the first electricity consumption prediction result, the electricity consumption prediction result of the complex is obtained by calculation.
可选的,所述日历标签为星期标签,所述将所述历史小时用电量序列根据按预设的日历标签进行拆分降维,得到针对各个日历标签的第一用电量序列的步骤具体包括:Optionally, the calendar label is a week label, and the step of dividing the historical hourly electricity consumption sequence according to preset calendar labels to reduce the dimension to obtain the first electricity consumption sequence for each calendar label Specifically include:
将所述历史小时用电量序列根据按预设的星期标签进行拆分降维,得到针对各个星期标签的用电量序列;Splitting the historical hourly electricity consumption sequence according to the preset week label for dimension reduction to obtain the electricity consumption sequence for each week label;
对所述针对各个星期标签的用电量序列进行对齐,得到针对各个星期标签的第一用电量序列。Align the power consumption sequences for each week label to obtain a first electricity consumption sequence for each week label.
可选的,所述将所述第一用电量序列在时间维度上进行非线性降维,得到第二用电量序列的步骤具体包括:Optionally, the step of performing nonlinear dimensionality reduction on the first power consumption sequence in the time dimension to obtain the second power consumption sequence specifically includes:
通过预设的自编码网络对所述第一用电量序列在时间维度上进行非线性降维;Perform nonlinear dimensionality reduction on the time dimension of the first electricity consumption sequence by using a preset self-encoding network;
其中,所述预设的自编码网络通过预设的降维参数进行训练得到。Wherein, the preset self-encoding network is obtained by training with preset dimension reduction parameters.
可选的,所述自编码网络包括编码网络,所述编码网络包括第一输入层、第一隐含层以及第一输出层,其中,所述第一输入层的输出与所述第一隐含层的输入连接,所述第一隐含层的输出与第一输出层的输入连接,所述第一输入层包括M×k个神经元,所述第一输出层包括M个神经元,所述降维参数为k, M与k均为正整数,所述根据所述降维参数,通过预设的自编码网络对所述第一用电量序列在时间维度上进行非线性降维的步骤具体包括:Optionally, the self-encoding network includes an encoding network, and the encoding network includes a first input layer, a first hidden layer, and a first output layer, wherein the output of the first input layer is the same as the first hidden layer. The input of the containing layer is connected, the output of the first hidden layer is connected to the input of the first output layer, the first input layer includes M×k neurons, and the first output layer includes M neurons, The dimension reduction parameter is k, and M and k are both positive integers. According to the dimension reduction parameter, nonlinear dimension reduction is performed on the first power consumption sequence in the time dimension through a preset auto-encoding network. The steps specifically include:
将所述第一用电量序列依次输入所述第一输入层、第一隐含层以及第一输出层,得到M维的第二用电量序列。The first power consumption sequence is sequentially input to the first input layer, the first hidden layer and the first output layer to obtain an M-dimensional second power consumption sequence.
可选的,所述自编码网络还包括解码网络,所述将所述第二用电量序列输入预设的预测神经网络进行预测,得到基于所述日历标签的第一用电量预测结果的步骤具体包括:Optionally, the self-encoding network further includes a decoding network, and the second power consumption sequence is input into a preset prediction neural network for prediction, and a first power consumption prediction result based on the calendar tag is obtained. The steps include:
将所述M维的第二用电量序列输入预测神经网络进行预测,得到M维的预测结果;Inputting the M-dimensional second power consumption sequence into a prediction neural network for prediction to obtain an M-dimensional prediction result;
将所述M维的预测结果输入预设的解码网络中进行解码,得到M×k维的第一用电量预测结果。The M-dimensional prediction result is input into a preset decoding network for decoding, and the M×k-dimensional first electricity consumption prediction result is obtained.
可选的,所述解码网络包括第二输入层、第二隐含层以及第二输出层,其中,所述第二输入层的输出与所述第二隐含层的输入连接,所述第二隐含层的输出与第二输出层的输入连接,所述第二输入层包括M个神经元,所述第二输出层包括M×k个神经元,所述将所述M维的预测结果输入预设的解码网络中进行解码,得到M×k维的第一用电量预测结果的步骤具体包括:Optionally, the decoding network includes a second input layer, a second hidden layer, and a second output layer, wherein the output of the second input layer is connected to the input of the second hidden layer, and the first The output of the two hidden layers is connected to the input of the second output layer, the second input layer includes M neurons, the second output layer includes M×k neurons, and the M-dimensional prediction The result is input into a preset decoding network for decoding, and the steps of obtaining the M×k-dimensional first electricity consumption prediction result specifically include:
将所述M维的第二用电量序列依次输入所述第二输入层、第二隐含层以及第二输出层,得到M×k维的第一用电量预测结果。The M-dimensional second power consumption sequence is sequentially input to the second input layer, the second hidden layer, and the second output layer to obtain an M×k-dimensional first power consumption prediction result.
可选的,所述基于所述第一用电量预测结果,计算得到所述综合体的用电量预测结果的步骤具体包括:Optionally, the step of calculating the electricity consumption forecast result of the complex based on the first electricity consumption forecast result specifically includes:
根据所述第一用电量预测结果,计算得到各类用电实体基于所述日历的第二用电量预测结果;According to the first electricity consumption prediction result, calculating and obtaining the second electricity consumption prediction result of various electricity consumption entities based on the calendar;
将所述各类用电实体对应的第二用电量预测结果进行相加,得到所述综合体的用电量预测结果。The second electricity consumption prediction results corresponding to the various types of electricity consumption entities are added to obtain the electricity consumption prediction result of the complex.
第二方面,本发明实施例还提供一种城市综合体用电量预测装置,其特征在于,所述装置包括:In a second aspect, an embodiment of the present invention further provides a device for predicting electricity consumption in an urban complex, wherein the device includes:
获取模块,用于获取城市综合体中各类型用电实体的历史小时用电量序列;The acquisition module is used to acquire the historical hourly electricity consumption sequence of various types of electricity consumption entities in the urban complex;
第一降维模块,用于将所述历史小时用电量序列根据按预设的日历标签进行拆分降维,得到针对各个日历标签的第一用电量序列;a first dimension reduction module, configured to split the historical hourly electricity consumption sequence according to preset calendar tags for dimension reduction, to obtain a first electricity consumption sequence for each calendar tag;
第二降维模块,用于将所述第一用电量序列在时间维度上进行非线性降维, 得到第二用电量序列;A second dimension reduction module, configured to perform nonlinear dimension reduction of the first electricity consumption sequence in the time dimension to obtain a second electricity consumption sequence;
预测模块,用于将所述第二用电量序列输入预设的预测神经网络进行预测,得到基于所述日历标签的第一用电量预测结果;a prediction module, configured to input the second power consumption sequence into a preset prediction neural network for prediction, and obtain a first power consumption prediction result based on the calendar tag;
计算模块,用于基于所述第一用电量预测结果,计算得到所述综合体的用电量预测结果。A calculation module, configured to calculate the electricity consumption prediction result of the complex based on the first electricity consumption prediction result.
第三方面,本发明实施例提供一种电子设备,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本发明实施例提供的城市综合体用电量预测方法中的步骤。In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, when the processor executes the computer program The steps in the method for predicting the electricity consumption of an urban complex provided by the embodiment of the present invention are implemented.
第四方面,本发明实施例提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现发明实施例提供的城市综合体用电量预测方法中的步骤。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the urban complex electricity consumption provided by the embodiment of the present invention is realized. Steps in the Quantitative Forecasting Method.
本发明实施例中,获取城市综合体中各类型用电实体的历史小时用电量序列;将所述历史小时用电量序列根据按预设的日历标签进行拆分降维,得到针对各个日历标签的第一用电量序列;将所述第一用电量序列在时间维度上进行非线性降维,得到第二用电量序列;将所述第二用电量序列输入预设的预测神经网络进行预测,得到基于所述日历标签的第一用电量预测结果;基于所述第一用电量预测结果,计算得到所述综合体的用电量预测结果。通过使用历史小时用电量序列来对未来各个小时的用电量进行预测,可以有效增加训练样本的分辨率,从而防止预测模型的过拟合,进而提高用电量预测的精度;同时,通过对各个类型的用电实体来进行预测,最终得到整体的城市综合体的用电量预测结果,相较于直接使用城市综合体用电量来进行预测而言,可以使得用电量预测结果的更加精确。In the embodiment of the present invention, the historical hourly electricity consumption sequence of various types of electricity-consuming entities in the urban complex is obtained; the historical hourly electricity consumption sequence is divided according to preset calendar labels to reduce the dimension, to obtain a specific calendar for each calendar. the first electricity consumption sequence of the tag; perform nonlinear dimension reduction on the first electricity consumption sequence in the time dimension to obtain a second electricity consumption sequence; input the second electricity consumption sequence into a preset prediction The neural network performs prediction to obtain a first electricity consumption prediction result based on the calendar tag; and based on the first electricity consumption prediction result, calculates and obtains the electricity consumption prediction result of the complex. By using the historical hourly electricity consumption sequence to predict the electricity consumption of each hour in the future, the resolution of the training samples can be effectively increased, thereby preventing the over-fitting of the prediction model and improving the accuracy of electricity consumption forecasting. Predicting various types of electricity-consuming entities, and finally obtaining the overall electricity consumption forecasting results of urban complexes, compared to directly using the electricity consumption of urban complexes for forecasting, it can make the electricity consumption forecasting results more accurate. more precise.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.
图1是本发明实施例提供的一种城市综合体用电量预测方法的流程图;1 is a flowchart of a method for predicting electricity consumption in an urban complex provided by an embodiment of the present invention;
图2是本发明实施例提供的一种城市综合体用电量预测装置的结构图;2 is a structural diagram of an apparatus for predicting electricity consumption in an urban complex provided by an embodiment of the present invention;
图3是本发明实施例提供的一种第一降维模块的结构图;3 is a structural diagram of a first dimension reduction module provided by an embodiment of the present invention;
图4是本发明实施例提供的一种预测模块的结构图;4 is a structural diagram of a prediction module provided by an embodiment of the present invention;
图5是本发明实施例提供的一种计算模块的结构图;5 is a structural diagram of a computing module provided by an embodiment of the present invention;
图6是本发明实施例提供的一种电子设备的结构示意图。FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
请参见图1,图1是本发明实施例提供的一种城市综合体用电量预测方法的流程图,如图1所示,包括以下步骤:Please refer to FIG. 1. FIG. 1 is a flowchart of a method for predicting electricity consumption in an urban complex provided by an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps:
101、获取城市综合体中各类型用电实体的历史小时用电量序列。101. Obtain the historical hourly electricity consumption sequence of various types of electricity consumption entities in the urban complex.
在本发明实施例中,可以对城市综合体中的用电实体进行分类,得到不同类型的用电实体,上述的用电实体可以理解为需要用电的建筑或区域。上述的用电实体可以根据建筑或区域的功能来进行分类,比如可分为:商务、餐饮、商业、住宅以及文娱综合等建筑或区域。本发明实施例中,以建筑为例进行说明,建筑功能不同导致不同类型的建筑用电特性差异较大。将城市综合体中各建筑根据其建筑功能分类然后再分别预测,可以有效提高预测精度。In the embodiment of the present invention, the electricity consuming entities in the urban complex can be classified to obtain different types of electricity consuming entities, and the above electricity consuming entities can be understood as buildings or areas that need electricity. The above-mentioned electricity-consuming entities can be classified according to the functions of buildings or areas, for example, they can be divided into buildings or areas such as business, catering, commercial, residential, and cultural and entertainment complexes. In the embodiment of the present invention, a building is used as an example for description. Different building functions lead to large differences in electricity consumption characteristics of different types of buildings. Classifying the buildings in the urban complex according to their building functions and then predicting them separately can effectively improve the prediction accuracy.
针对其每一类型建筑,搜集其历史小时用电量序列,表示为:For each type of building, collect its historical hourly electricity consumption sequence, which is expressed as:
Figure PCTCN2020134505-appb-000001
Figure PCTCN2020134505-appb-000001
其中,
Figure PCTCN2020134505-appb-000002
表示历史小时用电量序列,N表示可搜集到的历史小时点数。
in,
Figure PCTCN2020134505-appb-000002
Represents the historical hourly electricity consumption sequence, and N represents the number of historical hourly points that can be collected.
此时,可以将某一类型建筑未来一段时间的用电量序列可以表示为:At this time, the electricity consumption sequence of a certain type of building for a period of time in the future can be expressed as:
Figure PCTCN2020134505-appb-000003
Figure PCTCN2020134505-appb-000003
其中,
Figure PCTCN2020134505-appb-000004
表示未来一段时间的用电量,T表示未来一段时间的总小时点数。比如,未来一段时间为未来一个月,则
Figure PCTCN2020134505-appb-000005
表示未来一个月的用电量,T表示未来一个月的总小时点数。
in,
Figure PCTCN2020134505-appb-000004
Indicates the electricity consumption in the future period, and T indicates the total number of hours in the future period. For example, if the future period is the next month, then
Figure PCTCN2020134505-appb-000005
Represents the electricity consumption in the next month, and T represents the total hourly points in the next month.
上述的历史小时用电量序列在前向推理时可以作为输入数据,在训练预测 模型时,可以作为样本数据集,用以对预测模型进行训练。The above historical hourly electricity consumption sequence can be used as input data in forward reasoning, and can be used as a sample data set when training the prediction model to train the prediction model.
比如,选择某城市综合体作为用电量序列的采集对象,搜集其内部各类型建筑2017年1月1日至2019年12月31日共36个月历史小时用电量数据,数据采样间隔为1小时。其中第1-22月的用电量数据作为训练集,第23-29个月的数据作为验证集,第30-36月的用电量数据作为测试集。For example, select a city complex as the collection object of the electricity consumption sequence, and collect the historical hourly electricity consumption data of various types of buildings in its interior for a total of 36 months from January 1, 2017 to December 31, 2019. The data sampling interval is 1 hour. The electricity consumption data from the 1st to 22nd months are used as the training set, the data from the 23rd to 29th months are used as the validation set, and the electricity consumption data from the 30th to 36th months are used as the test set.
使用历史小时用电量序列构建的预测模型对未来一个月T个小时的用电量进行预测(则预测步长为T),可以有效增加预测模型的训练样本,即是增加用电量的分辨率,从而防止预测模型的过拟合。Using the prediction model constructed by the historical hourly electricity consumption sequence to predict the electricity consumption of T hours in the next month (the prediction step size is T) can effectively increase the training samples of the prediction model, that is, to increase the resolution of electricity consumption. rate, thereby preventing overfitting of the predictive model.
102、将历史小时用电量序列根据按预设的日历标签进行拆分降维,得到针对各个日历标签的第一用电量序列。102. Split the historical hourly power consumption sequence according to preset calendar tags to reduce the dimension, and obtain a first power consumption sequence for each calendar tag.
在本发明实施例中,预设的日历标签可以是星期标签,也可以是旬标签,上述的星期标签比如:星期一标签、星期二标签、星期三标签、星期四标签、星期五标签、星期六标签、星期日标签等,上述的旬标签比如:上旬标签、中旬标签、下旬标签等。In this embodiment of the present invention, the preset calendar label may be a weekday label or a ten-day label, and the above-mentioned weekday label is, for example, a Monday label, a Tuesday label, a Wednesday label, a Thursday label, a Friday label, a Saturday label, and a Sunday label. Etc., the above ten-day labels are for example: early-day labels, mid-day labels, late-day labels, etc.
上述的拆分降维比如根据星期标签,将历史小时用电量序列拆分为与星期标签对应的七个第一用电量序列。又比如根据旬标签,将历史小时用电量序列拆分为与旬标签对应的三个第一用电量序列。The above-mentioned splitting and dimensionality reduction is, for example, splitting the historical hourly electricity consumption sequence into seven first electricity consumption sequences corresponding to the weekday label according to the week label. For another example, according to the ten-day label, the historical hourly electricity consumption sequence is divided into three first electricity consumption sequences corresponding to the ten-day label.
需要理解的是,预测模型的预测精度往往随预测步长(即序列的维度)的增大而减小。It should be understood that the prediction accuracy of a prediction model tends to decrease as the prediction step size (ie, the dimension of the sequence) increases.
使用日历标签的小时用电量序列对未来一个月日历标签对应的每小时用电量进行预测时,历史小时用电量序列将被分解为多个部分,比如按星期标签进行分解时,历史小时用电量序列将被分解为七个部分,每部分分别为T i,i=1,...,7。此时,各类型建筑的月度用电量预测结果可以由7部分预测结果累加而得。 When using the hourly electricity consumption sequence of the calendar label to predict the hourly electricity consumption corresponding to the calendar label of the next month, the historical hourly electricity consumption sequence will be decomposed into multiple parts, such as when decomposing by week label, the historical hour The electricity consumption sequence will be decomposed into seven parts, each part is T i , i=1,...,7. At this time, the monthly electricity consumption forecast results of various types of buildings can be obtained by accumulating 7 parts of the forecast results.
进一步的,以星期标签来说,上述的第一用电量序列可以表示为:Further, in terms of the week label, the above-mentioned first electricity consumption sequence can be expressed as:
Figure PCTCN2020134505-appb-000006
Figure PCTCN2020134505-appb-000006
其中,W i表示星期“i”,
Figure PCTCN2020134505-appb-000007
表示历史星期“i”的基于小时的第一用电量序列,表示可采集到的历史星期“i”的小时数据点数。当i=1时,
Figure PCTCN2020134505-appb-000008
可以表示星期一的第一用电量序列。
Among them, Wi represents the week " i ",
Figure PCTCN2020134505-appb-000007
Represents the first hour-based electricity consumption sequence of the historical week "i", and represents the hourly data points of the historical week "i" that can be collected. When i=1,
Figure PCTCN2020134505-appb-000008
The first power consumption sequence for Monday can be represented.
103、将第一用电量序列在时间维度上进行非线性降维,得到第二用电量 序列。103. Perform nonlinear dimension reduction on the first electricity consumption sequence in the time dimension to obtain a second electricity consumption sequence.
在本发明实施例中,为了保证多步预测的预测精度,需对每类用电量序列进一步降低预测步长,即是对第一用电量序列进行进一步的降维。In the embodiment of the present invention, in order to ensure the prediction accuracy of the multi-step prediction, it is necessary to further reduce the prediction step size for each type of electricity consumption sequence, that is, to further reduce the dimension of the first electricity consumption sequence.
具体来说,可以是对于一个包含N天的小时用电量序列[D] 1,N×24,定义一个序列压缩映射函数f,使得: Specifically, for an hourly electricity consumption sequence [D] 1,N×24 containing N days, a sequence compression mapping function f can be defined such that:
f:[D] 1,N×24→[D] 1,N×M f:[D] 1,N×24 →[D] 1,N×M
其中,M=24/k,k∈N+,M∈N+,k表示降维参数(也可以称为压缩尺度),且k与M均为正整数,记k∈K。Among them, M=24/k, k∈N+, M∈N+, k represents the dimensionality reduction parameter (also called the compression scale), and k and M are both positive integers, denoted k∈K.
此时,第一用电量序列
Figure PCTCN2020134505-appb-000009
的维度将从w i降低至w i/k,得到第二电量序列可表示为:
At this time, the first power consumption sequence
Figure PCTCN2020134505-appb-000009
The dimension of will be reduced from w i to w i /k, and the second electric quantity sequence can be expressed as:
Figure PCTCN2020134505-appb-000010
Figure PCTCN2020134505-appb-000010
其中,
Figure PCTCN2020134505-appb-000011
表示星期“i””的第二用电量序列。
in,
Figure PCTCN2020134505-appb-000011
Represents the second power consumption sequence of the week "i"".
可以理解的是,k值不同时,可以得到不同压缩尺度下的用电量序列。当k=1时,表示不进行序列降维;当k=24时,表示将每24个小时用电量数据降维为1个用电量数据。It can be understood that when the value of k is different, the power consumption sequence under different compression scales can be obtained. When k=1, it means that the sequence dimension reduction is not performed; when k=24, it means that the power consumption data per 24 hours is reduced to one power consumption data.
104、将第二用电量序列输入预设的预测神经网络进行预测,得到基于日历标签的第一用电量预测结果。104. Input the second power consumption sequence into a preset prediction neural network for prediction, and obtain a first power consumption prediction result based on the calendar tag.
在本发明实施例中,预测神经网络可以选择BP神经网络。以降维参数为k=6为例进行说明,则第二用电量序列的维度为T i/6,i=1,...,7,且不同月份下,T i的值可能不同。因此,可以构建基于滚动预测的BP神经网络多步预测模型。首先,对低维编码序列训练一个多输入、单输出的BP神经网络预测模型。然后,根据不同月份下待预测步长T i的要求,利用该模型滚动预测T i/6次,得到多步预测结果。 In this embodiment of the present invention, the prediction neural network may select a BP neural network. Taking the dimension reduction parameter as k=6 as an example for illustration, the dimension of the second electricity consumption sequence is T i /6, i=1, . . . , 7, and the value of T i may be different in different months. Therefore, a multi-step prediction model of BP neural network based on rolling prediction can be constructed. First, a multi-input, single-output BP neural network prediction model is trained on low-dimensional encoded sequences. Then, according to the requirements of the to-be-predicted step size T i in different months, the model is used to roll forecast T i /6 times to obtain multi-step prediction results.
具体的,上述的BP神经网络的输入、输出如下:Specifically, the input and output of the above-mentioned BP neural network are as follows:
Figure PCTCN2020134505-appb-000012
Figure PCTCN2020134505-appb-000012
Figure PCTCN2020134505-appb-000013
Figure PCTCN2020134505-appb-000013
其中,Input为输入,Output为输出。BP神经网络的输出可以作为第一用电量预测结果。Among them, Input is the input and Output is the output. The output of the BP neural network can be used as the first electricity consumption prediction result.
105、基于第一用电量预测结果,计算得到综合体的用电量预测结果。105. Based on the first electricity consumption prediction result, calculate and obtain the electricity consumption prediction result of the complex.
本发明实施例中,在得到第二用电量序列对应的第一用电量预测结果后, 可以得到各类型用电实体一段时间内基于日历标签的第一用电量预测结果。比如,得到各类型用电实体未来一个月内星期一到星期日的七个第一用电量预测结果,即未来一个月内星期一到星期日每天的电量预测结果。将各类型用电实体未来一个月星期一到星期日的七个第一用电量预测结果进行累加计算,得到对应一个类型的用电实体的用电量预测结果,再将所有用电实体的用电量预测结果进行相加,最终得到城市综合体总的用电量预测结果。In the embodiment of the present invention, after obtaining the first electricity consumption prediction result corresponding to the second electricity consumption sequence, the first electricity consumption prediction result based on the calendar tag for various types of electricity consumption entities within a period of time can be obtained. For example, the seven first electricity consumption forecast results of various types of electricity consumption entities from Monday to Sunday in the next month are obtained, that is, the electricity forecast results of each day from Monday to Sunday in the next month. Accumulate the seven first electricity consumption forecast results of each type of electricity consumption entity from Monday to Sunday in the next month to obtain the electricity consumption forecast result corresponding to one type of electricity consumption entity, and then calculate the electricity consumption of all electricity consumption entities. The electricity forecast results are added together, and finally the total electricity consumption forecast result of the urban complex is obtained.
可选的,本发明实施例预测可以是月度预测。Optionally, the forecast in this embodiment of the present invention may be a monthly forecast.
上述日历标签为星期标签,上述步骤102可以包括:The above calendar label is a week label, and the above step 102 may include:
将历史小时用电量序列根据按预设的星期标签进行拆分降维,得到针对各个星期标签的用电量序列。对针对各个星期标签的用电量序列进行对齐,得到针对各个星期标签的第一用电量序列。通过对各个星期标签的用电量序列进行对齐,使得用电量序列为固定结构数据,进而可以使得预测模型进行批处理。Divide the historical hourly electricity consumption sequence according to the preset week label to reduce the dimension, and obtain the electricity consumption sequence for each week label. Align the power consumption sequences for each week label to obtain the first electricity consumption sequence for each week label. By aligning the electricity consumption sequence of each week label, the electricity consumption sequence is fixed structure data, and then the prediction model can be batched.
本发明实施例可以通过对历史小时用电量序列
Figure PCTCN2020134505-appb-000014
分解,进而减少每个类开的用电实体拆分后序列的待预测步长(也可以称为序列维度),总的预测结果可以由各拆分后的用电量序列的预测结果累加而得。具体来说,考虑到用电行为的日历效应,即不同星期中的同一工作日或周末休息日中的用电行为往往是相似的,将历史小时用电量序列
Figure PCTCN2020134505-appb-000015
根据其周标签分为七个序列:历史所有星期一的小时用电量序列到历史所有星期日的小时用电量序列。这七个历史用电量序列也可称为第一用电量序列,该第一用电量序列可以表示为:
In this embodiment of the present invention, the historical hourly electricity consumption sequence can be
Figure PCTCN2020134505-appb-000014
Decomposition, and then reduce the to-be-predicted step size (also called sequence dimension) of the split sequence of each class of electricity-consuming entities. have to. Specifically, considering the calendar effect of electricity consumption behavior, that is, electricity consumption behaviors on the same working day or weekend off days in different weeks are often similar, the historical hourly electricity consumption sequence is
Figure PCTCN2020134505-appb-000015
It is divided into seven series according to its week label: the historical hourly electricity consumption sequence of all Mondays to the historical hourly electricity consumption series of all Sundays. The seven historical power consumption sequences can also be referred to as the first power consumption sequence, and the first power consumption sequence can be expressed as:
Figure PCTCN2020134505-appb-000016
Figure PCTCN2020134505-appb-000016
其中,W i表示星期“i”,
Figure PCTCN2020134505-appb-000017
表示历史星期“i”的基于小时的第一用电量序列,表示可采集到的历史星期“i”的小时数据点数。当i=1时,
Figure PCTCN2020134505-appb-000018
可以表示星期一的第一用电量序列。
Among them, Wi represents the week " i ",
Figure PCTCN2020134505-appb-000017
Represents the first hour-based electricity consumption sequence of the historical week "i", and represents the hourly data points of the historical week "i" that can be collected. When i=1,
Figure PCTCN2020134505-appb-000018
The first power consumption sequence for Monday can be represented.
此时,未来一个月的用电量可以表示为:At this point, the electricity consumption in the next month can be expressed as:
Figure PCTCN2020134505-appb-000019
Figure PCTCN2020134505-appb-000019
其中,T i表示未来一个月星期“i”的小时点数,且满足下列条件: Among them, T i represents the hour number of the week "i" in the next month, and the following conditions are met:
Figure PCTCN2020134505-appb-000020
Figure PCTCN2020134505-appb-000020
在本发明实施例中,使用历史星期“i”的小时用电量序列(即第一用电 量序列)对未来一个月星期“i”的每小时用电量进行预测时,预测步长(序列维度)将被分解为7部分,每部分分别为T i,i=1,...,7。此时,各类型用电实体的月度用电量预测结果可以由7部分预测结果累加而得。将未来一个月星期“i”的待预测小时用电量序列记为: In this embodiment of the present invention, when using the hourly electricity consumption sequence of the historical week "i" (ie, the first electricity consumption sequence) to predict the hourly electricity consumption of the week "i" in the next month, the prediction step size ( sequence dimension) will be decomposed into 7 parts, each part is T i , i=1,...,7. At this time, the monthly electricity consumption forecast results of various types of electricity consumption entities can be obtained by accumulating 7 parts of the forecast results. Record the hourly electricity consumption sequence to be predicted for week "i" in the next month as:
Figure PCTCN2020134505-appb-000021
Figure PCTCN2020134505-appb-000021
可选的,上述步骤103可以包括:Optionally, the foregoing step 103 may include:
通过预设的自编码网络对第一用电量序列在时间维度上进行非线性降维;其中,上述的自编码网络通过预设的降维参数进行训练得到。Non-linear dimensionality reduction is performed on the first power consumption sequence in the time dimension through a preset self-encoding network; wherein, the above-mentioned self-encoding network is obtained by training with preset dimensionality reduction parameters.
在本发明实施例中,为了保证多步预测的预测精度,需对每类用电量序列进一步降低预测步长,即是对第一用电量序列进行进一步的降维。In the embodiment of the present invention, in order to ensure the prediction accuracy of the multi-step prediction, it is necessary to further reduce the prediction step size for each type of electricity consumption sequence, that is, to further reduce the dimension of the first electricity consumption sequence.
具体来说,可以是对于一个包含N天的小时用电量序列[D] 1,N×24,定义一个序列压缩映射函数f,使得: Specifically, for an hourly electricity consumption sequence [D] 1,N×24 containing N days, a sequence compression mapping function f can be defined such that:
f:[D] 1,N×24→[D] 1,N×M f:[D] 1,N×24 →[D] 1,N×M
其中,M=24/k,k∈N+,M∈N+,k表示降维参数(也可以称为压缩尺度),且k与M均为正整数,记k∈K。Among them, M=24/k, k∈N+, M∈N+, k represents the dimensionality reduction parameter (also called the compression scale), and k and M are both positive integers, denoted k∈K.
此时,第一用电量序列
Figure PCTCN2020134505-appb-000022
的维度将从w i降低至w i/k,得到第二电量序列可表示为:
At this time, the first power consumption sequence
Figure PCTCN2020134505-appb-000022
The dimension of will be reduced from w i to w i /k, and the second electric quantity sequence can be expressed as:
Figure PCTCN2020134505-appb-000023
Figure PCTCN2020134505-appb-000023
其中,
Figure PCTCN2020134505-appb-000024
表示星期“i””的第二用电量序列。
in,
Figure PCTCN2020134505-appb-000024
Represents the second power consumption sequence of the week "i"".
可以理解的是,k值不同时,可以得到不同压缩尺度下的用电量序列。当k=1时,表示不进行序列降维;当k=24时,表示将每24个小时用电量数据降维为1个用电量数据,也即是一维的用电量序列。It can be understood that when the value of k is different, the power consumption sequence under different compression scales can be obtained. When k=1, it means that the sequence dimension reduction is not performed; when k=24, it means that the electricity consumption data per 24 hours is reduced to one electricity consumption data, that is, a one-dimensional electricity consumption sequence.
同样的,待预测小时用电量序列的维度也被从w i降低至w i/k,可以记为: Similarly, the dimension of the hourly electricity consumption sequence to be predicted is also reduced from w i to w i /k, which can be written as:
Figure PCTCN2020134505-appb-000025
Figure PCTCN2020134505-appb-000025
需要说明的是,首先,压缩尺度的选择直接影响了最终的预测精度。序列降维参数过大会造成
Figure PCTCN2020134505-appb-000026
包含的数据点数减少,进而导致训练样本数大量减少,最终使得预测模型的精度降低;序列压缩尺度过小时,无法有效降低
Figure PCTCN2020134505-appb-000027
的维度,即待预测步长依然较大,此时同样不能保证多步预测模型的精度。其次,不同的序列压缩映射方法得到的
Figure PCTCN2020134505-appb-000028
的可预测性也不同。由于本发明的关注点是后者,而非寻找到最优的压缩尺度,本发明将压缩尺度 k的值选择为6。
It should be noted that, first of all, the choice of compression scale directly affects the final prediction accuracy. The sequence dimension reduction parameter is too large, which will cause
Figure PCTCN2020134505-appb-000026
The number of data points included is reduced, which in turn leads to a large reduction in the number of training samples, which ultimately reduces the accuracy of the prediction model; if the sequence compression scale is too small, it cannot be effectively reduced
Figure PCTCN2020134505-appb-000027
The dimension of , that is, the step size to be predicted is still large, and the accuracy of the multi-step prediction model cannot be guaranteed at this time. Secondly, the different sequence compression mapping methods obtained
Figure PCTCN2020134505-appb-000028
The predictability is also different. Since the focus of the present invention is the latter, rather than finding the optimal compression scale, the present invention selects the value of the compression scale k to be 6.
在一种可能的实施例中,可以通过加法聚合,来实现对第一用电量序列的降维,比如,可以通过下面的式子进行:In a possible embodiment, the dimensionality reduction of the first electricity consumption sequence can be realized by additive aggregation, for example, it can be performed by the following formula:
Figure PCTCN2020134505-appb-000029
Figure PCTCN2020134505-appb-000029
这样,可以将多个数据点累加得到一个数据点,从而实现降维。In this way, multiple data points can be accumulated to obtain one data point, thereby realizing dimensionality reduction.
另外,本发明实施例还提供一种基于自编码网络的非线性降维,通过提取用电量序列中非线性特征实现用电量时间序列降维。自编码网络由编码网络(自编码网络前半部分)和解码网络(自编码网络后半部分)构成。在本发明实施例中,可以利用编码网络将高维的输入数据(即第一用电量序列)非线性映射到低维编码序列(即第二用电量序列),同时编码序列可以通过解码网络重构输入数据。因此,降维后的编码序列可以准确地表示输入数据,即会使得信息损失更小,从而提升降维后序列的可预测性。In addition, the embodiment of the present invention also provides a nonlinear dimension reduction based on an auto-encoding network, which realizes the dimension reduction of the time series of electricity consumption by extracting nonlinear features in the electricity consumption sequence. The self-encoding network consists of an encoding network (the first half of the self-encoding network) and a decoding network (the second half of the self-encoding network). In this embodiment of the present invention, an encoding network can be used to non-linearly map high-dimensional input data (that is, the first power consumption sequence) to a low-dimensional encoding sequence (that is, the second power consumption sequence), and the encoding sequence can be decoded by decoding The network reconstructs the input data. Therefore, the encoded sequence after dimension reduction can accurately represent the input data, that is, the loss of information is smaller, and the predictability of the sequence after dimension reduction is improved.
可选的,上述编码网络包括第一输入层、第一隐含层以及第一输出层,其中,上述第一输入层的输出与上述第一隐含层的输入连接,上述第一隐含层的输出与第一输出层的输入连接,上述第一输入层包括M×k个神经元,上述第一输出层包括M个神经元,上述降维参数为k,M与k均为正整数,上述根据降维参数,通过预设的自编码网络对第一用电量序列在时间维度上进行非线性降维的步骤具体包括:Optionally, the encoding network includes a first input layer, a first hidden layer, and a first output layer, wherein the output of the first input layer is connected to the input of the first hidden layer, and the first hidden layer is The output of the first output layer is connected to the input of the first output layer, the first input layer includes M×k neurons, the first output layer includes M neurons, the dimension reduction parameter is k, and M and k are both positive integers, The above-mentioned steps of performing nonlinear dimensionality reduction on the first power consumption sequence in the time dimension through a preset self-encoding network according to the dimensionality reduction parameters specifically include:
将上述第一用电量序列依次输入上述第一输入层、第一隐含层以及第一输出层,得到M维的第二用电量序列。The first power consumption sequence is input into the first input layer, the first hidden layer and the first output layer in sequence to obtain an M-dimensional second power consumption sequence.
在本发明实施例中,首先,可以对于步骤102中得到的第一用电量序列,训练一个自编码网络。其中,在自编码网络的编码网络中,第一输入层神经元个数与第一隐含层的神经元个数的比值即为降维参数k(本发明实施例以k=6为例),可以选择第一输入层神经元个数为M×k=24,则第一输出层神经元个数为M=4。In this embodiment of the present invention, first, an auto-encoding network may be trained for the first power consumption sequence obtained in step 102 . Wherein, in the encoding network of the auto-encoding network, the ratio of the number of neurons in the first input layer to the number of neurons in the first hidden layer is the dimensionality reduction parameter k (in the embodiment of the present invention, k=6 is used as an example) , the number of neurons in the first input layer can be selected as M×k=24, and the number of neurons in the first output layer is M=4.
可选的,上述的步骤103可以包括:Optionally, the above step 103 may include:
将M维的第二用电量序列输入预测神经网络进行预测,得到M维的预测结果;将M维的预测结果输入预设的解码网络中进行解码,得到M×k维的第一用电量预测结果。Input the M-dimensional second electricity consumption sequence into the prediction neural network for prediction, and obtain the M-dimensional prediction result; input the M-dimensional prediction result into the preset decoding network for decoding, and obtain the M×k-dimensional first electricity consumption volume forecast results.
在本发明实施例中,预测神经网络可以选择BP神经网络。以降维参数为k=6为例进行说明,则第二用电量序列的维度为T i/6,i=1,...,7,且不同月份下,T i的值可能不同。因此,可以构建基于滚动预测的BP神经网络多步预测模型。首先,对低维编码序列训练一个多输入、单输出的BP神经网络预测模型。然后,根据不同月份下待预测步长T i的要求,利用该模型滚动预测T i/6次,得到多步预测结果。 In this embodiment of the present invention, the prediction neural network may select a BP neural network. Taking the dimension reduction parameter as k=6 as an example for illustration, the dimension of the second electricity consumption sequence is T i /6, i=1, . . . , 7, and the value of T i may be different in different months. Therefore, a multi-step prediction model of BP neural network based on rolling prediction can be constructed. First, a multi-input, single-output BP neural network prediction model is trained on low-dimensional encoded sequences. Then, according to the requirements of the to-be-predicted step size T i in different months, the model is used to roll forecast T i /6 times to obtain multi-step prediction results.
具体的,上述的BP神经网络的输入、输出如下:Specifically, the input and output of the above-mentioned BP neural network are as follows:
Figure PCTCN2020134505-appb-000030
Figure PCTCN2020134505-appb-000030
Figure PCTCN2020134505-appb-000031
Figure PCTCN2020134505-appb-000031
其中,Input为输入,Output为输出。BP神经网络的输出可以作为第一用电量预测结果。Among them, Input is the input and Output is the output. The output of the BP neural network can be used as the first electricity consumption prediction result.
可选的,上述解码网络可以包括第二输入层、第二隐含层以及第二输出层,其中,第二输入层的输出与所述第二隐含层的输入连接,第二隐含层的输出与第二输出层的输入连接,第二输入层包括M个神经元,第二输出层包括M×k个神经元,上述将M维的预测结果输入预设的解码网络中进行解码,得到M×k维的第一用电量预测结果的步骤可以包括:Optionally, the above-mentioned decoding network may include a second input layer, a second hidden layer, and a second output layer, wherein the output of the second input layer is connected to the input of the second hidden layer, and the second hidden layer The output of the second output layer is connected to the input of the second output layer, the second input layer includes M neurons, the second output layer includes M × k neurons, and the M-dimensional prediction result is input into the preset decoding network for decoding, The steps of obtaining the M×k-dimensional first electricity consumption prediction result may include:
将所述M维的第二用电量序列依次输入所述第二输入层、第二隐含层以及第二输出层,得到M×k维的第一用电量预测结果。The M-dimensional second power consumption sequence is sequentially input to the second input layer, the second hidden layer, and the second output layer to obtain an M×k-dimensional first power consumption prediction result.
在一种可能的实施例中,上述的编码网络、预测网络以及解码网络可以共同构成预测模型,以M×k=24,M=4,k=6为例进行说明,则有:编码网络与解码网络可以共同构成关于中间层对称的自编码网络,编码网络的第一输出层对应中间层1,解码网络的第二输入层对应中间层2,具体如表1所示:In a possible embodiment, the above-mentioned encoding network, prediction network, and decoding network can jointly form a prediction model. Taking M×k=24, M=4, and k=6 as an example for illustration, there are: the encoding network and the The decoding network can jointly form a self-encoding network symmetrical about the middle layer. The first output layer of the encoding network corresponds to the middle layer 1, and the second input layer of the decoding network corresponds to the middle layer 2, as shown in Table 1:
第一输入层神经元个数The number of neurons in the first input layer 24twenty four
第一隐含层神经元个数The number of neurons in the first hidden layer 1212
第一输出层(中间层1)神经元个数Number of neurons in the first output layer (middle layer 1) 44
第二输入层(中间层2)神经元个数Number of neurons in the second input layer (middle layer 2) 44
第二隐含层神经元个数Number of neurons in the second hidden layer 1212
第二输出层神经元个数Number of neurons in the second output layer 24twenty four
各层神经元激活函数The activation function of each layer of neurons ReLUReLU
优化器optimizer AdamAdam
学习率learning rate 0.010.01
表1Table 1
该神经网络的输入、输出(等于输入)训练样本如下:The input and output (equal to the input) training samples of the neural network are as follows:
Figure PCTCN2020134505-appb-000032
Figure PCTCN2020134505-appb-000032
Figure PCTCN2020134505-appb-000033
Figure PCTCN2020134505-appb-000033
得到训练好的神经网络后,利用其前半部分(自编码网络)进行第一用电量序列的降维,即将高维度第一用电量序列
Figure PCTCN2020134505-appb-000034
中的每24个点依次输入到编码器中,然后提取第一输出层的输出,该输出即为低维度的编码序列,也就是第二用电量序列。通过预测网络对该第二用电量序列进行预测,得到预测结果,然后将预测结果输入解码网络中进行解码,可以有效提升预测精度。
After obtaining the trained neural network, use its first half (self-encoding network) to reduce the dimension of the first power consumption sequence, that is, the high-dimensional first power consumption sequence
Figure PCTCN2020134505-appb-000034
Each 24 points in the coder are input into the encoder in turn, and then the output of the first output layer is extracted, which is the low-dimensional coding sequence, that is, the second power consumption sequence. The second power consumption sequence is predicted by the prediction network to obtain the prediction result, and then the prediction result is input into the decoding network for decoding, which can effectively improve the prediction accuracy.
通过预测网络得到7个第二用电量序列的多步预测结果
Figure PCTCN2020134505-appb-000035
后,利用训练好的神经网络的后半部分(即解码网络)将预测结果解码为用电量预测结果,得到第一用电量预测结果。即是将低维度编码序列预测结果中的每4个点依次输入到解码网络中,然后提取第二输出层的结果,即可得到第二用电量预测结果,并将该第二用电量预测结果作为未来一个月星期“i”的小时用电量预测结果。
The multi-step prediction results of the 7 second electricity consumption series are obtained through the prediction network
Figure PCTCN2020134505-appb-000035
Afterwards, the second half of the trained neural network (ie, the decoding network) is used to decode the prediction result into the electricity consumption prediction result to obtain the first electricity consumption prediction result. That is, every 4 points in the prediction result of the low-dimensional coding sequence are input into the decoding network in turn, and then the result of the second output layer is extracted to obtain the second power consumption prediction result, and the second power consumption The forecast result is taken as the forecast result of hourly electricity consumption of week "i" in the next month.
可选的,上述步骤105可以包括:Optionally, the above step 105 may include:
根据上述第一用电量预测结果,计算得到各类用电实体基于上述日历的第二用电量预测结果;将上述各类用电实体对应的第二用电量预测结果进行相加,得到城市综合体的用电量预测结果。According to the above-mentioned first electricity consumption forecast results, the second electricity consumption forecast results of various types of electricity consumption entities based on the above calendar are calculated and obtained; the second electricity consumption forecast results corresponding to the above various types of electricity consumption entities are added to obtain Electricity consumption forecast results for urban complexes.
具体的,在得到第二用电量序列对应的第一用电量预测结果后,可以得到各类型用电实体一段时间内基于日历标签的第一用电量预测结果。比如,得到各类型用电实体未来一个月内星期一到星期日的七个第一用电量预测结果,即未来一个月内星期一到星期日每天的电量预测结果。将各类型用电实体未来一个月星期一到星期日的七个第一用电量预测结果进行累加计算,得到对应一个类型的用电实体的用电量预测结果,再将所有用电实体的用电量预测结果进行相加,最终得到城市综合体总的用电量预测结果。Specifically, after obtaining the first electricity consumption prediction result corresponding to the second electricity consumption sequence, the first electricity consumption prediction result of each type of electricity consumption entity based on the calendar tag within a period of time can be obtained. For example, the seven first electricity consumption forecast results of various types of electricity consumption entities from Monday to Sunday in the next month are obtained, that is, the electricity forecast results of each day from Monday to Sunday in the next month. Accumulate the seven first electricity consumption forecast results of each type of electricity consumption entity from Monday to Sunday in the next month to obtain the electricity consumption forecast result corresponding to one type of electricity consumption entity, and then calculate the electricity consumption of all electricity consumption entities. The electricity forecast results are added together, and finally the total electricity consumption forecast result of the urban complex is obtained.
本发明实施例中,获取城市综合体中各类型用电实体的历史小时用电量序列;将所述历史小时用电量序列根据按预设的日历标签进行拆分降维,得到针对各个日历标签的第一用电量序列;将所述第一用电量序列在时间维度上进行非线性降维,得到第二用电量序列;将所述第二用电量序列输入预设的预测神经网络进行预测,得到基于所述日历标签的第一用电量预测结果;基于所述 第一用电量预测结果,计算得到所述综合体的用电量预测结果。通过使用历史小时用电量序列来对未来各个小时的用电量进行预测,可以有效增加训练样本的分辨率,从而防止预测模型的过拟合,进而提高预测的精度;同时,通过对各个类型的用电实体来进行预测,最终得到整体的城市综合体的用电量预测结果,相较于直接使用城市综合体用电量来进行预测而言,可以使得电量预测结果的更加精确In the embodiment of the present invention, the historical hourly power consumption sequence of various types of power-consuming entities in the urban complex is obtained; the historical hourly power consumption sequence is divided according to preset calendar tags to reduce the dimension, and obtain the specific calendar for each calendar. the first electricity consumption sequence of the tag; perform nonlinear dimension reduction on the first electricity consumption sequence in the time dimension to obtain a second electricity consumption sequence; input the second electricity consumption sequence into a preset prediction The neural network performs prediction to obtain a first electricity consumption prediction result based on the calendar tag; and based on the first electricity consumption prediction result, calculates and obtains the electricity consumption prediction result of the complex. By using the historical hourly electricity consumption sequence to predict the electricity consumption of each hour in the future, the resolution of the training samples can be effectively increased, thereby preventing the over-fitting of the prediction model, thereby improving the prediction accuracy; Compared with the direct use of urban complex electricity consumption to forecast, it can make the electricity forecast result more accurate
需要说明的是,本发明实施例提供的城市综合体用电量预测方法可以应用于可以进行城市综合体用电量预测的手机、监控器、计算机、服务器等设备。It should be noted that the method for predicting the electricity consumption of an urban complex provided by the embodiment of the present invention can be applied to devices such as mobile phones, monitors, computers, and servers that can predict the electricity consumption of an urban complex.
请参见图2,图2是本发明实施例提供的一种城市综合体用电量预测装置的结构示意图,如图2所示,所述装置包括:Please refer to FIG. 2. FIG. 2 is a schematic structural diagram of an apparatus for predicting electricity consumption in an urban complex provided by an embodiment of the present invention. As shown in FIG. 2, the apparatus includes:
获取模块201,用于获取城市综合体中各类型用电实体的历史小时用电量序列;The obtaining module 201 is used to obtain the historical hourly electricity consumption sequence of various types of electricity consuming entities in the urban complex;
第一降维模块202,用于将所述历史小时用电量序列根据按预设的日历标签进行拆分降维,得到针对各个日历标签的第一用电量序列;A first dimension reduction module 202, configured to perform dimension reduction by dividing the historical hourly electricity consumption sequence according to preset calendar labels to obtain a first electricity consumption sequence for each calendar label;
第二降维模块203,用于将所述第一用电量序列在时间维度上进行非线性降维,得到第二用电量序列;The second dimension reduction module 203 is configured to perform nonlinear dimension reduction of the first electricity consumption sequence in the time dimension to obtain a second electricity consumption sequence;
预测模块204,用于将所述第二用电量序列输入预设的预测神经网络进行预测,得到基于所述日历标签的第一用电量预测结果;A prediction module 204, configured to input the second power consumption sequence into a preset prediction neural network for prediction, and obtain a first power consumption prediction result based on the calendar tag;
计算模块205,用于基于所述第一用电量预测结果,计算得到所述城市综合体的用电量预测结果。The calculation module 205 is configured to calculate the electricity consumption prediction result of the urban complex based on the first electricity consumption prediction result.
可选的,如图3所示,所述日历标签为星期标签,所述第一降维模块202包括:Optionally, as shown in FIG. 3 , the calendar label is a week label, and the first dimension reduction module 202 includes:
拆分单元2021,用于将所述历史小时用电量序列根据按预设的星期标签进行拆分降维,得到针对各个星期标签的用电量序列;A splitting unit 2021, configured to split the historical hourly electricity consumption sequence according to preset week labels to reduce dimensions, and obtain electricity consumption sequences for each week label;
对齐单元2022,用于对所述针对各个星期标签的用电量序列进行对齐,得到针对各个星期标签的第一用电量序列。The aligning unit 2022 is configured to align the power consumption sequence for each week tag to obtain a first power consumption sequence for each week tag.
可选的,所述第二降维模块203具体还用于通过预设的自编码网络对所述第一用电量序列在时间维度上进行非线性降维;Optionally, the second dimensionality reduction module 203 is specifically further configured to perform nonlinear dimensionality reduction on the time dimension of the first electricity consumption sequence through a preset self-encoding network;
其中,所述预设的自编码网络通过预设的降维参数进行训练得到。Wherein, the preset self-encoding network is obtained by training with preset dimension reduction parameters.
可选的,所述自编码网络包括编码网络,所述编码网络包括第一输入层、 第一隐含层以及第一输出层,其中,所述第一输入层的输出与所述第一隐含层的输入连接,所述第一隐含层的输出与第一输出层的输入连接,所述第一输入层包括M×k个神经元,所述第一输出层包括M个神经元,所述降维参数为k,M与k均为正整数,所述203具体还用于将所述第一用电量序列依次输入所述第一输入层、第一隐含层以及第一输出层,得到M维的第二用电量序列。Optionally, the self-encoding network includes an encoding network, and the encoding network includes a first input layer, a first hidden layer, and a first output layer, wherein the output of the first input layer is the same as the first hidden layer. The input of the containing layer is connected, the output of the first hidden layer is connected to the input of the first output layer, the first input layer includes M×k neurons, and the first output layer includes M neurons, The dimensionality reduction parameter is k, and M and k are both positive integers. The 203 is also used to input the first power consumption sequence into the first input layer, the first hidden layer and the first output in sequence. layer to obtain the M-dimensional second electricity consumption sequence.
可选的,如图4所示,所述自编码网络还包括解码网络,所述预测模块204包括:Optionally, as shown in FIG. 4 , the self-encoding network further includes a decoding network, and the prediction module 204 includes:
第一预测单元2041,用于将所述M维的第二用电量序列输入预测神经网络进行预测,得到M维的预测结果;The first prediction unit 2041 is configured to input the M-dimensional second power consumption sequence into a prediction neural network for prediction, and obtain an M-dimensional prediction result;
第二预测单元2042,用于将所述M维的预测结果输入预设的解码网络中进行解码,得到M×k维的第一用电量预测结果。The second prediction unit 2042 is configured to input the M-dimensional prediction result into a preset decoding network for decoding to obtain an M×k-dimensional first electricity consumption prediction result.
可选的,所述解码网络包括第二输入层、第二隐含层以及第二输出层,其中,所述第二输入层的输出与所述第二隐含层的输入连接,所述第二隐含层的输出与第二输出层的输入连接,所述第二输入层包括M个神经元,所述第二输出层包括M×k个神经元,所述第二预测单元2042具体还用于将所述M维的第二用电量序列依次输入所述第二输入层、第二隐含层以及第二输出层,得到M×k维的第一用电量预测结果。Optionally, the decoding network includes a second input layer, a second hidden layer, and a second output layer, wherein the output of the second input layer is connected to the input of the second hidden layer, and the first The output of the two hidden layers is connected to the input of the second output layer, the second input layer includes M neurons, the second output layer includes M×k neurons, and the second prediction unit 2042 specifically further It is used to input the M-dimensional second power consumption sequence into the second input layer, the second hidden layer and the second output layer in sequence, so as to obtain an M×k-dimensional first power consumption prediction result.
可选的,如图5所示,所述计算模块205包括:Optionally, as shown in FIG. 5 , the computing module 205 includes:
第一计算单元2051,用于根据所述第一用电量预测结果,计算得到各类用电实体基于所述日历的第二用电量预测结果;a first calculation unit 2051, configured to calculate and obtain second power consumption prediction results of various power consumption entities based on the calendar according to the first power consumption prediction result;
第二计算单元2052,用于将所述各类用电实体对应的第二用电量预测结果进行相加,得到所述综合体的用电量预测结果。The second calculation unit 2052 is configured to add the second electricity consumption prediction results corresponding to the various types of electricity consumption entities to obtain the electricity consumption prediction result of the complex.
需要说明的是,本发明实施例提供的城市综合体用电量预测装置可以应用于可以进行城市综合体用电量预测的手机、监控器、计算机、服务器等设备。It should be noted that the apparatus for predicting the power consumption of an urban complex provided by the embodiment of the present invention can be applied to devices such as mobile phones, monitors, computers, and servers that can predict the power consumption of urban complexes.
本发明实施例提供的城市综合体用电量预测装置能够实现上述方法实施例中城市综合体用电量预测方法实现的各个过程,且可以达到相同的有益效果。为避免重复,这里不再赘述。The apparatus for predicting the power consumption of an urban complex provided by the embodiment of the present invention can realize the various processes implemented by the method for predicting the power consumption of an urban complex in the above method embodiments, and can achieve the same beneficial effects. In order to avoid repetition, details are not repeated here.
参见图6,图6是本发明实施例提供的一种电子设备的结构示意图,如图6所示,包括:存储器602、处理器601及存储在所述存储器602上并可在所述处理器601上运行的计算机程序,其中:Referring to FIG. 6, FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. As shown in FIG. 6, it includes: a memory 602, a processor 601, and a memory 602 and a processor A computer program running on 601, which:
处理器601用于调用存储器602存储的计算机程序,执行如下步骤:The processor 601 is used for calling the computer program stored in the memory 602, and performs the following steps:
获取城市综合体中各类型用电实体的历史小时用电量序列;Obtain the historical hourly electricity consumption sequence of various types of electricity consumption entities in the urban complex;
将所述历史小时用电量序列根据按预设的日历标签进行拆分降维,得到针对各个日历标签的第一用电量序列;Splitting the historical hourly power consumption sequence according to preset calendar tags to reduce the dimension to obtain a first power consumption sequence for each calendar tag;
将所述第一用电量序列在时间维度上进行非线性降维,得到第二用电量序列;Performing nonlinear dimensionality reduction on the first power consumption sequence in the time dimension to obtain a second power consumption sequence;
将所述第二用电量序列输入预设的预测神经网络进行预测,得到基于所述日历标签的第一用电量预测结果;Inputting the second power consumption sequence into a preset prediction neural network for prediction, and obtaining a first power consumption prediction result based on the calendar tag;
基于所述第一用电量预测结果,计算得到所述城市综合体的用电量预测结果。Based on the first electricity consumption prediction result, the electricity consumption prediction result of the urban complex is obtained by calculation.
可选的,所述日历标签为星期标签,处理器601执行的所述将所述历史小时用电量序列根据按预设的日历标签进行拆分降维,得到针对各个日历标签的第一用电量序列的步骤具体包括:Optionally, the calendar label is a week label, and the processor 601 performs the division and dimension reduction of the historical hourly electricity consumption sequence according to the preset calendar label to obtain the first usage for each calendar label. The steps of the power sequence include:
将所述历史小时用电量序列根据按预设的星期标签进行拆分降维,得到针对各个星期标签的用电量序列;Splitting the historical hourly electricity consumption sequence according to the preset week label for dimension reduction to obtain the electricity consumption sequence for each week label;
对所述针对各个星期标签的用电量序列进行对齐,得到针对各个星期标签的第一用电量序列。Align the power consumption sequences for each week label to obtain a first electricity consumption sequence for each week label.
可选的,处理器601执行的所述将所述第一用电量序列在时间维度上进行非线性降维,得到第二用电量序列的步骤具体包括:Optionally, the step performed by the processor 601 to perform nonlinear dimensionality reduction of the first power consumption sequence in the time dimension to obtain a second power consumption sequence specifically includes:
通过预设的自编码网络对所述第一用电量序列在时间维度上进行非线性降维;Perform nonlinear dimensionality reduction on the time dimension of the first electricity consumption sequence by using a preset self-encoding network;
其中,所述预设的自编码网络通过预设的降维参数进行训练得到。Wherein, the preset self-encoding network is obtained by training with preset dimension reduction parameters.
可选的,所述自编码网络包括编码网络,所述编码网络包括第一输入层、第一隐含层以及第一输出层,其中,所述第一输入层的输出与所述第一隐含层的输入连接,所述第一隐含层的输出与第一输出层的输入连接,所述第一输入层包括M×k个神经元,所述第一输出层包括M个神经元,所述降维参数为k,M与k均为正整数,处理器601执行的所述根据所述降维参数,通过预设的自编码网络对所述第一用电量序列在时间维度上进行非线性降维的步骤具体包括:Optionally, the self-encoding network includes an encoding network, and the encoding network includes a first input layer, a first hidden layer, and a first output layer, wherein the output of the first input layer is the same as the first hidden layer. The input of the containing layer is connected, the output of the first hidden layer is connected to the input of the first output layer, the first input layer includes M×k neurons, and the first output layer includes M neurons, The dimensionality reduction parameter is k, and M and k are both positive integers. According to the dimensionality reduction parameter executed by the processor 601, the first power consumption sequence is analyzed in the time dimension through a preset self-encoding network. The steps for nonlinear dimensionality reduction include:
将所述第一用电量序列依次输入所述第一输入层、第一隐含层以及第一输 出层,得到M维的第二用电量序列。The first power consumption sequence is sequentially input to the first input layer, the first hidden layer and the first output layer to obtain an M-dimensional second power consumption sequence.
可选的,所述自编码网络还包括解码网络,处理器601执行的所述将所述第二用电量序列输入预设的预测神经网络进行预测,得到基于所述日历标签的第一用电量预测结果的步骤具体包括:Optionally, the self-encoding network further includes a decoding network, and the processor 601 performs the inputting the second power consumption sequence into a preset prediction neural network for prediction, and obtains the first power consumption based on the calendar tag. The steps of the electricity prediction result include:
将所述M维的第二用电量序列输入预测神经网络进行预测,得到M维的预测结果;Inputting the M-dimensional second power consumption sequence into a prediction neural network for prediction to obtain an M-dimensional prediction result;
将所述M维的预测结果输入预设的解码网络中进行解码,得到M×k维的第一用电量预测结果。The M-dimensional prediction result is input into a preset decoding network for decoding, and the M×k-dimensional first electricity consumption prediction result is obtained.
可选的,所述解码网络包括第二输入层、第二隐含层以及第二输出层,其中,所述第二输入层的输出与所述第二隐含层的输入连接,所述第二隐含层的输出与第二输出层的输入连接,所述第二输入层包括M个神经元,所述第二输出层包括M×k个神经元,处理器601执行的所述将所述M维的预测结果输入预设的解码网络中进行解码,得到M×k维的第一用电量预测结果的步骤具体包括:Optionally, the decoding network includes a second input layer, a second hidden layer, and a second output layer, wherein the output of the second input layer is connected to the input of the second hidden layer, and the first The outputs of the two hidden layers are connected to the inputs of the second output layer, the second input layer includes M neurons, the second output layer includes M×k neurons, and the processing performed by the processor 601 to perform the The M-dimensional prediction result is input into a preset decoding network for decoding, and the steps of obtaining the M×k-dimensional first electricity consumption prediction result specifically include:
将所述M维的第二用电量序列依次输入所述第二输入层、第二隐含层以及第二输出层,得到M×k维的第一用电量预测结果。The M-dimensional second power consumption sequence is sequentially input to the second input layer, the second hidden layer, and the second output layer to obtain an M×k-dimensional first power consumption prediction result.
可选的,处理器601执行的所述基于所述第一用电量预测结果,计算得到所述综合体的用电量预测结果的步骤具体包括:Optionally, the step performed by the processor 601 to obtain the power consumption forecast result of the complex based on the first power consumption forecast result specifically includes:
根据所述第一用电量预测结果,计算得到各类用电实体基于所述日历的第二用电量预测结果;According to the first electricity consumption prediction result, calculating and obtaining the second electricity consumption prediction result of various electricity consumption entities based on the calendar;
将所述各类用电实体对应的第二用电量预测结果进行相加,得到所述综合体的用电量预测结果。The second electricity consumption prediction results corresponding to the various types of electricity consumption entities are added to obtain the electricity consumption prediction result of the complex.
需要说明的是,上述电子设备可以是可以应用于可以进行城市综合体用电量预测的手机、监控器、计算机、服务器等设备。It should be noted that the above-mentioned electronic devices may be devices such as mobile phones, monitors, computers, servers, etc., which can be applied to predict the electricity consumption of urban complexes.
本发明实施例提供的电子设备能够实现上述方法实施例中城市综合体用电量预测方法实现的各个过程,且可以达到相同的有益效果,为避免重复,这里不再赘述。The electronic device provided in the embodiment of the present invention can realize the various processes realized by the method for predicting the electricity consumption of the urban complex in the above method embodiment, and can achieve the same beneficial effect. In order to avoid repetition, details are not repeated here.
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现本发明实施例提供的城市综合体用电量预测方法的各个过程,且能达到相同的技术效果,为避免重复, 这里不再赘述。Embodiments of the present invention further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, each of the methods for predicting electricity consumption in urban complexes provided by the embodiments of the present invention is implemented. process, and can achieve the same technical effect, in order to avoid repetition, it is not repeated here.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存取存储器(Random Access Memory,简称RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. During execution, the processes of the embodiments of the above-mentioned methods may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM for short), and the like.
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above disclosures are only preferred embodiments of the present invention, and of course, the scope of the rights of the present invention cannot be limited by this. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims (10)

  1. 一种城市综合体用电量预测方法,其特征在于,包括以下步骤:A method for predicting electricity consumption in an urban complex, comprising the following steps:
    获取城市综合体中各类型用电实体的历史小时用电量序列;Obtain the historical hourly electricity consumption sequence of various types of electricity consumption entities in the urban complex;
    将所述历史小时用电量序列根据按预设的日历标签进行拆分降维,得到针对各个日历标签的第一用电量序列;Splitting the historical hourly power consumption sequence according to preset calendar tags to reduce the dimension to obtain a first power consumption sequence for each calendar tag;
    将所述第一用电量序列在时间维度上进行非线性降维,得到第二用电量序列;Performing nonlinear dimensionality reduction on the first power consumption sequence in the time dimension to obtain a second power consumption sequence;
    将所述第二用电量序列输入预设的预测神经网络进行预测,得到基于所述日历标签的第一用电量预测结果;Inputting the second power consumption sequence into a preset prediction neural network for prediction, and obtaining a first power consumption prediction result based on the calendar tag;
    基于所述第一用电量预测结果,计算得到所述城市综合体的用电量预测结果。Based on the first electricity consumption prediction result, the electricity consumption prediction result of the urban complex is obtained by calculation.
  2. 如权利要求1所述的方法,其特征在于,所述日历标签为星期标签,所述将所述历史小时用电量序列根据按预设的日历标签进行拆分降维,得到针对各个日历标签的第一用电量序列的步骤具体包括:The method according to claim 1, wherein the calendar label is a week label, and the historical hourly electricity consumption sequence is divided and dimension-reduced according to a preset calendar label to obtain the calendar label for each calendar label. The steps of the first electricity consumption sequence specifically include:
    将所述历史小时用电量序列根据按预设的星期标签进行拆分降维,得到针对各个星期标签的用电量序列;Splitting the historical hourly electricity consumption sequence according to the preset week label for dimension reduction to obtain the electricity consumption sequence for each week label;
    对所述针对各个星期标签的用电量序列进行对齐,得到针对各个星期标签的第一用电量序列。Align the power consumption sequences for each week label to obtain a first electricity consumption sequence for each week label.
  3. 如权利要求1或2所述的方法,其特征在于,所述将所述第一用电量序列在时间维度上进行非线性降维,得到第二用电量序列的步骤具体包括:The method according to claim 1 or 2, wherein the step of performing nonlinear dimensionality reduction of the first power consumption sequence in the time dimension to obtain the second power consumption sequence specifically includes:
    通过预设的自编码网络对所述第一用电量序列在时间维度上进行非线性降维;Perform nonlinear dimensionality reduction on the time dimension of the first electricity consumption sequence by using a preset self-encoding network;
    其中,所述预设的自编码网络通过预设的降维参数进行训练得到。Wherein, the preset self-encoding network is obtained by training with preset dimension reduction parameters.
  4. 如权利要求3所述的方法,其特征在于,所述自编码网络包括编码网络,所述编码网络包括第一输入层、第一隐含层以及第一输出层,其中,所述第一输入层的输出与所述第一隐含层的输入连接,所述第一隐含层的输出与第一输出层的输入连接,所述第一输入层包括M×k个神经元,所述第一输出层包括M个神经元,所述降维参数为k,M与k均为正整数,所述根据所述降维参数,通过预设的自编码网络对所述第一用电量序列在时间维度上进行非线性 降维的步骤具体包括:The method of claim 3, wherein the self-encoding network comprises an encoding network, the encoding network comprises a first input layer, a first hidden layer and a first output layer, wherein the first input The output of the layer is connected with the input of the first hidden layer, the output of the first hidden layer is connected with the input of the first output layer, the first input layer includes M × k neurons, the first An output layer includes M neurons, the dimension reduction parameter is k, and M and k are both positive integers. The steps of non-linear dimensionality reduction in the time dimension specifically include:
    将所述第一用电量序列依次输入所述第一输入层、第一隐含层以及第一输出层,得到M维的第二用电量序列。The first power consumption sequence is sequentially input to the first input layer, the first hidden layer and the first output layer to obtain an M-dimensional second power consumption sequence.
  5. 如权利要求4所述的方法,其特征在于,所述自编码网络还包括解码网络,所述将所述第二用电量序列输入预设的预测神经网络进行预测,得到基于所述日历标签的第一用电量预测结果的步骤具体包括:The method according to claim 4, wherein the self-encoding network further comprises a decoding network, and the second power consumption sequence is input into a preset prediction neural network for prediction, and the calendar label is obtained based on the calendar label. The steps of the first electricity consumption prediction result specifically include:
    将所述M维的第二用电量序列输入预测神经网络进行预测,得到M维的预测结果;Inputting the M-dimensional second power consumption sequence into a prediction neural network for prediction to obtain an M-dimensional prediction result;
    将所述M维的预测结果输入预设的解码网络中进行解码,得到M×k维的第一用电量预测结果。The M-dimensional prediction result is input into a preset decoding network for decoding, and the M×k-dimensional first electricity consumption prediction result is obtained.
  6. 如权利要求4所述的方法,其特征在于,所述解码网络包括第二输入层、第二隐含层以及第二输出层,其中,所述第二输入层的输出与所述第二隐含层的输入连接,所述第二隐含层的输出与第二输出层的输入连接,所述第二输入层包括M个神经元,所述第二输出层包括M×k个神经元,所述将所述M维的预测结果输入预设的解码网络中进行解码,得到M×k维的第一用电量预测结果的步骤具体包括:The method of claim 4, wherein the decoding network comprises a second input layer, a second hidden layer and a second output layer, wherein the output of the second input layer is the same as the second hidden layer The input of the containing layer is connected, the output of the second hidden layer is connected to the input of the second output layer, the second input layer includes M neurons, and the second output layer includes M×k neurons, The step of inputting the M-dimensional prediction result into a preset decoding network for decoding to obtain the M×k-dimensional first electricity consumption prediction result specifically includes:
    将所述M维的第二用电量序列依次输入所述第二输入层、第二隐含层以及第二输出层,得到M×k维的第一用电量预测结果。The M-dimensional second power consumption sequence is sequentially input to the second input layer, the second hidden layer, and the second output layer to obtain an M×k-dimensional first power consumption prediction result.
  7. 如权利要求1所述的方法,其特征在于,所述基于所述第一用电量预测结果,计算得到所述综合体的用电量预测结果的步骤具体包括:The method according to claim 1, wherein the step of calculating the electricity consumption forecast result of the complex based on the first electricity consumption forecast result specifically comprises:
    根据所述第一用电量预测结果,计算得到各类用电实体基于所述日历的第二用电量预测结果;According to the first electricity consumption prediction result, calculating and obtaining the second electricity consumption prediction result of various electricity consumption entities based on the calendar;
    将所述各类用电实体对应的第二用电量预测结果进行相加,得到所述综合体的用电量预测结果。The second electricity consumption prediction results corresponding to the various types of electricity consumption entities are added to obtain the electricity consumption prediction result of the complex.
  8. 一种城市综合体用电量预测装置,其特征在于,所述装置包括:A device for predicting electricity consumption in an urban complex, characterized in that the device comprises:
    获取模块,用于获取城市综合体中各类型用电实体的历史小时用电量序列;The acquisition module is used to acquire the historical hourly electricity consumption sequence of various types of electricity consumption entities in the urban complex;
    第一降维模块,用于将所述历史小时用电量序列根据按预设的日历标签进行拆分降维,得到针对各个日历标签的第一用电量序列;a first dimension reduction module, configured to split the historical hourly electricity consumption sequence according to preset calendar tags for dimension reduction, to obtain a first electricity consumption sequence for each calendar tag;
    第二降维模块,用于将所述第一用电量序列在时间维度上进行非线性降维,得到第二用电量序列;A second dimension reduction module, configured to perform nonlinear dimension reduction of the first electricity consumption sequence in the time dimension to obtain a second electricity consumption sequence;
    预测模块,用于将所述第二用电量序列输入预设的预测神经网络进行预测,得到基于所述日历标签的第一用电量预测结果;a prediction module, configured to input the second power consumption sequence into a preset prediction neural network for prediction, and obtain a first power consumption prediction result based on the calendar tag;
    计算模块,用于基于所述第一用电量预测结果,计算得到所述城市综合体的用电量预测结果。A calculation module, configured to calculate the electricity consumption prediction result of the urban complex based on the first electricity consumption prediction result.
  9. 一种电子设备,其特征在于,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至7中任一项所述的城市综合体用电量预测方法中的步骤。An electronic device, characterized by comprising: a memory, a processor, and a computer program stored on the memory and running on the processor, the processor implementing the computer program as claimed in claim 1 when the processor executes the computer program Steps in the urban complex electricity consumption forecasting method described in any one of to 7.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7中任一项所述的城市综合体用电量预测方法中的步骤。A computer-readable storage medium, characterized in that, a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the urban integration according to any one of claims 1 to 7 is realized Steps in the body electricity consumption prediction method.
PCT/CN2020/134505 2020-07-29 2020-12-08 Urban complex electricity consumption prediction method and apparatus, electronic device, and storage medium WO2022021727A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010745331.3A CN111985695A (en) 2020-07-29 2020-07-29 Urban complex electricity consumption prediction method and device, electronic equipment and storage medium
CN202010745331.3 2020-07-29

Publications (1)

Publication Number Publication Date
WO2022021727A1 true WO2022021727A1 (en) 2022-02-03

Family

ID=73444698

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/134505 WO2022021727A1 (en) 2020-07-29 2020-12-08 Urban complex electricity consumption prediction method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN111985695A (en)
WO (1) WO2022021727A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116777452A (en) * 2023-06-20 2023-09-19 浙江恒业电子股份有限公司 Prepayment system and method for intelligent ammeter
CN117353300A (en) * 2023-12-04 2024-01-05 拓锐科技有限公司 Rural power consumption demand analysis method based on big data

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111985695A (en) * 2020-07-29 2020-11-24 国网甘肃省电力公司 Urban complex electricity consumption prediction method and device, electronic equipment and storage medium
CN117910539B (en) * 2024-03-19 2024-05-31 电子科技大学 Household characteristic recognition method based on heterogeneous semi-supervised federal learning

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930347A (en) * 2012-10-15 2013-02-13 河海大学 Method for forecasting short term load under demand response
CN105913175A (en) * 2016-04-07 2016-08-31 哈尔滨理工大学 Intelligent power grid short period load prediction method based on improved nerve network algorithm
US20170091615A1 (en) * 2015-09-28 2017-03-30 Siemens Aktiengesellschaft System and method for predicting power plant operational parameters utilizing artificial neural network deep learning methodologies
CN108022008A (en) * 2017-11-30 2018-05-11 国网福建省电力有限公司经济技术研究院 The training method of electricity demand forecasting model
CN110266002A (en) * 2019-06-20 2019-09-20 北京百度网讯科技有限公司 Method and apparatus for predicting electric load
CN111144643A (en) * 2019-12-24 2020-05-12 天津相和电气科技有限公司 Day-ahead power load prediction method and device based on double-end automatic coding
CN111985695A (en) * 2020-07-29 2020-11-24 国网甘肃省电力公司 Urban complex electricity consumption prediction method and device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102270309B (en) * 2011-07-27 2013-05-01 华北电力大学 Short-term electric load prediction method based on ensemble learning
CN108090563A (en) * 2017-12-15 2018-05-29 烟台港股份有限公司 A kind of electric flux Forecasting Methodology based on BP neural network
CN110782013B (en) * 2019-10-22 2022-06-21 太原理工大学 Thermal power plant NOx emission prediction method based on generalized mutual entropy self-encoder
CN111191841B (en) * 2019-12-30 2020-08-25 润联软件系统(深圳)有限公司 Power load prediction method and device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930347A (en) * 2012-10-15 2013-02-13 河海大学 Method for forecasting short term load under demand response
US20170091615A1 (en) * 2015-09-28 2017-03-30 Siemens Aktiengesellschaft System and method for predicting power plant operational parameters utilizing artificial neural network deep learning methodologies
CN105913175A (en) * 2016-04-07 2016-08-31 哈尔滨理工大学 Intelligent power grid short period load prediction method based on improved nerve network algorithm
CN108022008A (en) * 2017-11-30 2018-05-11 国网福建省电力有限公司经济技术研究院 The training method of electricity demand forecasting model
CN110266002A (en) * 2019-06-20 2019-09-20 北京百度网讯科技有限公司 Method and apparatus for predicting electric load
CN111144643A (en) * 2019-12-24 2020-05-12 天津相和电气科技有限公司 Day-ahead power load prediction method and device based on double-end automatic coding
CN111985695A (en) * 2020-07-29 2020-11-24 国网甘肃省电力公司 Urban complex electricity consumption prediction method and device, electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116777452A (en) * 2023-06-20 2023-09-19 浙江恒业电子股份有限公司 Prepayment system and method for intelligent ammeter
CN116777452B (en) * 2023-06-20 2024-01-23 浙江恒业电子股份有限公司 Prepayment system and method for intelligent ammeter
CN117353300A (en) * 2023-12-04 2024-01-05 拓锐科技有限公司 Rural power consumption demand analysis method based on big data
CN117353300B (en) * 2023-12-04 2024-02-23 拓锐科技有限公司 Rural power consumption demand analysis method based on big data

Also Published As

Publication number Publication date
CN111985695A (en) 2020-11-24

Similar Documents

Publication Publication Date Title
WO2022021727A1 (en) Urban complex electricity consumption prediction method and apparatus, electronic device, and storage medium
CN110610280B (en) Short-term prediction method, model, device and system for power load
Massaoudi et al. A novel stacked generalization ensemble-based hybrid LGBM-XGB-MLP model for Short-Term Load Forecasting
CN113962364B (en) Multi-factor power load prediction method based on deep learning
Yang et al. A novel prediction model for the inbound passenger flow of urban rail transit
Gupta et al. Resource usage prediction of cloud workloads using deep bidirectional long short term memory networks
Barrow Forecasting intraday call arrivals using the seasonal moving average method
Karimi et al. Priority index considering temperature and date proximity for selection of similar days in knowledge-based short term load forecasting method
Weng et al. Probabilistic baseline estimation based on load patterns for better residential customer rewards
Liu et al. A spatial multi-resolution multi-objective data-driven ensemble model for multi-step air quality index forecasting based on real-time decomposition
Sigauke Forecasting medium-term electricity demand in a South African electric power supply system
CN115249081A (en) Object type prediction method and device, computer equipment and storage medium
CN112396231A (en) Modeling method and device for spatio-temporal data, electronic equipment and readable medium
El Bakali et al. Day-ahead seasonal solar radiation prediction, combining VMD and STACK algorithms
CN113743667A (en) Method, device, equipment and storage medium for predicting power consumption of transformer area
Grandón et al. Electricity demand forecasting with hybrid classical statistical and machine learning algorithms: Case study of Ukraine
Jrhilifa et al. Forecasting smart home electricity consumption using VMD-Bi-GRU
Mishra et al. Performance evaluation of prophet and STL-ETS methods for load forecasting
Zhang et al. Accurate ultra-short-term load forecasting based on load characteristic decomposition and convolutional neural network with bidirectional long short-term memory model
Zheng et al. Short-term energy consumption prediction of electric vehicle charging station using attentional feature engineering and multi-sequence stacked Gated Recurrent Unit
CN111985731B (en) Method and system for predicting number of people at urban public transport station
Wang et al. Cloud computing and extreme learning machine for a distributed energy consumption forecasting in equipment-manufacturing enterprises
Oelrich et al. Local prediction pools
CN110659775A (en) LSTM-based improved electric power short-time load prediction algorithm
Yaldız et al. Time Series Analysis of Radiological Data of Outpatients and Inpatients in Emergency Department of Mus State Hospital

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20947749

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20947749

Country of ref document: EP

Kind code of ref document: A1