Heat meter energy consumption behavior abnormity identification method based on graph neural network

By using a multi-dimensional information fusion method based on graph neural networks, the problems of single information dimension and high complexity in the detection of abnormal energy consumption behavior of heat meters are solved. This method achieves high sensitivity, low false alarm rate, strong adaptability, and reduces system complexity.

CN121302194APending Publication Date: 2026-01-09SHENYANG YINGLIAN NUOTONG ENERGY SAVING EQUIP CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511430712.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-09
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Existing methods for detecting abnormal energy consumption behavior of heat meters suffer from problems such as limited information dimensions, sensitivity to noise, difficulty in identifying minor anomalies, and high system complexity. In particular, the detection effect is poor when early abnormal signals are weak and easily masked by normal fluctuations.

Method used

By employing a graph neural network-based approach, we construct graph feature space, time domain, and frequency domain representations, and combine a time-frequency joint attention mechanism and a hierarchical autoencoder network to achieve multi-dimensional information fusion, dynamically adjust feature attention, balance detection sensitivity and stability, and generate anomaly scores and explanation reports.

Benefits of technology

It achieves comprehensive characterization of abnormal behavior of heat meters, improves detection accuracy to over 95%, achieves early detection rate of minor anomalies to 92%, controls false alarm rate to below 3%, reduces system complexity by 40%, adapts to seasonal changes, and reduces system maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121302194A_ABST
    Figure CN121302194A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, and discloses a heat meter energy consumption behavior abnormity identification method based on a graph neural network, and the method comprises the steps: carrying out the collection and preprocessing of multi-dimensional data; constructing a three-dimensional unified representation model comprising a graph topology encoder, a time domain sequence encoder and a frequency domain feature encoder; a time-frequency joint attention mechanism is realized, and tiny abnormal sensitivity and anti-noise stability are dynamically balanced; constructing a hierarchical self-encoding network, and calculating a reconstruction error on a plurality of abstract hierarchies; calculating an anomaly score based on the reconstruction error distribution characteristics in the unified representation space, and generating an anomaly interpretation report; and optimizing and deploying the model. According to the method, time domain, frequency domain and graph domain information are organically fused, and the detection accuracy rate reaches 95% or above; tiny abnormal signals can be captured, and the abnormal early warning time is advanced to 15-20 days; the false alarm rate is controlled below 3% while high detection sensitivity is maintained; the parameter quantity is reduced by 40%, the calculation complexity is reduced by 58%, and the system maintenance cost is greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and more specifically, to a method for identifying abnormal energy consumption behavior of heat meters based on graph neural networks. Background Technology

[0002] With the rapid development of intelligent heating systems, heat meters, as key devices for measuring the heat energy consumption of heating systems, play an important role in the safe and stable operation of heating systems through timely detection of abnormal behavior.

[0003] Currently, the detection of abnormal energy consumption behavior in heat meters mainly employs statistical analysis, threshold monitoring, and machine learning methods. Statistical analysis builds a normal behavior model by calculating statistical parameters from historical data, but it relies heavily on assumptions about data distribution and has limited adaptability. Threshold monitoring sets fixed thresholds for boundary violations, is simple to configure but has a high false alarm rate and cannot adapt to seasonal changes. Machine learning methods, such as support vector machines and random forests, can learn complex patterns, but they are mainly based on single time-series data analysis, ignoring the spatial correlation and network topology characteristics between heat meters. Existing methods generally suffer from problems such as limited information dimensions, sensitivity to noise interference, difficulty in identifying minor anomalies, limited representation capabilities, and high system complexity. They cannot comprehensively capture the multidimensional features of abnormal heat meter behavior, especially when early abnormal signals are weak and easily masked by normal fluctuations, resulting in poor detection performance. Therefore, there is an urgent need for a method for identifying abnormal energy consumption behavior in heat meters that can integrate multidimensional information, balance detection sensitivity and stability, and reduce system complexity. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention provides a method for identifying abnormal energy consumption behavior of heat meters based on graph neural networks.

[0005] A method for identifying abnormal energy consumption behavior of heat meters based on graph neural networks includes the following steps: Collect energy consumption data, flow data, temperature data, and topology information of the heat meter network to construct an initial graph structure; The topology of the heat meter network is mapped to the graph feature space to generate a graph domain representation, a time domain representation is generated for the time series data, and a frequency domain representation is generated by obtaining the spectral features through Fourier transform. Mapping graph domain representation, time domain representation, and frequency domain representation to a unified representation space enables multi-dimensional information fusion. By applying a time-frequency joint attention mechanism, the attention given to time-domain and frequency-domain features is dynamically adjusted to balance the sensitivity and stability of anomaly detection. A hierarchical autoencoder network is constructed to compress features in a unified representation space into latent feature vectors and reconstruct the original representation. Based on the reconstruction error distribution in the unified representation space, anomaly scores are calculated, the dimensions of anomaly sources are analyzed, and anomaly explanation reports are generated.

