Heat exchange station anomaly detection method, device, equipment, storage medium and program product

By preprocessing and extracting multi-dimensional features from the thermal parameter data of the heat exchange station, a prediction and reconstruction model is constructed, which solves the problems of insufficient anomaly detection accuracy and difficulty in root cause localization in the existing technology. It achieves high-precision anomaly detection and rapid root cause localization, thereby improving operation and maintenance efficiency.

CN122153719APending Publication Date: 2026-06-05CHINA UNITED NETWORK COMM GRP CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA UNITED NETWORK COMM GRP CO LTD
Filing Date
2026-02-13
Publication Date
2026-06-05

Smart Images

  • Figure CN122153719A_ABST
    Figure CN122153719A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a heat exchange station anomaly detection method, device, equipment, storage medium and program product. The method comprises: acquiring heat exchange station multivariate time series thermal parameter data collected at a preset frequency, and preprocessing to obtain target parameter data; performing preset convolution, feature directed graph modeling and time series directed graph modeling on the target parameter data to obtain local fluctuation features, variable coupling correlation features and time series dependence features and splice them into a fusion feature matrix; extracting long-term time series features based on the fusion feature matrix through time series modeling, constructing a prediction model and a reconstruction model; obtaining an anomaly detection model through iterative training of a preset joint loss function; inputting the target parameter data into the model to obtain parameter prediction values, reconstruction probabilities and correlation weights between variables, and respectively analyzing to obtain anomaly determination results and anomaly causes. The method can accurately capture multivariate coupling correlation and time series dependence, improve anomaly detection accuracy and realize root cause positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data analysis, and in particular to a method, apparatus, equipment, storage medium, and program product for detecting anomalies in heat exchange stations. Background Technology

[0002] Smart heating technology is the core support for the heating industry to achieve high efficiency, energy saving, and sustainable development. As a key component of centralized heating systems, the stable operation of heat exchange stations directly affects heating quality, energy utilization efficiency, and user experience. During operation, multiple sensors are deployed at heat exchange stations to collect various key operating parameters in real time, forming multivariate time-series data that comprehensively reflects equipment conditions and system operating status.

[0003] Existing anomaly detection technologies for multivariate time-series data in heat exchange stations often treat each operating parameter as an independent sequence for analysis during the data processing stage, without systematically modeling the inherent relationships between parameters. In terms of time-series feature mining, they rely on traditional time-series analysis models or single-type neural network structures, focusing on capturing local short-term dependencies, with limited ability to mine long-term time-series patterns. In terms of detection model construction, they often adopt single predictive or reconstructive structures, judging anomalies by outputting prediction results or reconstruction deviations. The detection process focuses on the output of abnormal results and lacks a deep tracing mechanism for the causes of anomalies.

[0004] Existing technologies are unable to accurately capture the coupling relationships between multiple variables and the global dependencies in the time series dimension, and lack comprehensive analysis for anomaly detection and root cause localization with different characteristics. This results in problems such as insufficient accuracy in anomaly detection, frequent false alarms and missed alarms, and difficulty in quickly locating the root cause of anomalies. As a result, they cannot meet the actual operation and maintenance needs of heat exchange stations for real-time monitoring and rapid fault handling. Summary of the Invention

[0005] This application provides a method, apparatus, equipment, storage medium, and program product for detecting anomalies in heat exchange stations, in order to improve the accuracy of anomaly detection.

[0006] In a first aspect, embodiments of this application provide a method for detecting anomalies in a heat exchange station, including:

[0007] Acquire thermal parameter data of the heat exchange station, wherein the thermal parameter data is multivariate time-series data collected at a preset frequency;

[0008] The thermal parameter data is preprocessed to obtain the target parameter data;

[0009] The target parameter data is processed by preset convolution, feature-guided graph modeling and time-guided graph modeling to obtain local fluctuation features, variable coupling and correlation features and time-dependent features. The local fluctuation features, variable coupling and correlation features and time-dependent features are then concatenated to obtain a fusion feature matrix.

[0010] Based on the fused feature matrix, long-term time-series features are extracted through time-series modeling, and a prediction model and a reconstruction model are constructed based on the long-term time-series features;

[0011] An anomaly detection model is obtained by iteratively training the prediction model and the reconstruction model using a preset joint loss function.

[0012] The target parameter data is input into the anomaly detection model to obtain the predicted parameter values, reconstruction probability, and correlation weights between variables.

[0013] Anomaly determination results are obtained by analyzing the predicted values ​​of the parameters, the reconstruction probability, and the preset threshold algorithm.

[0014] The causes of the anomalies were obtained by analyzing the correlation weights between the variables.

[0015] In one possible implementation, the thermal parameter data is preprocessed to obtain the target parameter data, including:

[0016] The thermal parameter data is cleaned of outliers to remove outliers that exceed a preset statistical range, resulting in first data. The first data is then processed using a preset normalization algorithm to obtain target parameter data.

[0017] In one possible implementation, the target parameter data undergoes pre-defined convolution, feature-guided graph modeling, and temporal-guided graph modeling processes, including:

[0018] The local fluctuation features are obtained by extracting local features from the thermal parameter data through a preset convolution. A fully connected undirected graph is constructed by using feature-guided graph modeling, where multiple parameters corresponding to the thermal parameter data are treated as parameter nodes and node features are extracted. A linear transformation is performed on the node features to calculate the inter-variable correlation coefficients between the parameter nodes. The inter-variable correlation coefficients are normalized to obtain the inter-variable correlation weights between the parameter nodes. The node features are then weighted and aggregated based on the inter-variable correlation weights to obtain the variable coupling correlation features. A fully connected directed graph is constructed by using time-series guided graph modeling, where multiple acquisition times within a preset time window are treated as time-series nodes and time-series node features are extracted. A fully connected directed graph is constructed by using time-series guided graph modeling, where a linear transformation is performed on the time-series node features and dependency coefficients between the time-series nodes are calculated. The dependency coefficients are normalized to obtain the dependency weights between the time-series nodes. The time-series dependency features are then weighted and aggregated based on the dependency weights.

[0019] In one possible implementation, the prediction model and the reconstruction model are iteratively trained using a preset joint loss function, including:

[0020] The long-term time-series features are input into the prediction model, and the predicted parameter values ​​for the next time step are output. The deviation loss between the predicted parameter values ​​and the corresponding true values ​​is calculated to obtain the prediction loss of the prediction model. The long-term time-series features are input into the reconstruction model, and the mean and variance of the latent spatial distribution are obtained through encoding. A latent vector is generated by sampling the mean and variance. The latent vector is decoded to output a reconstruction feature matrix. The deviation loss between the reconstruction feature matrix and the long-term time-series features is calculated, and the reconstruction loss of the reconstruction model is obtained by combining the relative entropy of the latent spatial distribution and the standard normal distribution. The prediction loss and the reconstruction loss are summed according to a preset weight ratio to obtain the preset joint loss function. Based on the joint loss function, the parameters of the prediction model and the reconstruction model are iteratively adjusted through a backpropagation algorithm until the value of the joint loss function converges to a preset threshold range to obtain the anomaly detection model.

[0021] In one possible implementation, the anomaly determination result is obtained by analyzing the predicted parameter values, reconstruction probability, and preset threshold algorithm, including:

[0022] The target parameter data is input into the prediction model to calculate the absolute value of the deviation between the predicted value and the corresponding true value of the parameter as a sudden outlier; the difference between the preset benchmark value and the reconstruction probability is calculated based on the reconstruction probability as a gradual outlier; the sudden outlier and the gradual outlier are weighted and fused according to a preset weight coefficient to obtain the outlier score of each collection window of the target parameter data; the distribution of the outlier score of normal samples in the training set is fitted by a preset threshold algorithm to determine the preset threshold; the outlier score of the collection window is compared with the preset threshold, and if the outlier score exceeds the preset threshold, the corresponding collection window is determined to be abnormal, and an outlier determination result containing the location of the outlier window is generated.

[0023] In one possible implementation, analyzing the correlation weights between the variables to determine the cause of the anomaly includes:

[0024] Retrieve the abnormal window corresponding to the target parameter data in the abnormality judgment result, and obtain the inter-variable correlation weights output by the feature-guided graph modeling corresponding to the abnormal window; extract a preset number of normal windows before and after the abnormal window, and obtain the inter-variable correlation weights corresponding to the normal windows; calculate the average value of the normal window weights as the benchmark weights; compare the fluctuation range of the inter-variable correlation weights with the benchmark weights, and filter out target variables whose weight fluctuation range exceeds a preset proportion; calculate the proportion of the target variable in the abnormal score; locate the cause of the abnormality based on the proportion and the variable coupling correlation features.

[0025] Secondly, embodiments of this application provide a heat exchange station anomaly detection device, comprising:

[0026] The acquisition module is used to acquire thermal parameter data of the heat exchange station, wherein the thermal parameter data is multivariate time-series data collected at a preset frequency;

[0027] The preprocessing module is used to preprocess the thermal parameter data to obtain the target parameter data;

[0028] The feature processing module is used to process the target parameter data by pre-defined convolution, feature-guided graph modeling and time-guided graph modeling to obtain local fluctuation features, variable coupling and correlation features and time-dependent features, and to concatenate the local fluctuation features, the variable coupling and correlation features and the time-dependent features to obtain a fusion feature matrix;

[0029] The model building module is used to extract long-term time-series features based on the fused feature matrix through time-series modeling, and to build a prediction model and a reconstruction model based on the long-term time-series features;

[0030] The model building module is also used to iteratively train the prediction model and the reconstruction model using a preset joint loss function to obtain an anomaly detection model;

[0031] The analysis module is used to input the target parameter data into the anomaly detection model to obtain the parameter prediction values, reconstruction probability, and correlation weights between variables;

[0032] The analysis module is also used to perform analysis based on the predicted parameter value, reconstruction probability, and preset threshold algorithm to obtain anomaly determination results;

[0033] The analysis module is also used to analyze the correlation weights between the variables to obtain the cause of the anomaly.

[0034] In one possible implementation, the preprocessing module is specifically used for:

[0035] The thermal parameter data is cleaned of outliers to remove outliers that exceed a preset statistical range, resulting in first data. The first data is then processed using a preset normalization algorithm to obtain target parameter data.

[0036] In one possible implementation, the feature processing module is specifically used for:

[0037] The local fluctuation features are obtained by extracting local features from the thermal parameter data through a preset convolution. A fully connected undirected graph is constructed by using feature-guided graph modeling, where multiple parameters corresponding to the thermal parameter data are treated as parameter nodes and node features are extracted. A linear transformation is performed on the node features to calculate the inter-variable correlation coefficients between the parameter nodes. The inter-variable correlation coefficients are normalized to obtain the inter-variable correlation weights between the parameter nodes. The node features are then weighted and aggregated based on the inter-variable correlation weights to obtain the variable coupling correlation features. A fully connected directed graph is constructed by using time-series guided graph modeling, where multiple acquisition times within a preset time window are treated as time-series nodes and time-series node features are extracted. A fully connected directed graph is constructed by using time-series guided graph modeling, where a linear transformation is performed on the time-series node features and dependency coefficients between the time-series nodes are calculated. The dependency coefficients are normalized to obtain the dependency weights between the time-series nodes. The time-series dependency features are then weighted and aggregated based on the dependency weights.

[0038] In one possible implementation, the model building module is specifically used for:

[0039] The long-term time-series features are input into the prediction model, and the predicted parameter values ​​for the next time step are output. The deviation loss between the predicted parameter values ​​and the corresponding true values ​​is calculated to obtain the prediction loss of the prediction model. The long-term time-series features are input into the reconstruction model, and the mean and variance of the latent spatial distribution are obtained through encoding. A latent vector is generated by sampling the mean and variance. The latent vector is decoded to output a reconstruction feature matrix. The deviation loss between the reconstruction feature matrix and the long-term time-series features is calculated, and the reconstruction loss of the reconstruction model is obtained by combining the relative entropy of the latent spatial distribution and the standard normal distribution. The prediction loss and the reconstruction loss are summed according to a preset weight ratio to obtain the preset joint loss function. Based on the joint loss function, the parameters of the prediction model and the reconstruction model are iteratively adjusted through a backpropagation algorithm until the value of the joint loss function converges to a preset threshold range to obtain the anomaly detection model.

[0040] In one possible implementation, the analysis module is specifically used for:

[0041] The target parameter data is input into the prediction model to calculate the absolute value of the deviation between the predicted value and the corresponding true value of the parameter as a sudden outlier; the difference between the preset benchmark value and the reconstruction probability is calculated based on the reconstruction probability as a gradual outlier; the sudden outlier and the gradual outlier are weighted and fused according to a preset weight coefficient to obtain the outlier score of each collection window of the target parameter data; the distribution of the outlier score of normal samples in the training set is fitted by a preset threshold algorithm to determine the preset threshold; the outlier score of the collection window is compared with the preset threshold, and if the outlier score exceeds the preset threshold, the corresponding collection window is determined to be abnormal, and an outlier determination result containing the location of the outlier window is generated.

[0042] In one possible implementation, the analysis module is specifically used for:

[0043] Retrieve the abnormal window corresponding to the target parameter data in the abnormality judgment result, and obtain the inter-variable correlation weights output by the feature-guided graph modeling corresponding to the abnormal window; extract a preset number of normal windows before and after the abnormal window, and obtain the inter-variable correlation weights corresponding to the normal windows; calculate the average value of the normal window weights as the benchmark weights; compare the fluctuation range of the inter-variable correlation weights with the benchmark weights, and filter out target variables whose weight fluctuation range exceeds a preset proportion; calculate the proportion of the target variable in the abnormal score; locate the cause of the abnormality based on the proportion and the variable coupling correlation features.

[0044] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0045] The memory stores computer-executed instructions;

[0046] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0047] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0048] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0049] The heat exchange station anomaly detection method, device, equipment, storage medium, and program product provided in this application preprocess the multivariate time-series thermal parameter data of the heat exchange station, extract multi-dimensional features through preset convolution, feature-guided graph modeling, and time-series guided graph modeling, and then splice and fuse them. Based on the fused features, a prediction model and a reconstruction model are constructed and jointly trained to obtain an anomaly detection model. After inputting data to obtain the parameter prediction values, reconstruction probabilities, and correlation weights between variables, the model is analyzed to accurately capture the coupling correlation and time-series dependence of variables, improve the anomaly detection accuracy, and achieve the effect of anomaly root cause localization. Attached Figure Description

[0050] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0051] Figure 1 A schematic diagram illustrating an application scenario of the heat exchange station anomaly detection method provided in this embodiment of the application;

[0052] Figure 2 A flowchart illustrating the anomaly detection method for a heat exchange station provided in an embodiment of this application;

[0053] Figure 3 A box-shaped schematic diagram of the variables provided in the embodiments of this application;

[0054] Figure 4 This is a schematic diagram of the test set labels provided in an embodiment of this application;

[0055] Figure 5 A schematic diagram of the RMSE change curve of the training set during the training process provided in this application embodiment;

[0056] Figure 6 This is a schematic diagram of the RMSE variation curve of the test set provided in the embodiments of this application;

[0057] Figure 7 Comparison of the true value, predicted value, and reconstructed value of the variables provided in the embodiments of this application Figure 1 ;

[0058] Figure 8 Comparison of the true value, predicted value, and reconstructed value of the variables provided in the embodiments of this application Figure 2 ;

[0059] Figure 9 Comparison of the true value, predicted value, and reconstructed value of the variables provided in the embodiments of this application Figure 3 ;

[0060] Figure 10 This is a schematic diagram of the structure of the heat exchange station anomaly detection device provided in the embodiments of this application;

[0061] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0062] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0063] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0064] First, let me explain the terms used in this application:

[0065] Thermal parameter data: refers to multivariate time-series data collected by the heat exchange station at a preset frequency, which can reflect the equipment operating conditions and system operating status;

[0066] Target parameter data: refers to thermal parameter data that has undergone preprocessing such as outlier cleaning and normalization, and is used for feature extraction and model input;

[0067] Local fluctuation characteristics: These refer to the short-term micro-fluctuation characteristics of the target parameter data captured by pre-defined convolution processing.

[0068] Variable coupling and correlation features: These refer to features that reflect the inherent correlation between multiple parameters after weighted aggregation of parameter node features through feature-guided graph modeling.

[0069] Temporal dependency features: These are features that reflect the dependency relationships between different acquisition times, obtained by weighted aggregation of temporal node features through temporal guidance graph modeling.

[0070] Fusion feature matrix: refers to the matrix formed by concatenating local fluctuation features, variable coupling and correlation features, and time-series dependency features according to feature dimensions;

[0071] Long-term time series features: These refer to the features extracted based on the fused feature matrix through time series modeling, which reflect the long-term operating patterns of parameters.

[0072] Predictive model: refers to a model built based on long-term time series characteristics, used to output predicted values ​​of thermal parameters at the next time step;

[0073] Reconstruction model: refers to a model built based on long-term time-series features, used to encode and generate latent vectors and decode and output reconstructed feature matrices;

[0074] Joint loss function: refers to the loss function obtained by summing the prediction loss of the prediction model and the reconstruction loss of the reconstruction model according to a preset weight ratio;

[0075] Anomaly detection model: refers to a model that, after iterative training using a joint loss function, can output predicted parameter values, reconstruction probabilities, and weights of correlations between variables;

[0076] Predicted parameter values: These refer to the estimated values ​​of thermal parameters for the next time step output by the prediction model in the anomaly detection model.

[0077] Reconstruction probability: refers to the probability value output by the reconstruction model in the anomaly detection model based on the reconstruction effect;

[0078] Inter-variable association weights: These are numerical values ​​obtained through feature-guided graph modeling, quantifying the strength of associations between parameter nodes.

[0079] Anomaly determination result: refers to the determination result of the location of the anomaly window based on the comparison between the anomaly score and the preset threshold;

[0080] Cause of anomaly: refers to the root cause of the anomaly identified by analyzing the fluctuation range of the correlation weights between variables and the contribution ratio of the abnormal scores.

[0081] In existing technologies, processing multivariate time-series data of heat exchange stations using a single model fails to effectively capture variable coupling and temporal dependencies, resulting in technical problems such as insufficient anomaly detection accuracy and difficulty in locating the root cause of anomalies.

[0082] The heat exchange station anomaly detection method provided in this application extracts and fuses multi-dimensional features after preprocessing the data through preset convolution, feature-guided graph modeling, and time-series guided graph modeling. It constructs a prediction model and a reconstruction model and trains them together to obtain an anomaly detection model. After inputting the data, it analyzes the predicted values ​​of parameters, reconstruction probabilities, and the correlation weights between variables. This solves the technical problems of low anomaly detection accuracy and inability to accurately locate the root cause of anomalies in the prior art.

[0083] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0084] Figure 1 This is a schematic diagram illustrating an application scenario of the heat exchange station anomaly detection method provided in the embodiments of this application, such as... Figure 1 As shown, it includes: terminal 101 and server 102.

[0085] Terminal 101 is used to collect multivariate time-series thermal parameter data of the heat exchange station at a preset frequency, upload the collected data to server 102, and simultaneously receive and display the anomaly judgment results and anomaly causes fed back by server 102. Server 102 is used to receive the thermal parameter data uploaded by terminal 101, preprocess the data, extract multi-dimensional features through preset convolution, feature-guided graph modeling, and time-series guided graph modeling, and then splice and fuse them. Based on the fused features, a prediction model and a reconstruction model are constructed and jointly trained to obtain an anomaly detection model. The preprocessed target parameter data is input to obtain the parameter prediction value, reconstruction probability, and inter-variable correlation weights. The anomaly judgment results and anomaly causes are analyzed and generated, and the results are fed back to terminal 101.

[0086] Figure 2 This is a flowchart illustrating the anomaly detection method for heat exchange stations provided in this application embodiment. The execution entity in this embodiment can be... Figure 1 The server 102 in the illustrated embodiment can also be other computer-related devices, and this embodiment is not particularly limited.

[0087] like Figure 2 As shown, the anomaly detection method for this heat exchange station includes the following steps:

[0088] Step S201: Obtain thermal parameter data of the heat exchange station. The thermal parameter data is multivariate time-series data collected at a preset frequency.

[0089] Specifically, real-time data of core thermal parameters are collected at a fixed frequency to form raw multivariate time-series data. The fixed collection frequency ensures the temporal continuity of the data, and the synchronous collection of multiple variables ensures that the data can fully reflect the system's operating status, providing raw data support for subsequent data processing, feature extraction, and model training.

[0090] For example, collecting 10 core thermal parameters: primary network heating. One net warming Primary network pressure Primary network back pressure One-time heat Secondary network circulation pump frequency Secondary heating network Secondary network temperature recovery Secondary network pressure Secondary network back pressure Real-time data for 10 parameters are collected at a frequency of 3 minutes to form the original multivariate time series dataset. ,in This represents the total number of data collection times. Each row represents 10 parameter values ​​for one time point, and the data is stored in the database.

[0091] Step S202: Preprocess the thermal parameter data to obtain the target parameter data.

[0092] Specifically, outlier cleaning is performed on the thermal parameter data to remove abnormal and missing data that exceed the normal statistical range. Then, a normalization algorithm is used to process the first set of data, eliminating differences in the units of measurement of different parameters to obtain the target parameter data. Outlier cleaning filters extreme anomalies based on the inherent statistical characteristics of the data, while normalization eliminates the influence of magnitude through data mapping, effectively improving data quality and avoiding interference from outliers and differences in units of measurement for subsequent modeling. This provides standardized data for model training and validation.

[0093] Step S203: Perform pre-defined convolution, feature-guided graph modeling, and time-guided graph modeling on the target parameter data to obtain local fluctuation features, variable coupling correlation features, and time-dependent features. Then, concatenate the local fluctuation features, variable coupling correlation features, and time-dependent features to obtain a fused feature matrix.

[0094] Specifically, pre-defined convolution captures local micro-fluctuations in the data through a sliding window; feature-guided graph modeling quantifies the intrinsic coupling relationships between parameters through graph structures; temporal-guided graph modeling quantifies temporal dependencies between different time points through directed graphs; and feature fusion integrates multi-dimensional information to avoid the limitations of single features. By mining three core features—local fluctuations, variable correlations, and temporal dependencies—in the data and concatenating them to obtain a fused feature matrix containing multi-dimensional deep information, the comprehensiveness and representational ability of the features are effectively improved.

[0095] Step S204: Extract long-term time series features through time series modeling based on the fused feature matrix, and construct a prediction model and a reconstruction model based on the long-term time series features.

[0096] Specifically, the fused feature matrix is ​​input into a Gated Recurrent Unit (GRU) for temporal modeling, with the GRU's hidden dimension set to a fixed value to extract long-term temporal features. Based on these long-term temporal features, a prediction model and a reconstruction model are constructed. The prediction model employs a multi-layer fully connected network structure, while the reconstruction model uses a Variational Autoencoder (VAE) structure, comprising an encoder and a decoder. The GRU effectively captures long-term dependencies and filters redundant information in long-term temporal data through the synergistic effect of update and reset gates. The prediction model learns the predictive mapping relationship of the temporal data, while the reconstruction model learns the distribution characteristics of normal operation data. This process obtains core features that accurately reflect long-term temporal patterns, and the two types of models provide a foundation for subsequent joint training, ensuring adaptability to different anomaly types.

[0097] Step S205: Iteratively train the prediction model and the reconstruction model using a preset joint loss function to obtain the anomaly detection model.

[0098] Specifically, the prediction loss quantifies the temporal prediction bias caused by sudden anomalies, the reconstructed loss quantifies the distribution deviation caused by gradual anomalies, and the combined loss balances the detection requirements of both types of anomalies. The backpropagation algorithm continuously optimizes the model parameters through gradient descent, improving the model's generalization ability. This avoids the bias of a single loss function towards specific types of anomalies, improves the model's detection accuracy and generalization ability for different anomaly types, and results in a convergent, stable, and highly generalizable anomaly detection model that balances the detection performance of both sudden and gradual anomalies, significantly improving overall detection accuracy.

[0099] Step S206: Input the target parameter data into the anomaly detection model to obtain the predicted parameter values, reconstruction probability, and correlation weights between variables.

[0100] Specifically, the target parameter data is divided into predefined windows and input into the trained anomaly detection model. Based on the learned temporal patterns and distribution characteristics of thermal parameters, the model outputs predicted parameter values, reconstruction probabilities, and correlation weights between variables. Through the mapping relationships and distribution characteristics learned during training, the model predicts and reconstructs the input data, quantifies the correlation strength between parameters, and outputs three corresponding results. This provides quantitative data on prediction bias and reconstruction effectiveness for subsequent anomaly determination, and provides quantitative evidence of variable correlation strength for anomaly root cause analysis.

[0101] Step S207: Analyze the predicted parameter values, reconstruction probability, and preset threshold algorithm to obtain the anomaly determination result.

[0102] Specifically, by fusing the quantitative contribution values ​​of two types of anomalies, a reasonable threshold is determined based on the anomaly score distribution of normal samples. Through threshold comparison, accurate distinction between normal and abnormal operating conditions is achieved. By comprehensively considering the characteristics of different types of anomalies, accurate identification of abnormal operating conditions and precise location of anomaly windows are realized, meeting the core requirements of real-time monitoring, effectively reducing false alarm and false negative rates, and generating clear judgment results including the location of the anomaly window, providing accurate location information for subsequent fault handling.

[0103] Step S208: Analyze the correlation weights between variables to obtain the cause of the anomaly.

[0104] Specifically, since abnormal operating conditions can cause significant changes in the correlation between relevant variables, by comparing the fluctuations in the correlation weights between abnormal and normal windows, and combining the proportion of abnormal contribution, the source of the abnormality can be traced. This effectively solves the problem that traditional methods are difficult to locate the root cause of the abnormality, provides clear directional guidance for rapid fault handling, and thus quickly and accurately locates the root cause of the abnormality, outputs a clear cause of the abnormality, significantly shortens the fault handling time, and improves the operation and maintenance efficiency of the heat exchange station.

[0105] The anomaly detection method for heat exchange stations provided in this invention achieves high-precision anomaly detection and rapid root cause localization of multivariate time-series data of heat exchange stations through an integrated process of data preprocessing, multi-dimensional feature extraction, time series modeling, prediction reconstruction joint training, anomaly score fusion judgment, and correlation weight root cause analysis. This effectively reduces the false alarm and false negative rates, improves the timeliness and effectiveness of heat exchange station operation and maintenance, and ensures the stable and efficient operation of centralized heating systems.

[0106] This embodiment provides a detailed description of the process for preprocessing thermal parameter data to obtain target parameter data in the above embodiments. The specific implementation of this process includes the following steps:

[0107] Step a1: Clean the thermal parameter data for outliers, remove outliers that exceed the preset statistical range, and obtain the first data.

[0108] Specifically, the raw thermal parameter data is divided into training and test sets proportionally. Only the training set data is used to calculate the overall mean and standard deviation of each parameter. For each data point in the training set, if the value exceeds the mean plus or minus three times the standard deviation, it is marked as outlier, and the outlier is replaced with the overall mean of the corresponding parameter in the training set. The test set data is not cleaned initially; it is retained in its original state for subsequent model validation, resulting in the first set of data. By removing noise and outliers from the raw data, outliers are prevented from misleading subsequent model training, ensuring that the input data closely matches the long-term normal operating level of the parameters.

[0109] For example, the 3σ criterion can accurately filter extreme outliers based on the statistical characteristics of the data itself, and its engineering implementation is simple, requiring no additional complex feature calculations, making it more suitable for the practical needs of heat exchange station operation and maintenance scenarios. The specific steps are as follows:

[0110] Dataset partitioning and statistic calculation: The original dataset is partitioned into a training set in a 7:3 ratio. (Used to calculate statistical properties of normal data) and test set (For subsequent model validation); For each parameter in the training set, calculate its overall mean μ (the average value of the parameter at all normal times in the training set, reflecting the long-term normal operating level of the parameter) and overall standard deviation σ (the standard deviation of the parameter at all normal times in the training set, reflecting the normal fluctuation range of the parameter).

[0111] Training set outlier detection: For each time step and each parameter in the training set, if its value satisfies... (That is, values ​​exceeding 3 standard deviations. Based on the characteristics of normal distribution, this range can cover 99.7% of normal data. Only values ​​that deviate extremely from normal fluctuations are judged as abnormal, such as those caused by sensor malfunctions.) A jump to 0, caused by data transmission interruption. If a value is missing or an abnormal maximum, then that moment is marked as an abnormal moment.

[0112] Training set outlier replacement: For outliers marked in the training set, the overall mean μ of the training set for that parameter is used to replace the outlier (to avoid the impact of local fluctuations on the replacement value, ensure that the replaced data closely matches the long-term normal operating level of the parameter, and reduce interference with subsequent model training); the test set data is not cleaned at this time (to avoid data leakage and ensure the objectivity of model validation), and is only used to assist in anomaly detection during subsequent model inference based on training set statistics, ultimately resulting in a cleaned training set. Compared with the original test set Merge into a complete dataset .

[0113] Step a2: Process the first data using a preset normalization algorithm to obtain the target parameter data.

[0114] Specifically, by employing the Min-Max normalization algorithm, the training set data in the first dataset is mapped to the [0,1] interval; the normalization process of the test set data strictly uses the maximum and minimum values ​​corresponding to the training set to avoid data leakage; the influence of the difference in dimensions of different thermal parameters is eliminated through the normalization formula, and finally the target parameter data is obtained.

[0115] By using linear transformations to map parameter data of different magnitudes to a fixed interval, the numerical ranges of each parameter become comparable, avoiding model bias due to differences in parameter values. This eliminates the interference of dimensional differences on model training, ensuring the model treats each thermal parameter fairly, improving the model's sensitivity to parameter changes and modeling accuracy. The resulting standardized target parameter data can be directly used for feature extraction and model training, effectively improving the effectiveness of subsequent feature extraction and the convergence speed of model training.

