Electric appliance type discrimination method fusing convolutional neural network and adversarial neural network

By fusing convolutional neural networks and adversarial neural networks, the current feature image is generated and the electrical appliances are identified using the ResNet50 network, the problems of slow identification speed, low accuracy and limited types of electrical appliances in the existing technology are solved, and efficient and accurate use is achieved Electrical identification.

CN119293613AInactive Publication Date: 2025-01-10精为技术(天津)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411682326.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-01-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing electrical appliance identification technology has problems such as slow identification speed, low identification accuracy, limited types of electrical appliances, and difficult to identify electrical appliances with similar current characteristics and mixed electricity usage.

Method used

The method of fusion convolutional neural network and adversarial neural network is adopted to generate current feature images by performing wavelet transformation, minimum-maximum normalization, fast Fourier transform and image processing on current data, and use ResNet50 network for identification and output Electrical categories, switching time and switch status.

Benefits of technology

It improves the recognition speed and accuracy, supports identification of more electrical appliance categories, reduces calculation amount and resource consumption, and achieves real-time response to high-frequency data and higher recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293613A_ABST
    Figure CN119293613A_ABST
Patent Text Reader

Abstract

The invention provides an electric appliance type discrimination method fusing a convolutional neural network and an adversarial neural network, and belongs to the technical field of electric appliance identification. According to the method, current and voltage signals in the electrical appliance switching process are collected and preprocessed, features of the current and voltage signals are extracted, and an electrical feature map is generated through deep learning technology fusion. And identifying and classifying the electrical feature image by using a convolutional neural network to realize accurate identification of the electrical appliance. For transient electrical characteristic changes existing when an electrical equipment switching event occurs, the method only needs to identify the switching process of the electrical equipment, so that continuous analysis of the whole power utilization process is avoided, and the calculation amount is greatly reduced; for the influence of existing electric appliances in a circuit on signals before a switching event occurs, a current signal feature generation model based on an adversarial neural network is added, irrelevant electric appliance signals can be removed, and therefore real-time response and higher recognition accuracy are achieved. The method is faster in response speed and higher in recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electrical appliance identification, and specifically is a method for distinguishing the type of electrical appliances by integrating a convolutional neural network and an adversarial neural network. Background Art

[0002] As the requirements for electricity safety and refined management of electric energy continue to increase, accurate identification of electrical appliances is becoming increasingly important. The electrical appliance identification method based on deep learning has a certain degree of recognition accuracy, but the existing technology still has the following problems: 1. The recognition speed is slow and it is difficult to adapt to scenarios with high requirements for real-time response; 2. There is still a lot of room for improvement in recognition accuracy; 3. The types of electrical appliances that can be identified are limited; 4. The effect of distinguishing and identifying electrical appliances with similar current characteristics is poor; 5. It is difficult to identify mixed power consumption.

[0003] Traditional load identification technology has difficulty in accurately identifying the increasingly diverse types of electrical appliances and power usage scenarios, and fails to fully utilize the features in current and voltage signals. Adversarial neural networks are an effective feature extraction method, but how to generate feature images that can be recognized by convolutional neural networks based on electrical signals is a difficult point. Summary of the invention

[0004] The present invention aims to address the technical defects of the prior art and provide a method for distinguishing the type of electrical appliances by integrating a convolutional neural network and an adversarial neural network, so as to solve the technical problems that conventional methods have low recognition accuracy, difficulty in accurately identifying electrical switching events, and difficulty in identifying mixed power usage.

[0005] Another technical problem to be solved by the present invention is: how to generate a feature image that can be recognized by a convolutional neural network based on electrical signals.

[0006] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:

[0007] The electrical appliance type identification method integrating convolutional neural network and adversarial neural network includes:

[0008] 1) Collecting current data sequence;

[0009] 2) Use wavelet transform to implement low-pass filtering, filter out high-frequency noise, and obtain filtered data X′;

[0010] 3) Identify the electrical appliance switching time t in the sequence X′, and extract the current segment S={s_1, s_2, ..., s_n} and the corresponding voltage segment V={v_1, v_2, ..., v_n} from the time window t to t+w / F; where w is the number of current cycles (w can be 5);

