An anomaly detection method based on ARIMA residuals

By combining the ARIMA residual method with the LSTM-AE model, the complexity of anomaly detection in building energy consumption monitoring data was solved, achieving high-precision anomaly detection and parameter correlation analysis, and optimizing the energy management system.

CN122087646APending Publication Date: 2026-05-26SHENYANG JIANZHU UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610173336.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-06
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Anomalies exist in building energy consumption monitoring data. Existing methods struggle to effectively capture complex nonlinear relationships and dynamic trends. Furthermore, deep learning models have poor interpretability, and traditional methods are ill-suited for handling sparse data and parameter correlations, leading to inaccurate anomaly detection.

Method used

The ARIMA residual method is used to extract residual sequences through an autoregressive integral moving average model. Anomalies are identified by combining the LSTM-AE model, and correlation coefficient matrices and anomaly propagation matrices are constructed to analyze parameter correlations and anomaly propagation paths.

Benefits of technology

It improves the accuracy of anomaly detection, reduces false alarm and false negative rates, can handle sparse data, provides reliable evidence for tracing the causes of anomalies, and optimizes the energy management system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122087646A_ABST
    Figure CN122087646A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of building energy consumption monitoring technology and provides an anomaly detection method based on ARIMA residuals. It utilizes an ARIMA model to extract the residual sequence after the linear trend of data, learns normal patterns using LSTM-AE, and identifies anomalies. Simultaneously, it combines correlation coefficient matrices and anomaly propagation matrices to analyze fault propagation paths, featuring high detection accuracy and strong interpretability. This invention improves anomaly detection accuracy and effectively reduces false alarm and false negative rates. It also effectively handles sparse data, making it suitable for scenarios such as building energy consumption monitoring. By constructing correlation coefficient matrices and anomaly propagation matrices, it analyzes the propagation paths and impact mechanisms of anomalies in multi-parameter systems, providing a reliable basis for anomaly tracing and system optimization. Through practical application, this invention helps enterprises promptly identify and resolve energy waste problems, save energy costs, optimize energy management systems, and improve energy utilization efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of building energy consumption monitoring, specifically involving an anomaly detection method based on ARIMA residuals. Background Technology

[0002] As building energy conservation efforts deepen, the importance of building energy consumption monitoring data is becoming increasingly prominent. However, in actual monitoring processes, data often exhibits various anomalies, which can severely impact the accuracy of energy-saving potential assessments and energy efficiency diagnoses. Time-series data anomaly detection is widely used in cybersecurity, finance, and industry, but it also faces numerous challenges, such as difficulty in feature extraction, complex model selection, and lack of interpretability. In the field of building energy consumption monitoring, anomaly detection also faces many problems: 1) Building energy consumption data often contains complex nonlinear relationships and dynamic trends, which traditional feature extraction methods struggle to effectively capture, leading to poor anomaly detection results; 2) Many deep learning models, such as neural networks, possess powerful learning capabilities, but their internal mechanisms are difficult to interpret, making anomaly detection results difficult to understand and hindering anomaly cause analysis and system optimization; 3) Building energy consumption data often exhibits sparsity, meaning the time intervals between data points are inconsistent, making traditional time-window-based methods ineffective in handling sparse data; 4) Building energy consumption systems are complex systems with intricate correlations between various parameters, which traditional anomaly detection methods struggle to effectively capture, resulting in inaccurate anomaly detection results. Therefore, the quality of building energy consumption monitoring data has a profound impact on data-based building energy consumption assessment and energy-saving renovation applications.

[0003] To address the above issues, numerous experts and scholars both domestically and internationally have conducted extensive research using various methods. Commonly employed approaches include: 1) Reconstruction-based models, employing GANs, autoencoders, etc., to reconstruct normal datasets and calculate reconstruction errors as anomaly scores; 2) Prediction-based models, using LSTMs, TCNs, etc., to predict future data points and compare prediction errors with actual values ​​for anomaly detection; and 3) Fusion-based models, combining reconstruction and prediction models to leverage the advantages of both, improving anomaly detection efficiency and accuracy. However, these methods all have limitations. Reconstruction-based models have high computational complexity, struggle to effectively learn representations and temporal dependencies between metrics, and perform poorly in point anomaly detection. Prediction-based models require large amounts of data for training, have poor model interpretability, and while efficient for short-term anomaly detection, they perform poorly for long-term and group anomaly detection. Fusion-based models are complex to design, incurring high computational and time costs, necessitating research into efficient integration of different models. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention aims to provide an anomaly detection method based on ARIMA residuals, and analyze the propagation path and impact mechanism of anomalies in multi-parameter systems, thereby improving the accuracy of anomaly detection and providing a reliable basis for anomaly cause tracing and system optimization.