[0116] Using the Min-Max normalization method, and Mapping to the [0,1] interval respectively eliminates the influence of differences in the magnitude of different parameters. The normalization formula is as follows:

[0117]

[0118] in, , These represent the maximum and minimum values ​​of the corresponding parameters in the cleaned training set, respectively; the test set is normalized strictly using the maximum and minimum values ​​of the training set to avoid data leakage, ultimately resulting in the preprocessed dataset. ( For the normalized training set, (This is the normalized test set).

[0119] This invention employs a combination of outlier cleaning and min-max normalization to remove data noise and eliminate dimensional differences, thereby obtaining high-quality standardized target parameter data. This lays a reliable foundation for subsequent multi-dimensional feature extraction and prediction reconstruction joint model training, ensuring the accuracy and stability of the entire anomaly detection process.

[0120] This embodiment provides a detailed description of the process of performing preset convolution, feature-guided graph modeling, and temporal-guided graph modeling on the target parameter data in the above embodiments. The specific implementation of this process includes the following steps:

[0121] Step b1: Local feature extraction is performed on the thermal parameter data through preset convolution to obtain local fluctuation features.

[0122] Specifically, a one-dimensional convolutional (1D convolutional) layer with a kernel size of 5 can be used, and the sliding window length can be set to 60. The target parameter data is truncated into subsequences according to the window. The short-to-medium-term micro fluctuations of the data are captured through convolution operations, and a local feature matrix is ​​output. This window length is adapted to the data acquisition frequency of the heat exchange station and can cover typical short-term operating cycles.

[0123] One-dimensional convolution performs convolution operations on local continuous data through a sliding window, which can effectively capture the variation pattern of data within a local range. The setting of kernel size and window length is based on the fluctuation characteristics of thermal parameters, balancing the capture of local details and the problem of feature ambiguity, and obtaining local fluctuation features that accurately reflect the short-term fluctuation pattern of parameters, providing basic local information support for subsequent multi-dimensional feature fusion.

[0124] For example, using a 1D convolutional layer with a kernel size of 5, and based on a 3-minute acquisition frequency, it was verified that a window of 5 time points (15 minutes) can effectively capture short- to medium-term micro-fluctuations in thermal parameters, such as small adjustments in the frequency of the secondary network circulation pump (±5Hz) and slow fluctuations in the primary network temperature (±3℃). This avoids missing fluctuation patterns due to an excessively short window, while also preventing feature blurring due to an excessively long window. The subsequences captured by the sliding window... , Local feature extraction is performed, with a window length of 60 corresponding to 180 minutes (3 hours) of data, covering a typical short-term operating cycle of the heat exchange station; the convolutional layer outputs a local feature matrix. (N is the number of training set windows) and (K is the number of test set windows), which can accurately capture the local fluctuation characteristics of 10 parameters at each time point.

[0125] Step b2 involves using feature-guided graph modeling to construct a fully connected undirected graph by taking multiple parameters corresponding to the thermal parameter data as parameter nodes and extracting node features.

[0126] Specifically, all thermal parameters are mapped to independent nodes in a graph structure, and the feature vectors corresponding to each node are extracted. Based on the bidirectional correlation characteristics between thermal parameters, a fully connected undirected graph is constructed to ensure that there is a correlation edge between any two parameter nodes to represent the potential coupling relationship. The graph structure can explicitly model complex correlations between variables, the fully connected design can cover the potential coupling between all parameters, and the undirected graph adapts to the bidirectional mutual influence characteristics between thermal parameters, avoiding the loss of correlation information caused by unidirectional modeling. By building a modeling framework for variable coupling and correlation, discrete parameter features are transformed into graph data with a correlation structure, including parameter features and correlation structure, breaking the limitations of traditional independent parameter analysis and laying a structural foundation for subsequent accurate calculation of variable correlation weights.

[0127] Step b3 involves performing a linear transformation on the node features and then calculating the correlation coefficients between the variables of the parameter nodes.

[0128] Specifically, by adjusting the dimensions and enhancing the features of each parameter node's feature vector, and processing the linearly transformed feature vector through an activation function, the similarity or dependency strength between any two nodes is calculated to obtain the correlation coefficient between the original variables. Linear transformation optimizes the expressive power of node features, making them more suitable for correlation strength calculation; the activation function introduces non-linearity, enhancing the fitting ability to complex correlations; the correlation coefficient is calculated based on feature similarity or dependency criteria, quantifying the intrinsic correlation between nodes, transforming node features into a vector form that can be used for correlation quantification, initially quantifying the correlation strength between parameter nodes, providing raw data for subsequent weight normalization, and obtaining the correlation coefficient reflecting the original correlation strength between parameters. This achieves the initial transformation of correlation from qualitative to quantitative, providing support for accurate correlation weight generation.

[0129] Step b4: Normalize the correlation coefficients between variables to obtain the correlation weights between parameter nodes.

[0130] Specifically, the SoftMax function is used to normalize the correlation coefficients between all variables corresponding to each parameter node, ensuring that the sum of all correlation weights for each node is 1, thus obtaining standardized correlation weights between variables. SoftMax normalization maps correlation coefficients within any real number range to the [0,1] interval, guaranteeing that the sum of all correlation weights for the same node is 1. This achieves relative quantification of correlation strength, facilitating a direct comparison of the influence of different nodes on the target node. It effectively eliminates differences in the magnitude of correlation coefficients, unifies the weight scale, ensures the interpretability and comparability of correlation weights, and avoids misjudgments of correlation strength due to differences in the original coefficient value ranges.

[0131] Step b5: Based on the correlation weights between variables, the node features are weighted and aggregated to obtain the variable coupling correlation features.

[0132] Specifically, using the correlation weights between variables as coefficients, a weighted summation is performed on the features of all associated nodes corresponding to each parameter node. The aggregated features are then used as the variable coupling correlation features for that node. The aggregated features of all nodes are integrated to form a variable coupling correlation feature matrix. The correlation weights reflect the strength of the influence of different nodes on the target node. Weighted aggregation integrates the correlation information scattered across various nodes into the target node features, achieving effective fusion of correlation information. By integrating the coupling correlation information between parameters, single node features are upgraded to composite features containing global correlation information, significantly improving the feature representation ability and providing key feature support for subsequent models to capture multivariate collaborative anomalies.

[0133] Step b6 involves using time-series guided graph modeling to construct a fully connected directed graph by taking multiple acquisition moments within a preset time window as time-series nodes and extracting their features.

[0134] Specifically, each acquisition moment within a preset time window is mapped to an independent node in the time series graph. The feature vectors corresponding to each moment are extracted as the features of the time series nodes. Based on the sequential dependency characteristics of time series data, a fully connected directed graph is constructed, with edges pointing from historical moments to the current moment, representing unidirectional dependencies in the time dimension. Time series data exhibits significant sequential dependencies, and the fully connected directed graph can cover the potential temporal dependencies between any two moments. Directed edges accurately represent the direction of influence of historical moments on the current moment, adapting to the unidirectional flow characteristics of time series data. By building a modeling framework for temporal dependencies, discrete temporal features are transformed into graph data with a dependency structure.

[0135] Step b7: Perform a linear transformation on the temporal node features and then calculate the dependency coefficients between temporal nodes.

[0136] Specifically, a linear transformation matrix is ​​used to adjust the dimensionality and enhance the features of each time-series node's feature vector. An activation function is then used to process the transformed feature vectors, and the dependency strength between the current time-series node and all historical time-series nodes is calculated to obtain the original temporal dependency coefficients. The linear transformation optimizes the expressive power of the time-series node features, while the activation function introduces non-linearity to accommodate complex temporal dependencies. The dependency coefficients are calculated based on the similarity or inheritance criteria of the temporal features, quantifying the intrinsic dependencies between time-series nodes. By transforming the time-series node features into a vector form suitable for dependency quantification, the initial strength of temporal dependencies between time-series nodes is quantified, providing raw data for subsequent weight normalization.

[0137] Step b8 involves normalizing the dependency coefficients to obtain the dependency weights between time-series nodes.

[0138] Specifically, the SoftMax function is used to normalize the dependency coefficients of all historical moments corresponding to each time series node, thereby achieving relative quantification of the time series dependency strength, which facilitates intuitive comparison of the degree of influence of different historical moments on the current moment.

[0139] Step b9: Based on the dependency weights, the temporal node features are weighted and aggregated to obtain temporal dependency features.

[0140] Specifically, using temporal dependency weights as coefficients, a weighted summation is performed on the features of all historical time nodes corresponding to each time node. The aggregated features are then used as the temporal dependency features of that time node. The aggregated features of all time nodes are integrated to form a temporal dependency feature matrix. The temporal dependency weights reflect the strength of the influence of different historical time points on the current time point. Weighted aggregation integrates the temporal information scattered across various historical time points into the features of the current time point, achieving effective fusion of temporal information. By integrating the dependency information along the time dimension, single-time-point features are transformed into composite features containing long-term temporal information, significantly improving the feature's ability to capture long-term temporal patterns.

[0141] The 10 thermal parameters are treated as 10 nodes, and a fully connected undirected graph is constructed (due to the bidirectional thermal correlation between the parameters of the primary and secondary networks); the attention weights between nodes are dynamically calculated using a graph attention mechanism. (This indicates the degree of influence of parameter j on parameter i; the higher the weight, the stronger the correlation.) The formula is as follows:

[0142]

[0143]

[0144] in It is the eigenvector of parameter i. This is a vector concatenation (the concatenated vector has a dimension of 20). These are learnable parameters.

[0145] The feature association matrix is ​​obtained by weighting and summing the node features using attention weights. and .

[0146] Treating the 60 time points within the sliding window as 60 nodes, a fully connected directed graph is constructed; employing the same attention mechanism as the feature-guided layer, time-to-time pairings are calculated. Attention weights (Representing a historical moment) (The degree of influence on the current time t); output the temporal correlation feature matrix. and It can capture time sequence patterns at 3-minute intervals.

[0147] In the same window (Local fluctuation characteristics) (Parameter association features) (Time-dependent features) are concatenated according to feature dimensions, thus expanding the features at each time step from 10 dimensions to 30 dimensions, resulting in a fused feature matrix. and The fused data includes not only the local fluctuations of the parameters themselves, but also the thermal-engineering correlations between parameters and the temporal dependencies between time points, providing comprehensive and accurate feature inputs for subsequent models and avoiding information loss caused by single features.

[0148] This invention employs a step-by-step feature extraction process that integrates three core features—local fluctuations, variable associations, and temporal dependencies—through one-dimensional convolutional local feature extraction, feature-guided graph modeling to quantify variable coupling and correlation, and temporal-guided graph modeling to capture temporal dependencies. This process comprehensively mines the deep information of the target parameter data, providing high-quality, multi-dimensional feature inputs for subsequent prediction and reconstruction joint models, and effectively improving the anomaly detection model's accuracy in recognizing complex anomaly scenarios.

[0149] This embodiment provides a detailed description of the iterative training process of the prediction model and the reconstruction model using a preset joint loss function as described in the above embodiments. The specific implementation of this process includes the following steps:

[0150] Step c1: Input the long-term time series features into the prediction model and output the predicted parameter values ​​for the next time step.

[0151] Specifically, the prediction model employs a three-layer fully connected network structure, with hidden dimensions set sequentially to, for example, 256, 128, and 10. The input is the long-term temporal features at the last moment of each window. Through forward propagation, the network outputs predicted values ​​of multiple thermal parameters for the next moment, forming a parameter prediction matrix. The fully connected network learns the mapping relationship between long-term temporal features and parameter values ​​for the next moment through linear transformations and nonlinear activations of multiple neurons, adapting to the requirements of temporal data prediction tasks. This transforms long-term temporal features into concrete parameter prediction results, providing a quantitative basis for subsequent calculation of prediction loss and the capture of sudden anomalies.

[0152] Step c2: Calculate the deviation loss between the predicted parameter values ​​and the corresponding true values ​​to obtain the prediction loss of the prediction model.

[0153] Specifically, the Root Mean Square Error (RMSE) is used as the loss calculation metric. It iterates through the predicted values ​​and corresponding true values ​​of all parameters, calculates the sum of squared differences between them, takes the average, and then takes the square root to obtain the prediction loss of the prediction model. RMSE effectively amplifies the impact of large deviations, accurately quantifies the degree of deviation between predicted and true values, and is suitable for scenarios involving sudden parameter mutations caused by unexpected anomalies. By quantifying the prediction accuracy of the prediction model, sudden anomalies are transformed into calculable loss values, providing direction for model parameter optimization and yielding a prediction loss that accurately reflects the contribution of sudden anomalies, ensuring targeted optimization for sudden anomalies during model training.

[0154] Step c3 involves inputting long-term time-series features into the reconstruction model and obtaining the mean and variance of the latent spatial distribution through encoding.

[0155] Specifically, the encoder of the reconstruction model adopts a three-layer fully connected network structure and sets the same hidden dimension as described above. After long-term temporal features are processed by linear transformations and activation functions in each layer of the encoder, the mean and variance matrices of the latent space distribution are output, and their dimensions are consistent with the latent space dimension. The encoder compresses high-dimensional long-term temporal features into a low-dimensional latent space through multi-layer network mapping, and uses the mean and variance to represent the probability distribution of the latent space. This adapts to the modeling logic of variational autoencoders, realizing dimensionality reduction and distribution representation of high-dimensional features, and providing a foundation for subsequent latent vector sampling and feature reconstruction.

[0156] Step c4 generates a latent vector by sampling the mean and variance.

[0157] Specifically, random noise vectors are sampled from a standard normal distribution. These random noise vectors are then multiplied by the square root of their variance and summed to obtain a mean, generating a latent vector that conforms to the latent space distribution, ensuring the sampling process is differentiable. Reparameterization transforms the sampling operation into deterministic computation, solving the problem of non-differentiability in traditional sampling processes. This allows the gradient of the reconstructed model to propagate effectively back to the source, yielding a latent vector that balances distribution characteristics and optimizability, thus ensuring the continuity and effectiveness of the reconstructed model training.

[0158] Step c5: Decode the latent vectors and output the reconstructed feature matrix.

[0159] Specifically, the decoder uses multi-layer network mapping to restore low-dimensional latent vectors into high-dimensional feature matrices, learns the distribution patterns and feature expressions of normal data, achieves accurate reconstruction of input features, restores latent vectors into high-dimensional features, provides a comparative basis for calculating reconstruction loss and capturing gradual anomalies, and outputs a reconstructed feature matrix that can approximately restore the original long-term time series features, providing data support for the quantitative evaluation of gradual anomalies.

[0160] Step c6: Calculate the deviation loss between the reconstructed feature matrix and the long-term time series features, and combine the relative entropy of the latent spatial distribution and the standard normal distribution to obtain the reconstruction loss of the reconstruction model.

[0161] Specifically, the mean squared error is used to calculate the deviation loss between the reconstructed feature matrix and long-term time-series features, quantifying the accuracy of feature reconstruction. Relative entropy (KL divergence) is used to calculate the difference between the latent space distribution and the standard normal distribution, constraining the characteristics of the latent space distribution. The deviation loss and relative entropy are weighted and summed according to a preset ratio to obtain the reconstruction loss of the reconstruction model. The deviation loss quantifies the feature reconstruction deviation caused by gradual anomalies, and the relative entropy constrains the latent space distribution to avoid overfitting, transforming gradual anomalies into calculable loss values, providing a complete basis for model parameter optimization.

[0162] Step c7: Summing the predicted loss and the reconstruction loss according to a preset weight ratio yields a preset joint loss function.

[0163] Specifically, based on the detection requirements of sudden and gradual anomalies, weight coefficients are set for prediction loss and reconstruction loss. A weighted summation method is used to integrate the two types of losses, forming a pre-defined joint loss function that balances the detection priorities of the two types of anomalies. By adjusting the weight ratio, the contribution of the two types of losses to model training is optimized, ensuring that the joint loss function simultaneously responds to the optimization requirements of both sudden and gradual anomalies. This avoids model bias caused by a single loss and provides a unified loss evaluation standard for the joint training of the prediction and reconstruction models.

[0164] Step c8: Based on the joint loss function, the parameters of the prediction model and the reconstruction model are iteratively adjusted using the backpropagation algorithm until the joint loss function value converges to a preset threshold range, thus obtaining the anomaly detection model.

[0165] Specifically, the gradient of the joint loss function with respect to the parameters of each layer of the model is calculated. The weights and biases of the prediction and reconstruction models are iteratively updated using the gradient descent algorithm. After each iteration, the joint loss function value is calculated, and it is determined whether it falls within a preset threshold range. If it does not fall within the threshold, the iteration continues until the convergence condition is met. At this point, training stops, and the model parameters are saved, resulting in the anomaly detection model. The backpropagation algorithm solves for the gradient using the chain rule, and the gradient descent algorithm updates the parameters in the opposite direction of the gradient, continuously reducing the joint loss function value. This allows the model to gradually learn the temporal patterns and distribution characteristics of normal data. By continuously optimizing the model parameters, the model's ability to fit normal data and identify abnormal data is improved, resulting in a convergent, stable, and highly generalized anomaly detection model that balances the detection accuracy of both sudden and gradual anomalies, meeting the actual needs of anomaly detection in heat exchange stations.

[0166] The specific construction process is illustrated with an example: constructing an anomaly detection model that jointly integrates GRU time-series modeling, prediction model, and reconstruction model, to... Using this as input, we improve the detection accuracy of both sudden and gradual anomalies through joint loss optimization.

[0167] GRU long-term time series modeling: Input fusion feature matrix A GRU (Gated Recurrent Unit) layer is used (with a hidden dimension of 256). The GRU layer accurately captures long-term time series patterns at 3-minute intervals through update and reset gates, and outputs a long-term time series feature matrix. .

[0168] Predictive Model: Construct a lightweight predictive model for sudden anomalies at 3-minute intervals.

[0169] based on A three-layer fully connected network is constructed with hidden dimensions of 256-128-10 respectively. The input is the GRU feature at the last time step of each window (corresponding to the long-term feature at the 60th minute within the window), and the output is the predicted values ​​of 10 parameters at the next time step (the first time step outside the window, i.e., 3 minutes later). Loss function: Root mean square error (RMSE) is used to quantify the deviation between the predicted and actual values ​​(sudden anomalies can significantly increase the deviation), as shown in the following formula:

[0170]

[0171] in, Let i be the true value of parameter i at the next time step in the nth window. This corresponds to the predicted value.

[0172] Reconstruction Model: For gradual anomalies at 3-minute intervals, a reconstruction model is constructed using a variational autoencoder (VAE).

[0173] Encoder structure: 3-layer fully connected network, with hidden dimensions of 256-128-100 respectively; input is... The output is the mean of the latent spatial distribution. With variance The latent vector is obtained by sampling through reparameterization. It captures the global distribution characteristics of 10 parameters;

[0174] Decoder structure: 3-layer fully connected network, with hidden dimensions of 100→128→256 respectively; input is... The output is the reconstructed feature matrix. ,reduction The global distribution;

[0175] The loss function used is: reconstruction loss + KL divergence, as shown in the following formula:

[0176]

[0177] in, Let GRU be the feature of the nth window at time t. The first term is the reconstruction loss (gradual anomalies can lead to increased reconstruction bias), and the second term is the KL divergence (to constrain the latent distribution to be close to the standard normal distribution and avoid overfitting).

[0178] Joint optimization training: The total loss function is the sum of the prediction loss and the reconstruction loss. To balance the needs of two types of anomaly detection.

[0179] This invention employs a predictive model to capture sudden anomalies and a reconstructive model to capture gradual anomalies. By combining an iterative optimization process of a joint loss function and a backpropagation algorithm, it balances the detection requirements of the two types of anomalies, continuously improves the model's adaptability to complex anomaly scenarios, and ultimately obtains a high-precision, highly generalizable anomaly detection model, effectively solving the problem of insufficient detection accuracy of traditional single models.

[0180] This embodiment provides a detailed description of the process by which the anomaly determination result is obtained through analysis based on parameter prediction values, reconstruction probability, and preset threshold algorithms in the above embodiments. The specific implementation of this process includes the following steps:

[0181] Step d1 involves inputting the target parameter data into the prediction model to calculate the absolute value of the deviation between the predicted parameter value and the corresponding true value, which is then used as the sudden outlier value.

[0182] Specifically, the preprocessed target parameter data is divided into preset windows and input into the trained prediction model to obtain the parameter prediction values ​​for the next time step for each window. The actual parameter values ​​for the next time step are extracted for each window, and the absolute value of the difference between the predicted and actual values ​​is calculated for each parameter to obtain a quantified value of sudden anomalies. These values ​​are then integrated to form a sudden anomaly value matrix for each acquisition window. Sudden anomalies cause parameter values ​​to deviate from normal temporal variation patterns, resulting in significant deviations between predicted and actual values. The absolute value of the deviation can directly quantify the intensity of this type of anomaly, adapting to the instantaneous and abrupt characteristics of sudden anomalies. By transforming sudden anomalies from qualitative descriptions into quantitative indicators, core data support for the sudden anomaly dimension is provided for subsequent anomaly score fusion.

[0183] Step d2: Calculate the difference between the preset baseline value and the reconstruction probability based on the reconstruction probability as the gradual outlier value.

[0184] Specifically, the preset baseline value can be set to 1. The reconstruction probability of each acquisition window output by the reconstruction model in the anomaly detection model is extracted, and the difference between the baseline value and the reconstruction probability is calculated to obtain the gradual anomaly value of each window. The larger the difference, the worse the reconstruction effect and the more significant the degree of gradual anomaly. Gradual anomalies will cause the data to deviate from the normal distribution pattern, making it difficult for the reconstruction model to accurately restore the original features, and the reconstruction probability will decrease accordingly. The difference can quantify the cumulative effect of this type of anomaly and adapt to the slow and cumulative characteristics of gradual anomalies.

[0185] Step d3: Based on the preset weighting coefficients, sudden outliers and gradual outliers are weighted and fused to obtain the outlier scores for each acquisition window of the target parameter data.

[0186] Specifically, weighting coefficients are set based on the abnormal characteristics of the heat exchange station to balance the contribution of sudden and gradual anomalies. The sudden and gradual anomaly values ​​for each collection window are multiplied by their respective weighting coefficients, and the weighted results are summed to obtain the anomaly score for each window, achieving comprehensive quantification of the two types of anomaly information. By adjusting the weighting ratio to regulate the proportion of the two types of anomalies in the total score, the anomaly score simultaneously reflects the characteristics of both sudden and gradual anomalies, avoiding a single anomaly type dominating the evaluation result, improving the comprehensiveness of the anomaly assessment, integrating the quantitative indicators of the two types of anomalies, and generating a single score that comprehensively reflects the overall anomaly degree, providing a unified evaluation standard for subsequent threshold comparisons.

[0187] Step d4: Fit the abnormal score distribution of normal samples in the training set using a preset threshold algorithm to determine the preset threshold.

[0188] Specifically, the Peaks Over Threshold (POT) algorithm can be used as the preset threshold algorithm to extract the abnormal scores of all normal sample windows in the training set and fit the extreme value distribution of abnormal scores of normal samples. The threshold is determined based on a preset confidence level to ensure that the abnormal scores of normal samples all fall within the threshold range, retaining only those normal sample scores with a very low probability of exceeding the threshold. The POT algorithm excels at fitting extreme value distributions and can accurately capture the distribution boundary of abnormal scores of normal samples. The threshold set based on the confidence level can balance the false positive rate and the false negative rate, adapting to the actual needs of anomaly detection. By establishing an objective, data-driven anomaly judgment boundary, false judgments caused by subjectively set thresholds are avoided, ensuring that the threshold matches the distribution characteristics of normal samples.

[0189] Step d5: Compare the abnormal score of the acquisition window with a preset threshold. If the abnormal score exceeds the preset threshold, the corresponding acquisition window is determined to be abnormal, and an abnormal judgment result containing the location of the abnormal window is generated.

[0190] Specifically, the abnormal scores of all collected windows are iterated and compared one by one with a preset threshold. If the abnormal score of a window exceeds the threshold, the window is marked as an abnormal window, and the corresponding timestamp and location information are recorded. The marking results of all abnormal windows are integrated to generate an abnormal judgment result that includes the location of the abnormal window and the time period of the abnormality, providing a basis for subsequent root cause analysis. Based on the normal sample distribution boundary, an abnormal score exceeding the threshold means that the window data deviates from the normal pattern and meets the characteristics of abnormal operating conditions. Through threshold comparison, the normal and abnormal operating conditions are accurately distinguished, and the abnormal score is transformed into a clear judgment result, locating the specific window where the abnormality occurred. This provides accurate location information for abnormal root cause analysis and fault handling, generates clear and traceable abnormal judgment results, accurately locates the abnormal window position, avoids handling delays caused by ambiguity of the abnormal range, and improves the efficiency of abnormal response.

[0191] For example, for each sliding window of the test set, the total anomalous score is calculated by combining the contributions of burst and gradual anomalous events, taking into account the 3-minute interval characteristic.

[0192] The prediction error is calculated as follows: Input to GRU layer Then input the prediction model to obtain the predicted value for the next time step. ; Calculate the squared error between the predicted value and the actual value at the next time step. Where k is the test set window index and i is the parameter index, reflecting the contribution of sudden anomalies. Furthermore, the calculation of the reconstruction anomaly probability is as follows: Input the reconstruction model and obtain the reconstruction probability. (The worse the reconstruction, the better) The smaller the value, the lower the probability of reconstruction (calculated based on the MSE between the true value and the reconstructed value); calculate the outlier probability of the variable. This reflects the contribution of gradual anomalies; combining the two yields the total anomaly score. ,in This can be determined through a validation set grid search.

[0193] Anomaly threshold determination: A peak threshold algorithm is used, which fits a generalized Pareto distribution (GPD) based on the score distribution of normal samples in the training set. The false alarm rate is set to 0.001, and the anomaly threshold is automatically calculated. Judgment rule: If If the window is abnormal (predicted label 1), then the corresponding time is abnormal; otherwise, it is normal (predicted label 0).

[0194] This invention generates a comprehensive anomaly score by separately quantifying and weighting the sudden and gradual anomalies, combining the peak value exceeding the threshold algorithm to fit the distribution of normal samples to determine the threshold, and then locating the anomaly window by comparing the threshold. This achieves comprehensive capture and accurate judgment of the two types of anomalies, effectively reducing the false alarm rate and the missed alarm rate, and providing a reliable judgment basis for the abnormal operation and maintenance of heat exchange stations.

[0195] This embodiment provides a detailed explanation of the process for analyzing the correlation weights between variables to obtain the cause of anomalies in the above embodiments. The specific implementation of this process includes the following steps:

[0196] Step e1: Retrieve the anomaly window corresponding to the target parameter data of the anomaly judgment result, and obtain the correlation weights between variables output by the feature-guided graph modeling corresponding to the anomaly window.

[0197] Specifically, the time range and location identifier of the anomaly window are extracted from the anomaly detection results. This is then matched against the dataset corresponding to the window in the target parameter data. The full variable correlation weight matrix output during the feature-guided graph modeling phase for that window is retrieved. The matrix dimension matches the number of parameter nodes, preserving the original weight values ​​and node correspondences. The variable correlation weights of the anomaly window directly reflect changes in parameter coupling relationships under abnormal operating conditions and are core data for locating the root cause of anomalies. Precise retrieval based on window identifiers ensures the data's relevance.

[0198] Step e2: Extract a preset number of normal windows before and after the abnormal window, and obtain the correlation weights between variables corresponding to the normal windows.

[0199] Specifically, based on the timestamp of the abnormal window, a preset number of consecutive normal windows are extracted both forward and backward. The selection criterion is that the abnormal score of the normal window is lower than a preset threshold. The variable correlation weight matrix output by these normal windows in the feature-guided graph modeling stage is retrieved and stored uniformly in the analysis dataset. The variable correlation weight of the normal window represents the inherent coupling relationship of parameters under stable operating conditions. Selecting normal windows before and after the abnormal window can eliminate operating condition differences caused by time span, ensuring the effectiveness of the comparison benchmark.

[0200] Step e3: Calculate the average value of the normal window weights as the baseline weights.

[0201] Specifically, the arithmetic mean of the correlation weight matrix between variables in all normal windows is calculated element-wise according to node position to obtain a baseline weight matrix with the same dimensions as the abnormal weight matrix. The baseline weight value corresponding to each parameter node is retained to ensure dimensional matching and numerical comparability. The arithmetic mean can eliminate the random fluctuations of the weights in a single normal window, accurately characterize the stability level of the correlation between variables under normal operating conditions, and provide a reliable benchmark for calculating the fluctuation amplitude.

[0202] Step e4: Compare the fluctuation range of the correlation weights between variables with the baseline weights, and filter out the target variables whose weight fluctuation range exceeds the preset proportion.

[0203] Specifically, the absolute difference between the anomaly window weight and the baseline weight is calculated for each parameter node, and divided by the baseline weight to obtain the fluctuation range. A preset proportion is set as the fluctuation threshold, and parameter nodes with fluctuation ranges exceeding this threshold are selected and marked as target variables. The identifier and fluctuation range value of the target variables are recorded. Abnormal operating conditions will cause the weights of core related variables to deviate from the normal stable level. Variables with fluctuation ranges exceeding the preset proportion are likely to be the core related factors of the anomaly. By quickly locating the target variable highly correlated with the anomaly from all parameters, the scope of root cause analysis is narrowed, and the accuracy of the analysis is improved.

[0204] Step e5: Calculate the proportion of the target variable in the outlier scores.

[0205] Specifically, by breaking down the anomaly scores of each collection window, the contribution values ​​of sudden anomalies and gradual anomalies corresponding to each target variable are extracted. The anomaly score of each individual target variable is calculated according to a weighted fusion rule, and then divided by the total anomaly score of that window to obtain the contribution percentage of the target variable. The percentage value is retained. The anomaly score percentage of the target variable directly quantifies its contribution to the overall anomaly; a higher percentage indicates a greater likelihood that the variable is the root cause of the anomaly.

[0206] Step e6: Locate the cause of the anomaly based on the proportion and the coupling relationship characteristics of the variables.

[0207] Specifically, based on the ranking of the proportion of abnormal contributions of target variables, the core target variables with the highest proportion are analyzed first. The coupling and correlation characteristics of the core target variables are retrieved, and the changing patterns of their coupling relationships with other parameters are analyzed. Combined with the operating mechanism of the heat exchange station equipment, the specific cause of the anomaly is determined, generating an anomaly cause report that includes the core variable, changes in coupling relationships, and the anomaly mechanism. The variable coupling and correlation characteristics reflect the inherent logic of interaction between parameters. Combined with the contribution proportion and equipment operating mechanism, the physical cause of the anomaly can be accurately traced, rather than merely remaining at the data level of correlation analysis. By transforming data-level correlation analysis into anomaly causes at the equipment operation and maintenance level, precise location from data anomalies to physical causes is achieved, outputting clear and interpretable anomaly causes, providing a clear direction for heat exchange station fault handling, and significantly shortening fault investigation time.

[0208] For abnormal windows, locate the root cause and output operation and maintenance suggestions. Root cause candidate screening: extract the contribution ratio of the abnormal score of 10 parameters (i.e., the proportion of the abnormal score of a single parameter to the total). The proportion of each parameter is used to select the top three as root cause candidates. Thermal-hydraulic correlation analysis: The attention weights of the test set in the feature-guided layer are retrieved. By comparing the weight changes of abnormal windows and normal windows (8 normal windows before and after the abnormal window), we can find the variable pair i and j with the largest changes and conduct further analysis on the causes of the anomalies.

[0209] This invention filters target variables by comparing the correlation weights of abnormal and normal window variables, quantifies the degree of contribution by combining the proportion of abnormal scores, and locates the cause of abnormality by relying on the coupling correlation characteristics of variables and the operating mechanism of equipment. This enables accurate tracing from data abnormality to physical cause, significantly improving the efficiency and accuracy of root cause analysis of heat exchange station abnormalities.

[0210] In one specific embodiment, the method further includes validating the model's performance. Based on the actual labels, core performance indicators were calculated to verify the effectiveness of the method: Precision: the number of times a prediction was made as an anomaly and actually occurred / the total number of times a prediction was made as an anomaly, reflecting the ability to reduce false positives; Recall: the number of times a prediction was made as an anomaly and actually occurred / the total number of times a prediction was made as an anomaly, reflecting the ability to reduce false negatives; F1 score: A comprehensive assessment of the detection accuracy was conducted.

[0211] The following example illustrates the concept:

[0212] Using a core heat exchange station in a northern city as the subject of this study, time-series data of 76,600 records were collected from October 2024 to April 2025 (collected at 3-minute intervals). The training set contains 53,620 records, and the test set contains 22,980 records. The test set includes 760 manually labeled abnormal scenarios across three categories, representing an anomaly rate of 3.3%.

[0213] Data preprocessing:

[0214] For the training set data, this example uses the 3 Sigma principle for outlier identification and mean imputation. The box plot distribution of the 10 variables for this heat exchange station is shown below. Figure 3 As shown.

[0215] After replacing and normalizing the outliers of the 10 variables in this training set, we obtain... .

[0216] The 10 variables in the test set can be labeled according to fixed rules set by experts in the heating field: abnormal moments are marked as 1, and normal moments are marked as 0, such as... Figure 4 As shown. This leads to the acquisition of the test set data. and tags .

[0217] Model building and joint model training:

[0218] Based on the structured model mentioned above, to verify the training effectiveness and generalization ability of the prediction model, this example employs a monitoring method of training and validation sets during the training process, selecting... 48,078 samples were used as the training set for model parameter updates, and the remaining 5,342 samples were used as the validation set to evaluate the model's generalization performance. The training epochs were set to 10. The model training effect was assessed by tracking the changes in the RMSE (root mean square error) between the training and validation sets. Figure 5 and Figure 6 As shown.

[0219] The training set RMSE change curve intuitively reflects the improvement process of the model's ability to fit the training data. From the curve trend, as the Epoch increases from 1 to 10, the training set RMSE shows a continuous decrease with a gradually slowing rate of decline: the initial Epochs (1-3) show a significant decrease in RMSE, indicating that the model quickly learns the temporal patterns of thermal parameters in the training data; in subsequent Epochs (4-10), the RMSE decrease becomes more gradual, indicating that the model parameters gradually converge, and the fit to the training data approaches optimal, without underfitting. This trend proves that through 10 iterations of training, the model has fully captured the normal operating modes of the 10 core variables of the heat exchange station, making the training process effective and efficient.

[0220] The validation set RMSE variation curve is a core criterion for evaluating the model's generalization ability, and its trend directly reflects whether the model has overfitting or underfitting issues. From the curve characteristics, the validation set RMSE generally shows a rapid initial decrease followed by stabilization: the RMSE in the first three epochs decreases synchronously with the epoch, consistent with the trend of the training set RMSE, indicating that the learned patterns are generalizable and can effectively adapt to validation data not used in training; the validation set RMSE in epochs 4-10 remains relatively stable, without significant increases or fluctuations, and the final difference between the validation set RMSE and the training set RMSE is controlled within a reasonable range, proving that the model has not overfitted and possesses good generalization performance. This result demonstrates that the model can not only accurately fit the training data but also reliably transfer to new sample data, meeting the anomaly detection requirements of data from different time periods in practical applications of heat exchange stations.

[0221] Combining the RMSE change curves of the training set and the validation set, it can be seen that the overall trends of the two are highly coordinated, with no significant divergence.

[0222] Model performance evaluation:

[0223] Table 1. Test set evaluation results and outlier score thresholds

[0224]

[0225] F1 Score: The F1 score is one of the metrics that comprehensively considers precision and recall. In this experiment, the F1 score is 0.6587, reflecting the model's performance in balancing precision and recall. Precision: Precision represents the proportion of samples predicted as anomalous and actually being anomalous out of the total number of samples predicted as anomalous. The formula is precision = TP / (TP + FP). Here, the precision is 0.7046, indicating that the model has high accuracy in predicting anomalous samples. Recall: Recall represents the proportion of samples that are actually anomalous and were predicted as anomalous out of the total number of actual anomalous samples. The formula is recall = TP / (TP + FN). In this experiment, the recall is 0.6184, reflecting the model's ability to capture actual anomalous samples. TP (True Positive Examples): Represents the number of samples that are actually anomalous and were correctly predicted as anomalous by the model. In this experiment, TP = 470. TN (True Negative Examples): Represents the number of samples that are actually normal and were correctly predicted as normal by the model. TN = 21873. FP (False Positives): Represents the number of samples that are actually normal but were incorrectly predicted as abnormal by the model, FP=197. FN (False Negatives): Represents the number of samples that are actually abnormal but were incorrectly predicted as normal by the model, FN=290. The POT method determined the anomaly score threshold under the optimal F1 score to be 0.5274, that is, when the anomaly score at a certain moment is greater than this threshold, it is judged as an anomaly and marked as 1.

[0226] Analysis of the cause of the anomaly:

[0227] The model's test set includes 10 variables: primary network heating (feature 0), primary network return temperature (feature 1), primary network supply pressure (feature 2), primary network return pressure (feature 3), primary network heat output (feature 4), secondary network circulation pump frequency (feature 5), secondary network heating (feature 6), secondary network return temperature (feature 7), secondary network supply pressure (feature 8), and secondary network return pressure (feature 9). The output is as follows: Figure 7 , Figure 8 , Figure 9 As shown.

[0228] Figure 10 This is a schematic diagram of the structure of the heat exchange station anomaly detection device provided in an embodiment of this application. Figure 10 As shown, the heat exchange station anomaly detection device 100 includes:

[0229] The acquisition module 1001 is used to acquire thermal parameter data of the heat exchange station. The thermal parameter data is multivariate time-series data collected at a preset frequency.

[0230] Preprocessing module 1002 is used to preprocess thermal parameter data to obtain target parameter data;

[0231] The feature processing module 1003 is used to process the target parameter data by pre-defined convolution, feature-guided graph modeling and time-guided graph modeling to obtain local fluctuation features, variable coupling correlation features and time-dependent features, and to concatenate the local fluctuation features, variable coupling correlation features and time-dependent features to obtain a fusion feature matrix;

[0232] The model building module 1004 is used to extract long-term time series features based on the fusion feature matrix through time series modeling, and to build a prediction model and reconstruct the model based on the long-term time series features;

[0233] The model building module 1004 is also used to iteratively train the prediction model and the reconstruction model using a preset joint loss function to obtain the anomaly detection model.

[0234] Analysis module 1005 is used to input target parameter data into the anomaly detection model to obtain parameter prediction values, reconstruction probabilities, and correlation weights between variables;

[0235] Analysis module 1005 is also used to analyze and obtain anomaly judgment results based on parameter prediction values, reconstruction probabilities and preset threshold algorithms;

[0236] Analysis module 1005 is also used to analyze the correlation weights between variables to obtain the cause of anomalies.

[0237] In one possible implementation, the preprocessing module 1002 is specifically used for:

[0238] Outlier cleaning is performed on the thermal parameter data to remove outlier data that exceeds the preset statistical range, resulting in the first data. The first data is then processed using a preset normalization algorithm to obtain the target parameter data.

[0239] In one possible implementation, the feature processing module 1003 is specifically used for:

[0240] Local fluctuation features are obtained by extracting local features from thermal parameter data through pre-defined convolution. A fully connected undirected graph is constructed by using feature-guided graph modeling, where multiple parameters corresponding to the thermal parameter data are treated as parameter nodes and node features are extracted. Linear transformations are applied to the node features to calculate the inter-variable correlation coefficients between parameter nodes. These correlation coefficients are then normalized to obtain the inter-variable correlation weights between parameter nodes. Based on these inter-variable correlation weights, the node features are weighted and aggregated to obtain the variable coupling correlation features. Similarly, a fully connected directed graph is constructed by using time-series guided graph modeling, where multiple acquisition times within a pre-defined time window are treated as time-series nodes and time-series node features are extracted. A fully connected directed graph is constructed by using time-series guided graph modeling, where linear transformations are applied to the time-series node features to calculate the dependency coefficients between time-series nodes. These dependency coefficients are then normalized to obtain the dependency weights between time-series nodes. Finally, based on these dependency weights, the time-series node features are weighted and aggregated to obtain the time-series dependency features.

[0241] In one possible implementation, the model building module 1004 is specifically used for:

[0242] Long-term time-series features are input into the prediction model, which outputs the predicted parameter values ​​for the next time step. The deviation loss between the predicted parameter values ​​and the corresponding true values ​​is calculated to obtain the prediction loss of the prediction model. Long-term time-series features are input into the reconstruction model, and the mean and variance of the latent spatial distribution are obtained through encoding. Latent vectors are generated by sampling the mean and variance. The latent vectors are decoded to output the reconstruction feature matrix. The deviation loss between the reconstruction feature matrix and the long-term time-series features is calculated, and the reconstruction loss of the reconstruction model is obtained by combining the relative entropy of the latent spatial distribution and the standard normal distribution. The prediction loss and the reconstruction loss are summed according to a preset weight ratio to obtain a preset joint loss function. Based on the joint loss function, the parameters of the prediction model and the reconstruction model are iteratively adjusted through the backpropagation algorithm until the joint loss function value converges to a preset threshold range, thus obtaining the anomaly detection model.

[0243] In one possible implementation, the analysis module 1005 is specifically used for:

[0244] The target parameter data is input into the prediction model to calculate the absolute value of the deviation between the predicted parameter value and the corresponding true value as the sudden outlier; the difference between the preset benchmark value and the reconstruction probability is calculated based on the reconstruction probability as the gradual outlier; the sudden outlier and the gradual outlier are weighted and fused according to the preset weight coefficient to obtain the outlier score of each collection window of the target parameter data; the distribution of the outlier score of normal samples in the training set is fitted by the preset threshold algorithm to determine the preset threshold; the outlier score of the collection window is compared with the preset threshold, and if the outlier score exceeds the preset threshold, the corresponding collection window is determined to be abnormal, and an outlier determination result containing the location of the outlier window is generated.

[0245] In one possible implementation, the analysis module 1005 is specifically used for:

[0246] Retrieve the abnormal window corresponding to the target parameter data of the abnormal judgment result, and obtain the inter-variable correlation weights output by the feature-guided graph modeling of the abnormal window; extract a preset number of normal windows before and after the abnormal window, and obtain the inter-variable correlation weights corresponding to the normal windows; calculate the average value of the normal window weights as the benchmark weights; compare the fluctuation range of the inter-variable correlation weights with the benchmark weights, and filter out the target variables whose weight fluctuation range exceeds a preset proportion; calculate the proportion of the target variable in the abnormal score; locate the cause of the abnormality based on the proportion and the variable coupling correlation features.

[0247] The heat exchange station anomaly detection device provided in this embodiment can be used to perform the above-described heat exchange station anomaly detection method. Its implementation principle and technical effect are similar, and will not be described again in this embodiment.

[0248] Figure 11 A schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application, such as... Figure 11 As shown, the electronic device 110 includes at least one processor 1101 and a memory 1102. Optionally, the electronic device 110 also includes a communication component 1103. The processor 1101, memory 1102, and communication component 1103 are connected via a bus 1104.

[0249] In the specific implementation process, at least one processor 1101 executes computer execution instructions stored in memory 1102, causing at least one processor 1101 to perform the above method.

[0250] The specific implementation process of processor 1101 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0251] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0252] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0253] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0254] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0255] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0256] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0257] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0258] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0259] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0260] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0261] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or a part of the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0262] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0263] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for detecting anomalies in a heat exchange station, characterized in that, include: Acquire thermal parameter data of the heat exchange station, wherein the thermal parameter data is multivariate time-series data collected at a preset frequency; The thermal parameter data is preprocessed to obtain the target parameter data; The target parameter data is processed by preset convolution, feature-guided graph modeling and time-guided graph modeling to obtain local fluctuation features, variable coupling and correlation features and time-dependent features. The local fluctuation features, variable coupling and correlation features and time-dependent features are then concatenated to obtain a fusion feature matrix. Based on the fused feature matrix, long-term time-series features are extracted through time-series modeling, and a prediction model and a reconstruction model are constructed based on the long-term time-series features; An anomaly detection model is obtained by iteratively training the prediction model and the reconstruction model using a preset joint loss function. The target parameter data is input into the anomaly detection model to obtain the predicted parameter values, reconstruction probability, and correlation weights between variables. Anomaly determination results are obtained by analyzing the predicted values ​​of the parameters, the reconstruction probability, and the preset threshold algorithm. The causes of the anomalies were obtained by analyzing the correlation weights between the variables.

