Intelligent household electrical appliance type identification method and system based on neural network
Through the intelligent home appliance type recognition method based on neural network, electrical parameters are collected and processed, trajectory images are generated and features are extracted, and convolutional neural network model is used for classification and recognition, which solves the problem of difficult traditional methods to deal with complex home appliances and achieves high-accuracy recognition effect.
Patent Information
- Application Number
- CN202510126765.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-27
- Publication Date
- 2025-06-06
AI Technical Summary
Traditional home appliance identification methods rely on single electrical parameters or simple rule judgments, making it difficult to cope with the complex and changing operating characteristics and diverse functional modes of modern home appliances.
The intelligent home appliance type recognition method based on neural network is adopted to classify and identify through the acquisition of electrical parameters, data cleaning and normalization, trajectory image generation, feature extraction and convolutional neural network model.
It realizes accurate identification of the complex operating characteristics and diversified functional patterns of modern home appliances, improves the accuracy and reliability of identification, and meets the needs of smart homes.
Smart Images

Figure CN120107746A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent home appliance identification, and in particular to an intelligent home appliance type identification method and system based on a neural network. Background Art
[0002] With the vigorous development of the smart home industry, the types and functions of various home appliances in the home are becoming increasingly complex. Accurate identification of home appliance types is of vital importance for realizing intelligent energy management, personalized user services, equipment failure warnings, and optimizing home electricity consumption strategies. Traditional home appliance identification methods often rely on single electrical parameters such as voltage and current or simple rule judgments. The above methods are difficult to cope with the complex and changeable operating characteristics and diverse functional modes of modern home appliances. Therefore, a more advanced and reliable smart home appliance classification and identification technology is urgently needed to meet the needs of smart home development. Summary of the invention
[0003] In order to solve the technical problem that the traditional household appliance identification methods in the prior art often rely on single electrical parameters such as voltage and current or simple rule judgment, and are difficult to cope with the complex and changeable operating characteristics and diversified functional modes of modern household appliances, the embodiment of the present invention provides a method and system for intelligent household appliance type identification based on neural network. The technical solution is as follows:
[0004] In one aspect, a method for identifying the type of smart home appliances based on a neural network is provided. The method is implemented by a device for identifying the type of smart home appliances based on a neural network. The method comprises:
[0005] S1. Collecting electrical parameters of household appliances during stable operation, wherein the electrical parameters include voltage, current, frequency, power and power factor;
[0006] S2. Clean the electrical parameters using a hybrid algorithm based on statistics and signal processing to obtain cleaned voltage data and cleaned current data; normalize the cleaned voltage data to obtain a normalized voltage value; normalize the cleaned current data to obtain a normalized current value;
[0007] S3, using time as the horizontal coordinate and the normalized voltage value as the vertical coordinate to construct a voltage trajectory curve, using the normalized current value as the vertical coordinate to construct a current trajectory curve, and combining the voltage trajectory curve and the current trajectory curve in the same two-dimensional plane coordinate system to form a trajectory image;
[0008] S4, establishing a mapping relationship between a power factor and an image pixel grayscale value, and constructing a two-dimensional trajectory image containing grayscale information corresponding to the electrical appliance operation state based on the trajectory image and the mapping relationship;
[0009] S5, extracting a feature vector from the two-dimensional trajectory image containing grayscale information to obtain a feature vector;
[0010] S6. Using the extracted feature vector as a parameter and the electrical appliance type as a classification target, classify and identify electrical appliances based on a convolutional neural network model.
[0011] On the other hand, a neural network-based smart home appliance type recognition system is provided, which is applied to a neural network-based smart home appliance type recognition method, and the system includes:
[0012] A data acquisition module, used to collect electrical parameters of household appliances during stable operation, wherein the electrical parameters include voltage, current, frequency, power and power factor;
[0013] A data preprocessing module, used to clean the electrical parameters using a hybrid algorithm based on statistics and signal processing to obtain cleaned voltage data and cleaned current data; normalize the cleaned voltage data to obtain a normalized voltage value; normalize the cleaned current data to obtain a normalized current value;
[0014] A trajectory image generation module is used to construct a voltage trajectory curve with time as the horizontal coordinate and the normalized voltage value as the vertical coordinate, and to construct a current trajectory curve with the normalized current value as the vertical coordinate, and to combine the voltage trajectory curve and the current trajectory curve in the same two-dimensional plane coordinate system to form a trajectory image;
[0015] A grayscale image generation module is used to establish a mapping relationship between the power factor and the grayscale value of the image pixel, and to construct a two-dimensional trajectory image containing grayscale information corresponding to the operation state of the electrical appliance based on the trajectory image and the mapping relationship;
[0016] A feature vector extraction module is used to extract feature vectors from a two-dimensional trajectory image containing grayscale information to obtain feature vectors;
[0017] The classification and recognition module is used to perform electrical appliance classification and recognition based on a convolutional neural network model, using the extracted feature vector as a parameter and the electrical appliance type as a classification target.
[0018] On the other hand, a neural network-based smart appliance type identification device is provided, the neural network-based smart appliance type identification device comprising: a processor; a memory, the memory storing computer-readable instructions, and when the computer-readable instructions are executed by the processor, any one of the above-mentioned neural network-based smart appliance type identification methods is implemented.
[0019] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned neural network-based smart home appliance type identification methods.
[0020] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0021] The present invention uses a hybrid algorithm based on statistics and signal processing to clean the collected data, which can effectively remove outliers and noise interference; the outlier detection method based on statistics can accurately identify and eliminate data points that obviously deviate from the normal distribution, avoiding their adverse effects on subsequent analysis; the combination of Kalman filtering and wavelet decomposition can effectively smooth the data curve and improve the stability and reliability of the data; the cleaned voltage and current data are normalized, and an adaptive normalization algorithm is used to automatically adjust parameters according to the real-time dynamic distribution of the data, effectively eliminating the differences in data dimensions under different household appliances and different operating conditions.
[0022] The present invention uses time as the horizontal coordinate, comprehensively considers active power, reactive power and power factor to determine the vertical coordinate to construct a trajectory image, and establishes a mapping relationship between power factor and image pixel grayscale value to generate a two-dimensional trajectory image containing grayscale information, so that the image can comprehensively and meticulously reflect the complex relationship between the operating status of the electrical appliance and the power factor. The differences in power factor characteristics of different household appliances can be intuitively presented through changes in image grayscale values.
[0023] The present invention adopts the directional gradient histogram algorithm to calculate the image texture features. By counting and processing the gradient information in different directions of the image, the texture details of the image can be effectively captured. The image shape features are extracted using morphological operations and contour analysis techniques. The above features can reflect the geometric characteristics of the operating status of household appliances. The texture features and shape features are deeply integrated with the grayscale features of the original image to form a high-dimensional feature vector, which comprehensively covers a variety of image information and provides a more representative feature description for accurate classification and recognition.
[0024] The present invention adopts the principal component analysis algorithm combined with the linear discriminant analysis algorithm to perform dimensionality reduction processing on the fused high-dimensional feature vector; the principal component analysis algorithm projects the data into a low-dimensional space by finding the direction of the principal component of the data, thereby reducing the dimension while retaining the main variance information of the data, reducing the amount of calculation and data redundancy; the linear discriminant analysis algorithm further optimizes the projection direction on this basis, so that the features after dimensionality reduction have the greatest separability between different categories, thereby improving the feature's ability to distinguish different types of home appliances.
[0025] The present invention classifies and identifies electrical appliances based on a convolutional neural network model. The convolution layer based on the convolutional neural network model can automatically extract the deep-level features of the image, and effectively capture the local and global features of the image through a combination of convolution kernels of different sizes and a variety of activation functions; the pooling layer can reduce the data dimension and the amount of calculation while retaining important feature information; the fully connected layer integrates features and classifies them, and the Softmax layer outputs the probability distribution of each category to achieve accurate classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0027] Figure 1 is a flow chart of a method for identifying the type of smart home appliances based on a neural network provided by an embodiment of the present invention;
[0028] Figure 2 It is a block diagram of a smart home appliance type identification system based on a neural network provided by an embodiment of the present invention;
[0029] Figure 3 It is a structural schematic diagram of a neural network-based intelligent home appliance type identification device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0031] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0032] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0033] In the embodiments of the present invention, sometimes the subscripts such as W1 It may be written in non-subscript form such as W1. When the difference is not emphasized, the meaning is the same.
[0034] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0035] The embodiment of the present invention provides a method for identifying the type of smart home appliances based on a neural network. The method can be implemented by a device for identifying the type of smart home appliances based on a neural network. The device for identifying the type of smart home appliances based on a neural network can be a terminal or a server. Figure 1 The flowchart of the method for identifying the type of smart home appliances based on a neural network is shown. The processing flow of the method may include the following steps:
[0036] S1. Collect electrical parameters of household appliances during stable operation, including voltage, current, frequency, power and power factor.
[0037] S2. Use a hybrid algorithm based on statistics and signal processing to clean the electrical parameters to obtain cleaned voltage data and cleaned current data; normalize the cleaned voltage data to obtain a normalized voltage value; normalize the cleaned current data to obtain a normalized current value.
[0038] Optionally, S2 uses a hybrid algorithm based on statistics and signal processing to clean the electrical parameters, including:
[0039] Based on the statistical outlier detection method, we can identify and remove outliers that are obviously deviated from the normal data distribution. Let the data point be x i , the first quartile of the data is Q 1 , the third quartile is Q 3 , the interquartile range is IQR = Q 3 -Q 1 , then the outlier judgment condition is x i <Q 1 -ζ×IQR or x i >Q 3 +ζ×IQR, where ζ is a coefficient dynamically adjusted according to data distribution and abnormality;
[0040] Among them, the statistically based outlier detection methods include: improved box plot method combined with dynamic threshold adjustment strategy.
[0041] The signal processing Kalman filter is combined with wavelet decomposition to remove noise interference and smooth the data curve. The state update formula of Kalman filter is: in is the estimated value of the state at the current moment, is the state estimate at the previous moment, K k is the Kalman gain, z k is the measurement value at the current moment, and H is the measurement matrix;
[0042] Wavelet decomposition decomposes the signal into sub-signals of different scales and frequencies by selecting wavelet basis functions. The calculation formula is: in <f,ψ j,k > is the inner product, which means that the signal f(t) is in the wavelet basis function ψ j,k (t) projection onto;
[0043] The isolation forest algorithm in machine learning is introduced to perform secondary detection and correction of potential abnormal data.
[0044] Among them, whether the data point is abnormal is judged according to the abnormal score, and the integrity of the data in the transmission process is ensured through data redundancy verification and error correction coding technology, and the transmission error is discovered and corrected in time; among them, the error correction coding technology can use Hamming code.
[0045] Optionally, S2 normalizes the voltage data after cleaning to obtain a normalized voltage value; and normalizes the current data after cleaning to obtain a normalized current value, including:
[0046] The voltage data and current data after cleaning are normalized and mapped to the interval [-1,1]. The adaptive normalization algorithm is used to automatically adjust the normalization parameters according to the real-time dynamic distribution of the data. The specific formula is:
[0047]
[0048] Where x is the original data, u is the real-time mean, and σ is the real-time standard deviation;
[0049] For the power and power factor data, standardization is performed and the power factor is set to The standardized formula is:
[0050]
[0051] in is the mean value of the power factor, is the standard deviation of the power factor, and z is the standardized power factor.
[0052] Among them, the power and power factor data are standardized, which not only eliminates the differences in data dimensions between different household appliances and under different operating conditions, but also improves the comparability and stability of the data, providing a data basis for subsequent image generation and feature extraction.
[0053] Among them, the present invention uses a hybrid algorithm based on statistics and signal processing to clean the collected data, which can effectively remove outliers and noise interference; the outlier detection method based on statistics can accurately identify and eliminate data points that obviously deviate from the normal distribution, avoiding their adverse effects on subsequent analysis; the combination of Kalman filtering and wavelet decomposition can effectively smooth the data curve and improve the stability and reliability of the data. For example, when processing current data, it can remove high-frequency noise caused by factors such as electromagnetic interference, making the current curve smoother and more accurately reflecting the actual operating current of household appliances; at the same time, the introduction of the isolation forest algorithm further enhances the detection and correction capabilities of potential abnormal data, ensuring the accuracy of the data. Finally, through data redundancy checking and error correction coding technology, the integrity of the data during transmission is guaranteed, reducing the risk of data loss or errors.
[0054] Among them, the voltage and current data after cleaning are normalized and mapped to the interval [-1,1]. The adaptive normalization algorithm is used to automatically adjust the parameters according to the real-time dynamic distribution of the data, effectively eliminating the differences in data dimensions for different household appliances and under different operating conditions. The power and power factor data are standardized to conform to specific statistical distributions, which is convenient for subsequent data analysis and model processing; the processed data is more scientific and reasonable when compared and analyzed. For example, the normalized voltage and current data of household appliances with different powers can be compared on the same scale, showing the differences in the operating characteristics of household appliances more clearly.
[0055] S3. Use time as the horizontal coordinate and the normalized voltage value as the vertical coordinate to construct a voltage trajectory curve, use the normalized current value as the vertical coordinate to construct a current trajectory curve, and combine the voltage trajectory curve and the current trajectory curve in the same two-dimensional plane coordinate system to form a trajectory image.
[0056] Optionally, S3 combines the voltage trajectory curve and the current trajectory curve in the same two-dimensional plane coordinate system to form a trajectory image, including:
[0057] With time t as the horizontal axis x, construct the horizontal axis of the image. The resolution of the time axis is determined by the sampling frequency. For example, if the sampling frequency is 50kHz, each unit on the time axis represents 1 / 50000 second. For the vertical axis, design a function that integrates active power, reactive power and power factor. To determine the pixel position, where P is the active power and Q is the reactive power. is the power factor, and α is the coefficient for adjusting the influence of the power factor on the vertical axis.
[0058] The two curves are precisely combined in the same two-dimensional plane coordinate system to form the initial trajectory image of the electrical appliance operation. Each sampling point in the image corresponds to a pixel point, and the initial grayscale value of the pixel point is determined according to the comprehensive relationship between voltage, current and power factor.
[0059] Among them, time is used as the horizontal coordinate, and the vertical coordinate is determined by comprehensively considering the active power, reactive power and power factor to construct the trajectory image, and a mapping relationship between the power factor and the image pixel grayscale value is established to generate a two-dimensional trajectory image containing grayscale information, so that the image can comprehensively and meticulously reflect the complex relationship between the operating status of the appliance and the power factor; the differences in power factor characteristics of different household appliances can be intuitively presented through changes in the image grayscale value. For example, household appliances with higher power factors may appear as darker grayscale areas in the image, while household appliances with lower power factors and larger fluctuations may correspond to brighter and more frequently changing grayscale areas; in this way, the image can carry more information on the operation of the appliance, providing a richer basis for subsequent classification and identification.
[0060] S4. Establish a mapping relationship between the power factor and the grayscale value of the image pixel, and construct a two-dimensional trajectory image containing grayscale information corresponding to the operating state of the electrical appliance based on the trajectory image and the mapping relationship.
[0061] Optionally, S4 establishes a mapping relationship between the power factor and the grayscale value of the image pixel, and constructs a two-dimensional trajectory image containing grayscale information corresponding to the electrical appliance operation state based on the trajectory image and the mapping relationship, including:
[0062] The active power, reactive power and transformed power factor are weighted and summed to determine the pixel gray value G. The formula is: where ω 1 is the first weight coefficient; ω 2 is the second weight coefficient; ω 3 is the third weight coefficient;
[0063] The calculated pixel gray value G is mapped, and the formula is:
[0064]
[0065] Among them G min is the minimum value; G max is the maximum value;
[0066] According to the calculated coordinates and pixel values, pixel points are drawn on the trajectory image plane to form a two-dimensional trajectory image containing grayscale information.
[0067] Among them, through the above method, the image can more comprehensively and meticulously reflect the complex relationship between the operating status of the electrical appliances and the power factor, and highlight the differences in power factor characteristics of different household appliances.
[0068] S5. Extract feature vectors from the two-dimensional trajectory image containing grayscale information to obtain feature vectors.
[0069] Optionally, S5 extracts a feature vector from the two-dimensional trajectory image containing grayscale information, including:
[0070] The directional gradient histogram algorithm is used to calculate the gradient information of the image in different directions and extract the texture features of the image:
[0071] Let the image be I(x,y), and calculate the horizontal gradient G x (x,y)=I(x+1,y)-I(x-1,y) and vertical gradient G y (x,y)=I(x,y+1)-I(x,y-1), then the gradient amplitude Gradient direction The image is divided into multiple small units, the histogram of the gradient direction in each unit is counted, the histograms of adjacent units are combined into larger blocks, and block normalization is performed to obtain the HOG feature vector of the image;
[0072] The shape features of the image are extracted based on morphological operations and contour analysis techniques, and then the contour analysis algorithm is used to calculate the length, area and curvature characteristics of the contour;
[0073] Among them, the length, area and curvature features of the contour can supplement and enhance the original information of the image, providing richer and more representative feature vectors for subsequent classification and recognition.
[0074] The extracted texture features and shape features are deeply fused with the grayscale features of the original image to form a high-dimensional feature vector.
[0075] Among them, the directional gradient histogram algorithm is used to calculate the image texture features. By counting and processing the image gradient information in different directions, it can effectively capture the texture details of the image, such as the changing trend and periodicity of the household appliance operation curve; the image shape features are extracted based on morphological operations and contour analysis technology, including contour length, area and curvature, etc. The above features can reflect the geometric characteristics of the operation status of household appliances. For example, motor appliances may have different contour shape features during startup and stable operation. The texture features and shape features are deeply integrated with the grayscale features of the original image to form a high-dimensional feature vector, which comprehensively covers various information of the image and provides a more representative feature description for accurate classification and recognition.
[0076] Optionally, a principal component analysis algorithm combined with a linear discriminant analysis algorithm is used to perform dimensionality reduction processing on the fused high-dimensional feature vector, including:
[0077] The principal component analysis algorithm is used to project the data into a low-dimensional space by finding the principal component direction of the data. Let the original high-dimensional data matrix be X, and its covariance matrix is Where n is the number of samples, calculate the eigenvalues and corresponding eigenvectors of the covariance matrix, sort them according to the eigenvalues, and select the eigenvector corresponding to the first principal component to form the projection matrix W. Then the vector y after dimensionality reduction is PCA =W T X;
[0078] The linear discriminant analysis algorithm is used to optimize the projection direction based on the principal component analysis algorithm so that the features after dimensionality reduction have the greatest separability between different categories. Suppose the number of categories is c and the sample mean of the i-th category is m. i , the overall sample mean is m, and the intra-class scatter matrix is:
[0079]
[0080] The between-class scatter matrix is:
[0081]
[0082] where n i is the number of samples of the i-th category, and the matrix is calculated The eigenvalue λ i and the eigenvector e i , select the eigenvectors corresponding to the first N largest eigenvalues to form the projection matrix W L , then the final dimension-reduced vector y LDA =W L y PCA In this way, while reducing the data dimension, the effectiveness and discrimination of the features are improved and redundant information is reduced.
[0083] Among them, the principal component analysis algorithm is combined with the linear discriminant analysis algorithm to reduce the dimensionality of the fused high-dimensional feature vector. The principal component analysis algorithm projects the data into a low-dimensional space by finding the direction of the principal component of the data, reducing the dimension while retaining the main variance information of the data, reducing the amount of calculation and data redundancy. On this basis, the linear discriminant analysis algorithm further optimizes the projection direction, so that the features after dimensionality reduction have the greatest separability between different categories, and improves the ability of the features to distinguish different types of household appliances. For example, when distinguishing different types of heating appliances and cooling appliances, the features after dimensionality reduction can better highlight the key differences between them, thereby improving the accuracy of classification and recognition.
[0084] S6. Using the extracted feature vector as a parameter and the electrical appliance type as the classification target, electrical appliance classification and recognition is performed based on the convolutional neural network model.
[0085] Optionally, S6 uses the extracted feature vector as an input parameter, uses the electrical appliance type as a classification target, and performs electrical appliance classification and recognition based on a convolutional neural network model, including:
[0086] Construct a deep convolutional neural network, including convolutional layer, pooling layer, fully connected layer and Softmax layer;
[0087] Among them, the convolution layer and the pooling layer are combined into the feature extraction layer, and the fully connected layer and the Softmax layer are combined into the classification layer.
[0088] Among them, the convolution kernel is used as a shared discrete two-dimensional filter to perform inner product operations on the pixels in the local area of the two-dimensional UI trajectory map, filter out useless information to generate a filter map, and use the offset to combine it into many feature maps of the same size. The trajectory feature map output is:
[0089]
[0090] is the trajectory feature map input; f is the nonlinear activation function; M j is a set of local area trajectory graphs; * is a convolution operation; is the convolution kernel, which represents the convolution kernel function of the jth and l-1th feature maps; For bias.
[0091] Among them, the pooling layer is also called the downsampling layer, which compresses the spatial size of the feature map, performs downsampling to reduce network parameters, extracts pixel values in the local area of the trajectory map through maximum or average pooling, and can keep the feature data information of the trajectory map unchanged, thereby reducing the amount of calculation and improving the network training speed. The pooling process formula is
[0092]
[0093] is the bias parameter; P is the pooling downsampling function.
[0094] The electrical parameters and corresponding categories of household appliances during stable operation need to be reasonably divided into training set, validation set and test set. The training set is used to train the model so that the model can learn the mapping relationship between the electrical parameters of household appliances and categories. The validation set is used to evaluate the performance of the model during the training process and adjust the model's hyperparameters based on the feedback from the validation set. The test set is used to evaluate the final performance of the model after the model training is completed.
[0095] The collected electrical parameters of the corresponding household appliances during stable operation are input to obtain a two-dimensional trajectory image containing grayscale information. The feature vector is extracted based on the two-dimensional trajectory image containing grayscale information, and the feature vector is input into the trained deep convolutional neural network model to identify the type of appliance.
[0096] Optionally, during the training process, the convolutional neural network hyperparameter configuration is optimized through a particle swarm optimization algorithm to search for optimal hyperparameters, so that the classification performance of the load classification model tends to be optimal.
[0097] Among them, the convolutional neural network model is used to classify and identify electrical appliances. The convolutional layer based on the convolutional neural network model can automatically extract the deep features of the image, and effectively capture the local and global features of the image through the combination of convolution kernels of different sizes and multiple activation functions. The pooling layer can reduce the data dimension and the amount of calculation while retaining important feature information; the fully connected layer integrates features and classifies them, and the Softmax layer outputs the probability distribution of each category to achieve accurate classification. For example, when identifying televisions of different brands and models, the convolutional neural network model can learn the subtle differences in the electrical parameter images of different televisions and accurately determine their types; by reasonably dividing the training set, validation set and test set, using the training set to train the model, adjusting the hyperparameters with the validation set, and evaluating the final performance with the test set, the accuracy and generalization ability of the model are guaranteed; at the same time, the particle swarm optimization algorithm optimizes the hyperparameter configuration based on the convolutional neural network model, further improving the classification performance of the model, enabling it to better adapt to the recognition tasks of different types of household appliances, effectively avoiding misjudgment, and improving the recognition accuracy.
[0098] The system proposed in the present invention includes a data acquisition module, a data preprocessing module, a trajectory image generation and grayscale image generation module, a feature vector extraction module and a classification and recognition module. A complete intelligent home appliance type accurate recognition process is formed according to the above modules; the data acquisition module ensures comprehensive acquisition of home appliance electrical parameters, the data preprocessing module provides high-quality data for subsequent processing, the trajectory image generation and grayscale image generation module converts electrical parameters into visual image information, the feature vector extraction module extracts effective features, and the classification and recognition module finally realizes accurate classification; the system architecture provides strong support for home appliance management in the smart home field. For example, in intelligent energy management, accurate energy consumption statistics and control can be performed according to the identified home appliance types; in terms of equipment fault warning, by accurately identifying the operating status of home appliances, abnormal operating modes can be discovered in time, and equipment failures can be warned in advance, thereby improving the overall reliability and intelligence level of the smart home system.
[0099] The present invention uses a hybrid algorithm based on statistics and signal processing to clean the collected data, which can effectively remove outliers and noise interference; the outlier detection method based on statistics can accurately identify and eliminate data points that obviously deviate from the normal distribution, avoiding their adverse effects on subsequent analysis; the combination of Kalman filtering and wavelet decomposition can effectively smooth the data curve and improve the stability and reliability of the data; the cleaned voltage and current data are normalized, and an adaptive normalization algorithm is used to automatically adjust parameters according to the real-time dynamic distribution of the data, effectively eliminating the differences in data dimensions under different household appliances and different operating conditions.
[0100] The present invention uses time as the horizontal coordinate, comprehensively considers active power, reactive power and power factor to determine the vertical coordinate to construct a trajectory image, and establishes a mapping relationship between power factor and image pixel grayscale value to generate a two-dimensional trajectory image containing grayscale information, so that the image can comprehensively and meticulously reflect the complex relationship between the operating status of the electrical appliance and the power factor. The differences in power factor characteristics of different household appliances can be intuitively presented through changes in image grayscale values.
[0101] The present invention adopts the directional gradient histogram algorithm to calculate the image texture features. By counting and processing the gradient information in different directions of the image, the texture details of the image can be effectively captured. The image shape features are extracted using morphological operations and contour analysis techniques. The above features can reflect the geometric characteristics of the operating status of household appliances. The texture features and shape features are deeply integrated with the grayscale features of the original image to form a high-dimensional feature vector, which comprehensively covers a variety of image information and provides a more representative feature description for accurate classification and recognition.
[0102] The present invention adopts the principal component analysis algorithm combined with the linear discriminant analysis algorithm to perform dimensionality reduction processing on the fused high-dimensional feature vector; the principal component analysis algorithm projects the data into a low-dimensional space by finding the direction of the principal component of the data, thereby reducing the dimension while retaining the main variance information of the data, reducing the amount of calculation and data redundancy; the linear discriminant analysis algorithm further optimizes the projection direction on this basis, so that the features after dimensionality reduction have the greatest separability between different categories, thereby improving the feature's ability to distinguish different types of home appliances.
[0103] The present invention classifies and recognizes electrical appliances based on a convolutional neural network model. The convolutional layer based on the convolutional neural network model can automatically extract the deep features of the image, and effectively capture the local and global features of the image through the combination of convolution kernels of different sizes and multiple activation functions; the pooling layer can reduce the data dimension and the amount of calculation while retaining important feature information. The fully connected layer integrates features and classifies them, and the Softmax layer outputs the probability distribution of each category to achieve accurate classification.
[0104] Figure 21 is a block diagram of a smart home appliance type recognition system based on a neural network according to an exemplary embodiment. The system is used in a smart home appliance type recognition method based on a neural network. Figure 2 The system includes a data acquisition module 210, a data preprocessing module 220, a trajectory image generation module 230, a grayscale image generation module 240, a feature vector extraction module 250 and a classification recognition module 260. Among them:
[0105] The data acquisition module 210 is used to collect electrical parameters of the household appliances during stable operation, wherein the electrical parameters include voltage, current, frequency, power and power factor;
[0106] The data preprocessing module 220 is used to clean the electrical parameters by using a hybrid algorithm based on statistics and signal processing to obtain cleaned voltage data and cleaned current data; normalize the cleaned voltage data to obtain a normalized voltage value; and normalize the cleaned current data to obtain a normalized current value;
[0107] A trajectory image generating module 230 is used to construct a voltage trajectory curve with time as the horizontal coordinate and the normalized voltage value as the vertical coordinate, and to construct a current trajectory curve with the normalized current value as the vertical coordinate, and to combine the voltage trajectory curve and the current trajectory curve in the same two-dimensional plane coordinate system to form a trajectory image;
[0108] Grayscale image generation module 240, used to establish a mapping relationship between power factor and image pixel grayscale value, and to construct a two-dimensional trajectory image containing grayscale information corresponding to the electrical appliance operation state based on the trajectory image and the mapping relationship;
[0109] A feature vector extraction module 250 is used to extract feature vectors from the two-dimensional trajectory image containing grayscale information to obtain feature vectors;
[0110] The classification and recognition module 260 is used to perform electrical appliance classification and recognition based on a convolutional neural network model, using the extracted feature vector as a parameter and the electrical appliance type as a classification target.
[0111] Optionally, the cleaning of the electrical parameters by using a hybrid algorithm based on statistics and signal processing includes:
[0112] Based on the statistical outlier detection method, we can identify and remove outliers that are obviously deviated from the normal data distribution. Let the data point be x i , the first quartile of the data is Q 1 , the third quartile is Q 3 , the interquartile range is IQR = Q 3 -Q 1 , then the outlier judgment condition is xi <Q 1 -ζ×IQR or x i >Q 3 +ζ×IQR, where ζ is a coefficient dynamically adjusted according to data distribution and abnormality;
[0113] The signal processing Kalman filter is combined with wavelet decomposition to remove noise interference and smooth the data curve. The state update formula of Kalman filter is: in is the estimated value of the state at the current moment, is the state estimate at the previous moment, K k is the Kalman gain, z k is the measurement value at the current moment, and H is the measurement matrix;
[0114] Wavelet decomposition decomposes the signal into sub-signals of different scales and frequencies by selecting wavelet basis functions. The calculation formula is: in <f,ψ j,k > is the inner product, which means that the signal f(t) is in the wavelet basis function ψ j,k (t) projection onto;
[0115] The isolation forest algorithm in machine learning is introduced to perform secondary detection and correction of potential abnormal data.
[0116] Optionally, the step of normalizing the cleaned voltage data to obtain a normalized voltage value; and the step of normalizing the cleaned current data to obtain a normalized current value comprises:
[0117] The voltage data and current data after cleaning are normalized and mapped to the interval [-1,1]. The adaptive normalization algorithm is used to automatically adjust the normalization parameters according to the real-time dynamic distribution of the data. The specific formula is:
[0118]
[0119] Where x is the original data, u is the real-time mean, and σ is the real-time standard deviation;
[0120] For the power and power factor data, standardization is performed and the power factor is set to The standardized formula is:
[0121]
[0122] in is the mean value of the power factor, is the standard deviation of the power factor, and z is the standardized power factor.
[0123] Optionally, the trajectory image generating module 230 is used to:
[0124] With time t as the horizontal axis x, construct the horizontal axis of the image. The resolution of the time axis is determined by the sampling frequency. For the vertical axis, design a function that integrates active power, reactive power and power factor. To determine the pixel position, where P is the active power and Q is the reactive power. is the power factor, and α is the coefficient for adjusting the influence of the power factor on the vertical axis.
[0125] Optionally, the grayscale image generating module 240 is used to:
[0126] The pixel gray value G is determined by weighted summing of active power, reactive power and transformed power factor. The formula is: where ω 1 is the first weight coefficient; ω 2 is the second weight coefficient; ω 3 is the third weight coefficient;
[0127] The calculated pixel gray value G is mapped, and the formula is:
[0128]
[0129] Among them G min is the minimum value; G max is the maximum value;
[0130] According to the calculated coordinates and pixel values, pixel points are drawn on the trajectory image plane to form a two-dimensional trajectory image containing grayscale information.
[0131] Optionally, the feature vector extraction module 250 is used to:
[0132] The directional gradient histogram algorithm is used to calculate the gradient information of the image in different directions and extract the texture features of the image:
[0133] Let the image be I(x,y), and calculate the horizontal gradient G x (x,y)=I(x+1,y)-I(x-1,y) and vertical gradient G y (x,y)=I(x,y+1)-I(x,y-1), then the gradient amplitude Gradient direction The image is divided into multiple small units, the histogram of the gradient direction in each unit is counted, the histograms of adjacent units are combined into larger blocks, and block normalization is performed to obtain the HOG feature vector of the image;
[0134] The shape features of the image are extracted based on morphological operations and contour analysis techniques, and then the contour analysis algorithm is used to calculate the length, area and curvature characteristics of the contour;
[0135] The extracted texture features and shape features are deeply fused with the grayscale features of the original image to form a high-dimensional feature vector.
[0136] Optionally, it also includes using a principal component analysis algorithm combined with a linear discriminant analysis algorithm to perform dimensionality reduction processing on the fused high-dimensional feature vector, including:
[0137] The principal component analysis algorithm is used to project the data into a low-dimensional space by finding the principal component direction of the data. Let the original high-dimensional data matrix be X, and its covariance matrix is Where n is the number of samples, calculate the eigenvalues and corresponding eigenvectors of the covariance matrix, sort them according to the eigenvalues, and select the eigenvector corresponding to the first principal component to form the projection matrix W. Then the vector y after dimensionality reduction is PCA =W T X;
[0138] The linear discriminant analysis algorithm is used to optimize the projection direction based on the principal component analysis algorithm, so that the features after dimensionality reduction have the greatest separability between different categories. Assume that the number of categories is c and the sample mean of the i-th category is m. i , the overall sample mean is m, and the intra-class scatter matrix is:
[0139]
[0140] The between-class scatter matrix is:
[0141]
[0142] where n i is the number of samples of the i-th category, and the matrix is calculated The eigenvalue λ i and the eigenvector e i , select the eigenvectors corresponding to the first N largest eigenvalues to form the projection matrix W L , then the final dimension-reduced vector y LDA =W L y PCA .
[0143] Optionally, the classification identification module 260 is used to:
[0144] Construct a deep convolutional neural network, including convolutional layer, pooling layer, fully connected layer and Softmax layer;
[0145] The electrical parameters and corresponding categories of household appliances during stable operation need to be reasonably divided into training set, validation set and test set. The training set is used to train the model so that the model can learn the mapping relationship between the electrical parameters of household appliances and categories. The validation set is used to evaluate the performance of the model during the training process and adjust the model's hyperparameters based on the feedback from the validation set. The test set is used to evaluate the final performance of the model after the model training is completed.
[0146] The collected electrical parameters of the corresponding household appliances during stable operation are input to obtain a two-dimensional trajectory image containing grayscale information. The feature vector is extracted based on the two-dimensional trajectory image containing grayscale information, and the feature vector is input into the trained deep convolutional neural network model to identify the type of appliance.
[0147] Optionally, during the training process, the convolutional neural network hyperparameter configuration is optimized through a particle swarm optimization algorithm to search for optimal hyperparameters, so that the classification performance of the load classification model tends to be optimal.
[0148] The present invention uses a hybrid algorithm based on statistics and signal processing to clean the collected data, which can effectively remove outliers and noise interference; the outlier detection method based on statistics can accurately identify and eliminate data points that obviously deviate from the normal distribution, avoiding their adverse effects on subsequent analysis; the combination of Kalman filtering and wavelet decomposition can effectively smooth the data curve and improve the stability and reliability of the data; the cleaned voltage and current data are normalized, and an adaptive normalization algorithm is used to automatically adjust parameters according to the real-time dynamic distribution of the data, effectively eliminating the differences in data dimensions under different household appliances and different operating conditions.
[0149] The present invention uses time as the horizontal coordinate, comprehensively considers active power, reactive power and power factor to determine the vertical coordinate to construct a trajectory image, and establishes a mapping relationship between power factor and image pixel grayscale value to generate a two-dimensional trajectory image containing grayscale information, so that the image can comprehensively and meticulously reflect the complex relationship between the operating status of the electrical appliance and the power factor. The differences in power factor characteristics of different household appliances can be intuitively presented through changes in image grayscale values.
[0150] The present invention adopts the directional gradient histogram algorithm to calculate the image texture features. By counting and processing the gradient information in different directions of the image, the texture details of the image can be effectively captured. The image shape features are extracted using morphological operations and contour analysis techniques. The above features can reflect the geometric characteristics of the operating status of household appliances. The texture features and shape features are deeply integrated with the grayscale features of the original image to form a high-dimensional feature vector, which comprehensively covers a variety of image information and provides a more representative feature description for accurate classification and recognition.
[0151] The present invention adopts the principal component analysis algorithm combined with the linear discriminant analysis algorithm to perform dimensionality reduction processing on the fused high-dimensional feature vector; the principal component analysis algorithm projects the data into a low-dimensional space by finding the direction of the principal component of the data, thereby reducing the dimension while retaining the main variance information of the data, reducing the amount of calculation and data redundancy; the linear discriminant analysis algorithm further optimizes the projection direction on this basis, so that the features after dimensionality reduction have the greatest separability between different categories, thereby improving the feature's ability to distinguish different types of home appliances.
[0152] The present invention classifies and identifies electrical appliances based on a convolutional neural network model. The convolutional layer based on the convolutional neural network model can automatically extract the deep features of the image, and effectively capture the local and global features of the image through the combination of convolution kernels of different sizes and multiple activation functions. The pooling layer can reduce the data dimension and the amount of calculation while retaining important feature information; the fully connected layer integrates features and classifies them, and the Softmax layer outputs the probability distribution of each category to achieve accurate classification.
[0153] Figure 3 is a schematic diagram of the structure of a smart home appliance type recognition device based on a neural network provided by an embodiment of the present invention, such as Figure 3 As shown, the neural network-based intelligent home appliance type recognition device may include the above Figure 2 The neural network-based smart home appliance type recognition system shown. Optionally, the neural network-based smart home appliance type recognition device 310 may include a first processor 2001.
[0154] Optionally, the neural network-based smart home appliance type identification device 310 may further include a memory 2002 and a transceiver 2003 .
[0155] The first processor 2001, the memory 2002 and the transceiver 2003 may be connected via a communication bus.
[0156] Combine the following Figure 3 The components of the neural network-based smart home appliance type recognition device 310 are specifically introduced:
[0157] The first processor 2001 is the control center of the neural network-based smart home appliance type recognition device 310, which can be a processor or a general term for multiple processing elements. For example, the first processor 2001 is one or more central processing units (CPUs), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (field programmable gate arrays, FPGAs).
[0158] Optionally, the first processor 2001 can perform various functions of the neural network-based smart appliance type identification device 310 by running or executing a software program stored in the memory 2002 and calling data stored in the memory 2002.
[0159] In a specific implementation, as an embodiment, the first processor 2001 may include one or more CPUs, such as Figure 3 CPU0 and CPU1 are shown in FIG.
[0160] In a specific implementation, as an embodiment, the neural network-based smart home appliance type recognition device 310 may also include multiple processors, such as Figure 3 The first processor 2001 and the second processor 2004 are shown in FIG. Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0161] The memory 2002 is used to store the software program for executing the solution of the present invention, and is controlled to be executed by the first processor 2001. The specific implementation method can refer to the above method embodiment, which will not be repeated here.
[0162] Optionally, the memory 2002 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2002 may be integrated with the first processor 2001, or may exist independently, and may be accessed through the interface circuit ( Figure 3 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0163] The transceiver 2003 is used to communicate with a network device or a terminal device.
[0164] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Figure 3 The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.
[0165] Optionally, the transceiver 2003 may be integrated with the first processor 2001, or may exist independently, and may be connected to the first processor 2001 through the interface circuit ( Figure 3 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0166] It should be noted that Figure 3 The structure of the neural network-based smart appliance type identification device 310 shown in the figure does not constitute a limitation on the router. The actual knowledge structure identification device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0167] In addition, the technical effects of the neural network-based smart home appliance type identification device 310 can refer to the technical effects of the neural network-based smart home appliance type identification method described in the above method embodiment, and will not be repeated here.
[0168] It should be understood that the first processor 2001 in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0169] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0170] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable system. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0171] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0172] In the present invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0173] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0174] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0175] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0176] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of the system or unit, which can be electrical, mechanical or other forms.
[0177] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0178] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0179] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling 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 methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0180] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for identifying the type of smart home appliances based on a neural network, characterized in that: include: S1. Collecting electrical parameters of household appliances during stable operation, wherein the electrical parameters include voltage, current, frequency, power and power factor; S2, using a hybrid algorithm based on statistics and signal processing to clean the electrical parameters to obtain voltage data and current data after cleaning; Normalizing the cleaned voltage data to obtain a normalized voltage value; Normalizing the current data after cleaning to obtain a normalized current value; S3, using time as the horizontal coordinate and the normalized voltage value as the vertical coordinate to construct a voltage trajectory curve, using the normalized current value as the vertical coordinate to construct a current trajectory curve, and combining the voltage trajectory curve and the current trajectory curve in the same two-dimensional plane coordinate system to form a trajectory image; S4, establishing a mapping relationship between a power factor and an image pixel grayscale value, and constructing a two-dimensional trajectory image containing grayscale information corresponding to the electrical appliance operation state based on the trajectory image and the mapping relationship; S5, extracting a feature vector from the two-dimensional trajectory image containing grayscale information to obtain a feature vector; S6. Using the extracted feature vector as a parameter and the electrical appliance type as a classification target, classify and identify electrical appliances based on a convolutional neural network model.
2. The method for identifying the type of smart home appliances based on a neural network according to claim 1, characterized in that: The S2 uses a hybrid algorithm based on statistics and signal processing to clean the electrical parameters, including: Based on the statistical outlier detection method, we can identify and remove outliers that are obviously deviated from the normal data distribution. Let the data point be x i , the first quartile of the data is Q1, the third quartile is Q3, and the interquartile range is IQR = Q3-Q1, then the outlier judgment condition is x i <Q1-ζ×IQR or x i >Q3+ζ×IQR, where ζ is a coefficient dynamically adjusted according to data distribution and abnormality; The signal processing Kalman filter is combined with wavelet decomposition to remove noise interference and smooth the data curve. The state update formula of Kalman filter is: in is the estimated value of the state at the current moment, is the state estimate at the previous moment, K k is the Kalman gain, z k is the measurement value at the current moment, and H is the measurement matrix; Wavelet decomposition decomposes the signal into sub-signals of different scales and frequencies by selecting wavelet basis functions. The calculation formula is: in <f,ψ j,k > is the inner product, which means that the signal f(t) is in the wavelet basis function ψ j,k (t) projection onto; The isolation forest algorithm in machine learning is introduced to perform secondary detection and correction of potential abnormal data.
3. The method for identifying the type of smart home appliances based on a neural network according to claim 1, characterized in that: The step S2 normalizes the voltage data after cleaning to obtain a normalized voltage value; The cleaned current data is normalized to obtain the normalized current value, including: The voltage data and current data after cleaning are normalized and mapped to the interval [-1,1]. The adaptive normalization algorithm is used to automatically adjust the normalization parameters according to the real-time dynamic distribution of the data. The specific formula is: Where x is the original data, u is the real-time mean, and σ is the real-time standard deviation; For the power and power factor data, standardization is performed and the power factor is set to The standardized formula is: in is the mean value of the power factor, is the standard deviation of the power factor, and z is the standardized power factor.
4. The method for identifying the type of smart home appliances based on a neural network according to claim 1, characterized in that: The step S3 combines the voltage trajectory curve and the current trajectory curve in the same two-dimensional plane coordinate system to form a trajectory image, including: With time t as the horizontal axis x, construct the horizontal axis of the image. The resolution of the time axis is determined by the sampling frequency. For the vertical axis, design a function that integrates active power, reactive power and power factor. To determine the pixel position, where P is the active power and Q is the reactive power. is the power factor, and α is the coefficient for adjusting the influence of the power factor on the vertical axis.
5. The method for identifying the type of smart home appliances based on a neural network according to claim 1, characterized in that: The step S4 of establishing a mapping relationship between the power factor and the grayscale value of the image pixel, and constructing a two-dimensional trajectory image containing grayscale information corresponding to the operation state of the electrical appliance based on the trajectory image and the mapping relationship, includes: The active power, reactive power and transformed power factor are weighted and summed to determine the pixel gray value G. The formula is: Where ω1 is the first weight coefficient; ω2 is the second weight coefficient; ω3 is the third weight coefficient; The calculated pixel gray value G is mapped, and the formula is: Among them G min is the minimum value; G max is the maximum value; According to the calculated coordinates and pixel values, pixel points are drawn on the trajectory image plane to form a two-dimensional trajectory image containing grayscale information.
6. The method for identifying the type of smart home appliances based on a neural network according to claim 1, characterized in that: The step S5 extracts feature vectors from the two-dimensional trajectory image containing grayscale information, including: The directional gradient histogram algorithm is used to calculate the gradient information of the image in different directions and extract the texture features of the image: Let the image be I(x,y), and calculate the horizontal gradient G x (x,y)=I(x+1,y)-I(x-1,y) and vertical gradient G y (x,y)=I(x,y+1)-I(x,y-1), then the gradient amplitude Gradient direction The image is divided into multiple small units, the histogram of the gradient direction in each unit is counted, the histograms of adjacent units are combined into larger blocks, and block normalization is performed to obtain the HOG feature vector of the image; The shape features of the image are extracted based on morphological operations and contour analysis techniques, and the length, area and curvature features of the contour are calculated using the contour analysis algorithm; The extracted texture features and shape features are deeply fused with the grayscale features of the original image to form a high-dimensional feature vector.
7. The method for identifying the type of smart home appliances based on a neural network according to claim 6, characterized in that: It also includes using the principal component analysis algorithm combined with the linear discriminant analysis algorithm to reduce the dimensionality of the fused high-dimensional feature vector, including: The principal component analysis algorithm is used to project the data into a low-dimensional space by finding the principal component direction of the data. Let the original high-dimensional data matrix be X, and its covariance matrix is Where n is the number of samples, calculate the eigenvalues and corresponding eigenvectors of the covariance matrix, sort them according to the eigenvalues, and select the eigenvector corresponding to the first principal component to form the projection matrix W. Then the vector y after dimensionality reduction is PCA =W T X; The linear discriminant analysis algorithm is used to optimize the projection direction based on the principal component analysis algorithm, so that the features after dimensionality reduction have the greatest separability between different categories. Assume that the number of categories is c and the sample mean of the i-th category is m. i , the overall sample mean is m, and the intra-class scatter matrix is: The between-class scatter matrix is: where n i is the number of samples of the i-th category, and the matrix is calculated The eigenvalue λ i and the eigenvector e i , select the eigenvectors corresponding to the first N largest eigenvalues to form the projection matrix W L , then the final dimension-reduced vector y LDA =W L y PCA .
8. The method for identifying the type of smart home appliances based on a neural network according to claim 1, characterized in that: The step S6 uses the extracted feature vector as an input parameter, uses the electrical appliance type as a classification target, and performs electrical appliance classification and recognition based on a convolutional neural network model, including: Build a deep convolutional neural network model, including convolutional layer, pooling layer, fully connected layer and Softmax layer; The electrical parameters and corresponding categories of household appliances during stable operation need to be reasonably divided into training set, validation set and test set. The training set is used to train the model so that the model can learn the mapping relationship between the electrical parameters of household appliances and categories. The validation set is used to evaluate the performance of the model during the training process and adjust the model's hyperparameters based on the feedback from the validation set. The test set is used to evaluate the final performance of the model after the model training is completed. The collected electrical parameters of the corresponding household appliances during stable operation are input to obtain a two-dimensional trajectory image containing grayscale information. The feature vector is extracted based on the two-dimensional trajectory image containing grayscale information, and the feature vector is input into the trained deep convolutional neural network model to identify the type of appliance.
9. The method for identifying the type of smart home appliances based on a neural network according to claim 8, characterized in that: During the training process, the particle swarm optimization algorithm is used to optimize the network structure of the convolutional neural network hyperparameter configuration, search for the optimal hyperparameters, and make the classification performance of the load classification model tend to be optimal.
10. A system for implementing the method for identifying the type of smart home appliances based on a neural network as claimed in claims 1 to 9, characterized in that: include: A data acquisition module, used to collect electrical parameters of household appliances during stable operation, wherein the electrical parameters include voltage, current, frequency, power and power factor; A data preprocessing module, used to clean the electrical parameters by using a hybrid algorithm based on statistics and signal processing to obtain cleaned voltage data and cleaned current data; Normalizing the cleaned voltage data to obtain a normalized voltage value; Normalizing the current data after cleaning to obtain a normalized current value; A trajectory image generation module is used to construct a voltage trajectory curve with time as the horizontal coordinate and the normalized voltage value as the vertical coordinate, and to construct a current trajectory curve with the normalized current value as the vertical coordinate, and to combine the voltage trajectory curve and the current trajectory curve in the same two-dimensional plane coordinate system to form a trajectory image; A grayscale image generation module is used to establish a mapping relationship between the power factor and the grayscale value of the image pixel, and to construct a two-dimensional trajectory image containing grayscale information corresponding to the operation state of the electrical appliance based on the trajectory image and the mapping relationship; A feature vector extraction module is used to extract feature vectors from a two-dimensional trajectory image containing grayscale information to obtain feature vectors; The classification and recognition module is used to perform electrical appliance classification and recognition based on a convolutional neural network model, using the extracted feature vector as a parameter and the electrical appliance type as a classification target.
Citation Information
Cited By
Electric equipment identification method and system
CN121456711A
Method, device, medium and program product for identifying morphological characteristics of welding current-voltage trajectory diagram
CN121505283A
Multi-band coupling feature-based motor imagery ability grading method and device
CN121682041A