[0006] Preferably, in the step of mapping the topology of the heat meter network to the graph feature space to generate a graph domain representation, a multi-layer graph convolutional network structure is adopted, wherein the graph convolution operation is represented as: ; in, It is an adjacency matrix with self-loops added. It is the original adjacency matrix. It is the identity matrix. yes The degree matrix, It is the first The node feature matrix of the layer, It is a learnable weight matrix. It is a non-linear activation function.

[0007] Preferably, in the step of generating a time-domain representation of the time-series data, a bidirectional long short-term memory network or a temporal convolutional network is used to process the time-series data of the heat table.

[0008] Preferably, in the step of obtaining spectral features and generating frequency domain representation through Fourier transform, the time-series data of the heat meter is divided into multiple overlapping time windows, a window function is applied to the data in each window to reduce spectral leakage, and then a discrete Fourier transform is performed to extract frequency domain representation through a frequency domain convolutional network.

[0009] Preferably, the step of mapping graph domain representation, time domain representation and frequency domain representation to a unified representation space adopts a tensor fusion mechanism to align the three different dimensional feature representations, calculate the importance weights of each dimensional feature through an attention mechanism, and perform a weighted summation of the three features based on these weights.

[0010] Preferably, in the step of applying the time-frequency joint attention mechanism, the time-frequency joint attention coefficient is calculated using the following formula: ; in, , and The weight matrix is ​​a learnable matrix. For time-domain feature representation, For frequency domain feature representation, Attention coefficient The hyperbolic tangent activation function is used. This is the normalization function.

[0011] Preferably, the training steps of the hierarchical autoencoder network include: using normal energy consumption data as training samples, and minimizing the reconstruction error to enable the network to learn the distribution of normal energy consumption behavior features; calculating the reconstruction error of the encoding-decoding process at multiple abstract levels to obtain hierarchical feature reconstruction information.

[0012] Preferably, the step of calculating the anomaly score based on the reconstruction error distribution in the unified representation space includes: calculating the mean and standard deviation of the reconstruction error of each layer using normal data samples to establish a baseline distribution; calculating the standardized reconstruction error of each layer for the evaluation samples, and applying a pre-determined weighting coefficient for weighted summation to obtain the anomaly score.

[0013] Preferred options include model optimization and deployment steps: optimizing network parameters by minimizing the weighted objective function of reconstruction error and abnormal sample recognition rate; verifying model performance using historical data and adjusting hyperparameters to balance detection sensitivity and false alarm rate; and setting a dynamic threshold mechanism to adaptively adjust the anomaly judgment criteria according to seasonal changes and usage patterns.

[0014] A heat meter energy consumption behavior anomaly identification system based on graph neural network, wherein the system executes the above method and includes a multi-dimensional information extraction module, a three-dimensional fusion representation module, a hierarchical autoencoder network and an anomaly scoring and interpretation module; The multi-dimensional information extraction module is used to extract the graph domain, time domain, and frequency domain features of the heat meter; The 3D fusion representation module is used to fuse information from three dimensions; Hierarchical autoencoder networks are used to learn the distribution of normal energy consumption behavior characteristics; The anomaly scoring and interpretation module is used to detect and interpret anomalies.

[0015] The beneficial effects of this invention are as follows: Multi-dimensional information fusion: By using a unified representation model, time domain, frequency domain and graph domain information are organically integrated to provide a comprehensive representation of abnormal behavior of heat meters, and the detection accuracy is improved to over 95%.

[0016] Early detection of minute anomalies: It can capture minute anomaly signals that are difficult to identify by traditional methods, advancing the anomaly warning time from 7-12 days to 15-20 days, with a detection rate of 92% for minute anomalies (deviation <2%).

[0017] Balancing sensitivity and stability: By using a time-frequency joint attention mechanism, the false alarm rate is controlled below 3% while maintaining high detection sensitivity, thus achieving an optimized balance between sensitivity and stability.

[0018] Reduced system complexity: Integrating multiple heterogeneous models into a single end-to-end framework reduces the number of parameters by 40%, computational complexity by 58%, and significantly reduces system maintenance costs.

[0019] Anomaly explanation capability: By analyzing the distribution of reconstruction errors across different dimensions, the system provides the source dimensions and possible causes of anomalies, thereby enhancing the interpretability and credibility of the system.

[0020] Adaptive learning capability: The system can continuously optimize based on new data, adapt to seasonal changes in heat energy usage patterns, and maintain long-term detection performance.

[0021] Therefore, the implementation method provided in this application solves the problems of single information dimension, noise sensitivity and difficulty in identifying minor anomalies faced by existing heat meter anomaly detection methods, and provides an efficient and accurate technical solution for identifying abnormal energy consumption behavior of heat meters. Attached Figure Description

