Electric energy meter fault detection method and device based on voltage port impedance data, computer equipment and storage medium

By obtaining the broadband impedance data of the voltage port of the power meter and inputting it into the decision tree cluster for prediction, the problems of low efficiency and insufficient accuracy of the existing power meter fault detection technology are solved, and efficient and accurate fault detection is achieved.

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

Patent Information

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

AI Technical Summary

Technical Problem

Existing power meter fault detection technology relies on manual inspection or regular calibration, resulting in low detection efficiency and insufficient accuracy, and the inability to detect sudden failures or deviations in time.

Method used

By obtaining the broadband impedance data of the voltage port of the power meter, determining the characteristic data, and inputting it into the trained decision tree cluster, the target predicted value is obtained to determine whether the power meter component is faulty. The decision tree cluster includes the first decision tree and iterative decision tree. Through iterative training, the error is continuously fitted to improve the prediction accuracy.

Benefits of technology

It improves the accuracy and efficiency of power meter fault detection, and can detect faults in a timely manner based on real-time monitoring, reducing the impact of human factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119916293A_ABST
    Figure CN119916293A_ABST
Patent Text Reader

Abstract

The invention relates to an electric energy meter fault detection method and device based on voltage port impedance data, computer equipment and a storage medium, and relates to the technical field of fault detection. The method comprises the following steps: acquiring broadband impedance data of a voltage port of a to-be-detected electric energy meter, and determining characteristic data corresponding to the broadband impedance data; inputting the feature data into each decision-making tree in a trained decision-making tree cluster to obtain an initial prediction value corresponding to each decision-making tree; the first decision tree is obtained through training based on random training data determined in the broadband impedance training data of the electric energy meter with the same type as the to-be-detected electric energy meter; the iterative decision-making tree is obtained by training based on random training data and an accumulated residual value of a previous decision-making tree corresponding to the iterative decision-making tree; and performing merging processing on the initial prediction values to obtain a target prediction value of the to-be-detected electric energy meter, and determining whether each element included in the to-be-detected electric energy meter has a fault based on the target prediction value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of fault detection, and in particular to a method, device, computer equipment, storage medium and computer program product for detecting faults in an electric energy meter based on voltage port impedance data. Background Art

[0002] The energy meter is an important device used to measure and record energy consumption in the power system. Due to long-term use, external environmental influences or equipment aging, the energy meter may fail, resulting in inaccurate readings. Therefore, the energy meter fault detection technology came into being. The energy meter fault detection technology can monitor the status of the energy meter in real time and detect faults to ensure normal operation.

[0003] Traditional fault detection of electric energy meters mainly relies on manual inspection or regular calibration. Manual inspection usually uses calibration instruments to detect whether the electric energy meter is faulty. This method requires manual on-site point-to-point inspection. Regular calibration performs multiple fault detections on the electric energy meter over a long period of time, but it cannot detect sudden faults or deviations in time. In addition, manual inspection is easily affected by human factors, resulting in insufficient detection efficiency and accuracy of electric energy meter fault detection. Therefore, how to improve the accuracy of electric energy meter fault detection while improving detection efficiency is a technical problem that needs to be solved urgently. 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 voltage port impedance data, which can improve the accuracy of electric energy meter fault detection while improving detection efficiency, in order to address the above technical problems.

[0005] In a first aspect, the present application provides a method for detecting faults in an electric energy meter based on voltage port impedance data. The method comprises:

[0006] Acquire broadband impedance data of a voltage port of the electric energy meter to be detected, and determine characteristic data corresponding to the broadband impedance data;

[0007] Input the feature data into each decision tree in the trained decision tree cluster to obtain the initial prediction value corresponding to each decision tree; the decision tree cluster includes a first decision tree and at least one iterative decision tree; the first decision tree is trained based on random training data determined in the broadband impedance training data of the electric energy meter of the same type as the electric energy meter to be detected; each decision tree in the decision tree cluster has a sequence when generated; the iterative decision tree is trained based on the random training data and the cumulative residual value of the previous decision tree corresponding to the iterative decision tree; the previous decision tree is a decision tree that precedes the iterative decision tree in sequence;

[0008] The initial prediction values ​​are combined to obtain a target prediction value of the electric energy meter to be detected, and based on the target prediction value, it is determined whether each component included in the electric energy meter to be detected is faulty.

[0009] In one embodiment, the method further comprises:

[0010] Acquire broadband impedance training data of an electric energy meter of the same type as the electric energy meter to be detected, and determine a training set based on the broadband impedance training data;

[0011] Determining the initial residual value corresponding to the decision tree cluster based on the target variable of the electric energy meter in each fault state in the training set; the target variable is the label value of the electric energy meter in each fault state;

[0012] Training a first decision tree based on the initial residual value and random training data in the training set to obtain a trained first decision tree and a cumulative residual value of the first decision tree;

[0013] Obtain a new iterative decision tree, train the iterative decision tree according to the cumulative residual value and the random training data of the training set, obtain a trained iterative decision tree, and an updated cumulative residual value corresponding to the iterative decision tree, return to the step of obtaining a new iterative decision tree, until the number of training iterations meets the preset number or the decrease amplitude of the loss function of the iterative decision tree is lower than the preset value, and obtain a trained decision tree cluster;

[0014] The random training data is part of the data randomly selected from the training set; when training the first decision tree and each node in the training iterative decision tree, each node is trained based on the random features in the random training data.

[0015] In one embodiment, the calculation formula of the cumulative residual value of each iterative decision tree includes:

[0016]

[0017] in, represents the accumulated residual value of the i-th sample in the m-th iteration, L represents the loss function, represents the target variable corresponding to the electric energy meter under each fault state, Represents the initial prediction value of the iterative decision tree.

[0018] In one embodiment, determining a training set based on the broadband impedance training data comprises:

[0019] Dividing the broadband impedance training data into a preset number of samples, and randomly determining a sample as a test set, determining the remaining samples in the preset number of samples as training sets, and determining the test set and the training set as a group of sample sets;

[0020] Repeat the steps to divide the broadband impedance training data into a preset number of samples, and randomly determine a sample as a test set, and determine the remaining samples in the preset number of samples as training sets, to obtain multiple groups of sample sets;

[0021] The step of returning to obtain a new iterative decision tree, until the number of training iterations meets the preset number or the decrease amplitude of the loss function of the iterative decision tree is lower than the preset value, after obtaining a trained decision tree cluster, the method further includes:

[0022] For each group of sample sets, based on the test set in the current sample set, the model evaluation score of the decision tree cluster corresponding to the current sample set is determined, and the decision tree cluster with the highest model evaluation score is determined as the trained decision tree cluster.

[0023] In one embodiment, the merging of the initial prediction values ​​to obtain a target prediction value of the electric energy meter to be detected, and determining whether each component included in the electric energy meter to be detected is faulty based on the target prediction value, includes:

[0024] Based on the decision tree weights of each decision tree in the decision tree cluster, weighted summation of each of the initial prediction values ​​is performed to obtain a target prediction value of the electric energy meter to be detected; the decision tree weights are determined based on the learning rates of each decision tree in the decision tree cluster;

[0025] The fault detection result of each component in the electric energy meter to be detected is determined according to the target prediction value and the preset value range when each component is damaged.

[0026] In one embodiment, the step of obtaining broadband impedance data of a voltage port of the electric energy meter to be detected includes:

[0027] Collect broadband impedance data of the input / output line voltage port of the electric energy meter to be tested; the input / output line voltage port includes a live wire-neutral wire port; the broadband impedance data includes impedance amplitude and phase angle of the input / output line voltage port at different frequencies.

[0028] In one embodiment, the method further comprises:

[0029] Based on a deletion strategy and / or an averaging strategy, processing the abnormal values ​​in the broadband impedance data to obtain processed broadband impedance data;

[0030] The missing data in the broadband impedance data is processed based on the previous value filling strategy to obtain the filled broadband impedance data, and the broadband impedance data is used to determine the characteristic data corresponding to the broadband impedance data.

[0031] In a second aspect, the present application also provides an electric energy meter fault detection device based on voltage port impedance data. The device comprises:

[0032] A data determination module, which obtains broadband impedance data of a voltage port of an electric energy meter to be detected, and determines characteristic data corresponding to the broadband impedance data;

[0033] The first prediction module is used to input the feature data into each decision tree in the trained decision tree cluster to obtain the initial prediction value corresponding to each decision tree; the decision tree cluster includes a first decision tree and at least one iterative decision tree; the first decision tree is trained based on random training data determined in the broadband impedance training data of the electric energy meter of the same type as the electric energy meter to be detected; the iterative decision tree is trained based on the random training data and the cumulative residual value of the previous decision tree corresponding to the iterative decision tree; each decision tree in the decision tree cluster has a sequence when generated; the previous decision tree is a decision tree whose sequence is before the iterative decision tree;

[0034] The second prediction module is used to merge the initial prediction values ​​to obtain a target prediction value of the electric energy meter to be detected, and determine whether each component included in the electric energy meter to be detected is faulty based on the target prediction value.

[0035] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect are implemented.

[0036] 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 steps of the method described in the first aspect are implemented.

[0037] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0038] The above-mentioned electric energy meter fault detection method, device, computer equipment, storage medium and computer program product based on voltage port impedance data obtains broadband impedance data of the voltage port of the electric energy meter to be detected, and determines the characteristic data corresponding to the broadband impedance data. The broadband impedance data can be automatically monitored in real time by the device, which can improve the real-time performance of fault detection. The characteristic data is input into each decision tree in the trained decision tree cluster to obtain the initial prediction value corresponding to each decision tree, and each initial prediction value is merged to obtain the target prediction value of the electric energy meter to be detected, and whether each component contained in the electric energy meter to be detected is faulty is determined based on the target prediction value. The decision tree cluster contains a first decision tree and at least one iterative decision tree, each decision tree has a sequence, and each decision tree is trained based on random training data in the broadband impedance training data during training. The random training data can improve the robustness and prediction accuracy of each decision tree after training. In addition, the iterative decision tree is trained based on the cumulative residual value of the previous decision tree. It can be seen that each iterative decision tree is obtained by further iterative training on the basis of the previous decision tree, which can continuously fit the error of the previous decision tree and improve the accuracy of the initial prediction value of the iterative decision tree, thereby improving the accuracy of the target prediction value corresponding to the decision tree cluster, thereby improving the accuracy of fault detection of the electric energy meter to be detected while improving the efficiency of fault detection. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0040] Figure 1 A diagram showing an application environment of an electric energy meter fault detection method based on voltage port impedance data in an embodiment;

[0041] Figure 2 It is a flowchart of a method for detecting faults of an electric energy meter based on voltage port impedance data in one embodiment;

[0042] Figure 3 A schematic diagram of a process of a decision tree cluster training step in one embodiment;

[0043] Figure 4 A schematic diagram of a flow chart of an electric energy meter fault detection method based on voltage port impedance data in another embodiment;

[0044] Figure 5 A schematic diagram of a flow chart of a gradient boosting tree algorithm in one embodiment;

[0045] Figure 6 A schematic diagram of the prediction accuracy of a gradient boosting tree in one embodiment;

[0046] Figure 7 It is a structural block diagram of an electric energy meter fault detection device based on voltage port impedance data in one embodiment;

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

[0048] 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.

[0049] The electric energy meter fault detection method based on voltage port impedance data provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 can obtain the broadband impedance data of the voltage port on each electric energy meter to be detected in real time. For example, an impedance test instrument can be installed on the electric energy meter to be detected, monitor the broadband impedance data of the voltage port on the electric energy meter to be detected in real time, and send the broadband impedance data to the terminal 102. The terminal 102 can monitor multiple electric energy meters to be detected. The terminal 102 communicates with the server 104 through the network. The terminal 102 can send the broadband impedance data corresponding to the electric energy meter to be detected to the server 104. The server 104 can process the broadband impedance data into a feature vector, thereby obtaining feature data corresponding to the broadband impedance data. The server 104 can input the feature data into a trained decision tree cluster to obtain the initial prediction value of each decision tree in the decision tree cluster, and merge the initial prediction values ​​to obtain the target prediction value of the electric energy meter to be detected, and determine whether the electric energy meter to be detected is faulty according to the target prediction value, and determine the faulty component in the electric energy meter to be detected.

[0050] The server 104 can use a large amount of broadband impedance data and labels of electric energy meters of the same model as a training set, and iteratively train the decision tree cluster, first train the first decision tree, then iteratively train to obtain multiple iterative decision trees, and stop training when the training end condition is met, to obtain a trained decision tree cluster consisting of a first decision tree and multiple iterative decision trees.