[0011] 4) Using the minimum-maximum normalization method, map each sample value in S to the range of [0, 1] to obtain the normalized data A = {a1, a2, ..., a n} and B={b1,b2,…,b n};

[0012] 5) Generate feature images;

[0013] 6) Convolutional neural network recognition.

[0014] Preferably, in step 1), the current data sequence is collected based on time, and the collected current data sequence is X n =(x1, x2, ..., x m ), where n is the number of data items and m is the number of sampling points.

[0015] Preferably, step 5) comprises:

[0016] 5.1) Fourier transform;

[0017] 5.2) Generate a current feature image using the trained feature image generation model;

[0018] 5.3) Mapping processing;

[0019] 5.4) Build the image.

[0020] Preferably, step 5.1) comprises: applying fast Fourier transform to the data segment A to obtain frequency domain feature data F={f1, f2, ..., f k}.

[0021] Preferably, step 5.2) includes: drawing A into a time-current two-dimensional line graph T of l×l (l=\sqrt{n}), loading the pre-trained model weights into the generator, inputting T into the generator, and generating a load current characteristic diagram matrix Y that only contains switching events.

[0022] Preferably, step 5.3) comprises:

[0023] 5.31) Map F to the interval of 0-255 according to the module size to obtain the frequency domain feature matrix R;

[0024] 5.32) A and B are fused to create a thermal image and the time domain feature matrix G of the three channels is obtained.

[0025] Preferably, step 5.4) comprises:

[0026] The above 1-channel matrix R and 3-channel matrix G are stacked to construct a 4-channel image of size l×l (l=\sqrt{n}) to obtain the feature image I; where the first channel is the matrix R, and the remaining channels (which can be three channels) are the matrix G.

[0027] Preferably, step 6) comprises:

[0028] 6.1) Feature extraction;

[0029] 6.2) Result classification;

[0030] 6.3) Model training.

[0031] Preferably, step 6.1) includes: using the image classification model ResNet50 to extract features of the image I (which may be high-level features), and outputting a feature vector V of a certain length (the length may be 2048).

[0032] Preferably, step 6.2) comprises:

[0033] 6.21) Set the fully connected layer with an output length of 200, the input layer is vector V, activated by LeakyReLU with a slope of 0.1, and then by a Dropout layer that randomly discards 25% of the neurons as the input of the fully connected layer with an output length of 20, then activated by LeakyReLU with a slope of 0.1, and then activated by Sigmoid, and the output is the electrical appliance category y c ;

[0034] 6.22) Set the fully connected layer with an output length of 300, the input layer is vector V, activated by LeakyReLU with a slope of 0.1, then passed through a Dropout layer that randomly discards 25% of neurons as the input of the fully connected layer with an output length of 20, then activated by LeakyReLU with a slope of 0.1, and then activated by Sigmoid, and the output is the electrical appliance switching time y t ;

[0035] 6.23) Set the fully connected layer with an output length of 10, the input layer is vector V, activated by LeakyReLU with a slope of 0.1, and then activated by softmax, and the output is the switch state y of the appliance s .

[0036] Preferably, step 6.3) includes: training the model using a labeled data set, wherein the labeled content is the real electrical appliance category, switching time and switch status; in this process, a cross entropy loss function and an Adam optimization algorithm can be used.

[0037] The present invention proposes a method for distinguishing the type of electrical appliances by integrating a convolutional neural network and an adversarial neural network. The method captures the current of only the event of the electrical appliance switching process and converts it into a feature image. It does not need to identify the current data of the running electrical appliances, which reduces performance consumption and improves the recognition speed. It can also respond to high-frequency data to improve the recognition accuracy. The feature image is then analyzed through the ResNet50 network. Since the ResNet50 network is often used for image similarity detection, the feature images of the same electrical appliance event have high similarity. This can reduce the recognition error in traditional electrical appliance recognition, enhance the recognition accuracy, and accurately locate the time point when the electrical appliance switching operation occurs, while reducing performance consumption.

