Electric energy meter fault detection method and device based on electric energy meter fault classification decision tree

Through the detection method based on the decision tree of the power meter fault classification, the problem of low detection efficiency of the power meter in the prior art is solved, and fast and accurate fault detection is achieved, which improves detection efficiency and accuracy.

CN119939403APending Publication Date: 2025-05-06ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510140676.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the prior art, the power meter fault detection efficiency is low, and it requires manual open covers to be tested one by one, which is not very efficient.

Method used

The detection method based on the fault classification decision tree of the electricity meter is adopted. By obtaining the assembly line test data of the sample electricity meter, dividing the training data set and verification data set, iteratively generating the fault classification decision tree, and pruning it to determine the target decision tree, which is used to quickly detect the faults of the electricity meter to be tested.

Benefits of technology

It improves the efficiency of power meter fault detection, avoids manual cover opening detection, can quickly and accurately identify the fault type of power meter, and improves detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119939403A_ABST
    Figure CN119939403A_ABST
Patent Text Reader

Abstract

The invention relates to an electric energy meter fault detection method and device based on an electric energy meter fault classification decision tree. The method comprises the steps of obtaining a test data set of a sample electric energy meter, dividing the test data set into a training data set and a verification data set according to a first preset proportion, and performing fault feature selection on the training data set to obtain divided fault features corresponding to the training data set, and iteratively generating a decision tree according to the divided fault features and the training data set, pruning the decision tree based on the verification data set to obtain a plurality of pruned decision trees, determining a target decision tree from the plurality of pruned decision trees based on complexity information of each pruned decision tree, obtaining assembly line test data of the to-be-tested electric energy meter, and sending the assembly line test data to the to-be-tested electric energy meter. And determining a fault detection result of the to-be-tested electric energy meter according to the assembly line test data and a corresponding relationship between the data in the target decision tree and the fault features. By adopting the method, the detection efficiency of electric energy meter fault detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power grid technology, and in particular to an electric energy meter fault detection method, device, computer equipment, computer-readable storage medium and computer program product based on an electric energy meter fault classification decision tree. Background Art

[0002] With the rapid development of the power grid, electric energy meters have gradually replaced traditional mechanical meters and play an important role in many key links such as power dispatch, load estimation and energy management. However, as the use time of electric energy meters increases and the working environment changes, their internal components may age, be damaged or fail due to external factors. Once the core components fail, it often causes measurement deviation or data loss. At present, it is necessary to manually open the covers one by one to check whether the electric energy meters are faulty.

[0003] However, the current manual method of detecting electric energy meter faults has the problem of low fault detection efficiency. Summary of the invention

[0004] Based on this, it is necessary to provide an electric energy meter fault detection method, device, computer equipment, computer readable storage medium and computer program product based on an electric energy meter fault classification decision tree, which can improve the detection efficiency of fault detection in response to the above technical problems.

[0005] In a first aspect, the present application provides an electric energy meter fault detection method based on an electric energy meter fault classification decision tree, comprising:

[0006] Acquire a sample pipeline test data set of a sample electric energy meter, and divide the sample pipeline test data set into a training data set and a verification data set according to a first preset ratio;

[0007] Select fault features for the training data set to obtain the partitioned fault features corresponding to the training data set;

[0008] Iteratively generate an electric energy meter fault classification decision tree according to the divided fault characteristics and the training data set, and prune the electric energy meter fault classification decision tree based on the verification data set to obtain multiple pruned electric energy meter fault classification decision trees;

[0009] Based on the complexity information of each pruned electric energy meter fault classification decision tree, a target electric energy meter fault classification decision tree is determined from a plurality of pruned electric energy meter fault classification decision trees;

[0010] The pipeline test data of the electric energy meter to be tested is obtained, and the fault detection result of the electric energy meter to be tested is determined according to the corresponding relationship between the pipeline test data and the data in the fault classification decision tree of the target electric energy meter and the fault characteristics.

[0011] In one embodiment, fault feature selection is performed on a training data set to obtain the partitioned fault features corresponding to the training data set, including:

[0012] Get the information entropy corresponding to the training data set;

[0013] Based on information entropy and training data set, the information gain corresponding to each fault feature is obtained; information gain is used to measure the importance of fault features in fault classification;

[0014] The fault feature corresponding to the maximum information gain is used as the partition fault feature corresponding to the training data set.

[0015] In one embodiment, iteratively generating an electric energy meter fault classification decision tree according to the divided fault features and the training data set includes:

[0016] The training data set is divided into subsets according to the divided fault features, and for each subset, the fault feature selection and subset division are repeated until the subset division cannot be continued, and the data set to which the subset that cannot be further divided into subsets belongs is obtained;

[0017] Generate an electric energy meter fault classification decision tree based on the training data set and each data set.

[0018] In one embodiment, pruning the electric energy meter fault classification decision tree based on the validation data set includes:

[0019] According to the training data set and the electric energy meter fault classification decision tree, the first classification accuracy of the electric energy meter fault classification decision tree is obtained;

[0020] Based on the validation data set, the electric energy meter fault classification decision tree is verified to obtain the second classification accuracy of the electric energy meter fault classification decision tree;

[0021] When the second classification accuracy is greater than or equal to the first classification accuracy, the electric energy meter fault classification decision tree is pruned.

[0022] In an exemplary embodiment, the pipeline test data includes an impedance spectrum type of an electric energy meter; obtaining the pipeline test data of the electric energy meter to be tested includes:

[0023] Obtain broadband impedance spectrum data of the electric energy meter to be tested;

[0024] Drawing a Bode diagram of the broadband impedance spectrum data to obtain corresponding broadband impedance spectrum Bode diagram data;

[0025] The broadband impedance spectrum Bode plot data is input into the electric energy meter impedance spectrum type acquisition model to obtain the electric energy meter impedance spectrum type of the electric energy meter to be tested.

[0026] In one embodiment, the electric energy meter impedance spectrum type acquisition model is trained by the following steps:

[0027] Acquiring sample broadband impedance spectrum data associated with a sample electric energy meter;

[0028] Performing feature extraction processing on the sample broadband impedance spectrum data to obtain a feature vector corresponding to the sample broadband impedance spectrum data;

[0029] According to a second preset ratio, the feature vector is divided and processed to obtain a training feature set and a verification feature set;

[0030] Iteratively training the electric energy meter impedance spectrum type acquisition model to be trained according to the training feature set to obtain the trained electric energy meter impedance spectrum type acquisition model;

[0031] The trained electric energy meter impedance spectrum type acquisition model is verified according to the verification feature set to obtain the prediction accuracy of the trained electric energy meter impedance spectrum type acquisition model;

[0032] When the prediction accuracy is greater than the preset accuracy, the trained electric energy meter impedance spectrum type acquisition model is used as the trained electric energy meter impedance spectrum type acquisition model.

[0033] In a second aspect, the present application also provides an electric energy meter fault detection device based on an electric energy meter fault classification decision tree, comprising:

[0034] A data set acquisition module, used to acquire a sample pipeline test data set of a sample electric energy meter, and divide the sample pipeline test data set into a training data set and a verification data set according to a first preset ratio;

[0035] A fault feature selection module is used to select fault features for a training data set to obtain the partitioned fault features corresponding to the training data set;

[0036] A decision tree construction module is used to iteratively generate an electric energy meter fault classification decision tree according to the divided fault characteristics and the training data set, and prune the electric energy meter fault classification decision tree based on the verification data set to obtain multiple pruned electric energy meter fault classification decision trees;

[0037] A decision tree pruning module, used to determine a target electric energy meter fault classification decision tree from a plurality of pruned electric energy meter fault classification decision trees based on complexity information of each pruned electric energy meter fault classification decision tree;

[0038] The fault detection module is used to obtain the pipeline test data of the electric energy meter to be tested, and determine the fault detection result of the electric energy meter to be tested according to the corresponding relationship between the pipeline test data and the data in the fault classification decision tree of the target electric energy meter and the fault characteristics.

[0039] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0040] Acquire a sample pipeline test data set of a sample electric energy meter, and divide the sample pipeline test data set into a training data set and a verification data set according to a first preset ratio;

[0041] Select fault features for the training data set to obtain the partitioned fault features corresponding to the training data set;

[0042] Iteratively generate an electric energy meter fault classification decision tree according to the divided fault characteristics and the training data set, and prune the electric energy meter fault classification decision tree based on the verification data set to obtain multiple pruned electric energy meter fault classification decision trees;

[0043] Based on the complexity information of each pruned electric energy meter fault classification decision tree, a target electric energy meter fault classification decision tree is determined from a plurality of pruned electric energy meter fault classification decision trees;

[0044] The pipeline test data of the electric energy meter to be tested is obtained, and the fault detection result of the electric energy meter to be tested is determined according to the corresponding relationship between the pipeline test data and the data in the fault classification decision tree of the target electric energy meter and the fault characteristics.

[0045] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

[0046] Acquire a sample pipeline test data set of a sample electric energy meter, and divide the sample pipeline test data set into a training data set and a verification data set according to a first preset ratio;

[0047] Select fault features for the training data set to obtain the partitioned fault features corresponding to the training data set;

[0048] Iteratively generate an electric energy meter fault classification decision tree according to the divided fault characteristics and the training data set, and prune the electric energy meter fault classification decision tree based on the verification data set to obtain multiple pruned electric energy meter fault classification decision trees;

[0049] Based on the complexity information of each pruned electric energy meter fault classification decision tree, a target electric energy meter fault classification decision tree is determined from a plurality of pruned electric energy meter fault classification decision trees;

[0050] The pipeline test data of the electric energy meter to be tested is obtained, and the fault detection result of the electric energy meter to be tested is determined according to the corresponding relationship between the pipeline test data and the data in the fault classification decision tree of the target electric energy meter and the fault characteristics.

[0051] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0052] Acquire a sample pipeline test data set of a sample electric energy meter, and divide the sample pipeline test data set into a training data set and a verification data set according to a first preset ratio;

[0053] Select fault features for the training data set to obtain the partitioned fault features corresponding to the training data set;

[0054] Iteratively generate an electric energy meter fault classification decision tree according to the divided fault characteristics and the training data set, and prune the electric energy meter fault classification decision tree based on the verification data set to obtain multiple pruned electric energy meter fault classification decision trees;

[0055] Based on the complexity information of each pruned electric energy meter fault classification decision tree, a target electric energy meter fault classification decision tree is determined from a plurality of pruned electric energy meter fault classification decision trees;

[0056] The pipeline test data of the electric energy meter to be tested is obtained, and the fault detection result of the electric energy meter to be tested is determined according to the corresponding relationship between the pipeline test data and the data in the fault classification decision tree of the target electric energy meter and the fault characteristics.

[0057] The above-mentioned electric energy meter fault detection method, device, computer equipment, computer-readable storage medium and computer program product based on the electric energy meter fault classification decision tree obtain a sample pipeline test data set of a sample electric energy meter, and divide the sample pipeline test data set into a training data set and a verification data set according to a first preset ratio, perform fault feature selection on the training data set to obtain the divided fault features corresponding to the training data set, iteratively generate an electric energy meter fault classification decision tree according to the divided fault features and the training data set, and prune the electric energy meter fault classification decision tree based on the verification data set to obtain multiple pruned electric energy meter fault classification decision trees, determine a target electric energy meter fault classification decision tree from the multiple pruned electric energy meter fault classification decision trees based on the complexity information of each pruned electric energy meter fault classification decision tree, obtain the pipeline test data of the electric energy meter to be tested, and determine the fault detection result of the electric energy meter to be tested based on the corresponding relationship between the pipeline test data and the data in the target electric energy meter fault classification decision tree and the fault features. By pre-building a decision tree to determine the corresponding relationship between data and fault characteristics, the fault detection result of the electric energy meter to be tested can be determined directly based on the assembly line data and the corresponding relationship of the electric energy meter to be tested, thereby avoiding the need to open the cover of the electric energy meter to be tested and not paying attention to the type of electric energy meter due to the corresponding relationship between data and fault characteristics, thereby improving the detection efficiency of electric energy meter fault detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0059] Figure 1 An application environment diagram of an electric energy meter fault detection method based on an electric energy meter fault classification decision tree in one embodiment;

