Method and system for diagnosing communication fault of electric energy meter
By introducing communication quality and environmental erosion weights to optimize node segmentation in the GBDT algorithm, the problem of inaccurate fault diagnosis of power meter communication is solved, and more efficient fault type identification is achieved.
Patent Information
- Application Number
- CN202510766120.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-06-10
AI Technical Summary
The existing GBDT algorithm fails to effectively consider the communication quality differences in the power meter communication fault diagnosis, resulting in inaccurate diagnosis.
By introducing the communication quality inequality and communication environment inequality calculation weights, adjusting the node segmentation gain, optimizing the training process of the GBDT model, ensuring that the model better adapts to communication quality changes.
It improves the accuracy of fault diagnosis of power meter communication, enhances the training effect of the model, and makes the fault type identification more accurate.
Smart Images

Figure CN120281672A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly relates to a diagnosis method and system for communication faults of electric energy meters. Background Art
[0002] An electric energy meter is a metering device used to measure and record electric energy consumption, and is applied to scenarios such as households, industries, and commerce. It realizes functions such as power billing, energy consumption management, and power grid operation optimization through real-time monitoring of power consumption. As a key component of the electric energy meter, the communication module undertakes the core function of data transmission. The communication module uploads information such as the metering data and device status of the electric energy meter to the power management system through wired or wireless means, so as to realize functions such as remote meter reading, real-time monitoring, abnormal alarm, and load control.
[0003] There will be different types of communication faults during the use of electric energy meters. Quickly determining the fault type and resolving the fault are of great significance for ensuring data integrity and maintaining the reliability of the power system. Traditional fault diagnosis uses manual troubleshooting methods, which not only have low efficiency but also are prone to missing potential hazards. With the development of fault detection algorithms, using fault detection algorithms to detect communication faults of electric energy meters can not only improve efficiency but also improve the accuracy of detection. The working voltage, working current, working temperature, and communication signal strength of the communication module corresponding to different communication fault types are all different. The GBDT (Gradient Boosting Decision Tree) algorithm, whose full name is the gradient boosting decision tree algorithm, as a fault detection algorithm, can not only process multi-dimensional data but also has high accuracy for fault detection. Furthermore, it can adapt to the complex and changeable power grid environment, help operation and maintenance personnel accurately locate the root cause of the fault, and improve the maintenance efficiency.
[0004] The existing GBDT algorithm includes the following steps: constructing multiple decision trees according to the training set to complete the training of the GBDT model; inputting the data to be measured into the trained GBDT model, and adding up the results of the multiple decision trees as the final prediction result. Each fault type will output a probability, and the fault type with the largest probability is used as the fault type corresponding to the data. Among them, each decision tree is constructed through node splitting. By traversing each parameter and parameter value of the samples in any node as the splitting value, the node is split into a left child node and a right child node, and then the gain when splitting the node is calculated through the loss function, and the node is split with the parameter and parameter value corresponding to the maximum gain.
[0005] However, the communication quality of the electricity meter varies at different times, and when the communication quality is poor, the probability of the electricity meter having a communication failure is higher. The existing GBDT algorithm does not consider the difference in the communication quality of each sample when performing node splitting, which is prone to underfitting for samples with poor communication quality, resulting in inaccurate subsequent communication failure diagnosis. Summary of the Invention
[0006] The present invention provides a diagnostic method and system for the communication failure of an electricity meter, aiming to solve the technical problem of inaccurate communication failure diagnosis in the prior art.
[0007] A diagnostic method for the communication failure of an electricity meter according to the present invention includes the following steps: Obtain a training sample set, the training sample set includes samples without failures and different failure types, and each sample includes multiple parameters; Use the training sample set to train the GBDT model to obtain a trained GBDT model; Among them, the gain of node splitting is obtained by weighting the first derivative and the second derivative of the multi-cross entropy loss function using the weights of each sample; the weight of the sample without failure is a preset value; the weight of the failure sample is the product of the communication quality degradation degree and the communication environment degradation degree of the corresponding sample; the communication quality degradation degree is positively correlated with the similarity of the failure stage of the corresponding sample, and is positively correlated with the absolute value of the difference in the dispersion degree of each neighborhood corresponding to the corresponding sample and samples with the same failure type as it; the similarity of the failure stage is inversely correlated with the discrete difference degree of the corresponding sample and samples with the same failure type as it; the discrete difference degree is the absolute value of the difference in the dispersion degree of each parameter of the sample in its neighborhood and the adjacent domain; the adjacent domain is a sample sequence of a preset duration centered on the corresponding sample; the communication environment degradation degree is inversely correlated with the failure interval of the corresponding sample; the failure interval is the interval duration between the failure occurrence time of the corresponding sample and the previous failure occurrence time; Input the sample to be tested into the trained GBDT model, and output the probabilities of no failure and each failure type correspondingly, and take the failure situation corresponding to the maximum probability as the failure situation of the corresponding sample.
[0008] In the above solution, the weight of the sample is obtained according to the communication quality degradation degree and the communication environment degradation degree of the sample, and the calculation of the gain takes into account the weight of the sample during node splitting, making the node splitting more reasonable, the training effect of the GBDT model better, and thus the diagnosis of communication failure more accurate.
[0009] Preferably, the failure stage similarity between the th sample and the th sample of the same failure type is: ; In the formula, is the dispersion degree of the j-th parameter in the neighborhood corresponding to the th sample, is the dispersion degree of the j-th parameter in the th nearest neighbor domain corresponding to the th sample, is the dispersion degree of the j-th parameter in the neighborhood corresponding to the th sample, is the dispersion degree of the j-th parameter in the th nearest neighbor domain corresponding to the th sample, is the total number of parameters in the sample, is the exponential function with the natural constant as the base.
[0010] Preferably, the communication quality degradation of the th sample in any failure type is: ; In the formula, is the failure stage similarity between the th sample and the th sample in the same failure type, is the dispersion degree of the j-th parameter in the neighborhood corresponding to the th sample, is the dispersion degree of the j-th parameter in the neighborhood corresponding to the th sample, is the standard normalization function, is the total number of samples in the same failure type, is the total number of parameters in the sample.
[0011] In the above solution, the communication quality degradation of each sample is characterized by the absolute value of the difference between the failure stage similarity of the corresponding sample and the dispersion degree of two samples with the same failure type in the corresponding neighborhood, so that the two samples are compared at the same stage, and through the comparison of the dispersion degree of the samples in the corresponding neighborhood, the calculation result is more accurate.
[0012] Preferably, the communication environment degradation of the th sample in any failure type is: ; In the formula, is the failure interval of the th sample, is the standard deviation of the failure intervals of all failure samples, is the exponential function with the natural constant as the base.
[0013] In the above solution, the deterioration degree of the communication environment of the sample is characterized by the time between failures of the sample, which reflects the impact of the previous failure on the communication environment of the sample and can truly reflect the communication environment of the sample.
[0014] Preferably, the gain of node splitting is the difference between the sum of the weighted losses of the left child node and the right child node and the weighted loss of the parent node; where the weighted loss of any node is: ; In the formula, is the sample set corresponding to the node in the th sample weight, is substituting the th sample into the first derivative function of the multi-class cross-entropy loss function to obtain the value, is substituting the th sample into the second derivative function of the multi-class cross-entropy loss function to obtain the value, is the regularization parameter, .
[0015] In the above solution, by weighting both the first derivative function and the second derivative function of the multi-class cross-entropy loss function, considering the differences in the communication quality of each sample, the calculation result is more accurate.
[0016] Preferably, the probability of the sample to be tested corresponding to various fault conditions is inversely correlated with the absolute value of the difference between the predicted value and the actual value of the corresponding sample; The sample to be tested corresponding to the th fault condition is: ; In the formula, is the predicted value of the sample to be tested , is the actual value of the th fault condition, is the exponential function with the natural constant as the base, is the normalized exponential function.
[0017] In the above solution, by comparing the predicted value of the sample to be tested and the actual values of various fault conditions, using the function, the probability of the corresponding sample corresponding to various fault conditions is obtained, and the calculation is simple and easy to understand.
[0018] Preferably, the fault types include signal interruption, protocol error, data verification failure, configuration error, hardware failure, and verification failure.
[0019] Preferably, the parameters include the working voltage, working current, working temperature, and communication signal strength of the communication module.
[0020] The present invention also provides a diagnostic system for power meter communication faults, including a memory and a processor. The processor executes the computer program stored in the memory to implement the diagnostic method for power meter communication faults described in any one of the above.
[0021] The beneficial effects are as follows: The solution of the present invention introduces the weights of each sample according to the communication quality differences of each sample, and uses the weights of the samples to calculate the gain during node splitting, making the node splitting more reasonable. Furthermore, the training effect of the GBDT model is better, and the accuracy of fault diagnosis is also higher. And the weights of the samples are obtained from the communication quality deterioration degree and communication environment deterioration degree of the samples, which can comprehensively reflect the impact of communication quality on the samples and make the calculation results more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a flowchart of the steps of the diagnostic method for power meter communication faults according to an embodiment of the present invention; Figure 2 is a structural block diagram of the diagnostic system for power meter communication faults according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present invention and should not be construed as limiting the present invention.
[0024] As Figure 1 shown, according to the first aspect of the present invention, a diagnostic method for power meter communication faults is provided, including the following steps: S1. Obtain a training sample set, where the training sample set includes samples without faults and different fault types, and each sample includes multiple parameters.
[0025] In this step, the purpose of obtaining the training sample set is to train the GBDT model, and then use the trained GBDT model to diagnose the communication faults of the electricity meter. In order to enable the GBDT model to accurately identify the fault conditions of no-fault and various fault types, the training sample set should include no-fault samples and samples of various different fault types. Among them, the fault types include signal interruption, protocol error, data verification failure, configuration error, hardware fault, and checksum failure. Therefore, the present invention altogether includes 7 fault conditions of no-fault and various fault types. For each fault condition, 500 samples can be set, and of course, other numbers of samples can also be set according to needs.
[0026] When performing fault diagnosis, the parameters of the samples have different effects on different fault conditions. Therefore, the fault conditions can be diagnosed according to the parameters of the samples. The parameters of the samples include the working voltage, working current, working temperature, and communication signal strength of the communication module. This is because the abnormal working voltage of the communication module will cause the internal circuit of the electricity meter to work unstably, thereby affecting the performance of the communication module. Excessive or violently fluctuating working current of the communication module will generate electromagnetic interference and affect the quality of communication signal transmission. Too high working temperature of the communication module will cause the performance of electronic components in the communication module to decline, resulting in poor communication stability. And the communication signal strength is the communication signal strength between the electricity meter and the concentrator, which directly reflects the quality of the communication link. Therefore, when obtaining samples, it is necessary to collect these parameters.
[0027] In the present invention, the working voltage, working current, working temperature, and communication signal strength of the communication module in the electricity meter are respectively collected by using the built-in voltage sensor, current sensor, temperature sensor, and signal detection circuit of the electricity meter. The collection frequency can be 1 time per second, and of course, other collection frequencies can also be set according to needs.
[0028] When the present invention applies the GBDT algorithm to diagnose communication faults, it is dealing with a multi-classification task. Therefore, different labels need to be set for no-fault and various fault types to distinguish no-fault and various fault types. The present invention uses target encoding to set labels for no-fault and various fault types. Target encoding can reflect the relationship between each parameter and each fault condition and can handle multi-classification tasks. The target encoding of each fault condition is the sum of the means of the normalized values of each parameter of all samples in the corresponding fault condition. In the present invention, the target encoding of any fault condition is the sum of the means of the normalized values of the working voltage, working current, working temperature, and communication signal strength respectively in all samples of the corresponding fault condition.
[0029] S2. Use the training sample set to train the GBDT model to obtain a trained GBDT model.
[0030] It should be noted that the GBDT (Gradient Boosting Decision Tree) algorithm, whose full name is the Gradient Boosting Decision Tree algorithm, belongs to the prior art. By constructing multiple decision trees and adding up the results of multiple decision trees as the final prediction result, it can improve the accuracy of prediction. Each decision tree is constructed through node splitting. Specifically, when splitting a node, each parameter of the samples in the corresponding node is traversed as the splitting value, and the node is split into a left child node and a right child node. Then, the gain at the time of splitting the node is calculated through the multi-class cross-entropy loss function, and the node is split with the parameter and splitting value corresponding to the maximum gain.
[0031] However, due to situations such as unstable signal transmission and network environment fluctuations, the communication quality of the electricity meter varies at different times. When the communication quality is poor, the probability of the electricity meter having a communication failure is higher. In the prior art, when the GBDT algorithm performs node splitting, it does not consider the differences in the communication quality of different samples. That is, when calculating the gain, the weights of all samples are the same, which is likely to underfit the samples with poor communication quality, resulting in a poor training effect of the GBDT model and further affecting the accuracy of communication failure diagnosis. In view of the problems existing in the prior art, the present invention proposes an improvement to the GBDT algorithm, taking into account the differences in the communication quality of different samples. Therefore, in step S2, constructing a decision tree includes the following steps: S21. Calculate the weights of each sample.
[0032] Among them, the weight of a non-fault sample is a preset value. For example, the preset value is 0.5. The weight of a fault sample is the product of the communication quality deterioration degree and the communication environment deterioration degree of the corresponding sample. Among them, the communication quality deterioration degree represents the severity of the communication quality of the corresponding sample. The greater the communication quality deterioration degree, the worse the communication quality. The communication environment deterioration degree represents the severity of the communication environment at the moment corresponding to the sample. The greater the communication environment deterioration degree, the worse the communication quality. And the worse the communication quality, the higher the sensitivity of the sample to faults. A slight change in the sample may represent a communication failure. Therefore, when calculating the weights of each fault sample, it is necessary to obtain the communication quality deterioration degree and the communication environment deterioration degree of each fault sample. Step S21 also includes the following steps: S211. Obtain the communication quality deterioration degree of each fault sample.
[0033] The communication quality deterioration degree is positively correlated with the similarity of the fault stage of the corresponding sample and positively correlated with the absolute value of the difference in the dispersion degree of the neighborhoods corresponding to each sample with the same fault type as the corresponding sample. The neighborhood is a sample sequence with a preset time length centered on the corresponding sample. For example, the preset time length is the length of 11 acquisition moments. The corresponding sample is in the center, with 5 acquisition moments before and after it respectively, and its corresponding neighborhood is the sample sequence corresponding to 11 acquisition moments.
[0034] Among them, the similarity of the fault stage characterizes the similarity degree between the corresponding sample and the samples with the same fault type. This is because from the start of the communication fault until the communication fault is resolved, it will last for a certain period of time. For example, it includes the stage from normal communication to the gradual emergence of communication faults and the stage from communication faults to the gradual recovery to normal. There are differences between the two stages. Only by comparing two samples in the same fault type and the same stage is meaningful. And the higher the similarity of the fault stage of the sample, the greater the impact on the deterioration of communication quality, that is, the two are positively correlated.
[0035] Moreover, the greater the absolute value of the difference in the dispersion degree of the neighborhoods corresponding to the corresponding sample and each sample with the same fault type, the greater the dispersion degree of the sample in the corresponding neighborhood, which indicates that the deterioration of communication quality is also greater, and the two are also positively correlated.
[0036] Therefore, in order to obtain the deterioration degree of communication quality of each sample, the following steps are also included: First, calculate the similarity of the fault stage of each sample.
[0037] The similarity of the fault stage is inversely correlated with the discrete difference degree between the corresponding sample and the samples with the same fault type. The discrete difference degree is the absolute value of the difference in the dispersion degree of each parameter of the sample in its neighborhood and the adjacent domain. The adjacent domain is a sample sequence located on both the front and back sides of the neighborhood and of the same length as the neighborhood. That is, there is one adjacent domain on each of the front and back sides of the neighborhood, a total of two.
[0038] The greater the discrete difference degree between the corresponding sample and the samples with the same fault type, the greater the difference degree between the two, then the smaller the possibility that the two samples are in the same stage, that is, the discrete difference degree between the two samples is inversely correlated with the similarity of the fault stage.
[0039] In one embodiment, the similarity of the fault stage between the th sample and the th sample in the same fault type is: ; In the formula, is the dispersion degree of the jth parameter in the neighborhood corresponding to the th sample, is the dispersion degree of the jth parameter in the th adjacent domain corresponding to the th sample, is the dispersion degree of the jth parameter in the neighborhood corresponding to the th sample, is the dispersion degree of the jth parameter in the th adjacent domain corresponding to the The degree of dispersion in the adjacent domain is the total number of parameters in the sample is the exponential function with the base of the natural constant e
[0040] In this step, by calculating the difference between the degree of dispersion of the corresponding sample and the samples with the same fault type in the corresponding adjacent domain and similar domain, the discrete difference degree between the two samples is obtained, and the similarity of the fault stages of the samples is reflected by the discrete difference degree. Since the adjacent domain and similar domain are introduced, and the similarity of the fault stages of the samples is reflected by comparing the sample sequences, the calculation result is more accurate, and the influence caused by accidental errors can also be avoided.
[0041] Then, the communication quality degradation of each sample is obtained.
[0042] Then, the communication quality degradation of the th sample in any fault type is ; where is the similarity of the fault stages between the th sample and the th sample in the same fault type is the degree of dispersion of the jth parameter in the adjacent domain corresponding to the th sample is the degree of dispersion of the jth parameter in the adjacent domain corresponding to the th sample is the standard normalization function is the total number of samples in the same fault type is the total number of parameters in the sample
[0043] In step S211, the communication quality degradation of each sample is characterized by the absolute value of the difference between the similarity of the fault stages of the corresponding sample and the degree of dispersion of the two samples with the same fault type in the corresponding adjacent domain, making the two samples comparable, and the calculation result is more accurate by comparing the degree of dispersion of the samples in the corresponding adjacent domain.
[0044] The communication quality degradation of each sample obtained in step S211 can only reflect the communication quality at the moment when the sample is located, but cannot reflect the communication environment situation after the communication module eliminates the fault. Therefore, it is also necessary to obtain the communication environment degradation of each sample.
[0045] S212. Obtain the communication environment degradation of each sample.
[0046] The communication environment deterioration is inversely correlated with the mean time between failures (MTBF) of the corresponding samples. The MTBF is the time interval between the occurrence time of a failure of the corresponding sample and the occurrence time of the previous failure. This is because the shorter the time interval between the current sample time and the previous failure time, the higher the probability that the communication environment has not fully recovered, and thus the higher the communication environment deterioration.
[0047] In one embodiment, the communication environment deterioration of the th sample in any failure type is: ; In the formula, is the MTBF of the th sample, is the standard deviation of the MTBF of all failed samples, is the exponential function with the natural constant as the base.
[0048] In the formula of this embodiment, as the denominator serves to standardize the MTBF so that the range of the calculated values is more reasonable. And taking the square of the fraction makes the curve formed by the calculated values smoother.
[0049] In step S211, the communication environment deterioration of the sample is characterized by the MTBF of the sample, which reflects the impact of the previous failure on the communication environment of the sample and can truly reflect the communication environment of the sample.
[0050] S213. Obtain the weights of the failed samples.
[0051] The weight of a failed sample is the product of the communication quality deterioration and the communication environment deterioration of the corresponding sample. This is because the greater the communication quality deterioration and the communication environment deterioration of the sample, the worse the communication quality, and the higher the sensitivity of the sample to failures. A slight change in the sample may also indicate a communication failure. Therefore, a larger weight should be assigned to the sample.
[0052] Then the weight of the th sample in any failure type is: In the formula, is the communication quality deterioration of the th sample in any failure type, is the communication environment deterioration of the th sample in any failure type.
[0053] In step S213, the weight of a sample is jointly characterized by the communication quality degradation and communication environment degradation of the sample, which can reflect the communication quality at the moment when the sample is located and the impact of the previous fault on the communication environment of the sample. Therefore, it can comprehensively reflect the impact of communication quality on the sample, making the calculation result more accurate.
[0054] In the prior art, when a node is split, the parent node is split into a left child node and a right child node by a split value. The gain of node splitting is the difference between the sum of the losses of the left child node and the right child node and the loss of the parent node. When calculating the gain of node splitting in the present invention, considering the differences in the communication quality of each sample, the weight of the sample is introduced to correct the gain of node splitting in the prior art.
[0055] S22. Traverse each parameter and parameter value of the samples in any node as the split value for node splitting, and use the weights of the samples to weight the first-order derivative and second-order derivative of the multi-class cross-entropy loss function to obtain the gain of node splitting.
[0056] The gain of node splitting corresponding to any node splitting method is the difference between the sum of the weighted losses of the left child node and the right child node and the weighted loss of the parent node. Among them, the weighted loss of any node is: ; In the formula, is the sample set corresponding to the node in the th sample weight, is substituting the th sample into the first-order derivative function of the multi-class cross-entropy loss function to obtain the value, is substituting the th sample into the second-order derivative function of the multi-class cross-entropy loss function to obtain the value, is the regularization parameter, . Preferably, is 0.1. Among them, the first-order derivative function is the first-order derivative of the multi-class cross-entropy loss function with respect to the predicted probability of the corresponding sample, and the second-order derivative function is the second-order derivative of the multi-class cross-entropy loss function with respect to the predicted probability of the corresponding sample.
[0057] In step S22, when calculating the gain of node splitting, considering the differences in the communication quality of each sample, the weight of the sample is introduced. Therefore, the weighted loss of the left child node, the weighted loss of the right child node, and the weighted loss of the parent node can be obtained, and finally the gain of node splitting is obtained, making the calculation result more accurate and thus making the node splitting more reasonable.
[0058] S23. Use the parameters and splitting value of the sample with the largest gain divided by each node to perform node splitting, and iterate continuously to complete the construction of the decision tree. The maximum tree depth of each decision tree is set to 12 layers. Of course, other maximum tree depths can also be set as needed.
[0059] Steps S21 to S23 only illustrate the construction process of one decision tree. The construction processes of other decision trees are similar, except that the training sample set of the latter decision tree is the residual of the training sample set of the previous decision tree. Among them, the residual is the difference between the true value and the predicted value of the sample.
[0060] The present invention can also set a validation sample set to evaluate the performance of the GBDT model during GBDT model training, adjust the parameters of the GBDT model, and prevent overfitting of the GBDT model. Thus, a trained GBDT model is obtained.
[0061] S3. Input the sample to be tested into the trained GBDT model, and correspondingly output the probabilities of no fault and various fault types, and use the fault situation corresponding to the maximum probability as the fault situation of the corresponding sample.
[0062] The probability of the sample to be tested corresponding to various fault situations is inversely correlated with the absolute value of the difference between the predicted value and the actual value of the corresponding sample.
[0063] Sample to be tested Corresponding to the th fault situation probability is: In the formula, is the predicted value of the sample to be tested , is the true value of the th fault situation, is the exponential function with the natural constant as the base,
[0064] is the normalized exponential function. The probability of the sample to be measured corresponding to each fault condition can be calculated, and the sum of the probabilities of all fault conditions is 1. For example, when the sample to be measured is input into the GBDT model, the probabilities of no fault, signal interruption, protocol error, data verification failure, configuration error, hardware failure, and verification failure are 0.05, 0.3, 0.2, 0.1, 0.1, 0.2, and 0.05 respectively. Then, the fault condition of this sample to be measured is considered as signal interruption.
[0065] In step S3, the absolute value of the difference between the predicted value of the sample to be measured and the actual value of the fault condition is used to reflect the probability of the sample to be measured corresponding to each fault condition. The fault condition corresponding to the maximum probability is used as the fault condition of the corresponding sample, which is simple to calculate and easy to understand.
[0066] In the diagnostic method for the communication fault of the electric energy meter according to the present invention, by calculating the communication quality degradation and the communication environment degradation, the weights of each sample are obtained, and then the gain of node splitting is calculated by using the weights of each sample. Since the difference in communication quality is considered, the calculation result is more accurate, and thus the node splitting is more reasonable, the construction of the decision tree is more reasonable, and the training effect of the GBDT model is also better. Furthermore, the diagnosis of the communication fault is more accurate.
[0067] As Figure 2 shown, according to the second aspect of the present invention, a diagnostic system for the communication fault of the electric energy meter is further provided. The system includes a memory and a processor. The processor executes the computer program stored in the memory to implement the diagnostic method for the communication fault of the electric energy meter according to the first aspect of the present invention.
[0068] The system further includes a communication bus, a communication interface, and other components well known to those skilled in the art. Their settings and functions are known in the art, so they will not be described in detail here.
[0069] In the present invention, the aforementioned memory may be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, the computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as, resistive random access memory (RRAM), dynamic random access memory (DRAM), static random-access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), etc., or any other medium that can be used to store the required information and can be accessed by an application, module, or both. Any such computer storage medium may be part of the device or accessible or connectable to the device. Any application or module described in the present invention may be implemented by computer-readable / executable instructions stored or otherwise maintained by such a computer-readable medium.
[0070] Although this specification has shown and described several embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many changes, variations, and alternative approaches will occur to those skilled in the art without departing from the spirit and scope of the present invention. It should be understood that various alternatives to the embodiments of the present invention described herein may be employed in practicing the present invention.
Claims
1. A diagnostic method for communication faults of an electricity meter, characterized in that, It includes the following steps: Obtain a training sample set, which includes samples of no fault and different fault types, and each sample includes multiple parameters; Use the training sample set to train the GBDT model to obtain a trained GBDT model; Among them, the gain of node splitting is obtained by weighting the first-order derivative and the second-order derivative of the multi-class cross-entropy loss function using the weights of each sample; the weight of the no-fault sample is a preset value; the weight of the fault sample is the product of the communication quality degradation and the communication environment degradation of the corresponding sample; the communication quality degradation is positively correlated with the similarity of the fault stage of the corresponding sample, and positively correlated with the absolute value of the difference in the dispersion degree of the neighborhoods corresponding to each sample with the same fault type as the corresponding sample; the similarity of the fault stage is inversely correlated with the discrete difference degree of the corresponding sample and the samples with the same fault type as it; the discrete difference degree is the absolute value of the difference in the dispersion degree of each parameter of the sample in its neighborhood and the adjacent domain; the adjacent domain is a sample sequence located on the front and back sides of the neighborhood and of the same length as the neighborhood; the neighborhood is a sample sequence with a preset time length centered on the corresponding sample; the communication environment degradation is inversely correlated with the fault interval of the corresponding sample; the fault interval is the time interval between the fault occurrence time of the corresponding sample and the previous fault occurrence time; Input the sample to be measured into the trained GBDT model, and correspondingly output the probabilities of no fault and each fault type, and use the fault situation corresponding to the maximum probability as the fault situation of the corresponding sample.
2. The diagnostic method for communication faults of an electric energy meter according to claim 1, wherein The similarity of the fault stages between the -th sample and the -th sample in the same fault type is : ; In the formula, is the degree of dispersion of the j-th parameter in the neighborhood corresponding to the -th sample, is the degree of dispersion of the j-th parameter in the -th closest neighborhood corresponding to the -th sample, is the degree of dispersion of the j-th parameter in the neighborhood corresponding to the -th sample, is the degree of dispersion of the j-th parameter in the -th closest neighborhood corresponding to the -th sample, is the total number of parameters in the sample, is the exponential function with the natural constant as the base.
3. The diagnostic method for communication faults of an electric energy meter according to claim 1, characterized in that The communication quality deterioration of the th sample in any failure type is as follows: ; Wherein, is the similarity of the fault stages between the -th sample and the -th sample in the same fault type, is the degree of dispersion of the j-th parameter in the neighborhood corresponding to the -th sample, is the degree of dispersion of the j-th parameter in the neighborhood corresponding to the -th sample, is the standard normalization function, is the total number of samples in the same fault type, is the total number of parameters in the samples.
4. The diagnostic method for communication faults of an electric energy meter according to claim 1, characterized in that The communication environment deterioration degree of the th sample in any failure type is: ; Wherein, is the failure interval of the th sample, is the standard deviation of the failure intervals of all failed samples, is the exponential function with the natural constant as the base.
5. The diagnostic method for communication faults of an electric energy meter according to claim 1, characterized in that, The gain of node splitting is the difference between the sum of the weighted losses of the left child node and the right child node and the weighted loss of the parent node; where the weighted loss of any node is as follows: ; In the formula, is the sample set corresponding to the node in the -th sample weight, is the value obtained by substituting the -th sample into the first derivative function of the multi-class cross-entropy loss function, is the value obtained by substituting the -th sample into the second derivative function of the multi-class cross-entropy loss function, is the regularization parameter, .
6. The diagnostic method for communication faults of an electric energy meter according to claim 1, characterized in that The probability of the sample to be measured corresponding to various fault situations is inversely correlated with the absolute value of the difference between the predicted value and the actual value of the corresponding sample; Sample to be measured Corresponding to the probability of the kinds of fault conditions is: ; In the formula, is the predicted value of the sample to be measured, and is the true value of the th fault condition. is the exponential function with the natural constant as the base, and is the normalized exponential function.
7. The diagnostic method for communication faults of an electric energy meter according to claim 1, characterized in that The fault types include signal interruption, protocol error, data verification failure, configuration error, hardware failure, and verification failure.
8. The diagnostic method for communication faults of an electric energy meter according to claim 1, wherein, The parameters include the working voltage, working current, working temperature, and communication signal strength of the communication module.
9. A diagnostic system for communication faults of an electric energy meter, comprising a memory and a processor, characterized in that, The processor executes the computer program stored in the memory to implement the diagnostic method for power meter communication faults as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Electric power metering equipment fault risk prediction method based on GBDT
CN109492783A
Fault diagnosis method and fault diagnosis device for power system
CN117171710A
Power cable fault detection method
CN119535106A