Resident household electrical appliance electrical load prediction method and device based on deep learning, and medium

By building a multi-task prediction model, using modules such as Transformer, CNN, LSTM and MMoE, combined with self-supervised pre-training, supervision training and domain adaptation training, the problems of lack of data labels and data distribution differences in power load prediction in the existing technology are solved, and accurate prediction of the working status and load changes of power equipment are achieved, and the intelligence and refinement level of power scheduling is improved.

CN119965848APending Publication Date: 2025-05-09SOUTH CHINA UNIV OF TECH
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510083066.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

The existing deep learning-based electricity load prediction methods for household appliances have problems such as lack of data labels, significant data distribution differences, and difficulty in predicting the device activation status and load usage simultaneously. Especially during peak electricity consumption, it is difficult to accurately identify the equipment that contributes the most to peak load.

Method used

A multi-task prediction model based on modules such as Transformer, CNN, LSTM and MMoE is adopted. Through three-stage strategies of self-supervised pre-training, supervised training and domain adaptation training, key information in long and short time of historical power consumption data is extracted, and the working status and load changes of power consumption equipment are dynamically adapted to different scenarios, and the working status and load changes of power consumption equipment are accurately predicted.

Benefits of technology

It improves the accuracy of load prediction and the migration capability of the model, can effectively identify the correlation between the dynamic equipment activation and load use, accurately implement peak-cutting and valley filling strategies, and helps virtual power plants to achieve intelligent and refined power scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119965848A_ABST
    Figure CN119965848A_ABST
Patent Text Reader

Abstract

The invention discloses a resident household electrical appliance electrical load prediction method and device based on deep learning, and a medium. The method comprises the steps of collecting resident user electrical appliance load data; constructing a training set according to the collected data; building a multi-task prediction model with a long-time and short-time view field based on deep learning, wherein the multi-task prediction model is used for predicting whether electric equipment works or not and predicting an electric load of the equipment; designing a three-stage training strategy of the multi-task prediction model, and training the model by adopting the training set; and using the trained multi-task prediction model to predict the working state and the electrical load of each electrical device of each resident user accessed to the virtual power grid in a future short period. According to the method, the multi-task prediction model is established, the long-time and short-time key information of the historical power consumption data can be efficiently extracted through the three-stage strategy training model, and the method has the multi-task associated feature extraction capability, dynamically adapts to different scenes and accurately predicts the working state and load change of the power consumption equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of virtual power grid and artificial intelligence, and in particular to a method, device and medium for predicting household electrical appliance load based on deep learning. Background Art

[0002] As the contradiction between electricity supply and demand intensifies, the "instantaneous balance" characteristics of the power system have put forward higher requirements for the operation of the power grid. The user's electricity demand fluctuates significantly, and power plants need to reserve a high amount of power supply capacity to meet peak demand. However, most of the time, it is difficult to operate at full load, resulting in waste of resources and economic losses. Against this background, virtual power plants came into being. By aggregating distributed energy, controllable loads and energy storage resources, virtual power plants can play the role of physical power plants without increasing resource consumption, while improving the clean energy absorption capacity and power plant operation efficiency.

[0003] Household appliances are an important source of load on the user side. High-energy-consuming equipment such as air conditioners and electric water heaters account for a particularly large proportion during peak electricity consumption periods. Currently, there are insufficient means of regulation and demand response for household appliances, and the threshold for users to participate in electricity load regulation is high. Virtual power plants combine the automation control and power forecasting technology of smart appliances, optimize the electricity consumption behavior of household appliances through a unified dispatching platform, effectively reduce the peak pressure of the power grid, and achieve peak shaving and valley filling.

[0004] To achieve efficient power dispatching and energy saving and peak shaving, accurate prediction of the changing trend of residents' electricity consumption behavior is a key link. In recent years, the rapid development of deep learning technology has provided more possibilities for user power load forecasting. Among them, recurrent neural network (RNN) and long short-term memory network (LSTM) perform well in processing time series data, while convolutional neural network (CNN) can extract the electricity consumption behavior patterns of residential users. However, there are still some urgent problems to be solved in the existing prediction methods based on deep learning. First, some methods rely on cumbersome data processing. In order to train deep learning models, a large amount of electricity consumption data needs to be labeled, which is usually time-consuming, labor-intensive and costly. Secondly, the existing data sources are mostly lagging data in government or power grid company reports, which usually only contain simple information about equipment type and power load, or come from small-scale statistics in a specific area. The data range and granularity of traditional prediction methods are small, and the generalization ability of the model is limited. It is difficult to adapt to the changing power load forecasting needs, fails to fully consider the changes of equipment at different times and in different environments, and does not conform to the characteristics of the current rapid changes in the types and grades of smart home appliances.

