A knowledge transfer-based power meter fault classification method and device and medium

By employing a knowledge transfer-based approach and utilizing a joint discrimination mechanism of base classifier and transfer task supervisor, the problem of low accuracy caused by sample imbalance in electricity meter fault classification is solved. This approach enables accurate identification of both majority and minority class faults, thereby improving the accuracy and robustness of electricity meter fault classification.

CN119128728BActive Publication Date: 2026-06-19STATE GRID SHANXI MARKETING SERVICE CENT +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID SHANXI MARKETING SERVICE CENT
Filing Date
2024-09-18
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing methods for classifying electricity meter faults suffer from low accuracy due to an imbalance in the number of fault samples.

Method used

A knowledge transfer-based approach is adopted. By training a base classifier and a transfer task supervisor, a fault classification model is constructed using the electricity meter operation data training set. The model is then jointly judged by combining the confidence scores of the base classifier and the output of the transfer task supervisor. Samples with rich common information are selected for training to improve classification accuracy.

🎯Benefits of technology

It effectively solves the problem of low classification accuracy caused by imbalance in the number of fault samples, improves the ability to identify both majority and minority faults, and enhances the accuracy and robustness of electricity meter fault classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128728B_ABST
    Figure CN119128728B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of electricity meter fault analysis technology, and relates to an electricity meter fault classification method, device, and medium based on knowledge transfer; it involves acquiring a training set of electricity meter operation data corresponding to I fault categories; initializing i=1; inputting all data samples into the i-th base classifier, outputting the probability of each data sample belonging to the i-th fault category, and completing the training of the i-th base classifier; and selecting N from the electricity meter operation data training set excluding the one corresponding to the i-th fault category. i Data samples; based on N i The training set for the i-th migration task supervisor is obtained from the data samples in the training set of the electricity meter operation data corresponding to the i-th fault category. The i-th migration task supervisor is trained; i = i + 1 is updated, and the i-th base classifier is trained again until i = I. By training the corresponding base classifier and migration task supervisor for each fault category, the accuracy of the electricity meter fault classification results is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electricity meter fault analysis technology, and in particular to an electricity meter fault classification method, device, and computer-readable storage medium based on knowledge transfer. Background Technology

[0002] With the advancement of power market reform, the interaction between the power grid, the power market, and users is becoming increasingly close. Users' electricity demand and consumption are constantly increasing, and the number of distributed generation resources such as renewable energy is also growing. Traditional power grids can no longer meet these demands, leading to the emergence of smart grids. As terminal equipment in smart grids, electricity meters, in addition to the traditional function of measuring electricity consumption, integrate information transmission, electricity theft prevention, and data display, playing a crucial supporting role in the stable operation of the power grid. However, with the widespread adoption of electricity meters, their operational faults have become increasingly complex, diverse, and sudden, seriously affecting users' normal electricity consumption. Therefore, accurately classifying various electricity meter faults is of great significance for reducing human resource consumption and maintenance costs, and improving the overall stability of the power grid system.

[0003] During the use of electricity meters, the frequency of different types of faults is often uneven. Some common faults, such as circuit board damage and display failure, occur frequently, so these types of fault samples account for a large proportion of the dataset. Conversely, some rarer faults, such as component aging and improper use, have a low probability of occurrence, so these types of fault samples account for a small proportion of the dataset. This imbalance in the number of fault samples can lead to inaccurate results in the model's classification of electricity meter faults.

[0004] To address the issue of inaccurate classification results due to sample imbalance, existing electricity meter fault classification methods are mainly divided into two categories: algorithm-level methods and data-level methods. 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 features of minority class fault samples during training, thereby enhancing the model's ability to learn the features of minority class fault samples and improving the accuracy of electricity meter fault classification results. However, excessive feature attention can easily lead to overfitting of the model to minority class fault samples, causing the model to ignore majority class fault samples and reducing the overall classification accuracy. Data-level methods mainly include sample sampling or... Sample generation involves two main approaches. Sample sampling achieves sample balance by filtering out and removing similar or unimportant majority class fault samples. However, removing majority class fault samples means losing useful information contained in these samples, preventing the model from fully learning the overall distribution and features of the data, thus reducing the accuracy of the classification results. Sample generation addresses the imbalance problem by using a deep learning model to extract features from minority class fault samples and generating a sufficient number of minority class fault samples based on this. However, since the number of minority class fault samples is inherently small, their learnable features are insufficient, resulting in poor sample quality and failing to improve the accuracy of the classification results.

[0005] In summary, existing methods for classifying electricity meter faults cannot overcome the problem of low accuracy in fault classification results due to an imbalance in 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 fault classification method of the existing energy meter cannot overcome the problem of low accuracy of fault classification results due to the imbalance of the number of fault samples.

[0007] To address the aforementioned technical problems, this invention provides a knowledge transfer-based method for classifying electricity meter faults, comprising:

[0008] S10: Obtain the training set of electricity meter operation data corresponding to I fault categories;

[0009] S20: Initialize i = 1;

[0010] S30: Input all data samples from the training set of I energy meter operation data into the i-th base classifier, output the probability of each data sample belonging to the i-th fault category, construct the loss function of the i-th base classifier, and complete the training of the i-th base classifier;

[0011] S40: From all the energy meter operation data training sets except the one corresponding to the i-th fault category, a total of N are selected. iData samples; based on N i The training set for the migration task supervisor is obtained by combining N data samples and the data samples from the energy meter operation data training set corresponding to the i-th fault category; where N i This represents the number of samples in the training set of electricity meter operation data corresponding to the i-th fault category;

