A method and device for detecting meter abnormality based on deep mixed normalization

CN117289200BActive Publication Date: 2026-09-22BEIJING UNIV OF POSTS & TELECOMM +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311270750.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2026-09-22
Estimated Expiration
2043-09-28

AI Technical Summary

Technical Problem

而且,多维时间序列中很可能同时包含连续变量和离散变量,而往往处理连续量和离散量最适合的标准化方法是不同的,目前并没有针对混合特征时间序列设计的标准化方法

Benefits of technology

[0051]从而,本申请提出的一种基于深度混合标准化的电能表异常检测方法,基于深度混合标准化模块和自编码器模型的电能表异常检测模型进行电能表多变量长时间序列数据的异常检测,最终确定异常程度,其中提出深度混合标准化模块,该模块允许将原始数据直接送入自编码器模型的深度模型并与神经网络的其他参数一同进行迭代训练。该深度混合标准化模块根据当前训练任务和模型并利用所有特征的信息来学习执行最优的标准化方案,并且通过集成两个可学习标准化子模块可以有效处理混合特征的数据。以提高现有基于重构的智能电表多维时序异常模型的准确率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117289200B_ABST
    Figure CN117289200B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on depth mixed standardization's electric energy meter anomaly detection method and device.Therein, method includes: obtaining the multivariate long time series data of historical detection of to-be-measured electric energy meter;Multivariate long time series data is input to the electric energy meter anomaly detection model of pre-training, and the reconstruction data of each time step of to-be-measured electric energy meter is output, wherein anomaly detection model is the electric energy meter anomaly detection model based on depth mixed standardization module and auto-encoder model;According to the multivariate long time series data of each time step of to-be-measured electric energy meter and reconstruction data, the anomaly score of each time step of to-be-measured electric energy meter is determined, and according to anomaly score, the anomaly degree of each time step is determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electricity meter testing technology, and more specifically, to an electricity meter anomaly detection method and apparatus based on deep hybrid standardization. Background Technology

[0002] Currently, unsupervised anomaly detection methods for multidimensional time series data in smart meters can be categorized into three main types: statistical methods, machine learning methods, and deep learning methods. Statistical methods require data to satisfy pre-defined statistical assumptions, while real-world data often exhibits complex and unknown distributions, making it difficult to construct effective statistical models. Traditional machine learning models struggle to directly capture the contextual relationships within time series data, making it difficult to model the complex patterns of multidimensional time series. In the smart grid field, time series data from industrial equipment such as electricity meters have become increasingly complex and random with technological advancements. Various systems continue to generate massive amounts of data, necessitating the development of deep learning methods that require large datasets for training. In recent years, deep learning-based time series anomaly detection has become an important area of ​​research. Numerous unsupervised deep anomaly detection methods have emerged, demonstrating significantly better performance than traditional anomaly detection methods. Overall, deep learning-based methods exhibit relatively high accuracy in multidimensional time series anomaly detection, and their model processing is relatively convenient.

[0003] Unsupervised multidimensional time-series anomaly detection methods for smart meters based on deep learning can be broadly categorized into two types: prediction-based methods and reconstruction-based methods. Both assume that the collected training data contains only normal time series and train a model based on this data to capture normal patterns in multidimensional time series and detect anomalies. Prediction-based techniques predict future observations from the input time series and then identify anomalies based on the difference between the model's predictions and actual values. Reconstruction-based methods aim to extract the most representative patterns from the data by setting an information bottleneck, ignoring non-representative patterns. It trains an autoencoder to compress normal data into a low-dimensional latent representation, then reconstructs the original input data and uses the reconstruction error from the test data to detect anomalies. Overall, in complex real-world systems, multidimensional time-series data exhibits complex pattern variations. The difficulty in recording all variables and external factors, the inherent unlabeled nature of historical data, and the unpredictable nature of anomalies make prediction methods based on historical data difficult to apply. Furthermore, the prediction error increases significantly with the number of predicted time points, leading to poor performance of prediction-based methods in practical applications. Existing reconstruction-based multidimensional time series anomaly detection methods can learn the correlation between time series data through models, thereby enabling processing and analysis. Furthermore, the reconstruction model is suitable for long-series anomaly detection and has already provided state-of-the-art results on numerous challenging real-world datasets.

[0004] However, existing reconstruction-based multidimensional time series anomaly detection methods for electricity meters are sensitive to data standardization schemes, and the traditional data standardization schemes they use are difficult to adapt to multidimensional time series data in different scenarios. Data typically needs to be standardized before being fed into the model to eliminate the influence of large-scale dimensions and different units between dimensions. If the data is not properly standardized, the performance of deep learning models may degrade rapidly. However, due to the complexity of multidimensional time series patterns and the differences in data across different application domains, current standardization methods based on heuristic feature extraction are difficult to adapt to multidimensional time series data in different application scenarios. For a new dataset, it is difficult to determine which standardization method is most suitable. Moreover, multidimensional time series may contain both continuous and discrete variables, and the most suitable standardization methods for handling continuous and discrete variables are often different; currently, there is no standardization method designed for time series with mixed features. Furthermore, since different training tasks and models tend to extract different data features, current data standardization and model training are relatively independent, making it difficult to guarantee that the applied data standardization scheme is optimal for the current task and model. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method and apparatus for detecting anomalies in electricity meters based on deep hybrid standardization.

[0006] According to one aspect of the present invention, a method for detecting anomalies in electricity meters based on deep hybrid normalization is provided, comprising:

[0007] Acquire multivariate long-term series data of historical measurements of the energy meter under test;