[0060] Figure 2 It is a flowchart of an electric energy meter fault detection method based on an electric energy meter fault classification decision tree in one embodiment;

[0061] Figure 3 It is a schematic diagram of a flow chart of electric energy meter fault detection based on an electric energy meter fault classification decision tree in another embodiment;

[0062] Figure 4 Schematic diagram of the structure of a convolutional neural network in one embodiment;

[0063] Figure 5 A schematic diagram of the impedance spectrum classification accuracy in one embodiment;

[0064] Figure 6 A schematic diagram of the fault detection accuracy of an electric energy meter in another embodiment;

[0065] Figure 7 is a structural block diagram of an electric energy meter fault detection device based on an electric energy meter fault classification decision tree in one embodiment;

[0066] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0067] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0068] The electric energy meter fault detection method based on the electric energy meter fault classification decision tree provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the electric energy meter 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. A sample pipeline test data set of the sample electric energy meter is obtained, and the sample pipeline test data set is divided into a training data set and a verification data set according to a first preset ratio, and the fault feature selection is performed on the training data set to obtain the divided fault feature corresponding to the training data set, and the electric energy meter fault classification decision tree is iteratively generated according to the divided fault feature and the training data set, and the electric energy meter fault classification decision tree is pruned based on the verification data set to obtain multiple pruned electric energy meter fault classification decision trees, and based on the complexity information of each pruned electric energy meter fault classification decision tree, a target electric energy meter fault classification decision tree is determined from the multiple pruned electric energy meter fault classification decision trees, and finally the pipeline test data of the electric energy meter to be tested is obtained, and the corresponding relationship between the data and the fault feature in the pipeline test data and the target electric energy meter fault classification decision tree is determined. The fault detection result of the electric energy meter to be tested is determined. The server 104 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0069] In an exemplary embodiment, Figure 2 As shown in FIG. 1 , a method for detecting electric energy meter faults based on an electric energy meter fault classification decision tree is provided. The method is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps S201 to S205. Among them:

[0070] Step S201: obtain a sample pipeline test data set of a sample electric energy meter, and divide the sample pipeline test data set into a training data set and a verification data set according to a first preset ratio.

[0071] Step S202: performing fault feature selection on the training data set to obtain the divided fault features corresponding to the training data set.

[0072] Among them, the sample pipeline test data set includes sample pipeline test data and the corresponding fault category information. The pipeline test data is the data generated by automatic pipeline calibration of the sample electric energy meter, including appearance test data, basic error test data, starting test data, creeping test data, running metering test data, communication test data, clock test data, status test data, test indication test data and electric energy meter impedance spectrum type; the fault characteristics can be understood as any one of the fault characteristics of the measurement component, the communication module, the power supply, the error and counting fault characteristics, the appearance and mechanical parts fault characteristics, the software and firmware fault characteristics, and the user behavior fault characteristics.

[0073] Optionally, the server 104 obtains a sample pipeline test data set of a sample electric energy meter from a data storage system, and divides the sample pipeline test data set into a training data set and a verification data set according to a first preset ratio. Usually, the number of training data sets is greater than that of verification data sets, and then selects fault features for the training data set to obtain the partitioned fault features for subset partitioning corresponding to the training data set. By obtaining the sample pipeline test data set and performing data processing based on this data set, a foundation is laid for the subsequent construction of a decision tree with higher classification accuracy.

[0074] Step S203, iteratively generating an electric energy meter fault classification decision tree according to the divided fault characteristics and the training data set, and pruning the electric energy meter fault classification decision tree based on the verification data set to obtain a plurality of pruned electric energy meter fault classification decision trees.

[0075] Among them, pruning can be understood as a routine operation for decision trees. According to the classification accuracy of each leaf, some inaccurately classified branches are removed to ensure the classification accuracy of the decision tree and improve the query speed.

[0076] Exemplarily, the server 104 subsets the training data set according to the fault characteristics, and iteratively generates an electric energy meter fault classification decision tree based on the training data set and the divided data subsets, and prunes the electric energy meter fault classification decision tree based on the validation data set, removes the branches where the leaf nodes with poor classification effects are located, and obtains multiple pruned electric energy meter fault classification decision trees. The pruned decision tree can usually show higher accuracy and lower misjudgment rate on the validation set. The simplified tree structure makes the model easier to understand and use, and is suitable for actual fault detection and classification applications. Generating multiple versions of decision trees can enhance the model's ability to cope with different data distributions and provide multiple perspectives for analyzing fault types.

[0077] Step S204: determining a target electric energy meter fault classification decision tree from a plurality of pruned electric energy meter fault classification decision trees based on the complexity information of each pruned electric energy meter fault classification decision tree.

[0078] The complexity information can be understood as a parameter introduced at each node in the decision tree, which is used to evaluate the trade-off between error and complexity before and after pruning.

[0079] Optionally, the server 104 determines the optimal target electric energy meter fault classification decision tree from multiple pruned electric energy meter fault classification decision trees based on the complexity information of each pruned electric energy meter fault classification decision tree. By selecting the best decision tree, a higher classification accuracy can be achieved, especially when processing electric energy meter fault diagnosis, the probability of false positives and false negatives can be reduced, thereby improving the credibility of the classification result.

[0080] Step S205, obtaining the pipeline test data of the electric energy meter to be tested, and determining the fault detection result of the electric energy meter to be tested according to the corresponding relationship between the pipeline test data and the data in the fault classification decision tree of the target electric energy meter and the fault characteristics.

