A method and system for collecting and analyzing electric energy consumption based on deep learning

The deep learning-based energy consumption analysis system addresses the challenge of diverse user types by classifying and predicting energy consumption using LSTM-FCN and N-BEATS algorithms, improving accuracy and enabling tailored pricing strategies.

CN115357642BActive Publication Date: 2025-07-15CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211025256.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-25
Publication Date
2025-07-15
Estimated Expiration
2042-08-25

AI Technical Summary

Technical Problem

The existing power energy consumption acquisition and analysis system is difficult to conduct effective energy consumption analysis for different types of users, resulting in a significant reduction in the effectiveness of model analysis, and it is impossible to reasonably arrange electricity resources and increase revenue.

Method used

The power consumption acquisition and analysis method based on deep learning is adopted, and a classification model is established to classify user types through data acquisition, preprocessing, classification and prediction models, and different prediction models are established based on the classification results to improve accuracy and generalization.

Benefits of technology

It realizes electricity consumption prediction for different types of users, improves prediction accuracy and interpretability, helps power sales companies to reasonably formulate electricity prices and reduce investment costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115357642B_ABST
    Figure CN115357642B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for collecting and analyzing electric energy consumption based on deep learning. The method specifically includes the following steps: A data collection device collects energy consumption data, including electricity consumption data, date, region, and weather data, and writes it into a database; A data preprocessing module preprocesses the data stored in the database; A classification module uses the LSTM-FCN algorithm to classify the industry to which the user belongs according to electricity consumption characteristics; A prediction module uses the N-BEATS algorithm to predict the electricity consumption data for a specific future time period based on the electricity consumption data for a specific input time period. The present invention provides a method for collecting and analyzing energy consumption from bottom-layer data collection to top-layer data analysis. At the same time, when analyzing energy consumption, a classification model is first established to classify the collected energy consumption sequences according to characteristics. On the basis of classification, a prediction model is established, and different prediction models are used for different types of users to predict energy consumption, improving accuracy, generalization, and interpretability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of electric energy consumption acquisition and analysis, and particularly relates to a method and system for electric energy consumption acquisition and analysis based on deep learning. Background Art

[0002] Currently, the main forms of market electricity prices include fixed electricity prices, ladder electricity prices, time-of-use electricity prices, real-time electricity prices, etc. The most commonly used electricity price form by electricity sales companies is the time-of-use electricity price. In the time-of-use electricity price, the electricity price varies with time periods in a day. The electricity price is higher during peak electricity consumption periods to guide users to reduce electricity loads, and lower during off-peak electricity consumption periods to encourage users to use electricity.

[0003] The electricity consumption characteristics of different types of users are different, and there are differences in electricity consumption, peak electricity consumption periods, and off-peak electricity consumption periods. Therefore, electricity sales companies formulating different time-of-use electricity price plans for different types of users can reasonably arrange electric energy resources and increase revenue at the same time.

[0004] In the process of formulating electricity prices, it is necessary to collect and analyze the electricity consumption behaviors of users. Most current energy consumption analysis systems only conduct energy consumption analysis for a certain special field or object. When the energy consumption data involves multiple fields with different characteristics, the effect of model analysis will be greatly reduced. Currently, electricity sales companies need a general electric energy acquisition and analysis model that can conduct energy consumption analysis for users with different characteristics. Summary of the Invention

[0005] The purpose of the present invention is to solve the problems in the background art, and provide a method and system for electric energy consumption acquisition and analysis based on deep learning. This method and system for electric energy consumption acquisition and analysis is an energy consumption acquisition and analysis system from bottom-layer data collection to top-layer data analysis. At the same time, when conducting energy consumption analysis, a classification model is first established to classify the collected energy consumption information according to characteristics. On the basis of classification, a prediction model is established, and different prediction models are used for different types of users to conduct energy consumption prediction, improving accuracy, generalization, and interpretability.