[0008] Multivariate long-term series data is input into a pre-trained electricity meter anomaly detection model, and the reconstructed data of the electricity meter under test at each time step is output. The anomaly detection model is an electricity meter anomaly detection model based on a deep hybrid normalization module and an autoencoder model.

[0009] Based on the multivariate long-time series data and reconstructed data of each time step of the energy meter under test, the anomaly score of each time step of the energy meter under test is determined, and the degree of anomaly of each time step is determined based on the anomaly score.

[0010] Optionally, the multivariate long-term series data includes: phase A current, phase B current, phase C current, phase A voltage, phase B voltage, phase C voltage, forward active energy indication, reverse active energy indication, forward reactive energy indication, reverse reactive energy indication, phase A active power, phase B active power, phase C active power, total active power, phase A reactive power, phase B reactive power, phase C reactive power, total reactive power, phase A power factor, phase B power factor, phase C power factor, and total power factor.

[0011] Optionally, it also includes: a deep hybrid normalization module for training the anomaly detection model, specifically:

[0012] Acquire multivariate time series sample data from multiple historical energy meter readings and merge them into a single multivariate long time series sample data.

[0013] Input multivariate long-term series sample data into the deep z-score normalization module, and output the first candidate time series sample data;

[0014] Input multivariate long-series sample data into the depth min-max normalization module, and output the second candidate time-series sample data;

[0015] The first candidate time series sample data and the second candidate time series sample data are fed into the multiplexer to output the standardized time series sample data.

[0016] Optionally, it also includes: inputting standardized time series sample data into the autoencoder model to train the electricity meter anomaly detection model.

[0017] Optionally, multivariate long-series sample data is input into the deep z-score normalization module, which outputs the first candidate time-series sample data, including:

[0018] The average value of each dimension is extracted from the multivariate long-term series sample data to form an average value sequence vector;

[0019] Based on the mean sequence vector, determine the translation operator for multivariate long-term series sample data;

[0020] The translation operator is used to translate each dimension of the multivariate long-term series sample data to a new center to determine the translated multivariate long-term series sample data.

[0021] Determine the scaling operator for the multivariate long-term series sample data based on the standard deviation of each dimension.

[0022] The scaling operator is used to scale each dimension of the translated multivariate long-term series sample data to determine the first candidate time series sample data;

[0023] The standardization formula for the first candidate time series sample data is as follows:

[0024]

[0025] In the formula, It is unstandardized multivariate time series sample data.

[0026] The formula for calculating the translation operator is:

[0027] α1=W μ μ

[0028] In the formula, The weight matrix is ​​the learnable weight matrix of the autoencoder model neural network. For the translation operator, μ = [μ1, μ2, ..., μ] d [] represents the average value sequence vector;

[0029] The scaling operator is calculated using the following formula:

[0030] β1=w σ σ

[0031] In the formula, σ=[σ1, σ2,...,σ d ] represents the standard deviation of each dimension of a multivariate long-term series sample data. β1 is the weight matrix of the scaling layer, and β2 is the scaling operator.

[0032] Optionally, multivariate long-series sample data are input into a depth min-max normalization module, which outputs second candidate time-series sample data, including:

[0033] Extract the minimum and range of multivariate long-term series sample data;

[0034] The second candidate time series sample data is determined based on the minimum value and the range;

[0035] The standardization formula for the second candidate time series sample data is as follows:

[0036]

[0037] In the formula, m = [m1, m2, ..., m d ] and r = [r1, r2, ..., r d The minimum and range of each feature in the multivariate long-term series sample data were recorded respectively. and It is a learnable weight matrix used for linear transformations. These are the standardized second candidate time series sample data. It is unstandardized multivariate time series sample data, α2 is the translation operator calculated based on the minimum value of each feature, β2 is the scaling operator calculated based on the range of each feature, % is the Hadamard division operator, and abs(·) is a function that takes the absolute value of each element of the vector.

[0038] Optionally, the standardization formula for standardized time series sample data is:

[0039]

[0040]

[0041] In the formula, ⊙ represents the Hadamard multiplication operator, and W c Let c = [c1, c2, ..., c3] be the learnable weight matrix of the multiplexer. d ] records the data type of each dimension of the multivariate long-term series sample data, and I(·) is an indicator function applied to each element of the vector.

[0042] Optionally, the formula for calculating the outlier score is:

[0043] AS t =(x′) t -x t ) 2

[0044] In the formula, AS t Let x′ be the anomaly score at time step t of the multivariate long-term series data of the energy meter under test. t and x t These are the reconstructed data and the original data at time step t of the multivariate long-term series data of the energy meter under test.

[0045] According to another aspect of the present invention, an anomaly detection device for an electricity meter based on deep hybrid standardization is provided, comprising:

[0046] The acquisition module is used to acquire multivariate long-term series data of historical tests of the energy meter under test;

[0047] The output module is used to input multivariate long-term series data into a pre-trained electricity meter anomaly detection model and output the reconstructed data of the electricity meter under test at each time step. The anomaly detection model is an electricity meter anomaly detection model based on a deep hybrid normalization module and an autoencoder model.

[0048] The determination module is used to determine the anomaly score of each time step of the energy meter under test based on the multivariate long-term series data and reconstructed data of each time step, and to determine the degree of anomaly of each time step based on the anomaly score.

[0049] According to another aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing a computer program for performing the methods described in any of the above aspects of the present invention.

[0050] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the method described in any of the preceding aspects of the present invention.