[0012] S50: Input the training samples from the training set of the i-th transfer task supervisor into the i-th transfer 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 transfer task supervisor to complete the training of the i-th transfer task supervisor.

[0013] S60: Update i = i + 1, and return to execute step S30 until i = I, and obtain the electricity meter fault classification model based on the trained I base classifiers and I transfer task supervisors.

[0014] Preferably, after obtaining the electricity meter fault classification model based on the trained I base classifiers and I transfer task supervisors, the steps for classifying the electricity meters to be classified include:

[0015] The operating data of the energy meter to be classified is input into the i-th base classifier in the energy meter fault classification model, and the classification confidence of the i-th base classifier is calculated based on the output of the i-th base classifier; where i∈[1,I];

[0016] If the classification confidence is greater than the first preset threshold, the probability that the 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 the first preset threshold, the operating data of the energy meter to be classified is input into the i-th migration task supervisor in the energy meter fault classification model. Based on the output of the i-th migration task supervisor and the output of the i-th base classifier, the probability that the energy meter to be classified belongs to the i-th fault category is obtained.

[0018] Compare the probability of the energy meter to be classified belonging to each fault category, and take the fault category with the highest probability as the target fault category of the energy meter to be classified.

[0019] Preferably, the probability that the 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, which states that if class ... conf_i If ≤a, then the value of the Boolean function is 1; if class is not satisfied... conf_i If a ≤ a, then the value of the Boolean function is 0; conf_i The classifier represents the classification confidence of the i-th base classifier; 'a' represents the first preset threshold; 'α' represents the hyperparameter; and 'judge' represents the hyperparameter. i This represents the output of the supervisor for the i-th migration task; class label_i Prob represents the output of the i-th base classifier; maj =1-class label_i , representing the probability that the energy meter to be classified does not belong to the i-th fault category.

[0023] Preferably, after step S10, the method further includes:

[0024] For each data sample, the K nearest neighbor algorithm is used to select the K nearest neighbor samples of the data sample from the training set of I electricity meter operation data to obtain the nearest neighbor sample pool of the data sample.

[0025] Calculate the difference between the total number of samples in the nearest neighbor pool of each data sample and the number of target samples in that nearest neighbor pool;

[0026] If the difference is less than or equal to the second preset threshold, then the common coefficient of the data sample is calculated based on the common expected value of the data sample, the neglect coefficient, and the number of target samples in the nearest neighbor sample pool.

[0027] If the difference is greater than the second preset threshold, then the commonality coefficient of the data sample is calculated based on the commonality expected value of the data sample and the difference.

[0028] The number of target samples in the nearest neighbor sample pool of a data sample is the number of samples in the nearest neighbor sample pool that have the same fault category as the data sample.

[0029] Preferably, the formula for calculating the commonality coefficient of the data samples is:

[0030]

[0031] in, N represents the commonality coefficient of the data samples; expansion represents the expected commonality value of the data samples; sameIr represents the number of target samples in the nearest neighbor 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 nearest neighbor pool of the data sample and the number of target samples in that nearest neighbor pool, m = KN same K represents the total number of samples in the nearest neighbor pool of the data sample; M represents the second preset threshold. This represents the floor function.

[0032] Preferably, N meters are selected from all the electricity meter operation data training sets except for the electricity meter operation data training set corresponding to the i-th fault category. i The data samples include:

[0033] In all energy meter operation data training sets except for the one corresponding to the i-th fault category, select N with the largest commonality coefficient. i One data sample.

[0034] Preferably, if the number of target samples in the nearest neighbor sample pool of a data sample is less than or equal to a third preset threshold, then the data sample is removed from the electricity meter operation data training set.

[0035] Preferably, 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 the forward propagation direction.

[0036] The present invention also provides a knowledge transfer-based energy meter fault classification device, comprising:

[0037] The data acquisition module is used to acquire the training set of electricity meter operation data corresponding to I fault categories;

[0038] The data initialization module is used to initialize i = 1;

[0039] The base classifier training module is used to input all data samples from the training set of I energy meter operation data into the i-th base classifier, output the probability of each data sample belonging to the i-th fault category, construct the loss function of the i-th base classifier, and complete the training of the i-th base classifier.

[0040] The migration task supervisor training set construction module is used to select N training sets from all energy meter operation data training sets except the training set corresponding to the i-th fault category. i Data samples; based on N i The training set for the migration task supervisor is obtained by combining N data samples and the data samples from the energy meter operation data training set corresponding to the i-th fault category; where N iThis represents the number of samples in the training set of electricity meter operation data corresponding to the i-th fault category;

[0041] The transfer task supervisor training module is used to input the training samples from the i-th transfer task supervisor training set into the i-th transfer task supervisor, output the probability that the training samples belong to the i-th fault category, construct the loss function of the i-th transfer task supervisor, and complete the training of the i-th transfer task supervisor.

[0042] The electricity 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. Based on the trained I base classifiers and I transfer task supervisors, the electricity meter fault classification model is obtained.

[0043] Preferably, it also includes a fault classification module, used to classify the faults of the electricity meters to be classified after obtaining the electricity meter fault classification model based on the trained I base classifiers and I transfer task supervisors, specifically including:

[0044] The classification confidence calculation submodule is used to input the operating data of the energy meter to be classified into the i-th base classifier in the 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];

[0045] The first probability acquisition submodule is used to obtain the probability that the 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 the first preset threshold.

[0046] The second probability submodule is used to input the operating data of the energy meter to be classified into the i-th migration task supervisor in the energy meter fault classification model if the classification confidence is less than or equal to the first preset threshold, and obtain the probability that the 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 of the energy meter to be classified belonging to each fault category, and take the fault category with the highest probability as the target fault category of the energy meter to be classified.