[0006] To achieve the above object, the first aspect of the present invention provides a method for electric energy consumption acquisition and analysis based on deep learning, including the following steps:

[0007] Step 1, obtain the energy consumption data of smart meters of users in several industries for a certain time period through a data collection device, including electricity consumption data, date, region, and weather data, and write them into a database;

[0008] Step 2, preprocess the data written into the database; the preprocessing is to eliminate abnormal data for the problem of data anomalies, and for the problem of data missing, slice the data according to the format of data required by the model to avoid the missing parts;

[0009] Step 3: Using the industry dimension as a label, input the four types of data, namely the preprocessed power consumption data, date, region, and weather data in Step 2, into the LSTM-FCN algorithm model as features respectively for model training, and use the trained LSTM-FCN algorithm model to classify the industries of energy consumption users based on the collected and input energy consumption data.

[0010] Step 4: Train the N-BEATS algorithm model with the obtained power data for specific time periods in different industries respectively, and obtain several N-BEATS algorithm models for different industries; according to the industry to which the users classified in Step 3 belong, input the collected power consumption data for a specific time period into the trained N-BEATS algorithm model of the corresponding industry to predict the power consumption data for a future specific time period.

[0011] Preferably, a certain time period in Step 1 is one year, and the energy consumption data collected from several industries with a sampling interval of 1 hour; the data acquisition device is a Raspberry Pi, which is connected to the electric meter through an RS485 bus and reads the data in the electric meter through the ModBus protocol; the Raspberry Pi obtains weather data from the Internet based on the area information of the electric meter, and stores the obtained power consumption data, date, region, and weather data in a MySQL database.

[0012] Preferably, when eliminating abnormal data in Step 2, for the data collected by each electric meter, the quartile method is used to judge whether the collected data is abnormal, as follows:

[0013] Sort the data collected by each electric meter from small to large. Q1, Q2, and Q3 are the 25%, 50%, and 75% numbers respectively after all the values in the sample are arranged from small to large. The threshold for abnormal value judgment is set as: upper threshold U = Q3 + 1.5 * (Q3 - Q1)

[0014] Lower threshold D = Q1 - 1.5 * (Q3 - Q1)

[0015] Data exceeding this threshold is abnormal data, and the abnormal data is deleted.

[0016] Preferably, the LSTM-FCN algorithm model includes an LSTM block, an FCN block, a connection layer, and a softmax layer; the LSTM block and the FCN block extract the features between the power consumption data and the covariates, and input the resulting tensor into the connection layer; the connection layer longitudinally connects the results of the LSTM block and the FCN block, and combines the features extracted by the two; the softmax layer converts the output result of the neural network and presents the output result in the form of probability, that is, divides the input data into the probability of a certain industry.

[0017] Preferably, the N-BEATS algorithm model is composed of a stack-block hierarchy; the stack contains multiple blocks, which predict the power consumption data for different interpretability; the block consists of a full convolution block and an interpretable calculation module, the full convolution block extracts the power consumption data features, and the interpretable calculation module calculates the predicted value of the interpretable aspect; the specific working steps are as follows:

[0018] S1: Input the residual of the previous block input and backward prediction;

[0019] S2: The input data first passes through 4 layers of full convolution to extract the features of the electricity consumption data;

[0020] S3: Perform interpretability calculation on the data output in step S2 to obtain predictions for the interpretation aspect;

[0021] Use polynomial fitting to fit the trend of time series. The fitting formula is:

[0022]

[0023] Use trigonometric functions to fit the seasonality of the time series. The fitting formula is:

[0024]

[0025] Where N is the highest order index of the polynomial, t is the time, is the output of the bth block of the fully convolutional layer in the sth stack, H represents the length of the time series, N hr is a hyperparameter.

