A Fault Diagnosis and Recovery Method for a City-Level Integrated Smart Energy Management System

By imputing missing values ​​in energy consumption data through multi-dimensional association rules, identifying anomalies through trend separation and fuzzy C-means clustering, and combining attention-based long short-term memory networks and fault knowledge graphs, the problem of data preprocessing and diagnosis looplessness in fault diagnosis in smart energy management systems is solved, thereby improving the accuracy of anomaly detection and diagnosis.

CN122365375APending Publication Date: 2026-07-10ANHUI SANMA INFORMATION TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANHUI SANMA INFORMATION TECH CO LTD
Filing Date
2026-04-17
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing smart energy management systems suffer from insufficient energy consumption time-series data preprocessing capabilities, inaccurate anomaly detection, and lack of closed-loop fault diagnosis, particularly in areas such as missing value interpolation, anomaly detection, and fault determination.

Method used

Multi-dimensional association rules are used to impute missing values ​​in energy consumption data, and Savitzky-Golay filters are used to filter out noise. Trend separation and fuzzy C-means clustering are used to identify point anomalies, and dynamic threshold detection model with multi-feature fusion is used to identify cluster anomalies. Anomaly features are fused with energy consumption data, and intelligent diagnosis is performed using long short-term memory networks based on attention mechanisms and fault knowledge graphs.

Benefits of technology

It achieves accurate interpolation of missing values ​​in energy consumption data and noise filtering, improves the coverage and accuracy of anomaly detection, and enhances the interpretability and location accuracy of fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122365375A_ABST
    Figure CN122365375A_ABST
Patent Text Reader

Abstract

This invention discloses a fault diagnosis and recovery method for a city-level integrated smart energy management system. This invention relates to the field of smart energy fault diagnosis technology. First, it collects real-time energy consumption data from high-energy-consuming equipment. Through multi-dimensional correlation, missing value imputation, filtering, noise reduction, and standardization, data quality is ensured. Then, based on the energy consumption sequence, trend separation and fuzzy C-means clustering are used to identify point anomalies, and a multi-feature fusion dynamic threshold model is used to identify cluster anomalies. The two types of anomaly features are encoded and fused with standard energy consumption data to construct an input tensor. Intelligent diagnosis is then completed and results are output through a long short-term memory network with a fusion attention mechanism and a fault knowledge graph. This invention effectively improves data preprocessing accuracy and anomaly detection accuracy, achieving a closed loop of diagnosis and handling, and is suitable for the large-scale operation and maintenance needs of city-level smart energy systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart energy fault diagnosis technology, specifically a fault diagnosis and recovery method for a city-level integrated smart energy management system. Background Technology

[0002] City-level integrated smart energy management systems cover a massive number of high-energy-consuming devices, whose operating conditions are complex and variable. Fault diagnosis is a core component to ensure the continuous and stable operation of the system. Existing smart energy system fault diagnosis technologies have the following shortcomings: First, the preprocessing capability for energy consumption time series data is insufficient, especially in the imputation of missing values. Most of them use a single interpolation method and fail to combine the correlation characteristics of equipment model, operating conditions and energy supply zone to achieve accurate completion. Secondly, the anomaly detection process cannot simultaneously identify instantaneous point anomalies and persistent cluster anomalies, and it relies on fixed thresholds or traditional non-adaptive algorithms without combining working condition clustering and time series characteristic optimization, making it susceptible to interference from normal working condition fluctuations. Third, the fault diagnosis process does not integrate prior knowledge of the fault, resulting in poor interpretability and difficulty in accurately determining the fault type and location. Therefore, there is an urgent need for a fault diagnosis and recovery method for a city-level integrated smart energy management system. Summary of the Invention

[0003] To address the shortcomings of existing technologies, this invention provides a fault diagnosis and recovery method for a city-level integrated smart energy management system, which solves the problems of coarse energy consumption data preprocessing and lack of closed-loop fault diagnosis.