[0005] This invention provides an anomaly detection method based on ARIMA residuals, comprising the following steps:

[0006] Obtain energy consumption monitoring data of the target building, including several parameters, construct an autoregressive integral moving average model, and use the autoregressive integral moving average model to extract residual sequences from the energy consumption monitoring data;

[0007] A dataset is constructed based on the residual sequence. The dataset is used to train and evaluate the LSTM-AE model. Based on the trained LSTM-AE model, abnormal time points in the residual sequence are identified.

[0008] Construct a correlation coefficient matrix and anomaly propagation matrix, identify highly correlated parameter pairs in energy consumption monitoring data based on the correlation coefficient matrix and anomaly propagation matrix, and generate anomaly propagation link diagram.

[0009] Furthermore, the method for constructing the autoregressive integral moving average model is as follows:

[0010] Key parameter time series are constructed based on energy consumption monitoring data. The stationarity of the key parameter time series is determined by the augmented Dickey-Fowler test. If the key parameter time series is non-stationary, a stationary key parameter time series is obtained by difference operation.

[0011] Based on the characteristics of the autocorrelation function and partial autocorrelation function graphs, the order of the AR model and the order of the MA model are initially determined, and the optimal combination of autoregressive integral moving average model parameters is determined by automatically optimizing the Bayesian information criterion minimization.

[0012] The parameters of the autoregressive integral moving average model are estimated using the maximum likelihood estimation method, resulting in an autoregressive integral moving average model with determined parameters.

[0013] Furthermore, the specific method for extracting the residual sequence is as follows:

[0014] The energy consumption monitoring data are fitted using an autoregressive integral moving average model with defined parameters to obtain fitted prediction values ​​in several steps.

[0015] The residual sequence is obtained by subtracting the fitted predicted values ​​of the autoregressive integral moving average model from the original energy consumption monitoring data.

[0016] The Ljung-Box method is used to test the residual sequence for white noise. If the residual sequence is white noise, it is retained; otherwise, the parameters of the autoregressive integral moving average model are readjusted and the residual sequence is extracted again.

[0017] Furthermore, the specific method for constructing the dataset based on the residual sequence is as follows:

[0018] The residual sequence is preprocessed, including cleaning, normalization and data segmentation, and the preprocessed residual sequence is divided into training set, validation set and test set.

[0019] Furthermore, the specific method for training and evaluating the LSTM-AE model using the dataset is as follows:

[0020] An LSTM-AE model is constructed, using mean squared error as the loss function and trained using the Adam optimizer. The training set is input into the LSTM-AE model, and the hyperparameters of the LSTM-AE model are optimized using a grid search method, including the number of hidden units in the LSTM layer, the number of encoder layers, the number of decoder layers, and the number of training epochs. The model configuration with the minimum loss on the validation set is selected as the trained LSTM-AE model.

[0021] Furthermore, the specific method for identifying outlier time points in the residual sequence based on the trained LSTM-AE model is as follows:

[0022] The trained LSTM-AE model is used to reconstruct the training set and the test set respectively. The reconstruction error of the training set and the reconstruction error of the test set are calculated. A differentiated dynamic threshold is set based on the reconstruction error of the training set.

[0023] When the reconstruction error of the test set at any time point exceeds the dynamic threshold corresponding to that time point, that time point is determined to be an abnormal time point.

[0024] Furthermore, the specific method for constructing the correlation coefficient matrix is ​​as follows:

[0025] Calculate the Pearson correlation coefficient between any two parameters in the energy consumption monitoring data of the target building to obtain the correlation coefficient matrix, which is used to quantify the linear correlation strength of different parameters under normal operating conditions.

[0026] Furthermore, the specific method for constructing the anomaly propagation matrix is ​​as follows:

[0027] For the identified anomalous time points, construct an anomaly propagation matrix; define the target buildings, including... Then the nth parameter in the anomaly propagation matrix A of the target building Line number Column matrix elements are used for quantization of the first The parameter anomaly affects the first... The influence strength of each parameter; the matrix elements in the anomaly propagation matrix A take values ​​in the range [0,1], and the matrix elements... The larger the value, the stronger the influence; matrix elements Indicates the first The parameter anomaly affects the first... The parameters have no effect; diagonal elements Indicates the first The abnormal stability or self-recovery capability of each parameter itself.