[0048] Preferably, the probability that the 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, which states that if class ... conf_i If ≤a, then the value of the Boolean function is 1; if class is not satisfied... conf_i If a ≤ a, then the value of the Boolean function is 0; conf_i The classifier represents the classification confidence of the i-th base classifier; 'a' represents the first preset threshold; 'α' represents the hyperparameter; and 'judge' represents the hyperparameter. i This represents the output of the supervisor for the i-th migration task; class label_i Prob represents the output of the i-th base classifier; maj =1-class label_i , representing the probability that the energy meter to be classified does not belong to the i-th fault category.

[0052] Preferably, the data acquisition module further includes:

[0053] The nearest neighbor sample pool acquisition module is used to select the K nearest neighbor samples of each data sample from the training set of I electricity meter operation data using the K nearest neighbor algorithm, and obtain the nearest neighbor sample pool of the data sample.

[0054] The 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 that nearest neighbor sample pool;

[0055] The first commonality coefficient calculation module is used to calculate the commonality coefficient of the data sample based on the commonality expected value, the ignored coefficient, 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.

[0056] The second commonality coefficient calculation module is used to calculate the commonality coefficient of the data sample based on the commonality expectation value of the data sample and the difference if the difference is greater than the second preset threshold; wherein, the number of target samples in the nearest neighbor sample pool of the data sample is: the number of samples in the nearest neighbor sample pool that have the same fault category as the data sample.

[0057] Preferably, the formula for calculating the commonality coefficient of the data samples is:

[0058]

[0059] in, N represents the commonality coefficient of the data samples; expansion represents the expected commonality value of the data samples; sameIr represents the number of target samples in the nearest neighbor 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 nearest neighbor pool of the data sample and the number of target samples in that nearest neighbor pool, m = KN same K represents the total number of samples in the nearest neighbor pool of the data sample; M represents the second preset threshold. This represents the floor function.

[0060] Preferably, N meters are selected from all the electricity meter operation data training sets except for the electricity meter operation data training set corresponding to the i-th fault category. i The data samples include:

[0061] In all energy meter operation data training sets except for the one corresponding to the i-th fault category, select N with the largest commonality coefficient. i One data sample.

[0062] Preferably, if the number of target samples in the nearest neighbor sample pool of a data sample is less than or equal to a third preset threshold, then the data sample is removed from the electricity meter operation data training set.

[0063] Preferably, 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 the forward propagation direction.

[0064] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described knowledge transfer-based method for classifying electricity meter faults.

[0065] The knowledge transfer-based fault classification method for electricity meters provided in this application has the following beneficial effects:

[0066] 1. The method provided in this application obtains a training set of electricity meter operation data corresponding to I fault categories, and then trains I base classifiers for the I fault categories using all data samples. Simultaneously, for each fault category's electricity meter operation data training set, the same number of data samples are selected from the remaining electricity meter operation data training sets. These selected data samples, along with the data samples from the training sets, form a training set for the migration task supervisor corresponding to that fault category. In this migration task supervisor training set, the samples for that fault category are minority class samples, and the samples for the other fault categories are majority class samples. The migration task supervisor is trained using the training samples in this training set, enabling it to accurately identify majority and minority class samples. This application trains base classifiers and migration task supervisors for each fault category. Therefore, for fault categories containing majority samples and fault categories containing only minority samples, there are corresponding base classifiers and migration task supervisors capable of accurately classifying them, solving the problem of low accuracy in fault classification results due to imbalanced fault sample numbers.

[0067] 2. In the fault classification process, this application designs a joint discrimination mechanism based on the classification confidence of the base classifier for the energy meter to be classified. When the classification confidence of the base classifier for the energy meter to be classified is high, it indicates that the energy meter to be classified is easy to identify. Therefore, the output of the base classifier is directly used as the probability that the energy meter to be classified belongs to the corresponding fault category. When the classification confidence of the base classifier for the energy meter to be classified is low, it indicates that the energy meter to be classified is not easy to classify. By combining the output of the trained transfer task supervisor and the output of the base classifier, the probability that the energy meter to be classified belongs to the corresponding fault category is calculated, thereby improving the accuracy of the identification results of the energy meter that is not easy to classify.

[0068] 3. When constructing the training set for the transfer task supervisor, this application examines the nearest neighbor distribution of data samples to determine whether each data sample contains sufficient common information, and assigns a corresponding common coefficient to each data sample. This allows data samples with larger common coefficients (i.e., containing more common information) to be selected as samples in the training set of the transfer task supervisor. These samples are then used together with other samples to train the transfer task supervisor, enabling the transfer task supervisor to fully explore the common information between samples of different categories, thereby improving the ability to identify common information and the accuracy of classification results. Attached Figure Description

[0069] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein:

[0070] Figure 1A flowchart of the knowledge transfer-based energy meter fault classification method provided in this application;

[0071] Figure 2 A schematic diagram illustrating the fault classification principle of the energy meters to be classified, provided in this application;

[0072] Figure 3 A schematic diagram illustrating the pre-training principle of the migration task supervisor provided in this application;

[0073] Figure 4 A schematic diagram illustrating the sample partitioning principle based on nearest neighbor distribution provided in this application;

[0074] Figure 5 A schematic diagram of the knowledge transfer-based electricity meter fault classification device provided in this application. Detailed Implementation

[0075] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0076] Please see Figure 1 , Figure 1 The flowchart of the knowledge transfer-based electricity meter fault classification method provided in this application is as follows:

[0077] S10: Obtain the training set of electricity meter operation data corresponding to I fault categories;

[0078] S20: Initialize i = 1;

[0079] S30: Input all data samples from the training set of I energy meter operation data into the i-th base classifier, output the probability of each data sample belonging to the i-th fault category, construct the loss function of the i-th base classifier, and complete the training of the i-th base classifier;

[0080] S40: From all the energy meter operation data training sets except the one corresponding to the i-th fault category, a total of N are selected. i Data samples; based on N i The training set for the migration task supervisor is obtained by combining N data samples and the data samples from the energy meter operation data training set corresponding to the i-th fault category; where N i This represents the number of samples in the training set of electricity meter operation data corresponding to the i-th fault category;

[0081] S50: Input the training samples from the training set of the i-th transfer task supervisor into the i-th transfer 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 transfer task supervisor to complete the training of the i-th transfer task supervisor.

[0082] S60: Update i = i + 1, and return to execute step S30 until i = I, and obtain the electricity meter fault classification model based on the trained I base classifiers and I transfer task supervisors.

[0083] The knowledge transfer-based electricity meter fault classification method provided in this application obtains a training set of electricity meter operation data corresponding to I fault categories, and then trains I base classifiers for each of the I fault categories using all data samples. Simultaneously, for each fault category's corresponding electricity meter operation data training set, the same number of data samples are selected from the remaining electricity meter operation data training sets. These selected data samples, along with the data samples from the training sets, form a transfer task supervisor training set for that fault category. In this transfer task supervisor training set, the samples for that fault category are minority class samples, and the samples for the other fault categories are majority class samples. The transfer task supervisor is trained using the training samples in this training set, enabling it to accurately identify majority and minority class samples. This application trains base classifiers and transfer task supervisors for each fault category. Therefore, for fault categories containing majority samples and fault categories containing only minority samples, there are corresponding base classifiers and transfer task supervisors capable of accurately classifying them, solving the problem of low accuracy in fault classification results due to an imbalance in the number of fault samples.

[0084] Optionally, in some embodiments of this application, after obtaining the electricity meter fault classification model based on the trained I base classifiers and I transfer task supervisors, the operating data of the electricity meter to be classified can be input into the base classifier and transfer task supervisor corresponding to each fault category in the electricity meter fault classification model. The outputs of the base classifier and transfer task supervisor corresponding to each fault category are weighted and summed to obtain the probability that the electricity meter to be classified belongs to that fault category. If the probability that the electricity meter to be classified belongs to the i-th fault category is the highest, then the fault category of the electricity meter to be classified is determined to be the i-th fault category.

[0085] In other embodiments of this application, to further improve the accuracy of the classification results, a joint discrimination mechanism based on the classification confidence of the energy meters to be classified using the base classifier is designed; specifically, as follows... Figure 2 As shown, after obtaining the electricity meter fault classification model based on I pre-trained base classifiers and I transfer task supervisors, the steps for classifying the faults of the electricity meters to be classified include:

[0086] The operating data of the energy meter to be classified is input into the i-th base classifier in the energy meter fault classification model, and the classification confidence of the i-th base classifier is calculated 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 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 the first preset threshold, the operating data of the energy meter to be classified is input into the i-th migration task supervisor in the energy meter fault classification model. Based on the output of the i-th migration task supervisor and the output of the i-th base classifier, the probability that the energy meter to be classified belongs to the i-th fault category is obtained.

[0089] Compare the probability of the energy meter to be classified belonging to each fault category, and take the fault category with the highest probability as the target fault category of the 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 If the energy meter to be classified belongs to the i-th fault category, then the energy meter to be classified belongs to the i-th fault category.

[0091] Specifically, in some embodiments of this application, the probability that the 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, which states that if class ... conf_i If ≤a, then the value of the Boolean function is 1; if class is not satisfied... conf_i If a ≤ a, then the value of the Boolean function is 0; conf_i The classifier represents the classification confidence of the i-th base classifier; 'a' represents the first preset threshold; 'α' represents the hyperparameter; and 'judge' represents the hyperparameter. i This represents the output of the supervisor for the i-th migration task; class label_iProb represents the output of the i-th base classifier; maj =1-class label_i , representing the probability that the 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 confidence of the base classifier in classifying the energy meter to be classified is low, it indicates that the energy meter to be classified is difficult to classify. Therefore, the operating data of the energy meter to be classified is input into the migration task supervisor for secondary discrimination. The classification accuracy of difficult-to-classify energy meters is improved by joint discrimination, so that the final energy meter fault classification model has higher accuracy and robustness. Table 1 shows the specific algorithm of joint discrimination provided in the embodiment of this application:

[0096] Table 1

[0097]

[0098]

[0099] Specifically, in some embodiments of this application, 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 the forward propagation direction.

[0100] like Figure 3 The diagram illustrates the training process of the transfer task supervisor. Specifically, the loss function of the i-th transfer task supervisor is:

[0101] Loss=-[y*log(judge)+(1-y)*log(1-judge)],

[0102] Where y represents the true fault category of the training sample, and judge represents the predicted fault category of the training sample by the transfer task supervisor.

[0103] Optionally, in some embodiments of this application, in step S40, N can be randomly selected from all the energy meter operation data training sets except for the energy meter operation data training set corresponding to the i-th fault category. i One data sample;

[0104] In other embodiments of this application, the presence or absence of common information in data samples can be determined by examining the nearest neighbor distribution of the data samples, and N samples containing more common information can be selected. i The data samples are combined with the data samples in the training set of the electricity meter operation data corresponding to the i-th fault category to form the i-th migration task supervisor training set, so as to train the migration task supervisor's ability to identify common information.