[0022] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a bar chart comparing the accuracy of anomaly detection in heat meters using different methods; Figure 3 It is a radar chart comparing the detection rates of different detection methods for minor anomalies; Figure 4 This is a bar chart comparing the anomaly warning times of different detection methods; Figure 5 It is a bar chart comparing system complexity; Figure 6 It is a scatter plot showing the balance between detection sensitivity and stability. Detailed Implementation

[0023] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, some features described in the examples may be combined in other examples.

[0024] Before providing a detailed description of this application, the terms used in this application will be explained below to aid in understanding the technical solutions: Heat meter: A metering device used to measure the heat energy consumption in a heating system. It typically includes a flow sensor, a temperature sensor, and a computing unit to calculate the amount of heat energy consumed.

[0025] Graph Neural Networks: A type of neural network specifically designed to process graph-structured data, capable of data processing and feature learning by utilizing node features and the relationships between nodes.

[0026] Time-domain characteristics: refers to the observation and analysis of signal characteristics in the time dimension, such as the trend, fluctuation, periodicity and other time series characteristics of the signal.

[0027] Frequency domain characteristics: These refer to the characteristics obtained by converting time-domain signals to the frequency dimension through methods such as Fourier transform, such as the spectrum and power spectrum.

[0028] Autoencoder networks: an unsupervised learning architecture that learns to compress input data into a low-dimensional latent space and then reconstruct the original data for feature extraction and anomaly detection.

[0029] Unified Representation Space: The multidimensional feature space proposed in this application, which integrates time-domain, frequency-domain, and graph-domain information, is used to comprehensively describe the abnormal behavior characteristics of heat meters.

[0030] Anomaly score: A numerical indicator used to quantify the degree to which the behavior of a heat meter deviates from the normal pattern, usually calculated based on reconstruction error or statistical deviation.

[0031] Application scenario description The implementation method of this application is applicable to the detection of abnormal energy consumption behavior of heat meters in industrial and large residential heating systems. In these scenarios, a large number of heat meters form a network structure, with physical connections and functional dependencies between them. This technical solution is particularly suitable for the following application environments: Large-scale residential centralized heating systems contain hundreds to thousands of heat meter devices, forming a complex network topology, requiring real-time monitoring of the energy consumption behavior of each terminal device.

[0032] Industrial district heating networks: Industrial production has high requirements for the stability of heat energy supply, and it is necessary to accurately identify abnormal behavior of heat meters to prevent energy waste or heating interruption caused by equipment failure or abnormal energy use patterns.

[0033] Heating management of commercial building complexes: The energy consumption patterns of commercial buildings are complex, with significant seasonal and cyclical changes, requiring a distinction between normal fluctuations and genuine anomalies.

[0034] The implementation environment of the embodiments provided in this application includes a heat meter IoT data acquisition system, a data preprocessing module, a time-frequency fusion autoencoder graph network model, and an anomaly detection and early warning system. This technical solution can be deployed on edge computing devices or cloud servers, performing online anomaly detection by receiving real-time data streams from heat meters, and also performing offline analysis of historical data.

[0035] Example See Figure 1This embodiment proposes a method for identifying abnormal energy consumption behavior of heat meters based on graph neural networks. It achieves early and accurate identification of abnormal heat meter behavior through a time-frequency fusion autoencoder graph network. The method includes the following steps: Step 1: Multidimensional Data Acquisition and Preprocessing 1.1 Collect raw data from the heat meter network, including energy consumption data, flow data, temperature data, and physical topology information between devices; 1.2 The collected raw data is cleaned to remove outliers, handle missing values, and perform time alignment and standardization. The specific implementation of data cleaning includes: (1) Outlier identification adopts the modified Z-score method, which calculates the deviation of each data point from the median and divides it by the median absolute deviation (MAD). When the ratio exceeds the threshold of 3.5, it is judged as an outlier and replaced with the nearest valid value; (2) Missing value processing adopts the time series interpolation method. For short-term missing values ​​(interval less than 4 hours), linear interpolation is used. For long-term missing values, a multivariate regression model is constructed based on historical data of the same period and data of adjacent devices to fill the missing values; (3) Time alignment is achieved by resampling all data to a uniform time interval (e.g., 15 minutes) and using the weighted average method to handle the aggregation operation in the resampling; (4) Standardization processing adopts sliding window Z-score standardization, which calculates the mean and standard deviation of each feature within its past 24-hour window and then standardizes the current value. The expression is: This method can adapt to the time-varying characteristics of data; 1.3 Based on the physical connections and functional dependencies between heat meters, an initial graph structure G is constructed, where nodes represent heat meter devices and edges represent the connections between devices; 1.4 Based on the time-series data of the heat meter, calculate the energy consumption correlation between devices and dynamically update the edge weights in the graph structure.

[0036] It should be noted that in some embodiments, environmental data such as outdoor temperature and humidity can also be collected from the heat meter to provide additional contextual information and further improve the accuracy of anomaly detection.