[0051] Therefore, this application proposes a method for detecting anomalies in electricity meters based on deep hybrid normalization. This method utilizes a deep hybrid normalization module and an autoencoder model to detect anomalies in multivariate long-term time-series data of electricity meters, ultimately determining the degree of anomaly. The proposed deep hybrid normalization module allows raw data to be directly fed into the deep model of the autoencoder model and iteratively trained along with other parameters of the neural network. This module learns and executes the optimal normalization scheme based on the current training task and model, utilizing information from all features. Furthermore, by integrating two learnable normalization sub-modules, it can effectively handle data with mixed features, thereby improving the accuracy of existing reconstruction-based multidimensional time-series anomaly models for smart meters. Attached Figure Description

[0052] Exemplary embodiments of the present invention can be more fully understood by referring to the following figures:

[0053] Figure 1 This is a flowchart illustrating an exemplary embodiment of the present invention for a method of detecting anomalies in an energy meter based on deep hybrid standardization.

[0054] Figure 2 This is a schematic diagram of the discrete time series of z-score normalization provided in an exemplary embodiment of the present invention;

[0055] Figure 3 This is a schematic diagram of a deep hybridization standardization module provided in an exemplary embodiment of the present invention;

[0056] Figure 4 This is a schematic diagram of the structure of an energy meter anomaly detection device based on deep hybrid standardization provided in an exemplary embodiment of the present invention;

[0057] Figure 5 This is the structure of an electronic device provided in an exemplary embodiment of the present invention. Detailed Implementation

[0058] Hereinafter, exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments of the present invention. It should be understood that the present invention is not limited to the exemplary embodiments described herein.

[0059] It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps described in these embodiments do not limit the scope of the invention.

[0060] Those skilled in the art will understand that the terms "first," "second," etc., in the embodiments of the present invention are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they indicate a necessary logical order between them.

[0061] It should also be understood that in the embodiments of the present invention, "multiple" can refer to two or more, and "at least one" can refer to one, two or more.

[0062] It should also be understood that any component, data or structure mentioned in the embodiments of the present invention can generally be understood as one or more unless explicitly defined or given contrary instructions in the context.

[0063] Furthermore, the term "and / or" in this invention is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this invention generally indicates that the preceding and following related objects have an "or" relationship.

[0064] It should also be understood that the description of the various embodiments in this invention emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.

[0065] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.

[0066] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the invention or its application or use.

[0067] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, they should be considered part of the specification.

[0068] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0069] The embodiments of this invention can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate together with a wide range of other general-purpose or special-purpose computing system environments or configurations. Well-known examples of terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, and servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems, etc.

[0070] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are executed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.

[0071] Exemplary methods

[0072] Figure 1 This is a flowchart illustrating an exemplary embodiment of the present invention for a method of detecting anomalies in electricity meters based on deep hybrid standardization. This embodiment can be applied to electronic devices, such as… Figure 1 As shown, the energy meter anomaly detection method 100 based on deep hybrid standardization includes the following steps:

[0073] Step 101: Obtain multivariate long-term series data of historical tests of the electricity meter under test;

[0074] Step 102: Input multivariate long-term series data into a pre-trained electricity meter anomaly detection model and output the reconstructed data of the electricity meter under test at each time step. The anomaly detection model is an electricity meter anomaly detection model based on a deep hybrid normalization module and an autoencoder model.

[0075] Step 103: Based on the multivariate long-term series data and reconstructed data of each time step of the energy meter under test, determine the anomaly score of each time step of the energy meter under test, and determine the degree of anomaly of each time step based on the anomaly score.

[0076] Specifically, raw multivariate time series data typically undergoes normalization before it can be used to train deep learning models. Normalization eliminates the influence of differences in units and scales between features, mapping the data distribution to the vicinity of the non-saturation region of the neural network activation function, greatly accelerating model training and improving its generalization performance. MTS normalization is usually achieved by appropriately shifting and scaling the original sequence:

[0077]

[0078] in t = 1, 2, ..., T represents the observation vector s at each time step of the original time series. t Normalized data, and The magnitudes of the translation and scaling applied to each dimension of the original MTS data were recorded separately. It is the Hadamard division operator.

[0079] z-score normalization is the most widely used MTS normalization scheme, where α = [μ1, μ2, ..., μ...]. d ] and β = [σ1, σ2,...,σ d A special case of ], where μ k and σ k These refer to the global mean and standard deviation of the k-th feature, respectively.

[0080]

[0081] in s t The value of the k-th feature. However, applying z-score normalization to digital signals and time series characterizing switch states is inappropriate because switch time series are seriously inconsistent with the assumption that the data follows a normal distribution, and calculating their mean and standard deviation is meaningless. Figure 2 A portion of the MSL training dataset was visualized, showing the data distribution of three switch features of MSL before and after applying z-score normalization. z-score normalization maps the original features, which only take values ​​of 0 and 1, to switch values ​​of different scales, resulting in some features becoming very large in scale and large scale differences between different dimensions, which is not conducive to model convergence.

[0082] Compared to z-score normalization, min-max normalization is less affected by discrete data and can maintain relative stability of the data scale. Min-max normalization is α = [m1, m2, ..., m...]. d ] and β = [r1, r2, ..., r d A special case of ], where mk and r k These refer to the minimum value and the range of the k-th feature, respectively.

[0083]

[0084] in Let represent the k-th dimension of a multivariate time series. However, min-max normalization is susceptible to extreme values ​​and may scale most of the data to a small range, making it unsuitable for continuous time series data.