[0005] With the emergence of big data platforms, virtual power plants can collect more detailed and diverse electricity consumption data, providing new opportunities for personalized electricity load forecasting. Networked devices can provide real-time data, including device power consumption, working hours, user attributes, weather conditions, etc., which can help prediction models more accurately capture the power consumption patterns of devices. For some traditional devices that cannot be connected to the Internet, smart environmental sensors can also indirectly infer their power load by monitoring changes in the surrounding environment, further filling the data gap.

[0006] However, in the face of the complex electricity consumption behavior of residential users, different electricity consumption devices and scenarios vary significantly. The existing network is mostly a single task modeling, which makes it difficult to predict the device activation status and load usage at the same time. Especially during peak electricity consumption, existing methods are difficult to accurately identify the devices that contribute the most to the peak load, and the peak shaving strategy lacks pertinence. At the same time, load forecasting fails to fully combine user electricity consumption habits, limiting the personalized power dispatch and efficient peak shaving and valley filling capabilities of virtual power plants. The lack of labeled data and data distribution differences in load forecasting tasks are also particularly prominent, especially when facing new equipment or new regions, the model often lacks sufficient labeled data, resulting in a significant decrease in prediction performance. Although existing methods use historical data for training, the regional limitations of data sources and device differences make it difficult for the model to maintain stable performance in a new electricity consumption environment. For example, smart home device data collected in a certain area may not be directly used to predict electricity consumption behavior in other areas or new devices. New data for some devices usually lack clear label information, which makes it difficult for the model to be directly applied to actual scenarios through traditional supervised learning methods.

[0007] In summary, the current power dispatching of residential users' electrical equipment faces many problems such as difficulty in accurately predicting diversified power demand, lack of data labels, and significant differences in data distribution. It is difficult to effectively adapt to the current diversified and dynamic power consumption scenarios, especially during peak load periods. Existing methods are difficult to effectively identify the correlation between equipment activation dynamics and load usage, and cannot accurately implement peak shaving and valley filling strategies. Therefore, it is urgent to study data-driven technologies that can efficiently extract multi-task correlation features and dynamically adapt to different scenarios, so as to improve the accuracy of load forecasting and the migration capability of the model, thereby achieving smarter and more refined power dispatching. Summary of the invention

[0008] In order to solve at least one of the technical problems existing in the prior art to a certain extent, the purpose of the present invention is to provide a method, device and medium for predicting residential household electrical load based on deep learning field adaptation for virtual power plants.

[0009] The first technical solution adopted by the present invention is:

[0010] A method for predicting household electrical appliance load based on deep learning, comprising the following steps:

[0011] Collect residential users' electrical equipment load data based on the big data platform;

[0012] Construct a training set based on the collected data;

[0013] Build a multi-task prediction model based on deep learning with long and short time horizons to predict whether the electrical equipment is working and predict the power load of the equipment; wherein the multi-task prediction model includes: a Transformer-based feature extractor, a CNN-based long-term trend extraction module, an LSTM-based short-term trend extraction module, an MMoE (Multi-gate Mixture of Experts)-based multi-task prediction branch, and a domain adaptation branch for transfer learning;

[0014] A three-stage training strategy for the multi-task prediction model is designed, and the model is trained using a training set; the three-stage training strategy includes a self-supervised pre-training stage, a supervised training stage, and a domain adaptation training stage;

[0015] The trained multi-task prediction model is used to predict the working status and power load of each electrical equipment of each residential user connected to the virtual power grid in the short term in the future.

[0016] Furthermore, constructing a training set based on the collected data includes:

[0017] Integrate the collected user and electrical equipment load data based on timestamps;

[0018] Adopting the intermittent sampling method, a record of data is sampled at every preset time interval of the integrated data to form a data set;

[0019] The sampled data with time series characteristics is divided into multiple samples of fixed length, each of which includes historical data of a certain time step and label data of the next few steps; among them, the historical data is used as a training sample, and the label data records the equipment status and power load as a training label.

[0020] Furthermore, the Transformer-based feature extractor includes an encoder and a decoder;

[0021] Both the encoder and decoder consist of a multi-head self-attention and a feedforward neural network with a residual structure. Since the sample sequence is often long, the sample sequence is divided into N subsequences of equal length, and the multi-head self-attention learns the dependencies and context information between each subsequence. The feedforward neural network consists of two fully connected layers and a ReLU activation function to enhance the model's expressiveness.

[0022] Among them, the decoder is only used in the training phase to process the representation of the encoder output and reconstruct the original N subsequences; reconstruction is performed in a self-supervised manner, that is, training is achieved by comparing the error between the decoder output and the original input subsequence.

[0023] Furthermore, the CNN-based long-term trend extraction module realizes local perception and weight sharing characteristics through one layer of diffusion convolution with gradually increasing diffusion degree, and extracts and analyzes the long-term trend in the features output by the encoder of the feature extractor;