[0051] The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. Among them, the terminal 102 can be, but is not limited to, various computers and IoT devices for monitoring. The server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.

[0052] In an exemplary embodiment, Figure 2 As shown, a method for detecting faults in electric energy meters based on voltage port impedance data is provided. Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps S202 to S206. Among them:

[0053] Step S202, obtaining broadband impedance data of the voltage port of the electric energy meter to be detected, and determining characteristic data corresponding to the broadband impedance data.

[0054] The voltage port is a port formed by the terminals corresponding to the input and output lines of the electric energy meter. The broadband impedance data is the impedance characteristics of the voltage port within a certain frequency range.

[0055] Specifically, the server can receive the broadband impedance data of each electric energy meter to be detected within a preset time period sent by the terminal, and convert the broadband impedance data into feature data under different frequency bands in order from low to high frequency. For example, the broadband impedance data is converted into feature vectors through a preset text feature extraction model (such as Word2Vec, GloVe, etc.).

[0056] Step S204: input the feature data into each decision tree in the trained decision tree cluster to obtain an initial prediction value corresponding to each decision tree.

[0057] Among them, the decision tree cluster includes a first decision tree and at least one iterative decision tree; the first decision tree is trained based on random training data determined in the broadband impedance training data of the electric energy meter of the same type as the electric energy meter to be detected; the iterative decision tree is trained based on the random training data and the cumulative residual value of the previous decision tree corresponding to the iterative decision tree; each decision tree in the decision tree cluster has a sequence when it is generated; the previous decision tree is a decision tree that is before the iterative decision tree in sequence.

[0058] Specifically, the server can input the feature data into each decision tree in the decision tree cluster, so that the first decision tree and the iterative decision tree both process the feature data, and obtain the initial prediction values ​​independently measured by each decision tree. Since there is a training sequence relationship between each decision tree during the training process, and training is performed based on the cumulative residual value corresponding to the previous decision tree during training, the relationship between the decision trees is improved, and the prediction accuracy of the next decision tree is improved. Therefore, the initial prediction value of each decision tree can be used as a reference for subsequent determination of the target prediction value. In addition, the first decision tree is the first decision tree in the decision tree cluster, and the iterative decision tree can include the second to last decision tree in the decision tree cluster. The order of the iterative decision trees is determined based on the iteration order during the training process. For the iterative decision tree, each iterative decision tree is based on the cumulative residual value of the previous decision tree of the iterative decision tree, and the random training data determined in the broadband impedance training data of the electric energy meter of the same type as the electric energy meter to be detected, and is trained and determined.

[0059] In one example, the decision tree cluster includes a first decision tree and N iterative decision trees. The server can input feature data into the first decision tree and the N iterative decision trees respectively. Each decision tree can generate an output to obtain N+1 initial prediction values.

[0060] Step S206, combining the initial prediction values ​​to obtain a target prediction value of the electric energy meter to be detected, and determining whether each component included in the electric energy meter to be detected is faulty based on the target prediction value.

[0061] Specifically, the server may process multiple initial prediction values, thereby combining the multiple initial prediction values ​​to obtain a target prediction value. In one example, the server may determine an average value of the multiple initial prediction values, or determine a sum of the multiple initial prediction values ​​to obtain the target prediction value.

[0062] The server can determine whether the target prediction value meets the fault condition in the classification judgment strategy according to the classification judgment strategy corresponding to the trained decision tree cluster. If the fault condition is met, it is determined that the electric energy meter to be detected has a fault. If the target prediction value does not meet the fault condition in the classification judgment strategy, it is determined that the electric energy meter to be detected has no fault. In addition, in one example, if the target prediction value meets the fault condition, it can be determined that a certain component represented by the target prediction value has a fault through the fault component judgment condition in the classification judgment strategy, thereby determining whether the component contained in the electric energy meter to be detected is faulty. For example, if the target prediction value meets the fault condition and meets the fault component judgment condition corresponding to the thermistor, it is determined that the thermistor in the electric energy meter to be detected has a fault. Among them, the components in the electric energy meter to be detected may include thermistors, transformers, liquid crystal drivers, three-terminal regulators, power chips, metering chips, etc.

[0063] In the above-mentioned electric energy meter fault detection method based on voltage port impedance data, the broadband impedance data of the voltage port of the electric energy meter to be detected is obtained, and the characteristic data corresponding to the broadband impedance data is determined. The broadband impedance data can be automatically monitored in real time by the device, which can improve the real-time performance of fault detection. The characteristic data is input into each decision tree in the trained decision tree cluster to obtain the initial prediction value corresponding to each decision tree, and each initial prediction value is merged to obtain the target prediction value of the electric energy meter to be detected, and based on the target prediction value, it is determined whether each component contained in the electric energy meter to be detected is faulty. The decision tree cluster contains a first decision tree and at least one iterative decision tree. Each decision tree has a sequence, and each decision tree is trained based on random training data in the broadband impedance training data. The random training data can improve the robustness and prediction accuracy of each decision tree after training. In addition, the iterative decision tree is trained based on the cumulative residual value of the previous decision tree. It can be seen that each iterative decision tree is obtained by further iterative training on the basis of the previous decision tree, which can continuously fit the error of the previous decision tree and improve the accuracy of the initial prediction value of the iterative decision tree, thereby improving the accuracy of the target prediction value corresponding to the decision tree cluster, thereby improving the accuracy of fault detection of the electric energy meter to be detected while improving the efficiency of fault detection.

[0064] In an exemplary embodiment, Figure 3 As shown, the electric energy meter fault detection method based on voltage port impedance data also includes steps S302 to S308. Among them:

[0065] Step S302, obtaining broadband impedance training data of an electric energy meter of the same type as the electric energy meter to be detected, and determining a training set based on the broadband impedance training data;

[0066] The broadband impedance training data is used to train the decision tree cluster, and the electric energy meter corresponding to the broadband impedance training data is of the same type or model as the electric energy meter to be detected. In one example, the electric energy meter corresponding to the broadband impedance training data and the electric energy meter to be detected can be the same electric energy meter.