[0085] While conventional normalization methods can eliminate large-scale features to some extent, deep learning models are typically sensitive to data normalization, and the optimal normalization scheme varies across different datasets. If the data is not properly normalized, the performance of neural networks can degrade rapidly. Recent work has attempted to address this issue by designing more complex normalization schemes, which have yielded slightly better performance, but these methods are largely dependent on past experience and cannot be guaranteed to be optimal for the current training task and data.

[0086] Therefore, this application employs a learnable normalization module, called the Deep Hybrid Normalization Module. This module allows raw time-series data to be directly fed into a neural network model for training without any manual normalization of the data. The module is trained end-to-end with the remaining parameters of the deep model during backpropagation, learning how to optimize the current training task by appropriately shifting and scaling each dimension of the multivariate time series, i.e., estimating the most suitable data normalization parameters α and β.

[0087] A schematic diagram of the proposed deep hybrid normalization module is shown below. Figure 3 As shown, it contains two learnable normalization sub-modules: Depth z-score normalization (DZSN) and Depth min-max normalization (DMMN). Represents the original multivariate time series data. and This represents candidate time series obtained by moving and scaling different learnable normalized submodules, where x represents the final normalized data that is more suitable for subsequent tasks. Automatically learning normalized data using neural networks is not easy, as some layers of a neural network often require normalized data to function properly. Therefore, the module must first be initialized to a relatively suitable state to ensure the subsequent reconstruction task can proceed normally and guarantee training stability.

[0088] The DZSN module first extracts the average value of each dimension from the original time series, μ = [μ1, μ2, ..., μ].d This vector can be used as an initial estimate for moving each time series, and the network will then learn to appropriately modify the movement based on this summary representation. The translation operator α1 used for normalization is then obtained by a linear transformation of the extracted summary representation:

[0089] α1=W μ μ (4)

[0090] in This is the learnable weight matrix of the neural network. The size of the shift applied to each dimension of the original MTS data is recorded. This layer is a learnable shift layer because it estimates how the data must be shifted before being fed into the network. Since using a linear transformation avoids the saturation problem of the activation function, this layer can handle unnormalized data, allowing the proposed model to be trained end-to-end without addressing stability issues. Furthermore, because the shift amount for each dimension is obtained from the aggregation of the averages of all dimensions of the original data, this approach allows for more robust normalization by leveraging potential correlations between different features.

[0091] After translating each dimension of the original MTS to the new center using the α1 operator, the scaling operator β1 is used to appropriately scale each dimension of the data. The scaling operator β1 can be similarly defined as a linear transformation of the standard deviation of the original data:

[0092] β1=w σ σ (5)

[0093] where σ1=[σ1, σ2,...,σ d ] represents the standard deviation of each dimension of the original data. This is the weight matrix of the scaling layer, and β1 is an estimate of the scaling scale before the data is fed into the network. After processing by the shift layer and the scaling layer, the data undergoes a normalization operation, which can be represented as follows:

[0094]

[0095] in This is the Hadamard division operator, and `abs(·)` is a function that takes the absolute value of each element of the vector. This learnable normalization uses the mean and standard deviation of the original data as a benchmark, as performed with z-score normalization, but it is fine-tuned according to the training task using a learnable weight matrix to optimize the training. Because normalization typically scales the data to positive numbers, to preserve the interpretability of the learnable normalization used as much as possible, the proposed method uses the absolute value of the scaling layer's output as the scaling value for the original data.

[0096] Similarly, DMMN obtains a second set of normalization schemes by extracting the summative representations of the minimum and range of the original data:

[0097]

[0098] Where m = [m1, m2, ..., m d ] and r = [r1, r2, ..., r d The minimum value and range of each feature in the original data were recorded respectively. and It is a learnable weight matrix used for linear transformations. This is the normalized data. This normalization is the result of fine-tuning based on min-max normalization.

[0099] at last, and Candidate normalized data are fed into a multiplexer to obtain the final normalized data used for neural network training. This process can be represented as:

[0100]

[0101] Where ⊙ represents the Hadamard multiplication operator, W c This represents the learnable weight matrix of the multiplexer. And c = [c1, c2, ..., c...]. d [This record shows the data type for each dimension of the original data. When the k-th feature of the original time series is a continuous quantity, c...] k The value of c is 1; when the k-th feature of the original time series is a discrete quantity, c k The value is 0. This multiplexer uses the data type of each dimension of the original data as prior knowledge for initialization, and is used to select each dimension from... and Choose the more suitable normalization scheme. It is non-linear, and I(·) is an indicator function applied to each element of the vector. The result is 1 when the element is greater than or equal to 0, and 0 otherwise.

[0102]

[0103] The proposed deep hybrid normalization module has a total of 5 learnable weight matrices, W μ W σ W m W r and W cThese five weight matrices are initialized as a diagonal matrix and a small, uniformly distributed noise. It can be assumed that when performing a linear transformation using these initialized weight matrices, the output vector and input vector are almost identical. Therefore, applying this initialized module to process the original multidimensional time series data is equivalent to applying z-score normalization to the continuous variables in the original data and max-min normalization to the discrete variables. Thus, the data is initially initialized to a relatively suitable state, ensuring stable training of the subsequent neural network. During training, this module continuously adjusts the normalization scheme according to the training task to optimize the training. The proposed DLS module, as the top module of each neural network, allows for end-to-end training with other layers of the deep network using conventional gradient descent algorithms.

[0104]

[0105] Where L represents the loss function for the training task, W represents the parameters of the neural network following the DLS module, and η represents the learning rate. During the inference phase, the parameters of this module remain fixed, and normalized data is obtained after the test data is fed into this module.

[0106] The proposed deep hybrid normalization module is trained together with the autoencoder model. During the testing phase, similar to many other reconstruction-based methods, the DHN (Multidimensional Time-Series Anomaly Detection) method for smart meters obtains its anomaly score by calculating the reconstruction error at each time step of the test data, i.e.:

[0107] AS it =(X′) it -X it ) 2 (11)

