Power consumption abnormity real-time detection method and system based on intelligent electric energy meter

By processing real-time data from smart meters, anti-interference composite feature quantities are generated, and detection thresholds are adaptively adjusted. This solves the problems of misjudgment and missed detection of load fluctuations and electricity theft in complex power grid environments, and achieves high-precision detection of abnormal electricity use.

CN121878352APending Publication Date: 2026-04-17SUZURAN ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUZURAN ELECTRIC CO LTD
Filing Date
2026-01-28
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In complex power grid environments, existing real-time detection methods for abnormal power consumption cannot effectively distinguish between load fluctuations and electricity theft, leading to misjudgments and missed detections, which increases the risk of line fires and economic losses.

Method used

By collecting data from smart energy meters in real time, calculating the load fluctuation benchmark reference value, performing time-frequency analysis, generating spectral entropy features and instantaneous phase change features, and fusing them into composite feature quantities, the detection threshold is adaptively adjusted. Combined with dynamic partitioning operators and robust statistics, the system can accurately distinguish between normal electricity use and electricity theft.

Benefits of technology

It significantly reduces false alarm and false alarm rates, improves the accuracy of detecting electricity theft and system stability, and adapts to load fluctuations in complex power grid environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121878352A_ABST
    Figure CN121878352A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electric power detection, in particular to an electricity consumption abnormity real-time detection method and system based on an intelligent electric energy meter, and the method comprises the following steps: S1, collecting the electricity consumption parameter data of the intelligent electric energy meter in real time; s2, calculating a benchmark reference value of load fluctuation based on the current data in the preset statistical period; and S3, carrying out time-frequency analysis on the current data, dynamically reconstructing frequency band energy distribution of the current data, and generating a spectral entropy feature representing the chaos degree of the energy distribution. The method comprises the following steps: dynamically adjusting the number of frequency bands (compressing high-frequency noise when a load is stable and expanding low-frequency resolution when the load is abnormal) of wavelet packet decomposition according to a fundamental wave energy ratio, then introducing a cross-frequency-band energy transfer matrix to quantify an energy coupling relation between the frequency bands, and correcting the energy weight of each frequency band according to the energy coupling relation; and finally, calculating a self-adaptive and anti-aliasing reconstructed spectrum entropy. The problem of characteristic fuzziness caused by characteristic similarity (frequency band aliasing) of normal load fluctuation and electricity larceny behaviors in frequency spectrums is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power detection technology, specifically to a method and system for real-time detection of power consumption anomalies based on smart meters. Background Technology

[0002] In the context of smart grid construction, real-time detection technology for abnormal electricity consumption based on smart meters has become an important guarantee for the safe operation of the power system. This technology aims to automatically identify abnormal behaviors such as electricity theft, equipment short circuits, and line overloads by collecting user electricity consumption parameters such as current and voltage in real time, thereby reducing economic losses for power companies, preventing electrical fires, and improving grid operation efficiency.

[0003] However, in practical applications, especially in areas with complex power supply environments such as older urban residential communities, the aging wiring and dense loads in these communities lead to significant load fluctuations during peak evening hours due to the concentrated starting and stopping of high-power appliances like air conditioners. The current characteristics generated by these normal power fluctuations are remarkably similar to those of electricity theft, and existing real-time power anomaly detection methods cannot effectively distinguish between the two waveforms. This problem directly results in a double negative impact: firstly, frequent misjudgments of peak loads as electricity theft lead to numerous resident complaints and even legal disputes; secondly, genuine short-term electricity theft is masked by fluctuation noise, causing continuous power loss and economic damage. More seriously, the system's failure to detect overload risks significantly increases the probability of line fires, creating a public safety hazard. Summary of the Invention

[0004] To address the aforementioned shortcomings of existing technologies, this invention provides a real-time detection method and system for abnormal electricity consumption based on smart meters. This effectively solves the problems of misjudgment and missed detection caused by the similarity between load fluctuations and electricity theft characteristics in complex power grid environments. It achieves the technical objective of accurately distinguishing between normal electricity consumption and abnormal electricity theft, and significantly reducing false alarm and missed detection rates.

[0005] To achieve the above objectives, the present invention provides the following technical solution: A method and system for real-time detection of abnormal electricity consumption based on a smart energy meter, comprising the following steps: S1: Real-time acquisition of electricity consumption parameter data, including current data, from smart energy meters; S2: Calculate the benchmark reference value for load fluctuation based on the current data within a preset statistical period; S3: Perform time-frequency analysis on the current data, dynamically reconstruct its frequency band energy distribution, and generate spectral entropy features characterizing the disorder of the energy distribution; S4: Extract the instantaneous phase change features of the current data, fuse the spectral entropy features and the instantaneous phase change features to generate an anti-interference composite feature quantity; S5: Analyze the oscillation characteristics based on the historical sequence of the composite feature quantity, and calculate the adaptive detection threshold; S6: Compare the real-time generated composite feature quantity with the adaptive detection threshold to determine whether an abnormal power consumption has occurred.

[0006] Furthermore, the benchmark reference value for calculating load fluctuations includes: S201: Within a preset statistical period, the collected instantaneous current values ​​are merged to construct a sequence of instantaneous current values. ;in, N is the total number of sampling points within the preset statistical period T; S202: Calculate the standard deviation of the instantaneous current values ​​used to establish the load fluctuation reference value based on the instantaneous current value sequence, i.e.: In the formula, The standard deviation of the instantaneous current value; The average current value within a preset statistical period T, i.e.: .

[0007] Furthermore, the dynamic reconstruction of its frequency band energy distribution includes: S301: Use wavelet packet transform to decompose the original signal current instantaneous value sequence into M frequency bands, i.e. ;in, This represents the wavelet coefficient vector of the j-th frequency band; S302: Extract the dominant intensity energy ratio in the fundamental frequency band neighborhood to quantify the fundamental component's reflection of load stability in the low-frequency band, i.e.: In the formula, The proportion of fundamental wave energy; These are the wavelet coefficients for the fundamental frequency band; A represents the fundamental frequency band; A is the set of indices for the fundamental frequency bands. These are the wavelet coefficients for the i-th frequency band; S303: Dynamically adjusts the number of frequency bands used for spectral entropy calculation based on the fundamental frequency energy ratio, i.e.: In the formula, M represents the number of reconstructed frequency bands; M represents the number of original frequency bands. It is a high-frequency compression factor; It is the low-frequency spread factor; Determine the low threshold for load; Determine the high threshold for load.

