[go: up one dir, main page]

CN111639586A - Non-invasive load identification model construction method, load identification method and system - Google Patents

Non-invasive load identification model construction method, load identification method and system Download PDF

Info

Publication number
CN111639586A
CN111639586A CN202010460278.2A CN202010460278A CN111639586A CN 111639586 A CN111639586 A CN 111639586A CN 202010460278 A CN202010460278 A CN 202010460278A CN 111639586 A CN111639586 A CN 111639586A
Authority
CN
China
Prior art keywords
load identification
similarity
module
loss
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010460278.2A
Other languages
Chinese (zh)
Other versions
CN111639586B (en
Inventor
王非
伍谦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN202010460278.2A priority Critical patent/CN111639586B/en
Publication of CN111639586A publication Critical patent/CN111639586A/en
Application granted granted Critical
Publication of CN111639586B publication Critical patent/CN111639586B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/08Feature extraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/067Enterprise or organisation modelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Health & Medical Sciences (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Marketing (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Educational Administration (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Game Theory and Decision Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Signal Processing (AREA)
  • Operations Research (AREA)
  • Development Economics (AREA)
  • Quality & Reliability (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Complex Calculations (AREA)

Abstract

本发明公开了一种非侵入式负荷识别模型构建方法、负荷识别方法及系统,属于非侵入式负荷识别领域,包括:建立包括特征提取模块、分类器模块和相似性度量模块的待训练模型;由多个家庭的电器样本构成训练集;从训练集选取h个家庭,每个家庭选取k个样本,输入特征提取模块,得到电器特征;将电器特征输入分类器模块转换为类别标签,并计算类别损失;将电器特征输入相似性度量模块,将每两个家庭的电器特征对应拼接,并计算相似性损失;以两个损失之和为整体损失,更新模型参数以最小化整体损失;重复训练多轮后,由特征提取模块和分类器模块构成负荷识别模型。本发明能够构建一种具有域泛化能力的负荷识别模型,提高非侵入式负荷识别的精度。

Figure 202010460278

The invention discloses a non-intrusive load identification model construction method, load identification method and system, belonging to the field of non-intrusive load identification, comprising: establishing a to-be-trained model including a feature extraction module, a classifier module and a similarity measurement module; The training set is composed of electrical samples from multiple families; h families are selected from the training set, k samples are selected from each family, and the feature extraction module is input to obtain the electrical features; the electrical features are input into the classifier module and converted into class labels, and calculated Category loss; input the electrical features into the similarity measurement module, splicing the electrical features of each two families correspondingly, and calculate the similarity loss; take the sum of the two losses as the overall loss, and update the model parameters to minimize the overall loss; repeat training After several rounds, the load identification model is composed of the feature extraction module and the classifier module. The invention can construct a load identification model with domain generalization ability, and improve the accuracy of non-intrusive load identification.

Figure 202010460278

Description

非侵入式负荷识别模型构建方法、负荷识别方法及系统Non-intrusive load identification model construction method, load identification method and system

技术领域technical field

本发明属于非侵入式负荷识别领域,更具体地,涉及一种非侵入式负荷识别模型构建方法、负荷识别方法及系统。The invention belongs to the field of non-invasive load identification, and more particularly, relates to a non-invasive load identification model construction method, load identification method and system.

背景技术Background technique

世界各国正在进行智能电网和相关应用的开发和部署,利用智能电表采集的数据,可以最大程度地发挥智能电网的优势。利用智能电表采集的数据,可以识别用户家庭中的电器类型,即实现负荷识别。Countries around the world are developing and deploying smart grids and related applications. Using the data collected by smart meters, the advantages of smart grids can be maximized. Using the data collected by the smart meter, the type of electrical appliances in the user's home can be identified, that is, load identification can be realized.

负荷识别方法从传感器数目可以分为侵入式和非侵入式两种。侵入式负荷识别需要针对每个电器进行安装对应传感器,额外的设备和较高的成本使得侵入式方法难以推广。非侵入式负荷识别仅仅需要从家庭已安装的单个总线智能电表收集数据,并通过对智能电表的数据分析,将家庭总用电量分解到单一电器的能耗,有助于实现用电情况反馈,帮助用户节省能源,同时有利于供给侧准确计费。相比于侵入式负荷识别,非侵入式负荷识别成本较低,易于推广,因此被广泛研究。Load identification methods can be divided into two types: intrusive and non-intrusive according to the number of sensors. Intrusive load identification requires the installation of corresponding sensors for each electrical appliance. Additional equipment and higher costs make the intrusive method difficult to promote. Non-intrusive load identification only needs to collect data from a single bus smart meter installed in the home, and through the data analysis of the smart meter, the total household electricity consumption is decomposed into the energy consumption of a single appliance, which helps to realize electricity consumption feedback , help users save energy, and at the same time facilitate accurate billing on the supply side. Compared with invasive load identification, non-invasive load identification has lower cost and is easy to promote, so it has been widely studied.

非侵入式负荷识别方法往往需要借助于模型实现电器类型的识别,而在实际应用场合中,不同家庭的电器由于用户行为、电器型号等原因差异较大,训练模型所用的带标签的数据集难以涵盖来源于不同家庭所有可能的电器样本,因此,不同的家庭环境构造出不同的应用场景。此外,常用的机器学习算法和深度学习模型又容易过拟合于训练集数据,因此如何获取一个跨应用场景的,泛化通用的负荷识别模型是非侵入式负荷识别的难点。Non-intrusive load identification methods often need to use models to identify electrical appliances. In practical applications, electrical appliances in different households vary greatly due to user behavior and electrical appliance models. It covers all possible samples of electrical appliances from different families, so different home environments create different application scenarios. In addition, commonly used machine learning algorithms and deep learning models are prone to overfitting to the training set data. Therefore, how to obtain a generalized and generalized load identification model across application scenarios is a difficulty in non-intrusive load identification.

发明内容SUMMARY OF THE INVENTION

针对现有技术的缺陷和改进需求,本发明提供了一种非侵入式负荷识别模型构建方法、负荷识别方法及系统,其目的在于,构建一种跨应用场景的、泛化通用的负荷识别模型,以提高非侵入式负荷识别的识别精度。In view of the defects and improvement requirements of the prior art, the present invention provides a non-intrusive load identification model construction method, load identification method and system, the purpose of which is to construct a generalized and universal load identification model across application scenarios , in order to improve the identification accuracy of non-intrusive load identification.

为实现上述目的,按照本发明的一个方面,提供了一种具有域泛化能力的非侵入式负荷识别模型构建方法,包括:In order to achieve the above object, according to an aspect of the present invention, a method for constructing a non-invasive load identification model with domain generalization capability is provided, including:

基于深度神经网络建立待训练模型,待训练模型包括:特征提取模块、分类器模块和相似性度量模块;A model to be trained is established based on the deep neural network, and the model to be trained includes: a feature extraction module, a classifier module and a similarity measurement module;

从在总线处采集的历史电流信号数据中截取包含电器投切事件的电流信号数据,并转换为三维复数频谱图,由一个三维复数频谱图及对应的电器类别构成一个电器样本;由多个家庭的电器样本构成训练集;The current signal data including electrical switching events are intercepted from the historical current signal data collected at the bus, and converted into a three-dimensional complex spectrogram. A three-dimensional complex spectrogram and the corresponding electrical appliance category constitute an electrical appliance sample; The electrical samples constitute the training set;

随机从训练集中选取h个家庭,并从每一个家庭的电器样本中随机选取k个,作为当前轮次的训练样本;将所有训练样本中的三维复数频谱图输入特征提取模块进行特征提取,得到相应的电器特征;将所得到的电器特征输入分类器模块,转换为对应的类别标签,并结合真实的电器类别计算类别损失;将所得到的电器特征输入相似性度量模块,对每两个家庭的电器特征进行拼接,由两个属于不同家庭的电器特征构成一个拼接特征,并计算各拼接特征中两个电器特征之间的相似性分数,结合真实的电器类别计算相似性损失;以类别损失和相似性损失之和作为当前轮次的整体损失,并利用反向传播算法对更新待训练模型的各层参数,以最小化整体损失,从而完成当前训练轮次的训练;Randomly select h families from the training set, and randomly select k from the electrical samples of each family as the training samples of the current round; input the three-dimensional complex spectrograms in all training samples into the feature extraction module for feature extraction, and obtain Corresponding electrical features; input the obtained electrical features into the classifier module, convert them into corresponding category labels, and calculate the category loss in combination with the real electrical categories; input the obtained electrical features into the similarity measurement module, for each two households The electrical features are spliced, and a splicing feature is composed of two electrical features belonging to different families, and the similarity score between the two electrical features in each splicing feature is calculated, and the similarity loss is calculated in combination with the real electrical category; The sum of the similarity loss and the loss is used as the overall loss of the current round, and the back-propagation algorithm is used to update the parameters of each layer of the model to be trained to minimize the overall loss, thus completing the training of the current training round;

对待训练模型进行多轮训练,在训练完成后,利用训练好的特征提取模块和分类器模块构成负荷识别模型;Perform multiple rounds of training on the model to be trained, and after the training is completed, use the trained feature extraction module and classifier module to form a load identification model;

其中,相似性分数用于衡量两个电器特征之间的相似度;h≥2,k≥1。Among them, the similarity score is used to measure the similarity between two electrical features; h≥2, k≥1.

本发明在模型训练过程中,所建立的待训练模型在特征提取模块和分类器模块之外,还包括可用于提取属于不同家庭的电器特征之间的相似性分数的相似性度量模块,基于相似性分数可以进一步计算出相似性损失;在训练过程中,则以相似性损失和类别损失之和作为整体损失,通过最小化整体损失,能够在保证负荷类别的识别结果尽量接近于真实类别的基础上,拉近不同用户域中同类电器特征之间的距离,使得属于不同家庭的同类电器在特征空间内相似甚至相同,从而所建立的负荷识别模型在针对任意一个新样本进行负荷识别时,能够基于训练过程中出现过的同类旧样本准确识别新样本对应的负荷类型,能够有效消除由于家庭不同引起的用户域差异,实现用户域泛化。因此,本发明所构建的负荷识别模型具有域泛化能力,利用本发明所构建的负荷识别模型进行非侵入式负荷识别时,能够消除用户域差异所带来的影响,有效提高非侵入式负荷识别的精度。In the model training process of the present invention, in addition to the feature extraction module and the classifier module, the established model to be trained also includes a similarity measurement module that can be used to extract similarity scores between electrical features belonging to different families. The similarity score can be used to further calculate the similarity loss; in the training process, the sum of the similarity loss and the category loss is used as the overall loss. By minimizing the overall loss, the identification result of the load category can be guaranteed to be as close to the basis of the real category as possible. On the other hand, the distance between the characteristics of similar electrical appliances in different user domains is shortened, so that similar electrical appliances belonging to different families are similar or even the same in the feature space, so that the established load identification model can perform load identification for any new sample. The load type corresponding to the new sample can be accurately identified based on the same old samples that have appeared in the training process, which can effectively eliminate the user domain difference caused by different families and realize the generalization of the user domain. Therefore, the load identification model constructed by the present invention has the capability of domain generalization. When the load identification model constructed by the present invention is used for non-intrusive load identification, the influence caused by user domain differences can be eliminated, and the non-intrusive load can be effectively improved. recognition accuracy.

进一步地,本发明提供的具有域泛化能力的非侵入式负荷识别模型构建方法,还包括:Further, the non-invasive load identification model construction method with domain generalization capability provided by the present invention also includes:

(S1)在建立所述负荷识别模型后,选取1个或多个家庭的电器样本构成测试集,测试集和训练集互不重叠;(S1) After establishing the load identification model, select one or more household electrical appliance samples to form a test set, and the test set and the training set do not overlap each other;

(S2)利用测试集中的电器样本对负荷识别模型进行测试,以评估负荷识别模型的识别精度是否满足应用需求,若不满足,则转入步骤(S3);否则,转入步骤(S4);(S2) test the load identification model by using the electrical samples in the test set to evaluate whether the identification accuracy of the load identification model meets the application requirements, if not, then go to step (S3); otherwise, go to step (S4);

(S3)调整训练参数后重新对待训练模型进行训练,在训练结束后,由特征提取模块和分类器模块重新构成负荷识别模型,并转入步骤(S2);(S3) after the training parameters are adjusted, the training model is retrained, and after the training, the load identification model is reconstituted by the feature extraction module and the classifier module, and goes to step (S2);

(S4)测试结束。(S4) The test ends.

本发明在构建负荷识别模型之后,进一步利用不同用户域中的电器样本构成测试集,对负荷识别模型的训练效果进行评估,并在模型的识别精度不满足应用需求时重新进行模型训练,由此能够进一步保证所建立的负荷识别模型具有较好的泛化能力,从而保证负荷识别的准确度。After constructing the load identification model, the present invention further uses electrical samples in different user domains to form a test set, evaluates the training effect of the load identification model, and re-trains the model when the identification accuracy of the model does not meet the application requirements, thereby It can further ensure that the established load identification model has better generalization ability, thereby ensuring the accuracy of load identification.

进一步地,h=2。Further, h=2.

本发明在模型训练的过程中,每次从训练集中随机选取两个家庭的电器样本作为训练样本,从而相似性度量模块在进行特征拼接时,只需简单地将两组家庭的样本对应拼接一次,而不用考虑其他的组合情况,由此能够在保证模型具有较强的域泛化能力的同时,避免因一个轮次中训练样本过多而导致计算量过大,甚至超过硬件计算能力的问题。In the process of model training, the present invention randomly selects electrical samples of two families from the training set as training samples each time, so that the similarity measurement module only needs to simply splicing the samples of two groups of families correspondingly once when performing feature splicing. , without considering other combinations, so that while ensuring the model has strong domain generalization ability, it can avoid the problem that the amount of calculation is too large or even exceeds the computing power of the hardware due to too many training samples in one round. .

进一步地,计算相似性损失时,以拼接特征中两个电器特征之间的相似性分数和拼接特征的相似性标签的二元交叉熵作为单个拼接特征的相似性损失,以当前轮次所有拼接特征的相似性损失的平均值作为当前轮次的相似性损失;Further, when calculating the similarity loss, the similarity score between the two electrical features in the splicing feature and the binary cross entropy of the similarity label of the splicing feature are used as the similarity loss of a single splicing feature, and all splicing in the current round are used as the similarity loss. The average of the similarity loss of features is taken as the similarity loss of the current round;

其中,相似性分数越低,拼接特征中两个电器特征之间的相似度越高;拼接特征的相似性标签用于指示拼接特征所涉及的两个电器的真实类别是否相同。Among them, the lower the similarity score, the higher the similarity between the two electrical features in the splicing feature; the similarity label of the splicing feature is used to indicate whether the true categories of the two electrical appliances involved in the splicing feature are the same.

本发明以相似性分数和相似性标签的二元交叉熵作为单个拼接特征的相似性损失,并以拼接特征的相似性损失的平均值作为当前轮次的相似性损失,从而随着训练过程中,训练的整体损失不断减小,每个轮次的相似损失也不断减小,单个拼接特征的相似性损失也不断减小,最终实现来自不同家庭的同类电器样本获得统一的特征表达,能够有效消除由于家庭不同引起的用户域差异,实现用户域泛化。In the present invention, the binary cross-entropy of the similarity score and the similarity label is used as the similarity loss of a single splicing feature, and the average value of the similarity loss of the splicing feature is used as the similarity loss of the current round, so that with the training process , the overall loss of training continues to decrease, the similarity loss of each round also continues to decrease, and the similarity loss of a single splicing feature also continues to decrease. Finally, the same kind of electrical samples from different households can obtain a unified feature expression, which can effectively Eliminate user domain differences caused by different families and realize user domain generalization.

进一步地,单个拼接特征的相似性损失为:Further, the similarity loss of a single splice feature is:

Figure BDA0002510692370000041
Figure BDA0002510692370000041

其中,l1表示单个拼接特征的相似性损失;y为拼接特征的相似性标签,拼接特征所涉及的两个电器的真实类别相同时,y=0,拼接特征所涉及的两个电器的真实类别不同时,y=1;

Figure BDA0002510692370000042
为拼接特征中两个电器特征之间的相似性得分。Among them, l 1 represents the similarity loss of a single splicing feature; y is the similarity label of the splicing feature. When the true categories of the two electrical appliances involved in the splicing feature are the same, y=0, the real category of the two electrical appliances involved in the splicing feature is the same. When the categories are different, y=1;
Figure BDA0002510692370000042
is the similarity score between two electrical features in the spliced feature.

进一步地,类别损失为交叉熵损失。Further, the class loss is the cross-entropy loss.

进一步地,通过短时傅里叶变换将包含电器投切事件的电流信号数据转换为三维复数频谱图。Further, the current signal data including the electrical switching event is converted into a three-dimensional complex spectrogram through short-time Fourier transform.

按照本发明的另一个方面,提供了一种具有域泛化能力的非侵入式负荷识别方法,包括:实时监测需要识别的目标负荷,并在检测到目标负荷的投切事件时,从总线处采集到的电流信号数据中截取包含该投切事件的电流信号数据;According to another aspect of the present invention, a non-intrusive load identification method with domain generalization capability is provided, comprising: monitoring the target load to be identified in real time, and when detecting the switching event of the target load, from the bus Intercept the current signal data including the switching event from the collected current signal data;

将所截取的电流信号数据转换为三维复数频谱图,并以该三维复数频谱图为输入,利用本发明提供的具有域泛化能力的非侵入式负荷识别模型构建方法得到负荷识别模型识别目标负荷的类型。The intercepted current signal data is converted into a three-dimensional complex spectrogram, and the three-dimensional complex spectrogram is used as input, and the load identification model is obtained by using the non-intrusive load identification model construction method with domain generalization capability provided by the present invention to identify the target load. type.

由于本发明所构建的负荷识别模型具有域泛化能力,因此,本发明利用该模型进行非侵入式负荷识别,能够有效提高识别精度。Since the load identification model constructed by the present invention has the capability of domain generalization, the present invention utilizes the model for non-invasive load identification, which can effectively improve the identification accuracy.

按照本发明的又一个方面,提供了一种具有域泛化能力的非侵入式负荷识别系统,包括:监测模块、转换模块和负荷识别模块;According to another aspect of the present invention, a non-intrusive load identification system with domain generalization capability is provided, comprising: a monitoring module, a conversion module and a load identification module;

监测模块,用于实时监测需要识别的目标负荷,并在检测到目标负荷的投切事件时,从总线处采集到的电流信号数据中截取包含该投切事件的电流信号数据,并触发转换模块;The monitoring module is used to monitor the target load that needs to be identified in real time, and when the switching event of the target load is detected, the current signal data containing the switching event is intercepted from the current signal data collected at the bus, and the conversion module is triggered. ;

转换模块,用于将所截取的电流信号数据转换为三维复数频谱图,并触发负荷识别模块;The conversion module is used to convert the intercepted current signal data into a three-dimensional complex spectrogram, and trigger the load identification module;

负荷识别模块,用于以转换模块输出的三维复数频谱图为输入,利用本发明提供的具有域泛化能力的非侵入式负荷识别模型构建方法得到负荷识别模型识别目标负荷的类型。The load identification module is used for inputting the three-dimensional complex spectrogram output by the conversion module, and using the non-intrusive load identification model construction method with domain generalization capability provided by the present invention to obtain the load identification model to identify the type of target load.

总体而言,通过本发明所构思的以上技术方案,能够取得以下有益效果:In general, through the above technical solutions conceived by the present invention, the following beneficial effects can be achieved:

(1)本发明通过在待训练模型中引入用于计算属于不同家庭的电器特征之间的相似性分数的相似性度量模块,并在训练过程中,以相似性损失和类别损失之和作为整体损失,能够实现来自不同家庭的同类电器样本获得统一的特征表达,有效消除由于家庭不同引起的用户域差异,实现用户域泛化。因此,本发明所构建的负荷识别模型具有域泛化能力,利用本发明所构建的负荷识别模型进行非侵入式负荷识别时,能够消除用户域差异所带来的影响,有效提高非侵入式负荷识别的精度。(1) In the present invention, a similarity measurement module for calculating similarity scores between electrical features belonging to different families is introduced into the model to be trained, and in the training process, the sum of similarity loss and category loss is used as a whole Loss, can achieve unified feature expression for similar electrical samples from different families, effectively eliminate user domain differences caused by different families, and achieve user domain generalization. Therefore, the load identification model constructed by the present invention has the capability of domain generalization. When the load identification model constructed by the present invention is used for non-intrusive load identification, the influence caused by user domain differences can be eliminated, and the non-intrusive load can be effectively improved. recognition accuracy.

(2)本发明可以实时监测到待识别的负荷投切事件,并且在识别时仅需截取一段包含电器投切事件的电流信号数据,反馈及时,准确度高。(2) The present invention can monitor the load switching event to be identified in real time, and only needs to intercept a section of current signal data including the electrical switching event during identification, with timely feedback and high accuracy.

(3)本发明利用域泛化的思想,训练集和测试集采用不同家庭的电器样本,并使得训练集中各家庭同类电器样本得到统一的特征表达,削弱了电器样本的用户域特征,使得模型的泛化能力增强,在新的用户场景应用时,仍然能够保持较好的精度,不需要重新训练。(3) The present invention utilizes the idea of domain generalization. The training set and the test set use electrical samples from different families, and the same kind of electrical samples of each family in the training set obtain a unified feature expression, which weakens the user domain characteristics of the electrical samples, and makes the model The generalization ability is enhanced, and when new user scenarios are applied, it can still maintain good accuracy without retraining.

附图说明Description of drawings

图1为本发明实施例提供的具有域泛化能力的非侵入式负荷识别模型构建方法流程图;1 is a flowchart of a method for constructing a non-intrusive load identification model with domain generalization capability provided by an embodiment of the present invention;

图2为本发明实施例提供的待训练模型的结构示意图;2 is a schematic structural diagram of a model to be trained provided by an embodiment of the present invention;

图3为本发明实施例提供的具有域泛化能力的非侵入式负荷识别方法流程图。FIG. 3 is a flowchart of a non-intrusive load identification method with domain generalization capability provided by an embodiment of the present invention.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。此外,下面所描述的本发明各个实施方式中所涉及到的技术特征只要彼此之间未构成冲突就可以相互组合。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

在本发明中,本发明及附图中的术语“第一”、“第二”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。In the present invention, the terms "first", "second" and the like (if present) in the present invention and the accompanying drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

为了构建一个具有域泛化能力的非侵入式负荷识别模型,在本发明的一个实施例中,提供了一种具有域泛化能力的非侵入式负荷识别模型构建方法,如图1所示,包括:In order to construct a non-intrusive load identification model with domain generalization ability, in an embodiment of the present invention, a method for constructing a non-intrusive load identification model with domain generalization ability is provided, as shown in FIG. 1 , include:

基于深度神经网络建立待训练模型,如图2所示,待训练模型包括:特征提取模块、分类器模块和相似性度量模块;其中,特征提取模块用于对三维复数频谱图进行特征提取,得到相应的电器特征;分类器模块用于将特征提取模块提取得到的电器特征转换为电器的类别标签;相似性度量模块用于将两个属于不同家庭的电器特征进行拼接,得到拼接特征,并计算拼接特征中两个电器特征之间的相似性得分,该相似性得分用于衡量两个电器特征之间的相似度;A model to be trained is established based on a deep neural network. As shown in Figure 2, the model to be trained includes: a feature extraction module, a classifier module and a similarity measurement module; wherein, the feature extraction module is used to perform feature extraction on the three-dimensional complex spectrogram to obtain Corresponding electrical features; the classifier module is used to convert the electrical features extracted by the feature extraction module into the category labels of electrical appliances; the similarity measurement module is used to splicing two electrical features belonging to different families to obtain splicing features, and calculate The similarity score between the two electrical features in the spliced feature, the similarity score is used to measure the similarity between the two electrical features;

从在总线处采集的历史电流信号数据中截取包含电器投切事件的电流信号数据,并转换为三维复数频谱图,由一个三维复数频谱图及对应的电器类别构成一个电器样本;由多个家庭的电器样本构成训练集;The current signal data including electrical switching events are intercepted from the historical current signal data collected at the bus, and converted into a three-dimensional complex spectrogram. A three-dimensional complex spectrogram and the corresponding electrical appliance category constitute an electrical appliance sample; The electrical samples constitute the training set;

随机从训练集中选取h=2个家庭,并从每一个家庭的电器样本中随机选取k=32个,共h×k=64个电器样本,作为当前轮次的训练样本;将所有训练样本中的三维复数频谱图输入特征提取模块进行特征提取,得到相应的电器特征,共得到64个电器特征;将所得到的电器特征输入分类器模块,转换为对应的类别标签,并结合真实的电器类别计算类别损失;将所得到的电器特征输入相似性度量模块,对所选取的两个家庭的电器特征进行拼接,由两个属于不同家庭的电器特征构成一个拼接特征,具体地,将来源于第一个家庭的32个电器特征和来源于第二个家庭的32个电器特征对应拼接,共拼接得到32个拼接特征,并计算各拼接特征中两个电器特征之间的相似性分数,共得到32个相似性得分,结合真实的电器类别计算相似性损失;以类别损失和相似性损失之和作为当前轮次的整体损失,并利用反向传播算法对更新待训练模型的各层参数,以最小化整体损失,从而完成当前训练轮次的训练;Randomly select h=2 households from the training set, and randomly select k=32 electrical appliances samples from each household, a total of h×k=64 electrical appliances samples, as the training samples of the current round; The three-dimensional complex spectrogram is input into the feature extraction module for feature extraction, and the corresponding electrical features are obtained, and a total of 64 electrical features are obtained; the obtained electrical features are input into the classifier module, converted into corresponding category labels, and combined with real electrical categories Calculate the category loss; input the obtained electrical features into the similarity measurement module, splicing the electrical features of the two selected families, and form a splicing feature from two electrical features belonging to different families. The 32 electrical features of one family and the 32 electrical features from the second family are correspondingly spliced, and a total of 32 splicing features are obtained by splicing, and the similarity score between the two electrical features in each splicing feature is calculated, and a total of 32 similarity scores, combined with the real electrical categories to calculate the similarity loss; the sum of the category loss and similarity loss is used as the overall loss of the current round, and the back-propagation algorithm is used to update the parameters of each layer of the model to be trained. Minimize the overall loss to complete the current training epoch;

对待训练模型进行30轮训练,在训练完成后,利用训练好的特征提取模块和分类器模块构成负荷识别模型。The to-be-trained model is trained for 30 rounds. After the training is completed, the trained feature extraction module and the classifier module are used to form a load identification model.

如图2所示,本实施例中,特征提取模块为卷积神经网络DenseNet-121,相似性度量模块包括:3个级联的全连接层FC(1)~FC(3),分类器模块包括1个全连接层FC(4);应当说明的是,此处仅为本发明一种可选的实施方式,不应理解为对本发明的唯一限定;在本发明其他的一些实施例中,特征提取模块也可由其他可进行特征提取的模型替代,相似性度量模块中级联的全连接层的层数也可设置为其他参数,甚至可以采用其他的实施方式实现相似性度量模块,同样,分类器模块也可由多个级联的全连接层实现,或者采用其他的实施方式实现;As shown in Figure 2, in this embodiment, the feature extraction module is a convolutional neural network DenseNet-121, and the similarity measurement module includes: three cascaded fully connected layers FC(1)-FC(3), a classifier module It includes one fully connected layer FC(4); it should be noted that this is only an optional implementation manner of the present invention, and should not be construed as the only limitation of the present invention; in other embodiments of the present invention, The feature extraction module can also be replaced by other models capable of feature extraction. The number of cascaded fully connected layers in the similarity measurement module can also be set to other parameters, and even other implementations can be used to implement the similarity measurement module. Similarly, The classifier module can also be implemented by multiple cascaded fully connected layers, or implemented by other implementations;

本实施例中,相似性度量模块中的最后一个全连接层的激活函数为sigmoid函数,分类器模块中的最后一个全连接层的激活函数为softmax函数,其余全连接层的激活函数均为ReLU函数;同样,此处仅为本发明可选的实施方式,不应理解为对本发明的唯一限定。In this embodiment, the activation function of the last fully connected layer in the similarity measurement module is the sigmoid function, the activation function of the last fully connected layer in the classifier module is the softmax function, and the activation functions of the remaining fully connected layers are ReLU function; also, this is only an optional embodiment of the present invention, and should not be construed as the sole limitation of the present invention.

如图1所示,本实施例所提供的具有域泛化能力的非侵入式负荷识别模型构建方法,还包括:As shown in FIG. 1 , the method for constructing a non-invasive load identification model with domain generalization capability provided by this embodiment further includes:

(S1)在建立所述负荷识别模型后,选取1个或多个家庭的电器样本构成测试集,测试集和训练集互不重叠;(S1) After establishing the load identification model, select one or more household electrical appliance samples to form a test set, and the test set and the training set do not overlap each other;

(S2)利用测试集中的电器样本对负荷识别模型进行测试,以评估负荷识别模型的识别精度是否满足应用需求,若不满足,则转入步骤(S3);否则,转入步骤(S4);(S2) test the load identification model by using the electrical samples in the test set to evaluate whether the identification accuracy of the load identification model meets the application requirements, if not, then go to step (S3); otherwise, go to step (S4);

(S3)调整训练参数后重新对待训练模型进行训练,在训练结束后,由特征提取模块和分类器模块重新构成负荷识别模型,并转入步骤(S2);(S3) after the training parameters are adjusted, the training model is retrained, and after the training, the load identification model is reconstituted by the feature extraction module and the classifier module, and goes to step (S2);

(S4)测试结束。(S4) The test ends.

本实施例在构建负荷识别模型之后,进一步利用不同用户域中的电器样本构成测试集,对负荷识别模型的训练效果进行评估,并在模型的识别精度不满足应用需求时重新进行模型训练,由此能够进一步保证所建立的负荷识别模型具有较好的泛化能力,从而保证负荷识别的准确度。In this embodiment, after the load identification model is constructed, a test set is further formed by using electrical samples in different user domains, the training effect of the load identification model is evaluated, and the model training is re-trained when the identification accuracy of the model does not meet the application requirements. This can further ensure that the established load identification model has good generalization ability, thereby ensuring the accuracy of load identification.

本实施例中,h=2,即每次从训练集中随机选取两个家庭的电器样本作为当前轮次的训练样本,从而相似性度量模块在进行特征拼接时,只需简单地将两组家庭的样本对应拼接一次,相比于其他取值,例如h=3时,三个家庭两两组合,共需对应拼接3次,又例如,h=4时,四个家庭两两组合,共需对应拼接6次,本实施例能够有效减少每个轮次的训练样本数量,从而减小计算量,并且实验数据表明,每个轮次仅选取两个家庭的电器样本作为训练样本,最终得到的负荷识别模型已经具有较强的域泛化能力。因此,本实施例能够在保证模型具有较强的域泛化能力的同时,避免因一个轮次中训练样本过多而导致计算量过大,甚至超过硬件计算能力的问题;In this embodiment, h=2, that is, the electrical samples of two households are randomly selected from the training set as the training samples of the current round, so that the similarity measurement module only needs to simply combine the two groups of households when performing feature splicing. The samples corresponding to splicing once, compared to other values, for example, when h=3, three households are combined in twos, and a total of 3 corresponding splices are required. For another example, when h=4, four households are combined in twos, a total of Corresponding to 6 times of splicing, this embodiment can effectively reduce the number of training samples in each round, thereby reducing the amount of calculation, and the experimental data shows that only two household electrical samples are selected as training samples in each round, and the final obtained The load identification model already has strong domain generalization ability. Therefore, this embodiment can ensure that the model has a strong domain generalization ability, and at the same time avoid the problem that the amount of calculation is too large due to too many training samples in one round, or even exceeds the computing power of the hardware;

应当说明的是,h=2仅为本发明的一种优选的实施方式,不应理解为对本发明的唯一限定;在其他应用场景下,如果对模型的域泛化能力有更高的要求,h也可相应设置为更大的取值。It should be noted that h=2 is only a preferred embodiment of the present invention, and should not be construed as the only limitation of the present invention; in other application scenarios, if there are higher requirements for the domain generalization ability of the model, h can also be set to a larger value accordingly.

本实施例中,计算相似性损失时,以拼接特征中两个电器特征之间的相似性分数和拼接特征的相似性标签的二元交叉熵作为单个拼接特征的相似性损失,以当前轮次所有拼接特征的相似性损失的平均值作为当前轮次的相似性损失;In this embodiment, when calculating the similarity loss, the similarity score between two electrical features in the splicing feature and the binary cross entropy of the similarity label of the splicing feature are used as the similarity loss of a single splicing feature, and the current round The average of the similarity losses of all spliced features is taken as the similarity loss of the current round;

其中,相似性分数越低,拼接特征中两个电器特征之间的相似度越高,相似性分数也可理解为两个电器特征之间的归一化之后的距离,其值介于0到1之间;拼接特征的相似性标签用于指示拼接特征所涉及的两个电器的真实类别是否相同;Among them, the lower the similarity score, the higher the similarity between the two electrical features in the splicing feature, the similarity score can also be understood as the normalized distance between the two electrical features, and its value ranges from 0 to 1; the similarity label of the splicing feature is used to indicate whether the true categories of the two appliances involved in the splicing feature are the same;

具体地,计算单个拼接特征的相似性损失的公式为:Specifically, the formula for calculating the similarity loss of a single splice feature is:

Figure BDA0002510692370000091
Figure BDA0002510692370000091

其中,l1表示单个拼接特征的相似性损失;y为拼接特征的相似性标签,拼接特征所涉及的两个电器的真实类别相同时,y=0,拼接特征所涉及的两个电器的真实类别不同时,y=1;

Figure BDA0002510692370000092
为拼接特征中两个电器特征之间的相似性得分;Among them, l 1 represents the similarity loss of a single splicing feature; y is the similarity label of the splicing feature. When the true categories of the two electrical appliances involved in the splicing feature are the same, y=0, the real category of the two electrical appliances involved in the splicing feature is the same. When the categories are different, y=1;
Figure BDA0002510692370000092
is the similarity score between the two electrical features in the spliced feature;

在本发明其他的一些实施例中,也可根据均方误差等其他方式计算单个拼接特征以及整体的相似性损失;In some other embodiments of the present invention, the single stitching feature and the overall similarity loss may also be calculated according to other methods such as mean square error;

本实施例中,类别损失为交叉熵损失,相应的计算公式为:In this embodiment, the category loss is the cross entropy loss, and the corresponding calculation formula is:

Figure BDA0002510692370000101
Figure BDA0002510692370000101

其中,l2表示类别损失,C为类别数,yi为类别标签独热码编码后的长度为C的类别标签向量的第i位,独热码编码的结果中C位的向量只有该类别位置为1,其他位为0,zi为分类器模块输出的长度为C的向量的第i位,分类器模块输出的向量的每一位表示属于对应类别的概率值;Among them, l 2 represents the category loss, C is the number of categories, y i is the ith bit of the category label vector of length C after the one-hot code encoding of the category label, and the vector of the C-bit in the result of the one-hot code encoding only has this category The position is 1, the other bits are 0, zi is the ith bit of the vector of length C output by the classifier module, and each bit of the vector output by the classifier module represents the probability value belonging to the corresponding category;

本实施例中,所截取的包含电器投切事件的电流信号数据的长度相等(例如均为7s),并且转换得到的三维复数频谱图中,三个维度分别是频率维度、时间维度、实部与虚部维度;可选地,在本实施例中,通过短时傅里叶变换将包含电器投切事件的电流信号数据转换为三维复数频谱图。In this embodiment, the lengths of the intercepted current signal data including electrical switching events are equal (for example, both are 7s), and in the three-dimensional complex spectrum obtained by conversion, the three dimensions are the frequency dimension, the time dimension, and the real part respectively. and the imaginary part dimension; optionally, in this embodiment, the current signal data including the electrical switching event is converted into a three-dimensional complex spectrogram through short-time Fourier transform.

总的来说,本实施例通过在待训练模型中引入用于计算属于不同家庭的电器特征之间的相似性分数的相似性度量模块,并在训练过程中,以相似性损失和类别损失之和作为整体损失,能够实现来自不同家庭的同类电器样本获得统一的特征表达,有效消除由于家庭不同引起的用户域差异,实现用户域泛化。In general, in this embodiment, a similarity measurement module for calculating similarity scores between electrical features belonging to different households is introduced into the model to be trained, and in the training process, the similarity loss and the category loss are calculated by As the overall loss, it can achieve unified feature expression for similar electrical samples from different families, effectively eliminate user domain differences caused by different families, and achieve user domain generalization.

在本发明的另一个实施例中,提供了一种具有域泛化能力的非侵入式负荷识别方法,如图3所示,包括:In another embodiment of the present invention, a non-invasive load identification method with domain generalization capability is provided, as shown in FIG. 3 , including:

获得电力数据样本:实时监测需要识别的目标负荷,并在检测到目标负荷的投切事件时,从总线处采集到的电流信号数据中截取包含该投切事件的电流信号数据;Obtain power data samples: monitor the target load to be identified in real time, and when detecting the switching event of the target load, intercept the current signal data containing the switching event from the current signal data collected at the bus;

样本转换为三维复数频谱图:将所截取的电流信号数据转换为三维复数频谱图;Convert the sample to a three-dimensional complex spectrogram: convert the intercepted current signal data into a three-dimensional complex spectrogram;

检测待识别的目标负荷类别:以该三维复数频谱图为输入,利用上述实施例提供的具有域泛化能力的非侵入式负荷识别模型构建方法得到负荷识别模型识别目标负荷的类型。Detecting the target load category to be identified: using the three-dimensional complex spectrogram as an input, using the non-intrusive load identification model construction method with domain generalization capability provided by the above embodiment to obtain the load identification model to identify the target load type.

由于上述实施例所构建的负荷识别模型具有域泛化能力,因此,本实施例利用该模型进行非侵入式负荷识别,能够有效提高识别精度。Since the load identification model constructed in the above embodiment has the capability of domain generalization, this embodiment uses the model to perform non-intrusive load identification, which can effectively improve the identification accuracy.

在本发明的又一个实施例中,提供了一种具有域泛化能力的非侵入式负荷识别系统,包括:监测模块、转换模块和负荷识别模块;In yet another embodiment of the present invention, a non-intrusive load identification system with domain generalization capability is provided, comprising: a monitoring module, a conversion module and a load identification module;

监测模块,用于实时监测需要识别的目标负荷,并在检测到目标负荷的投切事件时,从总线处采集到的电流信号数据中截取包含该投切事件的电流信号数据,并触发转换模块;The monitoring module is used to monitor the target load that needs to be identified in real time, and when the switching event of the target load is detected, the current signal data containing the switching event is intercepted from the current signal data collected at the bus, and the conversion module is triggered. ;

转换模块,用于将所截取的电流信号数据转换为三维复数频谱图,并触发负荷识别模块;The conversion module is used to convert the intercepted current signal data into a three-dimensional complex spectrogram, and trigger the load identification module;

负荷识别模块,用于以转换模块输出的三维复数频谱图为输入,利用上述实施例提供的具有域泛化能力的非侵入式负荷识别模型构建方法得到负荷识别模型识别目标负荷的类型。The load identification module is configured to take the three-dimensional complex spectrogram output by the conversion module as input, and obtain the load identification model to identify the type of target load by using the non-intrusive load identification model construction method with domain generalization capability provided by the above embodiment.

以下结合一个具体的应用实例,对本发明的技术方案及所能取得的有益效果做进一步说明:Below in conjunction with a specific application example, the technical scheme of the present invention and the beneficial effects that can be obtained are further described:

使用公开家用电器数据集UK-DALE(UK domestic appliance-level electricitydataset),数据集内包含5个家庭(依次记为家庭1~家庭5)的用电负荷数据,记录了1/6Hz的总线和分表数据。其中家庭1、2、5还含有16kHz的高频总线数据,为了绘制时谱图并且应用上述实施例中所提供的负荷识别模型构建方法和负荷识别方法,选用这3个家庭的电流数据。同时,为了避免频率轴过长导致时谱图纵横比失衡,将数据降采样到2kHz。Using the public household appliance data set UK-DALE (UK domestic appliance-level electricity dataset), the data set contains the electricity load data of 5 households (recorded as household 1 to household 5 in turn), and recorded 1/6Hz bus and minute data. table data. Among them, households 1, 2, and 5 also contain high-frequency bus data of 16 kHz. In order to draw the time spectrum diagram and apply the load identification model construction method and load identification method provided in the above embodiment, the current data of these three households are selected. At the same time, in order to avoid the imbalance of the aspect ratio of the time-spectrogram due to the long frequency axis, the data is downsampled to 2kHz.

为了体现本发明对网络泛化能力的作用,将家庭1和5的数据作为训练集,家庭2的数据作为测试集,截取包含电器状态变化的7秒电流数据作为样本,同时将该电流数据进行短时傅里叶变换处理成复数时谱图,得到的时谱图尺寸为224×100×2,三个维度分别代表频率、时间和实/虚部,将时谱图作为模型输入。In order to reflect the effect of the present invention on the network generalization ability, the data of households 1 and 5 are used as the training set, the data of household 2 is used as the test set, and the 7-second current data including the state change of the electrical appliance is intercepted as a sample. The short-time Fourier transform is processed into a complex time-spectrogram. The size of the obtained time-spectrogram is 224×100×2. The three dimensions represent frequency, time, and real/imaginary parts respectively. The time-spectrogram is used as the model input.

在数据集UK-DALE中选取了3个家庭公共的7个电器,分别时:水壶、冰箱、洗碗机、微波炉、洗衣机、电脑和跑步机。In the dataset UK-DALE, 7 common appliances in 3 households are selected, namely: kettle, refrigerator, dishwasher, microwave oven, washing machine, computer and treadmill.

建立如图2所示的负荷识别模型,相似性度量模块中包含全连接层FC(1)、FC(2)和FC(3),输出维度分别是1024、64和1。分类器模块中包含1个全连接层FC(4),输出维度为7。FC(1)、FC(2)的激活函数为ReLU,FC(3)的激活函数为sigmoid,FC(4)的激活函数为softmax。训练过程中使用Adam优化器,学习率0.001,分类损失为多类交叉熵,相似性损失为二元交叉熵,总的迭代次数为1500次。The load identification model shown in Figure 2 is established. The similarity measurement module includes fully connected layers FC(1), FC(2) and FC(3), and the output dimensions are 1024, 64 and 1, respectively. The classifier module contains a fully connected layer FC(4) with an output dimension of 7. The activation function of FC(1) and FC(2) is ReLU, the activation function of FC(3) is sigmoid, and the activation function of FC(4) is softmax. The Adam optimizer is used in the training process, the learning rate is 0.001, the classification loss is multi-class cross entropy, the similarity loss is binary cross entropy, and the total number of iterations is 1500.

利用家庭1和家庭5的样本进行模型训练,训练完成后对家庭2的样本进行测试。采用F1分数对结果进行衡量,F1分数(F1-score)是查准率和查全率的调和平均数,计算方式如下:Model training is performed on the samples of family 1 and family 5, and the samples of family 2 are tested after the training is completed. The results are measured by F1-score, which is the harmonic mean of precision and recall, calculated as follows:

Figure BDA0002510692370000121
Figure BDA0002510692370000121

其中,TP表示样本被正确识别的事件数,FN表示是该类别但未被识别为该类别的事件数,FP表示被识别为该类别但不是该类别的事件数。Among them, TP indicates the number of events for which the sample is correctly identified, FN indicates the number of events of this category but not identified as this category, and FP indicates the number of events identified as this category but not of this category.

表1负荷识别模型在UK-DALE数据集上的识别效果Table 1 The recognition effect of the load recognition model on the UK-DALE dataset

Figure BDA0002510692370000122
Figure BDA0002510692370000122

负荷识别结果如表1所示,根据结果可知,上述具有域泛化能力的非侵入式负荷识别方法可以使得模型具有较好的泛化能力,在跨用户的场景中表现良好,特别是洗衣机和洗碗机这两种多模式而且域差异较大的电器。The load identification results are shown in Table 1. According to the results, the above-mentioned non-intrusive load identification method with domain generalization ability can make the model have good generalization ability and perform well in cross-user scenarios, especially washing machines and Dishwashers are two multi-mode and widely different appliances.

本领域的技术人员容易理解,以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。Those skilled in the art can easily understand that the above are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention, etc., All should be included within the protection scope of the present invention.

Claims (9)

1. A non-invasive load identification model construction method with domain generalization capability is characterized by comprising the following steps:
establishing a model to be trained based on a deep neural network, wherein the model to be trained comprises: the device comprises a feature extraction module, a classifier module and a similarity measurement module;
intercepting current signal data containing an electric appliance switching event from historical current signal data collected at a bus, converting the current signal data into a three-dimensional complex spectrogram, and forming an electric appliance sample by the three-dimensional complex spectrogram and a corresponding electric appliance category; forming a training set by electric appliance samples of a plurality of families;
randomly selecting h families from the training set, and randomly selecting k families from the electric appliance samples of each family as training samples of the current round; inputting the three-dimensional complex frequency spectrograms in all the training samples into the feature extraction module for feature extraction to obtain corresponding electrical appliance features; inputting the obtained electric appliance characteristics into the classifier module, converting the electric appliance characteristics into corresponding category labels, and calculating category loss by combining real electric appliance categories; inputting the obtained electrical appliance characteristics into the similarity measurement module, splicing the electrical appliance characteristics of every two families, forming a splicing characteristic by the two electrical appliance characteristics belonging to different families, calculating a similarity score between the two electrical appliance characteristics in each splicing characteristic, and calculating a similarity loss by combining real electrical appliance categories; taking the sum of the category loss and the similarity loss as the overall loss of the current round, and updating parameters of each layer of the model to be trained by using a back propagation algorithm to minimize the overall loss so as to finish the training of the current round;
performing multi-round training on the model to be trained, and after the training is finished, forming a load identification model by using the trained feature extraction module and the classifier module;
wherein, the similarity score is used for measuring the similarity between the two electric appliance characteristics; h is more than or equal to 2, and k is more than or equal to 1.
2. The method for constructing a non-invasive load recognition model with domain generalization capability according to claim 1, further comprising:
(S1) after the load recognition model is established, selecting 1 or more household electrical appliance samples to form a test set, wherein the test set and the training set are not overlapped with each other;
(S2) testing the load identification model by using the electric appliance samples in the test set to evaluate whether the identification precision of the load identification model meets the application requirement, and if not, turning to the step (S3); otherwise, go to step (S4);
(S3) regulating training parameters, then retraining the model to be trained, after training, reconstructing a load recognition model by the feature extraction module and the classifier module, and turning to the step (S2);
(S4) the test is ended.
3. The method for constructing a non-invasive load identification model with domain generalization capability according to claim 1 or 2, wherein h is 2.
4. The method for constructing the non-invasive load identification model with the domain generalization capability according to claim 1 or 2, wherein when the similarity loss is calculated, the similarity loss of a single splicing feature is determined by using the similarity score between two electrical appliance features in the splicing feature and the binary cross entropy of the similarity label of the splicing feature, and the average value of the similarity losses of all the splicing features in the current round is determined as the similarity loss in the current round;
the lower the similarity score is, the higher the similarity between the two electrical appliance characteristics in the splicing characteristics is; the similarity label of the stitching feature is used to indicate whether the genres of the two appliances involved in the stitching feature are the same.
5. The method for non-intrusive load identification with domain generalization capability of claim 4, wherein the similarity loss of a single stitching feature is:
Figure FDA0002510692360000021
wherein l1Representing a loss of similarity of individual stitching features; y is a similarity label of the splicing characteristics, when the real categories of the two electric appliances related to the splicing characteristics are the same, y is 0, when the real categories of the two electric appliances related to the splicing characteristics are different, y is 1;
Figure FDA0002510692360000022
a similarity score between two electrical features in the stitched feature.
6. The method for constructing a non-invasive load recognition model with domain generalization capability according to claim 1 or 2, wherein the class loss is a cross-entropy loss.
7. The method for constructing a non-invasive load identification model with domain generalization capability according to claim 1 or 2, wherein the current signal data containing the appliance switching event is converted into a three-dimensional complex spectrogram by short-time Fourier transform.
8. A method for non-intrusive load identification with domain generalization capability, comprising: monitoring a target load to be identified in real time, and intercepting current signal data containing a switching event from current signal data collected from a bus when the switching event of the target load is detected;
converting the intercepted current signal data into a three-dimensional complex spectrogram, taking the three-dimensional complex spectrogram as an input, and identifying the type of the target load by using the load identification model obtained by the non-invasive load identification model construction method with the domain generalization capability of any one of claims 1 to 7.
9. A non-intrusive load identification system with domain generalization capability, comprising: the system comprises a monitoring module, a conversion module and a load identification module;
the monitoring module is used for monitoring a target load to be identified in real time, intercepting current signal data containing a switching event from current signal data collected from a bus when the switching event of the target load is detected, and triggering the conversion module;
the conversion module is used for converting the intercepted current signal data into a three-dimensional complex frequency spectrogram and triggering the load identification module;
the load identification module is used for obtaining a load identification model by taking the three-dimensional complex spectrogram output by the conversion module as input and utilizing the non-invasive load identification model construction method with the domain generalization capability of any one of claims 1 to 7 to identify the type of the target load.
CN202010460278.2A 2020-05-27 2020-05-27 Non-invasive load identification model construction method, load identification method and system Expired - Fee Related CN111639586B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010460278.2A CN111639586B (en) 2020-05-27 2020-05-27 Non-invasive load identification model construction method, load identification method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010460278.2A CN111639586B (en) 2020-05-27 2020-05-27 Non-invasive load identification model construction method, load identification method and system

Publications (2)

Publication Number Publication Date
CN111639586A true CN111639586A (en) 2020-09-08
CN111639586B CN111639586B (en) 2022-03-18

Family

ID=72329056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010460278.2A Expired - Fee Related CN111639586B (en) 2020-05-27 2020-05-27 Non-invasive load identification model construction method, load identification method and system

Country Status (1)

Country Link
CN (1) CN111639586B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112180193A (en) * 2020-09-28 2021-01-05 华中科技大学 Non-invasive load identification system and method based on track image identification
CN113033821A (en) * 2021-03-29 2021-06-25 上海思创电器设备有限公司 Load identification machine learning system applied to algorithm core unit
CN113393121A (en) * 2021-06-15 2021-09-14 贵州电网有限责任公司 Non-invasive load identification method based on load power fingerprint characteristics
CN113469836A (en) * 2021-05-28 2021-10-01 国网上海市电力公司 Automatic feature extraction method and system suitable for non-intrusive load identification
CN114818827A (en) * 2022-05-19 2022-07-29 国网江苏省电力有限公司营销服务中心 A non-intrusive load decomposition method based on seq2point network
CN114966275A (en) * 2022-05-20 2022-08-30 国网江苏省电力有限公司苏州供电分公司 Non-intrusive residential load monitoring method and device
CN116610922A (en) * 2023-07-13 2023-08-18 浙江大学滨江研究院 Non-invasive load identification method and system based on multi-strategy learning
CN118133190A (en) * 2024-04-30 2024-06-04 浙江大学滨江研究院 Load identification model construction method and load identification method based on BN relation network

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8560134B1 (en) * 2010-09-10 2013-10-15 Kwangduk Douglas Lee System and method for electric load recognition from centrally monitored power signal and its application to home energy management
CN106096726A (en) * 2016-05-31 2016-11-09 华北电力大学 A kind of non-intrusion type load monitoring method and device
CN108132379A (en) * 2017-12-11 2018-06-08 武汉大学 Non-intrusion type load monitor system and recognition methods based on cloud platform
CN109508908A (en) * 2018-12-25 2019-03-22 深圳市城市公共安全技术研究院有限公司 Non-invasive load recognition model training method, load monitoring method and device
CN110119545A (en) * 2019-04-24 2019-08-13 西安理工大学 A kind of non-intrusive electrical load recognition methods based on stack self-encoding encoder
KR102081912B1 (en) * 2018-11-15 2020-02-26 광주과학기술원 Operating method of building load identification system using mask estimation method based deep learning
CN110991263A (en) * 2019-11-12 2020-04-10 华中科技大学 A non-intrusive load identification method and system against background load interference

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8560134B1 (en) * 2010-09-10 2013-10-15 Kwangduk Douglas Lee System and method for electric load recognition from centrally monitored power signal and its application to home energy management
CN106096726A (en) * 2016-05-31 2016-11-09 华北电力大学 A kind of non-intrusion type load monitoring method and device
CN108132379A (en) * 2017-12-11 2018-06-08 武汉大学 Non-intrusion type load monitor system and recognition methods based on cloud platform
KR102081912B1 (en) * 2018-11-15 2020-02-26 광주과학기술원 Operating method of building load identification system using mask estimation method based deep learning
CN109508908A (en) * 2018-12-25 2019-03-22 深圳市城市公共安全技术研究院有限公司 Non-invasive load recognition model training method, load monitoring method and device
CN110119545A (en) * 2019-04-24 2019-08-13 西安理工大学 A kind of non-intrusive electrical load recognition methods based on stack self-encoding encoder
CN110991263A (en) * 2019-11-12 2020-04-10 华中科技大学 A non-intrusive load identification method and system against background load interference

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
AHMED F. EBRAHIM 等: ""Household Load Forecasting Based on a Pre-Processing Non-Intrusive Load Monitoring Techniques"", 《2018 IEEE GREEN TECHNOLOGIES CONFERENCE (GREENTECH)》 *
阿蓉: ""场景自适应的非侵入式负荷识别算法研究"", 《中国优秀硕士学位论文全文数据库-工程科技Ⅱ辑》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112180193A (en) * 2020-09-28 2021-01-05 华中科技大学 Non-invasive load identification system and method based on track image identification
CN112180193B (en) * 2020-09-28 2021-11-02 华中科技大学 A non-invasive load recognition system and method based on trajectory image recognition
CN113033821A (en) * 2021-03-29 2021-06-25 上海思创电器设备有限公司 Load identification machine learning system applied to algorithm core unit
CN113469836A (en) * 2021-05-28 2021-10-01 国网上海市电力公司 Automatic feature extraction method and system suitable for non-intrusive load identification
CN113393121A (en) * 2021-06-15 2021-09-14 贵州电网有限责任公司 Non-invasive load identification method based on load power fingerprint characteristics
CN114818827A (en) * 2022-05-19 2022-07-29 国网江苏省电力有限公司营销服务中心 A non-intrusive load decomposition method based on seq2point network
CN114966275A (en) * 2022-05-20 2022-08-30 国网江苏省电力有限公司苏州供电分公司 Non-intrusive residential load monitoring method and device
CN116610922A (en) * 2023-07-13 2023-08-18 浙江大学滨江研究院 Non-invasive load identification method and system based on multi-strategy learning
CN118133190A (en) * 2024-04-30 2024-06-04 浙江大学滨江研究院 Load identification model construction method and load identification method based on BN relation network

Also Published As

Publication number Publication date
CN111639586B (en) 2022-03-18

Similar Documents

Publication Publication Date Title
CN111639586A (en) Non-invasive load identification model construction method, load identification method and system
Heo et al. Toward load identification based on the Hilbert transform and sequence to sequence long short-term memory
Tabatabaei et al. Toward non-intrusive load monitoring via multi-label classification
CN110991263B (en) Non-invasive load identification method and system for resisting background load interference
CN103020459B (en) A kind of cognitive method of various dimensions electricity consumption behavior and system
Morais et al. Competitive autoassociative neural networks for electrical appliance identification for non-intrusive load monitoring
CN111368904A (en) A method for identifying electrical equipment based on power fingerprints
CN109359665A (en) A method and device for load identification of household appliances based on support vector machine
Dash et al. A very deep one dimensional convolutional neural network (VDOCNN) for appliance power signature classification
Ghosh et al. Non-intrusive identification of harmonic polluting loads in a smart residential system
CN113920362B (en) A non-intrusive load decomposition method based on attention
Saha et al. Comprehensive NILM framework: Device type classification and device activity status monitoring using capsule network
He et al. InFocus: Amplifying critical feature influence on non-intrusive load monitoring through self-attention mechanisms
CN116681186B (en) Power quality analysis method and device based on intelligent terminal
CN114492671B (en) Non-invasive household load identification method based on improved FCM clustering algorithm and MLP neural network
CN112184020A (en) A non-intrusive load identification fusion decision-making method and system
CN109902356A (en) Non-Intrusive Load Breakdown Method for Power Signals
Herath et al. Comprehensive analysis of convolutional neural network models for non-instructive load monitoring
Paul et al. An intelligent system for domestic appliance identification using deep dense 1-D convolutional neural network
CN113469502A (en) Difference grouping non-intrusive load decomposition method based on dictionary learning
Saraswat et al. Scalable hybrid classification-regression solution for high-frequency nonintrusive load monitoring
Wang et al. State-of-health estimation for lithium-ion batteries based on GWO–VMD-transformer neural network
Mei et al. A mother-son model for multi-objective non-invasive load monitoring
Madhushan et al. Real-time non-intrusive load monitoring system for residential appliance identification
CN114239762A (en) Non-invasive load identification method and system based on structured load characteristic spectrum

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220318

CF01 Termination of patent right due to non-payment of annual fee