[0081] The fault detection result can be understood as whether the electric energy meter has a fault, as well as the specific components that have failed and the corresponding fault characteristics.

[0082] Exemplarily, the pipeline test data of the electric energy meter to be tested is obtained, starting from the root node of the target electric energy meter fault classification decision tree, and moving down along the tree path according to the characteristic value of this pipeline test data, and finally reaching the leaf node, and the category of the leaf node is the fault detection result of the electric energy meter to be tested. The decision tree algorithm is used to identify multiple fault features of the faulty electric energy meter, which can adapt to the fault identification tasks of different types of electric energy meters in various environments, and realize accurate and efficient detection of faulty components of the electric energy meter.

[0083] In the above-mentioned electric energy meter fault detection method based on the electric energy meter fault classification decision tree, a sample pipeline test data set of a sample electric energy meter is obtained, and the sample pipeline test data set is divided into a training data set and a verification data set according to a first preset ratio, fault feature selection is performed on the training data set to obtain the divided fault features corresponding to the training data set, an electric energy meter fault classification decision tree is iteratively generated according to the divided fault features and the training data set, and the electric energy meter fault classification decision tree is pruned based on the verification data set to obtain multiple pruned electric energy meter fault classification decision trees, based on the complexity information of each pruned electric energy meter fault classification decision tree, a target electric energy meter fault classification decision tree is determined from the multiple pruned electric energy meter fault classification decision trees, the pipeline test data of the electric energy meter to be tested is obtained, and according to the correspondence between the pipeline test data and the data in the target electric energy meter fault classification decision tree and the fault features, the fault detection result of the electric energy meter to be tested is determined. By pre-building a decision tree to determine the corresponding relationship between data and fault characteristics, the fault detection result of the electric energy meter to be tested can be determined directly based on the assembly line data and the corresponding relationship of the electric energy meter to be tested, thereby avoiding the need to open the cover of the electric energy meter to be tested and not paying attention to the type of electric energy meter due to the corresponding relationship between data and fault characteristics, thereby improving the detection efficiency of electric energy meter fault detection.

[0084] In one embodiment, fault feature selection is performed on a training data set to obtain partitioned fault features corresponding to the training data set, including: obtaining information entropy corresponding to the training data set; obtaining information gain corresponding to each fault feature based on the information entropy and the training data set; information gain is used to measure the importance of the fault feature in fault classification; and the fault feature corresponding to the maximum information gain is used as the partitioned fault feature corresponding to the training data set.

[0085] Among them, information entropy is used to measure the degree of confusion or impurity of a data set, and information gain can be understood as the difference in information entropy of a data set before and after subset division according to fault characteristics.

[0086] Optionally, data preprocessing is performed first, and then feature selection is performed to calculate the information entropy of the current data set to measure the degree of confusion or impurity of the data set. The information entropy during feature selection is:

[0087]

[0088] Among them, S is the current dataset, m is the number of categories, and p i is the proportion of the i-th class in the data set.

[0089] Then for each feature, calculate the information gain after its division:

[0090]

[0091] Among them, A is the feature to be tested, v is the specific value of the feature, Values(A) is all possible values ​​of A, S v is the corresponding sample subset when the value of feature A is v, |S| and |S v | respectively represent S and S v The feature with the largest information gain is selected as the partition feature of the current node.

[0092] After the division is completed, a decision tree is recursively generated to divide the data set of the current node into multiple subsets according to the selected features. For each subset, the above feature selection and data division process is repeated until all samples in the subset belong to the same category. The feature selection process based on information gain can effectively process high-dimensional data, reduce feature redundancy, and thus improve the efficiency of data collection and analysis.

[0093] In one of the embodiments, an electric energy meter fault classification decision tree is iteratively generated based on the divided fault characteristics and the training data set, including: dividing the training data set into subsets based on the divided fault characteristics, repeating fault characteristic selection and subset division for each subset until subset division cannot be continued, and obtaining the data set to which the subset that cannot be further divided belongs; and generating an electric energy meter fault classification decision tree based on the training data set and each data set.

[0094] For example, suppose a decision tree is being constructed as follows: Root node: split into multiple subsets. Subset A: further split to form subsets A1 and A2. Subset A1: contains sample [1,1,1], all samples have the same category, meet the stopping condition, marked as a leaf node, category 1. Subset A2: Assuming it contains sample [0,0,1], continue to split, and finally get subsets B1 and B2. Subset B1: contains sample [0,0], all samples are the same, marked as a leaf node, category 0. Subset B2: contains sample [1], directly marked as a leaf node, category 1.

[0095] After the division is completed, a decision tree is recursively generated to divide the data set of the current node into multiple subsets according to the selected features. For each subset, the above feature selection and data division process is repeated until all samples in the subset belong to the same category. When the condition is met to stop, the current node is marked as a leaf node and its category is determined. The original data set is used as the root node, and the remaining leaf nodes are combined to form an electric energy meter fault classification decision tree. The above subset division and recursive generation of decision trees can achieve the following technical effects:

[0096] 1. Through continuous division and feature selection, the constructed decision tree can effectively identify different categories and reach accurate classification results with the least splitting steps.

[0097] 2. Each subset is finally correctly classified into a specific category. For the classification of power meter faults, the fault conditions can be accurately classified, which is convenient for subsequent troubleshooting and maintenance.

[0098] In an exemplary embodiment, an electric energy meter fault classification decision tree is pruned based on a validation data set, including: obtaining a first classification accuracy of the electric energy meter fault classification decision tree according to a training data set and the electric energy meter fault classification decision tree; verifying the electric energy meter fault classification decision tree based on the validation data set to obtain a second classification accuracy of the electric energy meter fault classification decision tree; and pruning the electric energy meter fault classification decision tree when the second classification accuracy is greater than or equal to the first classification accuracy.