[0028] The beneficial effects of adopting the above technical solution are as follows: The anomaly detection method based on ARIMA residuals provided by this invention integrates time series analysis and deep learning. It extracts linear trends through the ARIMA model and learns nonlinear patterns through the LSTM-AE model, constructing a correlation coefficient matrix and anomaly propagation matrix. This effectively improves the accuracy and interpretability of anomaly detection, while also handling sparse data and analyzing parameter correlations. Compared to a single model, the anomaly detection accuracy of this invention is significantly improved, effectively reducing false alarm and false negative rates. Furthermore, this invention can effectively handle sparse data, making it suitable for scenarios such as building energy consumption monitoring. By constructing a correlation coefficient matrix and anomaly propagation matrix, it analyzes the propagation path and impact mechanism of anomalies in multi-parameter systems, providing a reliable basis for anomaly tracing and system optimization. Through practical application, this invention helps enterprises promptly identify and resolve energy waste problems, save energy costs, optimize energy management systems, and improve energy utilization efficiency. Attached Figure Description

[0029] Figure 1 Flowchart of the anomaly detection method based on ARIMA residuals provided in Embodiment 1 of the present invention;

[0030] Figure 2 The flowchart for constructing an autoregressive integral moving average model provided in Embodiment 1 of this invention;

[0031] Figure 3 The schematic diagram of ARIMA model fitting and 24-step prediction of temperature parameters provided in Embodiment 1 of the present invention is shown in which (a) is the fitting and 24-step prediction of the highest indoor temperature, (b) is the fitting and 24-step prediction of the lowest indoor temperature, (c) is the fitting and 24-step prediction of the average indoor temperature, (d) is the fitting and 24-step prediction of the cold water supply temperature, (e) is the fitting and 24-step prediction of the cold water return temperature, and (f) is the fitting and 24-step prediction of the cold water supply and return temperature difference.

[0032] Figure 4The residual diagram of the temperature parameters after linear prediction by ARIMA provided in Embodiment 1 of the present invention is shown in which (a) is the residual sequence of the highest indoor temperature, (b) is the residual sequence of the cold water return temperature, (c) is the residual sequence of the lowest indoor temperature, (d) is the residual sequence of the cold water supply temperature, (e) is the residual sequence of the average indoor temperature, and (f) is the residual sequence of the temperature difference between the cold water supply and return water.

[0033] Figure 5 The schematic diagram of reconstruction error and dynamic threshold anomaly determination provided in Embodiment 1 of the present invention is shown in which (a) is a comparison between the indoor highest temperature residual and the reconstruction error, (b) is a comparison between the indoor lowest temperature residual and the reconstruction error, (c) is a comparison between the indoor average temperature residual and the reconstruction error, (d) is a comparison between the cold water supply temperature residual and the reconstruction error, (e) is a comparison between the cold water return temperature residual and the reconstruction error, and (f) is a comparison between the cold water supply and return temperature difference residual and the reconstruction error.

[0034] Figure 6 A schematic diagram of the correlation coefficient matrix provided in Embodiment 1 of the present invention;

[0035] Figure 7 A schematic diagram of the anomaly propagation matrix provided in Embodiment 1 of the present invention;

[0036] Figure 8 The logical path analysis diagram for investigating faults provided in Embodiment 1 of the present invention. Detailed Implementation

[0037] The specific implementation methods of this application will be further described in detail below with reference to the accompanying drawings and embodiments.

[0038] Example 1:

[0039] An anomaly detection method based on ARIMA residuals includes the following steps:

[0040] S1. Obtain energy consumption monitoring data of the target building, preprocess the energy consumption monitoring data and extract the residual sequence;

[0041] S1.1 Obtain energy consumption monitoring data of the target building, including energy consumption and temperature variables of several target devices, and construct time series of key parameters; construct an autoregressive integral moving average model to fit the energy consumption monitoring data and obtain several steps of fitted prediction values.

