Load identification method and device, computer equipment and storage medium
1. A method of load identification, the method comprising:
acquiring a load identification request, and searching a load to be identified corresponding to the load identification request;
extracting a V-I track matrix corresponding to a load to be identified, wherein a V-I track is used for representing the relation between a voltage waveform and a voltage waveform;
extracting additional characteristics and power characteristics of current higher harmonics corresponding to the load to be identified;
combining the V-I track matrix, the power characteristics and the current higher harmonic wave additional characteristics to obtain a mixed characteristic matrix;
and extracting image features corresponding to the mixed feature matrix, and acquiring a load identification result corresponding to the load to be identified according to the image features.
2. The method of claim 1, wherein the extracting the V-I trajectory matrix corresponding to the load to be identified comprises:
extracting voltage waveform data and current waveform data of a load to be identified in a period;
respectively carrying out normalization processing on the voltage waveform data and the current waveform data to obtain normalized voltage waveform data and normalized current waveform data;
and mapping the normalized voltage waveform data and the normalized current waveform data to an initial V-I track matrix to obtain a V-I track matrix corresponding to the load to be identified.
3. The method of claim 1, wherein the extracting additional current harmonic features corresponding to the load to be identified comprises:
converting a time domain signal of the current waveform of the load to be identified in a period into a frequency domain signal through fast Fourier transform;
and acquiring the current higher harmonic wave additional characteristics corresponding to the load to be identified according to the frequency domain signal.
4. The method of claim 1, wherein combining the V-I trajectory matrix, the power signature, and the current higher harmonic additive signature to obtain a mixed signature matrix comprises:
constructing a supplementary characteristic matrix according to the power characteristic and the current higher harmonic wave additional characteristic;
and splicing the V-I track matrix and the supplementary feature matrix to obtain a mixed feature matrix.
5. The method of claim 4, wherein constructing a supplementary signature matrix from the power signature and the current higher harmonic addition signature comprises:
normalizing the power characteristic and the current higher harmonic wave additional characteristic to obtain a normalized characteristic value;
converting the normalized characteristic value into a binary characteristic value;
and sequentially filling the binary characteristic values into an initial characteristic matrix according to a preset characteristic sequence to obtain a supplementary characteristic matrix.
6. The method according to claim 1, wherein the extracting of the image feature corresponding to the mixed feature matrix and the obtaining of the load identification result corresponding to the load to be identified according to the image feature comprise:
acquiring two-dimensional image data corresponding to the mixed feature matrix;
and extracting image features corresponding to the two-dimensional image data through a preset convolutional neural network, and acquiring a load identification result corresponding to the load to be identified according to the image features.
7. A load recognition apparatus, characterized in that the apparatus comprises:
a request obtaining module for obtaining the load identification request and searching the load to be identified corresponding to the load identification request
The track matrix extraction module is used for extracting a V-I track matrix corresponding to the load to be identified, wherein the V-I track is used for representing the relation between the voltage waveform and the voltage waveform;
the characteristic extraction module is used for extracting current higher harmonic additional characteristics and power characteristics corresponding to the load to be identified;
the mixed matrix construction module is used for combining the V-I track matrix, the power characteristics and the current higher harmonic wave additional characteristics to obtain a mixed characteristic matrix;
and the load identification module is used for extracting the image characteristics corresponding to the mixed characteristic matrix and acquiring the load identification result corresponding to the load to be identified according to the image characteristics.
8. The apparatus of claim 7, wherein the trajectory matrix extraction module is specifically configured to: extracting voltage waveform data and current waveform data of a load to be identified in a period; respectively carrying out normalization processing on the voltage waveform data and the current waveform data to obtain normalized voltage waveform data and normalized current waveform data; and mapping the normalized voltage waveform data and the normalized current waveform data to an initial V-I track matrix to obtain a V-I track matrix corresponding to the load to be identified.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
Background
With the rapid development of national economy, the living standard of people is remarkably improved, and the use of household appliances by residents is greatly increased. However, since some household appliances, especially household appliances containing a large amount of higher harmonic currents, such as hair dryers, washing machines, etc., have certain potential safety hazards, it is necessary to identify the use conditions of the household appliances, and further to investigate potential safety risks. At present, the type, the running state, the power size and the like of user-side electric equipment can be monitored in real time through a non-invasive load identification technology, potential safety hazards of user electricity utilization are identified, and users are helped to investigate safety risks, so that safety electricity utilization of residents is guided.
For the current non-intrusive load identification technology, a model database of an ARMAX linear load and a Hammerstein nonlinear load can be generally constructed according to steady-state current characteristics of different loads, model matching is performed on an unknown load to realize load type identification, however, polynomial models are difficult to accurately reflect current harmonic characteristics of the load, and therefore load identification accuracy of high-order harmonic current household appliances is influenced.
Disclosure of Invention
In view of the above, it is necessary to provide a load identification method, a device, a computer device and a storage medium for accurately monitoring the load of a household appliance with higher harmonic current.
A method of load identification, the method comprising:
acquiring a load identification request, and searching a load to be identified corresponding to the load identification request;
extracting a V-I track matrix corresponding to a load to be identified, wherein a V-I track is used for representing the relation between a voltage waveform and a voltage waveform;
extracting additional characteristics and power characteristics of current higher harmonics corresponding to the load to be identified;
combining the V-I track matrix, the power characteristics and the current higher harmonic wave additional characteristics to obtain a mixed characteristic matrix;
and extracting image features corresponding to the mixed feature matrix, and acquiring a load identification result corresponding to the load to be identified according to the image features.
In one embodiment, the extracting the V-I trajectory matrix corresponding to the load to be identified includes:
extracting voltage waveform data and current waveform data of a load to be identified in a period;
respectively carrying out normalization processing on the voltage waveform data and the current waveform data to obtain normalized voltage waveform data and normalized current waveform data;
and mapping the normalized voltage waveform data and the normalized current waveform data to an initial V-I track matrix to obtain a V-I track matrix corresponding to the load to be identified.
In one embodiment, the extracting additional characteristics of the current higher harmonic corresponding to the load to be identified includes:
converting a time domain signal of the current waveform of the load to be identified in a period into a frequency domain signal through fast Fourier transform;
and acquiring the current higher harmonic wave additional characteristics corresponding to the load to be identified according to the frequency domain signal.
In one embodiment, the combining the V-I trajectory matrix, the power signature, and the current higher harmonic additional signature to obtain a mixed signature matrix includes:
constructing a supplementary characteristic matrix according to the power characteristic and the current higher harmonic wave additional characteristic;
and splicing the V-I track matrix and the supplementary feature matrix to obtain a mixed feature matrix.
In one embodiment, the constructing a supplementary signature matrix according to the power signature and the current higher harmonic addition signature includes:
normalizing the power characteristic and the current higher harmonic wave additional characteristic to obtain a normalized characteristic value;
converting the normalized characteristic value into a binary characteristic value;
and sequentially filling the binary characteristic values into an initial characteristic matrix according to a preset characteristic sequence to obtain a supplementary characteristic matrix.
In one embodiment, the extracting the image feature corresponding to the mixed feature matrix, and the obtaining the load identification result corresponding to the load to be identified according to the image feature includes:
acquiring two-dimensional image data corresponding to the mixed feature matrix;
and extracting image features corresponding to the two-dimensional image data through a preset convolutional neural network, and acquiring a load identification result corresponding to the load to be identified according to the image features.
A load identification apparatus, the apparatus comprising:
a request obtaining module for obtaining the load identification request and searching the load to be identified corresponding to the load identification request
The track matrix extraction module is used for extracting a V-I track matrix corresponding to the load to be identified, wherein the V-I track is used for representing the relation between the voltage waveform and the voltage waveform;
the characteristic extraction module is used for extracting current higher harmonic additional characteristics and power characteristics corresponding to the load to be identified;
the mixed matrix construction module is used for combining the V-I track matrix, the power characteristics and the current higher harmonic wave additional characteristics to obtain a mixed characteristic matrix;
and the load identification module is used for extracting the image characteristics corresponding to the mixed characteristic matrix and acquiring the load identification result corresponding to the load to be identified according to the image characteristics.
In one embodiment, the trajectory matrix extraction module is specifically configured to: extracting voltage waveform data and current waveform data of a load to be identified in a period; respectively carrying out normalization processing on the voltage waveform data and the current waveform data to obtain normalized voltage waveform data and normalized current waveform data; and mapping the normalized voltage waveform data and the normalized current waveform data to an initial V-I track matrix to obtain a V-I track matrix corresponding to the load to be identified.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a load identification request, and searching a load to be identified corresponding to the load identification request;
extracting a V-I track matrix corresponding to a load to be identified, wherein a V-I track is used for representing the relation between a voltage waveform and a voltage waveform;
extracting additional characteristics and power characteristics of current higher harmonics corresponding to the load to be identified;
combining the V-I track matrix, the power characteristics and the current higher harmonic wave additional characteristics to obtain a mixed characteristic matrix;
and extracting image features corresponding to the mixed feature matrix, and acquiring a load identification result corresponding to the load to be identified according to the image features.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a load identification request, and searching a load to be identified corresponding to the load identification request;
extracting a V-I track matrix corresponding to a load to be identified, wherein a V-I track is used for representing the relation between a voltage waveform and a voltage waveform;
extracting additional characteristics and power characteristics of current higher harmonics corresponding to the load to be identified;
combining the V-I track matrix, the power characteristics and the current higher harmonic wave additional characteristics to obtain a mixed characteristic matrix;
and extracting image features corresponding to the mixed feature matrix, and acquiring a load identification result corresponding to the load to be identified according to the image features.
According to the load identification method, the load identification device, the computer equipment and the storage medium, the load to be identified corresponding to the load identification request is searched by acquiring the load identification request; extracting a V-I track matrix corresponding to a load to be identified, wherein a V-I track is used for representing the relation between a voltage waveform and a voltage waveform; extracting additional characteristics and power characteristics of current higher harmonics corresponding to a load to be identified; combining the V-I track matrix, the power characteristics and the current higher harmonic wave additional characteristics to obtain a mixed characteristic matrix; and extracting the image characteristics corresponding to the mixed characteristic matrix, and acquiring a load identification result corresponding to the load to be identified according to the image characteristics. According to the method, the characteristics of the traditional V-I track matrix are improved, the higher harmonic current characteristics and the power characteristics are fused into the matrix to form a mixed characteristic moment, then load identification is carried out based on the mixed characteristic matrix, various household appliances can be accurately distinguished, and the potential safety risks of the household appliances containing a large number of higher harmonics can be more accurately checked.
Drawings
FIG. 1 is a diagram of an application environment of a load identification method in one embodiment;
FIG. 2 is a flow diagram illustrating a method for load identification in one embodiment;
FIG. 3 is a schematic sub-flow chart of step 203 of FIG. 2 in one embodiment;
FIG. 4 is a schematic sub-flow chart illustrating step 205 of FIG. 2 according to one embodiment;
FIG. 5 is a schematic flow chart diagram illustrating the step of constructing a hybrid feature matrix in one embodiment;
FIG. 6 is a schematic diagram of a hybrid feature matrix in one embodiment;
FIG. 7 is a diagram illustrating the steps of extracting image features via a neural network model in one embodiment;
FIG. 8 is a schematic overall flow chart of a load identification method according to another embodiment;
FIG. 9 is a block diagram showing the structure of a load recognition apparatus according to an embodiment;
FIG. 10 is a diagram showing an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The load identification method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 and the server 104 are connected via a network. When a worker at the terminal 102 identifies the specified power load through the server 104, the corresponding load identification request can be sent to the server 104 through the terminal 102, the server 104 obtains the load identification request, and searches for a load to be identified corresponding to the load identification request; extracting a V-I track matrix corresponding to a load to be identified, wherein a V-I track is used for representing the relation between a voltage waveform and a voltage waveform; extracting additional characteristics and power characteristics of current higher harmonics corresponding to a load to be identified; combining the V-I track matrix, the power characteristics and the current higher harmonic wave additional characteristics to obtain a mixed characteristic matrix; and extracting the image characteristics corresponding to the mixed characteristic matrix, and acquiring a load identification result corresponding to the load to be identified according to the image characteristics. The requesting end 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, and tablet computers. The server 104 may be implemented by an independent server or a server cluster composed of a plurality of servers, and may also be a cloud server.
In one embodiment, as shown in fig. 2, a load identification method is provided, which is described by taking the method as an example applied to the server 104 in fig. 1, and includes the following steps:
step 201, acquiring a load identification request, and searching for a load to be identified corresponding to the load identification request.
The load identification request is sent by the terminal 102 to request the server 104 to identify the load to be identified in a non-intrusive manner. The load to be identified specifically refers to user side comprehensive electricity utilization data in a family unit acquired by load acquisition equipment such as an intelligent electric meter, and the like, and the user side comprehensive electricity utilization data includes voltage waveform data, current waveform data, power data and the like of user side electricity utilization. The load identification is also called load monitoring, namely the comprehensive electricity utilization data is decomposed into the power consumption of single electrical equipment, and the corresponding electricity consumption data is analyzed, so that energy conservation and power demand response are realized.
Specifically, the server 104 may perform load identification on the specified load to be identified according to a request sent by the terminal 102, and through the load identification, the type, the operating state, the power level and the like of the user-side electric equipment may be monitored in real time, so as to identify the potential safety hazard of the user electricity utilization, help the user to investigate the safety risk, and thus guide the safe electricity utilization of residents. In one embodiment, in addition to performing load identification according to the request, the server 104 may perform load identification on the power consumption of the user side directly and periodically according to a preset setting, so as to improve the effectiveness of load identification.
And 203, extracting a V-I track matrix corresponding to the load to be identified, wherein the V-I track is used for representing the relationship between the voltage waveform and the voltage waveform.
Wherein the V-I track is the waveform relationship between the steady-state current and the steady-state voltage in the collected comprehensive electricity consumption data. Since the V-I locus represents the relationship between the voltage waveform and the current waveform of the load, and the V-I locus difference of different loads is the shape of the locus, it is difficult to perform feature extraction using common signal processing methods, such as fast fourier transform, wavelet transform, and other algorithms. Therefore, the method and the device convert the V-I track into the track matrix, describe the V-I track characteristics of different types of family loads by using the two-dimensional image matrix, and have the advantages of simple calculation and high reduction effect.
Specifically, the V-I track matrix is used as basic data of load identification, when load identification is carried out, a current waveform and a voltage waveform can be extracted from comprehensive power utilization data, then a corresponding V-I track is obtained according to the current waveform and the voltage waveform, and the V-I track matrix is further constructed.
And step 205, extracting additional characteristics and power characteristics of the current higher harmonic corresponding to the load to be identified.
And step 207, combining the V-I track matrix, the power characteristics and the current higher harmonic wave additional characteristics to obtain a mixed characteristic matrix.
Specifically, in order to prevent the feature data from being too large and prolong the training time of supervised learning, the order of the matrix is properly reduced when the V-I waveform matrix is used for describing the current waveform features of the load, so that the sampling precision of the current waveform is reduced, and a part of higher harmonic features, such as 9 harmonic features, are difficult to be reflected in the V-I waveform matrix, so that certain deviation is caused in the aspect of household appliance identification. Therefore, current higher harmonics and active and reactive powers are selected as supplementary features, the higher harmonics feature can make up the defect that the sampling precision of a V-I waveform matrix is insufficient, the active and reactive power features can distinguish large-power electric appliances from small-power electric appliances, and the accuracy of load identification can be greatly improved by the aid of the large-power electric appliances and the small-power electric appliances. Meanwhile, after the power characteristics and the current higher harmonic characteristics are obtained, the power characteristics and the current higher harmonic characteristics are used as additional characteristics and integrated with the V-I waveform matrix to form a mixed characteristic matrix, and subsequent operation of an identification algorithm is facilitated.
And 209, extracting the image characteristics corresponding to the mixed characteristic matrix, and acquiring a load identification result corresponding to the load to be identified according to the image characteristics.
Specifically, after the mixed feature matrix is obtained, the mixed feature matrix can be regarded as a black-and-white image, feature extraction is further performed by using an image recognition technology to obtain image features corresponding to the mixed feature matrix, and a load recognition result corresponding to the load to be recognized is obtained according to the image features. In a specific embodiment, the image recognition can be performed based on the trained convolutional neural network model, so as to improve the efficiency and accuracy of the image recognition process. For example, for the heater and the blower, the similarity of the V-I track matrix of the two loads is high, the difference between the active power and the reactive power is extremely small, and the feature identification is difficult to perform, but the higher harmonic features of the two loads are greatly different, so that the load identification method can accurately distinguish the two household appliances by fusing the higher harmonic as a supplementary feature, and is beneficial to checking the potential safety risk of the household appliances containing a large amount of higher harmonics.
According to the load identification method, the load to be identified corresponding to the load identification request is searched by acquiring the load identification request; extracting a V-I track matrix corresponding to a load to be identified, wherein a V-I track is used for representing the relation between a voltage waveform and a voltage waveform; extracting additional characteristics and power characteristics of current higher harmonics corresponding to a load to be identified; combining the V-I track matrix, the power characteristics and the current higher harmonic wave additional characteristics to obtain a mixed characteristic matrix; and extracting the image characteristics corresponding to the mixed characteristic matrix, and acquiring a load identification result corresponding to the load to be identified according to the image characteristics. According to the method, the characteristics of the traditional V-I track matrix are improved, the higher harmonic current characteristics and the power characteristics are fused into the matrix to form a mixed characteristic moment, then load identification is carried out based on the mixed characteristic matrix, various household appliances can be accurately distinguished, and the potential safety risks of the household appliances containing a large number of higher harmonics can be more accurately checked.
In one embodiment, as shown in FIG. 3, step 203 comprises:
step 302, extracting voltage waveform data and current waveform data of the load to be identified in the period.
And 304, respectively carrying out normalization processing on the voltage waveform data and the current waveform data to obtain normalized voltage waveform data and normalized current waveform data.
And step 306, mapping the normalized voltage waveform data and the normalized current waveform data to an initial V-I track matrix to obtain a V-I track matrix corresponding to the load to be identified.
The voltage waveform data and the current waveform data in the period specifically refer to voltage waveform data in one voltage period and current waveform data in one current period. The normalization processing of the voltage waveform data and the current waveform data is performed respectively, specifically, the normalization processing of the two waveform data is performed to a range of [0,1 ]. And the initial V-I track matrix refers to the track matrix in the initial state, and the elements in the matrix are all 0.
Specifically, for convenience of a subsequent operation process, a V-I trajectory may be extracted from the load to be identified, and the V-I trajectory may be mapped into the initial matrix to construct a V-I trajectory matrix corresponding to the load to be identified. In one embodiment, the matrix building process includes: firstly, extracting voltage and current waveforms of a load in a period, and normalizing the data of the two waveforms to be in a range of [0,1 ]. And constructing an NxN-order two-dimensional matrix M as a V-I waveform matrix, wherein all elements of the matrix in an initial state are 0. The voltage current waveform is mapped into an nxn order two dimensional matrix using the following equations. The formula is as follows:
M(a,b)=1
v (k) and I (k) respectively represent the voltage and current values of the k-th sampling point after normalization; a and b are respectively a row index and a column index of the matrix M;to round the symbol down. In the embodiment, the load data to be identified can be effectively converted into the V-I matrix, so that the load identification efficiency and accuracy are improved.
In one embodiment, as shown in FIG. 4, step 205 comprises:
step 401, converting a time domain signal of a current waveform of a load to be identified in a period into a frequency domain signal through fast Fourier transform;
and 403, acquiring additional characteristics of the current higher harmonic corresponding to the load to be identified according to the frequency domain signal.
The current higher harmonic wave additional characteristics comprise amplitude characteristics and phase characteristics. Specifically, the sampling precision of the V-I waveform matrix can be supplemented by the additional characteristic of the current higher harmonics, so that the accuracy of the load identification process is improved. When the conversion is performed, a time domain signal of a current waveform in a period needs to be converted into a frequency domain signal, and the conversion formula specifically includes:
wherein k represents the number of harmonics; x (k) represents the frequency domain component of the kth harmonic, expressed in complex numbers; n represents a current value; n represents the number of current samples in a cycle. Where the modulus of X (k) represents the amplitude of the kth harmonic and the argument of X (k) represents the phase of the kth harmonic. Research shows that the amplitude of odd harmonics in a steady-state current waveform of the household appliance is far larger than even harmonics, and when the harmonic frequency is larger than 11, the amplitude is very small, and a large amount of interference noise is easily mixed, so that in the specific embodiment of the application, additional characteristics of current higher harmonics can be obtained by selecting 7,9 and 11 harmonics. And the magnitudes of the higher harmonics are calculated as follows:
Ai(k)=|Xi(k)|
in the formula Ai(k) Representing the amplitude of the kth harmonic of the current; xi(k) Representing the frequency domain components of the kth harmonic of the current, where k is taken to be 7,9,11, respectively. Meanwhile, for the additional characteristics of the current higher harmonics, the phase is an extremely important parameter besides the amplitude. Since the phase values of the higher harmonics of different household appliances are different, for example, the phase of the 9 th harmonic of the heater is negative, and the phase of the 9 th harmonic of the blower is positive, the phase characteristics of the higher harmonics of the current can also be used to help distinguish different household appliances. In this embodiment, the current waveform in the load to be identified is processed by fast fourier transformAnd the amplitude characteristic and the phase characteristic in the current higher harmonic wave additional characteristic can be effectively extracted and obtained by frequency domain conversion.
In one embodiment, step 207 specifically includes: constructing a supplementary characteristic matrix according to the power characteristics and the current higher harmonic wave additional characteristics; and splicing the V-I track matrix and the supplementary feature matrix to obtain a mixed feature matrix.
Specifically, when the power characteristics and the current higher harmonic wave additional characteristics are added to the V-I track matrix, in order to ensure consistent formats, a matrix similar to the V-I track matrix format may be constructed according to the power characteristics and the current higher harmonic wave additional characteristics, and then different characteristics are combined by matrix splicing to obtain a corresponding mixed characteristic matrix. The process of constructing the supplementary feature matrix may be specifically implemented by binary coding. For the matrix splicing process, for example, for the N × N V-I waveform matrix M and the N × 8 supplementary feature matrix F, the supplementary feature matrix F may be added to the right side of the V-I waveform matrix M, i.e., the N + M column of the M matrix is the M column of the F matrix, to form a N × (N +8) hybrid feature matrix MF. In the embodiment, the characteristics of different sources are combined by a method for constructing the matrix, so that the effectiveness of the obtained mixed characteristic matrix can be effectively ensured, and the accuracy of load identification is improved.
In one embodiment, as shown in fig. 5, constructing the supplementary feature matrix according to the power features and the current higher harmonic addition features includes:
and 502, normalizing the power characteristics and the current higher harmonic wave additional characteristics to obtain a normalized characteristic value.
Step 504, the normalized feature value is converted into a binary feature value.
And step 506, sequentially filling the binary characteristic values into the initial characteristic matrix according to the preset characteristic sequence to obtain a supplementary characteristic matrix.
Specifically, the number of features and the preset feature order may be confirmed first, and as an example, the power features include an active power value and a reactive power value. While the current higher harmonic wave attachesThe plus characteristics include amplitudes of the 7 th, 9 th and 11 th harmonics and phase values of the 7 th, 9 th and 11 th harmonics. It can be confirmed that the number of the features is 8, and simultaneously 8 supplementary features are determined based on a preset feature sequence, which is from left to right: amplitude of 7 th, 9 th and 11 th harmonics, phase value of 7 th, 9 th and 11 th harmonics, active power value and reactive power value. Then, the construction of an insufficient feature matrix can be realized through binary coding, in the process, normalization processing needs to be carried out on the power features and the current higher harmonic wave additional features, and normalization is carried out in the process that the same features corresponding to all sample points applicable in the load identification process are normalized to be [0,2 ]N-1]In the range, N represents the number of current sampling points in one period. The normalized formula is specifically:
wherein k represents the number of sample points; m represents a feature number, and if 8 features are used, 1,2 …, 8; sm,kRepresenting the mth characteristic value, s, of the k sample after normalizationm,kDenotes the mth characteristic value, mins, of the kth sample before normalizationm、max smRespectively representing the eigenvalues of the smallest and largest samples under the mth characteristic,to round the symbol down. And then converting the normalized characteristic value into an N-bit binary number. For example, when N is 8, if the normalized feature value is 181, the binary number is 10110101. And then taking the Nx 8-order two-dimensional feature matrix as an initial feature matrix, wherein all elements of the matrix in an initial state are 0. Filling each bit of the binary number into matrix F using the following equation
Fk(a,m)=binm,k(a) (1)
In the formula, k represents a sample number, m represents a feature number, a represents a binary bit index, and the range is [1, N ]];Fk(a, m) represents the m column element of the a row of the supplementary feature matrix F of the k sampleThe prime value; bin denotes a binary operating function, binm,k(a) Bit a representing the binary feature value at the mth feature of the kth sample. In one embodiment, the spliced mixed feature matrix can be specifically referred to fig. 6, and includes three parts, namely a V-I trajectory matrix, a current higher harmonic addition feature and a power feature. In the embodiment, the supplementary feature matrix is constructed in a binary coding mode, so that the efficiency of constructing the matrix can be ensured, and meanwhile, the splicing property with the V-I track matrix is ensured.
In a specific embodiment, step 209 specifically includes: acquiring two-dimensional image data corresponding to the mixed characteristic matrix; and extracting image features corresponding to the two-dimensional image data through a preset convolutional neural network, and acquiring a load identification result corresponding to the load to be identified according to the image features.
Specifically, after the mixed feature matrix is constructed, based on the above construction process, the values of the matrix elements are only 0 and 1, so that the matrix can be regarded as a black-and-white image, and further, the feature extraction is performed by using an image recognition technology. In this embodiment, a Convolutional Neural Network (CNN) is specifically selected for matrix feature identification, and compared with other fully-connected Neural Networks, the Convolutional Neural network can retain spatial features of data in a process of training two-dimensional image data, has higher training efficiency, and is not prone to network overfitting. The input layer dimension of the CNN is the same as the dimension of the mixed characteristic matrix, the dimension of the output layer is related to the number of the load types to be classified, the hidden layer of the CNN is composed of a convolution layer, a pooling layer, a Dropout layer and a full connection layer, wherein the convolution layer and the pooling layer are repeated alternately, and the output of the upper layer is directly used as the input of the next layer. The convolutional layer is used for carrying out input data characteristic extraction and is composed of a plurality of convolutional kernels. The convolution kernel, also known as a filter, has its internal weights modified by multiple back-propagation. The feature of the input image can be extracted by scanning the input feature from left to right and from top to bottom and performing convolution operation on the scanning area. The pooling layer is used for compressing the input image, so that the input dimensionality of the next layer is reduced, and the operation efficiency is improved. Meanwhile, the pooling layer can also reduce the number of network parameters, so that the effect of inhibiting overfitting is achieved. The size of the filter of the pooling layer selected by the method can be 2 multiplied by 2, so that the number of input units can be reduced by four times and output, and the training process is greatly accelerated. The principle of operation of the Dropout layer is that during forward conduction of neurons in the layer, each neuron stops working with a certain probability, i.e., information cannot be transmitted to the following neurons. By arranging the Dropout layer, the training speed of the network can be improved, the over-fitting phenomenon is prevented, and the robustness of the model is improved. The last full-connection layer is used for realizing classification of samples, the dimensionality of an output vector is the same as the total class number of the samples, each element of the vector represents the probability that the identification result is the ith equipment, and the sum of all the elements is 1. The selected loss function is a square loss function, after each training is finished, the classification result and the actual class of the sample are compared by the full-connection layer, the training error is calculated by using the loss function, and then the weight among the neurons in the network is finely adjusted to carry out the next training. The purpose of training the network for multiple times is to minimize a loss function and ensure that the element probability value corresponding to the actual class of the sample is the maximum, thereby achieving the best classification effect. The nature of the deep learning algorithm CNN is to use a large number of feature filters to extract features, perform layer-by-layer convolution and pooling, further extract effective features from a mixed feature matrix step by step and construct classification rules. Generally, the more network layers, the more representative the extracted features. In a specific embodiment, the convolutional neural network structure of the present application can be referred to as table 1.
TABLE 1 convolutional neural network architecture
And the corresponding feature extraction process can refer to fig. 7. In the embodiment, the spatial features of the mixed feature matrix are extracted through the convolutional neural network, so that the training efficiency is high, the overfitting of the network is not easy to occur, and the accuracy of load identification is effectively improved.
In a specific embodiment, referring to fig. 8, the processing flow of the load identification method of the present application first collects steady-state data mixed with comprehensive power consumption data of devices such as a refrigerator, an air conditioner, a washing machine, and a blower. And obtaining a steady-state current waveform and a steady-state voltage waveform, and then obtaining 3 characteristic data of a V-I track matrix, current higher harmonics and active reactive power through characteristic extraction. And then, obtaining a mixed characteristic matrix through characteristic combination, and identifying the load characteristics of the electric appliance through a convolutional neural network model to obtain a corresponding load identification result.
In another specific embodiment, the proposed load identification algorithm may be validated by selecting the PLAID dataset. The plida data set contains 11 types of household appliances, and there are 1793 sets of sample data in total, and voltage and current signals of which each sample individually operates for more than 2s are recorded at a sampling rate of 30 kHz. Because the starting transient process of most household appliances can be controlled within 2s, the steady-state operation waveform of the household appliances can be extracted from each group of data of the data set. In order to evaluate the accuracy of the algorithm provided by the application, the identification accuracy of various electrical appliances is displayed by utilizing a confusion matrix. The confusion matrix used in the present embodiment is a square matrix of 11 × 11, rows of the confusion matrix represent real categories of the household appliances, columns of the confusion matrix represent prediction categories of the neural network, and the jth row and jth column elements of the matrix represent the number of prediction categories j of samples of which the real categories are i by the neural network. The confusion matrix generally uses recall R, accuracy P, balance score Q, and overall recognition a to describe the overall effect of recognition, and the formula is as follows:
wherein T ispiRepresenting the number of samples correctly classified for each appliance type, N representing the total number of samples, Z representing the number of appliance types, NiThe number of samples representing the types of the electric appliances in the sample set, i represents the number of sample types, j represents the number of classification results, NjRepresenting the number of samples of each type in the classification result, RiIndicating recall, PiAnd indicating the accuracy, wherein Q indicates the balance score, and when the A and Q values are larger, the judgment effect of the classifier is better. The confusion matrix for load recognition using the mixing feature is shown in table 2, in which category numbers 1-11 represent air conditioners, energy saving lamps, refrigerators, electric fans, blowers, heaters, bulbs, notebooks, microwave ovens, vacuum cleaners and washing machines, respectively.
TABLE 2
In the aspect of effectiveness of feature extraction, compared with a load identification method which directly uses a V-I track matrix to carry out load identification and fuses the V-I track matrix and power features, the load identification method has great superiority. The table compares the accuracy of the algorithm, the load identification algorithm based on the V-I track matrix and the load identification algorithm fusing the V-I track matrix and the power characteristics, so that the identification accuracy can be greatly improved by the mixed characteristics, and particularly, no error identification occurs between the No. 5 blower and the No. 6 heater. Meanwhile, the algorithm provided by the text has a good identification effect on other types of household appliances, and the total identification accuracy exceeds 93%.
TABLE 3
It should be understood that although the various steps in the flow charts of fig. 2-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-5 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 9, there is provided a load identifying apparatus including:
the request obtaining module 902 is configured to obtain a load identification request, and search for a to-be-identified load corresponding to the load identification request.
And a track matrix extraction module 904, configured to extract a V-I track matrix corresponding to the load to be identified, where the V-I track is used to represent a relationship between a voltage waveform and a voltage waveform.
And the feature extraction module 906 is configured to extract additional features and power features of current higher harmonics corresponding to the load to be identified.
And a hybrid matrix construction module 908 for combining the V-I trajectory matrix, the power characteristics, and the current higher harmonic additional characteristics to obtain a hybrid characteristic matrix.
And the load identification module 910 is configured to extract an image feature corresponding to the mixed feature matrix, and obtain a load identification result corresponding to the load to be identified according to the image feature.
In one embodiment, the trajectory matrix extraction module 904 is specifically configured to: extracting voltage waveform data and current waveform data of a load to be identified in a period; respectively carrying out normalization processing on the voltage waveform data and the current waveform data to obtain normalized voltage waveform data and normalized current waveform data; and mapping the normalized voltage waveform data and the normalized current waveform data to the initial V-I track matrix to obtain a V-I track matrix corresponding to the load to be identified.
In one embodiment, the feature extraction module 906 is specifically configured to: converting a time domain signal of a current waveform of a load to be identified in a period into a frequency domain signal through fast Fourier transform; and acquiring the current higher harmonic additional characteristics corresponding to the load to be identified according to the frequency domain signal.
In one embodiment, the mixing matrix construction module 908 is specifically configured to: constructing a supplementary characteristic matrix according to the power characteristics and the current higher harmonic wave additional characteristics; and splicing the V-I track matrix and the supplementary feature matrix to obtain a mixed feature matrix.
In one embodiment, the mixing matrix building module 908 is further configured to: normalizing the power characteristic and the current higher harmonic wave additional characteristic to obtain a normalized characteristic value; converting the normalized characteristic value into a binary characteristic value; and according to the preset characteristic sequence, sequentially filling the binary characteristic values into the initial characteristic matrix to obtain a supplementary characteristic matrix.
In one embodiment, the load identification module 910 is specifically configured to: acquiring two-dimensional image data corresponding to the mixed characteristic matrix; and extracting image features corresponding to the two-dimensional image data through a preset convolutional neural network, and acquiring a load identification result corresponding to the load to be identified according to the image features.
For the specific limitation of the load identification device, reference may be made to the above limitation of the load identification method, which is not described herein again. The modules in the load identification device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 10. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing load identification data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a load recognition method.
Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring a load identification request, and searching a load to be identified corresponding to the load identification request;
extracting a V-I track matrix corresponding to a load to be identified, wherein a V-I track is used for representing the relation between a voltage waveform and a voltage waveform;
extracting additional characteristics and power characteristics of current higher harmonics corresponding to a load to be identified;
combining the V-I track matrix, the power characteristics and the current higher harmonic wave additional characteristics to obtain a mixed characteristic matrix;
and extracting the image characteristics corresponding to the mixed characteristic matrix, and acquiring a load identification result corresponding to the load to be identified according to the image characteristics.
In one embodiment, the processor, when executing the computer program, further performs the steps of: extracting voltage waveform data and current waveform data of a load to be identified in a period; respectively carrying out normalization processing on the voltage waveform data and the current waveform data to obtain normalized voltage waveform data and normalized current waveform data; and mapping the normalized voltage waveform data and the normalized current waveform data to the initial V-I track matrix to obtain a V-I track matrix corresponding to the load to be identified.
In one embodiment, the processor, when executing the computer program, further performs the steps of: converting a time domain signal of a current waveform of a load to be identified in a period into a frequency domain signal through fast Fourier transform; and acquiring the current higher harmonic additional characteristics corresponding to the load to be identified according to the frequency domain signal.
In one embodiment, the processor, when executing the computer program, further performs the steps of: constructing a supplementary characteristic matrix according to the power characteristics and the current higher harmonic wave additional characteristics; and splicing the V-I track matrix and the supplementary feature matrix to obtain a mixed feature matrix.
In one embodiment, the processor, when executing the computer program, further performs the steps of: normalizing the power characteristic and the current higher harmonic wave additional characteristic to obtain a normalized characteristic value; converting the normalized characteristic value into a binary characteristic value; and according to the preset characteristic sequence, sequentially filling the binary characteristic values into the initial characteristic matrix to obtain a supplementary characteristic matrix.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring two-dimensional image data corresponding to the mixed characteristic matrix; and extracting image features corresponding to the two-dimensional image data through a preset convolutional neural network, and acquiring a load identification result corresponding to the load to be identified according to the image features.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a load identification request, and searching a load to be identified corresponding to the load identification request;
extracting a V-I track matrix corresponding to a load to be identified, wherein a V-I track is used for representing the relation between a voltage waveform and a voltage waveform;
extracting additional characteristics and power characteristics of current higher harmonics corresponding to a load to be identified;
combining the V-I track matrix, the power characteristics and the current higher harmonic wave additional characteristics to obtain a mixed characteristic matrix;
and extracting the image characteristics corresponding to the mixed characteristic matrix, and acquiring a load identification result corresponding to the load to be identified according to the image characteristics.
In one embodiment, the computer program when executed by the processor further performs the steps of: extracting voltage waveform data and current waveform data of a load to be identified in a period; respectively carrying out normalization processing on the voltage waveform data and the current waveform data to obtain normalized voltage waveform data and normalized current waveform data; and mapping the normalized voltage waveform data and the normalized current waveform data to the initial V-I track matrix to obtain a V-I track matrix corresponding to the load to be identified.
In one embodiment, the computer program when executed by the processor further performs the steps of: converting a time domain signal of a current waveform of a load to be identified in a period into a frequency domain signal through fast Fourier transform; and acquiring the current higher harmonic additional characteristics corresponding to the load to be identified according to the frequency domain signal.
In one embodiment, the computer program when executed by the processor further performs the steps of: constructing a supplementary characteristic matrix according to the power characteristics and the current higher harmonic wave additional characteristics; and splicing the V-I track matrix and the supplementary feature matrix to obtain a mixed feature matrix.
In one embodiment, the computer program when executed by the processor further performs the steps of: normalizing the power characteristic and the current higher harmonic wave additional characteristic to obtain a normalized characteristic value; converting the normalized characteristic value into a binary characteristic value; and according to the preset characteristic sequence, sequentially filling the binary characteristic values into the initial characteristic matrix to obtain a supplementary characteristic matrix.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring two-dimensional image data corresponding to the mixed characteristic matrix; and extracting image features corresponding to the two-dimensional image data through a preset convolutional neural network, and acquiring a load identification result corresponding to the load to be identified according to the image features.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:一种基于特征确定交并比阈值的目标检测方法