2. The method according to claim 1, characterized in that, The target parameter data is obtained by preprocessing the thermal parameter data, including: The thermal parameter data is cleaned of outliers to remove outliers that exceed a preset statistical range, thus obtaining the first data. The first data is processed by a preset normalization algorithm to obtain the target parameter data.

3. The method according to claim 1, characterized in that, The target parameter data is processed by pre-defined convolution, feature-guided graph modeling, and temporal-guided graph modeling, including: The local fluctuation features are obtained by extracting local features from the thermal parameter data through a preset convolution. Through the feature-guided graph modeling process, multiple parameters corresponding to the thermal parameter data are used as parameter nodes and node features are extracted to construct a fully connected undirected graph. After performing a linear transformation on the node features, the correlation coefficients between the variables of the parameter nodes are calculated. The correlation coefficients between the variables are normalized to obtain the correlation weights between the parameter nodes. The node features are weighted and aggregated based on the correlation weights between the variables to obtain the variable coupling correlation features; By using time-series guided graph modeling, multiple acquisition moments within a preset time window are taken as time-series nodes and their features are extracted to construct a fully connected directed graph. The dependency coefficients between the time-series nodes are calculated after performing a linear transformation on the characteristics of the time-series nodes. The dependency coefficients are normalized to obtain the dependency weights between the time-series nodes. The temporal dependency features are obtained by weighting and aggregating the temporal node features based on the dependency weights.