[0037] Step 2: Construction of a three-dimensional unified representation model 2.1 Construct a graph topology encoder to map the topology G of the heat meter network to the graph feature space and generate a graph domain representation TG; Graph topology encoders consist of a multi-layer graph convolutional network (GCN) structure, where each layer's graph convolution operation can be represented as: ; in, It is an adjacency matrix with self-loops added. It is the original adjacency matrix. It is the identity matrix. yes The degree matrix, It is the first The node feature matrix of the layer, It is a learnable weight matrix. It is a non-linear activation function, such as the ReLU function. By stacking multiple layers of graph convolution operations, the encoder is able to capture topological information of different ranges.

[0038] Alternatively, in some embodiments, the graph topology encoder may employ a graph attention network (GAT) instead of a graph attention network (GCN) to adaptively focus on the features of different neighboring nodes.

[0039] 2.2 Construct a time-domain sequence encoder and apply a bidirectional long short-term memory network (BiLSTM) or a temporal convolutional network (TCN) to the time-domain data T of the heat meter to generate a time-domain representation TT; The time-domain sequence encoder employs a BiLSTM structure, and the processing procedure is as follows: For the time-series data sequence of each heat meter node, the system processes it simultaneously from both the forward and reverse directions using an LSTM network. Then, the final hidden states of the two LSTMs are concatenated to form a complete time-domain feature representation. The LSTM unit works collaboratively through three gating mechanisms: an input gate, a forget gate, and an output gate, controlling the inflow, retention, and output of information. The calculation of the hidden state involves element-wise multiplication of the output gate state with the unit state processed by the tanh activation function. This bidirectional processing method can simultaneously capture the sequential dependencies of the sequence, providing a more comprehensive time-series feature representation.

[0040] It should be understood that in other embodiments, the temporal sequence encoder may also employ a temporal convolutional network (TCN) or a Transformer structure to capture temporal dependencies at different scales.

[0041] 2.3 Construct a frequency domain feature encoder, apply Fourier transform to the heat meter data to obtain spectral features F, and extract frequency domain representation TF through a frequency domain convolutional network; The frequency domain feature encoder first applies a short-time Fourier transform to the time-series data. The process is as follows: the system divides the time-series data of the heat meter into multiple overlapping time windows. A window function (such as a Hanning or Hamming window) is applied to the data within each window to reduce spectral leakage. Then, a discrete Fourier transform is performed on the windowed data to calculate the time-spectrum features. The Hanning window and other window functions smooth the edges of the signal, reducing edge effects in spectral analysis; their calculation is based on the cosine function of the window position. Finally, these time-spectrum features are processed through a multi-layer convolutional neural network to extract frequency domain representation information.

[0042] Furthermore, in some embodiments, the frequency domain feature encoder can be combined with wavelet transform to obtain multi-resolution frequency domain features, thereby better capturing anomalous patterns at different frequency scales.

[0043] 2.4 Apply a three-dimensional unified representation model to integrate multi-dimensional information, mapping the graph domain representation TG, time domain representation TT, and frequency domain representation TF to a unified representation space Z; Before fusing feature representations from different domains, feature normalization is first performed on the graph domain representation (TG), time domain representation (TT), and frequency domain representation (TF) to ensure consistency in the dimensions of each feature. Specifically, L2 normalization is used, which involves dividing each feature vector by its L2 norm (Euclidean norm), expressed as: , , The feature vectors processed in this way all have a length of 1, which makes the representations of different domains have similar influence during fusion, and avoids the feature of a certain domain from dominating the fusion result due to the large numerical range. The unified representation model employs a tensor fusion mechanism, with the following processing steps: First, the feature representations from three different dimensions (graphic domain, time domain, and frequency domain) are dimensionally aligned. Then, an attention mechanism is used to calculate the importance weights of each dimension's features. The system then performs a weighted sum of the three features based on these weights. Finally, a multilayer perceptron further processes the fused features to generate the final unified representation. In this process, the attention weights are calculated through learnable transformations and softmax normalization to ensure that the sum of the weights is 1. The multilayer perceptron further refines the expressive power of the fused features through multilayer nonlinear transformations.

[0044] The three-dimensional unified representation theory model proposed in this application can be expressed as: in, For graph topology, For time-domain signals, For frequency domain transformation, For parameterized mapping functions, To unify the representation space, This is a set of learnable parameters. The model unifies the time-domain characteristics, frequency-domain characteristics, and graph topology of heat meter data in the same mathematical space, achieving the fusion expression of multi-dimensional information.

[0045] Parameterized mapping function The specific implementation is a combination of a multilayer perceptron and an attention mechanism: firstly, graph features are processed through three independent mapping networks. Temporal characteristics and frequency domain features Project onto a feature space of the same dimension, and then calculate the attention weights for each feature domain. , and Finally, the three features are fused using a weighted summation method. The mathematical expression is: in, , and These are nonlinear mapping networks used for feature projection. , and The weight coefficients are calculated through an attention mechanism and satisfy... This ensures that the contribution of each feature domain is reasonably allocated.