[0099] Optionally, the server 104 obtains the first predicted fault feature obtained by the training data set through the electric energy meter fault classification decision tree and the first actual fault feature corresponding to the training data set itself according to the training data set and the electric energy meter fault classification decision tree, and obtains the corresponding first classification accuracy based on the first predicted fault feature and the first actual fault feature; based on the verification data set, the electric energy meter fault classification decision tree is verified, and the second predicted fault feature obtained by the verification data set through the electric energy meter fault classification decision tree and the second actual fault feature corresponding to the verification data set itself are obtained, and the corresponding second classification accuracy is obtained according to the second predicted fault feature and the second actual fault feature. When the second classification accuracy is greater than or equal to the first classification accuracy, the electric energy meter fault classification decision tree is pruned. By comparing the classification accuracy of different data sets, the stability and consistency of the model under different samples can be effectively evaluated. If the verification set performs well (high accuracy), it means that the model also has good discrimination ability on new data. The pruning process can remove unnecessary complex parts in the decision tree, reduce the overfitting of the model to the training data, and make it perform better when processing unseen data. Especially in the classification of electric energy meter faults, the simplified decision tree can more effectively identify the fault mode, thereby improving the generalization ability of the decision tree for electric energy meter fault classification.

[0100] In one embodiment, the pipeline test data includes the impedance spectrum type of the electric energy meter; obtaining the pipeline test data of the electric energy meter to be tested includes: obtaining the broadband impedance spectrum data of the electric energy meter to be tested; drawing a Bode diagram of the broadband impedance spectrum data to obtain corresponding broadband impedance spectrum Bode diagram data; inputting the broadband impedance spectrum Bode diagram data into the electric energy meter impedance spectrum type acquisition model to obtain the electric energy meter impedance spectrum type of the electric energy meter to be tested.

[0101] Exemplarily, the server 104 performs a broadband impedance scan on the port composed of the live line and the neutral line in the electric energy meter to be tested, and generates corresponding broadband impedance spectrum data, and then draws a Bode diagram of the broadband impedance spectrum data to obtain the corresponding broadband impedance spectrum Bode diagram data, and inputs the broadband impedance spectrum Bode diagram data into the electric energy meter impedance spectrum type acquisition model to obtain the electric energy meter impedance spectrum type of the electric energy meter to be tested. The convolution calculation of the electric energy meter impedance spectrum type acquisition model uses a filter to slide on the input data, and performs a dot product operation at each position, and finally generates a convolution feature map. The specific formula of the convolution operation is as follows:

[0102]

[0103] In the formula, O i,j,k represents the value of the kth channel at position (i, j) in the feature map, b k represents the bias term of the kth convolution kernel, I i+m,j+m,d represents the value of the dth channel at position (i+m,j+n) in the input feature map, K m,n,d,k Represents the weight of the d-th input channel corresponding to the k-th output channel at position (m,n) in the convolution kernel.

[0104] The generated Bode plot visualizes the frequency response characteristics, which helps to quickly understand the behavior of the energy meter under different conditions. In addition, by combining broadband impedance spectrum classification with convolutional neural networks, efficient impedance testing and fault detection of energy meters are achieved. This not only improves the accuracy of the analysis, but also ensures the intelligence and automation of the detection.

[0105] In one embodiment, the electric energy meter impedance spectrum type acquisition model is trained by the following steps:

[0106] Acquire sample broadband impedance spectrum data associated with the sample electric energy meter; perform feature extraction processing on the sample broadband impedance spectrum data to obtain feature vectors corresponding to the sample broadband impedance spectrum data; divide the feature vectors according to a second preset ratio to obtain a training feature set and a verification feature set;

[0107] According to the training feature set, the electric energy meter impedance spectrum type acquisition model to be trained is iteratively trained to obtain the trained electric energy meter impedance spectrum type acquisition model; according to the verification feature set, the trained electric energy meter impedance spectrum type acquisition model is verified to obtain the prediction accuracy of the trained electric energy meter impedance spectrum type acquisition model; when the prediction accuracy is greater than the preset accuracy, the trained electric energy meter impedance spectrum type acquisition model is used as the trained electric energy meter impedance spectrum type acquisition model.