[0038] The electrical characteristic image is obtained by preprocessing the current of the switching event, performing a fast Fourier transform on the current within 5 cycles, and converting it into a grayscale image as one dimension of the feature matrix. At the same time, the original current is directly converted into a grayscale image and then the voltage image is fused with it into a heat map as the other three dimensions of the feature matrix. The matrix is ​​then used as training input data for network training.

[0039] The innovation of the present invention is:

[0040] 1. A method for distinguishing the types of electrical appliances by integrating convolutional neural networks and adversarial neural networks is proposed. Compared with the traditional method based on time series analysis, it can greatly improve the recognition speed and respond to high-frequency data.

[0041] 2. Generate a current feature image by fast Fourier transform and image processing of the current signal. This can fully combine the current signal characteristics in the time domain and frequency domain and improve the richness of feature expression.

[0042] 3. Use convolutional neural network technology to achieve end-to-end electrical appliance recognition. Compared with traditional methods, the classification effect is better and supports the recognition of a wider range of electrical appliance categories.

[0043] 4. It only needs to identify power consumption events, avoiding the analysis of the complete power consumption process, greatly reducing the amount of calculation, and making real-time identification possible.

[0044] 5. The output recognition results include three dimensions of information: electrical appliance category, switching time and switch status, with richer recognition details.

[0045] 6. The adversarial network is used to generate feature maps, which has a higher recognition rate for complex electrical appliances.

[0046] 7. The proposed technical route has the characteristics of strong generalization and can be used to optimize the system and improve performance based on a large amount of labeled data.

[0047] 8. For electrical appliances with similar current characteristics, since the voltage and current between resistive, capacitive and inductive electrical appliances will have a phase, electrical appliances with similar current characteristics can be distinguished.

[0048] The present invention has the following beneficial technical effects:

[0049] 1. Real-time processing capabilities have been greatly improved

[0050] The present invention only needs to identify power consumption events, avoiding continuous analysis of the complete sequence and reducing the amount of calculation, so the ability to process data in real time is significantly improved, and the response to high-frequency data can be achieved.

[0051] 2. Recognition accuracy is significantly improved

[0052] The effective combination of the frequency domain and time domain features of electrical signals improves the richness of feature expression. At the same time, the use of convolutional neural networks for end-to-end recognition gives full play to the advantages of deep learning, and the classification effect is significantly better than traditional methods.

[0053] 3. Support identification of more electrical appliance categories

[0054] The output result of the present invention includes three-dimensional information of electrical appliance category, switching time and switch status. The recognition effect is more comprehensive and rich, and can support the recognition of more types of electrical appliances.

[0055] 4. Reduce computing resource consumption and reduce deployment and usage costs

[0056] Since the amount of calculation is greatly reduced, the computing resources and memory usage are reduced, the hardware cost required to deploy the present invention will also be reduced, making it more suitable for practical application and promotion.

[0057] 5. The system has good scalability and is easy to upgrade and iterate.

[0058] This method can continuously optimize and improve the recognition effect by acquiring more labeled data and adjusting the model structure, continuously adapt to new types of electrical appliances, and the system has strong scalability.

[0059] In summary, the present invention collects and preprocesses the current and voltage signals during the switching process of electrical appliances, extracts the characteristics of the current and voltage signals, and generates an electrical characteristic diagram through deep learning technology fusion. Then, the convolutional neural network is used to identify and classify the electrical characteristic image to achieve accurate identification of electrical appliances. In view of the transient electrical characteristic changes that exist when the switching event of electrical equipment occurs, the present method only needs to identify the switching process of the electrical appliance, avoiding the continuous analysis of the entire power consumption process and greatly reducing the amount of calculation. Since electricity often exists in a complex state, electrical appliances are already in use in the circuit before the switching event occurs. Therefore, a current signal feature generation model based on an adversarial neural network is added. According to the current signal before the switching event occurs and the composite current signal thereafter, an electrical signal feature diagram containing only the electrical appliances involved in the event can be generated, that is, the signals of irrelevant electrical appliances are removed to achieve real-time response and higher recognition accuracy. Compared with the prior art, the present invention has a faster response speed and higher recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is a flowchart of feature map generation model training in the method of the present invention.