[0004] To achieve the above objectives, the present invention provides the following technical solution: a fault diagnosis and recovery method for a city-level integrated smart energy management system, comprising: Step 1: Collect real-time energy consumption data of high-energy-consuming equipment in the city-level integrated smart energy system, and perform data cleaning and standardization preprocessing on the real-time energy consumption data to obtain standardized energy consumption time series data. The real-time energy consumption data includes power consumption sequence, current sequence, voltage sequence, power sequence, temperature sequence, and humidity sequence. Step 2: Based on the standardized energy consumption sequence, trend separation and fuzzy C-means clustering are used to identify point anomalies in the sequence. At the same time, a dynamic threshold detection model with multi-feature fusion is used to identify cluster anomalies in the sequence. Step 3: Characterize point anomalies and cluster anomalies, and fuse them with the standard real-time energy consumption data obtained in Step 1 to form an input tensor X. Substitute the input tensor X into the intelligent diagnostic model based on the attention mechanism long short-term memory network and fault knowledge graph to output the diagnostic results.

[0005] As a further aspect of the present invention, the specific operation for cleaning real-time energy consumption data is as follows: The missing value imputation is performed on each sequence in the real-time energy consumption data. The specific steps are as follows: Locking the target missing device D target The following five attributes should be clearly defined: equipment model, rated parameters, installation location, power supply zone, and cluster control strategy; From the city-level energy system equipment register, select equipment that simultaneously meets all of the following conditions to form the initial reference equipment set D. set Condition 1: With D target Identical equipment model and rated parameters; Condition 2: Same as D target Located in the same energy supply zone and the same physical space; Condition 3: with D target The same cluster control strategy is adopted; Condition 4: Within the time range corresponding to the target missing segment M, the time sequence of the device has no missing values ​​and no outliers. If D set Number of internal devices > D th Then, by using the Pearson correlation coefficient to filter, those related to D are retained. target The top N devices with a historical normal data correlation coefficient greater than miu are used as the final reference device set D. final If D set Number of internal devices ≤ D th Then, all devices with a correlation coefficient > miu are directly retained as D. final , where D th Where is the quantity threshold and miu is the coefficient threshold; If D final If the number of internal devices is ≥1, then execute the missing value imputation procedure; if D final If the set is empty, the mean of the same period and working conditions in the history of this feature will be used to fill it, and the abnormal alarm of the equipment sensor will be triggered simultaneously, terminating the interpolation process of the missing segment. After the missing values ​​of each sequence are imputed, the Savitzky-Golay filter is used to remove noise from each sequence.

[0006] As a further aspect of the present invention, the specific operation of performing the missing value interpolation procedure is as follows: The historical normal operation period of 7 consecutive days before the missing segment M is selected as the training period for weight calculation; For D final Each reference device D within j Calculate its relationship with D target Pearson correlation coefficient r during the training period j The specific expression is ,in, D target With D j Covariance of data during the training period; D target The standard deviation of the data during the training period; D j The standard deviation of the data during the training period; For the correlation coefficient r j Normalization is performed, and the regression weight w for each reference device is calculated. j ; Lock all timestamps t to be interpolated within the target missing segment M. i Extract D one by one final Each reference device D j For t i The effective value x at time j (t i ), calculate t i interpolation value at time Where m is D final Total number of internal devices.

[0007] As a further aspect of the present invention, the specific steps for identifying point anomalies in the sequence using trend separation and fuzzy C-means clustering are as follows: Using seasonal trend decomposition (STL) or empirical mode decomposition (EMD), the standardized energy consumption sequence is decomposed into several subsequences, from which the residual sequence R is selected. Adaptive thresholding based on local window statistics Peak and valley extraction is performed on R, retaining more than The peaks and valleys are used to form sequence V; V is divided into K clusters using fuzzy C-means clustering. The local reachability density and W-LOF(p) of each point p in the cluster are calculated. If W-LOF(p) > θ th If θ is an anomaly, it is determined to be a point anomaly, denoted as Panomaly, where θ th For locally reachable density and threshold.

[0008] As a further aspect of the present invention, the adaptive threshold The specific expression is Where median() is the median function, IQR is the interquartile range, and W... t It is a sliding window of data centered at t. This is the adjustment coefficient.