[0105] like Figure 4 The diagram shown illustrates the sample partitioning principle based on nearest neighbor distribution provided in this application. Specifically, after step S10, the following is also included:

[0106] For each data sample, the K nearest neighbor algorithm is used to select the K nearest neighbor samples of the data sample from the training set of I electricity meter operation data to obtain the nearest neighbor sample pool of the data sample.

[0107] Calculate the difference between the total number of samples in the nearest neighbor pool of each data sample and the number of target samples in that nearest neighbor pool;

[0108] If the difference is less than or equal to the second preset threshold, the common coefficient of the data sample is calculated based on the common expected value, the ignored coefficient, and the number of target samples in the nearest neighbor sample pool.

[0109] If the difference is greater than the second preset threshold, then the commonality coefficient of the data sample is calculated based on the commonality expected value of the data sample and the difference.

[0110] The number of target samples in the nearest neighbor sample pool of a data sample is the number of samples in the nearest neighbor sample pool that have the same fault category as the data sample.

[0111] Specifically, the formula for calculating the commonality coefficient of the data samples is as follows:

[0112]

[0113] in, N represents the commonality coefficient of the data samples; expansion represents the expected commonality value of the data samples; same Ir represents the number of target samples in the nearest neighbor 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 nearest neighbor pool of the data sample and the number of target samples in that nearest neighbor pool, m = KN same K represents the total number of samples in the nearest neighbor pool of the data sample; M represents the second preset threshold. This represents the floor function.

[0114] In a specific example of this 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 a larger common coefficient needs to be assigned to the data sample. When the difference is less than or equal to 1, it means that most of the samples in the nearest neighbor sample pool of the data sample are of the same type, that is, the data sample contains less common information and is easier to learn. Therefore, in order to avoid feature redundancy, a smaller common coefficient is assigned to the data sample.

[0115] Optionally, in some embodiments of this application, if the number of target samples in the nearest neighbor sample pool of a data sample is less than or equal to a third preset threshold, the data sample is removed from the electricity meter operation data training set.

[0116] Specifically, the third preset threshold can be set according to the actual situation. For example, when the number of target samples in the nearest neighbor 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 nearest neighbor pool of a data sample is less than or equal to 1, it means that the vast majority of samples in the nearest neighbor pool of that data sample are out-of-class neighbors, and that data sample is more likely to be a noise sample compared to other data samples. When the number of target samples in the nearest neighbor 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 nearest neighbor pool of a data sample is less than or equal to 5, it means that the vast majority of samples in the nearest neighbor pool of that data sample are out-of-class neighbors, and that data sample is more likely to be a noise sample compared to 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 distinguish correctly and may even have a negative effect on the training of the base classifier and the transfer task supervisor. Therefore, the data sample is removed from the training set.

[0117] Furthermore, based on the commonality coefficients assigned to each data sample in the above embodiments, in step S4, a total of N data samples are selected from all energy meter operation data training sets except for the energy meter operation data training set corresponding to the i-th fault category. i The data samples include:

[0118] In all energy meter operation data training sets except for the one corresponding to the i-th fault category, select N with the largest commonality coefficient. i One data sample.

[0119] Based on the knowledge transfer-based electricity meter fault classification method provided in the above embodiments, this application also provides a specific example of dividing the training set for the migration task supervisor. By dividing historical data under different fault categories of electricity meters, multiple training sets for the migration task supervisor are obtained:

[0120] The datasets of electricity meter faults under seven different fault categories are processed. These seven 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 nine feature variables: working duration, delivery batch number, power supply unit number, electricity meter type, fault identification month, installation month, province, equipment specifications, and communication method. The datasets for each fault category are iterated through. All data samples in that category are selected as the majority class samples. Multiple data samples of the same number as the majority class samples are selected from the datasets of other fault categories to form the minority class samples. This yields the training set for the migration task supervisor corresponding to that fault category. Specifically, each migration task supervisor training set can be represented as follows:

[0121] X i =[X min ,X maj ],