[0108] AS it Let be the anomaly score of the i-th test data at time step t. The choice of threshold depends on the application scenario, and there are many studies on dynamically configuring the threshold based on the anomaly score. This invention focuses on designing a framework for learning high-level semantic features of data and performing anomaly detection. Therefore, the experimental results reported in this invention are based on the highest-scoring threshold, as has been done in previous work.

[0109] This application addresses the problem of difficulty in selecting the optimal standardization scheme in existing reconstruction-based smart meter MTS anomaly detection methods. It proposes a deep hybrid standardization module for MTS anomaly detection, which learns the optimal standardization scheme for the current model and training task based on information from all features. This module effectively handles data with mixed features, improving the generalization ability and anomaly detection accuracy of existing smart meter MTS anomaly detection models.

[0110] Furthermore, the proposed multi-dimensional time-series anomaly detection method for smart meters based on deep hybrid normalization modules was compared with 14 more advanced models on five authoritative real-world datasets representing the diversity of time-series data distributions and actual smart meter datasets. The results demonstrated the effectiveness and advancement of the proposed multi-dimensional time-series anomaly detection method for smart meters based on adversarial contrastive autoencoders.

[0111] 1. Evaluation Indicators

[0112] AUC, Fc1, and PA%K were selected as evaluation metrics to assess the performance of the proposed method and the baseline.

[0113] Area Under Curve (AUC). AUC is one of the most popular metrics for evaluating unsupervised anomaly detection tasks. It is the area under the receiver operating curve (ROC) and the coordinate axes. AUC directly reflects the quality of the algorithm's ranking of anomaly scores on the test samples, excluding the influence of thresholds. The AUC value ranges from 0 to 1. A perfect ranking will result in an AUC of 1, while a trivial model based on random guessing will have an AUC value close to 0.5.

[0114] Composite F-score (Fc1). Fc1 is a recently proposed metric that focuses on a model's ability to detect outliers while avoiding the overestimation of model performance caused by point adjustment strategies. It changes the original F1 score's recall calculation method to calculate the recall of outlier segments, while maintaining the original method of calculating point-by-point accuracy. A model with higher outlier recall and fewer false positives at normal time steps will receive a higher Fc1 score.

[0115] Point Adjustment %K (PA%K). To address the overestimation of model performance caused by point adjustment strategies, recent literature has proposed PA%K. It also calculates the F1 score for all time steps, but only applies point adjustment to adjust the predicted values ​​when the proportion of outliers detected by the model in a continuous outlier segment exceeds K percent of the entire outlier segment's length. Then, the model's dependence on K is reduced by adjusting K and calculating the area under the curve of PA%K.

[0116] 2. Comparison Methods

[0117] The proposed DHN method was compared with 14 baseline methods, as shown below. Among them, LOF, OSVM, and iForest are classic machine learning-based anomaly detection methods, while the others are recently popular deep learning-based time series anomaly detection algorithms.

[0118] OCSVM is a method that maps data samples to a high-dimensional feature space using a kernel function and delineates positive anomaly boundaries.

[0119] LOF (Location of Fiber) is a method for anomaly detection by calculating the local density deviation of a given data point relative to its neighborhood.

[0120] iForest is an ensemble model that isolates anomalies by randomly selecting features and randomly splitting observations.

[0121] MSCRED is a model that uses convolutional neural networks to obtain feature maps of samples at different scales and then reconstructs them at multiple scales using an attention-based convolutional long short-term memory network.

[0122] BeatGAN is a model based on an adversarial autoencoder structure. It adds a discriminator to the original autoencoder structure to improve the realism of the autoencoder reconstruction.

[0123] USAD. An anomaly detection method based on two autoencoders trained adversarially to reconstruct data. Anomaly scores are calculated using the reconstruction errors of the two autoencoders.

[0124] InterFusion. A reconstruction model based on two hierarchical variational autoencoders, which model the inter-metric correlation and temporal correlation of multidimensional time series, respectively.

[0125] GDN is a model that uses attention mechanisms and graph neural networks to learn the structure graph of multidimensional time series and predict their future values, while utilizing prediction errors to detect outliers.

[0126] GTA is a predictive model that combines graph neural networks and Transformers to mine multidimensional time series features. It also uses the error between predicted and observed values ​​to calculate anomaly scores.

[0127] TranAD is a deep Transformer-based reconstruction model that leverages self-regulation and adversarial training to amplify errors and achieve stable performance.

[0128] AT. A Transformer-based model that detects anomalies by combining reconstruction error and correlation differences between sequences.

[0129] CAE_AD is an end-to-end autoencoder that combines contrastive learning with contextual and instance contrast to obtain robust data representations.

[0130] TSMAE is a memory-enhanced autoencoder that introduces a memory mechanism to reorganize the latent vectors of samples to increase the information bottleneck effect of the autoencoder and suppress the model's generalization ability.

[0131] RAE is an autoencoder training framework that obtains clearer reconstructed samples by optimizing a proposed loss function with constraints.

[0132] 3. Implementation details