[0042] Energy consumption monitoring data of the target building is acquired, and a time series of key parameters is constructed. In this embodiment, the energy consumption monitoring data includes the energy consumption of multiple chiller units and the temperature variables of the target building. The energy consumption of multiple chiller units includes the energy consumption of chiller #1 (kWh), chiller #2 (kWh), chiller #3 (kWh), chiller #4 (kWh), and the total energy consumption of the refrigeration system (kWh). The temperature variables of the target building include the highest indoor temperature (°C), the lowest indoor temperature (°C), the average indoor temperature (°C), the chilled water return temperature (°C), the chilled water supply temperature (°C), and the chilled water supply and return temperature difference (°C).

[0043] Preprocessing of energy consumption monitoring data includes missing value interpolation, data cleaning, and segmentation at multiple time scales;

[0044] The core idea of ​​constructing an autoregressive integral moving average (AR) model is to transform the original key parameter time series into a stationary series through differencing operations, and then combine AR and MA model components to capture the linear correlation features in the data. The AR model is an autoregressive model, and the MA model is a moving average model. The core of the AR model involves using historical observations with a sampling interval of p and historical random disturbances with a sampling interval of q for prediction, as shown in the following formula:

[0045] ;

[0046] in, For the order of the AR model, Let MA be the order of the model. for Key parameters for time prediction , and They are respectively , and Historical observations at that time , , and For AR model coefficients, , and They are respectively , and Historical noise interference at any given moment, and , , and These are the coefficients of the MA model.

[0047] like Figure 2 As shown, the specific methods for constructing an autoregressive integral moving average model include:

[0048] The stationarity of the original key parameter time series is determined using the augmented Dickey-Fowler test. If the key parameter time series is non-stationary, the difference order is then used to determine its stationarity. The difference operation yields a stable time series of key parameters;

[0049] The order of the AR model is initially determined based on the characteristics of the autocorrelation function and partial autocorrelation function graphs. And the order of the MA model And using the minimization of the Bayesian information criterion as the standard, the optimal value is determined automatically through the auto_arima function. combination;

[0050] The parameters of the ARIMA model are estimated using the maximum likelihood estimation method, and the ARIMA model is fitted to obtain an autoregressive integral moving average model with determined parameters. ;

[0051] Figure 3 The ARIMA model fitting curves and 24-step prediction results for the temperature parameters of the refrigeration system in the chiller plant are presented. The fitting curves closely match historical data, reflecting the model's ability to capture time-series characteristics; the prediction curves continue the historical trend, demonstrating the model's prediction of future changes. Figure 3 As shown, the fitted curves for some parameters (such as the lowest indoor temperature) fluctuated during abnormal periods but still closely matched the data, and the predicted curves also reasonably continued the trend. This indicates that the ARIMA model effectively described the dynamic characteristics of the time series through the combination of autoregression and moving average coefficients. Meanwhile, the fitted curves for other temperature parameters were stable, and the predicted curves showed clear trends, verifying the accuracy of the maximum likelihood estimation method for coefficient estimation. These visualization results intuitively present the fitting and prediction effects of the ARIMA model, providing a reliable foundation for subsequent LSTM-AE processing of residuals and anomaly detection, and demonstrating the accurate extraction of linear features by the ARIMA step in the phased modeling strategy.

[0052] Figure 4 The residual sequences of the highest indoor temperature, cold water return temperature, lowest indoor temperature, cold water supply temperature, average indoor temperature, and the temperature difference between cold water supply and return are displayed, reflecting the fluctuations in the unexplained portion of the model. The residuals oscillate around the zero value. If the residuals have no obvious pattern and are randomly distributed near the zero line, it indicates that the ARIMA model captures the temporal characteristics of the parameters well. The residuals of the cold water supply and return temperature difference show significant fluctuations in the later stages, indicating that the residuals contain complex information not explained by the linear model; while the residuals of the average indoor temperature show stable small fluctuations, exhibiting good white noise characteristics.

[0053] S1.2 Extracting the residual sequence;

[0054] Using an autoregressive integral moving average model with defined parameters The energy consumption monitoring data is fitted to obtain several steps of fitted prediction values. The autoregressive integral moving average model is then subtracted from the original energy consumption monitoring data. The fitted predicted values ​​are used to obtain the residual sequence. The residual sequence condenses the nonlinear components and potential abnormal fluctuations in the original building energy consumption monitoring data that the autoregressive integral moving average model could not explain.

[0055] To ensure the autoregressive integral moving average model Validity was assessed using the Ljung-Box test to evaluate the white noise of the residual sequences. The test statistic was [not specified]. The calculation formula is:

[0056] ;