[0046] Step 3: Implementation of the Time-Frequency Joint Attention Mechanism 3.1 Calculate the importance scores of time-domain and frequency-domain features, and use an attention mechanism to adaptively adjust the weights of different features; Before calculating the importance score, batch normalization is first performed on the time-domain and frequency-domain features to adjust the feature distribution to a standard distribution with a mean of 0 and a variance of 1. The batch normalization operation is expressed as: and ,in , The mean and standard deviation of the time-domain features are given. , The mean and standard deviation of the frequency domain characteristics are given. , , , For learnable scaling and translation parameters, To prevent division by zero by small constants. This process ensures that the data distribution across different feature domains is similar, which helps in the stable training of the attention mechanism and the fair evaluation of the importance of features from different domains; For each heat meter node, the system first applies a learnable linear transformation to its time-domain and frequency-domain features respectively. Then, it maps the transformed results to the range [-1, 1] using the tanh activation function. Next, it performs an inner product operation with the corresponding learnable vector to obtain an attention score representing importance. These scores are normalized using the softmax function to convert them into a probability distribution, ensuring that the sum of all weights is 1, thus obtaining the final attention weight coefficients for the time-domain and frequency-domain features. This mechanism allows the model to dynamically adjust the degree of attention given to different feature domains based on data characteristics.

[0047] 3.2 Applying a time-frequency joint attention mechanism to dynamically balance sensitivity to minor anomalies and noise resistance stability; The expression for the time-frequency joint attention mechanism is: in, , and The weight matrix is ​​a learnable matrix. For time-domain feature representation, For frequency domain feature representation, Attention coefficient The hyperbolic tangent activation function is used. The normalization function ensures that the sum of all attention weights is 1. This mechanism balances the sensitivity to detecting minute anomalous signals with the system's stability and noise immunity by dynamically adjusting the attention given to time-domain and frequency-domain features.

[0048] Optionally, in some embodiments, a multi-head attention mechanism can be introduced to capture the importance of features from different perspectives through multiple independent attention computing units, thereby further improving the model's expressive power.

[0049] 3.3 We calculate weighted feature representations based on attention coefficients to enhance sensitivity to abnormal patterns while suppressing noise interference.

[0050] The calculation process for the weighted feature representation is as follows: The system uses the attention coefficients obtained above to weight the time-domain features, frequency-domain features, and time-frequency joint representation, respectively. Then, the three weighted results are summed to obtain the final comprehensive feature representation. This multi-level weighted fusion mechanism can dynamically adjust the importance of each dimension feature according to the characteristics of the current data, which can enhance the sensitivity to small anomalous signals and effectively suppress noise interference, achieving an optimized balance between sensitivity and stability.

[0051] Step 4: Construction of Hierarchical Autoencoder Network 4.1 Construct a multi-level encoder structure to compress the features in the unified representation space Z into latent feature vectors layer by layer; The hierarchical encoder is constructed as follows: The system designs multiple cascaded nonlinear transformation layers. Each layer receives the output features from the previous layer, performs a linear transformation using a learnable weight matrix, adds a learnable bias vector, and then processes the data using a nonlinear activation function (such as ReLU or LeakyReLU). The ReLU function sets negative values ​​to zero while keeping positive values ​​unchanged, while the LeakyReLU function applies a small non-zero slope to negative values ​​to avoid the vanishing gradient problem. As the number of layers increases, the feature dimension gradually decreases, and the information is compressed into a more compact latent space, ultimately yielding a low-dimensional latent representation. This hierarchical design enables the encoder to capture multi-scale features and abstract representations of the data.

[0052] 4.2 Construct the corresponding decoder structure to reconstruct the latent feature vectors into representations of the original dimensions; The decoder is constructed symmetrically to the encoder, and the processing procedure is as follows: The system starts with the low-dimensional latent representation output by the encoder and gradually expands the feature dimension through a series of nonlinear transformation layers. Each layer receives the output of the previous layer, performs a linear transformation through a learnable weight matrix, adds a learnable bias vector, and then processes it through a nonlinear activation function. As the number of layers increases, the feature dimension gradually expands until it is restored to the same dimension as the original input, thus completing the mapping transformation from the latent space to the original feature space and realizing the reconstruction of the input data.

[0053] It should be noted that, in some embodiments, the encoder and decoder may employ a variational autoencoder (VAE) structure, introducing probabilistic latent representations to enhance the model's ability to model data distributions.

