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

Through the self-supervised learning method, the deep learning model is used to cluster and extract features of load images. Combined with the prototype contrast loss function and the pseudo-label contrast loss function, the recognition accuracy and scalability problems of the load monitoring method are solved, and more efficient electrical appliance type recognition is achieved.

CN120852887AActive Publication Date: 2025-10-28TIANJIN UNIV
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511351238.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-22
Publication Date
2025-10-28
Estimated Expiration
2045-09-22

AI Technical Summary

Technical Problem

Existing load monitoring methods have low recognition accuracy and rely on labeled data, which limits their scalability and universality.

Method used

A self-supervised learning method is adopted to extract load image feature data for clustering through a deep learning model. The prototype contrast loss function and pseudo-label contrast loss function are used to train the model to enhance the feature learning of electrical appliance types and improve classification accuracy.

Benefits of technology

The accuracy of electrical appliance type recognition is improved, the dependence on labeled data is reduced, and the performance of the model in load classification tasks is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120852887A_ABST
    Figure CN120852887A_ABST
Patent Text Reader

Abstract

The invention provides a load classification method based on self-supervised learning and electronic equipment, and can be applied to the technical field of artificial intelligence. The method comprises the following steps: processing a to-be-classified load image by using a load classification model to obtain a load classification result representing an electric appliance type; the load classification model is obtained by training a deep learning model based on a prototype contrast loss function value, and the prototype contrast loss function value is obtained based on a prototype contrast loss function according to respective clustering centers of a plurality of clusters and respective first sample load feature data of a plurality of first sample load images of the clusters; the clustering center represents a prototype of the clustering cluster, and the clustering center is obtained by clustering a plurality of pieces of first sample load characteristic data of the clustering cluster; the prototype contrast loss function is used for enabling the similarity between the clustering center of the clustering cluster and the first sample load characteristic data of the clustering cluster to be greater than the similarity between the clustering center and the first sample load characteristic data of other clustering clusters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and more specifically to a load classification method and electronic device based on self-supervised learning. Background Technology

[0002] Installing sensors at the power supply inlet of the electrical load can enable detailed monitoring of load consumption and obtain total load data for users. This total load data can then be broken down and identified to determine the energy consumption of each electrical appliance, helping users to save electricity. However, the identification accuracy of load monitoring methods is relatively low. Summary of the Invention

[0003] In view of the above problems, the present invention provides a load classification method and electronic device based on self-supervised learning.

[0004] According to a first aspect of the present invention, a load classification method based on self-supervised learning is provided, comprising: acquiring a load image to be classified; processing the load image to be classified using a load classification model to obtain a load classification result characterizing the type of electrical appliance; wherein the load classification model is obtained by training a deep learning model based on the prototype contrastive loss function value, the prototype contrastive loss function value is obtained based on the prototype contrastive loss function, according to the cluster centers of multiple clusters and the first sample load feature data of multiple first sample load images of the clusters; the cluster center characterizes the prototype of the cluster, the cluster center is obtained by clustering multiple first sample load feature data of the cluster, and for any cluster among the multiple clusters, the prototype contrastive loss function is used to make the similarity between the cluster center of the cluster and the first sample load feature data of the cluster greater than the similarity between the cluster center and the first sample load feature data of other clusters.

[0005] Optionally, the load classification model is obtained by training a deep learning model based on the prototype contrast loss function value and other loss function values. The other loss function values ​​include at least one of the following: pseudo-label loss function value or classification loss function value; the pseudo-label loss function value is obtained based on the pseudo-label loss function, according to multiple feature similarities and multiple pseudo-label similarities. The feature similarity characterizes the similarity between the second sample load feature data of the second sample load image and the third sample load feature data of the third sample load image. The pseudo-label similarity characterizes the similarity between multiple pseudo-labels. The pseudo-label characterizes the sample load classification result of the first sample load image. The sample load classification result is obtained by processing the first sample load image using a deep learning model. The first sample load image, the second sample load image, and the third sample load image corresponding to the same unlabeled sample load image are obtained by image enhancement of the unlabeled sample load image, and the image enhancement degree of the second sample load image and the third sample load image is greater than the image enhancement degree of the first sample load image.

[0006] Optionally, the pseudo-label loss function is used to enable the deep learning model to learn the common features of positive sample pairs and the discriminative features of negative sample pairs. Positive sample pairs include a first positive sample pair and a second positive sample pair. The first positive sample pair represents a second sample load image and a third sample load image corresponding to the same unlabeled sample load image, and the second positive sample pair represents a first sample load image corresponding to the same unlabeled sample load image. Negative sample pairs include a first negative sample pair and a second negative sample pair. The first negative sample pair represents a second sample load image and a third sample load image corresponding to different unlabeled sample load images, and the second negative sample pair represents a first sample load image corresponding to different unlabeled sample load images.

[0007] Optionally, if the similarity between two pseudo-labels is less than or equal to a preset threshold, the pseudo-label similarity is configured to 0; if the two pseudo-labels come from the same unlabeled sample load image, the pseudo-label similarity is configured to 1.

[0008] Optionally, the classification loss function value is obtained based on the classification loss function, according to the fourth sample load feature data and sample load classification labels of each of the multiple fourth sample load images, including sample load images obtained by image enhancement of labeled sample load images.

[0009] Optionally, the unlabeled sample load image is obtained by configuring the first sample color information for the first sample trajectory image, and the first sample trajectory image is obtained by converting the first sample voltage data and the first sample current data generated by the electrical switch events of the first sample preset time period; and / or the labeled sample load image is obtained by configuring the second sample color information for the second sample trajectory image, and the second sample trajectory image is obtained by converting the second sample voltage data and the second sample current data generated by the electrical switch events of the second sample preset time period.