[0024] The LSTM-based short-term trend extraction module adopts a two-layer LSTM to handle the short-term dependency problem in time series data; the LSTM selectively memorizes and forgets information through a gating mechanism, thereby capturing the state changes and load fluctuations of electrical equipment in the short term; the short-term trend extraction module targets the last subsequence of the N subsequences after equal-length division, that is, the most recent historical data.

[0025] Furthermore, the MMoE-based multi-task prediction branch is a multi-task learning model, which processes tasks at different angles in parallel through multiple expert networks, and then two gating networks perform weighted combination of the outputs of the expert networks according to the requirements of the task, thereby realizing the simultaneous performance of two prediction tasks of whether the electrical equipment is working and the power load.

[0026] Furthermore, the domain adaptation branch includes a GRL (Gradient Reversal Layer) layer and a domain classification prediction head; the goal of domain adaptation is to achieve knowledge transfer from the source domain to the target domain through GRL; GRL does not work during forward reasoning of domain adaptation training, but reverses the gradient here during back propagation, making the training process of the domain classification prediction head difficult.

[0027] Furthermore, in the self-supervised pre-training stage, only the Transformer-based feature extractor is trained; by blocking the input sequence, the encoder is allowed to extract context information from the unblocked part for the decoder to complete the task of reconstructing the input data, forcing the model to mine the potential features and structures in the data; after the pre-training is completed, the encoder will have good representation learning capabilities;

[0028] In the supervised training phase, the training goal is to perform load forecasting and equipment status forecasting based on historical power consumption data, involving multi-task learning based on MMoE;

[0029] In the domain adaptation training phase, by training the multi-task prediction branch and the domain adaptation branch, the multi-task prediction model can automatically adjust parameters to adapt to the distribution characteristics of new data.

[0030] Furthermore, the loss function of the multi-task prediction model is constructed as follows:

[0031] In the self-supervised pre-training stage, the mean square error is used to measure the difference between the input and the reconstruction result:

[0032]

[0033] Where, X i is the ith subsequence of the input, is the i-th subsequence after reconstruction; N is the total number of subsequences; ‖‖ 2 Represents the square of the L2 norm of the error tensor;

[0034] In the supervised training phase, based on the multi-task learning part of MMoE, the model needs to complete two prediction tasks at the same time: predicting whether the electrical equipment is in working state and predicting the specific power load; the first task uses binary cross entropy loss:

[0035]

[0036] In the formula, y i is the working label of the future time period of the i-th sample, is the working status predicted by the i-th sample; B is the total number of samples in one training iteration;

[0037] The second task uses mean squared error loss:

[0038]

[0039] In the formula, z i is the power load label of the future time period of the i-th sample, is the predicted power load of the i-th sample;

[0040] Therefore, in the supervised training phase, the model does not consider the domain adaptation branch, and the training loss is the weighted sum of the two losses:

[0041] L1=λ work L work +λ load L load

[0042] In the formula, λ work , load Weight hyperparameters for working state prediction loss and power load prediction loss;

[0043] In the domain adaptation task, a domain classifier is used. The domain classifier determines whether the data comes from the source domain or the target domain based on the input features. The domain classification task uses a binary cross entropy loss:

[0044]

[0045] Where, d i is the domain label of the ith sample, is the predicted domain classification result of the i-th sample;

[0046] Therefore, in the domain adaptation training phase, the training loss is:

[0047] L2=L domain +λ work L work +λ load L load .

[0049] The second technical solution adopted by the present invention is:

[0050] An electronic device comprises a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a method for predicting residential household appliance power load based on deep learning as described above.

[0051] The third technical solution adopted by the present invention is:

[0052] A computer-readable storage medium, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a method for predicting residential household appliance power load based on deep learning as described above.

[0053] The fourth technical solution adopted by the present invention is:

[0054] A computer program product or a computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above method.

[0055] The beneficial effects of the present invention are as follows: the present invention has built a multi-task prediction model including modules such as Transformer, CNN, LSTM and MMoE. Through the three-stage strategy training model of self-supervised pre-training, supervised training and domain adaptation training, it can efficiently extract key information of historical electricity consumption data in the long and short periods of time, and has the ability to extract multi-task related features, dynamically adapt to different scenarios, and accurately predict the working status and load changes of power equipment. The present invention can also effectively solve problems such as lack of data labels and distribution differences, and improve the accuracy of load prediction and model migration capabilities. The present invention can be applied to the field of virtual power grids, helping virtual power plants to achieve intelligent and refined power dispatching, and is suitable for efficient and accurate peak shaving tasks. It is of great significance to improve the operating efficiency of the power system and promote the consumption of clean energy. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the embodiments of the present invention or the drawings of related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0057] Figure 1 This is a flowchart of the steps of a method for predicting household electrical appliance load based on deep learning in an embodiment of the present invention;