[0067] Specifically, the server can obtain broadband impedance data of the same type of electric energy meter as the electric energy meter to be detected under different fault states, as well as broadband impedance data without faults through the terminal. For example, broadband impedance data of each component in the electric energy meter to be detected with a single fault is obtained. The components may include thermistors, transformers, liquid crystal drivers, three-terminal regulators, power chips, metering chips, etc. For example, broadband impedance data corresponding to the electric energy meter when the metering chip is damaged, broadband impedance data corresponding to the electric energy meter when the three-stage regulator is damaged, etc. The server can determine the label value corresponding to each broadband impedance data, and determine the label value and broadband impedance data as a training set.

[0068] Step S304, determining the initial residual value corresponding to the decision tree cluster based on the target variable of the electric energy meter in each fault state in the training set.

[0069] Among them, the target variable is the label value of the electric energy meter under each fault state.

[0070] Specifically, the server can obtain the label value of the electric energy meter under each fault state, determine the mean or median of multiple label values, and use the mean or median as the initial residual value. The initial residual value can be determined as the benchmark model of the decision tree cluster, and the benchmark model can be continuously updated and iterated in subsequent steps to obtain the final prediction model.

[0071] In an example, the label values ​​corresponding to the thermistor, transformer, liquid crystal driver, three-terminal regulator, power chip, and metering chip are 10, 12, 20, 40, 60, and 100, respectively, and the initial residual value can be determined to be an average of 40.3.

[0072] In one example, the baseline model is calculated as follows:

[0073]

[0074] in, Represents the target variable corresponding to the electric energy meter under each fault state.

[0075] Step S306, training the first decision tree based on the initial residual value and the random training data in the training set to obtain the trained first decision tree and the accumulated residual value of the first decision tree.

[0076] Specifically, the server can use the initial residual value as the actual target value, and through the training of the first decision tree, the difference between the current predicted value and the actual target value predicted by the first decision tree is continuously reduced until the training of the first decision tree is completed. It should be understood that the training end condition of the first decision tree can be that the loss value between the current predicted value and the actual target value is lower than the preset size, or the number of training times meets the number of predictions. In addition, when training each node in the first decision tree, the server can randomly select random training data of the same data structure in the training set and use it as the training data for each node. And in the process of training each node, random features can be randomly selected from the random training data as the features participating in the training. Through the random selection of the above two dimensions, the robustness of the initial decision tree can be improved.

[0077] In one example, the server can determine the cumulative residual value corresponding to the first decision tree based on the loss value of the trained initial decision tree, and the calculation formula is as follows:

[0078]

[0079] in, represents the accumulated residual value of the i-th sample in the training set in the m-th iteration, L represents the loss function, represents the target variable corresponding to the electric energy meter under each fault state, Represents the initial prediction value of the iterative decision tree.

[0080] Step S308, obtaining a new iterative decision tree, training the iterative decision tree according to the cumulative residual value and the random training data of the training set, obtaining a trained iterative decision tree, and an updated cumulative residual value corresponding to the iterative decision tree, returning to the step of obtaining a new iterative decision tree, until the number of training iterations meets the preset number or the decrease amplitude of the loss function of the iterative decision tree is lower than the preset value, and obtaining a trained decision tree cluster;

[0081] The random training data is part of the data randomly selected from the training set; when training the first decision tree and each node in the training iterative decision tree, each node is trained based on the random features in the random training data.

[0082] Specifically, after determining the initial decision tree, the server can start to iteratively generate an iterative decision tree. In each round of iteration, a new iterative decision tree can be created, and the new iterative decision tree is trained according to the cumulative residual value corresponding to the initial decision tree and the random training data in the training set to obtain a trained iterative decision tree. So far, the training of an iterative decision tree is completed. If the number of iterations does not meet the preset number of times or the decrease amplitude of the loss function of the iterative decision tree is higher than the preset value, the iteration continues. The server can create a new iterative decision tree, and train the new iterative decision tree based on the cumulative residual value corresponding to the previous iterative decision tree and the random training data in the training set until the number of iterations meets the preset number of times or the decrease amplitude of the loss function of the iterative decision tree is lower than the preset value, and the iteration is completed to obtain a decision tree cluster consisting of the initial decision tree and multiple iterative decision trees.

[0083] When training each node of each iterative decision tree, the server can randomly select random training data with the same data structure in the training set and use it as the training data for each node. In addition, during the training process of each node, random features can be randomly selected from the random training data as the features involved in the training. The random selection of the above two dimensions can improve the robustness of each iterative decision tree.

[0084] In this embodiment, the nodes in the initial decision tree and the iterative decision tree are trained respectively through random training data and random features in the training set, so that the robustness of each decision tree can be improved. In addition, each iterative decision tree is obtained by further iterative training based on the cumulative residual value of the online decision tree on the basis of the previous decision tree, and the error of the previous decision tree can be continuously fitted, so as to improve the accuracy of the initial prediction value of the subsequent iterative decision tree, thereby improving the prediction accuracy of the decision tree cluster.

[0085] In an exemplary embodiment, during the training of the iterative decision tree, a new weak learner (iterative decision tree) is trained in each round of iteration. The server can calculate the difference between the current predicted value and the actual target value. The calculation formula for the cumulative residual value of each iterative decision tree includes:

[0086]

[0087] in, represents the accumulated residual value of the i-th sample in the training set in the m-th iteration, L represents the loss function, represents the target variable corresponding to the electric energy meter under each fault state, Represents the initial prediction value of the iterative decision tree.

[0088] Optionally, after multiple iterations of training, the decision tree cluster continuously updates and iterates the benchmark model to obtain a final prediction model. The formula for the process of continuously updating and iterating the benchmark model is as follows:

[0089]

[0090] in, is the learning rate, which can be used to indicate the contribution of the iterative decision tree to the prediction model.

[0091] The goal of each iterative decision tree is to train a new decision tree Fitting the cumulative residual value, that is, reducing the overall deviation of the prediction model by learning the error structure of the data. After the training is completed, the output of the iterative decision tree will be scaled according to a certain learning rate and accumulated to the current prediction model to update the overall prediction value.

[0092] During the entire training process, by iteratively superimposing multiple iterative decision trees, the model gradually becomes more complex and the ability to fit the data is continuously improved. Each round of iteration improves on the existing model. When the prediction model reaches the predetermined maximum number of iterations or the decline of the loss function is lower than the set threshold, the training process terminates. Finally, the decision tree cluster outputs the result in the form of a weighted combination of multiple iterative decision trees. For example, after M iterations, the final prediction model can be expressed as:

[0093]

[0094] In this embodiment, by iteratively superimposing multiple iterative decision trees, the model is gradually made from simple to complex, and the ability to fit the data is continuously improved. Each round of iteration improves on the basis of the existing model, which can significantly improve the prediction performance of the prediction model.

[0095] In an exemplary embodiment, the specific implementation process of the step of "determining a training set based on broadband impedance training data" includes:

[0096] The broadband impedance training data is divided into a preset number of samples, and a sample is randomly determined as a test set, the remaining samples in the preset number of samples are determined as training sets, and the test set and the training set are determined as a group of sample sets; the steps are repeated to divide the broadband impedance training data into a preset number of samples, and a sample is randomly determined as a test set, and the remaining samples in the preset number of samples are determined as training sets, to obtain multiple groups of sample sets.

[0097] Specifically, the server can divide the broadband impedance training data into N samples, and determine one sample among the N samples as a test set, and the remaining N-1 samples as training sets. Repeat the above operation, each sample among the N samples can be used as a test set, and the remaining N samples can be determined as training sets, so that N groups of sample sets can be obtained. The test sets in the N groups of sample sets are different.

[0098] In an exemplary embodiment, after the step of "returning to the step of obtaining a new iterative decision tree until the number of training iterations meets the preset number or the decrease amplitude of the loss function of the iterative decision tree is lower than the preset value, and a trained decision tree cluster is obtained", the method further includes:

[0099] For each group of sample sets, based on the test set in the current sample set, the model evaluation score of the decision tree cluster corresponding to the current sample set is determined, and the decision tree cluster with the highest model evaluation score is determined as the trained decision tree cluster.

[0100] Specifically, the server can train the corresponding decision tree cluster for each group of sample sets through the above steps. That is, a group of sample sets can be trained to obtain a decision tree cluster, and N groups of sample sets correspond to N decision tree clusters respectively. For each group of sample sets, the server can obtain the test set of the current sample set, and test the decision tree cluster corresponding to the current sample set through the test set to obtain the prediction result, and determine the model evaluation score through the prediction result and the label value of the test set. The model evaluation score can be determined based on indicators such as accuracy and standard deviation. Based on this, the server can obtain the model evaluation scores corresponding to N decision tree clusters, and determine the decision tree cluster with the highest model evaluation score as the trained decision tree cluster. In the subsequent steps, the trained decision tree cluster can be used to perform fault detection on the electric energy meter to be predicted.

[0101] In this embodiment, by grouping the training set, multiple sample sets are obtained, and multiple decision tree clusters are obtained based on the sample sets for training. Finally, the model evaluation scores of the respective decision tree clusters are tested using the test sets in the sample sets, so as to determine that the decision tree cluster with the highest model evaluation score is the trained decision tree cluster, thereby improving the prediction efficiency and prediction accuracy of the decision tree cluster.

[0102] In an exemplary embodiment, the specific implementation process of the step of "combining the initial prediction values ​​to obtain the target prediction value of the electric energy meter to be detected, and determining whether the components included in the electric energy meter to be detected are faulty based on the target prediction value" includes:

[0103] Based on the decision tree weights of each decision tree in the decision tree cluster, the weighted sum of each initial prediction value is performed to obtain the target prediction value of the electric energy meter to be detected; according to the target prediction value and the preset value range when each component is damaged, the fault detection result of each component in the electric energy meter to be detected is determined.

[0104] Among them, the decision tree weight is determined based on the learning rate of each decision tree in the decision tree cluster;

[0105] Specifically, the server can determine the learning rate of each decision tree in the decision tree cluster during the training process as the decision tree weight, and perform weighted summation on the initial prediction values ​​of each decision tree according to the decision tree weight to obtain the target prediction value of the electric energy meter to be detected. The server can obtain the prediction value range of each component when the trained decision tree cluster is damaged. If the target prediction value is within the prediction value range when each component is damaged, the electric energy meter to be detected is determined to be faulty, and based on the prediction value range where the target prediction value is located, it is determined that the corresponding component in the electric energy meter to be detected is faulty.

[0106] In one example, the components may include a thermistor, a transformer, a liquid crystal driver, a three-terminal voltage regulator, a power chip, a metering chip, etc., and the above components correspond to the value range A, the value range B, the value range C, the value range D, the value range E, and the value range F, respectively. In addition, the value range of the electric energy meter without fault is E. If the target prediction value is in the value range A, it is determined that the thermistor of the electric energy meter to be detected is faulty; if the target prediction value is in the value range D, it is determined that the three-terminal voltage regulator of the electric energy meter to be detected is faulty; if the target prediction value is in the value range F, it is determined that the electric energy meter to be detected is faulty.

[0107] In this embodiment, the target prediction value is obtained by weighted summing the initial prediction values, and based on the preset value range of the target prediction value, it is possible to accurately determine whether the electric energy meter to be detected is faulty, and determine whether each component in the electric energy meter to be detected is faulty, thereby improving the accuracy of fault detection.

[0108] In an exemplary embodiment, the specific implementation process of the step of "obtaining broadband impedance data of the voltage port of the electric energy meter to be detected" includes:

[0109] Collect broadband impedance data of the input / output line voltage port of the electric energy meter to be tested; the input / output line voltage port includes the live-neutral port; the broadband impedance data includes the impedance amplitude and phase angle of the input / output line voltage port at different frequencies; the input / output line voltage port includes the port formed by the connection of the live terminal and the neutral terminal. The input / output line voltage port is one port.

[0110] Specifically, the broadband impedance data of the input / output line voltage port of the energy meter is collected. Impedance measurement is to apply AC voltage signals of different frequencies to the port of the energy meter through an impedance test instrument, and measure the current of the measured port, so as to obtain the amplitude and phase angle of the port impedance. The impedance amplitude reflects the impedance capacity of the internal circuit of the energy meter to the current, while the phase angle reveals the phase response of the internal components of the energy meter to the current and voltage. By scanning the test from the low frequency band to the high frequency band, the impedance spectrum distribution of the voltage port of the energy meter can be obtained, which represents the internal equivalent circuit of the energy meter at different frequency bands.

[0111] In an example, the broadband impedance data of an input / output line voltage port is shown in the following table:

[0112] Table 1 Broadband impedance data

[0113]