[0010] Optionally, the prototype contrastive loss function value is obtained based on the prototype contrastive loss function, according to the density distribution of each of the multiple clusters, the cluster centers, the number of first sample load feature data, and the multiple first sample load feature data.

[0011] Optionally, the density distribution of clusters is determined based on the number of first sample loading feature data, cluster centers, and multiple first sample loading feature data of the clusters.

[0012] Optionally, obtaining the load image to be classified includes: converting voltage and current data generated by electrical switching events during a preset time period into a trajectory image; configuring color information for the trajectory image to obtain the load image to be classified.

[0013] A second aspect of the present invention provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the above-described load classification method based on self-supervised learning.

[0014] According to the self-supervised learning-based load classification method and electronic device provided by the present invention, multiple first sample load feature data are clustered to extract the prototype of the representative electrical appliance features with intra-class commonality in the feature space for each cluster. The prototype contrast loss function makes the similarity between the cluster center and the first sample load feature data of the cluster greater than the similarity between the cluster center and the first sample load feature data of other clusters. This results in a greater similarity between the cluster center and the first sample load feature data of the cluster, and a smaller similarity between the cluster center and the first sample load feature data of other clusters. The prototype of the first sample load feature data is more closely related to the first sample load feature data and its corresponding cluster, and the boundary with other clusters is clearer. This improves the intra-class compactness of electrical appliance features and strengthens the boundary between clusters, thereby further improving the accuracy of the deep learning model in the load classification task. Attached Figure Description

[0015] The above-mentioned contents, as well as other objects, features and advantages of the present invention, will become clearer from the following description of embodiments of the present invention with reference to the accompanying drawings.

[0016] Figure 1 The present invention illustrates a load classification method based on self-supervised learning and its application scenarios in electronic devices according to embodiments of the present invention.

[0017] Figure 2 A flowchart of a load classification method based on self-supervised learning according to an embodiment of the present invention is shown.

[0018] Figure 3 A schematic diagram of a deep learning model according to an embodiment of the present invention is shown.

[0019] Figure 4 A flowchart illustrating the training of a deep learning model according to an embodiment of the present invention is shown.

[0020] Figure 5 A block diagram of an electronic device suitable for implementing a self-supervised learning-based load classification method according to an embodiment of the present invention is shown. Detailed Implementation

[0021] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the invention. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the invention for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.

[0022] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0023] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0024] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).

[0025] In the process of developing this invention, it was discovered that deep learning models have achieved successful applications in fields such as image processing and natural language processing, and therefore have been introduced into the field of load monitoring for identifying load operation status. However, the accuracy of identification is relatively low. Furthermore, it was found that load classification methods based on deep learning models rely on labeled data to train the model, but in practical applications, labeling all data is difficult to achieve, resulting in high labeling costs and user privacy issues. Therefore, this also limits the scalability and universality of load classification methods to some extent.

[0026] In view of this, embodiments of the present invention provide a load classification method and electronic device based on self-supervised learning. To address the technical problem of low recognition accuracy, a deep learning model is used to extract first-sample load feature data from multiple first-sample load images. Then, clustering is performed on these first-sample load feature data to obtain clusters representing appliance types. This extracts prototypes of representative appliance features that share commonalities within the cluster space. A prototype contrastive loss function is used to increase the similarity between the cluster center and the first-sample load feature data of the cluster, while decreasing the similarity between the cluster center and the first-sample load feature data of other clusters, thereby improving classification accuracy.

[0027] Furthermore, to address the technical issue of load classification methods relying on labeled data, this invention introduces a pseudo-label contrastive loss function and a classification loss function. The training dataset is divided such that the amount of data for unlabeled sample load images is much larger than that for labeled sample load images. The unlabeled sample load images are processed using the prototype contrastive loss function and the pseudo-label contrastive loss function, while a small portion of the labeled sample load images are processed using the classification loss function. The resulting total loss function value is then used to train the model.

[0028] Furthermore, to improve the classification performance of the model trained on unlabeled sample load images, this invention introduces feature similarity and pseudo-label similarity into the pseudo-label contrastive loss function. The enhanced first, second, and third sample load images of the unlabeled sample load images are then divided into positive and negative sample pairs. Feature similarity and pseudo-label similarity are used to learn the common features of positive sample pairs and the discriminative features of negative sample pairs, further enhancing feature learning for the same appliance type and improving recognition accuracy.

[0029] In the technical solution of this invention, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse.

[0030] Figure 1 The present invention illustrates a load classification method based on self-supervised learning and its application scenarios in electronic devices according to embodiments of the present invention.

[0031] like Figure 1As shown, the business system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0032] Users can interact with server 105 via network 104 using at least one of the first terminal device 101, second terminal device 102, and third terminal device 103 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, second terminal device 102, and third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0033] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0034] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The clustered distributed database is deployed on the clustered server 105. Server 105 includes multiple server nodes that can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0035] It should be noted that the load classification method based on self-supervised learning provided in the embodiments of the present invention is generally executed by the first terminal device 101, the second terminal device 102 or the third terminal device 103, or it may be executed by other terminal devices different from the first terminal device 101, the second terminal device 102 or the third terminal device 103.

[0036] Alternatively, it should be noted that the load classification method based on self-supervised learning provided in this embodiment of the invention can also be executed by server 105. The load classification method based on self-supervised learning provided in this embodiment of the invention can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. It should be understood that... Figure 1The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0037] It should be noted that the sequence numbers of the operations in the following methods are for descriptive purposes only and should not be considered as indicating the execution order of the operations. Unless explicitly stated otherwise, the method does not need to be executed in the exact order shown.