[0058] Figure 2 This is a complete hybrid model structure diagram including Transformer, CNN, and LSTM in an embodiment of the present invention;

[0059] Figure 3 The structure diagram of the Encoder and Decoder based on Transformer in the embodiment of the present invention;

[0060] Figure 4 Schematic diagram of a one-dimensional layer-by-layer diffusion convolution for a long-term trend extraction module in an embodiment of the present invention;

[0061] Figure 5 This is a branch structure diagram of power equipment behavior prediction based on MMoE multi-task learning in an embodiment of the present invention;

[0062] Figure 6 This is a flow chart of the three-stage training strategy of the deep learning model in an embodiment of the present invention. DETAILED DESCRIPTION

[0063] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0064] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0065] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0066] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0067] Example 1

[0068] like Figure 1 As shown, this embodiment provides a method for predicting household electrical appliance load based on deep learning, comprising the following steps:

[0069] S1. Collect residential users’ electrical equipment load data based on the big data platform.

[0070] As an optional implementation, the big data platform is Midea's big data platform, which supports efficient and diversified data collection and multiple transmission protocols. It can not only collect real-time power and environmental information of networked home appliances, but also estimate the power of devices that cannot be connected to the Internet through environmental parameters. It should be noted that the present invention is not limited to Midea's big data platform, and other big data platforms are also applicable to the method of the present invention.

[0071] Specifically, this embodiment uses Midea's big data platform as the infrastructure for data collection and processing. The platform has powerful data integration capabilities and can collect and integrate massive data from a variety of devices and sensors. The platform supports a variety of data transmission protocols, including TCP, FTP, HTTP / HTTPS, etc., and can collect real-time power data and related environmental information from various networked home appliances.

[0072] Among them, networked devices use the power meter module to report power at the minute level, and the real-time reporting results are sent to the data center for integration and scheduling. For devices that cannot connect to the Internet, the platform will estimate power based on the environmental parameters they report to ensure the comprehensiveness and accuracy of the data.

[0073] S2. Build a training set based on the collected data.

[0074] Integrate the residential users' electrical equipment load data and data with certain correlation, and further process them to form a data set suitable for network training.

[0075] In some embodiments, during the data integration and processing process, the platform accurately sorts and archives the load data of each user and each of their devices according to the timestamp to ensure the integrity and consistency of the data. The big data platform can not only collect load data, but also a lot of related data that may affect the power consumption behavior of the equipment at that time. In order to reduce the redundancy of the data and improve the efficiency and accuracy of subsequent model training, the platform intermittently samples the data into a data set, and the sampling frequency is set to collect a record every 30 minutes. The data of each record includes but is not limited to the following aspects: user attributes (user region, family type), device data (device status, device type, power load), time attributes (activation time, operation time, quarterly information), and environmental factors (temperature, humidity).

[0076] In the dataset, in order to train the model, the sampled data with time series characteristics needs to be divided into multiple samples of fixed length, each sample including historical data of a certain time step and label data of the next few steps.

[0077] Specifically, through division, a sample has a time step of T length. In the present invention, the first L length part of the T length sequence is recorded as a training sample, and the remaining F (F = TL) length part of the device state (0 or 1) and power load (specific value) are recorded as training labels. Since the scenario targeted by this embodiment is the prediction of the device working state and power load when the peak load shaving task needs to be performed during the peak period of power consumption, which is a future short-term prediction, this embodiment sets L:F = 9:1, and the various data recorded in the first part are used as training samples, and the device state and power load recorded in the latter part are used as training labels.

[0078] In order to meet the training requirements of deep learning models, a record will be processed into a tensor x = [x1, x2, ..., x M ], M represents the number of features related to the load of electrical equipment, referring to the data contained in a record. Therefore, a sample of electrical equipment with time series characteristics is represented by X = [x1, x2, …, x L ], a batch of electrical equipment load data can be expressed as Where B represents the number of batch samples.

[0079] S3. Build a multi-task prediction model based on deep learning with long and short time horizons to predict whether the electrical equipment is working and predict the power load of the equipment; wherein the multi-task prediction model includes: a Transformer-based feature extractor, a CNN-based long-term trend extraction module, an LSTM-based short-term trend extraction module, an MMoE-based multi-task prediction branch, and a domain adaptation branch for transfer learning.

[0080] This embodiment adopts a hybrid model approach, including a Transformer-based feature extractor, a CNN-based long-term trend module, and an LSTM-based short-term trend extraction module, which can simultaneously capture short-term and long-term dependencies in time series data. In addition, the network also handles multi-task learning through the MMoE expert network, realizes the selection of expert predictions through the weighting of the gating network, and the domain adaptation branch to improve the generalization ability of the model so that the model can be immediately adapted to new usage environments.