[0009] As a further aspect of the present invention, the specific rules for calculating the local reachability density and W-LOF(p) of each point p in the cluster are as follows: Define weighted reachability distance Where d(p,q) is the Euclidean distance between p and q. Let p be the distance to its k-th nearest neighbor, and w(q) be the weight based on temporal proximity and fluctuation amplitude. The specific expression for w(q) is: ,in, , The attenuation coefficient is... Let t be the amplitude at point q. p t q These are the sampling time points corresponding to points p and q, respectively; Calculate locally reachable density and ,in, Let p be the set of k nearest neighbor data points corresponding to the target data point p in the clustered same-condition subspace; The The specific expression is Where, || is the expression for finding The number of elements in the middle.

[0010] As a further aspect of the present invention, the specific steps for identifying cluster anomalies in a sequence using a multi-feature fusion dynamic threshold detection model are as follows: Based on a standardized energy consumption sequence, a sliding window G with length L and step size S is set. i and for each G i Extract a set of statistical features to construct a feature vector f i ,Right now In this context, Range() is the range function, Mean() is the mean function, Var() is the variance function, MaxAD() is the maximum difference between adjacent points within the window, and Entropy() is the approximate entropy. Calculate the anomaly factor B of window i i This reflects the degree of deviation from the historical normal pattern, and its specific expression is: Where KNN(i) is the target window G i k nearest neighbor windows, The decay time constant; like Then determine window G i This is a cluster anomaly, denoted as Canomaly. in, For adaptive thresholding, the specific expression is as follows: ,in, , The target window G i k nearest neighbor window anomaly factor B i The mean and standard deviation; The The adjustment coefficient is expressed as follows: ,in, The base adjustment coefficient, h is the dynamic amplification coefficient, v is the decay rate, and t is the base adjustment coefficient. i,end For window G i The end time, t last This is the time of the last alarm.

[0011] As a further aspect of the present invention, the specific rules for characterizing point anomalies and cluster anomalies are as follows: Based on the unified sampling timestamp of the standard real-time energy consumption data obtained in Step 1, a one-dimensional time-series coding sequence with the same time step length as the energy consumption sequence is constructed. The following rules apply to the encoding of each sampling moment in the sequence: if the moment is determined to be a point anomaly (Panomaly), the value is 2; if the sliding window to which the moment belongs is determined to be a cluster anomaly (Canomaly), the value is 1; if the moment belongs to both point anomaly and cluster anomaly, the value is 3; if the moment does not belong to either point anomaly or cluster anomaly, the value is 0. The final output is a numerical anomaly feature encoding sequence that is strictly aligned with the time dimension of standard real-time energy consumption data.

[0012] As a further aspect of the present invention, the specific rule for forming the input tensor X is as follows: the M-dimensional standard real-time energy consumption time-series feature matrix with a time step length of T obtained in Step 1 is axially concatenated with the 1-dimensional abnormal feature encoding sequence with the same time step length of T that has been encoded above, and finally encapsulated to form a three-dimensional input tensor X with the shape [batch_size,T,M+1], where M is the total number of feature dimensions other than energy consumption, and batch_size is the batch size.

[0013] As a further aspect of the present invention, the specific steps for substituting the input tensor X into the intelligent diagnostic model based on the attention mechanism long short-term memory network and fault knowledge graph to output the diagnostic result are as follows: Input the input tensor X into a pre-trained long short-term memory network with an attention mechanism, and output a high-dimensional fault representation vector of shape [batch_size, U], where U is a preset fixed feature output dimension; The high-dimensional fault representation vector is input into the pre-constructed urban energy equipment fault knowledge graph. Through a pre-trained graph neural network, the embedding calculation is performed on the four types of entity nodes in the knowledge graph: fault type, fault location, fault cause, and recovery strategy. The output is a knowledge embedding vector set with the same dimension as the high-dimensional fault representation vector. Calculate the cosine similarity between the high-dimensional fault representation vector and each vector in the knowledge embedding vector set, sort them in descending order of similarity value, select the fault entity with the highest similarity ranking, and extract the prior rules and fault location attribute information associated with the fault entity.

