A non-intrusive load disaggregation method and system based on hybrid supervised learning
By employing a hybrid supervised learning approach, combining incomplete and inaccurate supervised learning, and utilizing teacher-student networks and meta-learning to optimize the model, the problem of difficult label data acquisition in NILM was solved, achieving high-precision load identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TIANJIN UNIV
- Filing Date
- 2024-08-12
- Publication Date
- 2026-04-28
AI Technical Summary
Existing NILM technology relies on a large amount of label data for load identification. Acquiring label data is time-consuming and may infringe on user privacy. Furthermore, noisy labels affect the accuracy of the learning classifier.
A hybrid supervised learning approach is adopted, combining incomplete and inaccurate supervised learning. The model is trained using labeled and unlabeled data, and optimized through teacher-student networks and meta-learning methods to reduce labeling costs and improve recognition accuracy.
Under limited labeled data conditions, it significantly improves load identification accuracy, reduces labeling costs, and enhances model recognition accuracy.
Smart Images

Figure CN119006955B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of non-intrusive power load monitoring technology, specifically relating to a non-intrusive load identification method and system based on hybrid supervised learning. Background Technology
[0002] Non-intrusive load monitoring (NILM) is a technology that breaks down total energy consumption into individual appliance-level energy consumption, providing targeted and detailed information for energy management and fault diagnosis of power systems. NILM offers cost-effectiveness by eliminating the need for additional sensors or smart meters on every device, but its performance is entirely dependent on the algorithm.
[0003] In recent years, due to the outstanding performance of machine learning in natural language processing, image classification, and other fields, machine learning methods have been widely applied in the field of Non-Intrusive Load Monitoring (NILM). In 2015, Kelly et al. introduced deep learning into non-intrusive load monitoring and demonstrated the potential of deep learning-based NILM algorithms. Supervised methods such as support vector machines, k-nearest neighbors, graph signal processing, neural networks, and decision trees have been successfully applied to NILM. Although the above-mentioned supervised learning algorithms can achieve good load identification results, they heavily rely on large amounts of labeled data. However, in reality, acquiring large amounts of labeled data is very time-consuming and may interfere with user privacy and reduce user satisfaction. Therefore, it is hoped that deep learning technology can work under weak supervision.
[0004] Weakly supervised learning is divided into incomplete supervision, imprecise supervision, and inaccurate supervision. Incomplete supervision involves only a small portion of the training data being labeled, while the rest remains unlabeled. There are two main techniques within incomplete supervision: active learning and semi-supervised learning. Most current research is based on semi-supervised learning. Inaccurate supervision, compared to strong supervision methods, provides labels at a coarser level. If providing a label for each data point is called fine-grained labeling, then inaccurate supervision only provides a coarse-grained label—one label for a set of data. Compared to strong supervision, it significantly reduces the number of labels while still maintaining a certain level of accuracy in training the model. Inaccurate supervision means that the given labels are not always correct. Incorrectly labeled images are called noisy labels. Research shows that the presence of noisy labels significantly affects the accuracy of the learned classifier. Summary of the Invention
[0005] The technical problem to be solved by this invention is to provide a non-intrusive load identification method and system based on hybrid supervised learning, which applies weakly supervised learning to the field of NILM, combines inaccurate and incomplete supervised learning, utilizes unlabeled data, and greatly reduces labeling costs.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A non-intrusive load identification method based on hybrid supervised learning includes:
[0008] Step S1: Obtain the voltage-current trajectory image dataset;
[0009] Step S2: Using labeled and unlabeled data from the voltage-current trajectory image dataset, train the model based on an incompletely supervised learning method to obtain the initial load identification model.
[0010] Step S3: Determine whether the prediction accuracy of the initial load identification model for labeled data meets the specified threshold requirements. If it does, introduce the predicted label information of the initial load identification model for unlabeled data into the training dataset, transforming the original unlabeled data into labeled data. Combine this with the original labeled data. Given that the predicted label information may contain errors, the updated dataset is called the noisy dataset. Use the noisy dataset for step S4. If it does not meet the requirements, return to step S1, update the voltage-current trajectory image dataset, and retrain the initial model based on incomplete supervised learning.
[0011] Step S4: Using a noisy dataset, continue training the initial load identification model using an inaccurate supervised learning method.
[0012] Preferably, in step S1, load state transition event detection is performed on the total power data, and the voltage and current data of the corresponding load are extracted based on the changes in voltage and total current before and after the event. The voltage and current data are preprocessed to obtain a voltage-current trajectory image.
[0013] Preferably, in step S4, the noisy training method based on meta-learning learns from the training dataset of noisy labeled data samples using an inaccurate supervised learning method without human supervision.
[0014] Furthermore, in order to better improve the model's load identification accuracy, iterative training is carried out on the basis of inaccurate supervised learning. Each new iteration has two improvements compared to the previous iteration: (1) Improve the classification loss by removing samples with potentially incorrect label information during calculation; (2) Improve the prediction results of the teacher model to make the consistency loss more effective.
[0015] The present invention also provides a non-intrusive load identification system based on hybrid supervised learning, comprising:
[0016] The preprocessing module is used to acquire voltage-current trajectory image datasets;
[0017] The first training module is used to train the model based on an incompletely supervised learning method using labeled and unlabeled data from the voltage-current trajectory image dataset to obtain the initial load identification model.
[0018] The judgment module is used to determine whether the prediction accuracy of the initial load identification model for labeled data meets the specified threshold requirements. If it does, the prediction label information of the initial load identification model for unlabeled data is introduced into the training dataset, the original unlabeled data is transformed into labeled data, and combined with the original labeled data, the updated dataset is called the noisy dataset, which is then used to enter the second training module. If it does not meet the requirements, it returns to the preprocessing module, updates the voltage-current trajectory image dataset, and retrains the initial model based on incomplete supervised learning.
[0019] The second training module employs an inaccurate supervised learning method, using a noisy dataset to further train the initial load identification model.
[0020] Preferably, the preprocessing module performs load state transition event detection on the total power data, extracts the voltage and current data of the corresponding load based on the changes in voltage and total current before and after the event, and preprocesses the voltage and current data to obtain a voltage-current trajectory image.
[0021] As a preferred option, the second training module is based on meta-learning theory and uses an inaccurate supervised learning method to learn from the training dataset of noisy labeled data samples without human supervision.
[0022] This invention aims to improve load identification accuracy by more fully utilizing the implicit feature information in unlabeled training data. First, an initial model is constructed using an incompletely supervised learning method, i.e., training the initial model with a small amount of labeled data and a large amount of unlabeled data to predict the label information of the original unlabeled data samples. Then, the predicted label information is introduced into the training dataset, transforming the original unlabeled data into labeled data, which is then combined with the original labeled data. Given the potential for errors in the predicted label data, an inaccurate supervised learning method is used to retrain the initial model, updating it to obtain a non-intrusive load identification model with higher recognition accuracy. This invention provides a solution for improving the accuracy of non-intrusive load identification under conditions of limited labeled data, enabling the acquisition of a high-precision load identification model even with only a small amount of labeled data. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0024] Figure 1 This is a flowchart of the non-intrusive load identification method based on hybrid supervised learning according to an embodiment of the present invention;
[0025] Figure 2 This is a teacher-student network framework diagram based on voltage-current trajectories according to an embodiment of the present invention;
[0026] Figure 3 This is a framework diagram of the noisy training method based on meta-learning designed in this invention. Detailed Implementation
[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0029] Example 1:
[0030] like Figure 1 As shown, this embodiment of the invention provides a non-intrusive load identification method based on hybrid supervised learning, including:
[0031] Step 1: Use voltage-current trajectory images as load features. To extract the voltage-current trajectory image of a single electrical device, it is first necessary to detect the switching events of the device. Switching events can be detected by analyzing changes in total current and total power, thereby obtaining the voltage and current data of a single device. Then, extract the stable voltage and current data for T cycles before and after the event, denoted as V... on V off I on and I off The voltage and current of electrical equipment are defined as (V) on +V off ) / 2 and I off -I onThen, a voltage-current trajectory image of the electrical appliance is plotted based on the voltage and current values. In this invention, the HSV color space is used to encode the voltage-current trajectory image. The resulting voltage-current trajectory image is partially labeled to form a voltage-current trajectory image dataset.
[0032] Step 2: Simultaneously using both labeled and unlabeled data from the voltage-current trajectory image dataset, a semi-supervised learning algorithm is employed to train the model. This invention uses a teacher-student network model, which is based on a consistency regularization method. The specific model is as follows... Figure 2 As shown.
[0033] Define the input voltage-current trajectory color image as x i For labeled data, the real labels are represented by y. i Indicates. y i =1 indicates that the appliance is in operation, y i =0 indicates that the appliance is in a stopped state. Input x i The predictions are processed through both the student network and the teacher network, resulting in two different predictions. The prediction from the student network is defined as s(x). i The predicted value of the teacher network is defined as t(x). i The teacher network and student network models are consistent, only the parameters are different.
[0034] Parameters of the teacher network It is the moving average of the student network parameter θ, as shown in formula (1):
[0035]
[0036] μ is used as the smoothing coefficient hyperparameter.
[0037] The network parameters of the student network are updated using gradient descent of the loss function. The loss function is defined in two parts: the first part is a supervised loss function, which ensures a good fit to the labeled training data; the second part is an unsupervised loss function, which mainly ensures that the predictions of the student model and the teacher model are as similar as possible.
[0038] For labeled data, supervised loss is calculated to reflect the difference between the student model's predicted values and the true values. The data is divided into many mini-batches B, and the cross-entropy of each mini-batch B is calculated using formula (2):
[0039]
[0040] Where L is the number of labeled data.
[0041] For unlabeled data, the expected distance between the predictions of the teacher network and the student network is defined as the consistency loss. The consistency loss is calculated as shown in formula (3):
[0042]
[0043] Combining supervised classification loss and unsupervised consistency loss, the composite loss of this framework is given, as shown in Equation (4):
[0044] L=R s +ω(t)*R c (4)
[0045] A ramp-up ω(t) is used initially for the learning rate and regularization term. This value should be small in the early training epochs and then increased to its maximum value in the later training epochs. In this network, the neural network weights are determined by the gradients from backpropagation, and the student network output is the final prediction.
[0046] Step 3: Determine whether the prediction accuracy of the initial load identification model for labeled data meets the specified threshold requirements. If it does, introduce the predicted label information of the initial load identification model for unlabeled data into the training dataset, transforming the original unlabeled data into labeled data. Combine this with the original labeled data. Considering that the predicted label information may not be completely accurate, the updated dataset is called the noisy dataset, and Step 4 is performed using the noisy dataset. If it does not meet the requirements, return to Step 1, update the voltage-current trajectory image dataset, and retrain the initial model based on incomplete supervised learning.
[0047] Step 4: Inaccurate Supervised Learning. This involves noisy training based on meta-learning. Specifically, for each mini-batch of training data, M sets of labels are generated. For each set of labels, a gradient update is first used to update the network parameters, forcing the updated network to make consistent predictions with the teacher model, which is unaffected by the synthesized labels. The specific model is as follows: Figure 3 As shown. The proposed meta-learning update consists of two processes: meta-training and meta-testing.
[0048] Meta-training: At each training step, consider a small batch of data (X, Y) sampled from the noisy dataset, where X = {x1, ... x2}. k Let} be k voltage-current trajectory images, Y = {y1,...,y2} k} represents the labels of a noisy dataset, and we want to generate M combinations to form labels. To generate a set of synthetic tags Taking an example, firstly, n images are randomly selected from k images. For each selected image x... iSort its neighbors in a small batch. Then, randomly select a neighbor x from its n′ nearest neighbors. j and use the image's tag y j Replace x i The tag, Repeat the above process M times to generate M mini-batch synthetic labels. This invention uses the Euclidean distance between feature representations generated by the load identification model to find the nearest neighbor.
[0049] Let θ′ represent the parameters of the initial load identification model, for each synthetic mini-batch Update θ′ to θ′ using a gradient descent step. m As shown in formula (5):
[0050]
[0051] in, α is the step size.
[0052] Meta-test: Parameters θ of the teacher network t The mean moving average of the student network parameters θ′ is still used. Since the teacher network is not affected by the synthetic labels, a consistency loss L is applied to the prediction results of the synthetic student network and the teacher network. con (θ′ m This loss encourages each synthesized network (with parameter θ′) to... m It provides predictions consistent with the teacher network on the same input X. Let L... con (θ′ m ) is defined as coming from the updated model f(X,θ′) m The predictions and those from the teacher model f(X,θ) t The Kullback-Leibler (KL) divergence between the predictions of ) is shown in Equation (6):
[0053]
[0054] The meta-loss is defined as the average of all consistency losses, as shown in Equation (7):
[0055]
[0056] L meta (θ′) is the result of using the updated model parameters θ′ m The computation is performed, but the optimization is done on the student model parameters θ′. Stochastic gradient descent (SGD) is performed to minimize the meta-loss. The model parameters θ′ are updated as shown in Equation (8):
[0057]
[0058] Where η is the meta-learning rate.
[0059] After the meta-learning update, SGD is performed to optimize the classification loss on the original mini-batch (X,Y), as shown in Equation (9):
[0060]
[0061] in, β is the learning rate.
[0062] After initial training iterations using a meta-learning-based noisy training method, the load identification model for this iteration can be obtained. This model is named the mentor model and uses θ... * This represents its parameters. In the second training iteration, the process of the first iteration is repeated, with two changes introduced:
[0063] (1) Compare the prediction results of the mentor model with the data sample labels in the noisy dataset. If the two are inconsistent, the sample will no longer be considered when calculating the classification loss.
[0064] (2) The effectiveness of the consistency loss is improved by merging the predictions from the tutor model and the teacher model to generate more reliable predictions. The new consistency loss is shown in Equation (10):
[0065]
[0066] Where s=λf(x) i ,θ t )+(1-λ)f(x i ,θ * λ is the weight that controls the importance of the teacher model and the mentor model. It increases from 0 to 0.5 as training progresses.
[0067] After each iteration, a meta-learning load identification model is obtained. If the prediction accuracy of the meta-learning load identification model for labeled data is improved compared to the previous iteration, the iteration continues until the iteration threshold is reached; otherwise, the iteration ends, and the meta-learning load identification model obtained in the previous iteration is the final load identification model.
[0068] Taking a practical application scenario as an example, the specific steps for implementing non-invasive load identification using the method of this invention are as follows:
[0069] 1) Obtain data from the PLAID dataset and process the data;
[0070] According to the voltage-current trajectory processing technique described in this invention, voltage-current trajectory images are obtained by processing 11 types of electrical appliances (i.e., air conditioners, fluorescent lamps, fans, refrigerators, hair dryers, heaters, incandescent lamps, computers, microwave ovens, vacuum cleaners, and washing machines) in the PLAID dataset, and the training set, validation set, and test set are divided in an 8:1:1 ratio.
[0071] 2) Semi-supervised learning is performed using a teacher-student network, and the network recognition results with an accuracy of 80% are saved and combined with the original dataset to form a noisy dataset. Then, an inaccurate supervised learning is performed using a noisy training method based on meta-learning.
[0072] 3) Test the trained model to verify its performance.
[0073] In this example, the expression for the F1-score, the evaluation metric for load identification results, is as follows:
[0074]
[0075] The F1 score for load identification using the method of this embodiment of the invention with labeled data is shown in Table 1.
[0076] Table 1
[0077]
[0078] As can be seen from the above, the implementation method of the present invention can accurately identify the operating status of user load equipment.
[0079] Example 2:
[0080] This invention also provides a non-intrusive load identification system based on hybrid supervised learning, comprising:
[0081] The preprocessing module is used to acquire voltage-current trajectory image datasets;
[0082] The first training module is used to train the model based on a semi-supervised learning algorithm using labeled and unlabeled data from the voltage-current trajectory image dataset to obtain the initial load identification model.
[0083] The judgment module is used to determine whether the prediction accuracy of the initial load identification model for labeled data meets the specified threshold requirements. If it does, the prediction label information of the initial load identification model for unlabeled data is introduced into the training dataset, the original unlabeled data is transformed into labeled data, and combined with the original labeled data, the updated dataset is called the noisy dataset, which is then used to enter the second training module. If it does not meet the requirements, it returns to the preprocessing module, updates the voltage-current trajectory image dataset, and retrains the initial model based on incomplete supervised learning.
[0084] The second training module is used to continue training the initial load identification model using a noisy dataset.
[0085] As one embodiment of the present invention, the preprocessing module performs load state transition event detection on the total power data, extracts the voltage and current data of the corresponding load based on the changes in voltage and total current before and after the event, and preprocesses the voltage and current data to obtain a voltage-current trajectory image.
[0086] As one embodiment of the present invention, the second training module is based on meta-learning to learn from the training dataset of noisy labeled data samples without human supervision.
[0087] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A non-intrusive load identification method based on hybrid supervised learning, characterized in that, include: Step S1: Obtain the voltage-current trajectory image dataset; Step S2: Using labeled and unlabeled data from the voltage-current trajectory image dataset, train the model based on an incompletely supervised learning method to obtain the initial load identification model. The initial load identification model uses a teacher-student network model. For unlabeled data, the expected distance between the prediction results of the teacher network and the prediction results of the student network is defined as the consistency loss. The calculation method for the consistency loss is as follows: ; Combining supervised classification loss and unsupervised consistency loss, a composite loss is presented: ; Step S3: Determine whether the prediction accuracy of the initial load identification model for labeled data meets the specified threshold requirements; if it does, introduce the predicted label information of the initial load identification model for unlabeled data into the training dataset, transform the original unlabeled data into labeled data, combine it with the original labeled data, and call the updated dataset the noisy dataset, and use the noisy dataset to perform step S4; if it does not meet the requirements, return to step S1, update the voltage-current trajectory image dataset, and retrain the initial model based on incomplete supervised learning. Step S4: Using a noisy dataset, continue training the initial load identification model using an inaccurate supervised learning method; Based on meta-learning, noisy training is performed. For each batch of training data, M sets of labels are generated. For each set of labels, a gradient update is first used to update the network parameters, and the updated network is forced to make consistent predictions with the teacher model that is not affected by the synthetic labels. The proposed meta-learning update includes two processes: meta-training and meta-testing. After initial training iterations using a meta-learning-based noisy training method, the load identification model for this iteration is obtained; this model is named the mentor model and used... Indicate its parameters; In the second training iteration, the first iteration process is repeated, and two changes are introduced: (1) The prediction results of the mentor model are compared with the data sample labels in the noisy dataset. If the two are inconsistent, the sample is no longer considered when calculating the classification loss; (2) The predictions of the mentor model and the teacher model are combined to generate more reliable predictions, thereby improving the effectiveness of the consistency loss. in, λ is the weight that controls the importance of the teacher model and the mentor model, and it increases from 0 to 0.5 as training progresses; After each iteration, a meta-learning load identification model is obtained. If the prediction accuracy of the meta-learning load identification model for labeled data is improved compared to the previous iteration, the iteration continues until the iteration threshold is reached; otherwise, the iteration ends and the meta-learning load identification model obtained in the previous iteration is the final load identification model. In step S1, load state transition event detection is performed on the total power data. Based on the changes in voltage and total current before and after the event, the voltage and current data of the corresponding electrical equipment are extracted. The voltage and current data are preprocessed to obtain a voltage-current trajectory image. In step S4, the meta-learning-based noisy training method learns from the training dataset of noisy labeled data samples using an inaccurate supervised learning method without human supervision.
2. A non-intrusive load identification system based on hybrid supervised learning implemented according to the method described in claim 1, characterized in that, include: The preprocessing module is used to acquire voltage-current trajectory image datasets; The first training module is used to train the model based on an incompletely supervised learning method using labeled and unlabeled data from the voltage-current trajectory image dataset to obtain the initial load identification model. The judgment module is used to determine whether the prediction accuracy of the initial load identification model for labeled data meets the specified threshold requirements. If it does, the prediction label information of the initial load identification model for unlabeled data is introduced into the training dataset, the original unlabeled data is transformed into labeled data, and combined with the original labeled data, the updated dataset is called the noisy dataset, which is then used to enter the second training module. If it does not meet the requirements, it returns to the preprocessing module, updates the voltage-current trajectory image dataset, and retrains the initial model based on incomplete supervised learning. The second training module employs an inaccurate supervised learning method, using a noisy dataset to continue training the initial load identification model. The preprocessing module performs load state transition event detection on the total power data, extracts the voltage and current data of the corresponding electrical equipment based on the changes in voltage and total current before and after the event, and preprocesses the voltage and current data to obtain a voltage-current trajectory image. The second training module is based on meta-learning theory and uses an inaccurate supervised learning method to learn from the training dataset containing noisy labeled data samples without human supervision.
Citation Information
Patent Citations
Multi-stage guided small target semi-supervised learning detection method based on uncertainty
CN116563738A