[0081] Since the data can be a long sequence sampled every 30 minutes over a span of dozens of weeks, the long sequence is divided into multiple subsequences of equal length to reduce the network burden and also fit the input format of the Transformer. Specifically, the original input data size is (B, L, M), and this long sequence is divided into multiple subsequences of equal length, each subsequence is of length S, so there are a total of The network model with a complete structure is shown in the attached Figure 2 As shown, it includes the following parts:

[0082] (1) Feature Extractor

[0083] The Transformer-based feature extractor aims to extract global and fine-grained features from the power load data obtained by long-term sampling. The Transformer's multi-head self-attention mechanism allows the model to perceive the correlation between global information in the time series dimension and various factors affecting power load prediction in the feature dimension by adding position encoding. The structure of the feature extractor is shown in the attached figure. Figure 3 shown.

[0084] Specifically, by adding learnable positional encoding, the model can process the temporal order information of each subsequence in the input. Both the Encoder (i.e., encoder) and the Decoder (i.e., decoder) consist of a multi-head self-attention and a feedforward neural network, and have a residual structure. The multi-head self-attention will learn the dependencies between each subsequence, and the feedforward neural network consists of two fully connected layers and a ReLU activation function to enhance the model's expressiveness. Among them, the Decoder is only used to process the representation of the Encoder output during the training phase and reconstruct the original N subsequences. Reconstruction is performed in a self-supervised manner, that is, training is achieved by comparing the error between the Decoder output and the original input subsequence.

[0085] (2) Long-term trend extraction module

[0086] The long-term trend extraction module is responsible for capturing long-term electricity consumption habits. It processes time series data through three layers of layer-by-layer diffusion convolution. Specifically, this module uses a one-dimensional convolution Conv1d to perform convolution in the time dimension. The diffusion degrees of the three layers of convolution are dilation = 1, 2, and 4, respectively. The receptive field is expanded by gradually increasing the diffusion degree to better learn the trend over a long period of time. Each layer of convolution is followed by a one-dimensional maximum pooling MaxPooling1d. This pooling layer can effectively reduce the data dimension and avoid overfitting. The long-term trend extraction module targets the features obtained through Transformer learning representation. The one-dimensional layer-by-layer diffusion convolution in the long-term trend extraction feature based on CNN is shown in the attached figure. Figure 4 shown.

[0087] (3) Short-term trend extraction module

[0088] The short-term trend extraction module is used to capture the recent historical load trend in a relatively short period of time, which is particularly important for predicting the load during the peak-shaving period. Specifically, this module is implemented through a 2-layer LSTM (Long Short Term Memory Network), which can extract fine-grained time series information and remember historical states. The short-term trend extraction module targets the last subsequence of the N subsequences that have just been divided into equal lengths, that is, the recent historical data.

[0089] (4) Multi-task prediction branch based on MMoE

[0090] The prediction output of the network model involves two tasks: predicting whether the device is working and predicting the power load value of the device. Therefore, the MMoE (Multi-gate Mixture of Experts) structure is used for multi-task learning. The MMoE framework consists of three parts: gate network, expert network and task tower. The MMoE framework is shown in the attached figure. Figure 5 shown.

[0091] Specifically, the gating network selects appropriate experts for task prediction based on the input data through dynamic weight allocation. Each expert network is responsible for extracting knowledge from different angles from the shared features, and contributes to the prediction task from different angles. For example, it may focus on analyzing time series characteristics (such as the time pattern of electricity consumption: the difference between day and night, peak and trough), it may focus on equipment characteristics (such as the periodic electricity consumption characteristics of air conditioners and electric water heaters), and it may focus on user attributes (such as the impact of different family sizes and regional climates on electricity consumption). The task tower is the task prediction head, which makes the final prediction based on the output of the expert network.

[0092] In each of the parts, the gated network is a fully connected layer, the output dimension is equal to the number of experts, and the weights used to weight the prediction results of each expert are obtained through Softmax calculation; the expert network is composed of two layers of MLP, including ReLU to increase the feature expression ability; the task tower is composed of two layers of fully connected layers, and the output results are two-classification results (equipment working status) and a regression value (equipment power load prediction). In the present invention, the number of gated networks is equal to the number of task towers and the number of prediction tasks, so it is set to 2. The number of expert networks is a hyperparameter, which is set to 4 in order to increase feature expression without overfitting.

[0093] (5) Domain Adaptation Branch

[0094] In order to enhance the generalization ability of the model, this embodiment introduces a domain adaptation branch to learn domain adaptation tasks. The domain adaptation branch includes a GRL (Gradient Reversal Layer) layer and a domain classification prediction head. The goal of domain adaptation is to achieve knowledge transfer from the source domain to the target domain through GRL.