4. The method according to claim 1, characterized in that, The prediction model and the reconstruction model are iteratively trained using a preset joint loss function, including: The long-term time series features are input into the prediction model, and the predicted parameter values ​​for the next time step are output. The deviation loss between the predicted value and the corresponding true value of the parameter is calculated to obtain the prediction loss of the prediction model; The long-term time-series features are input into the reconstruction model, and the mean and variance of the latent spatial distribution are obtained through encoding processing. A latent vector is generated by sampling the mean and variance. The latent vectors are decoded to output a reconstructed feature matrix; The deviation loss between the reconstructed feature matrix and the long-term time series features is calculated, and the reconstruction loss of the reconstruction model is obtained by combining the relative entropy between the latent spatial distribution and the standard normal distribution. The preset joint loss function is obtained by summing the predicted loss and the reconstruction loss according to a preset weight ratio. Based on the joint loss function, the parameters of the prediction model and the reconstruction model are iteratively adjusted using the backpropagation algorithm until the value of the joint loss function converges to a preset threshold range, thus obtaining the anomaly detection model.

5. The method according to claim 4, characterized in that, Anomaly detection results are obtained by analyzing the predicted parameter values, reconstruction probabilities, and preset threshold algorithms, including: The target parameter data is input into the prediction model to calculate the absolute value of the deviation between the predicted value and the corresponding true value of the parameter as the sudden anomaly value; The difference between the preset benchmark value and the reconstruction probability is calculated based on the reconstruction probability and used as the gradual anomaly value. The sudden anomalies and the gradual anomalies are weighted and fused according to a preset weighting coefficient to obtain the anomaly score of each collection window of the target parameter data; The preset threshold is determined by fitting the abnormal score distribution of normal samples in the training set using a preset threshold algorithm; The abnormal score of the acquisition window is compared with the preset threshold. If the abnormal score exceeds the preset threshold, the corresponding acquisition window is determined to be abnormal, and an abnormal determination result containing the location of the abnormal window is generated.