[0008] Furthermore, the generation of the spectral entropy feature characterizing the disorder of energy distribution also includes: S304: Calculate the cross-band energy transfer matrix based on the reconstructed frequency band set, i.e.: In the formula, This is a cross-band energy transfer matrix; This represents the i-th reconstructed frequency band; For the j-th reconstructed frequency band; The length of the short time window; The attenuation coefficient; Let i be the center frequency of the i-th reconstructed frequency band; Let j be the center frequency of the reconstructed frequency band; S305: Calculate the corrected frequency band energy ratio based on the cross-band energy transfer matrix, i.e.: In the formula, This is the weighted correction value for the frequency band energy; S306: The weighted correction value based on band energy has a direction-sensitive spectral entropy characteristic, that is: In the formula, To reconstruct the spectral entropy.

[0009] Furthermore, the instantaneous phase change characteristics of the extracted current data include: S401: Converts the real current signal of the instantaneous current value sequence into a complex signal form, that is: In the formula, For a complex analytic signal, its actual part is The imaginary part is , ; u is the imaginary unit; S402: Extracts the instantaneous phase change rate of the complex analytic signal to capture phase jump characteristics and identify nonlinear load disturbances, i.e.: In the formula, The instantaneous phase gradient; For time differential operators; This is the phase angle extraction function, used to calculate the instantaneous phase of the signal.

[0010] Furthermore, the generated anti-interference composite feature quantity includes: S403: Calculate the average phase value representing the typical phase state of the current load within the sliding time window based on the instantaneous phase gradient, i.e.: In the formula, The average of the phases; The length of the sliding time window; This represents the instantaneous phase gradient at the i-th sampling point at time t; S404: Then, based on the phase mean, calculate the phase variance within the sliding time window, which indicates the degree of phase fluctuation dispersion, i.e.: In the formula, For phase variance; S405: A normalization constant for solving the phase probability distribution based on the instantaneous phase gradient, phase mean, and phase variance, used to transform a non-standard Gaussian function into an effective probability density function, i.e.: In the formula, Z is the normalization constant; For phase space integration, the calculation range is limited to the smallest effective phase. To the maximum effective phase ; It refers to a function; This is the phase offset. It is a phase angle differential unit; S406: Generates a phase quantum probability density function based on a normalized constant, used to transform continuous phase transitions into quantifiable probabilistic events, i.e.: In the formula, It represents the probability density; S407: Calculate the differential operator characterizing the sensitivity of spectral entropy to phase changes using the reconstructed spectral entropy and instantaneous phase gradient, i.e.: In the formula, For entropy and phase coupling operators; The spatial gradient of the phase; S408: A composite control quantity that integrates phase statistics and spectral entropy, calculated based on probability density, entropy and phase coupling operators, reconstructed spectral entropy and instantaneous phase gradient. In the formula, For quantized gradient entropy; This is a phase transition suppression term; This is a term that enhances spectral entropy. The weights are dynamic, i.e.: in, The historical maximum gradient magnitude within the operating cycle; Prevent zero trim items.

[0011] Furthermore, when a phase discontinuity jump is detected, the influence of the discontinuity on the computation is eliminated by reconstructing the integration path as the sum of boundary integrals of multiple submanifolds in the phase space constituted by the phase and the differential operator, including: S4081: Defines the joint space of phase angle and quantized gradient entropy, i.e.: In the formula, Let R be a two-dimensional phase space manifold; R is the set of real numbers; It is the set of positive real numbers; S4082: Provides a real-time adaptive dynamic partitioning operator for phase space partitioning integration based on instantaneous phase gradient calculation, namely: In the formula, For dynamic partitioning operators; It is the hyperbolic tangent function; This is the phase transition rate threshold; S4083: Calculates the number of submanifolds based on the dynamic partitioning operator, i.e.: In the formula, K is the number of submanifolds; The maximum number of submanifolds allowed by the system; It is a rounding function; S4084: Calculates the second derivative of the probability density, used to identify discontinuous regions in phase space, i.e.: In the formula, For singular point phase set; is the standard deviation of the probability density, used to quantify the overall volatility of the probability distribution; X is the curvature sensitivity factor. S4085: Based on the number of submanifolds and the set of singular phases, the original integration interval is decomposed into the sum of submanifold integrals after removing singular points, i.e.: In the formula, Let be the closed, smooth boundary of the i-th submanifold; dl is the arc length infinitesimal element of the boundary curve, i.e.: S4086: Based on the submanifold integral and the update calculation of the quantized gradient entropy, i.e.: In the formula, Update the value for the quantized gradient entropy.

[0012] Furthermore, the calculation of the adaptive detection threshold includes: S501: Calculate the gradient entropy power spectral density based on the updated quantized gradient entropy value, i.e.: In the formula, The energy intensity corresponding to frequency f; For Fourier transform operators; S502: Identify the dominant oscillation frequency based on the energy intensity corresponding to frequency f, i.e.: In the formula, The dominant oscillation frequency; Preset frequency range; S503: Dynamically adjust the length of the preset statistical period and constrain the boundaries according to the dominant frequency to make the window match the current oscillation period, that is: In the formula, This refers to the optimized statistical period length. b is the sampling rate; b is the number of oscillation periods. Minimum statistical period time constraint; The maximum statistical period time constraint; The lowest effective oscillation frequency; The highest effective oscillation frequency; S504: A statistic for calculating the updated value of the quantized gradient entropy, eliminating the interference of extreme points on the calculation of the mean and standard deviation, i.e.: In the formula, To reconstruct the distribution center position after correcting the updated value of the quantized gradient entropy; To obtain the median of the sequence; From time t=1 to The optimized reconstructed quantized gradient entropy update value within the statistical period length; To reconstruct the distribution dispersion of the updated quantized gradient entropy value; Interquartile range; S505: A dynamic detection threshold that adaptively decays over time is calculated based on the distribution center position and distribution dispersion after being corrected by the updated value of the reconstructed quantized gradient entropy. This threshold is used to achieve a dynamic balance between fault detection sensitivity and false alarm rate. In the formula, For dynamic thresholds; It is an exponential decay function with a dynamic decay factor as the decay coefficient; The dynamic attenuation factor for oscillation amplitude modulation is: In the formula, The preset base attenuation factor; The amplitude of the oscillation energy at the dominant frequency; This represents the maximum allowable oscillation amplitude of the system.