[0038] Figure 2 A flowchart of a load classification method based on self-supervised learning according to an embodiment of the present invention is shown.

[0039] like Figure 2 As shown, the load classification method based on self-supervised learning includes operations S210 to S220.

[0040] In operation S210, the image of the load to be classified is obtained.

[0041] The load image to be classified is the load image to be identified. The load image can be obtained by converting the voltage and current waveforms of each steady-state cycle before and after an electrical switching event. The working state transition process of an electrical appliance before and after each on or off event is generally a process of steady state, fluctuation and then back to steady state. During the working state transition process, the load data will increase, decrease or shift, thereby causing changes in the voltage and current waveforms and generating power consumption.

[0042] For example, waveform change data of voltage and current can be directly collected from the power supply inlet of the power user, and the two-dimensional waveform change data can be mapped to a three-dimensional color space composed of hue, saturation and brightness to generate a load image to be classified. The load image to be classified can be a voltage-current trajectory image with color features.

[0043] For example, electrical appliances can include air conditioners, electric fans, refrigerators, and hair dryers.

[0044] In operation S220, the load image to be classified is processed using the load classification model to obtain the load classification result that characterizes the type of electrical appliance.

[0045] During the training of the deep learning model, a semi-supervised training method is adopted. The training set is randomly divided into labeled training set and unlabeled training set according to a set ratio. The labeled training set accounts for a smaller proportion. Each unlabeled sample load image in the unlabeled training set is subjected to weak enhancement processing such as cropping and flipping to obtain the first sample load image.

[0046] The difference between the first sample loading image and the unlabeled sample loading image is small.

[0047] The feature encoder in the deep learning model is used to extract features from multiple first sample load images to obtain first sample load feature data corresponding to each of the multiple first sample load images.

[0048] The number of clusters is set according to the preset number of appliance types. Based on the number of clusters, the mean clustering algorithm can be used to cluster multiple first sample load feature data, resulting in multiple clusters and their respective cluster centers. The number of clusters is the number of clusters.

[0049] The load feature data of multiple first samples included in each cluster are averaged to obtain the cluster centers. The cluster centers represent the prototype of the cluster, which can be representative features of electrical appliances with intra-class commonalities in the feature space.

[0050] In one embodiment, the cluster center of the k-th cluster Satisfy the following formula (1):

[0051] (1).

[0052] in, The number of load feature data in the first sample of the k-th cluster. Characterize the load feature data of the first sample in the k-th cluster.

[0053] The prototype contrast loss function is used to process the cluster centers of multiple clusters and the first sample load feature data corresponding to multiple first sample load images in each cluster to obtain the prototype contrast loss function value.

[0054] For any cluster among multiple clusters, the prototype contrastive loss function is used to ensure that the similarity between the cluster center of the cluster and the first sample loading feature data of the cluster is greater than the similarity between the cluster center and the first sample loading feature data of other clusters, thereby achieving the training optimization objective of minimizing the prototype contrastive loss function value.

[0055] A load classification model is obtained by training a deep learning model using a prototype-contrast loss function. The deep learning model can be built based on a neural network.

[0056] Figure 3 A schematic diagram of a deep learning model according to an embodiment of the present invention is shown.

[0057] Figure 3As shown, the deep learning model consists of two parts: a feature encoder and a classifier. The feature encoder includes a feature extraction module 310, a residual module 320, two downsampling modules 330, a pooling module 340, and an activation module 350. The feature extraction module 310 consists of a 3×3 convolutional layer, a batch normalization layer, and a ReLU activation function (Rectified Linear Unit). The convolutional layer has 16 channels, a height of 32, and a width of 32. The residual module 320 consists of two 3×3 convolutional layers, a batch normalization layer, a ReLU activation function, and a 1×1 convolutional layer connected by skip connections. The downsampling module 330 consists of two 3×3 convolutional layers, two batch normalization layers, two ReLU activation functions, and a 1×1 convolutional layer. The pooling module 340 consists of a batch normalization layer, a ReLU activation function, and an average pooling layer. The activation module 350 consists of two ReLU activation functions and a linear layer. The classifier consists of a linear layer and a softmax function.

[0058] The trained load classification model is used to identify the load images to be classified, and the load classification results representing the type of electrical appliances are obtained.

[0059] For example, if the load classification result is category 3, the appliance type can be determined to be air conditioner.

[0060] The execution subject of the load classification method based on self-supervised learning in this invention can be a terminal device or a server, and the execution subject of the load classification model training method can also be a terminal device or a server. The execution subject of the load classification method based on self-supervised learning can be the same as or different from the execution subject of the load classification model training method.

[0061] By clustering multiple first-sample load feature data, the prototypes of representative electrical appliance features with intra-cluster commonalities in the feature space are extracted for each cluster. The prototype contrast loss function makes the similarity between the cluster center and the first-sample load feature data of the cluster greater than the similarity between the cluster center and the first-sample load feature data of other clusters. This results in a greater similarity between the cluster center and the first-sample load feature data of the cluster, and a smaller similarity between the cluster center and the first-sample load feature data of other clusters. The first-sample load feature data is more closely related to the prototype of its corresponding cluster, and the boundary with other clusters is clearer. This improves the intra-cluster compactness of electrical appliance features and strengthens the boundaries between clusters, thereby further enhancing the accuracy of the deep learning model in the load classification task.

[0062] Optionally, the prototype contrastive loss function value is obtained based on the prototype contrastive loss function, according to the density distribution of each of the multiple clusters, the cluster centers, the number of first sample load feature data, and the multiple first sample load feature data.

[0063] The density distribution of clusters characterizes the number and density of the first sample load feature data.

[0064] In one embodiment, the prototype contrastive loss function Satisfy the following formula (2):