[0061] Figure 2 This is a flow chart of electrical identification model training in the method of the present invention.

[0062] Figure 3 The present invention is a flowchart of real-time identification of electrical appliances in the method of the present invention.

[0063] Figure 4 It is a schematic diagram of the structure of the Generative Adversarial Network (GAN).

[0064] Figure 5 It is a schematic diagram of feature image generation.

[0065] Figure 6 It is a flowchart of building a Resnet50 model in a specific implementation manner of the present invention. DETAILED DESCRIPTION

[0066] The specific embodiments of the present invention will be described in detail below. In order to avoid too much unnecessary details, the well-known structures or functions will not be described in detail in the following examples. The approximate language used in the following examples can be used for quantitative expression, indicating that the quantity can be allowed to have a certain change without changing the basic function. Unless otherwise defined, the technical and scientific terms used in the following examples have the same meaning as those generally understood by those skilled in the art to which the present invention belongs.

[0067] A method for identifying the type of electrical appliances that integrates convolutional neural networks and adversarial neural networks. The method collects current and voltage data to generate feature images, and then uses neural networks for identification. The method only needs to identify the switching process of electrical appliances, avoiding the analysis of continuous power consumption, thereby greatly reducing the amount of calculation. Signal processing is performed through adversarial neural networks to generate more accurate electrical appliance feature maps and enhance the identification effect.

[0068] The system process mainly includes:

[0069] Data acquisition and preprocessing: Collect current and voltage signals including electrical appliance switching events, and perform preprocessing such as denoising and normalization on the signals.

[0070] Feature image generation: The pre-processed current signal is extracted through an adversarial neural network to generate a current signal feature map of the electrical equipment where the switch event occurred. The original signal is fast Fourier transformed to obtain the frequency domain features. The original current signal is fused with the voltage signal to generate a thermal map, which is compared with the current signal features. Figure 1 It serves as an electrical parameter characteristic diagram.

[0071] Convolutional neural network recognition: Input the current feature image into a pre-trained deep residual neural network (such as ResNet50) to automatically extract features. Use multiple fully connected layers to classify the features and output information such as the category of electrical appliances.

[0072] The specific process is as follows:

[0073] 1. Data preprocessing:

[0074] First, the current data needs to be preprocessed. The data sampling rate is expressed as F, and the data is a current data sequence based on time. Assuming there are n data, each data contains m sampling points, the original data can be expressed as:

[0075] X n =(x1, x2, ..., x m )

[0076] 2. Denoising

[0077] The original signal X is subjected to low-pass filtering using wavelet transform to filter out high-frequency noise and obtain the filtered data X′.

[0078] 3. Data Slicing

[0079] In the sequence X′, the switching time t of the electrical appliance is identified, and the current segment S={s_1, s_2, ..., s_n} and the corresponding voltage segment V={v_1, v_2, ..., v_n} with a time window of t to t+5 / F (5 current cycles) are extracted.

[0080] 4. Normalization

[0081] Using the minimum-maximum normalization method, each sample value in S is mapped to the range of [0, 1] to obtain the normalized data A = {a1, a2, ..., a n} and B={b1,b2,…,b n}.

[0082] 5. Generate feature images

[0083] 1. Fourier transform: Apply fast Fourier transform to the data segment A to obtain frequency domain feature data F = {f1, f2, ..., f k}.

[0084] 2. By using the trained feature image generation model, apply composite load current feature image generation to A to generate a load current feature map matrix Y containing only the switching events that occurred.

[0085] 3. Mapping processing (1) Map F to the range of 0-255 according to the module size to obtain the frequency domain feature matrix R. (2) Fusion of A and B to establish a thermal image to obtain the time domain feature matrix G of the three channels.

[0086] 4. Build the image

[0087] Construct a 4-channel image of size l×l (l=\sqrt{n}): the first channel is matrix R, the second channel is Y, and the remaining three channels are matrix G to obtain the feature image I.

[0088] 6. Convolutional Neural Network Recognition

[0089] 1. Feature extraction: Use the image classification model ResNet50 to extract high-level features of image I and output a feature vector V with a length of 2048.