[0133] DHN was implemented using Python 3.8 and PyTorch 1.12. DHN uses a single-layer GRU as both encoder and decoder. The input time series window size is 128, the stride is 8, the batch size is 128, and the dimension of the latent vectors is also set to 128. The original training data was divided into training and validation sets in an 8:2 ratio, with a maximum of 200 training epochs. The FAAE was trained using the Adam optimizer with a learning rate and weight decay of 1e-4. Training was stopped early when the reconstruction loss on the validation set did not decrease for five consecutive epochs, and the model with the lowest reconstruction loss on the validation set was retained. All experiments were conducted on a Linux workstation equipped with an Intel 20-core CPU, 128GB RAM, and two NVIDIA RTX 3090 GPUs. All experiments were repeated five times under different random seeds, and the average results are reported.

[0134] 4. Introduction to Public Datasets

[0135] Five real-world datasets from three scenarios were used, and Table 1 summarizes the properties of these datasets.

[0136] Secure Water Treatment (SWaT). SWaT is a continuously operating water treatment system that collects data from 51 sensors, recording anomalous events caused by cyber and physical attacks.

[0137] Server Machine Dataset (SMD). SMD is a dataset collected and publicly released by a large internet company over a five-week period from server machines with 38 monitoring metrics.

[0138] PSM (Pooled Server Metrics) is a dataset collected from multiple application server nodes within eBay, comprising 26 dimensions.

[0139] The Mars Science Laboratory (MSL) dataset and the Soil Moisture Active Passive (SMAP) dataset. Both MSL and SMAP datasets are real-world datasets from NASA, with 55 and 25 dimensions respectively, and contain telemetry anomaly data derived from Incident Surprise Anomaly (ISA) reports from spacecraft monitoring systems.

[0140] Table 1. Attributes of the datasets used in the experiment.

[0141]

[0142] 5. Evaluation of results from public datasets

[0143] Tables 2, 3, and 4 report the AUC, F, and F values ​​of DHN and other baseline models, respectively. c Scores for 1 and PA%K metrics. Bold text indicates the best score for each dataset, and underlined text indicates the second-best score. Overall, DHN's average scores across all three metrics are significantly higher than other baseline models, demonstrating that DHN outperforms all the comparison methods.

[0144] Table 2 Comparison of baseline method and DHN results under AUC.

[0145]

[0146] Table 3 Comparison results of baseline method and DHN under Fc1.

[0147]

[0148]

[0149] Table 4 Comparison of baseline method and DHN at PA%K

[0150]

[0151] 6. Introduction to Electricity Meter Datasets

[0152] The specific characteristics of the smart meter dataset (ELE) are shown in Table 5. This dataset was collected from nine physical three-phase meters in multiple distribution areas. Each meter includes 22 sensor values: current (phase A, phase B, phase C), voltage (phase A, phase B, phase C), energy reading (positive active), energy reading (reverse active), energy reading (positive reactive), energy reading (reverse reactive), active power (phase A, phase B, phase C, total), reactive power (phase A, phase B, phase C, total), and power factor (phase A, phase B, phase C, total).

[0153] Table 5 Characteristics of Actual Electricity Meter Data Sets

[0154]

[0155] These three-phase electricity meters exhibited various anomalies during their respective data recording periods, including reverse power flow, overcurrent, current loss, meter reversal, meter flying away, uneven meter readings, meter stopping, and abnormal reverse power. The dataset contains data collected daily at 96 sampling points for 9-16 months from each meter, including both normal and abnormal meter data. The experiment used a data range containing only normal data for training and tested the data containing anomalies.

[0156] 7. Introduction to Electricity Meter Datasets

[0157] Experiments were conducted on a smart meter dataset using the DHN algorithm and baseline methods, yielding results shown in Table 6. The results indicate that DHN achieved the highest scores across all three evaluation metrics. Therefore, it can be concluded that DHN's anomaly detection performance at the real-world meter data level is significantly superior to the baseline method, consistent with the results observed on publicly available datasets.

[0158] Table 6 Evaluation of Electricity Meter Dataset Results

[0159]

[0160] Therefore, this application proposes a deep hybrid normalization-based anomaly detection method for electricity meters. A deep hybrid normalization module is introduced, which allows raw data to be directly fed into the deep model of an autoencoder model and iteratively trained along with other parameters of the neural network. This deep hybrid normalization module learns to execute the optimal normalization scheme based on the current training task and model, utilizing information from all features. Furthermore, by integrating two learnable normalization sub-modules, it can effectively handle data with mixed features, thereby improving the accuracy of existing reconstruction-based multi-dimensional time-series anomaly models for smart meters.

[0161] Exemplary device

[0162] Figure 4 This is a schematic diagram of the structure of an energy meter anomaly detection device based on deep hybrid standardization provided in an exemplary embodiment of the present invention. Figure 4 As shown, the device 400 includes:

[0163] The acquisition module 410 is used to acquire multivariate long-term series data of historical detection of the energy meter under test;

[0164] The output module 420 is used to input multivariate long-term series data into a pre-trained electricity meter anomaly detection model and output the reconstructed data of the electricity meter under test at each time step. The anomaly detection model is an electricity meter anomaly detection model based on a deep hybrid normalization module and an autoencoder model.

[0165] The determination module 430 is used to determine the anomaly score of each time step of the energy meter under test based on the multivariate long-term series data and reconstructed data of each time step, and to determine the degree of anomaly of each time step based on the anomaly score.