[0122] Among them, X i Let X represent the training set of the supervisor for the i-th transfer task, where i ∈ [1, 7]; min X represents the minority class sample set, where the class label of each training sample is set to 0; maj X represents the majority class sample set, where the class label of each training sample is set to 1; i The size is G i =len(X i ), len(X i () represents the number of training samples in the training set of the transfer task supervisor;

[0123] During the testing process, seven general-purpose Random Forest (RF) base classifiers with good performance were selected to predict the category of the test sample. Each base classifier outputs a result for a specific fault type. The test sample passed through each of the seven base classifiers during the testing process. Each base classifier output the probability that the test sample was predicted to be the current fault category. After all seven base classifiers output their results, the classification confidence of each base classifier was used to determine whether the test sample needed to be input into the corresponding transfer task supervisor. Finally, the fault category with the highest probability was selected as the final prediction result.

[0124] To verify the effectiveness and accuracy of the knowledge transfer-based electricity meter fault classification method provided in this application, this application also compares the above-mentioned electricity meter fault classification method with five data-level sampling methods and five mainstream deep learning sample generation methods. Considering the characteristics of large sample data volume and complex categories in the electricity meter fault dataset, RF is used as the base classifier for the data-level method to verify the sample balancing effect.

[0125] Specifically, the electricity meter dataset collected smart meter data from 25 provinces across 7 fault types. Due to various factors such as manual labeling errors, there were mislabeled and missing fault type labels, and the meter fault data contained outliers and missing values. After processing with various techniques 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 for each fault type was highly imbalanced, with the maximum imbalance rate reaching 9.94. After the above data preprocessing, the resulting electricity meter fault dataset contained 9 feature attributes, including working time, delivery batch number, power supply unit number, electricity meter type, fault identification month, installation month, province, equipment specifications, and communication method. To reduce the randomness of the results, the dataset was randomly divided into training and test sets in an 8:2 ratio using a fixed random number seed.

[0126] Furthermore, Table 2 shows information on five data-level sampling methods and five mainstream deep learning sample generation methods used in the embodiments of this application:

[0127] Table 2

[0128]

[0129] In this application, the macro-F1 and G-mean metrics are used to evaluate the classification performance of the algorithm. The macro-F1 metric is the arithmetic mean of the F1-measures for each fault category, used to comprehensively evaluate the accuracy and recall of the model across each fault category. The G-mean metric is the geometric mean of the recall for each fault category, used to assess the recall performance of the model across each fault category. Both macro-F1 and G-mean values ​​range from 0 to 1, with larger values ​​indicating better classification performance.

[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 index under various fault categories:

[0131] Table 3

[0132]

[0133]

[0134] Table 4 shows the experimental results of the ATIC-CIE method and various comparative methods provided in this application in terms of recall rate and G-mean index under various failure categories:

[0135] Table 4

[0136]

[0137] As shown in the table, the knowledge transfer-based electricity meter fault classification method provided in this application achieves higher F1-measure and recall rates than other methods in most categories, and obtains the highest macro-F1 and G-mean. Compared with data-level sampling methods and mainstream deep learning sample generation methods, this application solves the problem of low accuracy in fault classification results caused by imbalanced fault sample numbers by training corresponding base classifiers and transfer task supervisors for each fault category. By examining the nearest neighbor distribution to divide the samples and assigning corresponding commonality coefficients to the data samples, the model strengthens its ability to distinguish difficult-to-distinguish samples by identifying common information between similar samples. By designing a joint discrimination mechanism that combines the global discrimination ability of traditional classifiers with the model's accurate identification ability of difficult-to-distinguish samples, the accuracy of the classification task is improved, which greatly alleviates the problem of reduced classification accuracy caused by feature overlap and effectively improves the accuracy and recall of electricity meter fault classification.

[0138] Based on the electricity meter fault classification method provided in the above embodiments, this application also provides an electricity meter fault classification device based on knowledge transfer, such as... Figure 5 As shown, the device specifically includes:

[0139] Data acquisition module 10 is used to acquire the training set of electricity meter operation data corresponding to I fault categories;

[0140] Data initialization module 20 is used to initialize i = 1;

[0141] The base classifier training module 30 is used to input all data samples from the training set of I energy meter operation data into the i-th base classifier, output the probability of each data sample belonging to the i-th fault category, construct the loss function of the i-th base classifier, and complete the training of the i-th base classifier.

[0142] The migration task supervisor training set construction module 40 is used to select N energy meter operation data training sets from all energy meter operation data training sets except the energy meter operation data training set corresponding to the i-th fault category. i Data samples; based on N i The training set for the migration task supervisor is obtained by combining N data samples and the data samples from the energy meter operation data training set corresponding to the i-th fault category; where N i This represents the number of samples in the training set of electricity meter operation data corresponding to the i-th fault category;

[0143] The transfer task supervisor training module 50 is used to input the training samples from the i-th transfer task supervisor training set into the i-th transfer task supervisor, output the probability that the training samples belong to the i-th fault category, construct the loss function of the i-th transfer task supervisor, and complete the training of the i-th transfer task supervisor.

[0144] The electricity meter fault classification model acquisition module 60 is used to update i = i + 1 and return to the steps of the base classifier training module until i = I, and obtain the electricity meter fault classification model based on the trained I base classifiers and I transfer task supervisors.

[0145] Specifically, in some embodiments of this application, 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 the forward propagation direction.

[0146] Optionally, in some embodiments of this application, the device further includes a fault classification module, used to classify the faults of the electricity meter to be classified after obtaining a fault classification model based on I trained base classifiers and I transfer task supervisors. Specifically, this includes:

[0147] The classification confidence calculation submodule is used to input the operating data of the energy meter to be classified into the i-th base classifier in the 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];

[0148] The first probability acquisition submodule is used to obtain the probability that the 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 the first preset threshold.

[0149] The second probability submodule is used to input the operating data of the energy meter to be classified into the i-th migration task supervisor in the energy meter fault classification model if the classification confidence is less than or equal to the first preset threshold, and obtain the probability that the 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 of the energy meter to be classified belonging to each fault category, and take the fault category with the highest probability as the target fault category of the energy meter to be classified.

[0151] Specifically, the probability that the 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, which states that if class ... conf_i If ≤a, then the value of the Boolean function is 1; if class is not satisfied... conf_i If a ≤ a, then the value of the Boolean function is 0; conf_i The classifier represents the classification confidence of the i-th base classifier; 'a' represents the first preset threshold; 'α' represents the hyperparameter; and 'judge' represents the hyperparameter. i This represents the output of the supervisor for the i-th migration task; class label_i Prob represents the output of the i-th base classifier; maj =1-class label_i , representing the probability that the energy meter to be classified does not belong to the i-th fault category.

[0155] Optionally, in some embodiments of this application, the data acquisition module may further include:

[0156] The nearest neighbor sample pool acquisition module is used to select the K nearest neighbor samples of each data sample from the training set of I electricity meter operation data using the K nearest neighbor algorithm, and obtain the nearest neighbor sample pool of the data sample.

[0157] The 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 that nearest neighbor sample pool;

[0158] The first commonality coefficient calculation module is used to calculate the commonality coefficient of the data sample based on the commonality expected value, the ignored coefficient, 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.

[0159] The second commonality coefficient calculation module is used to calculate the commonality coefficient of the data sample based on the commonality expectation value of the data sample and the difference if the difference is greater than the second preset threshold; wherein, the number of target samples in the nearest neighbor sample pool of the data sample is: the number of samples in the nearest neighbor sample pool that have the same fault category as the data sample.

[0160] Specifically, the formula for calculating the commonality coefficient of the data samples is as follows:

[0161]

[0162] in, N represents the commonality coefficient of the data samples; expansion represents the expected commonality value of the data samples; same Ir represents the number of target samples in the nearest neighbor 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 nearest neighbor pool of the data sample and the number of target samples in that nearest neighbor pool, m = KN same K represents the total number of samples in the nearest neighbor pool of the data sample; M represents the second preset threshold. This represents the floor function.

[0163] Preferably, based on the commonality coefficients of the above data samples, a total of N data samples are selected from all energy meter operation data training sets except for the energy meter operation data training set corresponding to the i-th fault category. i The data samples include: from all energy meter operation data training sets except those corresponding to the i-th fault category, N samples with the largest commonality coefficients are selected. i One data sample.

[0164] Optionally, in some embodiments of this application, if the number of target samples in the nearest neighbor sample pool of a data sample is less than or equal to a third preset threshold, the data sample is removed from the electricity meter operation data training set.

[0165] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the knowledge transfer-based electricity meter fault classification method described above.

[0166] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0167] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0168] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0169] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0170] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A knowledge transfer based fault classification method for electric energy meters, characterized in that, include: S10: Obtain the training set of electricity meter operation data corresponding to I fault categories; S20: Initialize i=1; S30: Input all data samples from the training set of I energy meter operation data into the i-th base classifier, output the probability of each data sample belonging to the i-th fault category, construct the loss function of the i-th base classifier, and complete the training of the i-th base classifier; S40: In all the energy meter operation data training sets except for the energy meter operation data training set corresponding to the i-th fault category, a total of [number] data sets were selected. Data samples; based on The training set for the migration task supervisor is obtained by combining the data samples from the training set of the i-th data samples and the data samples from the energy meter operation data training set corresponding to the i-th fault category; where... This represents the number of samples in the training set of electricity meter operation data corresponding to the i-th fault category; S50: Input the training samples from the training set of the i-th transfer task supervisor into the i-th transfer 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 transfer task supervisor to complete the training of the i-th transfer task supervisor. S60: Update i=i+1 and return to execute step S30 until i=I, and obtain the electricity meter fault classification model based on the trained I base classifiers and I transfer task supervisors. After obtaining the electricity meter fault classification model based on the trained I base classifiers and I transfer task supervisors, the steps for classifying the electricity meters to be classified include: The operating data of the electricity meter to be classified is input into the i-th base classifier in the electricity meter fault classification model, and the classification confidence of the i-th base classifier is calculated based on the output of the i-th base classifier; where... ; If the classification confidence is greater than the first preset threshold, the probability that the 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 the first preset threshold, the operating data of the energy meter to be classified is input into the i-th migration task supervisor in the energy meter fault classification model. Based on the output of the i-th migration task supervisor and the output of the i-th base classifier, the probability that the energy meter to be classified belongs to the i-th fault category is obtained. Compare the probability of the energy meter to be classified belonging to each fault category, and take the fault category with the highest probability as the target fault category of the energy meter to be classified.