[0095] GRL does not work during forward inference of domain adaptation training, but reverses the gradient here during backpropagation, making the training process of the domain classification prediction head difficult. The model's errors in the source and target domains become similar, which forces the feature extractor to learn features that are domain invariant.

[0096] S4. Design a three-stage training strategy for the multi-task prediction model and use the training set to train the model; the three-stage training strategy is a self-supervised pre-training stage, a supervised training stage, and a domain adaptation training stage.

[0097] (1) Self-supervised pre-training stage

[0098] See also Figure 6, the self-supervised pre-training is only for training the Transformer-based feature extractor. It can quickly use rich electricity consumption data for self-supervised training without time-consuming and labor-intensive label production. By blocking 50% of the input sequence, the Encoder extracts contextual information from the unblocked part for the Decoder to complete the task of reconstructing the input data, forcing the model to explore the potential features and structures in the data. After pre-training is completed, the Encoder will have good representation learning capabilities.

[0099] Specifically, in the self-supervised pre-training stage, the training goal is to use rich data related to electrical equipment to learn the representation of the Transformer-based feature extractor, which involves the reconstruction of the Transformer's Encoder-Decoder structure. After the self-supervised pre-training is completed, the Transformer's Encoder will have good feature extraction capabilities, and the weights of the subsequent training Encoder will be frozen and the Decoder will be removed.

[0100] In the reconstruction task, the input sequence will first be occluded at a ratio of 50%, and then position codes will be added to each subsequence. The Encoder will only input the unoccluded subsequence, and the obtained feature output will be arranged according to the previous position code and input into the Decoder. Since the features of the occluded part are missing, the Decoder will force the Encoder to analyze the features with contextual information from the visible sequence, so that the original information of the input sequence can be reconstructed. The reconstruction loss uses the mean square error (MSE) to measure the difference between the input and the reconstruction result, and the formula is as follows:

[0101]

[0102] Where, X i is the ith subsequence of the input, is the i-th subsequence after reconstruction.

[0103] (2) Supervised training phase

[0104] See also Figure 6 In the supervised training phase, the model's load and equipment status prediction capabilities are mainly trained based on historical data. This process involves MMoE multi-task learning. MMoE multi-task learning enables the model to learn multiple related tasks at the same time. Experts share input features but have different contribution angles. The contribution of each internal expert network is weighted through the gating network to improve the learning efficiency and prediction performance of the model.

[0105] Specifically, in the supervised training phase, the training goal is to perform load forecasting and device status forecasting based on historical power consumption data, involving multi-task learning based on MMoE. The data used include user attributes, device data, time information, and environmental factors, which help the model learn accurate load forecasting capabilities and provide a good initialization foundation for the subsequent domain adaptation training phase.

[0106] In the multi-task learning part based on MMoE, the model needs to complete two prediction tasks at the same time: predicting whether the electrical equipment is in working state and predicting the specific power load. The first task uses binary cross entropy loss:

[0107]

[0108] In the formula, y i is the working label of the future time period of the i-th sample, is the working status predicted by the i-th sample.

[0109] The second task uses mean squared error loss:

[0110]

[0111] In the formula, z i is the power load label of the future time period of the i-th sample, is the predicted power load of the ith sample. Therefore, in the supervised training phase, the network does not consider the domain adaptation branch, and the training loss is the weighted sum of the two losses:

[0112] L1=λ work L work +λ load L load

[0113] (3) Domain Adaptation Training Phase

[0114] See also Figure 6 In the domain adaptation training phase, the MMoE prediction branch and the domain adaptation branch are trained for the new domain data. The new domain data often differs from the training data in distribution, which may lead to a decrease in the performance of the model on the new data. Through domain adaptation training, the model can automatically adjust parameters to adapt to the distribution characteristics of the new data, thereby maintaining stable prediction performance, so that the virtual grid has good generalization capabilities for the power dispatch of residential electrical equipment in different scenarios.

[0115] Specifically, in the domain adaptation training phase, this phase mainly deals with the problem of new domain data, especially when the virtual power plant is connected to a new region, device or environment, the sample size may be small and the internal characteristics (such as device type, seasonal information, etc.) may change. The goal of the model is to enable the trained network to better adapt to the differences in data distribution in different regions, devices or time periods, so the training involves multi-task learning and domain adaptation tasks based on MMoE. The input data includes source domain electricity consumption data with rich collection and prediction history, and newly added target domain data with new data distribution. Simply add domain labels (0 or 1) to the two parts of the data.

[0116] In the MMoE-based multi-task learning part, the loss is still L work and L load .

[0117] In the domain adaptation task, a domain classifier is used to reduce the distribution difference between the source domain and the target domain data through the GRL domain adaptation branch. During the domain adaptation training, the domain classifier determines whether the data comes from the source domain or the target domain based on the input features. The domain classification task uses a binary cross entropy loss:

[0118]