[0013] Furthermore, determining whether an abnormal power consumption has occurred includes: In the formula, This refers to the voltage drop magnitude. P represents the effective value of the current; P is the rated transmission capacity of the equipment or line. This is for the safety factor.

[0014] A real-time power consumption anomaly detection system based on a smart energy meter includes: The data acquisition module is used to collect electricity consumption parameter data from smart meters in real time. The benchmark calculation module calculates the benchmark reference value for load fluctuation based on the current data within a preset statistical period. The feature extraction module is used to perform time-frequency analysis on current data, dynamically reconstruct its frequency band energy distribution, and generate spectral entropy features and instantaneous phase change features. The feature generation module is used to fuse spectral entropy features and instantaneous phase change features to generate an interference-resistant composite feature quantity. The adaptive threshold calculation module analyzes the oscillation characteristics of the historical sequence of composite features and uses a robust statistical method to dynamically calculate the adaptive detection threshold. The anomaly detection module is used to compare the real-time generated composite feature quantity with the adaptive detection threshold to determine whether an abnormal power consumption has occurred.

[0015] Compared with the prior art, the technical solution provided by this invention has the following beneficial effects: This invention abandons the traditional fixed-band entropy calculation. First, it dynamically adjusts the number of bands in wavelet packet decomposition based on the fundamental energy ratio (compressing high-frequency noise when the load is stable and expanding low-frequency resolution when the load is abnormal). Then, it introduces a cross-band energy transfer matrix to quantify the energy coupling relationship between bands and corrects the energy weights of each band accordingly. Finally, it calculates an adaptive, anti-aliasing reconstructed spectral entropy. This effectively solves the feature ambiguity problem caused by the similarity in spectral characteristics (band aliasing) between normal load fluctuations and electricity theft. Furthermore, by dynamically focusing on core feature regions, it filters out interference from useless information such as high-frequency switching noise, avoiding misjudging normal peak loads as electricity theft. Simultaneously, it enhances the ability to capture key harmonic details when anomalies occur, preventing genuine short-term electricity theft characteristics from being masked by background noise.

[0016] Furthermore, this scheme combines instantaneous phase gradient information with reconstructed spectral entropy. First, a phase quantization probability distribution model is constructed, transforming continuous phase jumps into probabilistic events. Then, entropy and phase coupling operators are calculated to characterize the sensitivity of spectral entropy to phase changes. Finally, the two are fused through probability integration to form the composite feature of quantized gradient entropy. Specifically, for the problem of discontinuous phase jumps, a dynamic partitioning operator and a submanifold arc length integration method are introduced to ensure computational rigor and stability. Since nonlinear disturbances such as electricity theft can trigger unique phase jumps and spectral changes, this composite feature can simultaneously capture anomalies in both the time domain (phase) and frequency domain (spectral entropy), making it more sensitive and reliable than a single feature. Moreover, the phase probability model can automatically suppress random phase jump noise caused by voltage flicker, line aging, etc., classifying it as a low-probability event and attenuating it, thus significantly improving robustness in complex and aging power grid environments. Furthermore, the dynamic partitioning integration technique solves the problem of failure of mathematical theoretical models due to signal discontinuity in engineering applications, enabling advanced algorithms to operate stably in real, harsh power grid environments.

[0017] Finally, the threshold in this scheme is no longer a fixed value or a simple moving average. First, the power spectrum of the quantized gradient entropy is analyzed to identify the dominant oscillation frequency of the load, and the length of the statistical window is adaptively adjusted to match the oscillation period of the current load. Then, robust statistics such as the median and interquartile range are used instead of the mean and standard deviation to calculate the baseline center and width of the threshold. Finally, a time decay factor modulated by the oscillation amplitude is introduced. This allows the detection threshold to track the oscillation characteristics of the power grid in real time, appropriately widening the threshold to reduce false alarms when the load is stable, and rapidly tightening the threshold to improve detection sensitivity when the load fluctuates sharply, achieving a dynamic optimal balance between false alarm rate and missed detection rate. Simultaneously, using robust statistics to calculate the threshold avoids the distortion of threshold calculation by extreme points (such as brief shocks) in heavy-tailed distributions, making the threshold more representative of the reasonable fluctuation range of normal load, further enhancing the stability and reliability of the system. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of the real-time power consumption anomaly detection method in an embodiment of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0021] Example 1: See appendix Figure 1 This case proposes a real-time detection method for abnormal electricity consumption based on smart meters. The method includes the following steps: S1: Synchronously acquires three channels of raw data from the smart meter, including current data, at a sampling rate of 10kHz, and performs real-time calibration to provide a physical layer basis for anomaly detection. The three channels of raw data from the smart meter include: Instantaneous value of current It reflects the instantaneous intensity of the conductor current at time t. Acts such as electricity theft and short circuits directly change the current waveform, thus serving as the main anomaly detection carrier. Instantaneous voltage value It reflects the instantaneous value of the line-to-ground voltage at time t, and can be used as a basis for line status monitoring. A sudden drop in voltage indicates a short circuit, and a continuous low voltage indicates electricity theft. Phase angle It reflects the real-time phase difference between the current and voltage waveforms, and is used to identify the characteristics of capacitive / inductive loads and changes in the power factor.

[0022] S2: Within a preset statistical period, the collected instantaneous current values ​​are merged to construct a sequence of instantaneous current values. ;in, N represents the total number of sampling points within the preset statistical period T. The standard deviation of the instantaneous current values ​​used to establish the load fluctuation reference value is calculated based on the instantaneous current value sequence, i.e.: In the formula, The standard deviation of the instantaneous current value is used to define the range of normal current fluctuations; The average current over a preset statistical period T reflects the stability level of the load, i.e.: S3: Dynamically reconstruct the energy distribution of each frequency band in the instantaneous current value sequence, generating a reconstructed spectral entropy that accurately reflects the characteristics of abnormal energy transfer, thereby solving the problem of ambiguous abnormal features caused by frequency band aliasing. Specifically: S301: Use wavelet packet transform to decompose the original signal current instantaneous value sequence into M frequency bands, i.e. ;in, This represents the wavelet coefficient vector of the j-th frequency band.