[0166] Optionally, the multivariate long-term series data includes: phase A current, phase B current, phase C current, phase A voltage, phase B voltage, phase C voltage, forward active energy indication, reverse active energy indication, forward reactive energy indication, reverse reactive energy indication, phase A active power, phase B active power, phase C active power, total active power, phase A reactive power, phase B reactive power, phase C reactive power, total reactive power, phase A power factor, phase B power factor, phase C power factor, and total power factor.

[0167] Optionally, the device 400 further includes: a first training module for training a deep hybrid normalization module for the anomaly detection model, specifically:

[0168] The acquisition submodule is used to acquire multivariate time series sample data from multiple historical energy meters and merge them into a single multivariate long-term sample data.

[0169] The first output submodule is used to input multivariate long-term series sample data into the deep z-score normalization module and output the first candidate time-series sample data.

[0170] The second output submodule is used to input multivariate long-term series sample data into the depth min-max standardization module and output the second candidate time series sample data.

[0171] The third output submodule is used to feed the first candidate time series sample data and the second candidate time series sample data into the multiplexer and output the standardized time series sample data.

[0172] Optionally, the device 400 further includes a second training module for inputting standardized time series sample data into the autoencoder model to train the electricity meter anomaly detection model.

[0173] Optionally, the first output submodule includes:

[0174] The constituent units are used to extract the average value of each dimension from multivariate long-term series sample data to form an average value sequence vector;

[0175] The first determining unit is used to determine the translation operator for multivariate long-term series sample data based on the average value sequence vector;

[0176] The second determining unit is used to use the translation operator to translate each dimension of the multivariate long-term series sample data to a new center, thereby determining the translated multivariate long-term series sample data.

[0177] The third determining unit is used to determine the scaling operator of the multivariate long-term series sample data based on the standard deviation of each dimension of the multivariate long-term series sample data.

[0178] The fourth determining unit is used to scale each dimension of the translated multivariate long-term series sample data using scaling operators to determine the first candidate time series sample data.

[0179] The standardization formula for the first candidate time series sample data is as follows:

[0180]

[0181] In the formula, It is unstandardized multivariate time series sample data.

[0182] The formula for calculating the translation operator is:

[0183] α1=W μ μ

[0184] In the formula, The weight matrix is ​​the learnable weight matrix of the autoencoder model neural network. For the translation operator, μ = [μ1, μ2, ..., μ] d [] represents the average value sequence vector;

[0185] The scaling operator is calculated using the following formula:

[0186] β1=W σ σ

[0187] In the formula, σ=[σ1, σ2,...,σ d ] represents the standard deviation of each dimension of a multivariate long-term series sample data. β1 is the weight matrix of the scaling layer, and β2 is the scaling operator.

[0188] Optionally, the second output submodule includes:

[0189] The extraction unit is used to extract the minimum and range of multivariate long-term series sample data.

[0190] The fifth determining unit is used to determine the second candidate time series sample data based on the minimum value and the range;

[0191] The standardization formula for the second candidate time series sample data is as follows:

[0192]

[0193] In the formula, m = [m1, m2, ..., m d ] and r = [r1, r2, ..., r d The minimum and range of each feature in the multivariate long-term series sample data were recorded respectively. and It is a learnable weight matrix used for linear transformations. These are the standardized second candidate time series sample data. It is unstandardized multivariate time series sample data, α2 is the translation operator calculated based on the minimum value of each feature, β2 is the scaling operator calculated based on the range of each feature, % is the Hadamard division operator, and abs(·) is a function that takes the absolute value of each element of the vector.

[0194] Optionally, the standardization formula for standardized time series sample data is:

[0195]

[0196]

[0197] In the formula, ⊙ represents the Hadamard multiplication operator, and W c Let c = [c1, c2, ..., c3] be the learnable weight matrix of the multiplexer. d ] records the data type of each dimension of the multivariate long-term series sample data, and I(·) is an indicator function applied to each element of the vector.

[0198] Optionally, the formula for calculating the outlier score is:

[0199] AS t =(x′) t -x t ) 2

[0200] In the formula, ASt Let x′ be the anomaly score at time step t of the multivariate long-term series data of the energy meter under test. t and x t These are the reconstructed data and the original data at time step t of the multivariate long-term series data of the energy meter under test.

[0201] Exemplary electronic devices

[0202] Figure 5 This is the structure of an electronic device provided in an exemplary embodiment of the present invention. For example... Figure 5 As shown, the electronic device 50 includes one or more processors 51 and memory 52.

[0203] The processor 51 may be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.

[0204] The memory 52 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 51 may execute the program instructions to implement the methods of the software programs of the various embodiments of the present invention described above, and / or other desired functions. In one example, the electronic device may also include an input device 53 and an output device 54, these components being interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0205] In addition, the input device 53 may also include, for example, a keyboard, a mouse, etc.

[0206] The output device 54 can output various information to the outside. The output device 54 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0207] Of course, for the sake of simplicity, Figure 5 Only some of the components of this electronic device relevant to the present invention are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.

[0208] Exemplary computer program products and computer-readable storage media

[0209] In addition to the methods and apparatus described above, embodiments of the present invention may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the methods according to various embodiments of the present invention described in the "Exemplary Methods" section above.

[0210] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of the present invention. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0211] Furthermore, embodiments of the present invention may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps of the methods according to various embodiments of the present invention described in the "Exemplary Methods" section above.

[0212] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0213] The basic principles of the present invention have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in the present invention are merely examples and not limitations, and should not be considered as essential features of each embodiment of the present invention. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the present invention to the necessity of employing the aforementioned specific details.