[0057] in, The sample size is the total number of observations. The lag order is... The adjustment term in the denominator is used to correct for the lag order. Increased sample size leads to decreased lag. At that time, the effective sample size was ; The residual sequence is the first The estimated value of the autocorrelation coefficient of the residual series after lag. The autocorrelation coefficient measures the time taken for the residual series to complete the regression analysis. Linear correlation at different times: If A value close to 0 indicates that the residual is lagging. There was no significant autocorrelation during the period; if If the deviation from 0 indicates autocorrelation, This represents the total number of lag orders, i.e., the upper limit of the autocorrelation order considered during the test. .

[0058] Based on the test statistic Calculate probability If the probability If the residual sequence is greater than the preset threshold of 0.05, it is considered to be white noise and the model fit is effective; otherwise, the autoregressive integral moving average model needs to be readjusted. The parameters.

[0059] S2. Construct a dataset based on the residual sequence, use the dataset to train and evaluate the LSTM-AE model, and identify abnormal time points in the residual sequence based on the trained LSTM-AE model.

[0060] S2.1 Constructing a dataset based on residual sequences;

[0061] The residual sequence is preprocessed, including cleaning, normalization and data segmentation, and the preprocessed residual sequence is divided into training set, validation set and test set.

[0062] S2.2 Constructing the LSTM-AE model: The LSTM-AE model includes an encoder and a decoder. The encoder consists of one or more LSTM layers used to encode the input residual sequence into a low-dimensional feature representation. The decoder consists of one or more LSTM layers used to decode and reconstruct the low-dimensional feature representation into a residual sequence of the original length. The LSTM-AE model uses mean squared error as the loss function and is trained using the Adam optimizer.

[0063] The LSTM layer includes the LSTM network. As a special type of recurrent neural network (RNN), the core of the LSTM network lies in controlling the information flow through carefully designed gating structures, including forget gates, input gates, and output gates, thereby solving the long-term dependency problem that traditional RNNs cannot handle.

[0064] The computational process of an LSTM network can be divided into three stages. In the initial stage, the forget gate is used to decide whether to retain or discard information in the cell state. This decision-making process integrates the key parameters predicted at the current time step. Hidden state value from the previous moment Both are then input into a sigmoid activation function for processing. Forget gate Its function is to selectively filter the contents of memory units, and its specific calculation expression is as follows:

[0065] ;

[0066] In the formula, , These represent the cell state and hidden state values ​​at time t-1, respectively. , , This is the weight matrix corresponding to the forget gate. For the Sigmoid function, Forget Gate Paranoia Value.

[0067] In the second phase, for Key parameters for time prediction and Hidden state value at time The input gate is processed by the Sigmoid function and the hyperbolic tangent function tanh. By controlling the input state of the memory unit at time t To update the cell state at time t Therefore, the information to be retained is determined by the expression:

[0068] ;

[0069] ;

[0070] ;

[0071] In the formula, , , This is the weight matrix corresponding to the input gate. , To update the weight matrix of the state, , These are the paranoia values ​​for the input gate and the update state, respectively.

[0072] Determined through the third phase Hidden state of time The value of acts as the network's memory by retaining previous data and facilitating prediction. For Key parameters for time prediction and Hidden state value at time The output gate is processed by the Sigmoid function and the hyperbolic tangent function tanh. Control the current Cellular state at any given moment Output section Its expression is:

[0073] ;

[0074] ;

[0075] In the formula, , , This is the weight matrix corresponding to the output gate. This is the bias value of the output gate.

[0076] The LSTM-AE model is trained using a training set, and its hyperparameters are optimized using a grid search method. These hyperparameters include the number of hidden units in the LSTM layers, the number of encoder layers, the number of decoder layers, and the number of training epochs. The model configuration with the minimum loss on the validation set is selected as the trained LSTM-AE model. For example, in this embodiment, the number of hidden units in the LSTM layers [64,32], [32,16], [16,8], and the number of encoder and decoder layers (1 layer) are optimized.

[0077] S2.3 Set a dynamic threshold to identify abnormal time points in the residual sequence based on the trained LSTM-AE model;

[0078] The trained LSTM-AE model is used to reconstruct the training and test sets respectively. The reconstruction errors of the training and test sets are calculated. A differentiated dynamic threshold is set based on the reconstruction error of the training set, as shown in the following formula:

[0079] ;