[0023] S302: Extract the dominant intensity energy ratio of the fundamental component in the low-frequency band in the fundamental frequency band neighborhood to reflect load stability; that is: In the formula, This represents the fundamental frequency energy ratio, used to quantify the load's stable state and drive subsequent frequency band reconfiguration. These are the wavelet coefficients of the fundamental frequency band, which are the main energy carriers of the load; A represents the fundamental frequency band, typically 50Hz or 60Hz; A is the set of indexes for adjacent fundamental frequency bands, used to define the analysis range. The wavelet coefficients of the i-th frequency band form the core low-frequency features of the load.

[0024] S303: The number of frequency bands that dynamically adjust the adaptive focusing core feature region and compress noise based on the fundamental frequency energy ratio, i.e.: When the fundamental frequency energy ratio is greater than the load threshold, a high threshold is determined. When the load is stable, the fundamental component dominates the energy distribution, therefore the high-frequency band is essentially meaningless switching noise. If the original number of frequency bands is maintained, high-frequency noise will be included in the entropy calculation, polluting the reconstructed spectrum entropy results and consuming computational resources without providing useful information; therefore, it is necessary to compress the high-frequency band to improve computational efficiency and eliminate false positive interference, i.e.: In the formula, The number of reconstructed frequency bands reflects the dynamically optimized spectral resolution; M is the original number of frequency bands, reflecting the initial spectral coverage, which is usually 16. It is a high-frequency compression factor used to shrink the range of high-frequency analysis.

[0025] When the wave energy percentage is less than the load, a low threshold is determined. When this occurs, it indicates an abnormal load or strong interference (such as electricity theft), resulting in a significant decrease in the fundamental frequency energy ratio. Key information then concentrates in low-frequency harmonics, making the original low-frequency band resolution insufficient to capture subtle perturbation details. Maintaining the original number of frequency bands means that adjacent harmonics mixed in the same band will mask characteristic details and fail to resolve abnormal perturbations, leading to an increased false negative rate. Therefore, it is necessary to expand the low-frequency band to enhance the resolution of key harmonics during abnormal or strong interference events, ensuring that electricity theft characteristics are not masked and completely eliminating the risk of false negatives. In the formula, This is the low-frequency spread factor, used to extend low-frequency resolution.

[0026] Based on the dynamic adjustment results, the reconstructed frequency band set of the adaptively focused core feature region is obtained. .

[0027] S304: Calculate the cross-band energy transfer matrix based on the reconstructed frequency band set, quantify the cross-band energy transfer to reveal abnormal paths, i.e.: In the formula, The cross-band energy transfer matrix quantifies the energy coupling degree between the i-th reconstructed frequency band and the j-th reconstructed frequency band. It is used to identify harmonic resonance paths and separate strong interference full-band synchronous fluctuations from local frequency band anomalies of electricity theft. The closer the matrix element value is to 1, the more it indicates that there is a physically real energy transfer channel between reconstructed frequency band i and reconstructed frequency band j within a short time window, providing a clean input for subsequent spectral entropy correction. This represents the i-th reconstructed frequency band; For the j-th reconstructed frequency band; The length of the short time window is used to define the time scale for energy transfer analysis; This is the attenuation coefficient, used to control the rate at which cross-band coupling weakens with frequency difference; This is a dynamic energy transfer detection term used to quantify the instantaneous energy coupling strength of two reconstructed frequency band signals within a short time window, and to identify cross-frequency band energy transfer events. This is a frequency band energy normalization term, which eliminates the difference in energy magnitude within the frequency band itself in the form of a L2 norm. Let be the center frequency of the i-th reconstructed frequency band, used to locate the position of the frequency band in the spectrum; Let be the center frequency of the j-th reconstructed frequency band, used to locate the position of the frequency band in the spectrum.

[0028] S305: Based on the cross-band energy transfer matrix, the corrected frequency band energy proportion is calculated, establishing an anti-interference adaptive weighting system for spectral entropy calculation, accurately locking the frequency bands of electricity theft characteristics that are masked under strong interference environments, i.e.: In the formula, The weight correction value for the frequency band energy reflects the relative energy proportion of the frequency band energy after the j-th reconstruction in the global energy transfer network. When the cross-frequency band energy transfer matrix is ​​symmetric and uniform, the weight correction value of the frequency band energy degenerates into the traditional energy proportion. When the cross-frequency band energy transfer matrix is ​​asymmetric, it will amplify abnormal energy transfer paths.

[0029] S306: The weighted correction value based on band energy has a direction-sensitive spectral entropy characteristic, that is: In the formula, To reconstruct spectral entropy, an information entropy index is used to quantify the disorder of energy distribution in current signals; the larger the value, the more evenly the energy is distributed across frequency bands (such as normal load fluctuations); a sharp drop in value indicates that the energy is highly concentrated in a specific frequency band (such as harmonic abrupt changes caused by electricity theft).

[0030] S4: Calculate the instantaneous phase gradient of the instantaneous current value sequence, construct a phase quantization probability distribution model based on this gradient, then combine spectral entropy data to generate an entropy-phase differential coupling operator, and finally synthesize the quantized gradient entropy by suppressing interference terms through probability integration and dynamically weighting the spectral entropy components. Specifically: S401: By constructing an analytic signal through Hilbert transform, the real current signal of the instantaneous current value sequence is converted into a complex signal form, providing a mathematical basis for instantaneous phase calculation, namely: In the formula, For a complex analytic signal, its actual part is The imaginary part is It can fully characterize the instantaneous properties of a signal; u is the imaginary unit.

[0031] S402: Extracts the instantaneous phase change rate of the complex analytic signal to capture phase jump characteristics and identify nonlinear load disturbances, i.e.: In the formula, The instantaneous phase gradient reflects the rate of change of phase over time and is used to quantify phase transition characteristics. This is a time differential operator used to obtain the rate of change of the phase; This is the phase angle extraction function, used to calculate the instantaneous phase of the signal.