[0014] This invention provides a fault diagnosis and recovery method for a city-level integrated smart energy management system, which has the following advantages compared with the prior art: (1) This invention uses multi-dimensional association rules to accurately interpolate missing values ​​in energy consumption data, and combines Savitzky-Golay filter to remove noise. It can smooth the data while fully preserving fault characteristics, effectively solving the problems of rough preprocessing and poor data quality in existing technologies. (2) This invention constructs a parallel detection system for point anomalies and cluster anomalies. It identifies instantaneous anomalies through trend separation and fuzzy C-means clustering, and determines persistent anomalies based on a multi-feature fusion dynamic threshold model, thereby comprehensively improving the coverage and accuracy of anomaly detection. (3) This invention integrates abnormal features with energy consumption data to form a model, and combines attention time series network and fault knowledge graph to complete the diagnosis, thereby improving the interpretability of the diagnosis and the accuracy of the location. Attached Figure Description

[0015] Figure 1 This is a flowchart of the steps of the present invention. Detailed Implementation

[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] like Figure 1 This invention provides a fault diagnosis and recovery method for a city-level integrated smart energy management system; As an embodiment of this application, it includes: Step 1: Collect real-time energy consumption data of high-energy-consuming equipment in the city-level integrated smart energy system, and perform data cleaning and standardization preprocessing on the real-time energy consumption data to obtain standardized energy consumption time series data. The real-time energy consumption data includes power consumption sequence, current sequence, voltage sequence, power sequence, temperature sequence, and humidity sequence. Step 2: Based on the standardized energy consumption sequence, trend separation and fuzzy C-means clustering are used to identify point anomalies in the sequence. At the same time, a dynamic threshold detection model with multi-feature fusion is used to identify cluster anomalies in the sequence. Step 3: Characterize point anomalies and cluster anomalies, and fuse them with the standard real-time energy consumption data obtained in Step 1 to form an input tensor X. Substitute the input tensor X into the intelligent diagnostic model based on the attention mechanism long short-term memory network and fault knowledge graph to output the diagnostic results.

[0018] As a second embodiment of this application, it is implemented based on the first embodiment, except that this embodiment includes: Step 1: Collect real-time energy consumption data of high-energy-consuming equipment in the city-level integrated smart energy system, and perform data cleaning and standardization preprocessing on the real-time energy consumption data to obtain standardized energy consumption time-series data. The real-time energy consumption data includes energy consumption sequences, current sequences, voltage sequences, power sequences, temperature sequences, and humidity sequences. The core of city-level integrated smart energy system management is energy consumption, and electricity is the core energy input for most high-energy-consuming equipment such as chillers, circulating water pumps, fan coil units, and air conditioning units. At the same time, the real-time energy consumption level of the equipment is essentially determined by the accumulation of electrical power. Whether in DC or AC scenarios, current and voltage are the core basis for power calculation. The three directly reflect the instantaneous energy consumption and load status of the equipment, and there are no errors or lags caused by indirect derivation. Among high-energy-consuming equipment, the largest proportion is refrigeration, heat exchange, and HVAC equipment. The energy consumption level of this type of equipment is strongly correlated with the ambient temperature and humidity and the operating temperature of the equipment itself. Its normal energy consumption baseline will be dynamically adjusted with changes in environmental parameters. If only electrical quantities are used to judge abnormalities, a large number of false alarms are likely to occur. Real-time energy consumption data is cleaned, and the cleaned data is standardized to the same time base before Z-score standardization is performed to eliminate the influence of units.