[0090] 2. Result classification (1) Set the length of the fully connected layer to 300, the input layer is vector V, after ReLU activation, the output is the electrical appliance category y c (2) Set the length of the fully connected layer to 200, the input layer is vector V, after sigmoid activation, the output is the electrical appliance switching time y t (3) Set the length of the fully connected layer to 50, the input layer is vector V, after softmax activation, the output is the switch state y of the electrical appliance s .

[0091] 3. Model training The model is trained using a labeled data set with the actual electrical appliance category, switching time, and switch status. The cross entropy loss function and Adam optimization algorithm are used.

[0092] Compared with the prior art, the present invention has the following advantages:

[0093] Fast response speed, capable of processing high-frequency data;

[0094] High recognition accuracy;

[0095] Supports a wide range of applications and can identify all kinds of common electrical appliances;

[0096] The recognition rate for composite electrical appliances is improved.

[0097] Example 1

[0098] Step 1: Data Preparation

[0099] 1. Collect the timing data of current and voltage of a single load.

[0100] Includes: the occurrence of load switching events and the corresponding occurrence time.

[0101] 2. Collect the timing data of the current and voltage of the mixed load.

[0102] The load types must include the single load collected previously, and no switching events occur on other loads, which are always in the on state.

[0103] Contains: the occurrence of a single load switch event previously collected and the corresponding occurrence time.

[0104] 3. Clean the collected continuous current time series data and normalize the maximum and minimum values, and divide it into several data containing five current cycle lengths and corresponding voltage time series data, the length of which should be n.

[0105] 4. Plot the single load and mixed load timing current data into a line graph with a size of l×l (l=\sqrt{n}).

[0106] Step 2: Build and train a Generative Adversarial Network (GAN)

[0107] 1. Build a generator model: The generator receives random noise input and generates an image. This includes:

[0108] Fully connected layer (Dense)

[0109] Function: Convert the input random noise vector into a high-dimensional feature.

[0110] parameter:

[0111] units = 256 × 4 × 4: The number of output neurons is equal to 256 feature maps, each of which is 4 × 4 in size.

[0112] activation="relu": Use the ReLU activation function.

[0113] input_dim=latent_dim: The dimension of the input vector, equal to the length of the random noise vector.

[0114] Reshape

[0115] Function: Reshape the output of the fully connected layer into a 4×4×256 three-dimensional tensor for use in subsequent convolutional layers.

[0116] parameter:

[0117] target_shape=(4,4,256): Target shape, reshapes the output into 256 feature maps of size 4×4.

[0118] UpSampling2D

[0119] Function: Enlarge the size of the feature map by interpolation.

[0120] parameter:

[0121] size=(2,2): Double the size of each feature map from 4×4 to 8×8.

[0122] Convolutional Layer (Conv2D)

[0123] Function: Apply convolution operation to extract local features in feature map.

[0124] parameter:

[0125] filters=256: the number of convolution kernels, that is, the number of output feature maps.

[0126] kernel_size=3: size of the convolution kernel, 3×3.

[0127] padding = "same": keep the input shape unchanged after convolution.

[0128] activation=None: No activation function is used, and LeakyReLU activation is used later.

[0129] Batch Normalization

[0130] Function: Perform batch normalization on features to stabilize and accelerate training.

[0131] parameter:

[0132] momentum=0.8: Momentum parameter, used to control the update speed of mean and variance.

[0133] Leaky ReLU activation layer (LeakyReLU)

[0134] Function: Apply the Leaky ReLU activation function to allow some negative values ​​to pass through and avoid neuron death.

[0135] parameter:

[0136] alpha=0.2: negative slope.

[0137] UpSampling2D

[0138] Function: Enlarge the size of the feature map again through interpolation.

[0139] parameter:

[0140] size=(2,2): Double the size of each feature map from 8×8 to 16×16.

[0141] Convolutional Layer (Conv2D)

[0142] Function: Apply the convolution operation again to extract and enhance features.

[0143] parameter:

[0144] filters=128: The number of convolution kernels, that is, the number of output feature maps.

[0145] kernel_size=3: size of the convolution kernel, 3×3.