6. The method according to claim 5, characterized in that, Analysis of the correlation weights between the variables reveals the causes of anomalies, including: Retrieve the anomaly window corresponding to the target parameter data of the anomaly determination result, and obtain the correlation weight between variables output by the feature-guided graph modeling corresponding to the anomaly window; Extract a preset number of normal windows before and after the abnormal window, and obtain the correlation weights between variables corresponding to the normal windows; The average value of the normal window weights is calculated as the baseline weight; The fluctuation range of the correlation weights between the variables is compared with that of the benchmark weights to filter out target variables whose weight fluctuation range exceeds a preset proportion; Calculate the proportion of the target variable in the outlier scores; The cause of the anomaly can be located based on the ratio and the coupling correlation characteristics of the variables.

7. A heat exchange station anomaly detection device, characterized in that, include: The acquisition module is used to acquire thermal parameter data of the heat exchange station, wherein the thermal parameter data is multivariate time-series data collected at a preset frequency; The preprocessing module is used to preprocess the thermal parameter data to obtain the target parameter data; The feature processing module is used to process the target parameter data by pre-defined convolution, feature-guided graph modeling and time-guided graph modeling to obtain local fluctuation features, variable coupling and correlation features and time-dependent features, and to concatenate the local fluctuation features, the variable coupling and correlation features and the time-dependent features to obtain a fusion feature matrix; The model building module is used to extract long-term time-series features based on the fused feature matrix through time-series modeling, and to build a prediction model and a reconstruction model based on the long-term time-series features; The model building module is also used to iteratively train the prediction model and the reconstruction model using a preset joint loss function to obtain an anomaly detection model; The analysis module is used to input the target parameter data into the anomaly detection model to obtain the parameter prediction values, reconstruction probability, and correlation weights between variables; The analysis module is also used to perform analysis based on the predicted parameter value, reconstruction probability, and preset threshold algorithm to obtain anomaly determination results; The analysis module is also used to analyze the correlation weights between the variables to obtain the cause of the anomaly.

8. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1-6.