[0019] Step 2: Based on the standardized energy consumption sequence, trend separation and fuzzy C-means clustering are used to identify point anomalies in the sequence. The specific operation is as follows: Using seasonal trend decomposition (STL) or empirical mode decomposition (EMD), the standardized energy consumption sequence is decomposed into several subsequences, from which the residual sequence R is selected. The residual sequence is the remaining fluctuation component that cannot be explained by conventional operating logic after stripping away all trend and periodic components that can be explained by normal operating conditions. At the same time, core diagnostic signals such as sudden changes in energy consumption and alternating load distortion caused by equipment failure are almost all concentrated in this sequence. Adaptive thresholding based on local window statistics Peak and valley extraction is performed on R, retaining more than The peaks and valleys are used to form sequence V; The adaptive threshold The specific expression is Where median() is the median function, IQR is the interquartile range, and W... t It is a sliding window of data centered at t. This is the adjustment coefficient; V is divided into K clusters using fuzzy C-means clustering. The local reachability density and W-LOF(p) of each point p in the clusters are calculated, with the following specific rules: Define weighted reachability distance Where d(p,q) is the Euclidean distance between p and q. Let p be the distance to its k-th nearest neighbor, and w(q) be the weight based on temporal proximity and fluctuation amplitude. The specific expression for w(q) is: ,in, , The attenuation coefficient is... Let t be the amplitude (standardized value) of point q. p t q These are the sampling time points corresponding to points p and q, respectively; Calculate locally reachable density and ,in, Let p be the set of k nearest neighbor data points corresponding to the target data point p in the clustered same-condition subspace; The The specific expression is Where, || is the expression for finding The number of elements in the middle; If W-LOF(p)>θ th If θ is an anomaly, it is determined to be a point anomaly, denoted as Panomaly, where θ th For locally reachable density and threshold; A dynamic threshold detection model based on multi-feature fusion is used to identify cluster anomalies in sequences. The specific operation is as follows: Based on a standardized energy consumption sequence, a sliding window G with length L and step size S is set. i and for each G i Extract a set of statistical features to construct a feature vector f i ,Right now In this context, Range() is the range function, Mean() is the mean function, Var() is the variance function, MaxAD() is the maximum difference between adjacent points within the window, and Entropy() is the approximate entropy. Calculate the anomaly factor B of window i i This reflects the degree of deviation from the historical normal pattern, and its specific expression is: Where KNN(i) is the target window Gi k nearest neighbor windows, The decay time constant; like Then determine window G i This is a cluster anomaly, denoted as Canomaly. in, For adaptive thresholding, the specific expression is as follows: ,in, , The target window G i k nearest neighbor window anomaly factor B i The mean and standard deviation; The The adjustment coefficient is expressed as follows: ,in, The base adjustment coefficient, h is the dynamic amplification coefficient, v is the decay rate, and t is the base adjustment coefficient. i,end For window G i The end time, t last This is the time of the last alarm.

[0020] Step 3: Characterize the point anomaly Panomaly and the cluster anomaly Canomaly; Since the results of original point anomalies and cluster anomalies are discrete judgment labels, they cannot be directly matched with the standard real-time energy consumption data of continuous equal time steps in Step 1 in terms of data structure and time dimension. Therefore, they need to be characterized and encoded. The specific rules for feature encoding of the two are as follows: Based on the unified sampling timestamp of the standard real-time energy consumption data obtained in Step 1, a one-dimensional time-series coding sequence with the same time step length as the energy consumption sequence is constructed. The following rules apply to the encoding of each sampling moment in the sequence: if the moment is determined to be a point anomaly (Panomaly), the value is 2; if the sliding window to which the moment belongs is determined to be a cluster anomaly (Canomaly), the value is 1; if the moment belongs to both point anomaly and cluster anomaly, the value is 3; if the moment does not belong to either point anomaly or cluster anomaly, the value is 0. The final output is a numerical anomaly feature encoding sequence that is strictly aligned with the time dimension of standard real-time energy consumption data. This data is then fused with the standard real-time energy consumption data obtained in Step 1 to form the input tensor X. The specific fusion rules are as follows: The M-dimensional standard real-time energy consumption time series feature matrix with time step length T obtained in Step 1 is axially concatenated with the 1-dimensional anomaly feature encoding sequence with the same time step length T, which has been encoded above. This ensures that the features of each time step correspond one-to-one. Finally, the two are encapsulated into a three-dimensional input tensor X with shape [batch_size,T,M+1], where M is the total number of non-electrical energy consumption feature dimensions such as current, voltage, power, temperature, and humidity, and batch_size is the batch size, which needs to be set in advance. The input tensor X is substituted into an intelligent diagnostic model based on an attention-based long short-term memory network and a fault knowledge graph to output the diagnostic results. The specific operation is as follows: Input the input tensor X into a pre-trained long short-term memory network with an attention mechanism, and output a high-dimensional fault representation vector of shape [batch_size, U], where U is a preset fixed feature output dimension; Long Short-Term Memory (LSTM) networks excel at processing time-series data, capturing the trends and dependencies in energy consumption data over time. Combined with attention mechanisms, they can focus on critical time intervals where faults occur based on anomaly encoding, eliminating redundant features from normal operating conditions. The high-dimensional fault representation vector is input into the pre-constructed urban energy equipment fault knowledge graph. Through a pre-trained graph neural network, the embedding calculation is performed on the four types of entity nodes in the knowledge graph: fault type, fault location, fault cause, and recovery strategy. The output is a knowledge embedding vector set with the same dimension as the high-dimensional fault representation vector. Although fault knowledge graphs can store fault types, locations, causes, and strategies in the form of structured nodes, they cannot be directly matched with numerical fault representation vectors. In this case, the introduction of graph neural networks can transform the discrete structured knowledge in the graph into continuous numerical vectors while preserving the relationship logic between entities. Calculate the cosine similarity between the high-dimensional fault representation vector and each vector in the knowledge embedding vector set, sort them in descending order of similarity value, select the fault entity with the highest similarity ranking, and extract the prior rules and fault location attribute information associated with the fault entity.