[0032] S403: Calculate the average phase value representing the typical phase state of the current load within the sliding time window based on the instantaneous phase gradient, i.e.: In the formula, The phase mean is used to establish a phase reference state and characterize typical load characteristics; where The length of the sliding time window is used to define the time range for statistical calculations; This represents the instantaneous phase gradient at the i-th sampling point at time t.

[0033] S404: Then, based on the phase mean, calculate the phase variance within the sliding time window, which indicates the degree of phase fluctuation dispersion, i.e.: In the formula, Phase variance is used to quantify the intensity of fluctuations in phase data; a larger value indicates a more severe phase transition.

[0034] S405: A normalization constant for calculating the phase probability distribution based on the instantaneous phase gradient, phase mean, and phase variance. This constant is used to transform a non-standard Gaussian function into an effective probability density function, reflecting the overall probability amplitude of the phase distribution within the current sliding time window. In the formula, Z is a normalization constant used to ensure that the probability density integral is 1; For phase space integration, the calculation range is limited to the smallest effective phase. To the maximum effective phase ; The exponential function is used to generate a probability basis function centered at the phase mean and having a phase variance distribution width; The phase offset is calculated by determining the geometric distance between the phase angle and the phase mean (i.e., the center value). The larger the distance, the greater the probability weight decay. This is a phase angle differential unit used to achieve continuous summation of the phase direction.

[0035] S406: Generates a phase quantum probability density function based on a normalized constant, used to transform continuous phase transitions into quantifiable probabilistic events, i.e.: In the formula, Let be the probability density, representing the probability of the phase value occurring; is a scaling factor used to make the area under the curve equal to 1; when a violent phase transition occurs, the probability density curve flattens, thus reducing the probability of abnormal phases; under stable loads, the probability density curve is sharply distributed, thus the typical phase probabilities are concentrated.

[0036] S407: A differential operator characterizing the sensitivity of spectral entropy to phase changes is calculated using reconstructed spectral entropy and instantaneous phase gradient, in order to establish the coupling relationship between spectral entropy and phase jump and capture telegraph eavesdropping targets, i.e.: In the formula, For entropy and phase coupling operators, the joint rate of change of reconstructed spectral entropy and instantaneous phase gradient is expressed, which is used to construct cross-domain differential correlation features; The spatial gradient of the phase is used to quantify the rate and direction of change of the phase angle in space.

[0037] S408: A composite control quantity that integrates phase statistics and spectral entropy, calculated based on probability density, entropy and phase coupling operators, reconstructed spectral entropy and instantaneous phase gradient. In the formula, To quantize gradient entropy, by fusing physical layer anti-interference quantity and information layer entropy modulation quantity, we achieve precise wavefront correction that is resistant to phase transition noise and adaptive, while suppressing phase transition interference and enhancing electricity theft characteristics. The phase transition suppression term is constructed by using probability-weighted integration to create a physical layer anti-interference barrier; when the phase angle is in an unstable state, i.e. ,but Automatically zeroing out phase angles, thereby intercepting the propagation path of phase transition noise, such as optical turbulence and sudden communication interference; when the phase angle is in the steady-state region, i.e. Then, the entropy and phase coupling operator are not attenuated and propagated, thus preserving the core instructions of wavefront correction, such as the distortion compensation signal; and through the integration interval By traversing all phases, a continuous spatial filter can be formed, and then a real-time reliability assessment can be performed on each phase element. This is a spectral entropy enhancement term, which dynamically amplifies and effectively controls the signal based on the spectral state and gradient intensity to achieve an information entropy-driven intelligent response; when the reconstructed spectral entropy is ordered, the enhancement term... The value tends towards 1, and the reinforcement strength is approximately equal to the dynamic weight. This actively enhances the correction signal to maximize the correction of wavefront distortion; when the reconstructed spectral entropy is disordered, the enhancement term... The intensity tends to 0, thus avoiding ineffective regulation and preventing over-response in noisy environments; The weights are dynamic and controlled by the phase gradient, i.e.: in, The historical maximum gradient magnitude within the running cycle is used to establish a normalized reference frame and map the current state to the interval [0, 1]. The zero-adjustment term is a very small normal number used to maintain minimal control and provide basic control signals during stable periods.

[0038] However, in older residential communities with aging power grids, issues such as aging power lines, illegal circuit modifications, mixed electricity use by small workshops, and severe load fluctuations during peak evening hours can lead to voltage flicker and subsequent multiple phase transitions, resulting in voltage fluctuations during the integral interval. The emergence of derivative discontinuities causes the probability density to oscillate sharply near the transition point, and the calculation result of the phase transition suppression term produces a step error at the transition boundary. Therefore, by constructing a dynamic partitioning operator on the two-dimensional manifold space formed by the phase and entropy gradients to identify the phase transition rate, singular points in the probability distribution are accurately removed, and the one-dimensional integral is reconstructed as an arc-length integral sum along the boundary of the smooth phase space, the problem of integral distortion caused by discontinuous phase transitions is solved, achieving a balance between mathematical rigor and engineering practicality in the detection model under complex power grid environments. Specifically: S4081: Defines a joint space for phase angle and quantized gradient entropy, elevating the one-dimensional discontinuity problem of phase jumps to a two-dimensional smooth manifold, laying the mathematical foundation for subsequent integral path reconstruction based on topological structures, namely: In the formula, It is a two-dimensional phase space manifold used to correlate phase with entropy gradient, overcoming the limitations of a single phase dimension; R is the set of real numbers, indicating that the phase angle can take any real value; It is a set of positive real numbers, reflecting the sensitivity of spectral entropy to phase changes.

[0039] S4082: Provides a real-time adaptive dynamic partitioning operator for phase space partitioning integration based on instantaneous phase gradient calculation, namely: In the formula, It is a dynamic partitioning operator that directly controls the number of partitions in a submanifold. is the hyperbolic tangent function, used to map the input to the interval [0, 1); This is the phase transition rate threshold, a critical value used to distinguish between normal fluctuations and drastic jumps.

