Metering device anomaly identification method and device based on SVM-KNN fusion algorithm and medium

Through the SVM-KNN fusion algorithm, combined with the advantages of SVM and KNN, the problem of insufficient accuracy and efficiency in fault diagnosis of power metering devices is solved, efficient fault identification and real-time monitoring are achieved, and the stability and automated diagnosis capabilities of the power system are improved.

CN120493115APending Publication Date: 2025-08-15POWER SUPPLY SERVICE & MANAGEMENT CENT STATE GRID JIANGXI ELECTRIC POWER CO LTD +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510484967.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the prior art, a single SVM or KNN algorithm is difficult to take into account both accuracy and computing efficiency in the fault diagnosis of power metering devices, especially when facing complex fault data and uneven sample distribution, the diagnostic accuracy and robustness are insufficient.

Method used

The SVM-KNN fusion algorithm is adopted to construct the SVM-KNN fusion classification model through data preprocessing and feature extraction. SVM is used to classify clear regions, and KNN supplement the fuzzy regions. Combined with stacking or voting fusion strategies, the final fault classification rules are generated, and the model parameters are optimized through cross-validation and incremental update strategy.

Benefits of technology

It realizes accurate identification of metering device faults, improves the automation and intelligence capabilities of online monitoring, maintains long-term and stable fault detection performance, improves classification accuracy and real-time response capabilities, and reduces computing complexity and deployment costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120493115A_ABST
    Figure CN120493115A_ABST
Patent Text Reader

Abstract

The invention discloses a metering device anomaly identification method based on an SVM-KNN fusion algorithm, and discloses a device and a medium with the metering device anomaly identification method based on the SVM-KNN fusion algorithm, and the metering device anomaly identification method based on the SVM-KNN fusion algorithm makes full use of the advantages of two algorithms in different region sample classification. Therefore, accurate identification of faults is realized, and automatic and intelligent identification of fault types of various metering devices is realized. According to the method, noise interference is effectively reduced through a data preprocessing and feature extraction method, and the defects of SVM are supplemented by adopting KNN in a fuzzy region by using a fusion strategy, so that on-line monitoring automation and intelligence capabilities are improved on the premise of ensuring classification precision. And meanwhile, an incremental updating strategy and a cross validation method are utilized to ensure that the model can adapt to changes of different fault data, and long-term stable fault detection performance is kept.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power metering and online monitoring of metering devices, and in particular to a metering device abnormality identification method, device and medium based on a SVM-KNN fusion algorithm. Background Art

[0002] With the rapid development of smart grids and smart distribution networks, fault diagnosis and classification of power metering devices, as essential terminal equipment for data collection and metering, are crucial. Currently, a variety of fault classification methods based on machine learning and deep learning have been developed, including those based on CVAE-CNN, random forests, spatiotemporal convolutional neural networks, and other multi-classification machine learning models. However, each single algorithm has its own limitations: 1) Support Vector Machines (SVMs) have good generalization capabilities but are prone to errors when samples are located near the decision boundary; 2) K-Nearest Neighbors (KNNs) perform well in processing fuzzy boundary regions, but suffer from high computational complexity for high-dimensional data. Therefore, a single algorithm often struggles to balance accuracy and computational efficiency, and its diagnostic accuracy and robustness are insufficient when faced with complex characteristics and uneven sample distribution of metering device fault data. Therefore, a new method that fully integrates the advantages of both algorithms is urgently needed to improve the effectiveness of metering device fault classification and its real-time response capabilities. Summary of the Invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a method for identifying abnormalities in metering devices based on the SVM-KNN fusion algorithm, so as to fully utilize the advantages of the two algorithms in classifying samples in different regions, realize accurate identification of faults, and realize automatic and intelligent identification of various types of metering device faults. Through data preprocessing and feature extraction methods, noise interference is effectively reduced, and the fusion strategy is used to use KNN in the fuzzy area to supplement the shortcomings of SVM, thereby improving the automation and intelligence capabilities of online monitoring while ensuring classification accuracy. At the same time, the incremental update strategy and cross-validation method are used to ensure that the model can adapt to changes in different fault data and maintain long-term stable fault detection performance.

[0004] The present invention also proposes a device having the above-mentioned method for identifying abnormalities in a metering device based on the SVM-KNN fusion algorithm.