[0114] Among them, the first column is the frequency, the second column is the impedance amplitude corresponding to the port composed of terminal 1 and terminal 10, and the third column is the phase angle corresponding to the port composed of terminal 1 and terminal 10.

[0115] In this embodiment, the impedance data at different frequencies can be obtained by the impedance testing instrument, which can improve the accuracy and efficiency of obtaining the impedance data.

[0116] In an exemplary embodiment, the electric energy meter fault detection method based on voltage port impedance data further includes:

[0117] Based on the deletion strategy and / or the averaging strategy, the abnormal values ​​in the broadband impedance data are processed to obtain the processed broadband impedance data; based on the previous value filling strategy, the missing data in the broadband impedance data are processed to obtain the filled broadband impedance data, and the broadband impedance data is used to determine the characteristic data corresponding to the broadband impedance data.

[0118] Specifically, in order to solve the problem of missing values ​​that may occur during the collection process, the missing data can be filled by using the previous value filling method. The previous value filling can maintain the continuity of the data and prevent the missing values ​​from interfering with the subsequent decision tree cluster training. In addition, the server can use statistical methods to detect and process the outliers that may exist in the data, and can directly delete the outliers or use the average value to replace the outliers. After the data preprocessing is completed, the server can determine the characteristic data corresponding to the broadband impedance data, and divide the characteristic data into a training set and a test set through data partitioning, which are used for the subsequent training and performance evaluation of the decision tree cluster.

[0119] In this embodiment, the above steps can eliminate the influence of measurement errors, environmental noise or other accidental factors on the data, avoid erroneous features affecting the training accuracy of the model, convert the data to make it more suitable for the training of the decision tree cluster, and improve the prediction accuracy of the decision tree cluster.

[0120] like Figure 4 As shown, the specific implementation process of the above-mentioned electric energy meter fault detection method based on voltage port impedance data is described in detail below in combination with a specific embodiment, including the following steps:

[0121] Step 1: Collect broadband impedance characteristic data of the input / output line voltage port of the energy meter. Impedance measurement is to apply AC voltage signals of different frequencies to the port of the energy meter through an impedance test instrument, and measure the current of the measured port to obtain the amplitude and phase angle of the port impedance. The impedance amplitude indicates the impedance capacity of the internal circuit of the energy meter to the current, while the phase angle indicates the phase response of the internal components of the energy meter to the current and voltage. By scanning the test from low frequency band to high frequency band, the impedance spectrum distribution of the voltage port of the energy meter can be obtained, which indicates the internal equivalent circuit of the energy meter at different frequency bands.

[0122] Step 2: Preprocess the collected voltage port impedance data and divide it into training set and test set. In view of the missing value problem that may occur during the acquisition process, the previous value filling method is used to fill the missing data. This method can maintain the continuity of the data and avoid interference with subsequent model training due to the existence of missing values. In addition, in order to further improve the reliability of the data, statistical methods are used to detect and process possible outliers in the data. The purpose of this step is to eliminate the influence of measurement errors, environmental noise or other accidental factors on the data, avoid erroneous features affecting the training accuracy of the model, and convert the data to make it more suitable for model training and analysis. After the data preprocessing is completed, the data is divided into training set and test set, which are used for subsequent model training and performance evaluation respectively.

[0123] Step 3: Classification is performed by training multiple decision trees. Training data is randomly selected from the training set. At each node split, features are randomly selected for discrimination instead of evaluating all features. The final classification result is determined by voting on the prediction results of each tree.

[0124] The model starts with a simple initial prediction, usually the mean or median of the target variable in the training data. This initial prediction serves as the baseline model, representing the most basic fit to the data. The baseline model is:

[0125]

[0126] Then it enters the iteration process, and a new weak learner is trained in each iteration. In this stage, the model calculates the difference between the current predicted value and the actual target value (i.e., the residual). This residual represents the error of the current model and is the part of the model that needs to be further optimized. The residual calculation formula is:

[0127]

[0128] in, represents the residual of the i-th sample in the training set at the m-th iteration.

[0129] The goal of each weak learner is to train a new decision tree Fitting these residuals means reducing the overall deviation of the model by learning the error structure of the data. The weak learner attempts to capture the parts that the current model cannot explain, thereby correcting the deficiencies of the previous model. After training, the output of the weak learner will be scaled according to a certain learning rate and accumulated to the current model to update the overall prediction value. The role of the learning rate is to control the magnitude of each step of optimization, thereby balancing the learning speed and generalization ability of the model. The prediction value of the updated model is:

[0130]

[0131] in, is the learning rate, which controls the contribution of the new decision tree to the model.

[0132] like Figure 5 As shown in the figure, during the entire training process, the gradient boosting tree iteratively superimposes multiple weak learners to gradually make the model from simple to complex, and continuously improves the ability to fit the data. Each round of iteration improves on the basis of the existing model, and the training process of the gradient boosting tree is cumulative. By gradually fitting the errors of the data, this method can capture the complex nonlinear relationships in the data.

[0133] The training process terminates when the model reaches the predetermined maximum number of iterations or the loss function drops below the set threshold. Ultimately, the gradient boosting tree outputs the result as a weighted combination of a series of weak learners. Compared with a single decision tree, the gradient boosting tree can significantly improve the prediction performance of the model, while showing good performance in scenarios with small data sets and high-dimensional features. Through this efficient iterative optimization process, the gradient boosting tree becomes an integrated learning algorithm with high flexibility and generalization ability. After M iterations, the final model can be expressed as:

[0134]

[0135] Step 4: Use Leave-One-Out Cross-Validation (LOO-CV) to evaluate the performance of the gradient boosting tree fault diagnosis model, evaluate the performance of the model on each sample, and calculate the overall accuracy and standard deviation to obtain the most efficient model.

[0136] Specific process: There are N samples in total, one of them is selected as the test set each time, and the other N-1 samples are used as the training set.

[0137] Each iteration: In each iteration, N−1 samples are used to train the model, and the remaining sample is used for testing. This cycle is repeated N times to obtain N sets of samples.

[0138] Step 5: Use the most efficient model for fault diagnosis, input the processed impedance and phase angle characteristic data into the electric energy meter fault diagnosis model, obtain the electric energy meter components that may have faults as determined by the model, evaluate the final detection results, and obtain the performance status of the model. Figure 6 As shown in , it represents the relationship between the number of gradient boosting trees and the accuracy of model prediction. It can be seen that the more the number of gradient boosting trees, the higher the prediction accuracy of the model. As shown in Table 2, it represents the success rate of the model in fault identification of different components in the experiment.