[0108] Optionally, the server 104 obtains sample broadband impedance spectrum data associated with the sample electric energy meter, performs feature extraction processing on the sample broadband impedance spectrum data, obtains feature vectors corresponding to the sample broadband impedance spectrum data, and uses the feature vectors of A% as a training feature set and the feature vectors of B% as a verification feature set according to the ratio of A% to B%, where A is greater than B, and iteratively trains the electric energy meter impedance spectrum type acquisition model to be trained according to the training feature set, wherein the electric energy meter impedance spectrum type acquisition model to be trained uses CNN (Convolutional Neural Network A convolutional neural network (CNN) is a convolutional neural network (CNN) that converts input features into abstract features through its excellent nonlinear feature extraction capability, extracts important features to streamline data processing, accelerates the convergence speed of the detection model, and obtains a trained electric energy meter impedance spectrum type acquisition model. Then, the verification feature set is input into the trained electric energy meter impedance spectrum type acquisition model to obtain the predicted electric energy meter impedance spectrum type corresponding to the verification feature vector. The corresponding prediction accuracy is obtained according to the predicted electric energy meter impedance spectrum type and the actual electric energy meter impedance spectrum type. When the prediction accuracy is greater than the preset accuracy, the trained electric energy meter impedance spectrum type acquisition model is used to obtain a trained electric energy meter impedance spectrum type acquisition model.

[0109] The above model training process can achieve the following technical effects:

[0110] 1. CNN can automatically learn and extract complex features, significantly improving the efficiency of obtaining important information from broadband impedance spectroscopy data.

[0111] 2. By splitting the dataset into a training set and a validation set, the performance of the model on unseen data can be effectively evaluated, thereby improving its generalization ability.

[0112] 3. Confirming the model output under the set prediction accuracy standard helps ensure that the final model is efficient and practical and can meet the needs of actual applications.

[0113] In an exemplary embodiment, Figure 3 As shown, a specific implementation process of an electric energy meter fault detection method based on an electric energy meter fault classification decision tree is provided, wherein:

[0114] 1. Carry out automatic calibration of the assembly line to obtain the appearance inspection results of the sample electric energy meter, basic error test results, starting, creeping, running metering, communication test results, clock test results, and status test results.

[0115] 2. Obtain the test indication test results of the sample electric energy meter and the broadband impedance spectrum data of the sample electric energy meter:

[0116] Assembly line calibration and measurement indication test of sample electric energy meters: automatic assembly line calibration is carried out in accordance with the process specified in DL / T2347-2021 "Technical Specifications for Recycling and Disposal of Electric Energy Meters": obtain the appearance inspection results, basic error test results, start-up, creeping, running metering, communication test results, clock test results, and status test results of the sample electric energy meter. Perform the measurement indication test, inject the input signal of superimposed fundamental wave and harmonics into the incoming port of the electric energy meter, read the harmonic analysis results stored in the MCU at the RS485 communication port, and change the harmonic order and content according to the pre-set plan each time, and execute multiple times.

[0117] 3. Plot the broadband impedance spectrum data of the sample electric energy meter as a Bode diagram:

[0118] Broadband impedance spectrum Bode plot generation: The impedance data between different terminals of the faulty energy meter can reflect the fault condition of the faulty energy meter to a certain extent, and different faults often have corresponding different impedance characteristics. After analyzing the impedance characteristics of each port during the fault, the port consisting of the live wire and the neutral wire of the energy meter is selected for broadband impedance scanning, and an impedance spectrum is generated. Since the Convolutional Neural Network (CNN) has excellent performance in image recognition, the impedance spectrum is plotted into a corresponding Bode plot, so that CNN can be used to classify the impedance spectrum Bode plots under different fault conditions. The structure of CNN is as follows: Figure 4 shown.

[0119] 4. Perform feature extraction processing on the sample broadband impedance spectrum Bode diagram to obtain the feature vector corresponding to the sample broadband impedance wave characteristic diagram.

[0120] 5. Divide the feature vector according to the preset ratio (i.e., the second preset ratio mentioned above) to obtain a training data set and a verification data set:

[0121] Feature extraction and data set division: Perform feature extraction on the sample broadband impedance spectrum data to obtain the feature vector corresponding to the sample broadband impedance spectrum data. According to the preset ratio, divide the feature vector to obtain the training data set and the verification data set. According to the ratio of A% and B%, the feature vector of A% is used as the training data set, and the feature vector of B% is used as the verification data set, where A is greater than B.

[0122] 6. According to the training data set, the broadband impedance spectrum Bode diagram detection model to be trained (i.e. the above-mentioned electric energy meter impedance spectrum type acquisition model) is iteratively trained to obtain the trained broadband impedance Bode diagram detection model:

[0123] Broadband impedance spectrum Bode plot detection model training: The broadband impedance spectrum Bode plot detection model uses CNN, which converts input features into abstract features through its excellent nonlinear feature extraction ability, extracts important features to streamline data processing, and speeds up the convergence of the detection model. The broadband impedance spectrum Bode plot is used as a data set for training to obtain an accurate broadband impedance spectrum Bode plot detection model. Its convolution calculation uses a filter to slide on the input data and perform a dot product operation at each position to finally generate a convolution feature map. The specific formula for the convolution operation is as follows:

[0124]

[0125] In the formula, O i,j,k represents the value of the kth channel at position (i, j) in the feature map, b k represents the bias term of the kth convolution kernel, I i+m,j+m,d represents the value of the dth channel at position (i+m,j+n) in the input feature map, K m,n,d,k Represents the weight of the d-th input channel corresponding to the k-th output channel at position (m,n) in the convolution kernel.

[0126] 7. Based on the verification data set, the trained Bode plot detection model of the broadband impedance spectrum of the electric energy meter is verified to obtain the prediction accuracy of the trained Bode plot detection model of the broadband impedance spectrum of the electric energy meter.

[0127] 8. When the prediction accuracy is greater than the preset accuracy, the trained Bode plot detection model of the broadband impedance spectrum of the electric energy meter is used as the trained Bode plot detection model of the broadband impedance spectrum of the electric energy meter.

[0128] 9. Obtain the Bode plot data of the broadband impedance spectrum to be analyzed of the electric energy meter to be analyzed, and input the Bode plot data of the broadband impedance spectrum to be analyzed into the trained Bode plot detection model of the broadband impedance spectrum of the electric energy meter to obtain the corresponding impedance spectrum type of the electric energy meter.

[0129] 10. Use the decision tree algorithm to judge the impedance spectrum type, test indication test results, appearance test results, basic error test results, start-up, creeping, running metering, communication test results, clock test results, and status test results of the electric energy meter to obtain the possible target fault component types of the electric energy meter to be analyzed:

[0130] Fault diagnosis algorithm based on decision tree: According to the impedance test results, appearance inspection results, basic error test results, starting, creeping, running metering, communication test results, clock test results, test indication test results and status test results of the electric energy meter, the decision tree algorithm is used to diagnose the possible target faulty components of the electric energy meter.

[0131] First, data preprocessing is performed, and then feature selection is performed to calculate the information entropy of the current data set to measure the degree of confusion or impurity of the data set. The information entropy during feature selection is:

[0132]

[0133] Among them, S is the current dataset, m is the number of categories, and p i is the proportion of the i-th class in the data set.

[0134] Then for each feature, calculate the information gain after its division:

[0135]

[0136] Among them, A is the feature to be tested, v is the specific value of the feature, Values(A) is all possible values ​​of A, S v is the corresponding sample subset when the value of feature A is v, |S| and |S v | respectively represent S and S v The feature with the largest information gain is selected as the partition feature of the current node.

[0137] After the division is completed, the decision tree is recursively generated to divide the data set of the current node into multiple subsets according to the selected features. For each subset, the above feature selection and data division process is repeated until all samples in the subset belong to the same category.

[0138] When the condition is met to stop, the current node is marked as a leaf node and its category is determined.

[0139] Next, pruning is performed: during the tree generation process, the maximum depth is set in advance to prevent the tree from overgrowing. Error rate reduction pruning and cost complexity pruning are adopted. Starting from the bottom of the generated tree, each non-leaf node is gradually examined. If the error rate of the pruned subtree on the validation set does not increase or decrease, pruning is performed; a complexity parameter is introduced at each node of the tree to evaluate the trade-off between error and complexity before and after pruning, and the optimal subtree is selected.

[0140] Finally, the generated decision tree is applied for prediction: starting from the root node, move down along the tree path according to the feature value of the new data, and finally reach the leaf node. The category of the leaf node is the classification result.

[0141] Compared with the prior art, this application has the following advantages:

[0142] 1. If Figure 5 and Figure 6As shown, the decision tree algorithm is used to identify various fault characteristics of the electric energy meter to be tested, which can adapt to the fault identification tasks of different types of electric energy meters in various environments and realize accurate and efficient detection of faulty components of the electric energy meter.

[0143] 2. The integration of various information such as the appearance inspection results of the electric energy meter, basic error test results, starting, creeping, running metering, communication test results, clock test results and status test results, test indication test results and the broadband impedance spectrum of the live-neutral incoming port as the characteristic quantity for causal tracing of electric energy meter faults can well characterize the internal structure of the electric energy meter, thereby improving the accuracy of fault identification of the decision tree.

[0144] 3. The impedance of the live-neutral incoming port is represented by a Bode diagram, and CNN is used to pre-classify the Bode diagram, fully mining the circuit characteristic information contained in the impedance spectrum data, and using fault feature vectors such as the automatic calibration results of the electric energy meter, the impedance spectrum type of the electric energy meter, and the test indication test results of the electric energy meter as decision tree nodes for fault type detection to achieve high-precision fault diagnosis.

[0145] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0146] Based on the same inventive concept, the embodiment of the present application also provides an electric energy meter fault detection device based on an electric energy meter fault classification decision tree for implementing the electric energy meter fault detection method based on an electric energy meter fault classification decision tree. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the electric energy meter fault detection device based on an electric energy meter fault classification decision tree provided below can refer to the limitations of the electric energy meter fault detection method based on an electric energy meter fault classification decision tree in the above text, and will not be repeated here.