[0080] in, The dynamic threshold at time point t. It is an exponentially weighted moving average. As a global baseline, For rolling quantile threshold, This is the smoothing coefficient; in this embodiment, it is set to... ;

[0081] Global baseline This is used to provide a long-term, stable judgment benchmark, as shown in the following formula:

[0082] ;

[0083] in, The reconstruction error sequence for the training set. For the training set, To take the median, To obtain the absolute deviation of the median, The multiplier is a preset value; in this embodiment, the multiplier is set to... ;

[0084] Rolling quantile threshold This is used to capture the dynamic changes of data over any time period, enabling the dynamic threshold to adapt to seasonal trends, as shown in the following formula:

[0085] ;

[0086] in, From a point in time arrive The reconstruction error sequence of the training set within the scrolling window. For quantiles, Window size; in this embodiment, quantiles are set. ;

[0087] This embodiment uses an exponentially weighted moving average to apply a global baseline. and rolling quantile threshold The maximum value between the values ​​is smoothed to obtain the dynamic threshold, avoiding sudden changes in the dynamic threshold due to daily data fluctuations, thus making the dynamic threshold curve smoother. When a reconstruction error is detected on the test set at any point in time... If the time exceeds the dynamic threshold corresponding to any given time point, then that time point is determined to be an abnormal time point. This is the test set.

[0088] Figure 5 The results of LSTM-AE anomaly detection based on ARIMA residuals for temperature parameters are presented. For parameters with rich residual anomaly information, the model after hyperparameter optimization has a significant detection effect, with anomalies concentrated in the actual anomaly period. The MSE curve significantly exceeds the dynamic threshold during the anomaly period, and the detection effect is better than the model based on the original sequence. For parameters with white noise residuals (residual p>0.05), the model maintains a low false alarm rate and very few anomalies. Figure 5 By comparing the distribution of outliers and the MSE with the threshold, we can intuitively verify that hyperparameter optimization improves the accuracy of capturing residual anomalies and enhances robustness. This forms a logical closed loop with the residual test results, demonstrating the advantages of the divide-and-conquer architecture of the hybrid model. The anomaly detection plot not only visually presents the location and error fluctuations of outliers in the time series, but also provides an intuitive foundation for subsequent quantitative index calculations and model comparisons.

[0089] S3. Construct a correlation coefficient matrix and anomaly propagation matrix. Based on the correlation coefficient matrix and anomaly propagation matrix, identify parameter pairs with high correlation in the energy consumption monitoring data and obtain anomaly propagation link diagram.

[0090] S3.1 Construct a correlation coefficient matrix for energy consumption monitoring data;

[0091] Calculate the Pearson correlation coefficient between any two parameters in the energy consumption monitoring data of the target building, forming a correlation coefficient matrix, such as... Figure 6 As shown, this is used to quantify the linear correlation strength of different parameters under normal operating conditions, providing a basis for understanding the static relationship between parameters.

[0092] S3.2 Construct an anomaly propagation matrix for energy consumption monitoring data;

[0093] For the identified abnormal time points, an anomaly propagation matrix is ​​constructed, such as... Figure 7 As shown, if the target building has n parameters, then the anomaly propagation matrix A of the target building can be expressed as:

[0094] ;

[0095] in, For the first Line number Column matrix elements, used for quantization of the first The parameter anomaly affects the first... The influence strength of each parameter; the matrix elements in the anomaly propagation matrix A take values ​​in the range [0,1], and the matrix elements... The larger the value, the stronger the influence. Indicates the first The parameter anomaly affects the first... The parameters have no effect; diagonal elements Indicates the first The abnormal stability or self-recovery capability of each parameter itself.

[0096] The construction of the anomaly propagation matrix is ​​based on the core idea of ​​calculating conditional probability, where matrix elements... The calculation formula is:

[0097] ;

[0098] in, It is the total number of times component j has encountered anomalies in the historical data. Parameters in historical data and parameters The matrix simultaneously measures the number of times an anomaly occurs. It quantifies the propagation strength and direction of anomalies across different parameters, revealing the dynamic propagation path of faults within the system.

[0099] S3.3 Identify highly correlated parameter pairs in energy consumption monitoring data based on the anomaly propagation matrix and generate an anomaly propagation link diagram;

[0100] Based on the correlation coefficient matrix and the anomaly propagation matrix, parameter pairs with high conditional probability are identified, thereby constructing an anomaly propagation link diagram, analyzing the co-occurrence patterns among abnormal events, exploring the diffusion law of faults within the system, and identifying correlated anomalies.

