An abnormal power load identification and alarm method and system based on waveform analysis of an electric energy meter
By constructing a three-channel waveform input tensor based on electricity meter waveform analysis and combining it with a multi-scale convolutional network and Triplet Loss metric learning, the accuracy and robustness issues of abnormal power load identification in existing technologies are solved, achieving high-precision identification and reliable alarm in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-23
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies struggle to accurately and reliably identify abnormal electrical loads, especially loads with highly similar waveform characteristics, in complex and dynamic power environments, resulting in high false alarm rates and poor robustness.
A method based on electricity meter waveform analysis is adopted. A three-channel waveform input tensor is constructed by Park transform and instantaneous power calculation. Combined with multi-scale one-dimensional convolutional network and Triplet Loss metric learning, a load identification model is trained using the Hard Example Mining strategy, and a confusing shrinkage adaptive distance threshold is introduced for online judgment.
It achieves accurate identification of abnormal power loads under various interference conditions, reduces the risk of misjudgment, improves identification accuracy and model generalization performance, and enhances the practicality and robustness of the system.
Smart Images

Figure CN122430639A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of non-intrusive load fault monitoring technology, and in particular to a method and system for identifying and alarming abnormal power loads based on waveform analysis of electricity meters. Background Technology
[0002] In residential, commercial, and industrial electricity use scenarios, the use of abnormal electrical loads (such as electric stoves, immersion heaters, and other high-power, unauthorized appliances) is one of the main causes of electrical fires, circuit overloads, and other safety accidents. Therefore, accurately and promptly identifying and alerting to abnormal electrical loads is crucial for ensuring electrical safety.
[0003] Currently, most mainstream abnormal power load identification technologies rely on steady-state parameters collected by electricity meters, such as RMS current, active power, and power factor, and make judgments by setting thresholds or simple pattern matching. However, these methods have significant shortcomings. For example, many modern electrical appliances (such as switching power supplies and frequency converters) have complex nonlinear characteristics, resulting in severe distortion of their current waveforms. While their steady-state parameters may be similar, their waveform characteristics differ significantly, making it difficult for traditional methods to distinguish between abnormal and compliant loads. Furthermore, under conditions of rapid load switching, grid voltage fluctuations, or the presence of harmonic interference, steady-state parameters are prone to drastic changes, increasing the false alarm rate and reducing robustness of fixed-threshold-based identification methods. Existing technologies cannot fully meet the demand for high-precision, high-reliability real-time identification of abnormal power loads in complex and dynamic real-world power environments. Therefore, there is an urgent need for a method that can deeply mine the profound characteristics of load current waveforms and achieve accurate and stable identification under various interference conditions to improve the intelligence level of power safety early warning. Summary of the Invention
[0004] To address the aforementioned technical shortcomings, the purpose of this invention is to propose an alarm method for identifying abnormal electrical loads based on waveform analysis of electricity meters. This method aims to solve the technical problem that existing direct classification models cannot reliably identify easily confused load faults when dealing with abnormal electrical loads with highly similar waveform characteristics.
[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: The present invention provides a method for identifying and alarming abnormal power loads based on waveform analysis of electricity meters.
[0006] The method for identifying and alarming abnormal power loads based on electricity meter waveform analysis includes: Step S10: Obtain the voltage and current synchronous waveform sequence, and perform waveform channel construction task based on the voltage and current synchronous waveform sequence using Park transform and instantaneous power calculation method, and output three-channel waveform input tensor; Step S20: Based on the three-channel waveform input tensor, a multi-scale one-dimensional convolutional network is used to perform the waveform representation extraction task and output the waveform embedding vector; Step S30: Based on the waveform embedding vector, perform the sample spacing constraint task using the Triplet Loss metric learning method, and output the boundary constraint training sample group; Step S40: Based on the boundary constraint training sample group, perform the model training task using the Hard Example Mining method to output the load recognition model; Step S50: Perform online load determination based on the load identification model, and output abnormal power load alarm results or unknown load alarm results.
[0007] Preferably, step S10, which involves obtaining a voltage and current synchronization waveform sequence, performing a waveform channel construction task based on the voltage and current synchronization waveform sequence using Park transform and instantaneous power calculation, and outputting a three-channel waveform input tensor, specifically includes: Step S101: Collect the original voltage waveform sequence and the original current waveform sequence output by the energy meter according to the same sampling clock, and periodically truncate the original voltage waveform sequence and the original current waveform sequence to obtain the voltage and current synchronous waveform sequence. Step S102: Calculate the normalized current channel, Park transform phase channel, and instantaneous power channel based on the voltage and current synchronization waveform sequence; Step S103: The normalized current channel, the Park transform phase channel, and the instantaneous power channel are spliced together according to the channel dimension to obtain a three-channel waveform input tensor.
[0008] Preferably, step S20, which involves using a multi-scale one-dimensional convolutional network to perform waveform representation extraction based on the three-channel waveform input tensor and outputting a waveform embedding vector, specifically includes: Step S201: Input the three-channel waveform input tensor into the first one-dimensional convolution branch, the second one-dimensional convolution branch and the third one-dimensional convolution branch respectively to obtain the first scale waveform features, the second scale waveform features and the third scale waveform features; Step S202: The first-scale waveform feature, the second-scale waveform feature, and the third-scale waveform feature are spliced together to obtain multi-scale waveform features; Step S203: Based on the multi-scale waveform features, channel weighting is performed using the Squeeze-and-Excitation attention module, and the waveform embedding vector is obtained through fully connected mapping.
[0009] Preferably, step S202, which involves concatenating the first-scale waveform features, the second-scale waveform features, and the third-scale waveform features to obtain multi-scale waveform features, specifically includes: The output of a one-dimensional convolution branch with a kernel length of 3 is used as the first-scale waveform feature to characterize current spikes and local abrupt changes. The output of a one-dimensional convolutional branch with a kernel length of 5 is used as the second-scale waveform feature to characterize the waveform fluctuations within a half-cycle. The output of a one-dimensional convolutional branch with a kernel length of 7 is used as the third-scale waveform feature to characterize the envelope change over the entire period. The first-scale waveform feature, the second-scale waveform feature, and the third-scale waveform feature are spliced together along the channel direction to obtain a multi-scale waveform feature.
[0010] Preferably, step S30, which involves performing a sample spacing constraint task based on the waveform embedding vector using the Triplet Loss metric learning method and outputting a boundary constraint training sample group, specifically includes: Step S301: Using any load sample in the training batch as an anchor sample, determine positive samples with the same category as the anchor sample and negative samples with a different category from the anchor sample based on the category label; Step S302: Construct triplet training samples based on the waveform embedding vectors corresponding to the anchor point samples, the positive samples, and the negative samples; Step S303: Based on the cosine similarity between the anchor point sample and the negative sample in the original current waveform space, correct the interval parameter in Triplet Loss to obtain the boundary constraint training sample group; The corrected interval parameter satisfies:
[0011] in, This represents the correction interval parameter between the anchor sample and the j-th negative sample. λ represents the base interval parameter, and λ represents the interval adjustment coefficient. This represents the original current waveform sequence of the anchor point sample. Let represent the original current waveform sequence of the j-th negative sample, and τ represent the similarity trigger threshold. This represents the cosine similarity between the anchor point sample and the j-th negative sample in the original current waveform space.
[0012] Preferably, step S40, which involves performing model training using the Hard Example Mining method based on the boundary constraint training sample group and outputting the load recognition model, specifically includes: Step S401: In the boundary constraint training sample group, calculate the Euclidean distance between the waveform embedding vector of the anchor point sample and the waveform embedding vector of each positive sample, and determine the positive sample with the largest Euclidean distance as the difficult positive sample; Step S402: Calculate the Euclidean distance between the waveform embedding vector of the anchor point sample and the waveform embedding vector of each negative sample, and determine the negative sample with the smallest Euclidean distance as the difficult negative sample; Step S403: Perform backpropagation training based on the anchor sample, the difficult positive sample, and the difficult negative sample to obtain the load recognition model.
[0013] Preferably, step S50, which involves determining the online load based on the load identification model and outputting an alarm result for abnormal power consumption or an alarm result for unknown load, specifically includes: Step S501: Input the three-channel waveform input tensor corresponding to the load to be identified into the load identification model to obtain the waveform embedding vector to be identified; Step S502: Calculate the Mahalanobis distance between the waveform embedding vector to be identified and the feature centers of each pre-stored known load category, and determine the pre-stored known load category with the smallest distance as the candidate load category; Step S503: Based on the Mahalanobis distance and the confusion shrinkage adaptive distance threshold corresponding to the candidate load category, an alarm determination is made, and the alarm result of abnormal power consumption load or unknown load is output; Wherein, the obfuscated shrinkage adaptive distance threshold satisfies:
[0014] in, This represents the obfuscated, shrinking adaptive distance threshold for the c-th pre-stored known load category. This represents the mean Mahalanobis distance from the c-th pre-stored known load class training sample to the class feature center. This represents the standard deviation of the Mahalanobis distance from the training sample to the class feature center in the c-th pre-stored known load class. This represents the class confusion coefficient between the c-th pre-stored known load class and adjacent easily confused load classes. This represents the disturbance quality coefficient of the waveform corresponding to the load to be identified. Indicates the intra-class expansion coefficient. Indicates the confusion shrinkage coefficient. Indicates the disturbance compensation coefficient; The category confusion coefficient satisfies:
[0015] in, This represents the set of easily confused load categories corresponding to the c-th pre-stored known load category. This represents the Euclidean distance between the category feature center of the c-th pre-stored known load category and the category feature center of the r-th easily confused load category; The disturbance quality coefficient satisfies:
[0016] in, This represents the standard deviation of the instantaneous power channel corresponding to the load to be identified within the current identification window. This represents the mean value of the instantaneous power channel corresponding to the load to be identified within the current identification window, and ε represents a constant to prevent the denominator from being zero; If the Mahalanobis distance is less than or equal to the obfuscated shrinkage adaptive distance threshold, and the candidate load category belongs to the predefined abnormal power load category, then output the abnormal power load alarm result; If the Mahalanobis distance is greater than the obfuscated shrinkage adaptive distance threshold corresponding to each pre-stored known load category, then an unknown load alarm result is output.
[0017] This invention also provides an abnormal power load identification and alarm system based on electricity meter waveform analysis, comprising: The waveform construction module is used to obtain the voltage and current synchronous waveform sequence, and to perform the waveform channel construction task based on the voltage and current synchronous waveform sequence using Park transform and instantaneous power calculation, and output a three-channel waveform input tensor. The waveform representation extraction module is used to perform waveform representation extraction tasks based on the three-channel waveform input tensor using a multi-scale one-dimensional convolutional network, and outputs a waveform embedding vector. The sample spacing constraint module is used to perform the sample spacing constraint task based on the waveform embedding vector using the Triplet Loss metric learning method, and output the boundary constraint training sample group. The model training module is used to perform model training tasks using the Hard Example Mining method based on the boundary constraint training sample group, and output the load recognition model. The alarm determination module is used to determine the online load based on the load identification model and output the alarm result of abnormal power consumption load or unknown load.
[0018] The present invention also provides an abnormal power load identification and alarm device based on electricity meter waveform analysis. The abnormal power load identification and alarm device based on electricity meter waveform analysis includes: a memory, a processor, and an abnormal power load identification and alarm program based on electricity meter waveform analysis stored in the memory and executable on the processor. When the abnormal power load identification and alarm program based on electricity meter waveform analysis is executed by the processor, the above method is implemented.
[0019] The present invention also provides a computer program product, the computer program product including an abnormal power load identification and alarm program based on the waveform analysis of an electricity meter, the abnormal power load identification and alarm program based on the waveform analysis of an electricity meter implements the above method when executed by a processor.
[0020] The beneficial effects of this invention are as follows: 1. This invention constructs a three-channel waveform input tensor containing normalized current, Park transform phase, and instantaneous power, comprehensively characterizing the electrical characteristics of the load from three dimensions: current amplitude, phase dynamics, and instantaneous power fluctuation. This provides a richer and more discriminative data foundation for subsequent deep feature extraction, overcoming the limitation of single features in traditional methods.
[0021] 2. This invention uses a multi-scale one-dimensional convolutional network to extract waveform features and combines Triplet Loss metric learning and Hard Example Mining strategies for model training. This enables the model to adaptively learn the optimal distribution of different load waveforms in the feature space, effectively enhancing the model's ability to capture subtle waveform differences and distinguish easily confused samples, thereby significantly improving recognition accuracy and model generalization performance.
[0022] 3. In the online judgment stage, this invention innovatively introduces a confusion-shrinking adaptive distance threshold. This threshold comprehensively considers the statistical characteristics of intra-class distribution, the degree of confusion between classes, and the current waveform disturbance quality, realizing dynamic and accurate adjustment of the judgment boundary. This enables the system to output alarm results more reliably when facing unknown loads or poor waveform quality, reducing the risk of misjudgment and enhancing the practicality and robustness of the system. Attached Figure Description
[0023] Figure 1 This is a flowchart illustrating the first embodiment of an abnormal power load identification and alarm method based on electricity meter waveform analysis according to the present invention. Detailed Implementation
[0024] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0025] Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] Example 1: As Figure 1 The diagram shown is a flowchart of the first embodiment of the abnormal power load identification and alarm method based on power meter waveform analysis according to the present invention. The first embodiment of the abnormal power load identification and alarm method based on power meter waveform analysis according to the present invention is presented.
[0027] In the first embodiment, the method for identifying and alarming abnormal power loads based on electricity meter waveform analysis includes: Step S10: Obtain the voltage and current synchronous waveform sequence, and perform waveform channel construction task based on the voltage and current synchronous waveform sequence using Park transform and instantaneous power calculation method, and output three-channel waveform input tensor; The "synchronized voltage and current waveform sequence" in this step refers to the original voltage and current waveforms collected from the energy meter at the same sampling clock, which are strictly aligned in time. These waveforms are typically truncated periodically to ensure the integrity of the analysis window. The "Park transform and instantaneous power calculation method" is the core approach to constructing the three channels: the normalized current channel reflects the relative change in current amplitude; the Park transform phase channel extracts the phase dynamics of the current vector through coordinate transformation, and is sensitive to load switching and nonlinear characteristics; the instantaneous power channel (the instantaneous product of voltage and current) directly reflects the instantaneous energy exchange fluctuations of the load. These three channels, stitched together according to their channel dimensions, form a "three-channel waveform input tensor," constituting a multi-dimensional data volume that integrates time-domain amplitude, phase-domain dynamics, and power-domain fluctuations, providing a structured input for subsequent deep feature extraction.
[0028] This step extracts three physical dimensions from the original voltage and current signals that are more representative of the load characteristics through Park transform and instantaneous power calculation. This multi-channel construction method enables the subsequent neural network to simultaneously learn the composite characteristics of the load from changes in current magnitude, phase shift trajectory, and instantaneous power fluctuations.
[0029] Compared to traditional techniques that directly use current RMS sequences or simple FFT spectra as input, the three-channel tensor constructed in this step has higher information density and discriminative power. Traditional methods may lose phase dynamics and instantaneous power details, which are often key to distinguishing loads with similar waveforms but different properties (such as resistive loads and loads with rectifier circuits). This invention effectively compensates for this deficiency by introducing Park transform phase and instantaneous power channels, making the model input more reflective of the essential electrical behavior of the load.
[0030] For example, a purely resistive load (such as an incandescent lamp) and a switching power supply load with capacitive filtering (such as a computer) may have similar steady-state RMS current values. Traditional methods can easily confuse them. However, through this step: the Park transform phase channel of the resistive load changes smoothly, and the instantaneous power channel waveform is smooth; while the switching power supply load, due to rectification and filtering, exhibits specific distortion in its Park transform phase channel, and the instantaneous power channel displays high-frequency pulsation. The three-channel tensor clearly reveals these differences.
[0031] Step S20: Based on the three-channel waveform input tensor, a multi-scale one-dimensional convolutional network is used to perform the waveform representation extraction task and output the waveform embedding vector; In this step, the "multi-scale one-dimensional convolutional network" refers to parallel branches of a one-dimensional convolutional neural network with kernels of different lengths. Specifically, branches with kernel lengths of 3, 5, and 7 are used to capture local patterns at different time scales in the waveform. The "waveform embedding vector" is a fixed-length, low-dimensional, dense vector obtained after multi-scale feature extraction, channel attention weighting (Squeeze-and-Excitation module), and mapping with fully connected layers. This vector is an abstract and compressed representation of the high-dimensional waveform tensor, containing the most essential deep features of the load waveform that can be used to distinguish different types of loads.
[0032] The technical advantage of this step lies in achieving intelligent dimensionality reduction and feature extraction from high-dimensional waveform tensors to compact feature vectors. The design of multi-scale convolutional kernels enables the network to simultaneously capture short-term abrupt changes (such as spikes), mid-range fluctuations (such as half-cycle distortion), and long-range trends (such as periodic envelopes) in the current waveform, thereby comprehensively describing the local and global morphology of the waveform. The SE attention mechanism further enhances the feature responses of important channels.
[0033] Compared to traditional methods that manually design features (such as harmonic content and waveform factors) or use single-scale convolutional networks, the multi-scale fusion strategy employed in this step offers significant advantages. Manual feature extraction relies on prior knowledge and may be incomplete; single-scale convolution may fail to capture the diverse temporal scale characteristics of different load waveforms. This invention, through multi-scale parallel extraction and adaptive fusion, allows the model to automatically learn and integrate the cross-scale features that contribute most to the recognition task, improving the robustness and discriminative power of feature representation.
[0034] For example, consider the ability to distinguish between the inrush current at the moment of motor startup and the current of a continuously operating heating wire. A short-scale convolutional kernel (length 3) can accurately capture the brief spike during motor startup; a medium-scale convolutional kernel (length 5) can effectively describe the stable half-sine wave fluctuations of the heating wire current; and a long-scale convolutional kernel (length 7) helps to grasp the entire envelope process as the current gradually stabilizes after motor startup. The concatenation of multi-scale features allows the embedding vector to simultaneously contain this crucial information, thus accurately distinguishing between these two load states.
[0035] Step S30: Based on the waveform embedding vector, perform the sample spacing constraint task using the Triplet Loss metric learning method, and output the boundary constraint training sample group; The "Triplet Loss metric learning method" in this step is a supervised learning paradigm. Its core is to construct triplets consisting of anchor samples, positive samples (of the same class as the anchor), and negative samples (of different classes). A loss function constraint ensures that in the feature space, the distance between the anchor and a positive sample is less than the distance between the anchor and a negative sample by at least one margin. The "sample spacing constraint task" optimizes this loss to cluster similar samples and separate dissimilar samples. Specifically, this invention modifies the traditional fixed interval by introducing a dynamic interval parameter based on the cosine similarity of the original current waveform. The output "boundary-constrained training sample set" refers to the set of triplets whose waveform embedding vectors, after optimization through this metric learning process, satisfy clearer class boundaries in the feature space. This provides a higher-quality sample space structure for subsequent training.
[0036] This step plays a crucial role in optimizing the feature space geometry in this invention. Instead of directly classifying categories, it learns a robust metric space where the distances between calculated embedding vectors accurately reflect the similarity of load categories. By introducing a dynamic interval based on the original waveform similarity, a stronger separation constraint is imposed on heterogeneous loads (easily confused loads) whose waveforms are already very similar, forcing the model to learn more subtle distinguishing features, thereby improving the model's ability to discriminate difficult samples.
[0037] Compared to directly using cross-entropy loss for end-to-end classification, the Triplet Loss metric learning employed in this step focuses more on learning the relative relationships between samples, making it more suitable for scenarios where the number of classes may dynamically increase (e.g., when discovering new loads) or where sample similarity needs to be calculated. Traditional fixed-interval Triplet Loss treats all negative samples equally, while this invention adaptively adjusts the interval by incorporating the original waveform similarity, allowing model training to focus more on distinguishing "hard negative samples" that have similar original waveforms but different classes, resulting in more targeted and efficient training.
[0038] For example, suppose the anchor sample is an "electric kettle" (resistive load), and the positive sample is the waveform of another "electric kettle." Negative samples might include a "rice cooker" (also predominantly resistive, with high waveform similarity) and a "desktop computer" (switching power supply, with significantly different waveforms). With traditional fixed intervals, the model might easily distinguish between the computer and the electric kettle, but struggles to differentiate between the rice cooker and the electric kettle. This invention, however, calculates the cosine similarity of the original waveforms and finds that the rice cooker and the electric kettle are highly similar. It then automatically increases the target interval (mi,j) between them, forcing the model to learn more refined features during training to distinguish these two similar resistive loads, thus improving the model's ability to differentiate easily confused loads.
[0039] Step S40: Based on the boundary constraint training sample group, perform the model training task using the Hard Example Mining method to output the load recognition model; The "Hard Example Mining" approach in this step refers to actively selecting the most difficult samples to distinguish for the current model during training (i.e., hard samples) from the batch data for calculating loss and gradient updates. The "model training task" utilizes these selected hard samples to optimize the parameters of the multi-scale one-dimensional convolutional network through backpropagation. Specifically, "hard positive samples" refer to samples of the same class as the anchor sample but furthest away (i.e., the most different within the same class); "hard negative samples" refer to samples of a different class than the anchor sample but closest away (i.e., the most easily confused outlier samples). Using them for training can most effectively drive the optimization of the model's decision boundary. The final output "load recognition model" is a neural network model that has completed parameter optimization and can map the input three-channel waveform tensor into a discriminative embedding vector.
[0040] The technical advantage of this step lies in significantly improving the efficiency of model training and the performance of the final model. By focusing training on the most challenging hard samples of the current model, the gradient update process is avoided from being dominated by simple samples. This ensures that each parameter update directly addresses the model's current weaknesses (i.e., regions with ambiguous classification boundaries). This strategy accelerates model convergence and enables the model to learn more powerful and robust feature representations, thus exhibiting stronger recognition capabilities when faced with complex, ambiguous-boundary load samples in real-world scenarios.
[0041] Compared to the traditional method of randomly sampling all samples for training, Hard Example Mining is a more efficient training strategy. In traditional methods, the gradient signals provided by a large number of simple samples that have been well classified by the model are weak, resulting in a slow training process and the possibility of getting stuck in local optima. This invention actively mines difficult samples, which is equivalent to providing the model with the most informative training data. This ensures that the training process always targets the aspects that need the most improvement, thereby training a higher-performing model with fewer iterations. This is particularly advantageous when dealing with imbalanced datasets or datasets containing a large number of easily confused samples.
[0042] For example, in a training batch, for the anchor sample "energy-saving lamp," the embedding vectors of most other "energy-saving lamp" samples (positive samples) are already very close. However, there might be one "energy-saving lamp" sample with waveform distortion caused by voltage fluctuations that is farther away, and it is selected as a difficult positive sample. Meanwhile, among the negative samples, an "LED light strip" sample with waveform features somewhat similar to the energy-saving lamp might be closest to the anchor point and is selected as a difficult negative sample. The model learns to overcome the effects of voltage fluctuations and strengthens its distinguishing features from similar heterogeneous loads by optimizing the anchor point to be closer to the distorted energy-saving lamp (difficult positive sample) and further away from the LED light strip (difficult negative sample).
[0043] Step S50: Perform online load determination based on the load identification model, and output abnormal power load alarm results or unknown load alarm results.
[0044] This step is the online application phase of the model. The "Embedded Vector of the Waveform to be Identified" is the feature vector obtained by inputting the three-channel waveform tensor of the load to be identified, which was acquired and constructed online, into the trained load identification model. The "Mahalanobis Distance" is a statistical distance that considers the correlation of each dimension of the feature vector and the overall data distribution, reflecting the position of a sample relative to a certain category distribution better than Euclidean distance. The "Pre-stored Feature Center of Known Load Categories" is the mean center of the embedding vectors of all samples for each known load category, calculated during the training phase. The "Confusion-Shrinking Adaptive Distance Threshold" is a dynamic threshold. For known load categories that are easily confused with other categories, the threshold should be shrunk to be more stringent to prevent misjudgment; for cases where the current waveform to be identified has poor quality and large disturbances, the threshold should be appropriately relaxed to prevent false alarms due to signal noise.
[0045] This step achieves intelligent mapping from feature vectors to the final alarm decision. It doesn't simply classify the vector to be identified into the nearest known category, but rather introduces a highly adaptive distance threshold mechanism to achieve accurate and flexible judgment. This mechanism effectively handles two types of problems: first, the problem of confusion within known categories, improving discriminative power by narrowing the threshold through a confusion coefficient; second, dealing with unavoidable signal disturbances in real-world environments, maintaining system stability by compensating the threshold with a quality coefficient. Ultimately, only when the sample to be identified is not only sufficiently close to the center of a known category (small Mahalanobis distance) but also meets the strictly threshold dynamically adjusted for that category is it classified as belonging to that category; otherwise, it is considered an unknown load and an alarm is triggered.
[0046] Example 2: Furthermore, the present invention provides an abnormal electrical load identification and alarm system based on electricity meter waveform analysis, employing an abnormal electrical load identification and alarm method based on electricity meter waveform analysis from the above embodiments, which can solve the technical problem of abnormal electrical load identification and alarm based on electricity meter waveform analysis. The beneficial effects of the abnormal electrical load identification and alarm system based on electricity meter waveform analysis provided by the present invention are the same as those of the abnormal electrical load identification and alarm method based on electricity meter waveform analysis provided in the above embodiments, and other technical features of the abnormal electrical load identification and alarm system based on electricity meter waveform analysis are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0047] Example 3: This invention provides an abnormal power load identification and alarm device based on electricity meter waveform analysis. The device includes: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor, which are then executed to enable the at least one processor to perform the abnormal power load identification and alarm method based on electricity meter waveform analysis described in Example 1. The abnormal power load identification and alarm device based on electricity meter waveform analysis in this invention can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. This abnormal power load identification and alarm device based on electricity meter waveform analysis is merely an example and should not limit the functionality or scope of the invention. An abnormal electricity load identification alarm device based on electricity meter waveform analysis may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory or a program loaded from a storage device into a random access memory. The random access memory also stores various programs and data required for the operation of the abnormal electricity load identification alarm device based on electricity meter waveform analysis. The processing unit, read-only memory, and random access memory are interconnected via a bus. An I / O interface is also connected to the bus. Typically, the following systems can be connected to the I / O interface: input devices including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices including, for example, magnetic tapes, hard disks, etc.; and communication devices. The communication device allows the abnormal electricity load identification alarm device based on electricity meter waveform analysis to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows one abnormal electrical load identification alarm device based on electricity meter waveform analysis with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented alternatively.
[0048] Example 4: This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method for identifying and alarming abnormal electrical loads based on electricity meter waveform analysis. The computer program product provided by this invention can solve the technical problem of identifying and alarming abnormal electrical loads based on electricity meter waveform analysis. Compared with the prior art, the beneficial effects of the computer program product provided by this invention are the same as those of the above-described method for identifying and alarming abnormal electrical loads based on electricity meter waveform analysis, and will not be repeated here.
[0049] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a read-only memory. When the computer program is executed by a processing device, it performs the functions defined in the methods of the embodiments disclosed in this invention.
[0050] It should be understood that the various parts disclosed in this invention can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0051] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the present invention and its equivalents, the present invention also intends to include these modifications and variations.
Claims
1. A method for identifying and alarming abnormal electrical loads based on waveform analysis of an electricity meter, characterized in that, The methods include: Step S10: Obtain the voltage and current synchronous waveform sequence, and perform waveform channel construction task based on the voltage and current synchronous waveform sequence using Park transform and instantaneous power calculation method, and output three-channel waveform input tensor; Step S20: Based on the three-channel waveform input tensor, a multi-scale one-dimensional convolutional network is used to perform the waveform representation extraction task and output the waveform embedding vector; Step S30: Based on the waveform embedding vector, perform the sample spacing constraint task using the Triplet Loss metric learning method, and output the boundary constraint training sample group; Step S40: Based on the boundary constraint training sample group, perform the model training task using the Hard Example Mining method to output the load recognition model; Step S50: Perform online load determination based on the load identification model, and output abnormal power load alarm results or unknown load alarm results.
2. The method for identifying and alarming abnormal electrical loads based on waveform analysis of an electricity meter as described in claim 1, characterized in that, Step S10 involves obtaining a voltage and current synchronization waveform sequence, and then using Park transform and instantaneous power calculation to construct waveform channels based on this sequence, outputting a three-channel waveform input tensor. Specifically, this includes: Step S101: Collect the original voltage waveform sequence and the original current waveform sequence output by the energy meter according to the same sampling clock, and periodically truncate the original voltage waveform sequence and the original current waveform sequence to obtain the voltage and current synchronous waveform sequence. Step S102: Calculate the normalized current channel, Park transform phase channel, and instantaneous power channel based on the voltage and current synchronization waveform sequence; Step S103: The normalized current channel, the Park transform phase channel, and the instantaneous power channel are spliced together according to the channel dimension to obtain a three-channel waveform input tensor.
3. The method for identifying and alarming abnormal electrical loads based on waveform analysis of an electricity meter as described in claim 1, characterized in that, Step S20, which involves using a multi-scale one-dimensional convolutional network to perform waveform representation extraction based on the three-channel waveform input tensor and outputting a waveform embedding vector, specifically includes: Step S201: Input the three-channel waveform input tensor into the first one-dimensional convolution branch, the second one-dimensional convolution branch and the third one-dimensional convolution branch respectively to obtain the first scale waveform features, the second scale waveform features and the third scale waveform features; Step S202: The first-scale waveform feature, the second-scale waveform feature, and the third-scale waveform feature are spliced together to obtain multi-scale waveform features; Step S203: Based on the multi-scale waveform features, channel weighting is performed using the Squeeze-and-Excitation attention module, and the waveform embedding vector is obtained through fully connected mapping.
4. The method for identifying and alarming abnormal electrical loads based on waveform analysis of an electricity meter as described in claim 3, characterized in that, Step S202, which involves concatenating the first-scale waveform features, the second-scale waveform features, and the third-scale waveform features to obtain multi-scale waveform features, specifically includes: The output of a one-dimensional convolution branch with a kernel length of 3 is used as the first-scale waveform feature to characterize current spikes and local abrupt changes. The output of a one-dimensional convolutional branch with a kernel length of 5 is used as the second-scale waveform feature to characterize the waveform fluctuations within a half-cycle. The output of a one-dimensional convolutional branch with a kernel length of 7 is used as the third-scale waveform feature to characterize the envelope change over the entire period. The first-scale waveform feature, the second-scale waveform feature, and the third-scale waveform feature are spliced together along the channel direction to obtain a multi-scale waveform feature.
5. The method for identifying and alarming abnormal electrical loads based on waveform analysis of an electricity meter as described in claim 1, characterized in that, Step S30, which involves performing a sample spacing constraint task based on the waveform embedding vector using the Triplet Loss metric learning method and outputting a boundary constraint training sample group, specifically includes: Step S301: Using any load sample in the training batch as an anchor sample, determine positive samples with the same category as the anchor sample and negative samples with a different category from the anchor sample based on the category label; Step S302: Construct triplet training samples based on the waveform embedding vectors corresponding to the anchor point samples, the positive samples, and the negative samples; Step S303: Based on the cosine similarity between the anchor point sample and the negative sample in the original current waveform space, correct the interval parameter in Triplet Loss to obtain the boundary constraint training sample group; The corrected interval parameter satisfies: in, This represents the correction interval parameter between the anchor sample and the j-th negative sample. λ represents the base interval parameter, and λ represents the interval adjustment coefficient. This represents the original current waveform sequence of the anchor point sample. Let represent the original current waveform sequence of the j-th negative sample, and τ represent the similarity trigger threshold. This represents the cosine similarity between the anchor point sample and the j-th negative sample in the original current waveform space.
6. The method for identifying and alarming abnormal electrical loads based on waveform analysis of an electricity meter as described in claim 1, characterized in that, Step S40, which involves performing model training using the Hard Example Mining method based on the boundary constraint training sample group and outputting the load recognition model, specifically includes: Step S401: In the boundary constraint training sample group, calculate the Euclidean distance between the waveform embedding vector of the anchor point sample and the waveform embedding vector of each positive sample, and determine the positive sample with the largest Euclidean distance as the difficult positive sample; Step S402: Calculate the Euclidean distance between the waveform embedding vector of the anchor point sample and the waveform embedding vector of each negative sample, and determine the negative sample with the smallest Euclidean distance as the difficult negative sample; Step S403: Perform backpropagation training based on the anchor sample, the difficult positive sample, and the difficult negative sample to obtain the load recognition model.
7. The method for identifying and alarming abnormal electrical loads based on waveform analysis of an electricity meter as described in claim 1, characterized in that, Step S50, which involves determining the online load based on the load identification model and outputting an alarm result for abnormal power consumption or an alarm result for unknown load, specifically includes: Step S501: Input the three-channel waveform input tensor corresponding to the load to be identified into the load identification model to obtain the waveform embedding vector to be identified; Step S502: Calculate the Mahalanobis distance between the waveform embedding vector to be identified and the feature centers of each pre-stored known load category, and determine the pre-stored known load category with the smallest distance as the candidate load category; Step S503: Based on the Mahalanobis distance and the confusion shrinkage adaptive distance threshold corresponding to the candidate load category, an alarm determination is made, and the alarm result of abnormal power consumption load or unknown load is output; Wherein, the obfuscated shrinkage adaptive distance threshold satisfies: in, This represents the obfuscated, shrinking adaptive distance threshold for the c-th pre-stored known load category. This represents the mean Mahalanobis distance from the c-th pre-stored known load class training sample to the class feature center. This represents the standard deviation of the Mahalanobis distance from the training sample to the class feature center in the c-th pre-stored known load class. This represents the class confusion coefficient between the c-th pre-stored known load class and adjacent easily confused load classes. This represents the disturbance quality coefficient of the waveform corresponding to the load to be identified. Indicates the intra-class expansion coefficient. Indicates the confusion shrinkage coefficient. Indicates the disturbance compensation coefficient; If the Mahalanobis distance is less than or equal to the obfuscated shrinkage adaptive distance threshold, and the candidate load category belongs to the predefined abnormal power load category, then output the abnormal power load alarm result; If the Mahalanobis distance is greater than the obfuscated shrinkage adaptive distance threshold corresponding to each pre-stored known load category, then an unknown load alarm result is output.
8. An abnormal electrical load identification and alarm system based on electricity meter waveform analysis, applied to the abnormal electrical load identification and alarm method based on electricity meter waveform analysis as described in any one of claims 1 to 7, characterized in that, The abnormal power load identification and alarm system based on electricity meter waveform analysis includes: The waveform construction module is used to obtain the voltage and current synchronous waveform sequence, and to perform the waveform channel construction task based on the voltage and current synchronous waveform sequence using Park transform and instantaneous power calculation, and output a three-channel waveform input tensor. The waveform representation extraction module is used to perform waveform representation extraction tasks based on the three-channel waveform input tensor using a multi-scale one-dimensional convolutional network, and outputs a waveform embedding vector. The sample spacing constraint module is used to perform the sample spacing constraint task based on the waveform embedding vector using the Triplet Loss metric learning method, and output the boundary constraint training sample group. The model training module is used to perform model training tasks using the Hard Example Mining method based on the boundary constraint training sample group, and output the load recognition model. The alarm determination module is used to determine the online load based on the load identification model and output the alarm result of abnormal power consumption load or unknown load.
9. An alarm device for identifying abnormal electrical loads based on waveform analysis of an electricity meter, characterized in that, The abnormal power load identification and alarm device based on electricity meter waveform analysis includes: a memory, a processor, and an abnormal power load identification and alarm program based on electricity meter waveform analysis stored in the memory and executable on the processor. When the abnormal power load identification and alarm program based on electricity meter waveform analysis is executed by the processor, it implements the abnormal power load identification and alarm method based on electricity meter waveform analysis according to any one of claims 1 to 7.
10. A computer program product, characterized in that, The computer program product includes an abnormal power load identification and alarm program based on power meter waveform analysis. When the abnormal power load identification and alarm program based on power meter waveform analysis is executed by the processor, it implements the abnormal power load identification and alarm method based on power meter waveform analysis as described in any one of claims 1 to 7.