[0147] In an exemplary embodiment, Figure 7As shown, an electric energy meter fault detection device based on an electric energy meter fault classification decision tree is provided, comprising: a data set acquisition module 701, a fault feature selection module 702, a decision tree construction module 703, a decision tree pruning module 704 and a fault detection module 705, wherein:

[0148] The data set acquisition module 701 is used to acquire a sample pipeline test data set of a sample electric energy meter, and divide the sample pipeline test data set into a training data set and a verification data set according to a first preset ratio;

[0149] A fault feature selection module 702 is used to select fault features for a training data set to obtain a partitioned fault feature corresponding to the training data set;

[0150] A decision tree construction module 703 is used to iteratively generate an electric energy meter fault classification decision tree according to the divided fault characteristics and the training data set, and prune the electric energy meter fault classification decision tree based on the verification data set to obtain multiple pruned electric energy meter fault classification decision trees;

[0151] A decision tree pruning module 704 is used to determine a target electric energy meter fault classification decision tree from a plurality of pruned electric energy meter fault classification decision trees based on complexity information of each pruned electric energy meter fault classification decision tree;

[0152] The fault detection module 705 is used to obtain the pipeline test data of the electric energy meter to be tested, and determine the fault detection result of the electric energy meter to be tested according to the corresponding relationship between the pipeline test data and the data in the fault classification decision tree of the target electric energy meter and the fault characteristics.

[0153] In one embodiment, the fault feature selection module 702 is also used to obtain the information entropy corresponding to the training data set; based on the information entropy and the training data set, the information gain corresponding to each fault feature is obtained; the information gain is used to measure the importance of the fault feature in fault classification; the fault feature corresponding to the maximum information gain is used as the classification fault feature corresponding to the training data set.

[0154] In one of the embodiments, the decision tree construction module 703 is also used to subset the training data set according to the divided fault characteristics, and for each subset, repeat the fault feature selection and subset division until the subset division cannot be continued, and obtain the data set to which the subset that cannot be further divided belongs; generate an electric energy meter fault classification decision tree based on the training data set and each data set.

[0155] In an exemplary embodiment, the decision tree pruning module 704 is also used to obtain a first classification accuracy of the electric energy meter fault classification decision tree based on a training data set and the electric energy meter fault classification decision tree; based on a verification data set, the electric energy meter fault classification decision tree is verified to obtain a second classification accuracy of the electric energy meter fault classification decision tree; and when the second classification accuracy is greater than or equal to the first classification accuracy, the electric energy meter fault classification decision tree is pruned.

[0156] In one embodiment, the pipeline test data includes the impedance spectrum type of the electric energy meter, and the fault detection module 705 is also used to obtain the broadband impedance spectrum data of the electric energy meter to be tested; draw a Bode diagram of the broadband impedance spectrum data to obtain the corresponding broadband impedance spectrum Bode diagram data; input the broadband impedance spectrum Bode diagram data into the electric energy meter impedance spectrum type acquisition model to obtain the electric energy meter impedance spectrum type of the electric energy meter to be tested.

[0157] In one of the embodiments, the electric energy meter fault detection device based on the electric energy meter fault classification decision tree also includes a model pre-training module, which is used to obtain sample broadband impedance spectrum data associated with the sample electric energy meter; perform feature extraction processing on the sample broadband impedance spectrum data to obtain a feature vector corresponding to the sample broadband impedance spectrum data; divide the feature vector according to a second preset ratio to obtain a training feature set and a verification feature set; according to the training feature set, iteratively train the electric energy meter impedance spectrum type acquisition model to be trained to obtain the trained electric energy meter impedance spectrum type acquisition model; according to the verification feature set, verify the trained electric energy meter impedance spectrum type acquisition model to obtain the prediction accuracy of the trained electric energy meter impedance spectrum type acquisition model; when the prediction accuracy is greater than the preset accuracy, the trained electric energy meter impedance spectrum type acquisition model is used as the trained electric energy meter impedance spectrum type acquisition model.