[0054] 4.3 Train the autoencoder network to minimize the reconstruction error, enabling the network to learn the characteristic distribution of the normal energy consumption behavior of the heat meter; Before calculating the reconstruction error, the features input to the autoencoder network and the reconstructed features are subjected to the same Min-Max normalization process, scaling the value of each feature dimension to the [0,1] interval. The normalization formula is: ,in and These are the minimum and maximum values ​​of the feature in the training set, respectively. This normalization ensures that each feature dimension has the same weight in the reconstruction error calculation, preventing certain features with large dimensions from dominating the error calculation; The training process of the autoencoder network is as follows: The system uses normal energy consumption data as training samples, inputs the data into the encoder to obtain the latent representation, and then reconstructs the original input through the decoder, calculating the mean squared error between the reconstructed result and the original input. Specifically, for each sample, the system calculates the square of the Euclidean distance (L2 norm) between the original feature vector and the reconstructed feature vector, i.e., the sum of the squares of the differences between each element, and then averages this error over all samples to form the overall loss function. By minimizing this loss function through the backpropagation algorithm, the system continuously adjusts the network parameters so that the autoencoder network can accurately reconstruct normal energy consumption behavior patterns, thereby learning the feature distribution of normal energy consumption data.

[0055] Furthermore, in some embodiments, a contrastive learning loss can be introduced to make similar normal samples closer together in the latent space, further enhancing the model's representational ability.

[0056] 4.4 Calculate the reconstruction error of the encoding-decoding process at multiple abstraction levels to obtain hierarchical feature reconstruction information.

[0057] The hierarchical reconstruction error calculation process is as follows: The system calculates the reconstruction error not only at the final output layer but also at each intermediate layer of the autoencoder network. For each layer, the system compares the feature representation output by the encoder of that layer with the feature representation reconstructed by the corresponding decoder layer and calculates the mean squared error between them. By comprehensively considering the reconstruction errors at different levels of abstraction, the system can simultaneously capture low-level local detail features and high-level global structural features, thereby providing more comprehensive and refined anomaly detection criteria and effectively improving the accuracy of anomaly identification.

[0058] Step 5: Implementation of the Anomaly Scoring and Explanation Module 5.1 Based on the characteristics of the reconstruction error distribution in the unified representation space, calculate the anomaly score of the energy consumption behavior of the heat meter; Before calculating the anomaly score, the reconstruction errors at each level need to be standardized to eliminate scale differences in reconstruction errors across different levels of abstraction. The standardization method used is Z-score standardization, i.e. ,in For the first Layer reconstruction error, and These are the mean and standard deviation of the reconstruction error calculated for this layer on normal data, respectively. This standardization process allows for direct comparison and weighted combination of the reconstruction errors from different layers. The anomaly score calculation process is as follows: First, the system calculates the mean and standard deviation of the reconstruction error at each layer using normal data samples to establish a baseline distribution. When evaluating new samples, the system calculates their reconstruction error at each layer, then subtracts the mean of the normal error at the corresponding layer from these errors and divides by the standard deviation to normalize them, obtaining the standardized deviation. Next, the system applies pre-determined weighting coefficients to the standardized errors at different layers and performs a weighted summation to obtain the final anomaly score. This multi-level weighted anomaly scoring method can comprehensively consider the feature deviations at different levels of abstraction, providing a more comprehensive and accurate anomaly measurement.

[0059] Optionally, in some embodiments, anomaly scoring can be combined with statistical indicators such as Mahalanobis distance to comprehensively consider the distribution characteristics of samples in the latent space, thereby further improving the accuracy of anomaly detection.

[0060] 5.2 Apply the core transformation formula to calculate node representations, achieving seamless fusion of time-domain, frequency-domain, and graph-domain information; The core transformation formula is: in, This represents the neighborhood set of node i, that is, all nodes directly connected to node i; The adjacency matrix element represents the connection strength between node i and node j. This represents the time-domain characteristics of node i at time t; This represents the result of frequency domain transformation of the characteristics of node i at time t; This represents the unified representation of node i at the previous time t-1; and The weight matrix is ​​a learnable matrix; It is a non-linear activation function; This indicates a feature concatenation operation. The formula achieves seamless integration of information across the time, frequency, and graph domains, enabling comprehensive capture of the multidimensional features of heat meter energy consumption behavior.

[0061] Frequency domain transform function The specific implementation is as follows: First, the input time-domain features are processed... Apply a sliding window segmentation, and apply the Hanning window function within each window. ,in For the index within the window, Let the window length be denoted as ; then, a Fast Fourier Transform (FFT) is performed on the windowed signal to obtain the complex spectrum; next, the spectral amplitude is calculated and spectral feature vectors are extracted, including energy distribution, dominant frequency components, and band energy ratios; finally, a learnable linear transformation is used to map the extracted spectral features to a space with the same dimension as the time-domain features. This transformation can be expressed as: in, Represents the Fast Fourier Transform. Represents the spectral feature extraction function. It is a learnable frequency domain feature mapping matrix.