[0040] S4083: Calculates the number of submanifolds based on the dynamic partitioning operator, i.e.: In the formula, K is the number of submanifolds, which is used to dynamically adjust the fineness of the phase space topology partitioning by sensing the phase transition intensity in real time. The maximum number of submanifolds allowed by the system; It is a floor function that guarantees the number of submanifolds is an integer.

[0041] S4084: Calculates the second derivative of the probability density, used to identify discontinuous regions in phase space, i.e.: In the formula, It is a set of singular point phases used to accurately pinpoint discontinuous transition intervals caused by voltage flicker or resonance; This is the second derivative of the probability density in the phase angle direction; X is the standard deviation of the probability density, used to quantify the overall volatility of the probability distribution; X is the curvature sensitivity factor.

[0042] S4085: Based on the number of submanifolds and the set of singular point phases, the original integration interval is decomposed into the sum of submanifold integrals after removing singular points. By integrating along the arc length of the smooth phase space boundary, derivative divergence and step errors at discontinuities are eliminated, i.e.: In the formula, Let be the closed, smooth boundary of the i-th submanifold, used to avoid the singular point phase set and ensure integral convergence; dl is the arc-length infinitesimal element of the boundary curve, used to define a computable measure on the topological boundary, i.e.: S4086: Based on submanifold integrals and the updating calculation of quantized gradient entropy, it is used to inject disturbance rejection capability while strictly maintaining the physical meaning of quantum gradient entropy, i.e.: In the formula, Update the value for the quantized gradient entropy.

[0043] S5: First, the oscillation characteristics of the quantized gradient entropy update value are extracted and the dominant frequency is identified. Then, the statistical window size is adaptively adjusted according to this frequency. Next, robust statistics are calculated using the median and interquartile range to resist heavy-tailed distribution interference. Finally, a dynamic threshold that intelligently adjusts with the grid state is generated, enabling the detection threshold to adaptively match the load oscillation characteristics, significantly reducing the false alarm and false false alarm rates while maintaining sensitivity. Specifically: S501: Calculate the gradient entropy power spectral density based on the updated quantized gradient entropy value, i.e.: In the formula, The energy intensity corresponding to frequency f is used to quantify the spectral characteristics of grid load oscillations, providing a physical basis for adaptive threshold updates; It is a Fourier transform operator used to transform time-domain signals (i.e., quantized gradient entropy update values) to the frequency domain.

[0044] S502: Identify the dominant oscillation frequency based on the energy intensity corresponding to frequency f, in order to locate the core oscillation characteristics of the load, i.e.: In the formula, The dominant oscillation frequency is used to locate the characteristic frequency of the most significant oscillation source. This is the preset frequency range.

[0045] S503: Dynamically adjust the length of the preset statistical period and constrain the boundaries according to the dominant frequency to make the window match the current oscillation period, that is: In the formula, This refers to the optimized statistical period length. b is the sampling rate, which reflects the number of data points per unit time; b is the number of oscillation periods. Minimum statistical period time constraint; The maximum statistical period time constraint; The lowest effective oscillation frequency; This is the highest effective oscillation frequency.

[0046] S504: Reconstruct the statistics of the updated quantized gradient entropy using the median and interquartile range, eliminating the interference of extreme points in the heavy-tailed distribution on the calculation of the mean and standard deviation, i.e.: In the formula, The location of the distribution center after reconstructing the updated value of the quantized gradient entropy represents the baseline energy level of normal load fluctuations; To obtain the median of the sequence, used to eliminate extreme value interference; From time t=1 to The optimized reconstructed quantized gradient entropy update value within the statistical period length; The distribution dispersion after reconstructing the updated value of the quantized gradient entropy represents the reasonable deviation range of normal load fluctuations; The interquartile range is used to capture the width of the main data distribution and to immunize outliers.

[0047] S505: A dynamic detection threshold that adaptively decays over time is calculated based on the distribution center position and distribution dispersion after being corrected by the updated value of the reconstructed quantized gradient entropy. This threshold is used to achieve a dynamic balance between fault detection sensitivity and false alarm rate. In the formula, The dynamic threshold is used to dynamically adjust the detection boundary, allowing for tolerance of errors during the system's stable period to prevent false alarms, and rapidly tightening the response during the oscillation period to reduce latency, thereby achieving high-precision anomaly detection and safety assurance. It is an exponential decay function with a dynamic decay factor as the decay coefficient, used to implement threshold decay behavior in the time dimension; This is the dynamic attenuation factor for oscillation amplitude modulation, used to control the sensitivity adaptive rate, i.e.: In the formula, The preset base attenuation factor; The amplitude of the oscillation energy at the dominant frequency; This represents the maximum allowable oscillation amplitude of the system.

[0048] S6: Determine whether electricity theft is constituted based on dynamic thresholds. The determination criteria are as follows: In the formula, The voltage sag represents the magnitude of the voltage drop, reflecting the system's voltage stability. is the effective value of the current, representing the actual power demand of the load; the product of the two represents the active power deficit caused by voltage drop; P is the rated transmission capacity of the equipment or line. To ensure a safety margin and avoid misjudgment due to measurement errors.

[0049] Example 2: Based on Embodiment 1, this application proposes a real-time power consumption anomaly detection system based on a smart energy meter, comprising a data acquisition module, a load fluctuation benchmark calculation module, a reconstructed spectral entropy generation module, a quantized gradient entropy synthesis module, an adaptive dynamic threshold calculation module, and a comprehensive power consumption anomaly judgment module. Wherein: The data acquisition module is used for high-speed and high-precision data interaction with smart energy meters. It synchronously acquires raw data of instantaneous current, instantaneous voltage, and phase angle at a sampling rate of 10kHz and performs real-time calibration to ensure the physical accuracy and timeliness of the data, providing a reliable physical layer basis for all subsequent analyses.

[0050] The load fluctuation benchmark calculation module is used to perform preliminary statistical analysis on the collected instantaneous current value sequence within a preset statistical period, calculate the average value and standard deviation of the current within that period, and define the range of normal current fluctuation under the current load condition as the initial benchmark reference value for subsequent anomaly detection.