[0005] According to the first embodiment of the present invention, the method for identifying abnormalities in a metering device based on the SVM-KNN fusion algorithm is characterized by comprising the following steps:

[0006] Acquiring multidimensional operation data, and performing denoising and smoothing processing on the multidimensional operation data;

[0007] Extracting a multidimensional feature vector related to the metering device failure from the multidimensional operation data, wherein the feature includes features corresponding to metering anomaly, voltage anomaly, current anomaly, and meter clock deviation;

[0008] Construct an SVM-KNN fusion classification model, using the SVM algorithm to construct a preliminary classifier for preprocessed multidimensional operating data; use the KNN algorithm to classify fuzzy samples near the SVM decision boundary; integrate the SVM and KNN classification results through stacking or voting fusion strategies to generate the final fault classification rules;

[0009] The cross-validation method is used to optimize the SVM kernel function parameters and the K value of KNN, and the model parameters are dynamically adjusted through the incremental update strategy;

[0010] The trained fusion model is deployed to the monitoring system to analyze metering data in real time and trigger fault warnings.

[0011] The metering device anomaly identification method based on the SVM-KNN fusion algorithm according to an embodiment of the present invention has at least the following beneficial effects: This method fully leverages the advantages of both algorithms in classifying samples in different regions to achieve accurate fault identification and automated, intelligent identification of various metering device fault types. Data preprocessing and feature extraction methods effectively reduce noise interference, and a fusion strategy utilizes KNN to supplement the shortcomings of SVM in fuzzy regions, thereby improving the automated and intelligent capabilities of online monitoring while ensuring classification accuracy. Furthermore, an incremental update strategy and cross-validation methods are utilized to ensure that the model can adapt to changes in different fault data and maintain long-term stable fault detection performance.

[0012] According to some embodiments of the present invention, the data preprocessing includes moving average filtering and normalization processing.

[0013] According to some embodiments of the present invention, the multidimensional feature vector includes at least statistical features of total electricity consumption, peak electricity consumption, flat electricity consumption, valley electricity consumption, current, voltage, and meter clock deviation.

[0014] According to some embodiments of the present invention, in the SVM-KNN fusion classification model, the judgment condition for a fuzzy sample is: the distance between the sample and the SVM hyperplane is less than a preset threshold.

[0015] According to some embodiments of the present invention, the stacking fusion strategy includes inputting the classification results of SVM and KNN into a meta-classifier to generate a final classification result; the voting fusion strategy includes determining the final classification category through a majority voting mechanism.

[0016] According to some embodiments of the present invention, the fault type includes metering abnormality, voltage abnormality, current abnormality and meter time abnormality.

[0017] According to a second embodiment of the present invention, a device for identifying abnormality of a metering device is characterized by comprising:

[0018] Data acquisition module, used to obtain multi-dimensional operating data of power metering devices in real time;

[0019] A preprocessing module, configured to perform denoising and smoothing processing on the multidimensional operation data;

[0020] A feature extraction module, configured to extract a multidimensional feature vector related to the fault from the preprocessed multidimensional data;

[0021] Fusion classification module, including SVM classification unit, KNN classification unit and fusion strategy unit, used to generate fault classification rules;

[0022] The monitoring and early warning module is used to diagnose fault types in real time and trigger early warning signals.

[0023] According to some embodiments of the present invention, the fusion strategy unit is configured to dynamically select the KNN classification result according to the distance between the sample and the SVM hyperplane.

[0024] According to some embodiments of the present invention, the monitoring and early warning module further includes an incremental updating unit for dynamically optimizing model parameters according to newly added data.

[0025] According to a computer-readable storage medium of an embodiment of the third aspect of the present invention, the medium stores computer-executable instructions, and the computer-executable instructions are used to execute the above-mentioned metering device abnormality identification method based on the SVM-KNN fusion algorithm.

[0026] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments with reference to the accompanying drawings, in which:

[0028] Figure 1 Schematic diagram of the steps of a method for identifying abnormality of a metering device based on an SVM-KNN fusion algorithm according to an embodiment of the present invention;

[0029] Figure 2 Schematic diagram of the classification of fuzzy samples near the decision boundary by the SVM-KNN fusion algorithm in the method for identifying abnormality of a metering device based on the SVM-KNN fusion algorithm in an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention and are not to be construed as limiting the present invention.

[0031] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they cannot be understood as limitations on the present invention.