[0062] The application of the core transformation formula involves two main components: Spatial information aggregation: The system first identifies all neighboring nodes of the target node. Then, for each neighboring node, its time-domain features are concatenated with the features obtained through frequency-domain transformation. Next, the concatenated features are weighted based on edge weights and processed through a nonlinear transformation. Finally, the processing results of all neighboring nodes are summed to obtain the spatial information aggregation result. The implementation of the frequency-domain transformation function includes applying a short-time Fourier transform to the input time-domain signal, extracting spectral features, and mapping them through a feature extraction network to ensure that the frequency-domain features are dimensionally compatible with the time-domain features.

[0063] Time information transmission: The system transforms the node representation of the previous time step through a learnable weight matrix and applies a nonlinear activation function to generate the time information transmission result.

[0064] Finally, the system adds the results of spatial information aggregation and temporal information transmission to obtain a node representation that integrates information from the time domain, frequency domain, and graph domain, thus achieving seamless integration of multidimensional information.

[0065] 5.3 Analyze the distribution of reconstruction errors in different dimensions (time domain, frequency domain, and graph domain) to determine the main source dimensions of anomalies; The reconstruction error dimensional analysis process is as follows: First, the system calculates the squared Euclidean distances between the reconstructed time-domain features, frequency-domain features, and graph-domain features and the original features, respectively, obtaining the reconstruction errors in three dimensions. Then, the system calculates the proportion of each dimension's error to the total error by dividing the error of that dimension by the sum of the errors of the three dimensions. Finally, the system compares the three proportions and determines the dimension corresponding to the largest proportion as the primary source of anomalies. In this way, the system can accurately pinpoint whether anomalies originate from time pattern anomalies, frequency characteristic anomalies, or network topology anomalies, providing specific direction for subsequent anomaly interpretation and processing.

[0066] 5.4 Generate an anomaly explanation report, including the anomaly type, severity, scope of impact, and possible causes.

[0067] The anomaly explanation report is generated based on the following information: Anomaly Types: The system classifies anomalies into different types based on the distribution patterns of reconstruction errors in different dimensions and the characteristics of spatiotemporal variations, such as equipment failure, energy theft, or abnormal usage patterns. Severity: The system determines the severity level of the anomaly based on the absolute value of the anomaly score and the comparison with historical thresholds; Scope of impact: The system assesses the potential scope and propagation path of anomalies by analyzing the connections and correlations between anomalous nodes and other nodes in the graph structure. Possible causes: The system combines various anomaly pattern characteristics and historical cases stored in the domain knowledge base to infer the possible root causes of the currently observed anomalies.

[0068] Step 6: Model Optimization and Deployment 6.1 The parameters of the entire network are optimized by minimizing the weighted objective function of reconstruction error and abnormal sample recognition rate; 6.2 Validate model performance using historical data and adjust hyperparameters to balance detection sensitivity and false alarm rate; 6.3 Deploy the trained model to the target environment to achieve real-time monitoring of abnormal energy consumption behavior of the heat meter; 6.4 Set a dynamic threshold mechanism to adaptively adjust the anomaly judgment criteria according to seasonal changes and usage patterns.

[0069] It should be understood that in some embodiments, model deployment may employ a federated learning framework, which, while protecting data privacy, utilizes data from multiple heating systems to collaboratively train the model, thereby improving the system's versatility and robustness.

[0070] Figure 2 The figure shows a comparison of the accuracy of different methods in detecting anomalies in heat meters. As can be seen from the figure, the time-frequency fusion method proposed in this invention has a higher detection accuracy than traditional time-domain methods, frequency-domain methods, and graph convolutional network methods, reaching over 95%.

[0071] Figure 3 The figure shows a comparison of the detection rates of different detection methods for minute anomalies. As can be seen from the figure, the time-frequency fusion method proposed in this patent can achieve a detection rate of 92% when detecting minute anomalies with a deviation of less than 2%, which is much higher than that of traditional methods. The advantage is even more obvious when the deviation is very small (e.g., <1%).

[0072] Figure 4 The figure shows a comparison of anomaly warning times for different detection methods. As can be seen from the figure, the method proposed in this patent can reduce the anomaly warning time from 7-12 days for traditional methods to 15-20 days, greatly improving the lead time for warnings and providing more sufficient response time for equipment maintenance and energy management.

[0073] Figure 5The diagram illustrates a comparison of system complexity. As can be seen from the figure, the time-frequency fusion system proposed in this patent reduces the number of parameters by 40% and the computational complexity by 58% compared to traditional multi-model systems, significantly simplifying the system's complexity and reducing implementation and maintenance costs.

[0074] Figure 6 The figure illustrates the balance between detection sensitivity and stability. As can be seen from the graph, even with a detection sensitivity of 95%, the false alarm rate of the system can still be controlled below 3%, achieving an optimized balance between high sensitivity and high stability.

[0075] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.

Claims