[0101] Figure 8 This paper demonstrates a fault tracing logic for abnormal energy consumption based on parameter correlation. Starting from the causal chain from building cooling load to chiller unit energy consumption, when abnormal energy consumption is detected, fault location is achieved through layered judgment. First, the building cooling load affects the indoor temperature, which in turn affects the chilled water return temperature. The supply and return water temperature difference reflects the system operating efficiency, and chiller unit energy consumption is the final manifestation. If abnormal energy consumption occurs, the paper first judges whether the return water temperature is abnormally high. If "yes," it points to a load-side problem (such as cooling load exceeding the system's capacity). If "no," it further judges whether the supply and return water error is abnormally small. If "yes," it points to a hydraulic or equipment problem (such as water pump failure or abnormal valve adjustment leading to a narrowed temperature difference). If "no," it then judges whether all parameters are normal but energy consumption is high. If "yes," it points to a problem with the chiller itself or cooling (such as decreased chiller efficiency or cooling tower failure). This logic, through the causal relationship between parameters and the law of anomaly propagation, achieves layered investigation from abnormal phenomena to the root cause of the fault, demonstrating the advantages of the divide-and-conquer architecture and providing a systematic path for tracing the cause of anomalies.

[0102] This embodiment employs a divide-and-conquer collaborative architecture. The ARIMA modeling stage utilizes linear processing to capture the inherent temporal patterns of key parameters, separate linear trends, and extract residual sequences to ensure model effectiveness. Anomaly detection based on an LSTM autoencoder employs deep learning mode learning for nonlinear learning. Using the ARIMA residual sequences as input, an LSTM autoencoder is constructed and trained to learn normal residual patterns and reconstruct data to identify spike anomalies. Parameter correlation and anomaly propagation analysis calculates the correlation coefficient matrix between parameters to quantify the strength of linear correlation and constructs an anomaly propagation matrix to analyze anomaly co-occurrence patterns, explore the diffusion law of faults within the system, and, combined with changes in equipment operating status, reveal the anomaly generation mechanism, performance characteristics, and internal connections, achieving anomaly cause tracing and system operation law discovery.

[0103] Example 2:

[0104] This embodiment proposes an electronic device, including: one or more processors, and a memory, wherein the memory is used to store instructions, and when the instructions are executed by the one or more processors, the one or more processors execute the aforementioned ARIMA residual-based anomaly detection method.

[0105] The electronic device may be a mobile phone, computer, or tablet computer, etc., and includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the anomaly detection method based on ARIMA residuals as described in the embodiments. It is understood that the electronic device may also include input / output (I / O) interfaces and communication components.

[0106] The processor is used to execute all or part of the steps in the ARIMA residual-based anomaly detection method as described in the above embodiments. The memory is used to store various types of data, which may include, for example, instructions for any application or method in the electronic device, as well as application-related data.

[0107] The processor can be implemented as an Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor, or other electronic components, and is used to execute the ARIMA residual-based anomaly detection method described in the above embodiments.

[0108] Example 3:

[0109] This embodiment proposes a computer-readable storage medium that stores executable instructions. When these instructions are executed, if they are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.

[0110] The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the ARIMA residual-based anomaly detection method described in the various embodiments of this application.

[0111] The aforementioned storage media include: flash memory, hard disks, multimedia cards, card-type memory (e.g., SD (Secure Digital Memory Card) or DX (Memory Data Register, MDR) memory), random access memory (RAM), static random-access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, disks, optical discs, servers, APP (Application) application stores, and other media capable of storing program verification codes. These media store computer programs, which, when executed by a processor, can implement the various steps of the aforementioned ARIMA residual-based anomaly detection method.

[0112] Example 4:

[0113] This embodiment proposes a computer program product, including a computer program or instructions, which, when executed by a processor, implements the aforementioned anomaly detection method based on ARIMA residuals.

[0114] Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a computer program product.

[0115] The various embodiments in this application are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0116] The scope of protection of this application is not limited to the embodiments described above. Obviously, those skilled in the art can make various modifications and variations to this disclosure without departing from the scope and spirit of this disclosure. If such modifications and variations fall within the scope of this disclosure and its equivalents, then the intent of this disclosure also includes these modifications and variations.

Claims