[0065] (2).

[0066] in, The number of unlabeled sample loading images represents the number of first sample loading feature data, which is the same as the number of unlabeled sample loading images. Characterizing the load feature data of the nth first sample, Characteristic data of the first sample load The cluster center of the cluster it belongs to. Characteristic data of the first sample load The density distribution of the cluster it belongs to. Characterizing the number of clusters, The cluster center of the j-th cluster is represented. The density distribution of the j-th cluster is represented by exp, which represents the exponential function, and log represents the logarithmic function.

[0067] In the prototype contrastive loss function, a density distribution parameter is introduced as a scaling factor. At the same time, the number and density of the first sample load feature data are considered to prevent small clusters with highly clustered features from being mistaken for high-density clustered regions, which would affect the clustering effect.

[0068] Because by making the numerator in the prototype contrast loss function The larger the denominator The smaller the value of the prototype-contrast loss function, the better. The numerator calculates the similarity between each first sample load feature data and the prototype of its corresponding cluster, while the denominator mainly calculates the similarity between each first sample load feature data and the prototypes of other clusters. Therefore, the training objective of minimizing the prototype-contrast loss function value makes each first sample load feature data closer to the cluster center of its corresponding cluster and farther away from the cluster centers of other clusters, thus improving the accuracy of appliance type identification.

[0069] Optionally, the density distribution of clusters is determined based on the number of first sample loading feature data, cluster centers, and multiple first sample loading feature data of the clusters.

[0070] In one embodiment, the density distribution of the k-th cluster Satisfy the following formula (3):

[0071] (3).

[0072] in, Characteristic norm function, Characterizing smoothness parameters, The number of load feature data in the first sample of the k-th cluster. Characterize the load feature data of the first sample in the k-th cluster. The cluster center of the k-th cluster is represented.

[0073] This is used to adjust the impact of clusters with a small amount of first sample load feature data, in order to prevent small clusters from having a large density distribution.

[0074] The density distribution of clusters is adjusted based on the number of first sample load feature data and the smoothing parameter. The smaller the number, the less the density distribution of clusters is weakened, in order to prevent small clusters from having a large density distribution. This solves the technical problem that small clusters with highly similar features are mistakenly identified as core clusters of high-density clustering areas, thus affecting the clustering effect of other first sample load feature data.

[0075] Optionally, obtaining the load image to be classified includes: converting voltage and current data generated by electrical switching events during a preset time period into a trajectory image; configuring color information for the trajectory image to obtain the load image to be classified.

[0076] Using voltage as the horizontal axis and current as the vertical axis, the voltage-current trajectory data is plotted by sequentially connecting the coordinate points formed by voltage and current at each acquisition moment within the acquisition period in a two-dimensional coordinate system according to the time sequence.

[0077] Convert voltage-current trajectory data into trajectory images.

[0078] The trajectory image is mapped to a three-dimensional color space consisting of hue, saturation, and brightness, thereby generating a trajectory image with color features. The payload image to be classified is a trajectory image with color features.

[0079] Color information refers to the combination of red, green, and blue (RGB) three-channel colors.

[0080] The voltage and current data with time series are converted into load images with color information to be classified. Since both voltage and current data are one-dimensional signals, the deep learning model directly extracts the features of the one-dimensional signal, resulting in a narrow receptive field. After being converted into two-dimensional load images to be classified, the deep learning model can directly and efficiently learn the local harmonic texture, transient shape of switching events, and other features of the image, which greatly improves the recognition accuracy and robustness.

[0081] Optionally, the load classification model is obtained by training a deep learning model based on the prototype contrast loss function value and other loss function values. The other loss function values ​​include at least one of the following: pseudo-label loss function value or classification loss function value; the pseudo-label loss function value is obtained based on the pseudo-label loss function, according to multiple feature similarities and multiple pseudo-label similarities. The feature similarity characterizes the similarity between the second sample load feature data of the second sample load image and the third sample load feature data of the third sample load image. The pseudo-label similarity characterizes the similarity between multiple pseudo-labels. The pseudo-label characterizes the sample load classification result of the first sample load image. The sample load classification result is obtained by processing the first sample load image using a deep learning model. The first sample load image, the second sample load image, and the third sample load image corresponding to the same unlabeled sample load image are obtained by image enhancement of the unlabeled sample load image, and the image enhancement degree of the second sample load image and the third sample load image is greater than the image enhancement degree of the first sample load image.

[0082] Different degrees of image enhancement were applied to the unlabeled sample loading images to obtain the first sample loading image, the second sample loading image, and the third sample loading image.

[0083] The image enhancement levels of the second and third sample load images are greater than those of the first sample load image. The image enhancement levels of the second and third sample load images differ.

[0084] The difference between the first sample loading image and the unlabeled sample loading image is small, while the differences between the second and third sample loading images and the unlabeled sample loading images are large.

[0085] For example, a horizontal flip operation is performed on the unlabeled sample load image A to obtain the first sample load image A1; a random color jitter operation is performed on the unlabeled sample load image A to obtain the second sample load image A2; and a grayscale conversion operation is performed on the unlabeled sample load image A to obtain the third sample load image A3. The first sample load image A1, the second sample load image A2, and the third sample load image A3 are three new views derived from the same unlabeled sample load image A.

[0086] The feature encoder in the deep learning model is used to extract features from multiple second sample load images and multiple third sample load images respectively, so as to obtain the second sample load feature data corresponding to each of the multiple second sample load images and the third sample load feature data corresponding to each of the multiple third sample load images.

[0087] The similarity between multiple second-sample load feature data and multiple third-sample load feature data is calculated using a similarity algorithm to obtain feature similarity.