[0032] In the description of the present invention, "several" means one or more, "many" means more than two, "greater than," "less than," and "exceed" are understood to exclude the number itself, while "above," "below," and "within" are understood to include the number itself. The use of "first" and "second" in the description is solely for the purpose of distinguishing technical features and should not be construed as indicating or implying relative importance, implicitly specifying the number of the indicated technical features, or implicitly specifying the order of the indicated technical features.

[0033] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, and connecting should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0034] Example 1

[0035] In order to solve the problem that a single algorithm is prone to errors in the decision boundary, this application provides a method for identifying abnormalities in a metering device based on the SV M-KNN fusion algorithm, such as Figure 1 As shown, the method comprises at least the following steps:

[0036] Step S100: Acquire multi-dimensional operation data, and perform denoising and smoothing processing on the multi-dimensional operation data.

[0037] The original operating data of the electricity meter (including total electricity consumption, peak, flat and valley electricity consumption, current, voltage and the deviation between the meter clock and standard time) is collected from the power supply system, and the data is denoised and smoothed using moving average filtering, standardization and other methods to ensure the accuracy of subsequent feature extraction.

[0038] Step S200: extracting a multidimensional feature vector related to a metering device failure from the multidimensional operation data, wherein the feature vector includes features corresponding to metering anomaly, voltage anomaly, current anomaly, and meter clock deviation.

[0039] According to the actual manifestations of meter faults, key features closely related to the faults are extracted, and a multi-dimensional feature vector is constructed to provide a basis for subsequent classification.

[0040] Step S300: Construct an SVM-KNN fusion classification model, use the SVM algorithm to build a preliminary classifier for the preprocessed multi-dimensional operation data; use the KNN algorithm to classify fuzzy samples near the SVM decision boundary; integrate the classification results of SVM and KNN through stacking or voting fusion strategies to generate the final fault classification rules.

[0041] A preliminary classifier is constructed using SVM on the preprocessed and feature-extracted data, leveraging its generalization advantage for high-dimensional data. For fuzzy samples near the SVM decision boundary, the KNN algorithm is used to assist in classification, and the final category is determined by calculating the distance between samples. Fusion strategies such as stacking or voting are used to integrate the classification results of the two algorithms to form the final fault classification rules.

[0042] Step S400: Optimize the SVM kernel function parameters and the K value of KNN using a cross-validation method, and dynamically adjust the model parameters through an incremental update strategy.

[0043] 80% of the data is used for training, and the model parameters (such as SVM kernel function selection, K value setting, etc.) are adjusted and optimized using the cross-validation method; at the same time, the remaining data is used for model verification to ensure the stability and high accuracy of the fusion model on different data sets.

[0044] Step S500: deploy the trained fusion model to the monitoring system, analyze the metering data in real time and trigger fault warnings.

[0045] The trained SVM-KNN fusion model is deployed in the monitoring system to predict faults based on real-time meter data. When an anomaly is detected, the system automatically determines the fault type and triggers an early warning mechanism, providing data support for maintenance management.

[0046] Based on the above method, this application can achieve the following technical effects:

[0047] 1) High classification accuracy. Experimental results show that when using the stacking fusion method, the model's fault classification accuracy can reach 98.84%, significantly higher than the performance of a single SVM or KNN algorithm.

[0048] 2) Real-time online monitoring capabilities. Through the effective coordination of data preprocessing, feature extraction, and fusion strategies, the system achieves real-time detection and rapid response to meter faults while reducing computational complexity. 3) Improved system robustness and stability. Through cross-validation and incremental update strategies, the model can maintain long-term stable classification performance.

[0049] 3) Low-cost, automated diagnosis: Based on data collection on the power supply side, rapid diagnosis and identification within the system reduces system deployment and maintenance costs.

[0050] Example 2

[0051] Based on the description of the first embodiment above, and applied to the historical meter fault data of the power supply company, the specific and more detailed steps are as follows:

[0052] Step S100: Acquire multi-dimensional operation data, and perform denoising and smoothing processing on the multi-dimensional operation data.

[0053] Data from 1,440 faulty meters was collected. The fault categories were categorized into five types: normal, abnormal metering, abnormal voltage, abnormal current, and abnormal meter timing. To ensure data integrity and validity, the data was standardized before subsequent steps such as model building.