[0119] Where, d i is the domain label of the ith sample, is the predicted domain classification result of the i-th sample.

[0120] Therefore, in the domain adaptation training phase, the training loss is:

[0121] L2=L domain +θ work L work +λ load L load

[0122] S5. Use the trained multi-task prediction model to predict the working status and power load of each electrical equipment of each residential user connected to the virtual power grid in the short term in the future.

[0123] Specifically, the trained network removes the Transformer's Decoder and domain adaptation branches, retaining a network structure that can fully meet the prediction needs, which can reduce the network's reasoning burden and more efficiently achieve instant power consumption behavior prediction. For devices connected to the virtual power grid, the network can predict the working status and power load of future time periods based on historical data of a certain length of time.

[0124] In summary, in the context of prominent contradictions between electricity supply and demand, although virtual power plants have emerged, the regulation of household electricity consumption still faces many difficulties. Traditional prediction methods rely on cumbersome data processing, with limited data sources and small granularity, making it difficult to adapt to complex and changeable electricity consumption scenarios, and there are significant problems in label data and data distribution. The present invention provides a method for predicting household electricity load based on deep learning domain adaptation for virtual power plants. It collects residential electrical equipment data based on Midea's big data platform, integrates multi-dimensional related data and intermittently samples to form a data set. A multi-task prediction network including modules such as Transformer, CNN, LSTM and MMoE is built, and the model is trained through a three-stage strategy of self-supervised pre-training, supervised training and domain adaptation training. Efficiently extract the correlation features between different electricity consumption tasks, and dynamically adjust the feature weights to adapt to diversified electricity consumption scenarios, accurately predict the working status of electrical equipment and the trend of electricity load changes, and help virtual power plants achieve intelligent and refined power dispatching.

[0125] Example 2

[0126] An embodiment of the present invention further provides an electronic device, the electronic device comprising a processor and a memory, the memory storing at least one instruction, at least one program, a code set or an instruction set, the at least one instruction, the at least one program, the code set or the instruction set being loaded and executed by the processor to implement the following Figure 1 A method for predicting residential household electricity load based on deep learning is shown.

[0127] It is understood that the memory may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory may be used to store instructions, programs, codes, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data created according to the use of the server, etc.

[0128] The processor may include one or more processing cores. The processor uses various interfaces and lines to connect the various parts of the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. Optionally, the processor can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor can integrate one or a combination of a central processing unit (CPU) and a modem. Among them, the CPU mainly processes the operating system and application programs; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor, but implemented separately through a chip.

[0129] Since the electronic device is an electronic device corresponding to a method for predicting household appliance power load based on deep learning in an embodiment of the present invention, and the principle of solving the problem by the electronic device is similar to that of the method, the implementation of the electronic device can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.

[0130] Example 3

[0131] The embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by a processor to implement the following Figure 1 A method for predicting residential household electricity load based on deep learning is shown.

[0132] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0133] Since the storage medium is a storage medium corresponding to a method for predicting household appliance power load based on deep learning in an embodiment of the present invention, and the principle of solving the problem by the storage medium is similar to that of the method, the implementation of the storage medium can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.

[0134] Example 4

[0135] In some possible implementations, various aspects of the method of the embodiment of the present invention may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of a method for predicting household electrical load based on deep learning according to various exemplary embodiments of the present application described above in this specification. Among them, the executable computer program code or "code" for executing each embodiment may be written in a high-level programming language such as C, C++, C#, Smalltalk, Java, JavaScript, Visual Basic, structured query language (e.g., Transact-SQL), Perl, or in various other programming languages.

[0136] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0137] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0138] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable ordinary technicians in the field to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made based on the essence of the content of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for predicting household electrical appliance load based on deep learning, characterized in that: The following steps are involved: Collect residential users' electrical equipment load data based on the big data platform; Construct a training set based on the collected data; Build a multi-task prediction model based on deep learning with long and short time horizons to predict whether the electrical equipment is working and predict the power load of the equipment; wherein the multi-task prediction model includes: a Transformer-based feature extractor, a CNN-based long-term trend extraction module, an LSTM-based short-term trend extraction module, an MMoE-based multi-task prediction branch, and a domain adaptation branch for transfer learning; A three-stage training strategy for the multi-task prediction model is designed, and the model is trained using a training set; the three-stage training strategy includes a self-supervised pre-training stage, a supervised training stage, and a domain adaptation training stage; The trained multi-task prediction model is used to predict the working status and power load of each electrical equipment of each residential user connected to the virtual power grid in the short term in the future.

2. According to a method for predicting household electrical appliance load based on deep learning according to claim 1, it is characterized in that: The step of constructing a training set based on the collected data includes: Integrate the collected user and electrical equipment load data based on timestamps; An intermittent sampling method is adopted to sample a record of the integrated data at a preset time interval to form a data set; the sampled data with time series characteristics is divided into multiple samples of fixed length, each sample includes historical data of a certain time step and label data of the next few steps; among them, the historical data is used as a training sample, and the label data records the equipment status and power load as a training label.

