Power consumption data anomaly detection method and device based on channel independence and global-local channel dependence
By employing a method based on channel independence and global-local channel dependency, and utilizing the Mamba model and trend-residual decomposition technique, the problem of modeling channel correlation characteristics in anomaly detection of multidimensional time series data was solved, achieving more efficient anomaly detection of electricity consumption data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING UNIV OF POSTS & TELECOMM
- Filing Date
- 2025-07-11
- Publication Date
- 2026-06-23
Smart Images

Figure CN120910501B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity metering technology, and more specifically, to a method and apparatus for detecting abnormal electricity consumption data based on channel independence and global-local channel dependence. Background Technology
[0002] High-quality data is the foundation for the development of data elements. Power grid companies face a huge opportunity to turn massive amounts of data into assets, while also facing higher regulatory requirements from the state for data quality and reliability.
[0003] As a "barometer" and "weathervane" of national economic development, accurate and reliable electricity data can truly reflect the state of national and social development and provide precise data for the State Grid Corporation to ensure power supply and provide services to users. With the deepening of electricity market reform, a large number of new entities such as electricity retailers, load aggregators, and virtual power plant operators have emerged. Electricity demand is influenced by the interaction of various factors, including actual needs of multiple entities, electricity pricing policies, market rule competition, and the optimized coordination of distributed generation and energy storage. This change has made the characteristics of electricity demand data unprecedentedly complex. The massive volume, diverse structure, and complex characteristics of electricity data have increased the complexity and difficulty of electricity data analysis, placing higher demands on the quality of data from the power source.
[0004] Currently, the electricity consumption information collection system connects to smart meters of all electricity users within the company's operating area, enabling the collection of electricity consumption and power data across different time dimensions, such as daily and hourly. As the sole source of electricity consumption data for the company's users, it has accumulated massive amounts of electricity user data resources, laying a solid foundation for professional applications such as user energy demand analysis and power grid operation status monitoring, as well as national power data analysis. However, constrained by objective factors such as data volume and collection conditions, the identification of anomalies in massive amounts of data largely relies on expert experience threshold judgment rules, lacking robust and highly sensitive intelligent identification tools. Therefore, there is an urgent need to design and develop a robust and highly accurate source-end data anomaly identification model to effectively identify anomalies in data items such as electricity consumption readings, power, voltage, and current, ensuring that electricity consumption data can be efficiently and conveniently used for analysis, decision-making, and business applications, better serving government economic operation regulation, new power system construction, and the company's professional business operations.
[0005] Research on multidimensional time series anomaly detection in power consumption scenarios is highly dependent on the operating characteristics of the equipment and the distribution of data. Since power consumption data acquisition systems typically possess strong robustness and stability, the data they collect usually consists of a large amount of normal data. Therefore, current mainstream methods mainly employ two learning paradigms: one is a semi-supervised learning framework trained solely on normal samples, and the other is an unsupervised learning framework that assumes the training set is primarily composed of normal data. Most multidimensional time series anomaly detection methods typically calculate anomaly scores for each time point and then compare these scores to a certain threshold. In recent work on semi-supervised or unsupervised multidimensional time series anomaly detection, deep learning-based methods have achieved state-of-the-art results on authoritative and publicly available multidimensional time series dataset benchmarks.
[0006] Deep learning methods are mainly divided into two categories, among which prediction-based methods and reconstruction-based methods have been widely applied. Prediction methods utilize past information to predict future values in a time series and use prediction error as an indicator of anomaly detection. Reconstruction methods, on the other hand, employ autoencoders or generative models to encode the entire time series into a latent space and infer anomaly labels based on the reconstruction error between the original and reconstructed data. However, multidimensional time series data often exhibit complex pattern variations, and future time series values may display high uncertainty, making accurate prediction of multidimensional time series data challenging. In comparison, existing reconstruction-based methods can typically achieve more state-of-the-art results on complex multidimensional time series datasets.
[0007] In the monitoring scenarios of power consumption acquisition systems, multidimensional time-series data generally exhibit nonlinear time-dependent characteristics, and the correlation patterns between channels show significant differences: when there is strong functional coupling between system sensors, channel correlation tends to be tight; conversely, it exhibits a sparse or even uncorrelated state. Current modeling methods are mainly divided into two paradigms: channel-dependent and channel-independent. However, research shows that on some real benchmark datasets, univariate independent modeling methods that ignore channel correlations often outperform channel-dependent modeling. This phenomenon can be attributed to two aspects: first, real-world data may naturally have weak inter-sequence correlations; second, existing models are insufficient in capturing complex channel relationships. Although channel-independent modeling avoids the difficulty of correlation modeling by decoupling multivariate analysis, its complete abandonment of potential channel relationship processing essentially limits the optimization space for anomaly detection performance. It is worth noting that although channel-dependent modeling has been widely studied, it is susceptible to data overfitting or temporal pattern confusion. When the historical dependencies within the sequence of multidimensional time-series data dominate, channel-dependent modeling's attempt to learn inter-sequence information may disrupt the temporal dependencies within the sequence. Summary of the Invention
[0008] To address the shortcomings of existing technologies, this invention provides a method and apparatus for detecting abnormal power consumption data based on channel independence and global-local channel dependence.
[0009] According to one aspect of the present invention, a method for detecting anomalies in power consumption data based on channel independence and global-local channel dependence is provided, comprising:
[0010] Acquire multivariate long-term series data of historical measurements of the energy meter under test;
[0011] Divide multivariate long-term series data into multiple time windows of a preset window length;
[0012] Multiple time window data and their adjacent time window data are input into a pre-trained anomaly detection model, and the reconstructed data corresponding to the time window data is output. The anomaly detection model generates the reconstructed data based on channel independence and global-local channel dependency.
[0013] Based on the reconstructed data and original data of each time window, the anomaly score of each time point in that time window is determined, and based on the anomaly score, the degree of anomaly of the energy meter under test at each time point is determined.
[0014] According to another aspect of the present invention, a device for detecting abnormal power consumption data based on channel independence and global-local channel dependence is provided, comprising:
[0015] The acquisition module is used to acquire multivariate long-term series data of historical tests of the energy meter under test;
[0016] The partitioning module is used to divide multivariate long-term series data into multiple time windows of a preset window length;
[0017] The reconstruction module is used to input multiple time window data and their adjacent time window data into a pre-trained anomaly detection model and output the reconstructed data corresponding to the time window data. The anomaly detection model generates the reconstructed data based on channel independence and global-local channel dependency.
[0018] The determination module is used to determine the anomaly score of each time point in the data of each time window based on the reconstructed data and the original data, and to determine the degree of anomaly of the energy meter under test at each time point based on the anomaly score.
[0019] 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.
[0020] 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.
[0021] Therefore, this invention addresses the challenge of complex and diverse distribution patterns across dimensions in multidimensional time-series data, and the difficulty of existing methods in effectively modeling the strong, weak, or no correlations between channels. It proposes a multidimensional time-series anomaly detection method based on channel independence and global-local channel dependency. First, in the channel independence process, the proposed method designs a dual-channel variable processing module based on the Mamba model to effectively handle historical dependencies in univariate data, taking into account the different characteristics of continuous and discrete time-series data. Then, in the channel dependency process, the proposed method constructs a Siamese auxiliary time series based on trend-residual decomposition, and constrains the attention modeling process of the Siamese auxiliary time series through trend continuity loss and detail reconstruction loss, continuously improving the model's global trend and detail representation capabilities. Finally, based on the dual-link of channel independence and channel dependency in multidimensional time-series correlation, the proposed method constructs a learnable adjustable parameter vector to flexibly adjust the component relationships of channel independence and channel dependency, further improving the model's anomaly detection performance. Attached Figure Description
[0022] Exemplary embodiments of the present invention can be more fully understood by referring to the following figures:
[0023] Figure 1 This is a flowchart illustrating an exemplary embodiment of the present invention for a method of detecting abnormal power consumption data based on channel independence and global-local channel dependence.
[0024] Figure 2 This is a schematic diagram of a multi-dimensional temporal anomaly detection algorithm framework based on a channel-independent strategy and a global-local channel-dependent strategy, provided by an exemplary embodiment of the present invention.
[0025] Figure 3 This is a schematic diagram of the CIGCD-Mamba structure provided in an exemplary embodiment of the present invention;
[0026] Figure 4 This is a schematic diagram of the trend attention mechanism and residual attention mechanism provided in an exemplary embodiment of the present invention;
[0027] Figure 5 This is a schematic diagram of the structure of an abnormal power consumption data detection device based on channel independence and global-local channel dependence provided in an exemplary embodiment of the present invention;
[0028] Figure 6This is the structure of an electronic device provided in an exemplary embodiment of the present invention. Detailed Implementation
[0029] 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.
[0030] 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.
[0031] 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.
[0032] 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.
[0033] 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.
[0034] 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.
[0035] 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.
[0036] 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.
[0037] 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.
[0038] 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.
[0039] 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.
[0040] 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.
[0041] 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.
[0042] Exemplary methods
[0043] Figure 1 This is a flowchart illustrating an exemplary embodiment of the present invention for a method of detecting abnormal power consumption data based on channel independence and global-local channel dependence. This embodiment can be applied to electronic devices, such as… Figure 1 As shown, the power consumption data anomaly detection method 100 based on channel independence and global-local channel dependence includes the following steps:
[0044] Step 101: Obtain multivariate long-term series data of historical tests of the electricity meter under test;
[0045] Step 102: Divide the multivariate long-term series data into multiple time windows of a preset window length;
[0046] Step 103: Input multiple time window data and their adjacent time window data into a pre-trained anomaly detection model, and output the reconstructed data corresponding to the time window data. The anomaly detection model generates the reconstructed data based on channel independence and global-local channel dependency.
[0047] Step 104: Determine the anomaly score for each time point of the data in each time window based on the reconstructed data and the original data, and determine the degree of anomaly of the energy meter under test at each time point based on the anomaly score.
[0048] Specifically, with the continuous development of electricity consumption data acquisition systems, the multidimensional time-series data they monitor often contains complex and diverse distribution patterns. Existing methods typically treat channels as independent variables or model them using only simple fully connected layers, ignoring the deep dependencies and dynamic interactions between channels. Furthermore, modeling with a purely channel-dependent strategy may lead to the transmission of direct erroneous information between channels, making it difficult to model fine-grained correlations between channels. Therefore, this invention proposes a channel-independent and global-local channel-dependent anomaly detection method, CIGCD. This section first describes the problem of multidimensional time-series anomaly detection and outlines the main framework of the proposed method, then details the key modules and anomaly detection process. The specific implementation is as follows:
[0049] 1. Problem Description
[0050] Multivariate time series data consists of multiple univariate time series data, containing dependencies between multiple features. Time series are typically observed at consecutive, equally spaced time stamps, where the input multivariate time series data is... x = {x1, x2, ..., x} T}, where T is the maximum length of the input timestamp, and M is the number of variables per timestamp, therefore x t ={x 1,t ,x 2,t ,....,x M,t}, Multidimensional temporal anomaly detection and reconstruction methods typically model the input data to obtain the output x′={x′1,x′2,....,x′ T The difference between the input x and the output x′ is calculated to obtain the anomaly score at each time point. The anomaly detection task uses the anomaly score as the evaluation metric to determine the positive anomaly state at that moment, thus obtaining the corresponding output vector y = {y1, y2, ..., y′}. T}, where y t ∈{0,1} (1 represents abnormal data, 0 represents normal data).
[0051] 2. Framework Overview
[0052] like Figure 2As shown, this invention proposes a channel-independent and global-local channel dependency-based anomaly detection method for electricity consumption data, namely, CIGCD. To address the unknown inter-channel correlations in multi-dimensional time-series data, CIGCD constructs a dual-link modeling approach for multi-dimensional time-series correlations: channel-independent modeling and channel dependency modeling. In the channel-independent modeling process, fully considering the different characteristics of continuous and discrete quantities, CIGCD introduces the Mamba model into the field of time-series anomaly detection, designing a dual-channel variable processing module based on the Mamba model, leveraging its excellent sequence modeling capabilities to process time-series dependencies. In the channel dependency modeling process, to prevent overfitting or misfitting due to information fusion between sequences, CIGCD constructs a twin-assisted time series based on trend-residual decomposition. Considering the different channel characteristics of the trend-residual continuous quantities, CIGCD constructs a dual-channel attention mechanism to mine the channel correlations in multi-dimensional time-series data. It uses continuous loss to constrain the trend term to fit features that better reflect trend dependencies, and uses the residual term to mine features of local points, thereby improving the model's global trend and detailed representation capabilities. To address the issue that existing methods cannot accurately capture the weighted relationships between different channels when modeling channel dependencies, CIGCD constructs a learnable adjustment parameter vector to flexibly adjust the relationships between different channel components in channel-independent modeling and channel-dependent modeling, thereby further improving the model's anomaly detection performance.
[0053] In general, CIGCD mainly consists of a channel-independent module, a channel-dependent module, and a model training and anomaly detection module. First, the standardized input data is split into discrete and continuous quantities, which are then fed into the Mamba model processing unit of the channel-independent module to obtain the reconstructed output of the channel-independent modeling process. Second, the continuous quantities are decomposed into different terms based on trend-residual decomposition, which are then combined with the discrete quantities to obtain trend and residual terms, which are input into the continuous Mamba processing unit. Global attention modeling based on continuous loss and local attention modeling based on reconstruction loss are then constructed for the continuous terms, respectively, to obtain the output of the channel-dependent module. Finally, through the model training and anomaly detection module, a controllable parameter vector is constructed to obtain the reconstructed output of the CIGCD model. Through model training and weighted calculation, the data anomaly score can be obtained.
[0054] 3. Channel-independent modeling: Discrete and continuous quantity analysis based on the Mamba model
[0055] like Figure 3As shown, the CIGCD structure models the original sequence while constructing an auxiliary time series ATS based on trend-residual decomposition to represent the relationships between sequences. The ATS modeling results are then incorporated into the time-series anomaly detection results to obtain the model output. Without ATS assistance, the CIGCD result is a channel-independent modeling result. Here, considering the computational inefficiency of Transformer when processing long sequences and its inability to compress each historical record, it cannot model any information outside the finite window. RNNs, on the other hand, cannot perform content-based reasoning in terms of data perception, i.e., they cannot perform global perception like Attention, and they lack the ability to model discrete data. Traditional State Space Models (SSMs) have very strong modeling capabilities for continuous data, but their performance is also poor for discrete data. While subsequent improved state space models have made improvements, they have encountered new problems in maintaining discrete modeling and selective processing, and cannot improve training efficiency through parallelization. Therefore, CIGCD introduced the Mamba model based on Selective State Space Models (S6 model), leveraging its powerful selective information learning capabilities and efficient training and inference capabilities to analyze univariate time series data of channel-independent modeling processes.
[0056] The Mamba model is a novel sequence modeling approach that improves the efficiency and effectiveness of processing long sequence data by incorporating the S6 model. In the Mamba model, the reconstruction of input data X is achieved through an end-to-end neural network architecture that does not rely on attention mechanisms or multilayer perceptrons (MLPs). For the input data x, CIGCD splits it into x channels. i ,i={0,1,2,...,M-1}. At this point, the Mamba model is used to analyze the independent x... i The data is reconstructed. It's important to note that the original Mamba model is a language sequence model. To better suit multidimensional time-series data tasks, CIGCD designed CIGCD-Mamba to enhance the model's time-series data processing capabilities, such as... Figure 2As shown, CIGCD-Mamba includes a tokenization layer (TL), Mamba blocks, and a feed-forward network (FFN) layer. The TL primarily performs data standardization and scaling, while the Mamba blocks mainly model the discrete and continuous dual-channel data (CIGCD-Mamba-C and CIGCD-Mamba-D). The FFN layer performs specific data embedding for subsequent reconstruction output.
[0057] The input to the TL layer is x i CIGCD first performs instance normalization on the input data, i.e., InstanceNorm(x i To stabilize the training process and reduce the impact of different data scales, CIGCD employs a tokenization method for sequential text in natural language processing to standardize time series data. InstanceNorm(x i The data is divided into patches of different scales, with P patches in total. These patches are subsets of the original data and are used to capture local features.
[0058] x patch =Patch(InstanceNorm(x) i ),P) (1)
[0059] The Mamba block includes both discrete and continuous channels. This module employs the S6 model to selectively learn multidimensional time-series data, enabling it to effectively learn data interaction information and avoid the accumulation of useless data. For the input data... For continuous patching, This is a discrete patch. By feeding the input data into a dual-channel Mamba dataset for modeling, the intermediate quantity u of the Mamba residual network can be obtained. patch ,Right now:
[0060] u patch =CIGCD-Mamba(x patch (2)
[0061] The output obtained by combining the Mamba residual network is:
[0062] x′ patch =u patch +x patch (3)
[0063] To address the different characteristics of discrete and continuous data, CIGCD-Mamba incorporates a dual-channel processing module within the Mamba block. For continuous patches with smooth patterns and trends, the Mamba model uses a dual-attention mechanism to acquire representations within and between patches, thereby capturing local and global features in the data, and employs the S6 architecture for further data processing. For discrete patches, the Mamba model can capture specific patterns in the data through the S6 structure. The modeling process for the dual-attention mechanism for continuous data is as follows:
[0064]
[0065] a patch =Multi-HeadAttention({a in}) (5)
[0066] Among them, a in It is the attention representation within the patch, a patch This represents the attention representation between patches. Multi-HeadAttention is a multi-head attention mechanism; see details below. Figure 3 As shown. Place a patch By setting the channels of the normalization layer to match the input, we obtain the input for S6. S6 allows the model to selectively update the hidden states based on the current input. The state update equation is:
[0067] h′(p)=A′h(p)+B′x patch (p) (6)
[0068] y(p)=Ch′(p) (7)
[0069] Where h′(p) is the state at the p-th patch, h(p) is the state before the p-th patch, and x patch,p The input is at the p-th patch, and y(p) is the output at time step p. Matrices A′, B′, and C are obtained by discretizing the learnable matrices A, B, and C, and the step size Δ, respectively. Concatenating y(p) from all time steps yields u, which is the output of the aforementioned process. patch ={y(p),p=1,2,...,P}.
[0070] In the FFN layer, CIGCD further processes the output of the Mamba block. CIGCD then processes the x′ obtained from equation (3). patch Entering the FFN layer for detoxing and flattening yields the output x′ of the channel-independent modeling process. ind =FFN(x′) patch Therefore, the loss in the independent channel modeling process is:
[0071]
[0072] The pseudocode for CIGCD-Mamba is shown in Algorithm 1, and the pseudocode for the channel-independent modeling process is shown in Algorithm 2.
[0073]
[0074]
[0075]
[0076] 4. Channel Dependency Modeling: Twin-Auxiliary Time Series Based on Trend-Residual Decomposition
[0077] Building upon channel-independent modeling, CIGCD constructs a twin-auxiliary time series based on trend-residual decomposition. It's important to note that decomposing discrete quantities significantly increases the training difficulty of the model; therefore, CIGCD first separates continuous and discrete quantities before performing trend-residual decomposition. Based on this, the trend term and residual term after decomposing the continuous quantities are analyzed as two independent auxiliary time series, while the discrete quantities are incorporated into the Mamba modeling process. Considering that the Mamba model is only suitable for implicit channel analysis, a bi-channel attention mechanism is introduced to explicitly analyze the correlations between each channel.
[0078] like Figure 4 As shown, for input data x = {x con ,x dis}, x con For continuous quantities, x dis As discrete quantities, CIGCD is based on trend-residual decomposition into a bi-term ATS:
[0079] ATS trend ATS remain =STL(x con (9)
[0080] Among them, ATS trend The sum of the trend and seasonal terms after STL decomposition, ATS remain The remaining items. At this point, CIGCD has completed the construction of a twinned auxiliary time series. The ATS... trend ATS remain respectively with x dis Combined and transformed into a patch sequence x through a standard normalization layer. trend With x remain :
[0081] x trend =Patch(ATS) trend ,x dis ),xremain =Patch(ATS) remain ,x dis (10)
[0082] Both are then passed to the CIGCD-Mamba module, which ensures consistency between the channel dependency modeling process and the channel independent modeling process. This allows us to obtain...
[0083] z trend =CIGCD-Mamba(x trend ), z remain =CIGCD-Mamba(x remain (11)
[0084] Among them, z trend With z remain For x trend With x remain The output of the Mamba residual network. At this point, CIGCD-Mamba's handling of discrete and continuous quantities is similar to the channel-independent modeling process.
[0085] After the FFN normalization layer, z trend and z remain Align with the original data channels and perform channel attention mechanism on the two inputs based on trend attention and residuals, such as... Figure 3 As shown, the output data can be obtained as follows:
[0086] ATS′ trend =TrendAttention(FFN(z trend (12)
[0087] ATS′ remain =RemainAttention(FFN(z) remain (13)
[0088] Where ATS'trend is x trend The reconstructed output obtained through the Mamba model and trend attention modeling is similar to that of ATS' remain For x remain The reconstructed output is obtained through Mamba modeling and trend attention modeling. It's important to note that CIGCD doesn't simply provide additional information and assistance to the auxiliary time series. CIGCD applies different loss constraints to the trend ATS and residual ATS. Specifically, for the trend term, CIGCD aims to learn the trend semantic features of multidimensional time series data, rather than just detailed changes at specific time points. Therefore, CIGCD applies a continuity loss L... con To smooth out noise details and focus on the overall trend that can be described by inter-sequence dependencies:
[0089]
[0090] Where is the standard deviation of the auxiliary time series in the m-th channel. By applying continuity loss, ATS trend This smooths out temporal details and noise, focusing on the overall trend that can be described by inter-series dependencies. This loss can be viewed as applying a low-pass filter to the ATS data, which effectively reduces high-frequency components in the ATS. Furthermore, ATS... remain The continuity of the data helps reduce the volatility of the output data, which enables it to minimize the impact of noise fluctuations and thus enhances its ability to capture long-term trends in multidimensional time series data.
[0091] For ATS remain CIGCD uses reconstruction error to make the remaining terms focus more on the detailed feature changes of multidimensional time series data:
[0092]
[0093] CIGCD aims to use continuity loss to enable the model to consider the trend semantic features of multidimensional time series data more comprehensively during the trend ATS construction process, and to use reconstruction loss to enable the model to consider the detailed feature changes of time series data during the residual ATS construction process. The model construction and loss constraints are as follows: Figure 2 As shown in Algorithm 3, the pseudocode for the channel dependency modeling process is as follows. At this point, the twin-aided time series output for channel dependency modeling is x′. dep =ξATS′ trend +(1-ξ)ATS′ remain ξ={ξ1,ξ2,...,ξ M} represents a learnable vector of trend weight parameters.
[0094]
[0095]
[0096] 5. Model Training and Anomaly Detection
[0097] After obtaining the outputs of channel-independent modeling and channel-dependent modeling, CIGCD designed a learnable parameter vector λ = {λ1, λ2, ..., λ...} M The magnitude of the channel correlation components is adjusted using a variable, and constrained by the final reconstruction loss. The final reconstruction output of the model is:
[0098]
[0099] At this point, x' = {x'(m,t)|m = {1,2,...,M},t = {1,2,...T}}, and the model reconstruction loss is:
[0100]
[0101] If the results of independent channel modeling better match the original data, the value of this parameter vector will be smaller; if the results considering channel correlation are more consistent, the value of this parameter vector will be larger. This parameter will be fixed during testing. The overall model loss is then:
[0102] Loss = L con +L rec +L ind +L io (17)
[0103] The model training process is shown in Algorithm 4.
[0104]
[0105]
[0106] 6. Refactoring and Anomaly Detection
[0107] CIGCD uses the error between the original and reconstructed data as an anomaly score, and then compares the anomaly score output by the model with a given threshold to determine the positive anomaly status of the time series data. For the test data... (x t The outlier score of the m-th dimension data is calculated as follows:
[0108]
[0109] Among them, AS t This represents the anomaly score at time t within a preset time window, where M is the number of feature dimensions in the multidimensional time series data, T is the size of the time series data window, and x... m , These are the univariate time series data of the m-th dimension and its corresponding reconstructed data, x i , It is the multivariate time series data at time i and its corresponding reconstructed data.
[0110] Furthermore, this invention first conducted comparative experiments with CIGCD and 17 more advanced models on a real-world electricity consumption dataset, confirming the effectiveness and advancement of the CIGCD algorithm.
[0111] This invention selects AUC, Fc1, and F1. PA%K The proposed method is used as an evaluation metric to verify its performance compared to the baseline model.
[0112] AUC (Area Under Curve) is one of the most commonly used methods for evaluating unsupervised anomaly detection tasks. The AUC evaluation metric primarily calculates the area under the ROC (Receiver Operating Characteristic) curve, ranging from 0 to 1. A perfect dataset will result in an AUC of 1, while random data will produce an AUC value close to 0.5. Compared to traditional evaluation metrics, the advantage of AUC is that it is not affected by threshold settings. However, AUC only reflects the number of time points where the method correctly detects anomalies; a high AUC does not necessarily mean that the method accurately detects all anomaly segments.
[0113] Fc1 (Composite F-score) is a recently proposed metric for time series anomaly detection. Unlike AUC, Fc1's advantage lies in its ability to comprehensively reflect all correctly detected anomaly segments in a multi-dimensional time series, focusing on the algorithm's ability to detect anomalous events. Fc1 calculates both recall within the anomalous time segment and precision at specific time points, thus avoiding the overestimation of algorithm performance by point adjustment strategies. Models with higher recall within anomaly segments and lower false positive rates across time steps receive higher Fc1 scores.
[0114] F1 PA%K (PointAdjustment%K). Similarly, we propose F1. PA%K This addresses the overestimation of model performance caused by point adjustment. It calculates a point-level F1 score, but performs point adjustments when the proportion of outliers detected by the model in consecutive outlier segments exceeds K%. To reduce dependence on the parameter K, the F1 score is... PA%K F1 can be adaptively calculated by adjusting the size of K. PA%K The area under the curve.
[0115] 2. Comparison Methods
[0116] The baseline comparison methods used in this experiment are currently influential mainstream methods, as shown in Table 1. These methods belong to different categories, including some classic methods: LOF, OCSVM, and iForest. Channel-independent algorithms: DCdetector. Reconstruction-based algorithms: InterFusion. Generative adversarial models: BeatGAN, USAD. Models focusing on dimensionality or temporal analysis: GDN, GTA, and MSCRED. The former two use graph structures to learn the relationships and couplings between different sensors, thus achieving robust dimensional correlation analysis of multivariate time series data. MSCRED utilizes long short-term memory networks and attention mechanisms to analyze the data. The latest temporal anomaly detection algorithms: TranAD and AT. The former builds a Transformer-based anomaly detection model based on an adaptive and adversarial training process. AT designs a method based on prior and sequence correlation based on attention mechanisms, and performs anomaly detection according to different correlation differences in positive anomalous states. Multidimensional temporal anomaly detection reconstruction methods: CAE-AD, RAE, TSMAE, MOUT. CAE-AD is a contrastive learning-based method used for implicit analysis of noise or anomalies, while the following three methods explicitly design modules for noise analysis. The mask reconstruction algorithm, ImDiffusion, implements unconditional generation time interpolation based on a diffusion model, and uses the mask reconstruction interpolation error for anomaly detection.
[0117] Table 1 Baseline Methods
[0118]
[0119]
[0120] 3. Implementation details
[0121] CIGCD is implemented in PyTorch and trained on a server equipped with an Intel(R) Xeon(R) Gold 6148 CPU and an Nvidia Tesla V100 GPU. In CIGCD, the Mamba kernel size is 3 for the channel-independent modeling process, and 3 and 4 for the trend and residual term modeling processes, respectively, in the channel-dependent modeling process. The block expansion factor E for the input-output linear projection in the Mamba model is 2. The sliding window length T for the time series data is set to 100, and the dimension D of the embedding vector is 128. During training, the step size of the sliding window is set to 1, while it is 100 during testing.
[0122] Furthermore, CIGCD is trained using the Adam optimizer with an initial learning rate of 1e-4 and a batch size of 32. The original training data is divided into training and validation sets in an 8:2 ratio. During training, the learning rate is halved if the loss on the validation set does not decrease within 3 epochs, and early stopping is triggered if the loss on the validation set does not decrease within 6 epochs.
[0123] 4. Introduction to Actual Electricity Consumption Dataset
[0124] The specific characteristics of the electricity consumption dataset (ELE) collected by smart meters are shown in Table 2. This dataset is collected from nine three-phase meters in multiple distribution areas. Each device 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).
[0125] Table 2 Characteristics of Actual Electricity Consumption Data Set
[0126]
[0127] These smart meters exhibited various anomalies during their respective data recording periods, including reverse power flow, current loss, meter reversal, meter flying away, uneven meter readings, meter terminal block issues, and power differential anomalies. The dataset contains data collected daily at 96 sampling points from each meter device over 9-16 consecutive months. The experiment used data containing only normal data for training and data including anomalies for testing. Furthermore, the actual electricity consumption dataset includes nine complete physical devices, and the dataset exhibits varying data sizes and uneven anomaly proportions across different devices.
[0128] 5. Evaluation of results from actual datasets
[0129] To verify the universality of the proposed model, the performance of the proposed model was evaluated and analyzed on a real-world electricity consumption dataset. The comparative experimental results are shown in Table 3. The table presents the AUC, Fc1, and F1 of the proposed CIGCD and the baseline method. PA%K Three performance metrics are presented. All results shown in the table are averages obtained from five individual runs, allowing the study to assess the robustness of each baseline method. Furthermore, the best-performing method is highlighted in bold, while the second-best-performing method is indicated by underline.
[0130] Notably, CIGCD performed exceptionally well across all evaluation metrics, achieving an AUC of 0.6388, an Fc1 score of 0.3804, and an F1 score of 0.4311. PA%K Analysis revealed that CIGCD's AUC was 17.61% higher than the average results of other baseline methods, indicating that CIGCD has high accuracy in detecting outliers and is less affected by data uncertainty. Similarly, CIGCD's Fc1 score was 40.29% higher than the baseline methods, demonstrating high recall and accuracy for detecting outliers within specific time periods. Furthermore, in F1... PA%K In terms of score, CIGCD improved by 48.09%, indicating that the CIGCD algorithm also has a high level of accuracy in detecting anomalies in time periods. The high performance of the above three indicators also confirms the superiority and applicability of the CIGCD algorithm in the task of anomaly detection in multidimensional time series data.
[0131] Table 3 shows the comparative experimental results on the actual electricity consumption dataset.
[0132]
[0133] As shown in Table 2, the ELE dataset has a relatively high anomaly rate and a rich variety of anomaly types. Therefore, CIGCD's excellent performance on the actual electricity consumption dataset demonstrates that the combined channel independence and channel joint decomposition module effectively detects anomaly segments in different regions, thus adapting to the impact of different anomalies on the model. Furthermore, since ELE is multi-dimensional time-series electricity consumption data collected from actual smart three-phase meters, its features consist of multiple monitored quantities such as voltage, current, and power distributed across different parts of the system. Therefore, its features are all continuous quantities, and there are strong inter-correlation relationships between data dimensions. Thus, CIGCD's excellent performance on this dataset indicates its ability to learn dimensional correlations effectively. Overall, CIGCD's discrete-continuous dual-channel Mamba architecture based on the state-space model effectively achieves information complementarity of multi-modal features, while the dual-path attention mechanism based on trend-residual decomposition terms fully captures the long-term trends and multi-level semantic representations of local details in multi-dimensional time-series data. By combining channel independence and channel dependency dual-path learning, CIGCD achieves excellent performance on the ELE dataset.
[0134] Therefore, this invention addresses the challenge of complex and diverse distribution patterns across dimensions in multidimensional time-series data, and the difficulty of existing methods in effectively modeling the strong, weak, or no correlations between channels. It proposes a multidimensional time-series anomaly detection method based on channel independence and global-local channel dependency. First, in the channel independence process, the proposed method designs a dual-channel variable processing module based on the Mamba model to effectively handle historical dependencies in univariate data, taking into account the different characteristics of continuous and discrete time-series data. Then, in the channel dependency process, the proposed method constructs a Siamese auxiliary time series based on trend-residual decomposition, and constrains the attention modeling process of the Siamese auxiliary time series through trend continuity loss and detail reconstruction loss, continuously improving the model's global trend and detail representation capabilities. Finally, based on the dual-link of channel independence and channel dependency in multidimensional time-series correlation, the proposed method constructs a learnable adjustable parameter vector to flexibly adjust the component relationships of channel independence and channel dependency, further improving the model's anomaly detection performance.
[0135] The key point of this invention is:
[0136] 1. A multi-dimensional temporal anomaly detection algorithm that integrates channel independence and channel dependence.
[0137] To address the complexity and uncertainty of inter-dimensional correlations in multi-dimensional electricity consumption time-series data, a dual-path learning framework integrating channel independence and channel dependency is proposed. Channel independence modeling uses univariate time-series analysis to uncover temporal dependency patterns within each dimension, avoiding cross-channel noise interference. Channel dependency modeling, on the other hand, captures global latent correlations and local dynamic interaction features between dimensions through an attention-based cross-correlation matrix. By introducing learnable gating parameter vectors, the weight allocation of the two modeling paths is dynamically adjusted, achieving adaptive feature fusion from strongly correlated dimensions to weakly correlated dimensions.
[0138] 2. Discrete-Continuous Dual-Channel Mamba Processing Module
[0139] To address the challenge of modeling mixed continuous monitoring values and discrete state labels in electricity consumption time-series data, a discrete-continuous dual-channel Mamba architecture based on a state-space model is proposed. For continuous time-series data, the Mamba state-space equation is used to refine the continuous evolution of the time series, capturing long-range historical dependencies through latent state transitions. For discrete state labels, a discretized state transition module is designed to encode discrete quantities as differentiable probability distributions. Information complementarity is achieved through a discrete-continuous dual-channel cross-modal interaction gate, enhancing the representation capability of complex industrial time-series data.
[0140] 3. A dual-path attention mechanism based on trend-residual decomposition terms
[0141] Based on time-series decomposition, continuous monitoring data is parsed into low-frequency trend terms and high-frequency residual terms, constructing a dual-path attention collaborative analysis framework. The trend term attention module focuses on the long-term evolution of equipment operating status, extracting the long-term impact of operating condition switching on system stability through correlation modeling of trend components and discrete state labels. The residual term attention module captures abnormal detail signals in short-term fluctuations, locating transient disturbances by combining the timestamp information of discrete events. Further, trend continuity loss and detail reconstruction loss are designed to constrain the smoothness requirements of the trend term and the information fidelity of the residual term, respectively, ensuring a balanced optimization of global trends and local details in the anomaly detection task.
[0142] Exemplary device
[0143] Figure 5 This is a schematic diagram of the structure of an anomaly detection device for power consumption data based on channel independence and global-local channel dependence, provided in an exemplary embodiment of the present invention. Figure 5 As shown, the device 500 includes:
[0144] The acquisition module 510 is used to acquire multivariate long-term series data of historical detection of the energy meter under test;
[0145] The partitioning module 520 is used to partition multivariate long-term series data into multiple time windows of a preset window length;
[0146] The reconstruction module 530 is used to input multiple time window data and their adjacent time window data into a pre-trained anomaly detection model and output the reconstructed data corresponding to the time window data. The anomaly detection model generates the reconstructed data based on channel independence and global-local channel dependency.
[0147] The determination module 540 is used to determine the anomaly score of each time point of the data in each time window based on the reconstructed data and the original data, and to determine the degree of anomaly of the energy meter under test at each time point based on the anomaly score.
[0148] Exemplary electronic devices
[0149] Figure 6 This is the structure of an electronic device provided in an exemplary embodiment of the present invention. For example... Figure 6 As shown, the electronic device 60 includes one or more processors 61 and a memory 62.
[0150] The processor 61 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.
[0151] The memory 62 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 61 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 63 and an output device 64, these components being interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0152] In addition, the input device 63 may also include, for example, a keyboard, a mouse, etc.
[0153] The output device 64 can output various information to the outside. The output device 64 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0154] Of course, for the sake of simplicity, Figure 6 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.
[0155] Exemplary computer program products and computer-readable storage media
[0156] 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.
[0157] 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.
[0158] 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.
[0159] 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.
[0160] 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.
[0161] 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.
[0162] 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.
[0163] 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.
[0164] 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.
[0165] 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 thereof.
Claims
1. A method for detecting anomalies in power consumption data based on channel independence and global-local channel dependence, 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 divided into multiple time windows of a preset window length; Multiple time window data and their adjacent time window data are input into a pre-trained anomaly detection model, and the reconstructed data corresponding to the time window data is output. The anomaly detection model generates the reconstructed data based on channel independence and global-local channel dependency. The anomaly score for each time point in the time window is determined based on the reconstructed data and the original data for each time window, and the degree of anomaly of the energy meter under test is determined based on the anomaly score. The training process of the anomaly detection model is as follows: Acquire multivariate time series historical data samples from multiple electricity meter historical detections and merge them into a single multivariate long time series historical data. The min-max standardization method is used to standardize each variable in the multivariate long-term historical series data to obtain standardized multivariate long-term historical series data, wherein the multivariate long-term historical series data includes continuous and discrete variables. Standardized multivariate long-term series historical data samples are windowed and divided into multiple time window historical data samples of the preset time window; Based on the pre-built dual-channel Mamba module, the channel-independent model analyzes the historical data samples of any time window from multiple time windows, and outputs channel-independent reconstructed data. Based on the pre-built trend-residual decomposition channel dependency model, the historical data samples of any time window in multiple time windows are analyzed, and the channel dependency reconstruction data is output. Based on the channel-independent reconstruction data and the channel-dependent reconstruction data, a reconstruction data sample is constructed; The total loss of the anomaly detection model is determined based on the pre-constructed total loss function and the reconstructed data samples. The network and parameters are updated and optimized based on the total loss until convergence, and the anomaly detection model is determined. The total loss function Loss The expression is: in, In the formula, L con For the channel-independent model, this is the continuity loss function; L rec This is the dependency loss function for the channel dependency model; L io To reconstruct the loss function; It is the first Standard deviation of auxiliary time series in each channel; M The number of feature dimensions for multidimensional time series data. T This is the size of the time series data window. M trend It is a trend dimension. M remain It is the dimension of the remaining items; x′ ind Reconstruct data independently for each channel; x' dep Reconstruct data for channel dependencies; ATS trend ( m , t )for m Dimension t The trend term and discrete input at any given time; ATS remain ( m , t )for m Dimension t The trend term and discrete input at any given time; ATS' trend ( m , t )for m Dimension t The output of trend reconstruction in real time; ATS' remain ( m , t )for m Dimension t The remaining reconstructed output at time step; x Input data for the model time series. x′ Reconstruct the output data for the model; λ = { λ 1, λ 2, ..., λ M } represents the learnable parameter vector. A learnable vector of trend weight parameters; L ind This is the loss vector for channel-independent processes.
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, After acquiring the multivariate long-term series data of the historical measurements of the electricity meter under test, the following steps are also included: The min-max standardization method is used to standardize each variable in the multivariate long-term series data, resulting in standardized multivariate long-term series data, including continuous and discrete variables; wherein, The expression for the max-min standardization method is: In the formula, For multivariate long-term series data, Represents the standardized , express The maximum value of all sample data for each variable. express The minimum value of all sample data for each variable.
4. The method according to claim 1, characterized in that, Based on a pre-built Mamba model, the channel-independent model analyzes historical data samples from multiple time windows, outputting channel-independent reconstructed data, including: The tokenization layer based on the channel-independent model performs standardization processing on the discrete and continuous data in the historical data sample to obtain continuous patch and discrete patch respectively. The continuous and discrete patches are fed into the Mamba block of the channel-independent model for modeling to obtain the continuous and discrete intermediate quantities of the Mamba residual network. A dual-channel processing module is used to combine the continuous quantity patch and the continuous intermediate quantity, and the discrete quantity patch and the discrete intermediate quantity, respectively, to obtain a joint output. The dual-channel processing module includes a discrete quantity processing channel and a continuous quantity processing channel. The continuous quantity processing channel uses a dual attention mechanism to obtain the representation within and between patches. The feedforward neural network layer based on the channel-independent model performs detoxification flattening on the joint output to output the channel-independent reconstructed data.
5. The method according to claim 1, characterized in that, Based on a pre-built trend-residual decomposition channel dependency model, the historical data samples from multiple time windows are analyzed for any time window, and the channel dependency reconstructed data is output, including: Trend residual decomposition is performed on the continuous data in the historical data sample to obtain a bi-term ATS, wherein the bi-term ATS includes the sum of the decomposed trend term and seasonal term. ATS trend and the remaining items ATS remain ; Sum of the trend term and the seasonal term ATS trend and the remaining items ATS remain Each of these data is combined with discrete data from the historical data sample and then transformed into a trend item patch sequence and a residual item patch sequence of multidimensional time series data through a standard normalization layer. The trend term patch sequence and the residual term patch sequence are fed into the CIGCD-Mamba module of the channel dependency model to obtain the trend term residual network output and the residual term residual network output. The outputs of the trend term residual network and the residual term residual network are input into the FFN normalization layer of the channel dependency model to output the trend reconstruction output and the residual reconstruction output. Based on the trend reconstruction output and the remaining reconstruction output, the channel-dependent reconstruction data is output.
6. The method according to claim 5, characterized in that, The calculation expression for the reconstructed data sample is: In the formula, , M The number of feature dimensions for multidimensional time series data. T This is the size of the time series data window; λ = { λ 1, λ 2, ..., λ M } represents a learnable parameter vector; x′ ind Reconstruct data independently for each channel; x' dep Reconstruct data for channel dependencies; ATS' trend ( m , t )for m Dimension t The output of trend reconstruction in real time; ATS' remain ( m , t )for m Dimension t The remaining reconstructed output at time step; This is a learnable vector of trend weight parameters.
7. The method according to claim 1, characterized in that, The formula for calculating the abnormal score is: In the formula, Indicates the preset time window t Outlier scores at time points M The number of feature dimensions for multidimensional time series data. T This is the size of the time series data window. x m , They are the first m Univariate time-series data in each dimension and their corresponding reconstructed data, x i , yes i Multivariate time series data at any given time and its corresponding reconstructed data.
8. A power consumption data anomaly detection device based on channel independence and global-local channel dependence, used to implement the method described in any one of claims 1-7, 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 partitioning module is used to divide the multivariate long-term series data into multiple time windows of a preset window length; The reconstruction module is used to input multiple time window data and their adjacent time window data into a pre-trained anomaly detection model and output the reconstructed data corresponding to the time window data. The anomaly detection model generates the reconstructed data based on channel independence and global-local channel dependency. The determination module is used to determine the anomaly score of each time point of the data in each time window based on the reconstructed data and the original data, and to determine the degree of anomaly of the energy meter under test at each time point based on the anomaly score.