[0021] As a third embodiment of this application, this embodiment further discloses a method for cleaning real-time energy consumption data based on embodiments one and two, specifically including: Missing values ​​are imputed for each sequence in the real-time energy consumption data (i.e., current sequence, voltage sequence, power sequence, temperature sequence, and humidity sequence). The specific steps are as follows: Locking the target missing device D target The following five attributes should be clearly defined: equipment model, rated parameters, installation location, power supply zone, and cluster control strategy; From the city-level energy system equipment register, select equipment that simultaneously meets all of the following conditions to form the initial reference equipment set D. set : Condition 1: With D target The equipment is exactly the same model and has the same rated parameters; Condition 2: with D target They are located in the same energy supply zone and the same physical space, with completely identical environmental conditions; Condition 3: with D target They adopt the same cluster control strategy, resulting in strong synchronization of operating conditions. Condition 4: Within the time range corresponding to the target missing segment M, the time series of the device has no missing data, no outliers, and the data is complete and valid; If D set Number of internal devices > D th Then, by using the Pearson correlation coefficient to filter, those related to D are retained. target The top N devices with a historical normal data correlation coefficient greater than miu are used as the final reference device set D. final If D set Number of internal devices ≤ D th Then, all devices with a correlation coefficient > miu are directly retained as D. final , where D th Where is the quantity threshold and miu is the coefficient threshold; At the same time, it is also necessary to study D final Perform validity verification: If D final If the number of internal devices is ≥1, then execute the missing value imputation procedure; if D final If the set is empty, the mean of the same period and working conditions in the history of this feature will be used to fill it, and the abnormal alarm of the equipment sensor will be triggered simultaneously, terminating the interpolation process of the missing segment. The specific steps for performing the missing value imputation procedure are as follows: The historical normal operation period of 7 consecutive days before the missing segment M is selected as the training period for weight calculation; For D final Each reference device D within j Calculate its relationship with D target Pearson correlation coefficient r during the training period j The specific expression is ,in, D target With D j Covariance of data during the training period; D target The standard deviation of the data during the training period; D j The standard deviation of the data during the training period; For the correlation coefficient rj Normalization is performed, and the regression weight w for each reference device is calculated. j Ensure that the sum of all weights is 1; Lock all timestamps t to be interpolated within the target missing segment M. i Extract D one by one final Each reference device D j For t i The effective value x at time j (t i ), calculate t i interpolation value at time Where m is D final Total number of internal devices; After the missing values ​​of each sequence in the real-time energy consumption data are imputed, the Savitzky-Golay filter is used to filter out noise in each sequence, so as to smooth the signal while preserving the true peak characteristics of the signal.

[0022] Some of the data in the above formulas are numerical calculations with dimensions removed, and the contents not described in detail in this specification are all prior art known to those skilled in the art.

[0023] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.

Claims