[0054] Step S200: extracting a multidimensional feature vector related to a metering device failure from the multidimensional operation data, wherein the feature vector includes features corresponding to metering anomaly, voltage anomaly, current anomaly, and meter clock deviation.

[0055] Seven types of data related to meter failures were selected: total electricity consumption, peak-period electricity consumption, off-peak electricity consumption, off-peak electricity consumption, current, voltage, and the difference between meter time and actual time. Total electricity consumption refers to the total active energy consumed by all electricity users, typically measured in kilowatt-hours. Peak electricity consumption refers to the total electricity used during peak electricity consumption periods of the day, typically between 10:00 AM and 3:00 PM and 6:00 PM and 9:00 PM. Off-peak electricity consumption refers to the total electricity used during normal electricity consumption periods (neither peak nor off-peak). Typically, off-peak periods fall between peak and off-peak periods, typically between 7:00 AM and 10:00 AM, 3:00 PM and 6:00 PM, and 9:00 PM and 11:00 PM. Off-peak electricity consumption refers to the total electricity used during periods of low grid load. Off-peak periods typically fall between 11:00 PM and 7:00 AM, when electricity demand is relatively low. User current refers to the current consumed by user-side devices in the power system. It is one of the basic forms of electrical energy transmission and conversion, reflecting the power requirements of user devices and the power supply status of the power grid. Different devices have different power and current requirements. Excessive current increases the load on the power grid, potentially leading to overload or unstable operation. It can also affect power supply quality, such as voltage fluctuations and frequency variations, and damage user devices. User voltage refers to the voltage value received by the user in the power system. It is a critical parameter in the power system that determines the normal operation of user devices and power safety. Meter time anomalies typically refer to significant deviations between the smart meter's clock and the standard time or the user's perceived time. Such anomalies can affect the calculation of electricity bills and time-of-use pricing strategies for electricity users.

[0056] Step S300: Construct an SVM-KNN fusion classification model, use the SVM algorithm to build a preliminary classifier for the preprocessed multi-dimensional operation data; use the KNN algorithm to classify fuzzy samples near the SVM decision boundary; integrate the classification results of SVM and KNN through stacking or voting fusion strategies to generate the final fault classification rules.

[0057] Given a data set {(x1,y1),(x2,y2),...,(x n ,y n )}, where x i is the sample feature vector of dimension d, y i∈{-1,1} is the class label of the sample, with positive samples being denoted as +1 and negative samples being denoted as -1. The KNN algorithm is a non-parametric statistical method used for supervised classification. Its principle is that for the original training sample set, the characteristic attributes and category of each sample are known. When a new set of characteristic attributes is input, each feature of the new data is compared with the corresponding features of the data in the sample data set. The algorithm finds the classification rule and determines the category to which the new sample belongs. Among them, the Euclidean distance is selected as the distance metric function between samples:

[0058]

[0059] The principle of support vector machine is to learn a hyperplane for category division. The hyperplane function form is:

[0060] w T x+b=0(2)

[0061] The parameter w is the normal vector of the hyperplane, b is the intercept, and the distance r from any point in the sample space to the hyperplane is:

[0062]

[0063] In the above formula, the denominator is the square root of the sum of the elements of the d-dimensional w vector. After normalizing w and b, the category classification prediction of the sample is based on the following equation:

[0064]

[0065] Reference Figure 2 In order to give full play to the respective advantages of KNN and SVM and make up for their disadvantages, the core idea of the SVM-KNN fusion algorithm is:

[0066] A flexible classification strategy is selected based on the characteristics of data samples at different locations. Specifically, for sample points close to the SVM hyperplane, SVM is used for classification; however, for sample points located in the fuzzy area of the decision boundary, where the SVM classifier cannot accurately distinguish them, KNN is used to classify the samples, improving overall model performance.

[0067] Step S400: Optimize the SVM kernel function parameters and the K value of KNN using a cross-validation method, and dynamically adjust the model parameters through an incremental update strategy.

[0068] 80% of the data was used for model training to construct an SVM classifier. A KNN algorithm was used for auxiliary classification of data near the decision boundary. A stacking fusion strategy was used to form the final fault classification rules. The remaining 20% of the data was used for testing and validation, and cross-validation was used to test the algorithm's generalization performance.

[0069] Step S500: deploy the trained fusion model to the monitoring system, analyze the metering data in real time and trigger fault warnings.