[0051] The reconstructed spectral entropy generation module uses wavelet packet transform to decompose the current signal into multiple frequency bands. Then, it dynamically adjusts the number of frequency bands analyzed based on the fundamental energy ratio, forming a reconstructed set of frequency bands. Next, it calculates the cross-band energy transfer matrix to quantify the energy coupling path and corrects the energy ratio of each frequency band accordingly, ultimately generating a reconstructed spectral entropy that accurately reflects the characteristics of abnormal energy transfer. This addresses the problem of ambiguous abnormal features caused by frequency band aliasing in complex power environments.

[0052] The quantized gradient entropy synthesis module is used to extract the instantaneous phase gradient of the current signal through Hilbert transform and construct a phase quantized probability distribution model. Then, it calculates the entropy and phase coupling operator that characterizes the relationship between spectral entropy and phase change. By introducing dynamic partitioning operator and submanifold integration technology, it solves the integral distortion problem caused by phase discontinuity jumps in old power grids. Finally, it synthesizes a quantized gradient entropy with strong anti-interference ability and sensitive characteristics to enhance the ability to capture nonlinear disturbances such as electricity theft.

[0053] An adaptive dynamic threshold calculation module performs spectral analysis on the quantized gradient entropy sequence to identify the dominant oscillation frequency of the current load and adaptively adjusts the statistical window size accordingly. Subsequently, the median and interquartile range, which are insensitive to outliers, are used to calculate the reference center position and dispersion. Finally, a dynamic decay factor modulated by the oscillation amplitude is combined to generate a dynamic detection threshold that adaptively decays over time. This enables the detection system to intelligently adapt to dynamic changes in the load, thereby reducing false alarms while maintaining sensitivity. The comprehensive power consumption anomaly judgment module compares the real-time calculated quantized gradient entropy with an adaptive dynamic threshold. To further improve the accuracy of the judgment and prevent false positives, this module also considers key electrical parameters such as voltage drop amplitude and current RMS value. When the judgment conditions are met, the system determines that an abnormal power consumption event, such as electricity theft, has occurred and triggers the corresponding alarm signal to notify management personnel for handling.

[0054] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions will not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for real-time detection of abnormal electricity consumption based on a smart energy meter, characterized in that, Includes the following steps: Real-time acquisition of electricity consumption parameter data, including current data, from smart energy meters; Based on the current data within a preset statistical period, calculate the benchmark reference value for load fluctuation; The current data is subjected to time-frequency analysis to dynamically reconstruct its frequency band energy distribution and generate spectral entropy features characterizing the disorder of the energy distribution. The instantaneous phase change characteristics of the current data are extracted, and the spectral entropy characteristics and instantaneous phase change characteristics are fused to generate an anti-interference composite feature quantity; Based on the historical sequence analysis of the composite feature quantity, its oscillation characteristics are analyzed, and an adaptive detection threshold is calculated; The real-time generated composite feature quantity is compared with the adaptive detection threshold to determine whether an abnormal power consumption has occurred.

2. The real-time detection method for abnormal electricity consumption according to claim 1, characterized in that, The benchmark reference value for calculating load fluctuations includes: S201: Within a preset statistical period, the collected instantaneous current values ​​are merged to construct a sequence of instantaneous current values. ;in, N is the total number of sampling points within the preset statistical period T; S202: Calculate the standard deviation of the instantaneous current values ​​used to establish the load fluctuation reference value based on the instantaneous current value sequence, i.e.: ; In the formula, The standard deviation of the instantaneous current value; The average current value within a preset statistical period T, i.e.: 。 3. The real-time detection method for abnormal electricity consumption according to claim 2, characterized in that, The dynamic reconstruction of its frequency band energy distribution includes: S301: Use wavelet packet transform to decompose the original signal current instantaneous value sequence into M frequency bands, i.e. ;in, This represents the wavelet coefficient vector of the j-th frequency band; S302: Extract the dominant intensity energy ratio in the fundamental frequency band neighborhood to quantify the fundamental component's reflection of load stability in the low-frequency band, i.e.: ; In the formula, The proportion of fundamental wave energy; These are the wavelet coefficients for the fundamental frequency band; A represents the fundamental frequency band; A is the set of indices for the fundamental frequency bands. The wavelet coefficients of the i-th frequency band; S303: Dynamically adjusts the number of frequency bands used for spectral entropy calculation based on the fundamental frequency energy ratio, i.e.: ; In the formula, M represents the number of reconstructed frequency bands; M represents the number of original frequency bands. It is a high-frequency compression factor; It is the low-frequency spread factor; Determine the low threshold for load; Determine the high threshold for load.

4. The real-time detection method for abnormal electricity consumption according to claim 3, characterized in that, The generation of spectral entropy features characterizing the disorder of energy distribution also includes: S304: Calculate the cross-band energy transfer matrix based on the reconstructed frequency band set, i.e.: ; In the formula, This is a cross-band energy transfer matrix; This represents the i-th reconstructed frequency band; For the j-th reconstructed frequency band; The length of the short time window; The attenuation coefficient; Let i be the center frequency of the i-th reconstructed frequency band; Let j be the center frequency of the reconstructed frequency band; S305: Calculate the corrected frequency band energy ratio based on the cross-band energy transfer matrix, i.e.: ; In the formula, This is the weighted correction value for the frequency band energy; S306: The weighted correction value based on band energy has a direction-sensitive spectral entropy characteristic, that is: ; In the formula, To reconstruct the spectral entropy.

5. The real-time detection method for abnormal electricity consumption according to claim 4, characterized in that, The instantaneous phase change characteristics of the extracted current data include: S401: Converts the real current signal of the instantaneous current value sequence into a complex signal form, that is: ; In the formula, For a complex analytic signal, its actual part is The imaginary part is , ; u is the imaginary unit; S402: Extracts the instantaneous phase change rate of the complex analytic signal to capture phase jump characteristics and identify nonlinear load disturbances, i.e.: ; In the formula, The instantaneous phase gradient; For time differential operators; This is the phase angle extraction function, used to calculate the instantaneous phase of the signal.

