Knowledge migration-based electric energy meter fault classification method and apparatus, and medium
Through the power meter fault classification method based on knowledge migration, the joint discrimination mechanism of the base classifier and migration task supervisor is used, combined with the nearest neighbor distribution and common coefficient calculation, the problem of low classification accuracy caused by the imbalance of the number of power meter fault samples is solved. , realizes accurate identification and classification accuracy of most and minority classes.
Patent Information
- Application Number
- CN202411301095.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-18
Smart Images

Figure CN119128728A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric energy meter fault analysis, and in particular to an electric energy meter fault classification method, device and computer-readable storage medium based on knowledge migration. Background Art
[0002] With the advancement of the market-oriented reform of electricity, the interaction between the power network, the power market and users is becoming closer and closer. The power demand and power consumption of users are constantly increasing, and the number of distributed power generation resources such as renewable energy is constantly increasing. The traditional power network can no longer meet the above needs. In this environment, smart grids have emerged. As a terminal device in the smart grid, the energy meter integrates information transmission, power theft prevention and control, and data display on the basis of traditional electricity meters to measure power consumption, and plays an important supporting role in the stable operation of the power grid. However, with the popularization and promotion of energy meters, their failures in operation show the characteristics of complexity, diversity and suddenness, which seriously affects the normal power consumption of users. Therefore, accurate classification of various types of failures of energy meters is of great significance to reducing human resource losses and operation and maintenance costs and improving the overall stability of the power grid system.
[0003] During the use of electricity meters, the frequency of occurrence of different types of faults is often uneven. Some common faults, such as circuit board damage and display failure, occur frequently, so such fault samples occupy a large proportion in the data set. On the contrary, some rarer faults, such as component aging and improper use, have a lower probability of occurrence, and such fault samples occupy a smaller proportion in the data set. The imbalance in the number of fault samples will cause the model to have inaccurate results for the classification of electricity meter faults.
[0004] For the problem of inaccurate classification results caused by the imbalance of sample numbers, the existing methods for electric energy meter fault classification are mainly divided into two categories: algorithm-level methods and data-level methods. The algorithm-level methods often increase the weight of minority class fault samples and adjust the loss function to make the model pay extra attention to the characteristics of minority class fault samples during training, thereby enhancing the model's ability to learn the characteristics of minority class fault samples and improving the accuracy of electric energy meter fault classification results. However, excessive feature attention can easily lead to overfitting of the model to minority class fault samples, thereby causing the model to ignore majority class fault samples and reduce the overall classification accuracy. The data-level methods mainly include sample sampling or Sample generation, in which sample sampling achieves sample quantity balance by screening out similar or unimportant majority class fault samples and removing them, but removing majority class fault samples means losing the useful information contained in these samples, resulting in the model being unable to fully learn the overall distribution and characteristics of the data, thereby reducing the accuracy of the classification results; sample generation uses a deep learning model to extract features from minority class fault samples and generates a sufficient number of minority class fault samples based on this to solve the problem of data sample imbalance, but since the number of minority class fault samples is small, their learnable features are not sufficient, resulting in poor quality of generated samples and still unable to improve the accuracy of the classification results.
[0005] In summary, the existing electric energy meter fault classification method cannot overcome the problem of low accuracy of fault classification results caused by the imbalance of the number of fault samples. Summary of the invention
[0006] Therefore, the technical problem to be solved by the present invention is to overcome the problem that the electric energy meter fault classification method in the prior art cannot overcome the low accuracy of the fault classification result caused by the imbalance of the number of fault samples.
[0007] In order to solve the above technical problems, the present invention provides an electric energy meter fault classification method based on knowledge transfer, comprising:
[0008] S10: Obtaining a training set of electric energy meter operation data corresponding to I fault categories;
[0009] S20: Initialize i=1;
[0010] S30: input all data samples in the I electric energy meter operation data training set into the i-th base classifier respectively, output the probability that each data sample belongs to the i-th fault category, and construct the loss function of the i-th base classifier to complete the training of the i-th base classifier;
[0011] S40: Select N from all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category. idata samples; based on N i data samples and the data samples in the electric energy meter operation data training set corresponding to the i-th fault category, and obtain the i-th migration task supervisor training set; where N i represents the number of samples in the electric energy meter operation data training set corresponding to the i-th fault category;
[0012] S50: input the training samples in the training set of the i-th migration task supervisor into the i-th migration task supervisor, output the probability that the training samples belong to the i-th fault category, and construct the loss function of the i-th migration task supervisor to complete the training of the i-th migration task supervisor;
[0013] S60: Update i=i+1, and return to execute step S30 until i=I, and obtain the electric energy meter fault classification model based on the trained I base classifiers and I migration task supervisors.
[0014] Preferably, after obtaining the electric energy meter fault classification model based on the trained I base classifiers and I migration task supervisors, the step of classifying the faults of the electric energy meter to be classified includes:
[0015] Input the operating data of the electric energy meter to be classified into the i-th base classifier in the electric energy meter fault classification model, and calculate the classification confidence of the i-th base classifier based on the output of the i-th base classifier; where i∈[1,I];
[0016] If the classification confidence is greater than a first preset threshold, the probability that the electric energy meter to be classified belongs to the i-th fault category is obtained based on the output of the i-th base classifier;
[0017] If the classification confidence is less than or equal to a first preset threshold, the operation data of the electric energy meter to be classified is input into the i-th migration task supervisor in the electric energy meter fault classification model, and the probability that the electric energy meter to be classified belongs to the i-th fault category is obtained based on the output of the i-th migration task supervisor and the output of the i-th base classifier;
[0018] The probabilities of the electric energy meter to be classified belonging to each fault category are compared, and the fault category corresponding to the maximum probability is taken as the target fault category of the electric energy meter to be classified.
[0019] Preferably, the probability that the electric energy meter to be classified belongs to the i-th fault category is:
[0020] J i =Bool(class conf_i ≤a)*αjudge i +class label_i ,
[0021] class conf_i =|probmaj -class label_i |,
[0022] Among them, J i represents the probability that the energy meter to be classified belongs to the i-th fault category; Bool represents a Boolean function. If class conf_i ≤a, the value of the Boolean function is 1. If the class conf_i ≤a, then the value of the Boolean function is 0; class conf_i represents the classification confidence of the i-th base classifier; a represents the first preset threshold; α represents the hyperparameter; judge i represents the output of the i-th migration task supervisor; class label_i represents the output of the i-th base classifier; prob maj =1-class label_i , which represents the probability that the electric energy meter to be classified does not belong to the i-th fault category.
[0023] Preferably, after step S10, the following steps are further included:
[0024] For each data sample, a K nearest neighbor algorithm is used to select K nearest neighbor samples of the data sample from I electric energy meter operation data training sets to obtain a nearest neighbor sample pool of the data sample;
[0025] Calculate the difference between the total number of samples in the nearest neighbor sample pool of each data sample and the number of target samples in the nearest neighbor sample pool;
[0026] If the difference is less than or equal to the second preset threshold, the commonality coefficient of the data sample is calculated based on the commonality expected value of the data sample, the neglect coefficient, and the number of target samples in the neighboring sample pool;
[0027] If the difference is greater than a second preset threshold, calculating the commonality coefficient of the data sample based on the commonality expected value of the data sample and the difference;
[0028] The target number of samples in the neighbor sample pool of the data sample is: the number of samples in the neighbor sample pool that have the same fault category as the data sample.
[0029] Preferably, the calculation formula of the commonality coefficient of the data samples is:
[0030]
[0031] in, represents the commonality coefficient of the data sample; expansion represents the commonality expected value of the data sample; N samerepresents the number of target samples in the neighboring sample pool of the data sample; Ir represents the neglect coefficient of the data sample; m represents the difference between the total number of samples in the neighboring sample pool of the data sample and the number of target samples in the neighboring sample pool, m = KN same , K represents the total number of samples in the neighboring sample pool of the data sample; M represents the second preset threshold; Represents the floor function.
[0032] Preferably, a total of N are selected from all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category. i The data samples include:
[0033] In all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category, select N with the largest commonality coefficient. i data samples.
[0034] Preferably, if the number of target samples in the neighboring sample pool of the data sample is less than or equal to a third preset threshold, the data sample is removed from the electric energy meter operation data training set.
[0035] Preferably, each migration task supervisor comprises a first dense connection layer, a first activation function layer, a first regularization layer, a second dense connection layer, a second activation function layer, a second regularization layer and a third dense connection layer which are sequentially connected in series along a forward propagation direction.
[0036] The present invention also provides an electric energy meter fault classification device based on knowledge migration, comprising:
[0037] A data acquisition module, used to acquire a training set of electric energy meter operation data corresponding to I fault categories;
[0038] Data initialization module, used to initialize i=1;
[0039] The base classifier training module is used to input all data samples in the I-th electric energy meter operation data training set into the i-th base classifier, output the probability that each data sample belongs to the i-th fault category, and construct the loss function of the i-th base classifier to complete the training of the i-th base classifier;
[0040] The migration task supervisor training set construction module is used to select N total number of N electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category. i data samples; based on N i data samples and the data samples in the electric energy meter operation data training set corresponding to the i-th fault category, and obtain the i-th migration task supervisor training set; where N irepresents the number of samples in the electric energy meter operation data training set corresponding to the i-th fault category;
[0041] A migration task supervisor training module is used to input the training samples in the i-th migration task supervisor training set into the i-th migration task supervisor, output the probability that the training samples belong to the i-th fault category, and construct the loss function of the i-th migration task supervisor to complete the training of the i-th migration task supervisor;
[0042] The electric energy meter fault classification model acquisition module is used to update i=i+1 and return to the steps of executing the base classifier training module until i=I, and obtain the electric energy meter fault classification model based on the trained I base classifiers and I migration task supervisors.
[0043] Preferably, a fault classification module is also included, which is used to classify the faults of the electric energy meters to be classified after obtaining the electric energy meter fault classification model based on the trained I base classifiers and I migration task supervisors, which specifically includes:
[0044] The classification confidence calculation submodule is used to input the operation data of the electric energy meter to be classified into the i-th base classifier in the electric energy meter fault classification model, and calculate the classification confidence of the i-th base classifier based on the output of the i-th base classifier; wherein, i∈[1,I];
[0045] A first probability acquisition submodule, configured to obtain the probability that the electric energy meter to be classified belongs to the i-th fault category based on the output of the i-th base classifier if the classification confidence is greater than a first preset threshold;
[0046] A second probability submodule is used for inputting the operation data of the electric energy meter to be classified into the i-th migration task supervisor in the electric energy meter fault classification model if the classification confidence is less than or equal to the first preset threshold, and obtaining the probability that the electric energy meter to be classified belongs to the i-th fault category based on the output of the i-th migration task supervisor and the output of the i-th base classifier;
[0047] The fault category determination submodule is used to compare the probability that the electric energy meter to be classified belongs to each fault category, and take the fault category corresponding to the maximum probability as the target fault category of the electric energy meter to be classified.
[0048] Preferably, the probability that the electric energy meter to be classified belongs to the i-th fault category is:
[0049] J i =Bool(class conf_i ≤a)*αjudge i +class label_i ,
[0050] class conf_i =|probmaj -class label_i |,
[0051] Among them, J i represents the probability that the energy meter to be classified belongs to the i-th fault category; Bool represents a Boolean function. If class conf_i ≤a, the value of the Boolean function is 1. If the class conf_i ≤a, then the value of the Boolean function is 0; class conf_i represents the classification confidence of the i-th base classifier; a represents the first preset threshold; α represents the hyperparameter; judge i represents the output of the i-th migration task supervisor; class label_i represents the output of the i-th base classifier; prob maj =1-class label_i , which represents the probability that the electric energy meter to be classified does not belong to the i-th fault category.
[0052] Preferably, the data acquisition module further includes:
[0053] A neighbor sample pool acquisition module is used to select K neighbor samples of each data sample from I electric energy meter operation data training sets using a K nearest neighbor algorithm to obtain a neighbor sample pool of the data sample;
[0054] A difference calculation module is used to calculate the difference between the total number of samples in the nearest neighbor sample pool of each data sample and the number of target samples in the nearest neighbor sample pool;
[0055] A first commonality coefficient calculation module, configured to calculate the commonality coefficient of the data sample based on the commonality expected value of the data sample, the neglect coefficient, and the number of target samples in the neighboring sample pool if the difference is less than or equal to a second preset threshold;
[0056] A second commonality coefficient calculation module is used to calculate the commonality coefficient of the data sample based on the commonality expected value of the data sample and the difference if the difference is greater than a second preset threshold; wherein the target number of samples in the neighboring sample pool of the data sample is: the number of samples in the neighboring sample pool with the same fault category as the data sample.
[0057] Preferably, the calculation formula of the commonality coefficient of the data samples is:
[0058]
[0059] in, represents the commonality coefficient of the data sample; expansion represents the commonality expected value of the data sample; N samerepresents the number of target samples in the neighboring sample pool of the data sample; Ir represents the neglect coefficient of the data sample; m represents the difference between the total number of samples in the neighboring sample pool of the data sample and the number of target samples in the neighboring sample pool, m = KN same , K represents the total number of samples in the neighboring sample pool of the data sample; M represents the second preset threshold; Represents the floor function.
[0060] Preferably, a total of N are selected from all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category. i The data samples include:
[0061] In all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category, select N with the largest commonality coefficient. i data samples.
[0062] Preferably, if the number of target samples in the neighboring sample pool of the data sample is less than or equal to a third preset threshold, the data sample is removed from the electric energy meter operation data training set.
[0063] Preferably, each migration task supervisor comprises a first dense connection layer, a first activation function layer, a first regularization layer, a second dense connection layer, a second activation function layer, a second regularization layer and a third dense connection layer which are sequentially connected in series along a forward propagation direction.
[0064] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned electric energy meter fault classification method based on knowledge transfer are implemented.
[0065] The electric energy meter fault classification method based on knowledge transfer provided in this application has the following beneficial effects:
[0066] 1. After obtaining the electric energy meter operation data training set corresponding to I fault categories, the method provided by the present application uses all data samples to train to obtain I base classifiers corresponding to I fault categories; at the same time, for the electric energy meter operation data training set corresponding to each fault category, data samples of the same number as those in the training set are selected from the remaining electric energy meter operation data training set, and the selected multiple data samples and the data samples in the training set are combined to form a migration task supervisor training set corresponding to the fault category. In the migration task supervisor training set, the samples of the fault category are minority class samples, and the samples of the remaining fault categories are majority class samples. The migration task supervisor is trained using the training samples in the migration task supervisor training set, so that the migration task supervisor can accurately identify majority class samples and minority class samples; the present application trains base classifiers and migration task supervisors for each fault category, so that both the fault category containing the majority samples and the fault category containing only the minority samples have corresponding base classifiers and migration task supervisors that can accurately classify them, thereby solving the problem of low accuracy of fault classification results caused by an unbalanced number of fault samples;
[0067] 2. When classifying faults, the present application designs a joint discrimination mechanism based on the classification confidence of the electric energy meter to be classified by the base classifier. When the classification confidence of the electric energy meter to be classified by the base classifier is large, it indicates that the current electric energy meter to be classified is easy to identify. Therefore, the output of the base classifier is directly used as the probability that the electric energy meter to be classified belongs to the corresponding fault category. When the classification confidence of the electric energy meter to be classified by the base classifier is small, it indicates that the current electric energy meter to be classified is not easy to classify. The probability that the electric energy meter to be classified belongs to the corresponding fault category is calculated by combining the output of the trained migration task supervisor and the output of the base classifier, thereby improving the accuracy of the recognition result of the electric energy meter that is not easy to classify.
[0068] 3. When constructing the migration task supervisor training set, the present application determines whether each data sample contains sufficient common information by examining the neighbor distribution of the data samples, and assigns a corresponding commonality coefficient to each data sample, thereby screening out data samples with a large commonality coefficient (i.e., containing more common information) as samples in the migration task supervisor training set, and uses them together with other samples to train the migration task supervisor, so that the migration task supervisor can fully explore the common information between samples of different categories, thereby improving the ability to recognize common information and the accuracy of classification results. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein:
[0070] Figure 1A flow chart of the electric energy meter fault classification method based on knowledge transfer provided in this application;
[0071] Figure 2 A schematic diagram of the principle of fault classification for the classified electric energy meter provided in this application;
[0072] Figure 3 Schematic diagram of the pre-training principle of the migration task supervisor provided for this application;
[0073] Figure 4 A schematic diagram of the sample partitioning principle based on nearest neighbor distribution provided for this application;
[0074] Figure 5 A schematic diagram of the structure of an electric energy meter fault classification device based on knowledge transfer provided in this application. DETAILED DESCRIPTION
[0075] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0076] See also Figure 1 , Figure 1 The present invention provides a flow chart of a method for classifying electric energy meter faults based on knowledge transfer, which specifically includes:
[0077] S10: Obtaining a training set of electric energy meter operation data corresponding to I fault categories;
[0078] S20: Initialize i=1;
[0079] S30: input all data samples in the I electric energy meter operation data training set into the i-th base classifier respectively, output the probability that each data sample belongs to the i-th fault category, and construct the loss function of the i-th base classifier to complete the training of the i-th base classifier;
[0080] S40: Select N from all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category. i data samples; based on N i data samples and the data samples in the electric energy meter operation data training set corresponding to the i-th fault category, and obtain the i-th migration task supervisor training set; where N i represents the number of samples in the electric energy meter operation data training set corresponding to the i-th fault category;
[0081] S50: input the training samples in the training set of the i-th migration task supervisor into the i-th migration task supervisor, output the probability that the training samples belong to the i-th fault category, and construct the loss function of the i-th migration task supervisor to complete the training of the i-th migration task supervisor;
[0082] S60: Update i=i+1, and return to execute step S30 until i=I, and obtain the electric energy meter fault classification model based on the trained I base classifiers and I migration task supervisors.
[0083] The electric energy meter fault classification method based on knowledge transfer provided in the present application obtains the electric energy meter operation data training set corresponding to I fault categories, and then uses all data samples to train to obtain I base classifiers corresponding to I fault categories; at the same time, for the electric energy meter operation data training set corresponding to each fault category, data samples of the same number as those in the training set are selected from the remaining electric energy meter operation data training set, and the selected multiple data samples and the data samples in the training set are combined to form a migration task supervisor training set corresponding to the fault category, in which the samples of the fault category are minority class samples, and the samples of the remaining fault categories are majority class samples, and the migration task supervisor is trained using the training samples in the migration task supervisor training set, so that the migration task supervisor can accurately identify majority class samples and minority class samples; the present application trains base classifiers and migration task supervisors for each fault category, so that both the fault category containing the majority samples and the fault category containing only the minority samples have corresponding base classifiers and migration task supervisors that can accurately classify them, thereby solving the problem of low accuracy of fault classification results caused by an imbalance in the number of fault samples.
[0084] Optionally, in some embodiments of the present application, after obtaining an electric energy meter fault classification model based on I trained base classifiers and I migration task supervisors, the operating data of the electric energy meter to be classified can be respectively input into the base classifiers and migration task supervisors corresponding to each fault category in the electric energy meter fault classification model, and the outputs of the base classifiers and migration task supervisors corresponding to each fault category are weighted and summed to obtain the probability that the electric energy meter to be classified belongs to the fault category. If the probability that the electric energy meter to be classified belongs to the i-th fault category is the largest, then the fault category of the electric energy meter to be classified is determined to be the i-th fault category.
[0085] In other embodiments of the present application, in order to further improve the accuracy of the classification results, a joint discrimination mechanism based on the base classifier for the classification confidence of the electric energy meter to be classified is designed; specifically, Figure 2 As shown, after obtaining the electric energy meter fault classification model based on the trained I base classifiers and I migration task supervisors, the steps of fault classification of the electric energy meter to be classified include:
[0086] Input the operating data of the electric energy meter to be classified into the i-th base classifier in the electric energy meter fault classification model, and calculate the classification confidence of the i-th base classifier based on the output of the i-th base classifier; where i∈[1,I];
[0087] If the classification confidence is greater than the first preset threshold, the probability that the electric energy meter to be classified belongs to the i-th fault category is obtained based on the output of the i-th base classifier;
[0088] If the classification confidence is less than or equal to a first preset threshold, the operation data of the electric energy meter to be classified is input into the i-th migration task supervisor in the electric energy meter fault classification model, and the probability that the electric energy meter to be classified belongs to the i-th fault category is obtained based on the output of the i-th migration task supervisor and the output of the i-th base classifier;
[0089] The probabilities of the electric energy meter to be classified belonging to each fault category are compared, and the fault category corresponding to the maximum probability is taken as the target fault category of the electric energy meter to be classified.
[0090] For example, the probability that the energy meter to be classified belongs to each fault category is {J1,J2,...,J I}, J i =max{J1,J2,...,J I}, then the electric energy meter to be classified belongs to the i-th fault category.
[0091] Specifically, in some embodiments of the present application, the probability that the electric energy meter to be classified belongs to the i-th fault category is:
[0092] J i =Bool(class conf_i ≤a)*αjudge i +class label_i ,
[0093] class conf_i =|prob maj -class label_i |,
[0094] Among them, J i represents the probability that the energy meter to be classified belongs to the i-th fault category; Bool represents a Boolean function. If class conf_i ≤a, the value of the Boolean function is 1. If the class conf_i ≤a, then the value of the Boolean function is 0; class conf_i represents the classification confidence of the i-th base classifier; a represents the first preset threshold; α represents the hyperparameter; judge i represents the output of the i-th migration task supervisor; class label_irepresents the output of the i-th base classifier; prob maj =1-class label_i , which represents the probability that the electric energy meter to be classified does not belong to the i-th fault category.
[0095] For example, the first preset threshold is 0.35. When the classification confidence of the base classifier for the electric energy meter to be classified is small, it means that the classification difficulty of the electric energy meter to be classified is relatively large. Therefore, the operation data of the electric energy meter to be classified is input into the migration task supervisor for secondary discrimination. The classification accuracy of the difficult-to-classify electric energy meter is improved by the joint discrimination method, so that the final electric energy meter fault classification model has higher accuracy and robustness. As shown in Table 1, the specific algorithm of the joint discrimination provided in the embodiment of the present application is:
[0096] Table 1
[0097]
[0098]
[0099] Specifically, in some embodiments of the present application, each migration task supervisor includes a first densely connected layer, a first activation function layer, a first regularization layer, a second densely connected layer, a second activation function layer, a second regularization layer and a third densely connected layer connected in series along the forward propagation direction.
[0100] like Figure 3 The figure shows a schematic diagram of the training process of the migration task supervisor. Specifically, the loss function of the i-th migration task supervisor is:
[0101] Loss=-[y*log(judge)+(1-y)*log(1-judge)],
[0102] Among them, y represents the actual fault category of the training sample, and judge represents the predicted fault category of the training sample by the migration task supervisor.
[0103] Optionally, in some embodiments of the present application, in step S40, N random numbers may be selected from all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category. i data samples;
[0104] In other embodiments of the present application, it is also possible to determine whether the data sample contains sufficient common information by examining the neighbor distribution of the data sample, and to select N containing more common information. i data samples, so that the data samples in the electric energy meter operation data training set corresponding to the i-th fault category together constitute the i-th migration task supervisor training set, so as to train the migration task supervisor's ability to recognize common information;
[0105] like Figure 4 The figure shows a schematic diagram of the sample division principle based on nearest neighbor distribution provided by the present application. Specifically, after step S10, the following is further included:
[0106] For each data sample, a K nearest neighbor algorithm is used to select K nearest neighbor samples of the data sample from I electric energy meter operation data training sets to obtain a nearest neighbor sample pool of the data sample;
[0107] Calculate the difference between the total number of samples in the nearest neighbor sample pool of each data sample and the number of target samples in the nearest neighbor sample pool;
[0108] If the difference is less than or equal to the second preset threshold, the commonality coefficient of the data sample is calculated based on the commonality expected value of the data sample, the neglect coefficient, and the number of target samples in the neighboring sample pool;
[0109] If the difference is greater than a second preset threshold, calculating the commonality coefficient of the data sample based on the commonality expected value of the data sample and the difference;
[0110] The target number of samples in the neighbor sample pool of the data sample is: the number of samples in the neighbor sample pool that have the same fault category as the data sample.
[0111] Specifically, the calculation formula of the commonality coefficient of the data sample is:
[0112]
[0113] in, represents the commonality coefficient of the data sample; expansion represents the commonality expected value of the data sample; N same represents the number of target samples in the neighboring sample pool of the data sample; Ir represents the neglect coefficient of the data sample; m represents the difference between the total number of samples in the neighboring sample pool of the data sample and the number of target samples in the neighboring sample pool, m = KN same , K represents the total number of samples in the neighboring sample pool of the data sample; M represents the second preset threshold; Represents the floor function.
[0114] In a specific example of the present application, the second preset threshold is 1. When the difference is greater than 1, it means that the data sample contains more common information, so it is necessary to assign a larger commonality coefficient to the data sample; when the difference is less than or equal to 1, it means that the vast majority of samples in the neighbor sample pool of the data sample are similar neighbors, that is, the data sample contains less common information and is easier to learn. Therefore, in order to avoid feature redundancy, a smaller commonality coefficient is assigned to the data sample.
[0115] Optionally, in some embodiments of the present application, if the number of target samples in the neighboring sample pool of the data sample is less than or equal to a third preset threshold, the data sample is removed from the electric energy meter operation data training set.
[0116] Specifically, the third preset threshold can be set according to actual conditions. For example, when the number of target samples in the neighbor sample pool of most data samples in the training set is 20, the third preset threshold can be set to 1. If the number of target samples in the neighbor sample pool of a data sample is less than or equal to 1, it means that most of the samples in the neighbor sample pool of the data sample are heterogeneous neighbors, and the data sample is more likely to be a noise sample than other data samples; when the number of target samples in the neighbor sample pool of most data samples in the training set is 50, the third preset threshold can be set to 5. If the number of target samples in the neighbor sample pool of a data sample is less than or equal to 5, it means that most of the samples in the data sample pool are heterogeneous neighbors, and the data sample is more likely to be a noise sample than other data samples. When a data sample is a noise sample compared to other data samples, it indicates that the data sample is difficult to be correctly distinguished, and may even have a counter-effect on the training of the base classifier and the migration task supervisor, so the data sample is removed from the training set.
[0117] Further, based on the commonality coefficient assigned to each data sample in the above embodiment, in step S4, a total of N data samples are selected from all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category. i The data samples include:
[0118] In all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category, select N with the largest commonality coefficient. i data samples.
[0119] Based on the electric energy meter fault classification method based on knowledge transfer provided in the above embodiment, the embodiment of the present application further provides a specific example of the division of the migration task supervisor training set, by dividing the historical data of the electric energy meter under different fault categories, to obtain multiple migration task supervisor training sets:
[0120] The electric energy meter fault data set of 7 different fault categories is processed, where the 7 fault categories are: appearance fault, power supply unit fault, software fault, clock unit fault, communication unit fault, metering unit fault, and storage unit fault; each data sample contains 9 feature variables, namely: working time, arrival batch number, power supply unit number, electric energy meter category, fault identification month, installation month, province, equipment specification, and communication method; the data samples in the electric energy meter fault data set of each fault category are traversed, and all data samples under this category are taken as majority class samples, and multiple data samples with the same number of data samples as this category are selected from the data sets of other fault categories as minority class samples, so as to obtain the migration task supervisor training set corresponding to the fault category; specifically, each migration task supervisor training set can be expressed as:
[0121] X i =[X min ,X maj ],
[0122] Among them, X i represents the i-th migration task supervisor training set, i∈[1,7]; X min represents the minority class sample set, where the class label of each training sample is set to 0; X maj represents the majority class sample set, where the class label of each training sample is set to 1; X i The size is G i =len(X i ), len(X i ) represents the number of training samples in the training set of the migration task supervisor;
[0123] During the test, 7 RF (Random Forest) base classifiers with good general performance are selected to predict the category of the test samples; each base classifier outputs for one fault type; the test samples will pass through the 7 base classifiers respectively during the test, and each base classifier will output the probability of the test sample being predicted as the current fault category. After the 7 base classifiers have output results, it is decided whether the test sample needs to be input into the corresponding migration task supervisor based on the classification confidence of each base classifier, and finally the fault category with the highest probability is selected as the final prediction result.
[0124] In order to verify the effectiveness and accuracy of the electric energy meter fault classification method based on knowledge transfer provided by the present application, the present application embodiment also compares the above-mentioned electric energy meter fault classification method with 5 data-level sampling methods and 5 mainstream deep learning sample generation methods. Considering the characteristics of large sample data volume and complex categories in the electric energy meter fault data set, the data-level method uses RF as the base classifier to verify the sample balance effect;
[0125] Specifically, the electric energy meter data set collected a total of 7 types of smart meter data from 25 provinces. Due to various factors such as manual labeling errors, there were problems such as mislabeling and missing labels for fault type labels, and there were problems such as outliers and missing values in the meter fault data. After various technical processing such as missing value completion, feature selection, outlier detection, and data standardization, a total of 1,500 smart meter fault data were obtained; among them, the number of samples of each fault type was highly unbalanced, and the maximum imbalance rate reached 9.94. After the above data preprocessing, the obtained electric energy meter fault data set contained 9 characteristic attributes such as working time, arrival batch number, power supply unit number, electric energy meter category, fault identification month, installation month, province, equipment specifications, and communication method. In order to reduce the randomness of the results, the data set was randomly divided into training set and test set with a fixed random number seed in a ratio of 8:2;
[0126] Further, as shown in Table 2, information on 5 data level sampling methods and 5 mainstream deep learning sample generation methods used in the embodiments of this application is shown:
[0127] Table 2
[0128]
[0129] The embodiment of the present application uses macro-F1 and G-mean indicators to evaluate the classification effect of the algorithm. The macro-F1 indicator is the arithmetic mean of the F1-measure of each fault category, which is used to comprehensively evaluate the accuracy and recall rate of the model on each fault category; the G-mean indicator is the geometric mean of the recall rate on each fault category, which is used to evaluate the recall of the model on each fault category; both macro-F1 and G-mean have values of 0 to 1, and the larger the value, the better the classification performance of the model;
[0130] Table 3 shows the experimental results of the ATIC-CIE method and various comparative methods provided in this application on the F1-measure and macro-F1 indicators under various fault categories:
[0131] Table 3
[0132]
[0133]
[0134] Table 4 shows the experimental results of the recall rate and G-mean index of the ATIC-CIE method and various comparative methods provided in this application under various fault categories:
[0135] Table 4
[0136]
[0137] As can be seen from the table, the electric energy meter fault classification method based on knowledge transfer provided by the present application has obtained F1-measure and recall rates that exceed other methods in most categories, and has obtained the highest macro-F1 and G-mean; compared with the data-level sampling method and the mainstream deep learning sample generation method, the present application solves the problem of low accuracy of fault classification results caused by the imbalance of the number of fault samples by training the corresponding base classifier and migration task supervisor for each fault category; by examining the neighbor distribution to divide the samples and assigning corresponding commonality coefficients to the data samples, the model strengthens the discrimination ability of difficult-to-distinguish samples by distinguishing the common information between similar samples; by designing a joint discrimination mechanism that combines the global discrimination ability of traditional classifiers and the model's ability to accurately identify difficult-to-distinguish samples, the accuracy of the classification task is improved, and the problem of reduced classification accuracy due to feature overlap is greatly alleviated, effectively improving the accuracy and recall of electric energy meter fault classification.
[0138] Based on the electric energy meter fault classification method provided in the above embodiment, the embodiment of the present application also provides an electric energy meter fault classification device based on knowledge transfer, such as Figure 5 As shown, the device specifically includes:
[0139] A data acquisition module 10 is used to acquire a training set of electric energy meter operation data corresponding to I fault categories;
[0140] A data initialization module 20, used for initializing i=1;
[0141] The base classifier training module 30 is used to input all data samples in the I electric energy meter operation data training set into the i-th base classifier, output the probability that each data sample belongs to the i-th fault category, and construct the loss function of the i-th base classifier to complete the training of the i-th base classifier;
[0142] The migration task supervisor training set construction module 40 is used to select N from all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category. i data samples; based on N i data samples and the data samples in the electric energy meter operation data training set corresponding to the i-th fault category, and obtain the i-th migration task supervisor training set; where N i represents the number of samples in the electric energy meter operation data training set corresponding to the i-th fault category;
[0143] A migration task supervisor training module 50 is used to input the training samples in the i-th migration task supervisor training set into the i-th migration task supervisor, output the probability that the training samples belong to the i-th fault category, and construct the loss function of the i-th migration task supervisor to complete the training of the i-th migration task supervisor;
[0144] The electric energy meter fault classification model acquisition module 60 is used to update i=i+1 and return to the steps of executing the base classifier training module until i=I, and obtain the electric energy meter fault classification model based on the trained I base classifiers and I migration task supervisors.
[0145] Specifically, in some embodiments of the present application, each migration task supervisor includes a first densely connected layer, a first activation function layer, a first regularization layer, a second densely connected layer, a second activation function layer, a second regularization layer and a third densely connected layer connected in series along the forward propagation direction.
[0146] Optionally, in some embodiments of the present application, the device further includes a fault classification module, which is used to perform fault classification on the electric energy meter to be classified after obtaining the electric energy meter fault classification model based on the trained I base classifiers and I migration task supervisors, which specifically includes:
[0147] The classification confidence calculation submodule is used to input the operation data of the electric energy meter to be classified into the i-th base classifier in the electric energy meter fault classification model, and calculate the classification confidence of the i-th base classifier based on the output of the i-th base classifier; wherein, i∈[1,I];
[0148] A first probability acquisition submodule, used for obtaining the probability that the electric energy meter to be classified belongs to the i-th fault category based on the output of the i-th base classifier if the classification confidence is greater than a first preset threshold;
[0149] The second probability submodule is used for inputting the operation data of the electric energy meter to be classified into the i-th migration task supervisor in the electric energy meter fault classification model if the classification confidence is less than or equal to the first preset threshold, and obtaining the probability that the electric energy meter to be classified belongs to the i-th fault category based on the output of the i-th migration task supervisor and the output of the i-th base classifier;
[0150] The fault category determination submodule is used to compare the probability that the electric energy meter to be classified belongs to each fault category, and take the fault category corresponding to the maximum probability as the target fault category of the electric energy meter to be classified.
[0151] Specifically, the probability that the electric energy meter to be classified belongs to the i-th fault category is:
[0152] J i =Bool(class conf_i ≤a)*αjudgei +class label_i ,
[0153] class conf_i =|prob maj -class label_i |,
[0154] Among them, J i represents the probability that the energy meter to be classified belongs to the i-th fault category; Bool represents a Boolean function. If class conf_i ≤a, the value of the Boolean function is 1. If the class conf_i ≤a, then the value of the Boolean function is 0; class conf_i represents the classification confidence of the i-th base classifier; a represents the first preset threshold; α represents the hyperparameter; judge i represents the output of the i-th migration task supervisor; class label_i represents the output of the i-th base classifier; prob maj =1-class label_i , which represents the probability that the electric energy meter to be classified does not belong to the i-th fault category.
[0155] Optionally, in some embodiments of the present application, the data acquisition module further includes:
[0156] A neighbor sample pool acquisition module is used to select K neighbor samples of each data sample from I electric energy meter operation data training sets using a K nearest neighbor algorithm to obtain a neighbor sample pool of the data sample;
[0157] A difference calculation module is used to calculate the difference between the total number of samples in the nearest neighbor sample pool of each data sample and the number of target samples in the nearest neighbor sample pool;
[0158] A first commonality coefficient calculation module, configured to calculate the commonality coefficient of the data sample based on the commonality expected value of the data sample, the neglect coefficient, and the number of target samples in the neighboring sample pool if the difference is less than or equal to a second preset threshold;
[0159] A second commonality coefficient calculation module is used to calculate the commonality coefficient of the data sample based on the commonality expected value of the data sample and the difference if the difference is greater than a second preset threshold; wherein the target number of samples in the neighboring sample pool of the data sample is: the number of samples in the neighboring sample pool with the same fault category as the data sample.
[0160] Specifically, the calculation formula of the commonality coefficient of the data sample is:
[0161]
[0162] in, represents the commonality coefficient of the data sample; expansion represents the commonality expected value of the data sample; N same represents the number of target samples in the neighboring sample pool of the data sample; Ir represents the neglect coefficient of the data sample; m represents the difference between the total number of samples in the neighboring sample pool of the data sample and the number of target samples in the neighboring sample pool, m = KN same , K represents the total number of samples in the neighboring sample pool of the data sample; M represents the second preset threshold; Represents the floor function.
[0163] Preferably, based on the commonality coefficient of the above data samples, a total of N are selected from all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category. i The data samples include: in all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category, select the N with the largest commonality coefficient. i data samples.
[0164] Optionally, in some embodiments of the present application, if the number of target samples in the neighboring sample pool of the data sample is less than or equal to a third preset threshold, the data sample is removed from the electric energy meter operation data training set.
[0165] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned electric energy meter fault classification method based on knowledge transfer are implemented.
[0166] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0167] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0168] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0169] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0170] Obviously, the above embodiments are merely examples for the purpose of clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.
Claims
1. A method for classifying electric energy meter faults based on knowledge transfer, characterized in that: include: S10: Obtaining a training set of electric energy meter operation data corresponding to I fault categories; S20: Initialize i=1; S30: input all data samples in the I electric energy meter operation data training set into the i-th base classifier respectively, output the probability that each data sample belongs to the i-th fault category, and construct the loss function of the i-th base classifier to complete the training of the i-th base classifier; S40: Select N from all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category. i data samples; based on N i data samples and the data samples in the electric energy meter operation data training set corresponding to the i-th fault category, and obtain the i-th migration task supervisor training set; where N i represents the number of samples in the electric energy meter operation data training set corresponding to the i-th fault category; S50: input the training samples in the training set of the i-th migration task supervisor into the i-th migration task supervisor, output the probability that the training samples belong to the i-th fault category, and construct the loss function of the i-th migration task supervisor to complete the training of the i-th migration task supervisor; S60: Update i=i+1, and return to execute step S30 until i=I, and obtain the electric energy meter fault classification model based on the trained I base classifiers and I migration task supervisors.
2. The electric energy meter fault classification method based on knowledge transfer according to claim 1 is characterized in that: After obtaining the electric energy meter fault classification model based on the trained I base classifiers and I migration task supervisors, the steps of fault classification of the electric energy meter to be classified include: Input the operating data of the electric energy meter to be classified into the i-th base classifier in the electric energy meter fault classification model, and calculate the classification confidence of the i-th base classifier based on the output of the i-th base classifier; where i∈[1,I]; If the classification confidence is greater than a first preset threshold, the probability that the electric energy meter to be classified belongs to the i-th fault category is obtained based on the output of the i-th base classifier; If the classification confidence is less than or equal to a first preset threshold, the operation data of the electric energy meter to be classified is input into the i-th migration task supervisor in the electric energy meter fault classification model, and the probability that the electric energy meter to be classified belongs to the i-th fault category is obtained based on the output of the i-th migration task supervisor and the output of the i-th base classifier; The probabilities of the electric energy meter to be classified belonging to each fault category are compared, and the fault category corresponding to the maximum probability is taken as the target fault category of the electric energy meter to be classified.
3. The electric energy meter fault classification method based on knowledge transfer according to claim 2 is characterized in that: The probability that the electric energy meter to be classified belongs to the i-th fault category is: J i =Bool(class conf_i ≤a)*αjudge i +class label_i , class conf_i =|prob maj -class label_i |, Among them, J i represents the probability that the energy meter to be classified belongs to the i-th fault category; Bool represents a Boolean function. If class conf_i ≤a, the value of the Boolean function is 1. If the class conf_i ≤a, then the value of the Boolean function is 0; class conf_i represents the classification confidence of the i-th base classifier; a represents the first preset threshold; α represents the hyperparameter; judge i represents the output of the i-th migration task supervisor; class label_i represents the output of the i-th base classifier; prob maj =1-class label_i , which represents the probability that the electric energy meter to be classified does not belong to the i-th fault category.
4. The electric energy meter fault classification method based on knowledge transfer according to claim 1 is characterized in that: After step S10, the method further includes: For each data sample, a K nearest neighbor algorithm is used to select K nearest neighbor samples of the data sample from I electric energy meter operation data training sets to obtain a nearest neighbor sample pool of the data sample; Calculate the difference between the total number of samples in the nearest neighbor sample pool of each data sample and the number of target samples in the nearest neighbor sample pool; If the difference is less than or equal to the second preset threshold, the commonality coefficient of the data sample is calculated based on the commonality expected value of the data sample, the neglect coefficient, and the number of target samples in the neighboring sample pool; If the difference is greater than a second preset threshold, calculating the commonality coefficient of the data sample based on the commonality expected value of the data sample and the difference; The target number of samples in the neighbor sample pool of the data sample is: the number of samples in the neighbor sample pool that have the same fault category as the data sample.
5. The electric energy meter fault classification method based on knowledge transfer according to claim 4 is characterized in that: The calculation formula of the commonality coefficient of the data sample is: in, represents the commonality coefficient of the data sample; expansion represents the commonality expected value of the data sample; N same represents the number of target samples in the neighboring sample pool of the data sample; Ir represents the neglect coefficient of the data sample; m represents the difference between the total number of samples in the neighboring sample pool of the data sample and the number of target samples in the neighboring sample pool, m = KN same , K represents the total number of samples in the neighboring sample pool of the data sample; M represents the second preset threshold; Represents the floor function.
6. The electric energy meter fault classification method based on knowledge transfer according to claim 5 is characterized in that: In all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category, a total of N i The data samples include: In all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category, select N with the largest commonality coefficient. i data samples.
7. The electric energy meter fault classification method based on knowledge transfer according to claim 5 is characterized in that: If the number of target samples in the neighboring sample pool of the data sample is less than or equal to the third preset threshold, the data sample is removed from the electric energy meter operation data training set.
8. The electric energy meter fault classification method based on knowledge transfer according to claim 1 is characterized in that: Each migration task supervisor includes a first dense connection layer, a first activation function layer, a first regularization layer, a second dense connection layer, a second activation function layer, a second regularization layer and a third dense connection layer which are sequentially connected in series along a forward propagation direction.
9. A power meter fault classification device based on knowledge transfer, characterized in that: include: A data acquisition module, used to acquire a training set of electric energy meter operation data corresponding to I fault categories; Data initialization module, used to initialize i=1; The base classifier training module is used to input all data samples in the I-th electric energy meter operation data training set into the i-th base classifier, output the probability that each data sample belongs to the i-th fault category, and construct the loss function of the i-th base classifier to complete the training of the i-th base classifier; The migration task supervisor training set construction module is used to select N total number of N electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category. i data samples; based on N i data samples and the data samples in the electric energy meter operation data training set corresponding to the i-th fault category, and obtain the i-th migration task supervisor training set; where N i represents the number of samples in the electric energy meter operation data training set corresponding to the i-th fault category; A migration task supervisor training module is used to input the training samples in the i-th migration task supervisor training set into the i-th migration task supervisor, output the probability that the training samples belong to the i-th fault category, and construct the loss function of the i-th migration task supervisor to complete the training of the i-th migration task supervisor; The electric energy meter fault classification model acquisition module is used to update i=i+1 and return to the steps of executing the base classifier training module until i=I, and obtain the electric energy meter fault classification model based on the trained I base classifiers and I migration task supervisors.
10. The electric energy meter fault classification device based on knowledge transfer according to claim 9, characterized in that: It also includes a fault classification module, which is used to classify the faults of the electric energy meters to be classified after obtaining the electric energy meter fault classification model based on the trained I base classifiers and I migration task supervisors, which specifically includes: The classification confidence calculation submodule is used to input the operation data of the electric energy meter to be classified into the i-th base classifier in the electric energy meter fault classification model, and calculate the classification confidence of the i-th base classifier based on the output of the i-th base classifier; wherein, i∈[1,I]; A first probability acquisition submodule, configured to obtain the probability that the electric energy meter to be classified belongs to the i-th fault category based on the output of the i-th base classifier if the classification confidence is greater than a first preset threshold; A second probability submodule is used for inputting the operation data of the electric energy meter to be classified into the i-th migration task supervisor in the electric energy meter fault classification model if the classification confidence is less than or equal to the first preset threshold, and obtaining the probability that the electric energy meter to be classified belongs to the i-th fault category based on the output of the i-th migration task supervisor and the output of the i-th base classifier; The fault category determination submodule is used to compare the probability that the electric energy meter to be classified belongs to each fault category, and take the fault category corresponding to the maximum probability as the target fault category of the electric energy meter to be classified.
11. The electric energy meter fault classification device based on knowledge transfer according to claim 10, characterized in that: The probability that the electric energy meter to be classified belongs to the i-th fault category is: J i =Bool(class conf_i ≤a)*αjudge i +class label_i , class conf_i =|prob maj -class label_i |, Among them, J i represents the probability that the energy meter to be classified belongs to the i-th fault category; Bool represents a Boolean function. If class conf_i ≤a, the value of the Boolean function is 1. If the class conf_i ≤a, then the value of the Boolean function is 0; class conf_i represents the classification confidence of the i-th base classifier; a represents the first preset threshold; α represents the hyperparameter; judge i represents the output of the i-th migration task supervisor; class label_i represents the output of the i-th base classifier; prob maj =1-class label_i , which represents the probability that the electric energy meter to be classified does not belong to the i-th fault category.
12. The electric energy meter classification device based on knowledge transfer according to claim 9, characterized in that: The data acquisition module also includes: A neighbor sample pool acquisition module is used to select K neighbor samples of each data sample from I electric energy meter operation data training sets using a K nearest neighbor algorithm to obtain a neighbor sample pool of the data sample; A difference calculation module is used to calculate the difference between the total number of samples in the nearest neighbor sample pool of each data sample and the number of target samples in the nearest neighbor sample pool; A first commonality coefficient calculation module, configured to calculate the commonality coefficient of the data sample based on the commonality expected value of the data sample, the neglect coefficient, and the number of target samples in the neighboring sample pool if the difference is less than or equal to a second preset threshold; A second commonality coefficient calculation module is used to calculate the commonality coefficient of the data sample based on the commonality expected value of the data sample and the difference if the difference is greater than a second preset threshold; wherein the target number of samples in the neighboring sample pool of the data sample is: the number of samples in the neighboring sample pool with the same fault category as the data sample.
13. The electric energy meter fault classification device based on knowledge transfer according to claim 12, characterized in that: The calculation formula of the commonality coefficient of the data sample is: in, represents the commonality coefficient of the data sample; expansion represents the commonality expected value of the data sample; N same represents the number of target samples in the neighboring sample pool of the data sample; Ir represents the neglect coefficient of the data sample; m represents the difference between the total number of samples in the neighboring sample pool of the data sample and the number of target samples in the neighboring sample pool, m = KN same , K represents the total number of samples in the neighboring sample pool of the data sample; M represents the second preset threshold; Represents the floor function.
14. The electric energy meter fault classification device based on knowledge transfer according to claim 13, characterized in that: In all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category, a total of N i The data samples include: In all the electric energy meter operation data training sets except the electric energy meter operation data training set corresponding to the i-th fault category, select N with the largest commonality coefficient. i data samples.
15. The electric energy meter fault classification device based on knowledge transfer according to claim 13, characterized in that: If the number of target samples in the neighboring sample pool of the data sample is less than or equal to the third preset threshold, the data sample is removed from the electric energy meter operation data training set.
16. The electric energy meter fault classification device based on knowledge transfer according to claim 9, characterized in that: Each migration task supervisor includes a first dense connection layer, a first activation function layer, a first regularization layer, a second dense connection layer, a second activation function layer, a second regularization layer and a third dense connection layer which are sequentially connected in series along a forward propagation direction.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the electric energy meter fault classification method based on knowledge transfer described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Electronic metering device including automatic service sensing
CA2201104A1
Generalized low-voltage abnormal box meter relationship identification method and system for unbalanced classification learning
CN110991510A
Spinning whole-process energy consumption monitoring method based on feature self-matching transfer learning
CN111738413A
Intelligent electric meter fault multi-target classification method, storage medium and equipment
CN115688031A
Ammeter fault classification method and device, electronic equipment and computer storage medium
CN116010875A