3. The method for predicting household electrical appliance load based on deep learning according to claim 1, characterized in that: The Transformer-based feature extractor includes an encoder and a decoder; Both the encoder and decoder are composed of a multi-head self-attention and a feedforward neural network with a residual structure; the sample sequence is divided into N subsequences of equal length, and the multi-head self-attention learns the dependencies and contextual information between each subsequence; the feedforward neural network is composed of two fully connected layers and a ReLU activation function to enhance the expressiveness of the model; among them, the decoder is only used to process the representation of the encoder output in the training phase and reconstruct it back to the original N subsequences; reconstruction is performed through self-supervision, that is, training is achieved by comparing the error between the decoder output and the original input subsequence.

4. The method for predicting household electrical appliance load based on deep learning according to claim 1, characterized in that: The CNN-based long-term trend extraction module realizes local perception and weight sharing characteristics through a layer of diffusion convolution with gradually increasing diffusion degree, and extracts and analyzes the long-term trend in the features output by the encoder of the feature extractor; the LSTM-based short-term trend extraction module adopts a two-layer LSTM to deal with the short-term dependency problem in time series data; wherein LSTM selectively memorizes and forgets information through a gating mechanism, thereby capturing the state changes and load fluctuations of electrical equipment in the short term.

5. The method for predicting household electrical appliance load based on deep learning according to claim 1, characterized in that: The MMoE-based multi-task prediction branch is a multi-task learning model that processes tasks from different angles in parallel through multiple expert networks, and then two gating networks perform weighted combination of the outputs of the expert networks according to task requirements, thereby achieving the simultaneous performance of two prediction tasks: whether the electrical equipment is working and the electrical load.

6. The method for predicting household electrical appliance load based on deep learning according to claim 1, characterized in that: The domain adaptation branch includes a GRL layer and a domain classification prediction head; the goal of domain adaptation is to achieve knowledge transfer from the source domain to the target domain through GRL; GRL does not work during forward reasoning of domain adaptation training, but reverses the gradient here during back propagation, making the training process of the domain classification prediction head difficult.

7. The method for predicting household electrical appliance load based on deep learning according to claim 1, characterized in that: In the self-supervised pre-training stage, only the Transformer-based feature extractor is trained; by blocking the input sequence, the encoder extracts context information from the unblocked part for the decoder to complete the task of reconstructing the input data, forcing the model to mine the potential features and structures in the data; after the pre-training is completed, the encoder will have good representation learning capabilities; In the supervised training phase, the training goal is to perform load forecasting and equipment status forecasting based on historical power consumption data. Involving multi-task learning based on MMoE; In the domain adaptation training phase, by training the multi-task prediction branch and the domain adaptation branch, the multi-task prediction model can automatically adjust parameters to adapt to the distribution characteristics of new data.

8. The method for predicting household electrical appliance load based on deep learning according to claim 1, characterized in that: The loss function of the multi-task prediction model is constructed as follows: In the self-supervised pre-training stage, the mean square error is used to measure the difference between the input and the reconstruction result: Where, X i is the ith subsequence of the input, is the i-th subsequence after reconstruction; N is the total number of subsequences; ‖‖ 2 Represents the square of the L2 norm of the error tensor; In the supervised training phase, based on the multi-task learning part of MMoE, the model needs to complete two prediction tasks at the same time: predicting whether the electrical equipment is in working state and predicting the specific power load; the first task uses binary cross entropy loss: In the formula, y i is the working label of the future time period of the i-th sample, is the working status predicted by the i-th sample; B is the total number of samples in one training iteration; The second task uses mean squared error loss: In the formula, z i is the power load label of the future time period of the i-th sample, is the predicted power load of the i-th sample; therefore, in the supervised training stage, the model does not consider the domain adaptation branch, and the training loss is the weighted sum of the two losses: L1−λ work L work +λ load L load In the formula, λ work , load are the weight hyperparameters of the working state prediction loss and the power load prediction loss respectively; In the domain adaptation task, a domain classifier is used. The domain classifier determines whether the data comes from the source domain or the target domain based on the input features. The domain classification task uses a binary cross entropy loss: Where, d i is the domain label of the ith sample, is the predicted domain classification result of the i-th sample; Therefore, in the domain adaptation training phase, the training loss is: L2=L domain +λ work L work +λ load L load .

9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Load classification method based on self-supervised learning and electronic equipment

    CN120852887A

  • Load prediction method and device based on intelligent agent, equipment and storage medium

    CN120896129A

  • User electricity consumption balance matching system of electricity transaction platform

    CN122246995A

  • Electricity trading platform user power balance matching system

    CN122246995B