[0214] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0215] The block diagrams of devices, systems, devices, and systems involved in this invention are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, systems, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0216] The methods and systems of the present invention may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of the present invention are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, the present invention may also be implemented as a program recorded on a recording medium, the program comprising machine-readable instructions for implementing the methods according to the present invention. Thus, the present invention also covers recording media storing programs for performing the methods according to the present invention.

[0217] It should also be noted that in the systems, apparatus, and methods of the present invention, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered equivalents of the present invention. The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the invention. Therefore, the invention is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0218] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the invention to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. A method for detecting anomalies in electricity meters based on deep hybrid standardization, characterized in that, include: Acquire multivariate long-term series data of historical measurements of the energy meter under test; The multivariate long-term series data is input into a pre-trained energy meter anomaly detection model, and the reconstructed data of the energy meter under test at each time step is output. The anomaly detection model is an energy meter anomaly detection model based on a deep hybrid normalization module and an autoencoder model. Based on the multivariate long-time series data and the reconstructed data of each time step of the energy meter under test, the anomaly score of each time step of the energy meter under test is determined, and the degree of anomaly of each time step is determined based on the anomaly score. The deep fusion normalization module for training the anomaly detection model is as follows: Acquire multivariate time series sample data from multiple historical energy meter readings and merge them into a single multivariate long time series sample data. The multivariate long-term series sample data is input into the deep z-score normalization module, and the first candidate time-series sample data is output. The multivariate long-time series sample data is input into the depth min-max normalization module, and the second candidate time series sample data is output. The first candidate time series sample data and the second candidate time series sample data are fed into a multiplexer to output standardized time series sample data.

2. The method according to claim 1, characterized in that, The multivariate long-term series data includes: phase A current, phase B current, phase C current, phase A voltage, phase B voltage, phase C voltage, forward active energy readings, reverse active energy readings, forward reactive energy readings, reverse reactive energy readings, phase A active power, phase B active power, phase C active power, total active power, phase A reactive power, phase B reactive power, phase C reactive power, total reactive power, phase A power factor, phase B power factor, phase C power factor, and total power factor.

3. The method according to claim 1, characterized in that, Also includes: The standardized time series sample data is input into the autoencoder model to train the electricity meter anomaly detection model.

4. The method according to claim 1, characterized in that, The multivariate long-term series sample data is input into the deep z-score normalization module, which outputs the first candidate time-series sample data, including: The average value of each dimension is extracted from the multivariate long-term series sample data to form an average value sequence vector; Based on the mean sequence vector, determine the translation operator for the multivariate long-term series sample data; The translation operator is used to translate each dimension of the multivariate long-term series sample data to a new center to determine the translated multivariate long-term series sample data. Based on the standard deviation of each dimension of the multivariate long-term series sample data, determine the scaling operator of the multivariate long-term series sample data; The scaling operator is used to scale each dimension of the translated multivariate long-term series sample data to determine the first candidate time-series sample data; The standardization formula for the first candidate time series sample data is as follows: In the formula, It is the Hadamard division operator. It is unstandardized multivariate time series sample data. The calculation formula for the translation operator is: In the formula, The weight matrix is ​​the learnable weight matrix of the autoencoder model neural network. For translation operators, It is a vector of average values; The scaling operator is calculated using the following formula: In the formula, This represents the standard deviation of each dimension of a multivariate long-term series sample data. It is the weight matrix of the scaling layer. It is a scaling operator.

5. The method according to claim 1, characterized in that, The multivariate long-series sample data is input into the depth min-max normalization module, which outputs the second candidate time-series sample data, including: Extract the minimum and range of the multivariate long-term series sample data; The second candidate time series sample data is determined based on the minimum value and the range; The standardization formula for the second candidate time series sample data is as follows: In the formula, and The minimum and range of each feature in the multivariate long-term series sample data were recorded separately. and It is a learnable weight matrix used for linear transformations. These are the standardized second candidate time series sample data. It is unstandardized multivariate time series sample data. It is a translation operator calculated based on the minimum value of each feature. It is a scaling operator calculated based on the range of each feature. It is the Hadamard division operator. It is a function that takes the absolute value of each element of the vector.

6. The method according to claim 1, characterized in that, The standardization formula for the standardized time series sample data is: In the formula, This represents the Hadamard multiplication operator. This represents the learnable weight matrix of the multiplexer. It records the data type of each dimension of the multivariate long-term series sample data. It is an indicator function applied to each element of the vector. and These are the first candidate time series sample data and the second candidate time series sample data, respectively.

7. The method according to claim 1, characterized in that, The formula for calculating the abnormal score is: In the formula, For the multivariate long-term series data of the energy meter under test, the first t Abnormal scores at each time step and These are the time steps of the multivariate long-term series data of the energy meter under test. t The reconstructed data and the original data.

8. An anomaly detection device for electricity meters based on deep hybrid standardization, used to implement the method of claim 1, characterized in that, include: The acquisition module is used to acquire multivariate long-term series data of historical tests of the energy meter under test; The output module is used to input the multivariate long-term series data into the pre-trained energy meter anomaly detection model and output the reconstructed data of the energy meter under test at each time step, wherein the anomaly detection model is an energy meter anomaly detection model based on a deep hybrid normalization module and an autoencoder model. The determination module is used to determine the anomaly score of each time step of the energy meter under test based on the multivariate long-time series data and the reconstructed data for each time step, and to determine the degree of anomaly for each time step based on the anomaly score.

9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for performing the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Electric energy meter abnormality diagnosis method and device

    CN110888101A

  • Transform-based multivariable time sequence anomaly detection method

    CN116796272A