[0158] Each module in the above-mentioned electric energy meter fault detection device based on the electric energy meter fault classification decision tree can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0159] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store sample pipeline test data sets, electric energy meter fault classification decision trees, pipeline test data, and fault detection result data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an electric energy meter fault detection method based on an electric energy meter fault classification decision tree is implemented.

[0160] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0161] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the electric energy meter fault detection method based on the electric energy meter fault classification decision tree in the above embodiment is implemented.

[0162] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the electric energy meter fault detection method based on the electric energy meter fault classification decision tree in the above embodiment is implemented.

[0163] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method for detecting an electric energy meter fault based on an electric energy meter fault classification decision tree in the above embodiment is implemented.

[0164] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0165] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0166] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0167] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for detecting electric energy meter faults based on an electric energy meter fault classification decision tree, characterized in that: The method comprises: Acquire a sample pipeline test data set of a sample electric energy meter, and divide the sample pipeline test data set into a training data set and a verification data set according to a first preset ratio; Performing fault feature selection on the training data set to obtain the divided fault features corresponding to the training data set; Iteratively generating an electric energy meter fault classification decision tree according to the divided fault characteristics and the training data set, and pruning the electric energy meter fault classification decision tree based on the verification data set to obtain a plurality of pruned electric energy meter fault classification decision trees; Based on the complexity information of each of the pruned electric energy meter fault classification decision trees, determining a target electric energy meter fault classification decision tree from a plurality of the pruned electric energy meter fault classification decision trees; The pipeline test data of the electric energy meter to be tested is obtained, and the fault detection result of the electric energy meter to be tested is determined according to the corresponding relationship between the pipeline test data and the data in the fault classification decision tree of the target electric energy meter and the fault characteristics.

2. The method according to claim 1, characterized in that The selecting fault features of the training data set to obtain the divided fault features corresponding to the training data set includes: Obtaining information entropy corresponding to the training data set; Based on the information entropy and the training data set, obtaining the information gain corresponding to each of the fault features; the information gain is used to measure the importance of the fault feature in fault classification; The fault feature corresponding to the maximum information gain is used as the partitioning fault feature corresponding to the training data set.

3. The method according to claim 2, characterized in that The iterative generation of the electric energy meter fault classification decision tree according to the divided fault characteristics and the training data set includes: Subsetting the training data set according to the partitioned fault features, repeating fault feature selection and subset partitioning for each subset until subset partitioning cannot be continued, and obtaining a data set to which the subset that cannot be further partitioned belongs; The electric energy meter fault classification decision tree is generated based on the training data set and each of the data sets.

4. The method according to claim 1, characterized in that: The pruning of the electric energy meter fault classification decision tree based on the verification data set includes: According to the training data set and the electric energy meter fault classification decision tree, obtaining a first classification accuracy rate of the electric energy meter fault classification decision tree; Based on the verification data set, verifying the electric energy meter fault classification decision tree to obtain a second classification accuracy rate of the electric energy meter fault classification decision tree; When the second classification accuracy is greater than or equal to the first classification accuracy, the electric energy meter fault classification decision tree is pruned.

5. The method according to claim 1, characterized in that The pipeline test data includes the type of the electric energy meter impedance spectrum; the step of obtaining the pipeline test data of the electric energy meter to be tested includes: Acquiring broadband impedance spectrum data of the electric energy meter to be tested; Performing a Bode plot on the broadband impedance spectrum data to obtain corresponding broadband impedance spectrum Bode plot data; The broadband impedance spectrum Bode plot data is input into the electric energy meter impedance spectrum type acquisition model to obtain the electric energy meter impedance spectrum type of the electric energy meter to be tested.

6. The method according to claim 5, characterized in that The electric energy meter impedance spectrum type acquisition model is trained by the following steps: Acquiring sample broadband impedance spectrum data associated with a sample electric energy meter; Performing feature extraction processing on the sample broadband impedance spectrum data to obtain a feature vector corresponding to the sample broadband impedance spectrum data; Dividing the feature vector according to a second preset ratio to obtain a training feature set and a verification feature set; Iteratively training the electric energy meter impedance spectrum type acquisition model to be trained according to the training feature set to obtain a trained electric energy meter impedance spectrum type acquisition model; According to the verification feature set, the trained electric energy meter impedance spectrum type acquisition model is verified to obtain the prediction accuracy of the trained electric energy meter impedance spectrum type acquisition model; When the prediction accuracy is greater than the preset accuracy, the trained electric energy meter impedance spectrum type acquisition model is used as the trained electric energy meter impedance spectrum type acquisition model.

7. An electric energy meter fault detection device based on an electric energy meter fault classification decision tree, characterized in that: The device comprises: A data set acquisition module, used to acquire a sample pipeline test data set of a sample electric energy meter, and divide the sample pipeline test data set into a training data set and a verification data set according to a first preset ratio; A fault feature selection module is used to select fault features for the training data set to obtain the divided fault features corresponding to the training data set; A decision tree construction module, used to iteratively generate an electric energy meter fault classification decision tree according to the divided fault characteristics and the training data set, and prune the electric energy meter fault classification decision tree based on the verification data set to obtain a plurality of pruned electric energy meter fault classification decision trees; A decision tree pruning module, configured to determine a target electric energy meter fault classification decision tree from a plurality of the pruned electric energy meter fault classification decision trees based on complexity information of each of the pruned electric energy meter fault classification decision trees; The fault detection module is used to obtain the pipeline test data of the electric energy meter to be tested, and determine the fault detection result of the electric energy meter to be tested according to the corresponding relationship between the pipeline test data and the data in the fault classification decision tree of the target electric energy meter and the fault characteristics.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.