1. A method for identifying abnormal energy consumption behavior of heat meters based on graph neural networks, characterized in that, Includes the following steps: Collect energy consumption data, flow data, temperature data, and topology information of the heat meter network to construct an initial graph structure; The topology of the heat meter network is mapped to the graph feature space to generate a graph domain representation, a time domain representation is generated for the time series data, and a frequency domain representation is generated by obtaining the spectral features through Fourier transform. Mapping graph domain representation, time domain representation, and frequency domain representation to a unified representation space enables multi-dimensional information fusion. By applying a time-frequency joint attention mechanism, the attention given to time-domain and frequency-domain features is dynamically adjusted to balance the sensitivity and stability of anomaly detection. A hierarchical autoencoder network is constructed to compress features in a unified representation space into latent feature vectors and reconstruct the original representation. Based on the reconstruction error distribution in the unified representation space, anomaly scores are calculated, the dimensions of anomaly sources are analyzed, and anomaly explanation reports are generated.

2. The method for identifying abnormal energy consumption behavior of heat meters based on graph neural networks according to claim 1, characterized in that, In the step of mapping the topology of the heat meter network to the graph feature space to generate a graph domain representation, a multi-layer graph convolutional network structure is adopted, wherein the graph convolution operation is represented as: ; in, It is an adjacency matrix with self-loops added. It is the original adjacency matrix. It is the identity matrix. yes The degree matrix, It is the first The node feature matrix of the layer, It is a learnable weight matrix. It is a non-linear activation function.

3. The method for identifying abnormal energy consumption behavior of heat meters based on graph neural networks according to claim 1, characterized in that, In the step of generating a time-domain representation of time-series data, a bidirectional long short-term memory network or a temporal convolutional network is used to process the time-series data of the heat meter.

4. The method for identifying abnormal energy consumption behavior of heat meters based on graph neural networks according to claim 1, characterized in that, In the step of obtaining spectral features and generating frequency domain representation through Fourier transform, the time-series data of the heat meter is divided into multiple overlapping time windows. A window function is applied to the data in each window to reduce spectral leakage. Then, a discrete Fourier transform is performed, and frequency domain representation is extracted through a frequency domain convolutional network.

5. The method for identifying abnormal energy consumption behavior of heat meters based on graph neural networks according to claim 1, characterized in that, The step of mapping graph domain representation, time domain representation and frequency domain representation to a unified representation space adopts a tensor fusion mechanism to align the three different dimensional feature representations, calculate the importance weights of each dimensional feature through an attention mechanism, and sum the three features according to these weights.

6. The method for identifying abnormal energy consumption behavior of heat meters based on graph neural networks according to claim 1, characterized in that, In the step of applying the time-frequency joint attention mechanism, the time-frequency joint attention coefficients are calculated using the following formula: ; in, , and The weight matrix is ​​a learnable matrix. For time-domain feature representation, For frequency domain feature representation, Attention coefficient The hyperbolic tangent activation function is used. This is the normalization function.

7. The method for identifying abnormal energy consumption behavior of heat meters based on graph neural networks according to claim 1, characterized in that, The training steps of the hierarchical autoencoder network include: using normal energy consumption data as training samples, minimizing the reconstruction error to enable the network to learn the distribution of normal energy consumption behavior features; calculating the reconstruction error of the encoding-decoding process at multiple abstraction levels to obtain hierarchical feature reconstruction information.

8. The method for identifying abnormal energy consumption behavior of heat meters based on graph neural networks according to claim 1, characterized in that, The steps for calculating anomaly scores based on the reconstruction error distribution in a unified representation space include: calculating the mean and standard deviation of the reconstruction error for each layer using normal data samples to establish a baseline distribution; calculating the standardized reconstruction error for each layer of the evaluation samples; applying predetermined weighting coefficients to perform weighted summation to obtain the anomaly score.

9. The method for identifying abnormal energy consumption behavior of heat meters based on graph neural networks according to claim 1, characterized in that, It also includes model optimization and deployment steps: optimizing network parameters by minimizing the weighted objective function of reconstruction error and abnormal sample recognition rate; applying historical data to verify model performance and adjusting hyperparameters to balance detection sensitivity and false alarm rate; A dynamic threshold mechanism is set up to adaptively adjust the anomaly judgment criteria based on seasonal changes and usage patterns.

10. A system for identifying abnormal energy consumption behavior of a heat meter based on a graph neural network, wherein the system performs the method as described in any one of claims 1 to 9, characterized in that, It includes a multi-dimensional information extraction module, a three-dimensional fusion representation module, a hierarchical autoencoder network, and an anomaly scoring and interpretation module; The multi-dimensional information extraction module is used to extract the graph domain, time domain, and frequency domain features of the heat meter; The 3D fusion representation module is used to fuse information from three dimensions; Hierarchical autoencoder networks are used to learn the distribution of normal energy consumption behavior characteristics; The anomaly scoring and interpretation module is used to detect and interpret anomalies.

Citation Information

Cited By

  • Electric equipment anomaly detection algorithm based on energy consumption feature extraction

    CN122286593A