[0026] The second aspect of the present invention provides an electric energy consumption collection and analysis system based on deep learning, including a server and a data collection device for collecting electric energy consumption data, the server including a database, a data preprocessing module, a classification module and a prediction module; the data collection device is used to obtain the energy consumption data of the smart meter and write it into the database; the data preprocessing module is used to preprocess the data stored in the database, and for the problem of data anomalies, the abnormal data is removed, and for the problem of data missing, the data is sliced according to the format of the data required by the model to avoid the missing parts; the classification module is a trained LSTM-FCN algorithm model, and the LSTM-FCN algorithm model classifies the energy consumption users by industry according to the collected energy consumption data; the prediction module is a plurality of trained N-BEATS algorithm models corresponding to the user types, and according to the results of the classification module, the collected electricity consumption data is input into the corresponding N-BEATS algorithm model to predict the electricity consumption data for a specific time period in the future.

[0027] Preferably, the electric energy consumption data includes power consumption data, date, region, and weather data; the data acquisition device is a Raspberry Pi, which is connected to the electric meter through an RS485 bus and reads the data in the electric meter through the Modbus protocol; the Raspberry Pi obtains weather data from the Internet according to the region information of the electric meter and stores the obtained power consumption data, date, region, and weather data in a MySQL database

[0028] Preferably, in step 2, the abnormal data is eliminated for the data collected by each electric meter. The quartile method is used to determine whether the collected data is abnormal, as follows:

[0029] Sort the data collected by each electric meter from small to large. Q1, Q2, and Q3 are the numbers at the 25%, 50%, and 75% positions respectively after all the values in the sample are arranged from small to large. The threshold for abnormal value judgment is set as: upper threshold U = Q3 + 1.5 * (Q3 - Q1)

[0030] Lower threshold D = Q1 - 1.5 * (Q3 - Q1)

[0031] The data exceeding this threshold is abnormal data, and the abnormal data is deleted

[0032] Preferably, the trained LSTM-FCN algorithm model uses the industry dimension as the label, and the preprocessed power consumption data, date, region, and weather data are used as features and input into the LSTM-FCN algorithm model for model training respectively; the LSTM-FCN algorithm model includes an LSTM block, an FCN block, a connection layer, and a softmax layer; the LSTM block and the FCN block extract the features between the power consumption data and the covariates and input the result tensor into the connection layer; the connection layer longitudinally connects the results of the LSTM block and the FCN block and combines the features extracted by the two; the softmax layer converts the output result of the neural network and presents the output result in the form of probability, that is, divides the input data into the probability of a certain industry

[0033] Preferably, the N-BEATS algorithm model is trained with the power data of specific time periods of different industries obtained; the N-BEATS algorithm model is composed of a stack-block hierarchical structure; the stack contains multiple blocks, and the power consumption data is predicted for different interpretability; the block is composed of a fully convolutional block and an interpretable calculation module. The fully convolutional block extracts the features of the power consumption data, and the interpretable calculation module calculates the predicted value of this interpretable aspect

[0034] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0035] 1. Use the Raspberry Pi data acquisition device to collect the user's power consumption and location information in real time, connect to the network to obtain relevant information such as weather, date, and region for real-time storage, with high data acquisition efficiency.

[0036] 2. Use the classification model to first classify the user types, and then establish several prediction models on the basis of the classification, so that users with similar characteristics use a set of prediction models for user power consumption prediction, improving the accuracy.

[0037] 3. Use an interpretable prediction model for power consumption prediction, break the black-box characteristics of traditional neural networks and prediction systems, and explain the prediction results to facilitate users to understand the reasons for the system to produce such results.

[0038] 4. The model finally generates the power consumption predictions of different types of users in a specific future time period, facilitating the power sales company to grasp the user power consumption situation, reasonably formulate electricity prices and reduce investment costs, and providing data reference for increasing revenue. Description of the Drawings

[0039] To more clearly illustrate the technical solutions of the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following description is only one embodiment of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0040] Figure 1 It is a flowchart of the power energy consumption acquisition and analysis method based on deep learning provided by the present invention.