1. A fault diagnosis and recovery method for a city-level integrated smart energy management system, characterized in that, include: Step 1: Collect real-time energy consumption data of high-energy-consuming equipment in the city-level integrated smart energy system, and perform data cleaning and standardization preprocessing on the real-time energy consumption data to obtain standardized energy consumption time series data. The real-time energy consumption data includes power consumption sequence, current sequence, voltage sequence, power sequence, temperature sequence, and humidity sequence. Step 2: Based on the standardized energy consumption sequence, trend separation and fuzzy C-means clustering are used to identify point anomalies in the sequence. At the same time, a dynamic threshold detection model with multi-feature fusion is used to identify cluster anomalies in the sequence. Step 3: Characterize point anomalies and cluster anomalies, and fuse them with the standard real-time energy consumption data obtained in Step 1 to form an input tensor X. Substitute the input tensor X into the intelligent diagnostic model based on the attention mechanism long short-term memory network and fault knowledge graph to output the diagnostic results.

2. The fault diagnosis and recovery method for a city-level integrated smart energy management system according to claim 1, characterized in that, The specific steps for cleaning real-time energy consumption data are as follows: The missing value imputation is performed on each sequence in the real-time energy consumption data. The specific steps are as follows: Locking the target missing device D target The following five attributes should be clearly defined: equipment model, rated parameters, installation location, power supply zone, and cluster control strategy; From the city-level energy system equipment register, select equipment that simultaneously meets all of the following conditions to form the initial reference equipment set D. set Condition 1: With D target Identical equipment model and rated parameters; Condition 2: Same as D target Located in the same energy supply zone and the same physical space; Condition 3: with D target The same cluster control strategy is adopted; Condition 4: Within the time range corresponding to the target missing segment M, the time sequence of the device has no missing values ​​and no outliers. If D set Number of internal devices > D th Then, by using the Pearson correlation coefficient to filter, those related to D are retained. target The top N devices with a historical normal data correlation coefficient greater than miu are used as the final reference device set D. final If D set Number of internal devices ≤ D th Then, all devices with a correlation coefficient > miu are directly retained as D. final , where D th Where is the quantity threshold and miu is the coefficient threshold; If D final If the number of internal devices is ≥1, then execute the missing value imputation procedure; if D final If the set is empty, the mean of the same period and working conditions in the history of this feature will be used to fill it, and the abnormal alarm of the equipment sensor will be triggered simultaneously, terminating the interpolation process of the missing segment. After the missing values ​​of each sequence are imputed, the Savitzky-Golay filter is used to remove noise from each sequence.

3. The fault diagnosis and recovery method for a city-level integrated smart energy management system according to claim 2, characterized in that, The specific steps for performing the missing value imputation procedure are as follows: The historical normal operation period of 7 consecutive days before the missing segment M is selected as the training period for weight calculation; For D final Each reference device D within j Calculate its relationship with D target Pearson correlation coefficient r during the training period j The specific expression is ,in, D target With D j Covariance of data during the training period; D target The standard deviation of the data during the training period; D j The standard deviation of the data during the training period; For the correlation coefficient r j Normalization is performed, and the regression weight w for each reference device is calculated. j ; Lock all timestamps t to be interpolated within the target missing segment M. i Extract D one by one final Each reference device D j For t i The effective value x at time j (t i ), calculate t i interpolation value at time Where m is D final Total number of internal devices.

4. The fault diagnosis and recovery method for a city-level integrated smart energy management system according to claim 1, characterized in that, The specific steps for identifying point anomalies in this sequence using trend separation and fuzzy C-means clustering are as follows: Using seasonal trend decomposition (STL) or empirical mode decomposition (EMD), the standardized energy consumption sequence is decomposed into several subsequences, from which the residual sequence R is selected. Adaptive thresholding based on local window statistics Peak and valley extraction is performed on R, retaining more than The peaks and valleys are used to form sequence V; V is divided into K clusters using fuzzy C-means clustering. The local reachability density and W-LOF(p) of each point p in the cluster are calculated. If W-LOF(p) > θ th If θ is an anomaly, it is determined to be a point anomaly, denoted as Panomaly, where θ th For locally reachable density and threshold.

5. The fault diagnosis and recovery method for a city-level integrated smart energy management system according to claim 4, characterized in that, The adaptive threshold The specific expression is Where median() is the median function, IQR is the interquartile range, and W... t It is a sliding window of data centered at t. This is the adjustment coefficient.