[0139] Table 2 Success rate of identifying faulty components in electric energy meters

[0140]

[0141] This embodiment collects all possible states of the internal circuits and components of the electric energy meter during normal operation and failure from experimental research, historical maintenance records, fault reports, etc. In the same state, the characteristic data in this state is obtained by measuring the impedance and phase angle under the voltage port of the faulty electric energy meter. The collected data is first preprocessed to remove measurement error data and blank data to avoid introducing erroneous features. A gradient boosting tree classifier is constructed to predict the fault type based on an integrated learning algorithm based on an additive model and a step-by-step optimization strategy. The leave-one-out method is used to perform multiple cross-validations on the training set to evaluate the performance of the model on each sample, and the overall accuracy and standard deviation are calculated to ensure the feasibility of the model and output the predicted label and its true label of each test sample, and display the final evaluation indicators (accuracy, classification report and confusion matrix). The final prediction model is obtained from the evaluation indicators. The mutual correspondence between the fault mode and the impedance and phase angle under the voltage port in different states is realized, and the prediction is made through the measured voltage port impedance data. Using the gradient boosting tree classifier model, the fault problem of the electric energy meter can be judged efficiently and accurately. It can determine the internal operation status without destroying the integrity of the electricity meter, effectively reducing maintenance costs and reducing resource waste.

[0142] 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.

[0143] Based on the same inventive concept, the embodiment of the present application also provides an electric energy meter fault detection device based on voltage port impedance data for implementing the electric energy meter fault detection method based on voltage port impedance data involved above. 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 the embodiments of one or more electric energy meter fault detection devices based on voltage port impedance data provided below can refer to the limitations of the electric energy meter fault detection method above, and will not be repeated here.

[0144] In an exemplary embodiment, Figure 7 As shown, an electric energy meter fault detection device 700 based on voltage port impedance data is provided, comprising: a data determination module 701, a first prediction module 702 and a second prediction module 703, wherein:

[0145] The data determination module 701 is used to obtain broadband impedance data of the voltage port of the electric energy meter to be detected, and determine characteristic data corresponding to the broadband impedance data;

[0146] The first prediction module 702 is used to input feature data into each decision tree in the trained decision tree cluster to obtain an initial prediction value corresponding to each decision tree; the decision tree cluster includes a first decision tree and at least one iterative decision tree; the first decision tree is trained based on random training data determined in the broadband impedance training data of the electric energy meter of the same type as the electric energy meter to be detected; the iterative decision tree is trained based on the random training data and the cumulative residual value of the previous decision tree corresponding to the iterative decision tree; each decision tree in the decision tree cluster has a sequence when it is generated; the previous decision tree is a decision tree that precedes the iterative decision tree in sequence;

[0147] The second prediction module 703 is used to merge the initial prediction values ​​to obtain the target prediction value of the electric energy meter to be detected, and determine whether the components included in the electric energy meter to be detected are faulty based on the target prediction value.

[0148] Furthermore, the device also includes a decision tree cluster training module, which is used to: obtain broadband impedance training data of an electric energy meter of the same type as the electric energy meter to be detected, and determine a training set based on the broadband impedance training data; determine an initial residual value corresponding to the decision tree cluster based on the target variable of the electric energy meter in each fault state in the training set; the target variable is the label value of the electric energy meter in each fault state; train the first decision tree based on the initial residual value and the random training data in the training set to obtain a trained first decision tree and a cumulative residual value of the first decision tree; obtain a new iterative decision tree, train the iterative decision tree according to the cumulative residual value and the random training data in the training set to obtain a trained iterative decision tree and an updated cumulative residual value corresponding to the iterative decision tree, and return to the step of obtaining a new iterative decision tree until the number of training iterations meets the preset number or the decrease amplitude of the loss function of the iterative decision tree is lower than the preset value, and a trained decision tree cluster is obtained; wherein the random training data is part of the data randomly selected in the training set; when training each node in the first decision tree and the training iterative decision tree, each node is trained based on the random features in the random training data.

[0149] Furthermore, the calculation formula for the cumulative residual value of each iterative decision tree in the decision tree cluster training module includes:

[0150]

[0151] in, represents the accumulated residual value of the i-th sample in the training set in the m-th iteration, L represents the loss function, represents the target variable corresponding to the electric energy meter under each fault state, Represents the initial prediction value of the iterative decision tree.

[0152] Furthermore, the decision tree cluster training module is specifically used to: divide the broadband impedance training data into a preset number of samples, and randomly determine a sample as a test set, determine the remaining samples in the preset number of samples as training sets, and determine the test set and the training set as a group of sample sets; repeat the steps of dividing the broadband impedance training data into a preset number of samples, and randomly determine a sample as a test set, and determine the remaining samples in the preset number of samples as training sets, to obtain multiple groups of sample sets; for each group of sample sets, based on the test set in the current sample set, determine the model evaluation score of the decision tree cluster corresponding to the current sample set, and determine the decision tree cluster with the highest model evaluation score as the trained decision tree cluster.

[0153] Furthermore, the second prediction module 703 is specifically used to: based on the decision tree weights of each decision tree in the decision tree cluster, perform weighted summation of each initial prediction value to obtain a target prediction value of the electric energy meter to be detected; the decision tree weight is determined based on the learning rate of each decision tree in the decision tree cluster; and determine the fault detection result of each component in the electric energy meter to be detected according to the target prediction value and the preset value range when each component is damaged.

[0154] Furthermore, the data determination module 701 is specifically used to: collect broadband impedance data of the input / output line voltage port of the electric energy meter to be tested; the input / output line voltage port includes the live wire-neutral wire port; the broadband impedance data includes the impedance amplitude and phase angle of the input / output line voltage port at different frequencies.

[0155] Furthermore, the device also includes a data preprocessing module, which is specifically used to: process abnormal values ​​in the broadband impedance data based on a deletion strategy and / or an averaging strategy to obtain processed broadband impedance data; process missing data in the broadband impedance data based on a previous value filling strategy to obtain filled broadband impedance data, and the broadband impedance data is used to determine characteristic data corresponding to the broadband impedance data.