[0041] Figure 2 It is a structure and flowchart for classifying energy consumption data using the LSTM-FCN algorithm provided by the present invention.

[0042] Figure 3 It is a structural decomposition diagram of the N-BEATS algorithm model provided by the present invention.

[0043] Figure 4 It is a schematic structural diagram of the power energy consumption acquisition and analysis system based on deep learning provided by the present invention. Detailed Embodiments

[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all 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 belong to the scope of the present invention.

[0045] Example 1:

[0046] The well-known technical content that forms the basis of the present invention and helps in understanding the present invention:

[0047] N-BEATS:

[0048] Neural basis expansion analysis for interpretable time series forecasting (N-BEATS) is a deep learning algorithm that can accurately predict time series while quickly training a neural network and achieving interpretability.

[0049] Interpretability means that N-BEATS decomposes the time series into trends and nodules while giving the prediction results, and analyzes the trend and cycle of data changes.

[0050] LSTM-FCN:

[0051] It is a multivariate time series classification model based on LSTM and FCN, which can maintain high performance while classifying multivariate time series.

[0052] Please refer to Figure 1 , the present invention provides a method for collecting and analyzing electric energy consumption based on deep learning, mainly including the following steps:

[0053] Step 1, obtain the energy consumption data of the smart meters of users in several industries for a certain period through a data collection device, including power consumption data, date, region, and weather data, and write them into a database;

[0054] Step 2, preprocess the data written into the database; for the problem of data anomalies, eliminate the abnormal data, and for the problem of data missing, slice the data according to the format required by the model to avoid the missing part;

[0055] Step 3, take the industry dimension as a label, and input the four types of data of the preprocessed power consumption data, date, region, and weather data in Step 2 into the LSTM-FCN algorithm model for model training respectively, and use the trained LSTM-FCN algorithm model to classify the industries of the users with energy consumption according to the collected input energy consumption data;

[0056] Step 4: Train the obtained power data for specific time periods in different industries on the N-BEATS algorithm model respectively to obtain several N-BEATS algorithm models for different industries; according to the industry to which the user belongs classified in Step 3, input the collected power consumption data for a specific time period into the trained N-BEATS algorithm model of the corresponding industry to predict the power consumption data for a future specific time period.

[0057] 1. Regarding Step 1:

[0058] The data acquisition device can be a Raspberry Pi. The Raspberry Pi is connected to the electricity meter using an RS485 bus and reads the data in the electricity meter through the Modbus protocol; the Raspberry Pi obtains weather data from the Internet based on the area information of the electricity meter and stores the obtained power consumption data, date, region, and weather data in a MySQL database. A certain time period in Step 1 is preferably one year, and the energy consumption data collected from several industries at a sampling interval of 1 hour.

[0059] 2. Regarding Step 2:

[0060] The collected data often has data anomalies and data missing situations:

[0061] For the data collected from each electricity meter, use the quartile method to determine whether the collected data is abnormal, as follows:

[0062] Sort the data collected from each electricity meter from smallest to largest. Q1, Q2, and Q3 are the 25%, 50%, and 75% numbers after all the values in the sample are arranged from smallest to largest.

[0063] The threshold for outlier judgment is set as:

[0064] Upper threshold U = Q3 + 1.5 * (Q3 - Q1)

[0065] Lower threshold D = Q1 - 1.5 * (Q3 - Q1)

[0066] Data exceeding this threshold is abnormal data, and the abnormal data is deleted.

[0067] The method for dealing with data missing situations is as follows: Slice the data to avoid the parts with missing data and ensure that the data input into the prediction model is continuous.

[0068] 3. Regarding Step 3:

[0069] The LSTM-FCN algorithm model includes an LSTM block, an FCN block, a connection layer, and a softmax layer. The LSTM block and the FCN block extract features between electricity consumption data and covariates, and input the resulting tensors into the connection layer. The connection layer vertically connects the results of the LSTM block and the FCN block, integrating the features extracted by both. The softmax layer converts the output results of the neural network and presents the output results in the form of probabilities, that is, dividing the input data into the probabilities of certain industries.

[0070] As Figure 2 shown, the steps for classifying energy consumption data using the LSTM-FCN algorithm are as follows:

[0071] Step 1: Input energy consumption data, including electricity data, date, region, and weather data.

[0072] Step 2: Process the input data using an LSTM (Long Short-Term Memory) block and an FCN (fully connected network) block respectively.

[0073] Specifically for the FCN block, the steps are as follows:

[0074] Step 1: (1) The electricity data first undergoes one-dimensional convolution to extract the features of the two-dimensional data matrix. (2) The data output by the one-dimensional convolution undergoes batch normalization and is activated using the relu function to complete data normalization and introduce non-linear factors. (3) The resulting data passes through an SE network (Squeeze-and-Excitation Networks) to enhance the model's sensitivity to features.

[0075] Step 2: Repeat Step 1.

[0076] Step 3: Repeat (1) and (2) in Step 1.

[0077] Step 4: Global pooling is performed on the data obtained in Step 3 to reduce information redundancy.

[0078] Specifically for the LSTM block, the steps are as follows:

[0079] Step 1: Dimension cleaning is performed on the input electricity data to process the data dimension.

[0080] Step 2: (1) The data obtained in Step 1 is input into the LSTM network for training. (2) The data output by the LSTM network enters the dropout layer to reduce overfitting.

[0081] Step 3: Connect the data output by the FCN block and the LSTM block.

[0082] Step 4: The data output from step 3 enters the softmax (flexible maximum transfer function) layer, converts the output of the neural network, and expresses the output in the form of a probability matrix, that is, the probability of the input data being divided into a certain industry. The probability matrix is the exponent of the natural base, and the largest value is taken, which is the final predicted classification. The category set includes education, medical care, manufacturing, public facilities, civil, office, etc.

[0083] The current time-of-use electricity price scheme still has a relatively broad classification of customer groups and cannot formulate specific electricity sales plans for specific industries. Formulating different time-of-use electricity prices for different industries can more accurately grasp the electricity consumption characteristics of the industry, reduce the investment and operating costs of the power grid, and ensure the safe and stable operation of the power grid.

[0084] The electricity consumption characteristics of different types of electricity users are different, which are closely related to factors such as weather, time, holidays, and regions. For example, electricity consumption will increase in cold weather, and electricity consumption of companies will decrease during holidays while that of residents will increase. The LSTM-FCN model establishes the relationship between electricity consumption and the above variables to determine which type of electricity user belongs to.

[0085] The training data used in this model is electricity data collected from multiple industries for a period of 1 year with a sampling interval of 1 hour, including date, electricity consumption, region, weather, and industry as the label dimension. The use of data with a span of 1 year is to ensure a comprehensive grasp of electricity consumption characteristics, so that the model can extract features such as hours, days, weeks, months, and quarters. Since the electricity consumption of various industries is closely related to multiple factors, the more influencing factors provided, the more accurate the classification. In order to improve the accuracy of classification while ensuring the privacy of users, the present invention selects several data with a large degree of influence and easy to obtain by power sales companies as the basis for classification, including time, electricity consumption, region, and weather.

[0086] The "industry" dimension of the data is used as a label, and other data is used as features to input into the model. In order to improve the training speed and reduce the use of memory, the data after exception processing is divided into suitable sizes and input into the model for training, capturing the relationship and features between the industry, data and each dimension, establishing a corresponding relationship, and continuously adjusting the model weight until the model converges. At this point, the model training is completed, and the generated model can be used to classify user types.

[0087] The test data input to the model must be in the same format as the input data, and the dimensions must be consistent. Divide the test data except "industry" into a size suitable for the model and input it into the model. The output of the model is the type of industry to which the data belongs.

[0088] 4. About step 4:

[0089] As Figure 3 shown, the N-BEATS algorithm model is composed of a stack-block hierarchical structure; the stack contains multiple blocks, which are used to predict power consumption data for different interpretive pairs; the block is composed of a fully convolutional block and an interpretable computing module. The fully convolutional block extracts the features of the power consumption data, and the interpretable computing module calculates the predicted value of this interpretable aspect.

[0090] On the basis of classifying users according to their power consumption characteristics, N-BEATS models with different parameters are trained for different categories to predict users' power consumption, ensuring the accuracy of the prediction.

[0091] N-BEATS consists of multiple stacks, and each stack contains multiple blocks.

[0092] The N-BEATS stack layer is as Figure 3 shown in Figure c in the middle, and the working steps are as follows:

[0093] Step 1: Input the power data that has been processed for anomalies and missing values.

[0094] Step 2: The input data passes through Stack 1 to obtain Prediction 1 and Residual 1. Residual 1 is the data that Stack 1 cannot process, and Prediction 1 is the prediction of the trend.

[0095] Step 2: The residual output from Step 1 is input into Stack 2 to obtain Prediction 2 and Residual 2. Prediction 2 is the prediction of seasonality.

[0096] Step 3: The predicted values output from the stack are added together to obtain the overall predicted value, that is, the prediction in two dimensions of trend and seasonality constitutes the overall prediction.

[0097] The block layer is as Figure 3 shown in Figure b in the middle, and the working steps are as follows:

[0098] Obtain the residual output of the previous unit. If it is the first block of the first stack, the input is the original data. The output is the forward prediction i and the backward prediction i. The prediction is the prediction of the trend / season, and the backward prediction is the prediction of past energy consumption. The sum of the backward prediction and the input residual is the information that cannot be processed.

[0099] The sum of the forward predictions of all blocks is the prediction of the stack to which the block belongs. The sum of the backward prediction of the last block and its input residual is the residual output of the stack to which it belongs.

[0100] Inside the block is as Figure 3 shown in Figure a in the middle, and the specific working steps are as follows:

[0101] Step 1: Input the residual of the input of the previous block and the backward prediction.

[0102] Step 2: The input data first undergoes 4 layers of fully convolutional operations to extract the features of the energy consumption data.

[0103] Step 2: Perform interpretability calculations on the data output in Step 2 to obtain predictions for this aspect of the interpretation.

[0104] Use polynomial to fit the trend of the time series, and the fitting formula is:

[0105]

[0106] Use trigonometric function to fit the seasonality of the time series, and the fitting formula is:

[0107]

[0108] where N is the exponent of the highest-order term of the polynomial, t is the time, is the output of the b-th block fully convolutional layer in the s-th stack, H represents the length of the time series, N hr is a hyperparameter.

[0109] The dataset used by the prediction model is the same as that used by the classification model, but the data needs to be sliced according to the prediction time step. For example, if predicting the electricity consumption at the 25th hour based on the data of the previous 24 hours, then a two-dimensional time data matrix with a length of 24 is used as the feature, and the electricity consumption at the 25th hour is used as the label to input into the prediction model for model training. When the model converges, the model training is completed, and the saved model can be used to predict the electricity consumption.

[0110] When using the model for prediction, the dimension of the input data needs to be consistent with the training dimension, and the data length is 24. The output of the model is the predicted electricity consumption at the 25th hour. At the same time, the model will also generate interpretations for the data during operation, calculate the seasonality, trend, etc. of the data, and can be displayed in the form of pictures to provide explanations for the results.

[0111] Example 2:

[0112] To implement the electric energy consumption acquisition and analysis method in Example 1, this example proposes a deep learning-based electric energy consumption acquisition and analysis system, as Figure 4As shown, it includes a server and a data acquisition device for collecting electric energy consumption data, the server includes a database, a data preprocessing module, a classification module and a prediction module; the data acquisition device is used to obtain the energy consumption data of the smart meter and write it into the database; the data preprocessing module is used to preprocess the data stored in the database, and for the problem of data anomaly, the abnormal data is removed, and for the problem of data missing, the data is sliced according to the format of the data required by the model to avoid the missing part; the classification module is a trained LSTM-FCN algorithm model, and the LSTM-FCN algorithm model classifies the energy consumption users by industry according to the collected energy consumption data; the prediction module is a plurality of trained N-BEATS algorithm models corresponding to the user types. According to the results of the classification module, the collected electricity consumption data is input into the corresponding N-BEATS algorithm model to predict the electricity consumption data in a specific time period in the future. The power consumption data includes power consumption data, date, region and weather data; the data acquisition device is a Raspberry Pi, which is connected to the meter using an RS485 bus and reads the data in the meter through the ModBus protocol; the Raspberry Pi obtains weather data from the Internet through the area information of the meter, and stores the obtained power consumption data, date, region and weather data in the MySQL database. The server displays the forecast data and information to the user through the user interface.

[0113] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0114] Although the above describes the specific implementation methods of the present invention, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A method for collecting and analyzing electric energy consumption based on deep learning, characterized in that, The following steps are involved: Step 1: Obtain energy consumption data of smart meters of users in several industries for a certain period of time through a data acquisition device, including power consumption data, date, region and weather data, and write them into a database; Step 2, preprocessing the data written into the database; The preprocessing is to remove abnormal data for data anomalies, and to slice the data according to the data format required by the model to avoid missing parts for data missing problems; Step 3: Take the industry dimension as a label, and input the electricity consumption data, date, region, and weather data preprocessed in step 2 as features into the LSTM-FCN algorithm model for model training. Use the trained LSTM-FCN algorithm model to classify energy consumption users by industry based on the collected energy consumption data. Step 4: The N-BEATS algorithm model is trained with the power data of different industries in specific time periods, and several N-BEATS algorithm models of different industries are obtained; according to the industry to which the user classified in step 3 belongs, the power consumption data of the specific time period collected is input into the trained N-BEATS algorithm model of the corresponding industry, and the power consumption data of the future specific time period is predicted; The N-BEATS algorithm model is composed of a stack-block hierarchy; the stack contains multiple blocks to predict electricity consumption data for different interpretations; The block consists of a full convolution block and an interpretable calculation module. The full convolution block extracts the characteristics of the power consumption data, and the interpretable calculation module calculates the predicted value of the interpretable aspect. The specific working steps are as follows: S1, input the residual of the previous block input and backward prediction; In S2, the input data first passes through 4 layers of full convolution to extract the features of the electricity consumption data; S3, performing interpretability calculation on the data outputted in step S2 to obtain a prediction for the interpretation aspect; Use polynomial fitting for the trend of the time series, and the fitting formula is: Use trigonometric functions to fit the seasonality of the time series. The fitting formula is: where N is the exponent of the highest-degree term of the polynomial, t is time, is the output of the b-th block full convolutional layer in the s-th stack, and H represents the length of the time series, is a hyperparameter.