[0088] In one embodiment, feature similarity Satisfy the following formula (4):

[0089] (4).

[0090] in, Characterizes the second sample load feature data obtained based on the load image of the s-th unlabeled sample. Characterizes the load feature data of the third sample obtained based on the load image of the h-th unlabeled sample. The temperature hyperparameter can be set to 0.2.

[0091] The first sample load image is identified using a deep learning model to obtain the sample load classification result. The sample load classification result is an output vector representing the class probability distribution. The class probability distribution includes the probability value of the first sample load image belonging to each type of appliance. The length of the output vector is the number of appliance types.

[0092] The sample load classification results are used as pseudo-labels.

[0093] Multiple pseudo-labels are obtained by processing multiple first sample load images using a deep learning model. The similarity between each pair of pseudo-labels is then calculated to obtain the pseudo-label similarity.

[0094] In one embodiment, pseudo-label similarity Satisfy the following formula (5):

[0095] (5).

[0096] in, Characterizes the sample load classification result obtained based on the s-th unlabeled sample load image. Characterizes the sample load classification result obtained based on the h-th unlabeled sample load image. The confidence threshold is used to characterize the confidence level.

[0097] The pseudo-label loss function is used to process the similarity of multiple features and multiple pseudo-labels to obtain the pseudo-label loss function value.

[0098] The classification loss function value can be obtained by processing the labeled sample loading image with the classification loss function, along with the sample loading classification result and label.

[0099] A deep learning model can be trained based on the total loss function value obtained by combining the prototype comparison loss function value, the pseudo-label loss function value, and the classification loss function value, thus obtaining a load classification model.

[0100] By enhancing unlabeled sample load images, second and third sample load images with varying degrees of enhancement are obtained. Feature extraction yields multiple second and third sample load feature data, resulting in feature similarity. The sample load classification results of the unlabeled sample load images output by the classifier in the deep learning model are then used as pseudo-labels, yielding pseudo-label similarity. Based on feature similarity and pseudo-label similarity, a pseudo-label contrast function is constructed to train the enhanced model's appliance type recognition ability. A training framework based on prototype contrast loss function, pseudo-label loss function, and classification loss function is built, with minimizing the total loss function as the optimization objective. High-precision load classification is achieved through iterative optimization of model parameters. During training, labeled sample load images constitute a small proportion of the training samples, enabling the model to learn general feature representations from unlabeled sample load images through semi-supervised training even without multiple labeled sample load images, thus reducing the model's dependence on labeled sample load images.

[0101] Optionally, the pseudo-label loss function is used to enable the deep learning model to learn the common features of positive sample pairs and the discriminative features of negative sample pairs. Positive sample pairs include a first positive sample pair and a second positive sample pair. The first positive sample pair represents a second sample load image and a third sample load image corresponding to the same unlabeled sample load image, and the second positive sample pair represents a first sample load image corresponding to the same unlabeled sample load image. Negative sample pairs include a first negative sample pair and a second negative sample pair. The first negative sample pair represents a second sample load image and a third sample load image corresponding to different unlabeled sample load images, and the second negative sample pair represents a first sample load image corresponding to different unlabeled sample load images.

[0102] The first positive sample pair consists of the second and third sample load images from the same unlabeled sample load image.

[0103] For example, taking the first sample load image A1, the second sample load image A2, and the third sample load image A3 as examples, the second sample load image A2 and the third sample load image A3 are both transformations of the same unlabeled sample load image A. Therefore, the second sample load image A2 and the third sample load image A3 are the first positive sample pair, and the two first sample load images A1 are the second positive sample pair.

[0104] The first negative sample pair consists of a second sample load image and a third sample load image from different unlabeled sample load images.

[0105] For example, a horizontal flip operation is performed on the unlabeled sample load image B to obtain the first sample load image B1; a random color jitter operation is performed on the unlabeled sample load image B to obtain the second sample load image B2; and a grayscale conversion operation is performed on the unlabeled sample load image B to obtain the third sample load image B3. The second sample load image A2 and the third sample load image B3 are transformations from different unlabeled sample load images; therefore, the second sample load image A2 and the third sample load image B3 are the first negative samples.

[0106] The second sample load image B2 and the third sample load image A3 are transformations from different unlabeled sample load images. Therefore, the second sample load image B2 and the third sample load image A3 are the first negative samples.

[0107] The first sample load image A1 and the first sample load image B1 are transformations from different unlabeled sample load images. Therefore, the first sample load image A1 and the first sample load image B1 are the second negative samples.

[0108] The second sample has N load feature data points, and the third sample has N load feature data points. A similarity algorithm is used to calculate the similarity between the second and third sample load feature data points, yielding the feature similarity. This feature similarity is then used to learn the common features of the first positive sample pair and the discriminative features of the first negative sample pair.

[0109] The first sample load feature data has N data points, and the sample load classification results for the first sample load feature data have N data points. The similarity between any two sample load classification results is calculated to obtain the pseudo-label similarity. The pseudo-label similarity is used to learn the common features of the second positive sample pairs and the discriminative features of the second negative sample pairs.

[0110] In one embodiment, the pseudo-label contrastive loss function Satisfy the following formula (6):

[0111] (6).

[0112] Where N represents the number of unlabeled sample load images.

[0113] It acts as a weighting factor, prompting the feature learning process to focus on high-quality positive sample pairs and filter out low-quality pseudo-labels to reduce the accumulation of prediction errors.

[0114] In one embodiment, the total loss function L satisfies the following formula (7):

[0115] (7).