[0156] Each module in the above-mentioned electric energy meter fault detection device based on voltage port impedance data 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 a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0157] 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 8 As 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 broadband impedance data of the voltage port of the electric energy meter to be detected. 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, a method for detecting faults of an electric energy meter based on voltage port impedance data is implemented.

[0158] 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.

[0159] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0160] 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 steps in the above-mentioned method embodiments are implemented.

[0161] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0162] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods 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 this application can include at least one of non-volatile 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), magnetoresistive 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, etc., but are not limited to this.

[0163] 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 specification.

[0164] 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 faults in an electric energy meter, characterized in that: The method comprises: Acquire broadband impedance data of a voltage port of the electric energy meter to be detected, and determine characteristic data corresponding to the broadband impedance data; Input the characteristic data into each decision tree in the trained decision tree cluster to obtain the initial prediction value corresponding to each decision tree; the decision tree cluster includes a first decision tree and at least one iterative decision tree; the first decision tree is trained based on random training data determined in the broadband impedance training data of the electric energy meter of the same type as the electric energy meter to be detected; the iterative decision tree is trained based on the random training data and the cumulative residual value of the previous decision tree corresponding to the iterative decision tree; each decision tree in the decision tree cluster has a sequence when generated; the previous decision tree is a decision tree whose sequence is before the iterative decision tree; The initial prediction values ​​are combined to obtain a target prediction value of the electric energy meter to be detected, and based on the target prediction value, it is determined whether each component included in the electric energy meter to be detected is faulty.

2. The method according to claim 1, characterized in that The method further comprises: Acquire broadband impedance training data of an electric energy meter of the same type as the electric energy meter to be detected, and determine a training set based on the broadband impedance training data; Determining the initial residual value corresponding to the decision tree cluster based on the target variable of the electric energy meter in each fault state in the training set; the target variable is the label value of the electric energy meter in each fault state; Training a first decision tree based on the initial residual value and random training data in the training set to obtain a trained first decision tree and a cumulative residual value of the first decision tree; Obtain a new iterative decision tree, train the iterative decision tree according to the cumulative residual value and the random training data of the training set, obtain a trained iterative decision tree, and an updated cumulative residual value corresponding to the iterative decision tree, return to the step of obtaining a new iterative decision tree, until the number of training iterations meets the preset number or the decrease amplitude of the loss function of the iterative decision tree is lower than the preset value, and obtain a trained decision tree cluster; The random training data is part of the data randomly selected from the training set; when training the first decision tree and each node in the training iterative decision tree, each node is trained based on the random features in the random training data.

3. The method according to claim 2, characterized in that The calculation formula for the cumulative residual value of each iterative decision tree includes: in, represents the accumulated residual value of the i-th sample in the training set in the m-th iteration, L represents the loss function, represents the target variable corresponding to the electric energy meter under each fault state, Represents the initial prediction value of the iterative decision tree.

4. The method according to claim 2, characterized in that: The determining of the training set based on the broadband impedance training data comprises: Dividing the broadband impedance training data into a preset number of samples, and randomly determining a sample as a test set, determining the remaining samples in the preset number of samples as training sets, and determining the test set and the training set as a group of sample sets; Repeat the steps to divide the broadband impedance training data into a preset number of samples, and randomly determine a sample as a test set, and determine the remaining samples in the preset number of samples as training sets, to obtain multiple groups of sample sets; The step of returning to obtain a new iterative decision tree, until the number of training iterations meets the preset number or the decrease amplitude of the loss function of the iterative decision tree is lower than the preset value, after obtaining a trained decision tree cluster, the method further includes: For each group of sample sets, based on the test set in the current sample set, the model evaluation score of the decision tree cluster corresponding to the current sample set is determined, and the decision tree cluster with the highest model evaluation score is determined as the trained decision tree cluster.

5. The method according to claim 1, characterized in that The combining of the initial prediction values ​​to obtain a target prediction value of the electric energy meter to be detected, and determining whether each component included in the electric energy meter to be detected is faulty based on the target prediction value, includes: Based on the decision tree weights of each decision tree in the decision tree cluster, weighted summation of each of the initial prediction values ​​is performed to obtain a target prediction value of the electric energy meter to be detected; the decision tree weights are determined based on the learning rates of each decision tree in the decision tree cluster; The fault detection result of each component in the electric energy meter to be detected is determined according to the target prediction value and the preset value range when each component is damaged.

6. The method according to claim 1, characterized in that The step of obtaining broadband impedance data of a voltage port of the electric energy meter to be detected includes: Collect broadband impedance data of the input / output line voltage port of the electric energy meter to be tested; the input / output line voltage port includes a live wire-neutral wire port; the broadband impedance data includes impedance amplitude and phase angle of the input / output line voltage port at different frequencies.

7. The method according to claim 6, characterized in that The method further comprises: Based on a deletion strategy and / or an averaging strategy, processing the abnormal values ​​in the broadband impedance data to obtain processed broadband impedance data; The missing data in the broadband impedance data is processed based on the previous value filling strategy to obtain the filled broadband impedance data, and the broadband impedance data is used to determine the characteristic data corresponding to the broadband impedance data.

8. An electric energy meter fault detection device based on voltage port impedance data, characterized in that: The device comprises: A data determination module, used to obtain broadband impedance data of a voltage port of an electric energy meter to be detected, and determine characteristic data corresponding to the broadband impedance data; The first prediction module is used to input the feature data into each decision tree in the trained decision tree cluster to obtain the initial prediction value corresponding to each decision tree; the decision tree cluster includes a first decision tree and at least one iterative decision tree; the first decision tree is trained based on random training data determined in the broadband impedance training data of the electric energy meter of the same type as the electric energy meter to be detected; the iterative decision tree is trained based on the random training data and the cumulative residual value of the previous decision tree corresponding to the iterative decision tree; each decision tree in the decision tree cluster has a sequence when generated; the previous decision tree is a decision tree whose sequence is before the iterative decision tree; The second prediction module is used to merge the initial prediction values ​​to obtain a target prediction value of the electric energy meter to be detected, and determine whether each component included in the electric energy meter to be detected is faulty based on the target prediction value.

9. 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 7 are implemented.

10. 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 7 are implemented.

Citation Information

Cited By

  • Method and system for detecting loop impedance of electric energy meter based on port segmented sampling

    CN121090919A