2. The method for collecting and analyzing electric energy consumption based on deep learning according to claim 1, characterized in that: The time period in step 1 is one year, and the energy consumption data of several industries is collected with a sampling interval of 1 hour; the data collection device is a Raspberry Pi, and the Raspberry Pi is connected to the electric meter using an RS485 bus, and the data in the electric meter is read through the ModBus protocol; the Raspberry Pi obtains weather data from the Internet through the area information to which the electric meter belongs, and stores the obtained electricity consumption data, date, region and weather data in a MySQL database.

3. A method for collecting and analyzing electric energy consumption based on deep learning according to claim 1, characterized in that: In step 2, the abnormal data is eliminated for the data collected by each meter, and the quartile method is used to determine whether the collected data is abnormal. Specifically, the data collected by each meter is sorted from small to large, and Q1, Q2 and Q3 are the 25th, 50th and 75th percentile numbers of all the values in the sample after they are arranged from small to large. The threshold for abnormal value judgment is set as follows: the upper threshold U=Q3+1.5*(Q3-Q1) Threshold lower limit D = Q1-1.5*(Q3-Q1) Data exceeding this threshold is considered abnormal data and will be deleted.

4. A method for collecting and analyzing electric energy consumption based on deep learning according to claim 1, characterized in that: The LSTM-FCN algorithm model includes an LSTM block, an FCN block, a connection layer and a softmax layer; the LSTM block and the FCN block extract features between the power consumption data and the covariate, and input the result tensor into the connection layer; The connection layer vertically connects the results of the LSTM block and the FCN block, and combines the features extracted by the two blocks; the softmax layer converts the output results of the neural network and expresses the output results in the form of probability, that is, the probability of dividing the input data into a certain type of industry.