2. The knowledge transfer-based energy meter fault classification method according to claim 1, characterized in that, The probability that the energy meter to be classified belongs to the i-th fault category is: , , in, This represents the probability that the energy meter to be classified belongs to the i-th fault category; Represent a Boolean function, if it satisfies If the condition is met, the value of the Boolean function is 1; otherwise, the condition is not met. If , then the value of the Boolean function is 0; This represents the classification confidence of the i-th base classifier; This indicates the first preset threshold. Indicates hyperparameters; This represents the output of the supervisor for the i-th migration task; This represents the output of the i-th base classifier; , representing the probability that the energy meter to be classified does not belong to the i-th fault category.

3. The knowledge transfer-based energy meter fault classification method according to claim 1, characterized in that, Step S10 is followed by: For each data sample, the K nearest neighbor algorithm is used to select the K nearest neighbor samples of the data sample from the training set of I electricity meter operation data to obtain the nearest neighbor sample pool of the data sample. Calculate the difference between the total number of samples in the nearest neighbor pool of each data sample and the number of target samples in that nearest neighbor pool; If the difference is less than or equal to the second preset threshold, then the common coefficient of the data sample is calculated based on the common expected value of the data sample, the neglect coefficient, and the number of target samples in the nearest neighbor sample pool. If the difference is greater than the second preset threshold, then the commonality coefficient of the data sample is calculated based on the commonality expected value of the data sample and the difference. The number of target samples in the nearest neighbor sample pool of a data sample is the number of samples in the nearest neighbor sample pool that have the same fault category as the data sample.

4. The knowledge transfer-based energy meter fault classification method according to claim 3, characterized in that, The formula for calculating the commonality coefficient of the data samples is: , in, Represents the commonality coefficient of the data samples; This represents the common expected value of the data samples; This indicates the number of target samples in the nearest neighbor sample pool of a data sample; Indicates the neglect coefficient for the data sample; This represents the difference between the total number of samples in the nearest neighbor pool of a data sample and the number of target samples in that nearest neighbor pool. , This represents the total number of samples in the nearest neighbor pool of a data sample. This indicates the second preset threshold. This represents the floor function.

