Domestic load identification method and system based on delay period enhancement characteristics
By adopting a method based on delay period enhancement feature in non-invasive load monitoring, using multi-scale convolutional networks and bidirectional long and short-term memory networks to extract shared features, and combining multi-gated multi-expert networks for event detection and load recognition, the problems of low recognition accuracy and insufficient feature utilization in the prior art are solved, and more efficient load monitoring and event detection are achieved.
Patent Information
- Application Number
- CN202510120074.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-25
- Publication Date
- 2025-05-06
AI Technical Summary
The existing non-invasive load monitoring technology has problems such as high false alarm rate, poor generalization and insufficient utilization of high-frequency data characteristics in rapid identification of electrical input and switching events and multi-load combination recognition.
Using a method based on delay period enhancement features, shared features are extracted through multi-scale convolutional networks, delay period cross attention modules and bidirectional long and short-term memory networks, and event detection and load recognition are carried out in combination with multi-gated multi-expert networks.
It significantly improves the adaptability and recognition accuracy of the depth model in non-invasive load monitoring, effectively utilizes time-series data relationships, provides multi-dimensional load monitoring information, and improves the accurate recognition ability of equipment behavior.
Smart Images

Figure CN119939393A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of non-intrusive power monitoring, and relates to a method and system for identifying household appliance events and loads based on delay period enhancement features. The entire method and system are designed under a multi-task learning framework. Background Art
[0002] As a key step in the application of advanced measurement systems in smart grids, load monitoring collects electricity consumption data from users and uploads it to power grid companies to provide accurate electricity consumption information for power grid companies, thereby realizing intelligent management of power grids. Load monitoring is generally divided into intrusive load monitoring (ILM) and non-intrusive load monitoring. Intrusive monitoring (NILM) installs acquisition and communication equipment on the branches corresponding to each household electrical appliance to obtain high-precision data. It is installed by specialized personnel at designated locations. Although the data is intuitive, the operation is cumbersome, the cost is extremely high, and the scalability is poor and maintenance is not convenient. Non-intrusive load monitoring solves the problems of intrusive monitoring. It only needs to be installed once. Smart meters are installed at the household entrance bus. By collecting electrical parameters on the bus, such as current, power, voltage and other electricity information, data analysis is performed to obtain load decomposition results and identify the status of electrical appliances.
[0003] Therefore, quickly and accurately identifying electrical switching events and improving the recognition of single-load and multi-load combination situations are important components of non-intrusive load monitoring technology.
[0004] In addition to traditional methods such as probability models, expert heuristics, and combinatorial optimization, deep learning and transfer learning technologies have also become hot topics in current research. The large amount of collected data generated during household electricity consumption provides strong support for deep learning in the field of non-intrusive load monitoring. These data provide rich information for model training and application, greatly improving the accuracy and efficiency of event detection and load identification.
[0005] Probabilistic models mainly rely on the statistical distribution of steady-state signal data to detect dynamic changes after an event. However, detection methods based on probabilistic models are highly sensitive to signal disturbances, resulting in a high false alarm rate.
[0006] The expert heuristic model uses the expert's prior knowledge to set the threshold of event features to distinguish the event status. If the threshold is set too high, it may cause the event to be missed, and if it is set too low, it may misjudge the noise as an event. At the same time, it is difficult to adapt to unknown loads when transferring the fixed threshold to a new household with a different load curve. Therefore, there are great limitations in generalization.
[0007] Methods based on combinatorial optimization (CO) and hidden Markov model (HMM) can effectively mine the latent state array of electrical appliances from their latent state arrays. However, accurately distinguishing similar loads remains challenging, especially in scenarios where the loads are unknown.
[0008] The rapid development of deep learning and transfer learning has provided a large number of solutions for non-intrusive load monitoring technology, and has excellent performance in performance evaluation. However, the application of deep learning technology in non-intrusive load monitoring is mostly to realize the identification of multiple loads on low-frequency data. At the same time, because high-frequency data has more instantaneous features, it can provide more important features for event detection. Therefore, load identification technology based on event detection is often used on high-frequency data. The superposition of current and the difference before and after the event are used to identify the electrical appliances that caused the event. In essence, it is single load identification. However, events have a low probability of occurring during the long process of power monitoring, resulting in a large amount of data in the monitoring time period without events not being effectively utilized. Summary of the invention
[0009] The purpose of the present invention is to provide a household load identification method and system based on delayed cycle enhanced features to address the defects of the prior art, extract key electrical appliance features in bus aggregate data, complete multi-type and multi-combination load identification, and simultaneously complete event detection, maximize the use of time series data relationships to provide multi-dimensional load monitoring information, and combine the correlation between multi-load identification and event detection. The method first divides the power consumption behavior existing in non-invasive load monitoring into tasks, and distinguishes three different classification tasks: event detection, which is used to determine whether there is a switching event; load identification, by identifying a single or multiple running electrical appliances within a certain period of time; event load identification, when a switching event exists, it determines the appliance whose corresponding state is switched. Secondly, a skeleton network is constructed for extracting shared features between different tasks. This network first uses multi-scale parallel convolution operations to enable the model to better capture the multi-scale local features in the time series data, and has better adaptability to changes in time spans. At the same time, the residual design enables the combination of shallow features and deep features, which is conducive to the model to obtain more hierarchical features, thereby learning different electrical features more stably and effectively. Since there is a certain delay period in switching, the designed delay period enhancement module is used to improve the model's understanding of transient features by calculating the cross-attention between the current period and the delayed period. The series-connected bidirectional long-short time memory network obtains the overall trend characteristics by focusing on global features and the long-short dependencies between time series. Finally, by fusing such steady-state features and transient features, the final enhanced features are input into the multi-gated multi-expert network. As a key module for interaction and decomposition between different tasks, this network can effectively promote the flow and integration of information between tasks, and improve the overall performance and adaptability of the model in multi-task processing scenarios.
[0010] In a first aspect, the present invention provides a method for identifying household appliance events and loads based on a delay period enhancement feature, the method comprising the following steps:
[0011] Step (1), collecting current and voltage data at the bus in the household electricity usage scenario, and preprocessing:
[0012] Step 1-1: Collect the current and voltage data at the bus in the household electricity usage scenario, and record the time when the electrical appliances and their switching events occur;
[0013] Step 1-2: Detect outliers on the current and voltage data collected in step 1-1 and perform normalization processing;
[0014] Step 1-3: Divide the normalized current and voltage data by sliding windows to obtain window data;
[0015] Step 1-4: label the window data obtained in step 1-3. The label format includes the corresponding load combination, event type, and load type that caused the event. The event type set is {event NO ,event ON ,event OFF}, where event NO 、event ON and events OFF They represent no event, on event, and off event respectively. The corresponding load combination represents all loads in the on state within a given window, which are represented by an n-dimensional vector V. The i-th position V i ={0,1} indicates the existence status of the i-th load, 0 indicates non-existence, 1 indicates existence. The load type that caused the event is also an n-dimensional vector E, using One-hot encoding. Here n represents the total number of load types used.
[0016] Step (2), constructing a feature extraction skeleton network (PDEMNet) based on hybrid features enhanced by delay periods, which consists of a multi-scale convolutional network, a cross-channel attention enhancement module between delay periods, and a bidirectional long short-term memory network (Bi-LSTM), extracting features that can better characterize load imprints and capture event changes, and obtaining shared features based on the preprocessed current and voltage data;
[0017] Step 2-1: Build a multi-scale residual CNN model, with the input being the current and voltage data preprocessed in step (1), and the output being multi-scale local features;
[0018] Step 2-2: Build a cross-channel attention module based on the delay period. The input is the multi-scale local features obtained in step 2-1, and the output is the enhanced transient representation features obtained based on the delay period attention mechanism.
[0019] The delay period enhancement module network is specifically manifested as follows:
[0020] First, the output obtained in step 2-1 is divided into M time points with a delay cycle size. If the last cycle is less than a delay cycle size, zero padding is performed at the end to obtain {P0,P 1, P2,…}, P i Represents the set of time points within the i-th period.
[0021] Secondly, we calculate the cross attention between each cycle and the delayed cycle to enhance the understanding of the representation of the difference between cycles as a transient representation P i '.
[0022] P i =CrossAttention(P i ,P i+1 )
[0023] Note: When calculating the last delay cycle, the cross attention between the first cycle in the sample needs to be calculated in a cyclic manner.
[0024] Finally, multiple outputs are concatenated, and the corresponding channel attention ChannelAttention is calculated and multiplied by the concatenated result to obtain the feature data F after delayed period attention enhancement. p ', so that the cycles with transient characteristics can be better noticed by the model.
[0025] F p =Concat(P0',P1' , P2' ,…, P n ')
[0026] F p = ChannelAttention(F p )·F p
[0027] Step 2-3: Build a Bi-LSTM network, whose input is the feature data F after delayed period attention enhancement obtained in step 2-2 p ', the output is a mixed feature with multi-scale local transient features and steady-state features that retain the long-short dependencies in the signal.
[0028] Step 2-4: Build a fully connected layer encoder, encode the mixed features obtained in step 2-3, and output the final shared features.
[0029] Step (3): Build a multi-gated multi-expert network model for load identification, event detection, and event load identification in load monitoring tasks:
[0030] Step 3-1: The shared features encoded in step (2) are input into multiple expert networks, each of which is designed as an independently operating multi-layer perceptron (MLP) entity.
[0031] Step 3-2: Introduce the gating mechanism and construct multiple groups of gating units. Each group of gating units is equipped with independent learnable parameters to achieve the weighted summation and integration of the outputs of multiple experts obtained in step 3-1. The outputs of the gating units flow to the task towers of each task.
[0032] Step 3-3: Each task tower consists of a fully connected layer and a Softmax classifier. The output dimensions of different tasks are different. Tower 1 corresponds to event detection and is modeled as a multi-classification problem.
[0033] Tower2 corresponds to load identification, which is modeled as a multi-label task. The output is an n-dimensional vector, where n represents the total number of load types used in the experiment. Each position on this vector represents the probability of a load type running. Tower3 corresponds to event load identification, which is also a multi-classification task, but the output category is different from the event category, the total number of electrical appliances n.
[0034] Step (4): Set corresponding loss functions for different tasks, dynamically decay the learning rate and perform training, and output the final recognition model.
[0035] In a second aspect, the present invention provides a household appliance event and load identification system based on delay period enhancement features, comprising the following modules:
[0036] Data processing module: used to obtain the current and voltage data at the bus, process the invalid values and normalize the data, divide the windows and mark various categories of information.
[0037] Feature extraction module: A feature extraction skeleton network PDEMNet based on delay period enhancement is constructed to extract the shared features of mixed transient states for subsequent event detection and load identification tasks.
[0038] Event detection module: The preprocessed time series data is used to obtain shared features through the feature extraction skeleton network PDEMNet based on delay cycle enhancement, which is input into multiple expert networks and finally output after weighted mixing of the gating unit to obtain the predicted event category.
[0039] Load identification module: The shared features obtained by the preprocessed time series data through the feature extraction skeleton network PDEMNet based on delay cycle enhancement are input into multiple expert networks, and finally the prediction results of all workloads are output after weighted mixing of the gating unit.
[0040] Event load identification module: The shared features obtained by the preprocessed time series data through the feature extraction skeleton network PDEMNet based on delay cycle enhancement are input into multiple expert networks, and finally the category of the load that caused the event is output after weighted mixing of the gating unit.
[0041] The beneficial effects of the present invention are:
[0042] 1. The multi-task framework adopted by this invention significantly improves the adaptability of deep models in NILM. The framework covers multiple key tasks in low-frequency and high-frequency acquisition scenarios, and optimizes the recognition accuracy and overall performance of the model for power signals. By using event load recognition as an auxiliary task, it provides diversified monitoring feedback, optimizes target items, and improves the model's ability to accurately recognize device behavior.
[0043] 2. The feature extraction skeleton network PDEMNet proposed in the present invention based on delay cycle enhancement first extracts multi-scale and multi-level feature information through residual-connected multi-scale parallel convolution blocks, and at the same time combines the delay cycle to calculate the channel attention, thereby improving the model's understanding of transient features. PDEMNet can not only extract transient features in power signals, but also effectively retain steady-state features through the Bi-LSTM module. The shared features finally extracted take into account both the transient features required for event detection and the steady-state features that can distinguish different load characteristics.
[0044] 3. Through the multi-gated multi-expert network mechanism, the present invention can effectively distinguish the differential features in event detection from the consistent features in load identification. Event load identification, as an auxiliary task, provides diversified monitoring feedback, optimizes the target items of the model, and further improves the prediction accuracy. This mechanism enhances the synergy between tasks, improves the adaptability of the model to different features, and thus improves the overall performance of the NILM task. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is the overall framework diagram of this article;
[0046] Figure 2 Schematic diagram of parallel convolution blocks based on residual connections;
[0047] Figure 3 It is a schematic diagram of the delay cycle enhancement module;
[0048] Figure 4 Accuracy curves for event detection and load identification on the validation set;
[0049] Figure 5 ROC curves for different types of electrical appliances in load identification;
[0050] Figure 6 Confusion matrix for evaluating the classification effects of different loads. DETAILED DESCRIPTION
[0051] Further analysis is given below in conjunction with specific embodiments and drawings.
[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0053] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the steps or units listed in the specification, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0054] In a first aspect, the present invention provides a method for identifying household appliance events and loads based on delay period enhancement features, such as Figure 1 As shown, the method comprises the following steps:
[0055] Step (1): Data collection and preprocessing
[0056] Step 1-1: Collect the current and voltage data at the bus in the household electricity usage scenario, and record the time when the electrical appliances and their switching events occur;
[0057] Step 1-2: Perform outlier detection on the current and voltage data collected in step 1-1, including using the mean of the previous and next time points to fill in the missing values and processing the data in the abnormal range and some environmental noise based on the threshold. Perform normalization and use minimum-maximum normalization to compensate for the range deviation between the data.
[0058]
[0059] Among them I norm Represents the normalized current data, I max and I min Corresponding to the maximum and minimum values respectively, the values are mapped to [0,1]. The normalization operation of voltage data is the same.
[0060] Step 1-3: Divide the normalized current and voltage data by sliding windows, where each window contains at least two time points within the AC cycle;
[0061] Step 1-4: label the window data obtained in step 1-3. The label format includes the corresponding load combination and event type, and the load type that caused the event. The event category set is {eventNO ,event ON ,event OFF}, where event NO 、event ON and events OFF The corresponding load combination represents all loads in the open state within a given window, which is represented by an n-dimensional vector V. The i-th position V i ={0,1} represents the existence state of the i-th load, 0 represents non-existence, and 1 represents existence. The load type that caused the event is also an n-dimensional vector E, using One-hot encoding. Here n represents the total number of load types used in the experiment.
[0062] Step (2), construct a shared feature extraction skeleton network based on the delay cycle enhancement, such as Figure 3 As shown, it consists of a multi-scale residual parallel convolutional network, a delayed period enhanced attention module, and a Bi-LSTM to extract features that can better represent load imprints and capture event changes;
[0063] Step 2-1: Build a multi-scale residual parallel convolutional network, with the input being the current and voltage data processed in step (1) and the output being multi-scale local features;
[0064] like Figure 2 As shown, the multi-scale residual parallel convolutional network is specifically as follows:
[0065] The first is a one-dimensional point convolution layer, which embeds more layers of representation for each time point, denoted as Y (1) :
[0066]
[0067] Secondly, the output of the one-dimensional convolution layer will be input into multiple convolution blocks in parallel. The convolution kernel size in each convolution block is different to obtain local features of different scales. The output of the convolution operation under different convolution kernels corresponds to Y j , the formula is:
[0068]
[0069] where c in Indicates the number of input channels, c out represents the number of output channels, l represents the length of the input current sequence X, and b represents the batch size.
[0070] After the parallel convolution, we need to average the results of the N convolution operations and use the PReLU function for nonlinear activation to get the output Y:
[0071]
[0072] Introduce residual connection, use point convolution to adjust the input dimension to unify the number of channels, and get X after adjustment res :
[0073] X res =W res [c out ,c in ,1]·X[b,c in ,l]
[0074] Y (4) [b,c out ,l]=Y (3) [b,c out ,l]+X res
[0075] A maximum pooling layer MaxPool is connected in series, and the dimension in time series is reduced by pooling operation, which is recorded as l′. While maintaining the invariance of data translation, reducing the data scale can avoid inefficiency and resource waste caused by processing too much state:
[0076] Y (5) [b,c out ,l′]=MaxPool(Y (4) )
[0077] In addition, multiple parallel residual convolution and pooling operations can be stacked, repeating Y (2) To Y (5) For detailed parameters, refer to Table 1:
[0078] Table 1: Parameter settings of residual multi-scale parallel convolution blocks
[0079]
[0080] Step 2-2: Build a cross-channel attention module based on the delayed period enhancement module. The input is the multi-scale local features obtained in step 2-1, and the output is the features after enhanced transient representation based on the delayed period attention mechanism.
[0081] The delay period enhancement module network is specifically manifested as follows: Figure 3 :
[0082] First, divide the output obtained in step 2-1 into M time points with a delay cycle size. If the last cycle is less than a delay cycle size, zero padding is performed at the end to obtain {P0, P1, P2, ...}, P i Represents the set of time points within the i-th period.
[0083] Secondly, the cross-attention between each cycle and the delayed cycle is calculated to enhance the understanding of the representation of the differences between cycles as a transient representation.
[0084] P i =CrossAttention(P i ,P i+1 )
[0085] Note: When calculating the last delay cycle, the cross attention between the first cycle in the sample needs to be calculated in a cyclic manner.
[0086] Finally, multiple outputs are concatenated, and the corresponding channel attention is calculated for the enhanced representation of the delayed period, so that the period with transient characteristics can be better paid attention to by the model.
[0087] F p =Concat(P0',P1' , P2' ,…, P n ')
[0088] F p = ChannelAttention(F p )·F p
[0089] Step 2-3: Build a Bi-LSTM network, whose input is the feature data after delayed period attention enhancement obtained in step 2-2, and the output is a transient and steady-state mixed feature that is a mixture of multi-scale local transient features and steady-state features that retain the long-short dependency relationship in the signal.
[0090] For detailed parameters, please refer to Table 2:
[0091] Table 2: Parameter design of Bi-LSTM network
[0092] Network Layer Output size Detailed parameters / remarks Bi-LSTM1 500x128
[64] Bi-LSTM 2 500x256
[128]
[0093] Step 2-4: Build the encoder of the fully connected layer, encode the mixed time series features obtained in 2-2, and output the final shared features:
[0094] Step (3): Build a multi-gated multi-expert network model for load identification, event detection, and event load identification in load monitoring tasks:
[0095] Step 3-1: The multi-level features encoded in step (2) are input into multiple expert networks. Each expert network is designed as an independently operated multi-layer perceptron (MLP) entity.
[0096] Step 3-2: Introduce the gating mechanism and construct multiple groups of gating units. Each group of gating units is equipped with independent learnable parameters to achieve the weighted summation and integration of the outputs of multiple experts obtained in step 3-1, ensuring that the output flows to task towers that meet the unique needs of each task.
[0097] Step 3-3: Each task tower consists of a fully connected layer and a Softmax classifier. The output dimensions of different tasks are different. Tower 1 corresponds to event detection and is modeled as a multi-classification problem.
[0098] Tower2 corresponds to load identification, which is modeled as a multi-label task. The output is an n-dimensional vector, where n represents the total number of load types used in the experiment. Each position on this vector represents the probability of a load type running. Tower3 corresponds to event load identification, which is also a multi-classification task. However, the output category is different from the event category, which is the total number of experimental electrical appliances n.
[0099] The multi-gated multi-expert network structure is as follows:
[0100] Define k experts to output multiple expert features for the feature F shared by the feature extraction skeleton network mentioned in step (2):
[0101] E k (F) = f k (F;θ k )
[0102] Among them, E k (F) represents the expert features output by the kth expert network, f k represents the kth expert network, θ k represents the parameters in the kth expert network.
[0103] Introduce the gating mechanism and design multiple independent gating networks G m (x), the output G of each gating network m,k (x;θ k ) represents the mixed weight of the m-th gate to the k-th expert:
[0104]
[0105] Finally, the t tasks are mixed by weighting multiple gated units to obtain the weight G m,kThe outputs from different expert networks are combined to obtain features that are ultimately independent of different tasks. This mechanism helps separate and optimize features across tasks, allowing the model to effectively learn task-specific information. Finally, it is input into classifiers of different tasks for classification.
[0106] Step (4): Set corresponding loss functions for different tasks, dynamically decay the learning rate and perform training, and output the final recognition model.
[0107] Step 4-1: Divide the data samples into training set: validation set: test set = 8:1:1. The data set comes from PLAID2018, which consists of two parts: aggregated data and sub-metered data. The aggregated data contains different combinations of 13 types of electrical appliances, and the individual measurement data contains 17 types of electrical appliances. The measurement data includes current and voltage. The frequency of AC is 60Hz, and the sampling rate of current and voltage is 30kHz. In addition to signal collection, information such as event points is also recorded.
[0108] Step 4-2: Build the MMoE multi-task learning framework and perform supervised learning training on shared features. The data in this stage contains current and voltage data under different event types, different load types, and different workload combinations.
[0109] The multi-task model generally adopts a combined loss function, the specific components are as follows:
[0110] L=αL event_type +(1-α)L loads +βL event_load
[0111] Among them, α and β are weight coefficients for balancing the loss size of different tasks, L event_type is the loss function for event detection, L loads is the loss function for multi-load identification, L event_load is the loss function of the event payload.
[0112] The model was trained using the early stopping method for 100 epochs and the accuracy on the validation set was continuously monitored. The model was considered to have converged when the accuracy did not improve after 10 epochs.
[0113] In a second aspect, the present invention provides a household appliance event and load identification system based on delay period enhancement features, comprising the following modules:
[0114] Data processing module: used to obtain the current and voltage data at the bus, process the invalid values and normalize the data, divide the windows and mark various categories of information.
[0115] Feature extraction module: A feature extraction skeleton network PDEMNet based on delay period enhancement is constructed to extract the shared features of mixed transient states for subsequent event detection and load identification tasks.
[0116] Event detection module: The preprocessed time series data is used to obtain shared features through the feature extraction skeleton network PDEMNet based on delay cycle enhancement, which is input into multiple expert networks. Finally, after weighted mixing of the gating unit, it is input into an independent event detection classifier to obtain the predicted event category.
[0117] Load identification module: The shared features obtained by the preprocessed time series data through the feature extraction skeleton network PDEMNet based on delay cycle enhancement are input into multiple expert networks, and finally input into the independent load identification classifier after weight mixing of the gating unit to obtain the prediction results of all workloads.
[0118] Event load identification module: The shared features obtained through the preprocessed time series data by the delay cycle enhanced feature extraction skeleton network PDEMNet are input into multiple expert networks, and finally input into an independent event load classifier after weight mixing of the gating unit to obtain the category of the load that caused the event.
[0119] Example:
[0120] Household appliance event and load identification method based on delay period enhancement features, such as Figure 1 As shown, the following steps are included:
[0121] Step (1), deploy a skeleton extraction network based on delayed period enhancement features to extract features from the input current and voltage data, and obtain the shared features after hybrid transient state enhancement. First, the local features under multiple time spans are extracted and downsampled through multi-scale parallel convolution. The detailed structure is shown in Figure 2 ,Considering the delay of the monitoring equipment, an enhancement module based on the delay period is designed, which effectively captures the transient representation that causes the irregular changes of the load operation curve, while the Bi-LSTM focuses on the global timing dependency and the overall trend, extracts the electrical characteristics of different loads when working stably, and finally obtains the shared representation of the transient steady state.
[0122] Step (2), deploy the expert network and different gating unit parameters, provide different expert network weights through the gating unit for different tasks and add the outputs, and input them into the respective task modules for classification, and calculate the loss function respectively:
[0123] The loss function calculation methods corresponding to different tasks are as follows:
[0124]
[0125] Among them, event detection and event load identification use Loss CCE Calculate, where y ij represents the true probability that the i-th appliance is in state j, y ij ′ represents the predicted probability that the i-th appliance is predicted by the model to be in state j. Assume that S represents the total number of states of the appliance. In this case, S=3 in the event detection task. In the event load identification task, S=N=13, which represents the total number of appliance types. In the load identification task, since there are multiple appliances running together, the probability of each appliance being turned on is calculated, the loss function of the binary classification problem is introduced for calculation, and then the average value is taken.
[0126] Therefore, the final loss function components are expressed as:
[0127] L=αL event_type +(1-α)L loads +βL event_load
[0128] Among them, α and β are weight coefficients for balancing the loss size of different tasks, L event_type is the loss function for event detection, L loads is the loss function for multi-load identification, L event_load is the loss function of the event payload.
[0129] Step (3), divide the data samples, training set: validation set: test set = 8:1:1. Apply the MMoE multi-task learning framework to perform supervised learning training on shared features. The data in this stage contains current and voltage data under different event types, different load types and different workload combinations. Set the loss function and Adam optimizer, and the learning rate adjustment strategy. The learning rate is reduced by 1 times every 5 epochs to improve the model convergence accuracy. The initial learning rate is 1e-3 and the batch size is 40. In order to prove the effectiveness of the model, the two key task modules were tested and the accuracy curves were plotted. See Figure 4 , and the ROC curves of different appliance types in the multi-load recognition task are evaluated, see Figure 5 . The confusion matrix for evaluating the classification effect of different loads is shown in Figure 6 .
[0130] The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer-readable storage medium storing a program code, and the instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can refer to the aforementioned method embodiment, which will not be repeated here. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0131] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A household load identification method based on delay period enhancement feature, characterized in that: The following steps are involved: Step 1: Collect and pre-process the current and voltage data at the bus in a household electricity usage scenario; Step 2: construct a feature extraction skeleton network PDEMNet based on hybrid features enhanced by delay cycles, which consists of a multi-scale convolutional network, a cross-channel attention enhancement module between delay cycles, and a bidirectional long short-term memory network Bi-LSTM, and obtains shared features based on the preprocessed current and voltage data; Step 3: Build a multi-gated multi-expert network model to perform load identification, event detection, and event load identification in load monitoring tasks based on shared features: Step 4: Set corresponding loss functions for different tasks, dynamically decay the learning rate and perform training, and output the final recognition model.
2. The household load identification method based on delay period enhancement feature according to claim 1 is characterized in that: The specific implementation process of step 1 is as follows: Step 1-1: Collect the current and voltage data of the bus in the household electricity usage scenario, and record the time when the electrical appliances and their switching events occur; Step 1-2: Detect outliers on the collected current and voltage data and perform normalization processing; Step 1-3: Divide the normalized current and voltage data by sliding windows to obtain window data; Step 1-4: label the window data, the format of the label includes the corresponding load combination and event type, the load type that caused the event; the event type set is {event NO ,event ON ,event OFF }, where event NO 、event ON and events OFF They represent no event, on event, and off event respectively. The corresponding load combination represents all loads in the on state within a given window, represented by an n-dimensional vector V. The i-th position V i ={0,1} indicates the existence status of the i-th load, 0 indicates non-existence, and 1 indicates existence; the load type that caused the event is also an n-dimensional vector E, using One-hot encoding; here n represents the total number of load types used.
3. The household load identification method based on delay period enhancement feature according to claim 2 is characterized in that: The specific implementation process of step 2 is as follows: Step 2-1: Build a multi-scale residual CNN model, with pre-processed current and voltage data as input and multi-scale local features as output; Step 2-2: Build a cross-channel attention module based on the delay period. The input is the multi-scale local features, and the output is the features after enhanced transient representation based on the delay period attention mechanism. Step 2-3: Build a Bi-LSTM network, whose input is the feature data F after delayed period attention enhancement p ', a mixed feature with multi-scale local transient features and a steady-state feature that retains the long-short dependency relationship in the signal is obtained; Step 2-4: Build the encoder of the fully connected layer, encode the mixed features, and output the shared features.
4. The household load identification method based on delay period enhancement feature according to claim 3 is characterized in that: The delayed period attention mechanism is specifically implemented as follows: First, the output obtained in step 2-1 is divided into M time points with a delay cycle size. If the last cycle is less than a delay cycle size, zero padding is performed at the end to obtain {P0, P1, P2, ...}, P i, Represents the set of time points in the i-th period; Secondly, the cross attention between each cycle and the delayed cycle is calculated to enhance the understanding of the representation of the difference between cycles as a transient representation P i '; P i ’=,CrossAttention(P i ,P i+1 ) When calculating the last delay cycle, the cross attention between the first cycle in the sample is calculated in a cyclic manner; Finally, multiple outputs are spliced, and the corresponding channel attention is calculated and multiplied by the spliced result to obtain the feature data F' after the delayed period attention enhancement p : F p =Concat(P0’,,P1’,,P2’,…,,P n ’) F p ’=ChannelAttention(F p )·,F p 。 5. The household load identification method based on delay period enhancement feature according to claim 4 is characterized in that: The specific implementation process of step 3 is as follows: Step 3-1: Input the shared features into multiple expert networks, each of which is designed as an independently operated multi-layer perceptron MLP entity; Step 3-2: Introduce the gating mechanism and construct multiple groups of gating units. Each group of gating units is equipped with independent learnable parameters. The outputs of multiple expert networks are weighted summed. The outputs of the gating units flow to the task towers of each task. Step 3-3: Each task tower consists of a fully connected layer and a Softmax classifier, where the output dimensions of different tasks are different. Tower 1 corresponds to event detection and is modeled as a multi-classification problem; Tower 2 corresponds to load identification and is modeled as a multi-label task. The output is an n-dimensional vector, where n represents the total number of load types used in the experiment, and each position on this vector represents the probability of a load type running; Tower 3 corresponds to event load identification, which is also a multi-classification task, but the output category is different from the event category, and is the total number of electrical appliances n.
6. The household load identification method based on delay period enhancement feature according to claim 5, characterized in that: The loss function described in step 4 has the following specific components: L=αL event_type +(1-α)L loads +βL event_load Among them, α and β are weight coefficients for balancing the loss size of different tasks, L event_type is the loss function for event detection, L loads is the loss function for multi-load identification, L event_load is the loss function of the event payload.
7. A household load identification system based on delay period enhancement feature, used to implement the identification method according to any one of claims 1 to 6, characterized in that: Includes the following modules: Data processing module: used to obtain the current and voltage data at the bus, process the invalid values and normalize the data, divide the windows and mark various categories of information; Feature extraction module: construct a feature extraction skeleton network PDEMNet based on delay period enhancement to extract the shared features of mixed transient states for subsequent event detection and load identification tasks; Event detection module: The shared features obtained by the feature extraction skeleton network PDEMNet based on delay cycle enhancement are input into multiple expert networks, and finally the predicted event category is obtained after the weighted mixing of the gating unit; Load identification module: The shared features obtained by the feature extraction skeleton network PDEMNet based on delay cycle enhancement are input into multiple expert networks, and finally the prediction results of all workloads are output after weighted mixing by the gating unit; Event load identification module: The shared features obtained by the feature extraction skeleton network PDEMNet based on delay cycle enhancement are input into multiple expert networks, and finally the category of the load that caused the event is output after weighted mixing of the gating unit.