[0116] in, Characterizing the first weight hyperparameter, Characterizing the second weight hyperparameter, Characterizing the prototype contrast loss function, Characterizing the pseudo-label contrast loss function, The classification loss function is represented. A pseudo-label contrastive loss function is constructed based on feature similarity and pseudo-label similarity. Feature similarity is used to learn the common features of the first positive sample pair and the discriminative features of the first negative sample pair, while pseudo-label similarity is used to learn the common features of the second positive sample pair and the discriminative features of the second negative sample pair. During model training, the goal is to minimize the pseudo-label contrastive loss function. This is achieved by narrowing the distance between positive samples (similar samples) and widening the distance between negative samples (dissimilar samples), thereby learning more discriminative feature representations. Simultaneously, pseudo-labels with high confidence thresholds are selected and fed back to the feature encoder in the model. This guides the feature encoder to adjust its feature comparison of unlabeled sample load images of different appliance types based on the model's prediction performance, thus accelerating model convergence and further enhancing the feature consistency of the same appliance type.

[0117] Optionally, if the similarity between two pseudo-labels is less than or equal to a preset threshold, the pseudo-label similarity is configured to 0; if the two pseudo-labels come from the same unlabeled sample load image, the pseudo-label similarity is configured to 1.

[0118] The preset threshold can be the confidence threshold T.

[0119] If the similarity between two pseudo-labels is less than or equal to a preset threshold, it means that they are completely dissimilar to the unlabeled sample loading images corresponding to each of the two pseudo-labels. Therefore, the pseudo-label similarity is configured to 0.

[0120] The two pseudo-labels come from the same unlabeled sample loading image, which should be completely similar to itself. The pseudo-label similarity is configured to 1.

[0121] The pseudo-label similarity between two pseudo-labels from different unlabeled sample load images, where the similarity between the pseudo-labels is less than or equal to a preset threshold, is set to 0. The pseudo-label similarity between two pseudo-labels from the same unlabeled sample load image is set to 1. This widens the distance between dissimilar unlabeled sample load images and brings similar unlabeled sample load images closer together, thereby guiding the update of model parameters.

[0122] Optionally, the classification loss function value is obtained based on the classification loss function, according to the fourth sample load feature data and sample load classification labels of each of the multiple fourth sample load images, including sample load images obtained by image enhancement of labeled sample load images.

[0123] The labeled sample load image is a sample load image with appliance type labels.

[0124] Image augmentation is performed on the labeled sample load image to obtain the fourth sample load image. A deep learning model is then used to identify the sample load in the fourth sample load image, yielding the sample load identification result.

[0125] The classification loss function is used to calculate the sample load recognition result and sample load classification label of the fourth sample load image, and the classification loss function value is obtained.

[0126] The sample load classification label is the type of appliance, for example, refrigerator.

[0127] In one embodiment, the classification loss function Satisfy the following formula (8):

[0128] (8).

[0129] Where M represents the number of labeled sample load images, The sample load recognition result characterizes the m-th fourth sample load image. The sample load classification label characterizes the m-th fourth sample load image.

[0130] By training a deep learning model using the classification loss function value, the model's predicted sample load identification results can be made closer to the actual sample load classification labels, thereby improving the model's prediction accuracy.

[0131] Optionally, the unlabeled sample load image is obtained by configuring the first sample color information for the first sample trajectory image, and the first sample trajectory image is obtained by converting the first sample voltage data and the first sample current data generated by the electrical switch events of the first sample preset time period; and / or the labeled sample load image is obtained by configuring the second sample color information for the second sample trajectory image, and the second sample trajectory image is obtained by converting the second sample voltage data and the second sample current data generated by the electrical switch events of the second sample preset time period.

[0132] Unlabeled load images are load image samples without appliance type labels.

[0133] The first sample is set to be collected during the historical sample collection period.

[0134] The first sample voltage data and the first sample current data are the voltage and current data at each acquisition moment within the historical sample acquisition period.

[0135] Using voltage as the horizontal axis and current as the vertical axis, the coordinate points formed by the first sample voltage data and the first sample current data at each collection moment in the historical sample collection period are connected sequentially in a two-dimensional coordinate system according to the time series to draw the voltage-current trajectory data.

[0136] The voltage-current trajectory data is mapped to a three-dimensional color space consisting of hue, saturation, and brightness, thereby generating a first sample trajectory image with the first sample color information. The unlabeled sample load image is the first sample trajectory image with the first sample color information.

[0137] The tagged sample load images are load image samples with tagged appliance types.

[0138] The preset time period for the second sample is the historical sample collection period.

[0139] The second sample voltage data and the second sample current data are the voltage and current data at each acquisition moment within the historical sample acquisition period.

[0140] Using voltage as the horizontal axis and current as the vertical axis, the coordinate points formed by the second sample voltage data and the second sample current data at each acquisition moment within the historical sample acquisition period are sequentially connected in a two-dimensional coordinate system to draw voltage-current trajectory data. The voltage-current trajectory data is then mapped to a three-dimensional color space composed of hue, saturation, and brightness, thereby generating a second sample trajectory image with color features. The labeled sample load image is a second sample trajectory image with second sample color information.

[0141] The color information of the first sample and the color information of the second sample are both information of the red, green and blue three-channel color combination.

[0142] The coordinate points formed by the first sample voltage data and the first sample current data, as well as the coordinate points formed by the second sample voltage data and the second sample current data, are converted into two-dimensional unlabeled sample load images and two-dimensional labeled sample load images with color information. This allows deep learning models to directly and efficiently learn the rich harmonic textures and transient shapes of switching events in the local image, greatly improving recognition accuracy and robustness.

[0143] Figure 4 A flowchart illustrating the training of a deep learning model according to an embodiment of the present invention is shown.

[0144] like Figure 4 As shown, training a deep learning model includes operations S401 to S412.