[0146] padding = "same": keep the input shape unchanged after convolution.

[0147] Batch Normalization

[0148] Function: Perform batch normalization on features to stabilize and accelerate training.

[0149] parameter:

[0150] momentum=0.8: Momentum parameter.

[0151] Leaky ReLU activation layer (LeakyReLU)

[0152] Function: Apply Leaky ReLU activation function.

[0153] parameter:

[0154] alpha=0.2: negative slope.

[0155] UpSampling2D

[0156] Function: Enlarge the size of the feature map by interpolation for the last time.

[0157] parameter:

[0158] size=(2,2): Double the size of each feature map from 16×16 to 32×32.

[0160] Convolutional Layer (Conv2D)

[0161] Function: Apply convolution operation to generate the final image.

[0162] parameter:

[0163] filters=64: the number of convolution kernels, that is, the number of output feature maps.

[0164] kernel_size=3: size of the convolution kernel, 3×3.

[0165] padding = "same": keep the input shape unchanged after convolution.

[0166] Batch Normalization

[0167] Function: Perform batch normalization on features.

[0168] parameter:

[0169] momentum=0.8: Momentum parameter.

[0170] Leaky ReLU activation layer (LeakyReLU)

[0171] Function: Apply Leaky ReLU activation function.

[0172] parameter:

[0173] alpha=0.2: negative slope.

[0174] Convolutional Layer (Conv2D)

[0175] Function: Generate the final output image.

[0176] parameter:

[0177] filters = 3: The number of convolution kernels, that is, the number of channels of the final generated image (RGB images have 3 channels).

[0178] kernel_size=3: size of the convolution kernel, 3×3.

[0179] padding = "same": keep the input shape unchanged after convolution.

[0180] activation='tanh': Use the tanh activation function to normalize the output values ​​to [-1, 1] to match the normalization of the input image.

[0181] 2. Build a discriminator model: The discriminator receives image input and determines whether the image is real or generated.

[0182] Convolutional Layer (Conv2D)

[0183] Function: Extract local features of an image.

[0184] parameter:

[0185] filters=64: the number of convolution kernels, that is, the number of output feature maps.

[0186] kernel_size=3: size of the convolution kernel, 3×3.

[0187] strides=2: The stride of the convolution, which halves the size of the feature map.

[0188] input_shape=img_shape: The shape of the input image, assumed to be (32,32,3).

[0189] padding = "same": keep the input shape unchanged after convolution.

[0190] Leaky ReLU activation layer (LeakyReLU)

[0191] Function: Apply the Leaky ReLU activation function to allow some negative values ​​to pass through and avoid neuron death.

[0192] parameter:

[0193] alpha=0.2: negative slope.

[0194] Dropout layer

[0195] Function: Randomly discard some neurons during training to prevent overfitting.

[0196] parameter:

[0197] rate=0.25: discard 25% of neurons.

[0198] Convolutional Layer (Conv2D)

[0199] Function: further extract image features.

[0200] parameter:

[0201] filters=128: the number of convolution kernels.

[0202] kernel_size=3: The size of the convolution kernel.

[0203] strides=2: the stride of the convolution.

[0204] padding="same": keep the input shape unchanged.

[0205] Leaky ReLU activation layer (LeakyReLU)

[0206] parameter:

[0207] alpha=0.2: negative slope.

[0208] Dropout layer

[0209] parameter:

[0210] rate=0.25: discard 25% of neurons.

[0211] Convolutional Layer (Conv2D)

[0212] Function: Further extract higher-level image features.

[0213] parameter:

[0214] filters=256: the number of convolution kernels.

[0215] kernel_size=3: The size of the convolution kernel.

[0216] strides=2: the stride of the convolution.

[0217] padding="same": keep the input shape unchanged.

[0218] Leaky ReLU activation layer (LeakyReLU)

[0219] parameter:

[0220] alpha=0.2: negative slope.

[0221] Dropout layer

[0222] parameter:

[0223] rate=0.25: discard 25% of neurons.

[0224] Convolutional Layer (Conv2D)

[0225] Function: Extract higher-level image features.

[0226] parameter:

[0227] filters=512: the number of convolution kernels.

[0228] kernel_size=3: The size of the convolution kernel.

[0229] strides=2: the stride of the convolution.

[0230] padding="same": keep the input shape unchanged.

[0231] Leaky ReLU activation layer (LeakyReLU)

[0232] parameter:

[0233] alpha=0.2: negative slope.

[0234] Dropout layer

[0235] parameter:

[0236] rate=0.25: discard 25% of neurons.

[0237] Flatten

[0238] Function: Flatten the multi-dimensional feature map into a one-dimensional vector for input to the fully connected layer. Parameters: No parameters.

[0239] Fully connected layer (Dense)

[0240] Function: Output the classification result, that is, the probability that the input image is a real image.

[0241] parameter:

[0242] units=1: The number of output neurons is 1.

[0243] activation='sigmoid': Use the Sigmoid activation function to normalize the output value to [0,1] to represent the classification probability.

[0244] 3. Build a GAN model: including the generator and discriminator, and optimize it through adversarial training.

[0245] Compile the discriminator: Use binary cross entropy as the loss function to measure the classification performance of the discriminator. Use the optimizer Adam and set the learning rate to 0.0002 and the beta parameter to 0.5.

[0246] 4. Training GAN: Use the optimizer Adam, set the learning rate to 0.0002 and the beta parameter to 0.5, use the data graph of the appliance being used before the on event and the data graph of no appliance being used before the on event corresponding to the same event switching the appliance type, use the data graph of the appliance being used after the off event and the data graph of no appliance being used after the off event corresponding to the same event switching the appliance type.

[0247] As two sets of input and validation data sets, training is performed.

[0248] 5. Get the trained feature map generation model.

[0249] Step 3: Residual Network Training Data Preparation

[0250] 1. Collect the timing data of current and voltage of a single load.

[0251] Includes: the occurrence of load switching events and the corresponding occurrence time.

[0252] 2. Clean the collected continuous current time series data and normalize the maximum and minimum values, and divide it into several data containing five current cycle lengths and corresponding voltage time series data, the length of which should be n.

[0253] 3. Convert the five-cycle current time series data into two-dimensional frequency domain data through fast Fourier transform, and its size should be l×l (l=\sqrt{n}).

[0254] 4. Draw the time series data of current and voltage into a line graph with a size of l×l (l=\sqrt{n}).

[0255] 5. Add the line graphs of current and voltage to form a VI heat map.

[0256] 6. Fusion the VI thermal map and frequency domain characteristic map to generate the electrical characteristic map.

[0257] Step 4: Build and train the ResNet network

[0258] 1. Build the Resnet50 model (general model) (such as Figure 6 shown).

[0259] 2. Training using pre-prepared electrical signature graphs

[0260] 3. Obtain a trained electrical appliance recognition model.

[0261] Step 5: Perform real-time appliance identification

[0262] 1. Collect real-time current and voltage data.

[0263] 2. The real-time current data is intercepted every 5 current cycles, with a length of n, and also includes the voltage data at the corresponding moment.

[0264] 3. Draw the real-time current data into a line graph of size l×l (l=\sqrt{n}) and input it into the feature graph generation model to generate a feature graph containing only the current information of the switching event device.

[0265] 4. Convert the real-time current data into frequency domain feature graph through fast Fourier transform.

[0266] 5. Plot the corresponding voltage timing data into a line graph of size l×l (l=\sqrt{n}), and fuse it with the feature graph containing only the current information of the switching event device to generate a heat map.

[0267] 6. Overlay the thermal map and frequency domain feature map channels and input them into the appliance recognition model.

[0268] 7. Obtain identification results of the type of electrical appliance, the type of switching event, and the relative position where the switching event occurs.

[0269] Through the method of the present invention, high-quality feature images can be efficiently generated from the time series data of current and voltage, and these images can be used to perform neural network recognition tasks, which significantly improves the efficiency and effect of data processing and analysis.

[0270] The embodiments of the present invention are described in detail above, but the contents are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the scope of the present invention shall be included in the protection scope of the present invention.

Claims