5. The knowledge transfer-based energy meter fault classification method according to claim 4, characterized in that, In all energy meter operation data training sets except for the one corresponding to the i-th fault category, a total of [number] data were selected. The data samples include: In all energy meter operation data training sets except for the one corresponding to the i-th fault category, select the one with the largest commonality coefficient. One data sample.

6. The knowledge transfer-based energy meter fault classification method according to claim 4, characterized in that, If the number of target samples in the nearest neighbor sample pool of a data sample is less than or equal to the third preset threshold, then the data sample will be removed from the training set of electricity meter operation data.

7. The knowledge transfer-based fault classification method for electricity meters according to claim 1, 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 the forward propagation direction.

8. A fault classification device for electricity meters based on knowledge transfer, characterized in that, include: The data acquisition module is used to acquire the training set of electricity meter operation data corresponding to I fault categories; The data initialization module is used to initialize i=1; The base classifier training module is used to input all data samples from the training set of I energy meter operation data into the i-th base classifier, output the probability of each data sample belonging to the i-th fault category, construct the loss function of the i-th base classifier, and complete the training of the i-th base classifier. The migration task supervisor training set construction module is used to select data from all energy meter operation data training sets except those corresponding to the i-th fault category. Data samples; based on The training set for the migration task supervisor is obtained by combining the data samples from the training set of the i-th data samples and the data samples from the energy meter operation data training set corresponding to the i-th fault category; where... This represents the number of samples in the training set of electricity meter operation data corresponding to the i-th fault category; The transfer task supervisor training module is used to input the training samples from the i-th transfer task supervisor training set into the i-th transfer task supervisor, output the probability that the training samples belong to the i-th fault category, construct the loss function of the i-th transfer task supervisor, and complete the training of the i-th transfer task supervisor. The electricity 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. Based on the trained I base classifiers and I transfer task supervisors, the electricity meter fault classification model is obtained. The fault classification module, after obtaining a fault classification model for electricity meters based on I pre-trained base classifiers and I transfer task supervisors, performs fault classification on the electricity meters to be classified. Specifically, it includes: The classification confidence calculation submodule is used to input the operating data of the energy meter to be classified into the i-th base classifier in the 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... ; The first probability acquisition submodule is used to obtain the probability that the 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 the first preset threshold. The second probability submodule is used to input the operating data of the energy meter to be classified into the i-th migration task supervisor in the energy meter fault classification model if the classification confidence is less than or equal to the first preset threshold, and obtain the probability that the 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 of the energy meter to be classified belonging to each fault category, and take the fault category with the highest probability as the target fault category of the energy meter to be classified.

9. The knowledge transfer-based energy meter fault classification device according to claim 8, characterized in that, The probability that the energy meter to be classified belongs to the i-th fault category is: , , in, This represents the probability that the energy meter to be classified belongs to the i-th fault category; Represent a Boolean function, if it satisfies If the condition is met, the value of the Boolean function is 1; otherwise, the condition is not met. If , then the value of the Boolean function is 0; This represents the classification confidence of the i-th base classifier; This indicates the first preset threshold. Indicates hyperparameters; This represents the output of the supervisor for the i-th migration task; This represents the output of the i-th base classifier; , representing the probability that the energy meter to be classified does not belong to the i-th fault category.

10. The knowledge transfer-based energy meter classification device according to claim 8, characterized in that, The data acquisition module also includes: The nearest neighbor sample pool acquisition module is used to select the K nearest neighbor samples of each data sample from the training set of I electricity meter operation data using the K nearest neighbor algorithm, and obtain the nearest neighbor sample pool of the data sample. The 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 that nearest neighbor sample pool; The first commonality coefficient calculation module is used to calculate the commonality coefficient of the data sample based on the commonality expected value, the ignored coefficient, 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 second commonality coefficient calculation module is used to calculate the commonality coefficient of the data sample based on the commonality expectation value of the data sample and the difference if the difference is greater than the second preset threshold; wherein, the number of target samples in the nearest neighbor sample pool of the data sample is: the number of samples in the nearest neighbor sample pool that have the same fault category as the data sample.

11. The knowledge transfer-based energy meter fault classification device according to claim 10, characterized in that, The formula for calculating the commonality coefficient of the data samples is: , in, Represents the commonality coefficient of the data samples; This represents the common expected value of the data samples; This indicates the number of target samples in the nearest neighbor sample pool of a data sample; Indicates the neglect coefficient for the data sample; This represents the difference between the total number of samples in the nearest neighbor pool of a data sample and the number of target samples in that nearest neighbor pool. , This represents the total number of samples in the nearest neighbor pool of a data sample. This indicates the second preset threshold. This represents the floor function.

12. The knowledge transfer-based energy meter fault classification device according to claim 11, characterized in that, In all energy meter operation data training sets except for the one corresponding to the i-th fault category, a total of [number] data were selected. The data samples include: In all energy meter operation data training sets except for the one corresponding to the i-th fault category, select the one with the largest commonality coefficient. One data sample.

13. The knowledge transfer-based energy meter fault classification device according to claim 11, characterized in that, If the number of target samples in the nearest neighbor sample pool of a data sample is less than or equal to the third preset threshold, then the data sample will be removed from the training set of electricity meter operation data.

14. The knowledge transfer-based energy meter fault classification device according to claim 8, 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 the forward propagation direction.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the knowledge transfer-based electricity meter fault classification method according to any one of claims 1-7.