[0145] In operation S401, image enhancement is performed on the unlabeled sample load image to obtain the first sample load image, the second sample load image, and the third sample load image.

[0146] In operation S402, cluster centers are obtained by clustering multiple first sample load feature data of the cluster cluster.

[0147] In operation S403, a deep learning model is used to process the first sample load image to obtain pseudo-labels.

[0148] In operation S404, a deep learning model is used to process the second sample load image and the third sample load image to obtain the second sample load feature data and the third sample load feature data.

[0149] In operation S405, based on the prototype contrastive loss function, the prototype contrastive loss function value is obtained according to the density distribution, cluster center, number of first sample load feature data and multiple first sample load feature data.

[0150] In operation S406, the similarity of multiple pseudo-labels is obtained based on the similarity between multiple pseudo-labels.

[0151] In operation S407, multiple feature similarities are obtained based on the similarity between multiple second sample load feature data and multiple third sample load feature data.

[0152] In operation S408, the pseudo-label loss function value is obtained based on the similarity of multiple features and the similarity of multiple pseudo-labels.

[0153] In operation S409, image enhancement is performed on the labeled sample load image to obtain the fourth sample load image.

[0154] In operation S410, the fourth sample load image is processed using a deep learning model to obtain the fourth sample load feature data.

[0155] In operation S411, the classification loss function value is obtained based on the fourth sample load feature data and the sample load classification label.

[0156] In operation S412, the deep learning model is iteratively trained based on the prototype comparison loss function value, pseudo-label loss function value, and classification loss function value.

[0157] Obtain the training and test datasets from the dataset. Standardize all data and add labels to a subset of samples in the training dataset; the labeling ratio is set during training. Randomly divide all samples in the dataset into five equally sized subsets and use five-fold cross-validation. In each experiment, four subsets are used as the training dataset, and the remaining subset is used as the test dataset. Finally, the results of the five tests are summarized for comprehensive evaluation. Eleven appliance types are selected to complete the load classification task: air conditioner, compact fluorescent lamp, electric fan, refrigerator, hair dryer, heater, incandescent light bulb, laptop, microwave oven, vacuum cleaner, and washing machine.

[0158] The deep learning model is trained using the augmented training dataset. The training dataset is randomly divided into several mini-batch training sets, which are then sequentially input into the deep learning model for subsequent batch training. The current batch of training set is read, and the deep learning model undergoes iterative optimization training using mini-batch batches. The model generates sample load classification results. Based on the prototype contrastive loss function, pseudo-label contrastive loss function, and classification loss function, the gradient of the total loss function with respect to each model parameter is calculated layer by layer from the output layer to the input layer of the model network structure using the chain rule. Then, based on the gradient information, stochastic gradient descent is used to update the model parameters.

[0159] The number of training iterations was set to 100, and the learning rate was set to 0.0002. Stochastic gradient descent with a momentum parameter of 0.9 and a weight decay of 0.0001 was selected for training, and the learning rate was adjusted by a cosine annealing decay strategy.

[0160] The model training ends when the total loss function value meets the iteration termination condition, and the current training results are saved. It is then determined whether the current batch of training has reached the preset number of iterations or met the preset convergence accuracy. If so, the model parameters obtained from the current training (including feature encoder and classifier parameters) are saved, the final load classification model is obtained, and the training process ends; otherwise, the next batch of training data is read, and training continues.

[0161] The trained load classification model is tested for load recognition performance. The model parameters saved at the end of training are loaded, and the augmented test set is input into the load classification model. The F1 score is calculated based on the predicted classification results output by the model and the corresponding true labels in the test set. The F1 score is used as the evaluation metric to test the model's recognition performance.

[0162] In one embodiment, the evaluation index of the d-th type of electrical appliance Satisfy the following formula (9):

[0163] (9).

[0164] in, The accuracy of characterizing the d-th type of electrical appliance, Characterizes the recall rate of the d-th type of electrical appliance.

[0165] In one embodiment, accuracy The following formula (10) is satisfied:

[0166] (10).

[0167] in, Characterizes the number of appliances that are correctly predicted as class d in the sample load image. This characterizes the number of sample load images that are incorrectly predicted as class d appliances.

[0168] In one embodiment, recall rate Satisfy the following formula (11):

[0169] (11).

[0170] in, This characterizes the number of other appliances that incorrectly predict the sample load image as appliances other than class d.

[0171] Table 1 shows the F1 scores of each appliance type for load classification based on the proportion of labeled load images in the test dataset. Appliance names are represented by English abbreviations.

[0172] Table 1 shows the F1 score results for various electrical appliance types according to embodiments of the present invention.

[0173]

[0174] As shown in Table 1, the method of the present invention can greatly alleviate the problem of reduced performance of the load classification model due to insufficient label data, and still has good classification effect when the amount of label data is small.

[0175] Figure 5 A block diagram of an electronic device suitable for implementing a self-supervised learning-based load classification method according to an embodiment of the present invention is shown.

[0176] Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0177] like Figure 5As shown, a computer electronic device 500 according to an embodiment of the present invention includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a ROM 502 (read-only memory) or a program loaded from a storage portion 508 into a RAM 503 (random access memory). The processor 501 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.

[0178] RAM 503 stores various programs and data required for the operation of electronic device 500. Processor 501, ROM 502, and RAM 503 are interconnected via bus 504. Processor 501 executes various operations of the method flow according to embodiments of the present invention by executing programs in ROM 502 and / or RAM 503. It should be noted that programs may also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 may also execute various operations of the method flow according to embodiments of the present invention by executing programs stored in one or more memories.

[0179] Optionally, the electronic device 500 may also include an input / output (I / O) interface 505, which is also connected to the bus 504. The electronic device 500 may also include one or more of the following components connected to the input / output (I / O) interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output (I / O) interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the storage section 508 as needed.