1. An electrical appliance type identification method integrating convolutional neural network and adversarial neural network, characterized in that: include: 1) Collect current data sequence; 2) Use wavelet transform to implement low-pass filtering, filter out high-frequency noise, and obtain filtered data X′; 3) Identify the electrical appliance switching time t in the sequence X′, and extract the current segment S={s_1, s_2, ..., s_n} and the corresponding voltage segment V={v_1, v_2, ..., v_n} in the time window from t to t+w / F; where w is the number of current cycles; 4) Using the minimum-maximum normalization method, map each sample value in S to the range of [0, 1] to obtain the normalized data A = {a1, a2, ..., a n } and B={b1,b2,…,b n }; 5) Generate feature images; 6) Convolutional neural network recognition.

2. The electrical appliance type identification method integrating convolutional neural network and adversarial neural network according to claim 1 is characterized in that: In step 1), the current data sequence is collected based on time, and the collected current data sequence is X n =(x1, x2, ..., x m ), where n is the number of data items and m is the number of sampling points.

3. The electrical appliance type identification method integrating convolutional neural network and adversarial neural network according to claim 1 is characterized in that: Step 5) includes: 5.1) Fourier transform; 5.2) Generate a current feature image using the trained feature image generation model; 5.3) Mapping processing; 5.4) Build the image.

4. The electrical appliance type identification method integrating convolutional neural network and adversarial neural network according to claim 3 is characterized in that: Step 5.1) includes: applying fast Fourier transform to the data segment A to obtain frequency domain feature data F = {f1, f2, ..., f k }.

5. The electrical appliance type identification method integrating convolutional neural network and adversarial neural network according to claim 4 is characterized in that: Step 5.2) includes: drawing A into a time-current two-dimensional line graph T of l×l (l=\sqrt{n}), loading the pre-trained model weights into the generator, inputting T into the generator, and generating a load current feature graph matrix Y that only contains switching events.

6. The electrical appliance type identification method integrating convolutional neural network and adversarial neural network according to claim 5 is characterized in that: Step 5.3) includes: 5.31) Map F to the interval of 0-255 according to the module size to obtain the frequency domain feature matrix R; 5.32) Take the weighted average of the grayscale values ​​of A and B to generate a thermal image and obtain the time domain feature matrix G of the three channels.

7. The electrical appliance type identification method integrating convolutional neural network and adversarial neural network according to claim 6 is characterized in that: Step 5.4) includes: stacking the above 1-channel matrix R and 3-channel matrix G to construct a 4-channel image of size l×l (l=\sqrt{n}) to obtain a feature image I; wherein the first channel is the matrix R and the remaining channels are the matrix G.

8. The electrical appliance type identification method integrating convolutional neural network and adversarial neural network according to claim 1 is characterized in that: Step 6) includes: 6.1) Feature extraction; 6.2) Result classification; 6.3) Model training.

9. The electrical appliance type identification method integrating convolutional neural network and adversarial neural network according to claim 8 is characterized in that: Step 6.1) includes: using the image classification model ResNet50 to extract the features of image I and output a feature vector V of a certain length.

10. The electrical appliance type identification method integrating convolutional neural network and adversarial neural network according to claim 9 is characterized in that: Step 6.2) includes: 6.21) Set the fully connected layer with an output length of 200, the input layer is vector V, activated by LeakyReLU with a slope of 0.1, and then by a Dropout layer that randomly discards 25% of the neurons as the input of the fully connected layer with an output length of 20, then activated by LeakyReLU with a slope of 0.1, and then activated by Sigmoid, and the output is the electrical appliance category y c ; 6.22) Set the fully connected layer with an output length of 300, the input layer is vector V, activated by LeakyReLU with a slope of 0.1, then passed through a Dropout layer that randomly discards 25% of neurons as the input of the fully connected layer with an output length of 20, then activated by LeakyReLU with a slope of 0.1, and then activated by Sigmoid, and the output is the electrical appliance switching time y t ; 6.23) Set the fully connected layer with an output length of 10, the input layer is vector V, activated by LeakyReLU with a slope of 0.1, and then activated by softmax, and the output is the switch state y of the appliance s .