1. An anomaly detection method based on ARIMA residuals, characterized in that, Includes the following steps: Obtain energy consumption monitoring data of the target building, including several parameters, construct an autoregressive integral moving average model, and use the autoregressive integral moving average model to extract residual sequences from the energy consumption monitoring data; A dataset is constructed based on the residual sequence. The dataset is used to train and evaluate the LSTM-AE model. Based on the trained LSTM-AE model, abnormal time points in the residual sequence are identified. Construct a correlation coefficient matrix and anomaly propagation matrix, identify highly correlated parameter pairs in energy consumption monitoring data based on the correlation coefficient matrix and anomaly propagation matrix, and generate anomaly propagation link diagram.

2. The anomaly detection method based on ARIMA residuals according to claim 1, characterized in that, The method for constructing the autoregressive integral moving average model is as follows: Key parameter time series are constructed based on energy consumption monitoring data. The stationarity of the key parameter time series is determined by the augmented Dickey-Fowler test. If the key parameter time series is non-stationary, a stationary key parameter time series is obtained by difference operation. Based on the characteristics of the autocorrelation function and partial autocorrelation function graphs, the order of the AR model and the order of the MA model are initially determined, and the optimal combination of parameters for the autoregressive integral moving average model is determined by automatically optimizing the parameters based on minimizing the Bayesian information criterion. The parameters of the autoregressive integral moving average model are estimated using the maximum likelihood estimation method, resulting in an autoregressive integral moving average model with determined parameters.

3. The anomaly detection method based on ARIMA residuals according to claim 1, characterized in that, The specific method for extracting the residual sequence is as follows: The energy consumption monitoring data are fitted using an autoregressive integral moving average model with defined parameters to obtain fitted prediction values ​​in several steps. The residual sequence is obtained by subtracting the fitted predicted values ​​of the autoregressive integral moving average model from the original energy consumption monitoring data. The Ljung-Box method is used to test the residual sequence for white noise. If the residual sequence is white noise, it is retained; otherwise, the parameters of the autoregressive integral moving average model are readjusted and the residual sequence is extracted again.

4. The anomaly detection method based on ARIMA residuals according to claim 3, characterized in that, The specific method for constructing the dataset based on residual sequences is as follows: The residual sequence is preprocessed, including cleaning, normalization and data segmentation, and the preprocessed residual sequence is divided into training set, validation set and test set.

5. The anomaly detection method based on ARIMA residuals according to claim 4, characterized in that, The specific method for training and evaluating the LSTM-AE model using the dataset is as follows: An LSTM-AE model is constructed, using mean squared error as the loss function and trained using the Adam optimizer. The training set is input into the LSTM-AE model, and the hyperparameters of the LSTM-AE model are optimized using a grid search method, including the number of hidden units in the LSTM layer, the number of encoder layers, the number of decoder layers, and the number of training epochs. The model configuration with the minimum loss on the validation set is selected as the trained LSTM-AE model.

6. The anomaly detection method based on ARIMA residuals according to claim 5, characterized in that, The specific method for identifying outlier time points in the residual sequence based on the trained LSTM-AE model is as follows: The trained LSTM-AE model is used to reconstruct the training set and the test set respectively. The reconstruction error of the training set and the reconstruction error of the test set are calculated. A differentiated dynamic threshold is set based on the reconstruction error of the training set. When the reconstruction error of the test set at any time point exceeds the dynamic threshold corresponding to that time point, that time point is determined to be an abnormal time point.

7. The anomaly detection method based on ARIMA residuals according to claim 6, characterized in that, The specific method for constructing the correlation coefficient matrix is ​​as follows: Calculate the Pearson correlation coefficient between any two parameters in the energy consumption monitoring data of the target building to obtain the correlation coefficient matrix, which is used to quantify the linear correlation strength of different parameters under normal operating conditions.

8. The anomaly detection method based on ARIMA residuals according to claim 7, characterized in that, The specific method for constructing the anomaly propagation matrix is ​​as follows: For the identified anomalous time points, construct an anomaly propagation matrix; define the target buildings, including... Then the nth parameter in the anomaly propagation matrix A of the target building Line number Column matrix elements are used to quantize the first The parameter anomaly affects the first... The influence strength of each parameter; the matrix elements in the anomaly propagation matrix A take values ​​in the range [0,1], and the matrix elements... The larger the value, the stronger the influence; matrix elements Indicates the first The parameter anomaly affects the first... The parameters have no effect; diagonal elements Indicates the first The abnormal stability or self-recovery capability of each parameter itself.