[0180] Optionally, the method flow according to embodiments of the present invention can be implemented as a computer software program. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by processor 501, it performs the functions defined in the system of embodiments of the present invention. Optionally, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0181] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the self-supervised learning-based load classification method according to embodiments of the present invention.

[0182] Optionally, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0183] For example, optionally, the computer-readable storage medium may include the ROM 502 and / or RAM 503 described above and / or one or more memories other than ROM 502 and RAM 503.

[0184] Embodiments of the present invention also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of the present invention. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the load classification method based on self-supervised learning provided in the embodiments of the present invention.

[0185] When the computer program is executed by the processor 501, it performs the functions defined in the system / apparatus of this embodiment of the invention. Optionally, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0186] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 509, and / or installed from a removable medium 511. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0187] Optionally, program code for executing the computer programs provided in the embodiments of the present invention can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0188] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features described in the various embodiments of the present invention can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, the features described in the various embodiments of the present invention can be combined and / or combined in various ways without departing from the spirit and teachings of the present invention. All such combinations and / or pairings fall within the scope of this invention.

[0189] The embodiments of the present invention have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of the invention. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of the invention, and all such substitutions and modifications should fall within the scope of the invention.

Claims

1. A load classification method based on self-supervised learning, characterized in that, include: Obtain the image of the load to be classified; The load image to be classified is processed using a load classification model to obtain load classification results that characterize the type of electrical appliance; The load classification model is obtained by training a deep learning model based on the prototype contrast loss function value. The prototype contrast loss function value is obtained based on the prototype contrast loss function, according to the cluster centers of multiple clusters and the first sample load feature data of multiple first sample load images of the clusters. The cluster center represents the prototype of the cluster. The cluster center is obtained by clustering multiple first sample load feature data of the cluster. For any cluster among the multiple clusters, the prototype contrast loss function is used to make the similarity between the cluster center of the cluster and the first sample load feature data of the cluster greater than the similarity between the cluster center and the first sample load feature data of other clusters.

2. The method according to claim 1, characterized in that, The load classification model is obtained by training a deep learning model based on the prototype comparison loss function value and other loss function values, wherein the other loss function values ​​include at least one of the following: pseudo-label loss function value or classification loss function value; The pseudo-label loss function value is obtained based on the pseudo-label loss function, according to multiple feature similarities and multiple pseudo-label similarities. The feature similarity represents the similarity between the second sample load feature data of the second sample load image and the third sample load feature data of the third sample load image. The pseudo-label similarity represents the similarity between multiple pseudo-labels. The pseudo-label represents the sample load classification result of the first sample load image. The sample load classification result is obtained by processing the first sample load image using the deep learning model. The first, second, and third sample load images corresponding to the same unlabeled sample load image are obtained by image enhancement of the unlabeled sample load image, and the image enhancement degree of the second and third sample load images is greater than that of the first sample load image.

3. The method according to claim 2, characterized in that, The pseudo-label loss function is used to enable the deep learning model to learn the common features of positive sample pairs and the discriminative features of negative sample pairs. The positive sample pairs include a first positive sample pair and a second positive sample pair. The first positive sample pair represents a second sample load image and a third sample load image corresponding to the same unlabeled sample load image. The second positive sample pair represents a first sample load image corresponding to the same unlabeled sample load image. The negative sample pairs include a first negative sample pair and a second negative sample pair. The first negative sample pair represents a second sample load image and a third sample load image corresponding to different unlabeled sample load images, and the second negative sample pair represents a first sample load image corresponding to different unlabeled sample load images.

4. The method according to claim 2 or 3, characterized in that, If the similarity between any two pseudo-labels is less than or equal to a preset threshold, the pseudo-label similarity is configured to 0. In the case where the two pseudo-labels come from the same unlabeled sample payload image, the pseudo-label similarity is configured to 1.

5. The method according to claim 2 or 3, characterized in that, The classification loss function value is obtained based on the classification loss function, according to the fourth sample load feature data and sample load classification labels of each of the multiple fourth sample load images, including sample load images obtained by image enhancement of labeled sample load images.

6. The method according to claim 5, characterized in that, The unlabeled sample load image is obtained by configuring first sample color information on the first sample trajectory image, which is obtained by converting first sample voltage data and first sample current data generated by electrical switching events during a preset time period of the first sample; and / or The labeled sample load image is obtained by configuring the second sample color information for the second sample trajectory image. The second sample trajectory image is obtained by converting the second sample voltage data and the second sample current data generated by the electrical switch events of the second sample preset time period.

7. The method according to any one of claims 1 to 3, characterized in that, The prototype contrast loss function value is obtained based on the prototype contrast loss function, according to the density distribution of each of the multiple clusters, the cluster center, the number of first sample load feature data, and the multiple first sample load feature data.

8. The method according to any one of claims 1 to 3, characterized in that, The density distribution of the clusters is determined based on the number of first sample load feature data of the clusters, the cluster centers, and multiple first sample load feature data.

9. The method according to any one of claims 1 to 3, characterized in that, The process of acquiring the load image to be classified includes: The voltage and current data generated by electrical switching events within a preset time period are converted into a trajectory image; Color information is configured for the trajectory image to obtain the load image to be classified.

10. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more computer programs. The one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Non-invasive load identification model construction method, load identification method and system

    CN111639586A

  • Unsupervised pedestrian re-identification method based on cluster feature point clustering

    CN112766237A

  • Differential K-means load clustering method based on center optimization

    CN112819299A

  • Load classification method and device based on deep cooperative training

    CN116863230A

  • Open set domain adaptation method and system based on prototype comparative learning

    CN116910571A