[0070] Through steps S100 to S400, we achieve high accuracy and reliability in metering device fault classification, effectively identifying a variety of common meter fault types and providing strong support for the stable operation of the power system and the maintenance and management of metering devices. The test results based on the training set, test set, and leave-out cross-validation set are shown in Tables 1 and 2.

[0071] Table 1 SVM-KNN model test results

[0072]

[0073] Table 2 Comparison results of various models

[0074]

[0075] Another embodiment of the present application provides a device for identifying abnormalities in a metering device, the device comprising:

[0076] Data acquisition module, used to obtain multi-dimensional operating data of power metering devices in real time;

[0077] A preprocessing module, configured to perform denoising and smoothing processing on the multidimensional operation data;

[0078] A feature extraction module, configured to extract a multidimensional feature vector related to the fault from the preprocessed multidimensional data;

[0079] Fusion classification module, including SVM classification unit, KNN classification unit and fusion strategy unit, used to generate fault classification rules;

[0080] The monitoring and early warning module is used to diagnose fault types in real time and trigger early warning signals.

[0081] Furthermore, the fusion strategy unit is configured to dynamically select a KNN classification result according to a distance between the sample and the SVM hyperplane.

[0082] According to some embodiments of the present invention, the monitoring and early warning module further includes an incremental updating unit for dynamically optimizing model parameters according to newly added data.

[0083] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0084] Those skilled in the art will appreciate that all or some of the steps and systems in the method disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those skilled in the art, the term computer storage media is included in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data) and is volatile and non-volatile, removable, and non-removable. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory, or other memory technology, CD-ROM, digital versatile disks (DVD), or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage, or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0085] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above implementation mode. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. A method for identifying abnormalities in a metering device based on the SVM-KNN fusion algorithm, characterized in that: The following steps are involved: Acquiring multidimensional operation data, and performing denoising and smoothing processing on the multidimensional operation data; Extracting a multidimensional feature vector related to the metering device failure from the multidimensional operation data, wherein the feature includes features corresponding to metering anomaly, voltage anomaly, current anomaly, and meter clock deviation; Construct an SVM-KNN fusion classification model, using the SVM algorithm to construct a preliminary classifier for preprocessed multidimensional operating data; use the KNN algorithm to classify fuzzy samples near the SVM decision boundary; integrate the SVM and KNN classification results through stacking or voting fusion strategies to generate the final fault classification rules; The cross-validation method is used to optimize the SVM kernel function parameters and the K value of KNN, and the model parameters are dynamically adjusted through the incremental update strategy; The trained fusion model is deployed to the monitoring system to analyze metering data in real time and trigger fault warnings.

2. The method according to claim 1, characterized in that The data preprocessing includes moving average filtering and normalization processing.

3. The method according to claim 1, characterized in that The multidimensional feature vector at least includes statistical features of total power consumption, peak power consumption, flat power consumption, valley power consumption, current, voltage and meter clock deviation.

4. The method according to claim 1, wherein In the SVM-KNN fusion classification model, the judgment condition for fuzzy samples is: the distance between the sample and the SVM hyperplane is less than a preset threshold.

5. The method according to claim 1, wherein The stacking fusion strategy includes inputting the classification results of SVM and KNN into a meta-classifier to generate a final classification result; the voting fusion strategy includes determining the final classification category through a majority voting mechanism.

6. The method according to claim 1, characterized in that The fault types include metering abnormality, voltage abnormality, current abnormality and meter time abnormality.

7. A device for identifying abnormalities in a metering device based on the method according to any one of claims 1 to 6, characterized in that: include: Data acquisition module, used to obtain multi-dimensional operating data of power metering devices in real time; A preprocessing module, configured to perform denoising and smoothing processing on the multidimensional operation data; A feature extraction module, configured to extract a multidimensional feature vector related to the fault from the preprocessed multidimensional data; Fusion classification module, including SVM classification unit, KNN classification unit and fusion strategy unit, used to generate fault classification rules; The monitoring and early warning module is used to diagnose fault types in real time and trigger early warning signals.

8. The device according to claim 7, characterized in that The fusion strategy unit is configured to dynamically select a KNN classification result based on the distance between the sample and the SVM hyperplane.

9. The device according to claim 7, characterized in that The monitoring and early warning module also includes an incremental update unit for dynamically optimizing model parameters according to newly added data.

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