6. The fault diagnosis and recovery method for a city-level integrated smart energy management system according to claim 4, characterized in that, The specific rules for calculating the local reachability density and W-LOF(p) of each point p in the cluster are as follows: Define weighted reachability distance Where d(p,q) is the Euclidean distance between p and q. Let p be the distance to its k-th nearest neighbor, and w(q) be the weight based on temporal proximity and fluctuation amplitude. The specific expression for w(q) is: ,in, , The attenuation coefficient is... Let t be the amplitude at point q. p t q These are the sampling time points corresponding to points p and q, respectively; Calculate locally reachable density and ,in, Let p be the set of k nearest neighbor data points corresponding to the target data point p in the clustered same-condition subspace; The The specific expression is Where, || is the expression for finding The number of elements in the middle.

7. The fault diagnosis and recovery method for a city-level integrated smart energy management system according to claim 1, characterized in that, The specific steps for identifying cluster anomalies in sequences using a dynamic threshold detection model with multi-feature fusion are as follows: Based on a standardized energy consumption sequence, a sliding window G with length L and step size S is set. i and for each G i Extract a set of statistical features to construct a feature vector f i ,Right now In this context, Range() is the range function, Mean() is the mean function, Var() is the variance function, MaxAD() is the maximum difference between adjacent points within the window, and Entropy() is the approximate entropy. Calculate the anomaly factor B of window i i This reflects the degree of deviation from the historical normal pattern, and its specific expression is: Where KNN(i) is the target window G i k nearest neighbor windows, The decay time constant; like Then determine window G i This is a cluster anomaly, denoted as Canomaly. in, For adaptive thresholding, the specific expression is as follows: ,in, , The target window G i k nearest neighbor window anomaly factor B i The mean and standard deviation; The The adjustment coefficient is expressed as follows: ,in, The base adjustment coefficient, h is the dynamic amplification coefficient, v is the decay rate, and t is the base adjustment coefficient. i,end For window G i The end time, t last This is the time of the last alarm.

8. The fault diagnosis and recovery method for a city-level integrated smart energy management system according to claim 1, characterized in that, The specific rules for characterizing point anomalies and cluster anomalies are as follows: Based on the unified sampling timestamp of the standard real-time energy consumption data obtained in Step 1, a one-dimensional time-series coding sequence with the same time step length as the energy consumption sequence is constructed. The following rules apply to the encoding of each sampling moment in the sequence: if the moment is determined to be a point anomaly (Panomaly), the value is 2; if the sliding window to which the moment belongs is determined to be a cluster anomaly (Canomaly), the value is 1; if the moment belongs to both point anomaly and cluster anomaly, the value is 3; if the moment does not belong to either point anomaly or cluster anomaly, the value is 0. The final output is a numerical anomaly feature encoding sequence that is strictly aligned with the time dimension of standard real-time energy consumption data.

9. The fault diagnosis and recovery method for a city-level integrated smart energy management system according to claim 1, characterized in that, The specific rules for forming the input tensor X are as follows: The M-dimensional standard real-time energy consumption time series feature matrix with a time step length of T obtained in Step 1 is axially concatenated with the 1-dimensional abnormal feature encoding sequence with the same time step length of T that has been encoded above, and finally encapsulated to form a three-dimensional input tensor X with the shape [batch_size,T,M+1], where M is the total number of feature dimensions other than energy consumption, and batch_size is the batch size.

10. The fault diagnosis and recovery method for a city-level integrated smart energy management system according to claim 1, characterized in that, The specific steps for substituting the input tensor X into the intelligent diagnostic model based on an attention-based long short-term memory network and a fault knowledge graph to output the diagnostic results are as follows: Input the input tensor X into a pre-trained long short-term memory network with an attention mechanism, and output a high-dimensional fault representation vector of shape [batch_size, U], where U is a preset fixed feature output dimension; The high-dimensional fault representation vector is input into the pre-constructed urban energy equipment fault knowledge graph. Through a pre-trained graph neural network, the embedding calculation is performed on the four types of entity nodes in the knowledge graph: fault type, fault location, fault cause, and recovery strategy. The output is a knowledge embedding vector set with the same dimension as the high-dimensional fault representation vector. Calculate the cosine similarity between the high-dimensional fault representation vector and each vector in the knowledge embedding vector set, sort them in descending order of similarity value, select the fault entity with the highest similarity ranking, and extract the prior rules and fault location attribute information associated with the fault entity.