6. The real-time detection method for abnormal electricity consumption according to claim 5, characterized in that, The generated anti-interference composite feature quantities include: S403: Calculate the average phase value representing the typical phase state of the current load within the sliding time window based on the instantaneous phase gradient, i.e.: ; In the formula, The average of the phases; The length of the sliding time window; This represents the instantaneous phase gradient at the i-th sampling point at time t; S404: Then, based on the phase mean, calculate the phase variance within the sliding time window, which indicates the degree of phase fluctuation dispersion, i.e.: ; In the formula, For phase variance; S405: A normalization constant for solving the phase probability distribution based on the instantaneous phase gradient, phase mean, and phase variance, used to transform a non-standard Gaussian function into an effective probability density function, i.e.: ; In the formula, Z is the normalization constant; For phase space integration, the calculation range is limited to the smallest effective phase. To the maximum effective phase ; It refers to a function; This is the phase offset. It is a phase angle differential unit; S406: Generates a phase quantum probability density function based on a normalized constant, used to transform continuous phase transitions into quantifiable probabilistic events, i.e.: ; In the formula, It represents the probability density; S407: Calculate the differential operator characterizing the sensitivity of spectral entropy to phase changes using the reconstructed spectral entropy and instantaneous phase gradient, i.e.: ; In the formula, For entropy and phase coupling operators; The spatial gradient of the phase; S408: A composite control quantity that integrates phase statistics and spectral entropy, calculated based on probability density, entropy and phase coupling operators, reconstructed spectral entropy and instantaneous phase gradient. ; In the formula, For quantized gradient entropy; This is a phase transition suppression term; This is a term that enhances spectral entropy. The weights are dynamic, i.e.: ; in, The historical maximum gradient magnitude within the operating cycle; Prevent zero trim items.

7. The real-time detection method and system for abnormal electricity consumption according to claim 6, characterized in that, When a phase discontinuity jump is detected, the influence of the discontinuity on the computation is eliminated by reconstructing the integration path as the sum of boundary integrals of multiple submanifolds in the phase space constituted by the phase and the differential operator, including: S4081: Defines the joint space of phase angle and quantized gradient entropy, i.e.: ; In the formula, Let R be a two-dimensional phase space manifold; R is the set of real numbers; It is the set of positive real numbers; S4082: Provides a real-time adaptive dynamic partitioning operator for phase space partitioning integration based on instantaneous phase gradient calculation, namely: ; In the formula, For dynamic partitioning operators; It is the hyperbolic tangent function; This is the phase transition rate threshold; S4083: Calculates the number of submanifolds based on the dynamic partitioning operator, i.e.: ; In the formula, K is the number of submanifolds; The maximum number of submanifolds allowed by the system; It is a rounding function; S4084: Calculates the second derivative of the probability density, used to identify discontinuous regions in phase space, i.e.: ; In the formula, For singular point phase set; is the standard deviation of the probability density, used to quantify the overall volatility of the probability distribution; X is the curvature sensitivity factor. S4085: Based on the number of submanifolds and the set of singular phases, the original integration interval is decomposed into the sum of submanifold integrals after removing singular points, i.e.: ; In the formula, Let be the closed, smooth boundary of the i-th submanifold; dl is the arc length infinitesimal element of the boundary curve, i.e.: ; S4086: Based on the submanifold integral and the update calculation of the quantized gradient entropy, i.e.: ; In the formula, Update the value for the quantized gradient entropy.

8. The real-time detection method for abnormal electricity consumption according to claim 6, characterized in that, The calculation of the adaptive detection threshold includes: S501: Calculate the gradient entropy power spectral density based on the updated quantized gradient entropy value, i.e.: ; In the formula, The energy intensity corresponding to frequency f; For Fourier transform operators; S502: Identify the dominant oscillation frequency based on the energy intensity corresponding to frequency f, i.e.: ; In the formula, The dominant oscillation frequency; Preset frequency range; S503: Dynamically adjust the length of the preset statistical period and constrain the boundaries according to the dominant frequency to make the window match the current oscillation period, that is: ; In the formula, This refers to the optimized statistical period length. b is the sampling rate; b is the number of oscillation periods. Minimum statistical period time constraint; The maximum statistical period time constraint; The lowest effective oscillation frequency; The highest effective oscillation frequency; S504: A statistic for calculating the updated value of the quantized gradient entropy, eliminating the interference of extreme points on the calculation of the mean and standard deviation, i.e.: ; In the formula, To reconstruct the distribution center position after correcting the updated value of the quantized gradient entropy; To obtain the median of the sequence; From time t=1 to The optimized reconstructed quantized gradient entropy update value within the statistical period length; To reconstruct the distribution dispersion of the updated quantized gradient entropy value; Interquartile range; S505: A dynamic detection threshold that adaptively decays over time is calculated based on the distribution center position and distribution dispersion corrected by the updated value of the reconstructed quantized gradient entropy. This threshold is used to achieve a dynamic balance between fault detection sensitivity and false alarm rate. ; In the formula, For dynamic thresholds; It is an exponential decay function with a dynamic decay factor as the decay coefficient; The dynamic attenuation factor for oscillation amplitude modulation is: ; In the formula, The preset base attenuation factor; The amplitude of the oscillation energy at the dominant frequency; This represents the maximum allowable oscillation amplitude of the system.

9. The real-time detection method for abnormal electricity consumption according to claim 8, characterized in that, The determination of whether an abnormal power consumption has occurred includes: ; In the formula, This refers to the voltage drop magnitude. P represents the effective value of the current; P is the rated transmission capacity of the equipment or line. This is for the safety factor.

10. A system for implementing the detection method according to any one of claims 1-9, characterized in that, include: The data acquisition module is used to collect electricity consumption parameter data from smart meters in real time. The benchmark calculation module calculates the benchmark reference value for load fluctuation based on the current data within a preset statistical period. The feature extraction module is used to perform time-frequency analysis on current data, dynamically reconstruct its frequency band energy distribution, and generate spectral entropy features and instantaneous phase change features. The feature generation module is used to fuse spectral entropy features and instantaneous phase change features to generate an interference-resistant composite feature quantity. The adaptive threshold calculation module analyzes the oscillation characteristics of the historical sequence of composite features and uses a robust statistical method to dynamically calculate the adaptive detection threshold. The anomaly detection module is used to compare the real-time generated composite feature quantity with the adaptive detection threshold to determine whether an abnormal power consumption has occurred.