5. A power energy consumption acquisition and analysis system based on deep learning, characterized in that: Applied to the electric energy consumption collection and analysis method based on deep learning as claimed in claim 1; It includes a server and a data acquisition device for collecting electric energy consumption data, the server includes a database, a data preprocessing module, a classification module and a prediction module; the data acquisition device is used to obtain the energy consumption data of the smart meter and write it into the database; the data preprocessing module is used to preprocess the data stored in the database, and for the problem of data anomaly, the abnormal data is removed, and for the problem of data missing, the data is sliced according to the format of the data required by the model to avoid the missing part; the classification module is a trained LSTM-FCN algorithm model, and the LSTM-FCN algorithm model classifies the energy consumption users by industry according to the collected energy consumption data; the prediction module is a plurality of trained N-BEATS algorithm models corresponding to the user types, and according to the results of the classification module, the collected electricity consumption data is input into the corresponding N-BEATS algorithm model to predict the electricity consumption data in a specific time period in the future.

6. The power energy consumption acquisition and analysis system based on deep learning according to claim 5, characterized in that: The electric energy consumption data includes electricity consumption data, date, region and weather data; the data acquisition device is a Raspberry Pi, the Raspberry Pi and the electric meter are connected using an RS485 bus, and the data in the electric meter is read through the ModBus protocol; the Raspberry Pi obtains weather data from the Internet through the area information to which the electric meter belongs, and stores the obtained electricity consumption data, date, region and weather data in a MySQL database.

