Multi-device non-intrusive load monitoring method and device
Through the semi-supervised machine learning model, a small amount of labeled data and a large amount of unlabeled data are used to solve the problem of high dependence on a large amount of labeled data in the existing technology, improve the accuracy of load monitoring and the efficiency and adaptability of the system, and are suitable for Load management for smart grids.
Patent Information
- Application Number
- CN202410602569.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-08-23
AI Technical Summary
Existing non-intrusive load monitoring technology relies on a large amount of labeled data, which is expensive and time-consuming to obtain. In addition, in environments with complex behavior patterns of multiple electrical devices or multiple device types, identification accuracy is low, especially in environments with limited software and hardware resources. , data processing performance is poor.
A semi-supervised machine learning model is used to train based on the power data of a single measurement point and the label data of a small amount of electrical equipment. The semi-supervised machine learning model is constructed by obtaining preprocessing, clustering and adjusting pseudo-labels of labeled and unlabeled data. , reduce dependence on large amounts of labeled data, and improve the accuracy of load monitoring.
It significantly reduces the dependence on large-scale tag data, improves the accuracy of load monitoring, reduces computational complexity, enables the system to maintain efficient operation in an environment with limited resources, and improves the accuracy of equipment identification and system performance.
Smart Images

Figure CN118535934A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of load management of smart grids, and in particular to a multi-device non-intrusive load monitoring method and device. Background Art
[0002] In the current new power system field, effectively monitoring and managing demand-side loads has become a core concern. Especially in the context of the development of smart grids, the application of non-intrusive load monitoring (NILM) technology is particularly important. NILM technology enables the analysis of power usage data from a single measurement point (such as the meter of the entire building) to identify and monitor the energy consumption patterns of different power devices. The advantage of this technology is that it does not require the installation of dedicated monitoring equipment on each power device, which greatly reduces the complexity and cost of the system.
[0003] The inventors of the present application have discovered in their research that current non-invasive load monitoring technology faces many challenges, mainly manifested in the following aspects: intelligent models used for load monitoring often rely on a large amount of labeled data for training; however, the acquisition of high-quality, large-scale labeled data is costly and time-consuming; and existing models have low recognition accuracy in the context of complex behavioral patterns of multiple electrical devices or multiple device types, and the performance of processing data is even worse, especially in an environment with limited software and hardware resources. Summary of the invention
[0004] In view of the above problems, the purpose of the present invention is to provide a multi-device non-invasive load monitoring method and apparatus, which can construct a semi-supervised machine learning model based on the power data of a single measurement point and the label data of a small number of electrical equipment, reduce the reliance on a large amount of labeled data, and improve the accuracy of load monitoring based on the trained model.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] In a first aspect, the present application provides a multi-device non-intrusive load monitoring method, comprising:
[0007] Acquire labeled sample data, wherein the labeled sample data includes: electrical parameter values of a preset type of electrical equipment at a power data measurement point, and load classification results of the electrical equipment as sample labels;
[0008] Acquire unlabeled sample data, where the unlabeled sample data is electrical parameter values of multiple electrical devices obtained based on the power data measurement points;
[0009] Based on the labeled sample data and the unlabeled sample data, training a semi-supervised machine learning model;
[0010] Based on the trained semi-supervised machine learning model, the load classification results of multiple electrical equipment are predicted.
[0011] In one implementation of the present application, the electrical parameter value of the electrical equipment at the power data measurement point includes: the active power of each load node.
[0012] In one implementation of the present application, the load classification result of the electrical equipment includes: the type of each electrical equipment and the power consumption mode of each electrical equipment.
[0013] In one implementation of the present application, the training of the semi-supervised machine learning model based on the labeled sample data and the unlabeled sample data includes:
[0014] Preprocessing the labeled sample data and the unlabeled sample data, and predicting pseudo labels corresponding to the unlabeled sample data;
[0015] Cluster the labeled sample data and adjust the pseudo labels of the unlabeled sample data based on the clustering results;
[0016] Build a semi-supervised machine learning model based on labeled sample data and sample data with adjusted pseudo labels;
[0017] The constructed semi-supervised machine learning model is trained and evaluated until the final model is obtained.
[0018] In one implementation of the present application, the method further includes: performing lightweight optimization on the trained semi-supervised machine learning model.
[0019] In a second aspect, the present application provides a multi-device non-intrusive load monitoring device, the device comprising:
[0020] A first acquisition module is used to acquire labeled sample data, wherein the labeled sample data includes: electrical parameter values of a preset type of electrical equipment at a power data measurement point, and load classification results of the electrical equipment as sample labels;
[0021] A second acquisition module is used to acquire unlabeled sample data, where the unlabeled sample data is electrical parameter values of multiple electrical devices obtained based on the power data measurement points;
[0022] A training module, used for training a semi-supervised machine learning model based on the labeled sample data and the unlabeled sample data;
[0023] The prediction module is used to predict the load classification results of multiple electrical equipment based on the trained semi-supervised machine learning model.
[0024] In one implementation of the present application, the electrical parameter value of the electrical equipment at the power data measurement point includes: the active power of each load node.
[0025] In one implementation of the present application, the load classification result of the electrical equipment includes: the type of each electrical equipment and the power consumption mode of each electrical equipment.
[0026] In one implementation of the present application, the training module is used to preprocess the labeled sample data and the unlabeled sample data, and predict the pseudo-labels corresponding to the unlabeled sample data; cluster the labeled sample data, and adjust the pseudo-labels of the unlabeled sample data according to the clustering results; construct a semi-supervised machine learning model based on the labeled sample data and the sample data after adjusting the pseudo-labels; and train and evaluate the constructed semi-supervised machine learning model until the final model is obtained.
[0027] In a third aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the multi-device non-intrusive load monitoring method described in the first aspect.
[0028] Due to the adoption of the above technical solution, the present invention has the following advantages: by combining a semi-supervised learning model with a small amount of labeled data and a large amount of unlabeled data, the dependence on large-scale labeled data is significantly reduced, solving the high data dependence problem existing in traditional systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a schematic diagram of the non-intrusive load monitoring model of the present invention;
[0030] Figure 2 Schematic diagram of the backbone network based on ShuffleNetV2.0 in the present invention;
[0031] Figure 3 This is a schematic diagram of the ShuffleNetV2.0 principle in the present invention. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.
[0033] In view of the problem that the machine learning models in the prior art rely on a large amount of labeled data for training, and the acquisition of high-quality, large-scale labeled data is costly and time-consuming, the present application provides a multi-device non-invasive load monitoring method, including: obtaining labeled sample data, the labeled sample data includes: electrical parameter values of preset types of electrical equipment at power data measurement points, and load classification results of electrical equipment as sample labels; obtaining unlabeled sample data, the unlabeled sample data is the electrical parameter values of multiple electrical equipment obtained based on the power data measurement points; training a semi-supervised machine learning model based on the labeled sample data and the unlabeled sample data; and predicting the load classification results of multiple electrical equipment based on the trained semi-supervised machine learning model. The present application constructs a semi-supervised machine learning model based on power data from a single measurement point and labeled data of a small number of electrical equipment, reduces the reliance on a large amount of labeled data, and improves the accuracy of load monitoring based on the trained model.
[0034] Please also see Figures 1 to 3 In one aspect of an embodiment of the present application, a multi-device non-intrusive load monitoring method is provided.
[0035] A multi-device non-intrusive load monitoring method of this embodiment includes:
[0036] S1, obtaining labeled sample data, wherein the labeled sample data includes: electrical parameter values of a preset type of electrical equipment at a power data measurement point, and load classification results of the electrical equipment as sample labels;
[0037] S2, obtaining unlabeled sample data, wherein the unlabeled sample data is electrical parameter values of multiple electrical devices obtained based on the power data measurement points;
[0038] S3, training a semi-supervised machine learning model based on the labeled sample data and the unlabeled sample data;
[0039] S4, based on the trained semi-supervised machine learning model, predicts the load classification results of multiple electrical equipment.
[0040] The training process includes:
[0041] Preprocessing the labeled sample data and the unlabeled sample data, and predicting pseudo labels corresponding to the unlabeled sample data;
[0042] Cluster the labeled sample data and adjust the pseudo labels of the unlabeled sample data based on the clustering results;
[0043] Build a semi-supervised machine learning model based on labeled sample data and sample data with adjusted pseudo labels;
[0044] The constructed semi-supervised machine learning model is trained and evaluated until the final model is obtained.
[0045] Specifically, the following steps are included:
[0046] (1) Data collection and preprocessing. This includes: collecting power data from a single measurement point and a small amount of label data from multiple known devices; data normalization; feature extraction; and data set division.
[0047] (1-1) Collect and align data. This includes: single measurement point and a small amount of tag data from multiple known devices. The data type is active power, and time alignment is performed on data with different collection frequencies.
[0048] (1-2) Data normalization. For the i-th historical measurement value at the k-th time step, the data of the historical measurement value is normalized. The specific formula is as follows:
[0049]
[0050] Among them, x k ′ is the kth normalized historical measurement value, x k is the kth original historical measurement value, x mink is the minimum value among the k groups of data, x max k is the maximum value of a set of data.
[0051] (1-3) Based on the normalized historical measurement values, the unlabeled data is predicted and the prediction results are used as pseudo labels.
[0052] (1-4) Dataset division: The dataset is divided into training set, validation set and test set according to the ratio of 6:2:2.
[0053] (2) Feature extraction. The feature extraction in this example includes: providing a small amount of labeled data as cluster centers, performing semi-supervised clustering on the labeled data; and adjusting the pseudo labels based on the clustering result evaluation.
[0054] (2-1) Semi-supervised clustering: A small amount of labeled data is provided as cluster centers, and semi-supervised clustering is performed on the labeled data.
[0055] (2-1-1) Initialize based on the existing labeled data and determine k cluster centers;
[0056] (2-1-2) Repeat clustering until the cluster center no longer changes;
[0057] (2-1-3) Calculate the distance from each object to the centroid and use the label as the label of the nearest centroid;
[0058] (2-1-4) Recalculate the cluster centers.
[0059] (2-2) Adjust the pseudo-label. Compare and calculate the pseudo-label predicted in step (1-3) with the cluster centroid, optimize the pseudo-label, and obtain data that combines the real and pseudo-label.
[0060] (3) Construct a multi-device non-intrusive load monitoring model based on semi-supervised learning, including: backbone model and non-intrusive load monitoring model.
[0061] (3-1) Construct a non-intrusive load monitoring model. The overall architecture of the model is as follows: Figure 1 As shown, it includes an input layer, five convolutional layers, a fully connected layer, and an output layer.
[0062] (3-2) Construct the backbone model. The backbone model uses the ShuffleNetV2 structure for feature extraction. Through this step, the load characteristic data can be obtained, and then it is passed to the load identification network for identification, so as to obtain the load power curve data and the corresponding load type.
[0063] in, Figure 2 The Seq2point-ShuflleNetV2 structure designed for this study. The model consists of multiple small units. CBR represents the conv+BN+ReLU operation; the block1 unit is the structure in the ShuffleNetv2 model, such as Figure 3 As shown in the figure, the input is subjected to the Channel Split operation, that is, the input data is evenly divided into two parts according to the channel, and one part is subjected to the CBR+Dwconv+BN+CBR operation and then concatenated with the other part. The concat operation is different from the Add operation. After the concat operation, the number of channels of the tensor will expand, while the Add operation is just a direct addition of the values, and the number of channels of the tensor remains unchanged. Finally, the Channel Shuffle operation is performed; the block2 unit is the second structure in the ShuffleNetv2 model, as shown in Figure 3 As shown, first, the input data undergoes two operations simultaneously, one is the CBR+Dwconv+-BN+CBR operation, and the other is the Dwconv+-BN+CBR operation. Then, the output data of the two operations are concat-operated, and finally, the Channel Shuffle operation is performed.
[0064] (4) Training and model evaluation of a multi-device non-intrusive load monitoring model based on semi-supervised learning. Including:
[0065] (3-1): Randomly initialize model parameters. This includes selecting initialization strategies, initializing weights, setting learning rates, and optimizing. According to the activation functions of each layer and the characteristics of the network, select appropriate initialization methods and weight initialization methods. In this example, the Xavier random initialization method is used, the learning rate is set to 0.001, and the optimizer uses the Adam method.
[0066] (3-2) Calculate the model output and the actual loss L(θ).
[0067] (3-3) Update network parameters. After calculating L(θ), update the parameters by gradient descent.
[0068]
[0069]
[0070] Where ɑ is the update rate of the target value function neural network. In this example, it is set to 0.0001.
[0071] (3-4) Model training process. Repeat steps 3.2 to 3.3 until the offline training phase is completed to obtain a model that has completed offline training. In this example, the number of repetitions is set to 10,000.
[0072] (3-5) Model performance evaluation. Use the test set to evaluate the model performance and optimize it to ensure that it has good model performance. In this example, MSE, MAE, and MPAE are used as methods to evaluate model performance.
[0073] (4) Use the trained model to perform online non-intrusive load monitoring and obtain real-time data of each device downstream of the current load node.
[0074] The multi-device non-intrusive load monitoring system and method based on semi-supervised learning of the present invention has significant beneficial effects. First, by combining a semi-supervised learning model with a small amount of labeled data and a large amount of unlabeled data, the dependence on large-scale labeled data is significantly reduced, solving the problem of high data dependence in traditional systems. Secondly, through the lightweight design of ShuffleNet V2.0, the system greatly reduces the computational complexity, so that it can maintain efficient operation even in an environment with limited computing resources, thereby improving the practicality and universality of the system. In addition, the method significantly improves the accuracy of device identification through precise feature extraction and efficient model training, thereby improving the performance of the entire system. In summary, the present invention not only optimizes the efficiency and accuracy of non-intrusive load monitoring, but also enhances the adaptability and application scope of the system, and provides an efficient solution for intelligent monitoring and energy management of power systems.
[0075] In the several embodiments provided by the present invention, it should be understood that the disclosed method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0076] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (Processor) to perform some steps of the above-mentioned method of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0077] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A multi-device non-intrusive load monitoring method, characterized in that: include: Acquire labeled sample data, wherein the labeled sample data includes: electrical parameter values of a preset type of electrical equipment at a power data measurement point, and load classification results of the electrical equipment as sample labels; Acquire unlabeled sample data, where the unlabeled sample data is electrical parameter values of multiple electrical devices obtained based on the power data measurement points; Based on the labeled sample data and the unlabeled sample data, training a semi-supervised machine learning model; Based on the trained semi-supervised machine learning model, the load classification results of multiple electrical equipment are predicted.
2. The multi-device non-intrusive load monitoring method according to claim 1, characterized in that: The electrical parameter values of the electrical equipment at the power data measurement point include: the active power of each load node.
3. The multi-device non-intrusive load monitoring method according to claim 1, characterized in that: The load classification result of the electrical equipment includes: the power curve of each device, the type of each electrical equipment, and the power consumption mode of each electrical equipment.
4. The multi-device non-intrusive load monitoring method according to claim 1, characterized in that: The training of the semi-supervised machine learning model based on the labeled sample data and the unlabeled sample data includes: Preprocessing the labeled sample data and the unlabeled sample data, and predicting pseudo labels corresponding to the unlabeled sample data; Cluster the labeled sample data and adjust the pseudo labels of the unlabeled sample data based on the clustering results; Build a semi-supervised machine learning model based on labeled sample data and sample data with adjusted pseudo labels; The constructed semi-supervised machine learning model is trained and evaluated until the final model is obtained.
5. The multi-device non-intrusive load monitoring method according to claim 1, characterized in that: The method also includes: performing lightweight optimization on the trained semi-supervised machine learning model.
6. A multi-device non-intrusive load monitoring device, characterized in that: The device comprises: A first acquisition module is used to acquire labeled sample data, wherein the labeled sample data includes: electrical parameter values of a preset type of electrical equipment at a power data measurement point, and load classification results of the electrical equipment as sample labels; A second acquisition module is used to acquire unlabeled sample data, where the unlabeled sample data is electrical parameter values of multiple electrical devices obtained based on the power data measurement points; A training module, used for training a semi-supervised machine learning model based on the labeled sample data and the unlabeled sample data; The prediction module is used to predict the load classification results of multiple electrical equipment based on the trained semi-supervised machine learning model.
7. The multi-device non-intrusive load monitoring device according to claim 6, characterized in that: The electrical parameter values of the electrical equipment at the power data measurement point include: active power...
8. The multi-device non-intrusive load monitoring method according to claim 6, characterized in that: The load classification result of the electrical equipment includes: the type of each electrical equipment and the power consumption mode of each electrical equipment.
9. The multi-device non-intrusive load monitoring method according to claim 6, characterized in that: The training module is used to preprocess the labeled sample data and the unlabeled sample data, and predict the pseudo-labels corresponding to the unlabeled sample data; cluster the labeled sample data, and adjust the pseudo-labels of the unlabeled sample data according to the clustering results; construct a semi-supervised machine learning model based on the labeled sample data and the sample data after adjusting the pseudo-labels; and train and evaluate the constructed semi-supervised machine learning model until the final model is obtained.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the multi-device non-intrusive load monitoring method according to any one of claims 1 to 5.