7. The power energy consumption acquisition and analysis system based on deep learning according to claim 5, characterized in that: The abnormal data is removed for the data collected by each meter, and the quartile method is used to determine whether the collected data is abnormal. Specifically, the data collected by each meter is sorted from small to large, and Q1, Q2 and Q3 are the 25th, 50th and 75th percentile numbers of all the values in the sample after they are arranged from small to large. The threshold for abnormal value judgment is set as follows: the upper threshold U=Q3+1.5*(Q3-Q1) Threshold lower limit D = Q1-1.5*(Q3-Q1) Data exceeding this threshold is considered abnormal data and will be deleted.

8. The power energy consumption acquisition and analysis system based on deep learning according to claim 5, characterized in that: The trained LSTM-FCN algorithm model uses the industry dimension as a label, and inputs four types of data, namely preprocessed power consumption data, date, region, and weather data, as features into the LSTM-FCN algorithm model for model training respectively; the LSTM-FCN algorithm model includes an LSTM block, an FCN block, a connection layer, and a softmax layer; the LSTM block and the FCN block extract features between the power consumption data and the covariates, and input the result tensor into the connection layer; The connection layer longitudinally connects the results of the LSTM block and the FCN block, and combines the features extracted by the two; the softmax layer converts the output result of the neural network and presents the output result in the form of probability, that is, divides the input data into the probability of a certain type of industry.

Citation Information

Patent Citations

  • Classification algorithm-based power consumption prediction method and prediction system

    CN112686473A

  • Short-term power load prediction method based on VMD-CNN-LSTM

    CN114529049A