Power equipment temperature and humidity monitoring method, device and equipment based on XGBoost and SVM algorithms

By combining the XGBoost and SVM algorithms, the temperature and humidity monitoring method for power equipment solves the problems of insufficient accuracy and real-time performance of temperature and humidity monitoring in the existing technology, realizes efficient temperature and humidity prediction and anomaly detection, and improves the operational safety and stability of power equipment.

CN120671040APending Publication Date: 2025-09-19STATE GRID ANHUI ELECTRIC POWER CO LTD ELECTRIC POWER SCI RES INST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510731159.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Existing temperature and humidity monitoring methods for power equipment lack accuracy, reliability, and real-time performance when processing complex time series data and high-dimensional features. In particular, it is difficult to effectively monitor and predict temperature and humidity changes in environments such as substations.

Method used

A temperature and humidity monitoring method for power equipment based on XGBoost and SVM algorithms is adopted, including data preprocessing, feature extraction, XGBoost model training and hyperparameter optimization, SVM anomaly detection and alarm mechanism. The model performance is tuned through GridSearchCV, and the corresponding alarm is triggered in combination with the discrimination rules.

Benefits of technology

It significantly improves the accuracy, real-time and robustness of temperature and humidity monitoring of power equipment, reduces false alarms, and improves the accuracy of the system and the safety and stability of equipment operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120671040A_ABST
    Figure CN120671040A_ABST
Patent Text Reader

Abstract

The invention discloses a power equipment temperature and humidity monitoring method based on XGBoost and SVM algorithms. The method comprises the following steps: S1, carrying out mechanical energy preprocessing on original temperature and humidity data; s2, extracting time sequence characteristics, temperature and humidity change rates, temperature and humidity data and the like related to temperature and humidity monitoring by applying the data processed in the step S1, and taking the time sequence characteristics, the temperature and humidity change rates, the temperature and humidity data and the like as input characteristics of the model; s3, using the data processed in the step S2 to train feature data by using an XGBoost model, and adjusting and optimizing hyper-parameters of the model through a GridSearchCV method to optimize the performance of the model; s4, performing anomaly detection on the temperature and humidity data by using the data processed in the step S3 and adopting an SVM algorithm, and identifying abnormal points in the data; and S5, triggering a corresponding alarm mechanism according to the judgment rule by combining the results processed in the step S3 and the step S4. According to the method, the accuracy, the real-time performance and the robustness of temperature and humidity monitoring of the power equipment are remarkably improved by combining the accurate prediction capability of the XGBoost model and the anomaly detection capability of the SVM model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power equipment monitoring, and in particular to a method, device, and equipment for monitoring temperature and humidity of power equipment based on XGBoost and SVM algorithms. Background Art

[0002] As the core hub for energy conversion and distribution in power systems, substation reliability is directly linked to the safe and stable operation of the power system. Substations house numerous electrical equipment, including switchgear, terminal boxes, and control cabinets. These complex internal environments significantly impact operational safety and equipment lifespan. Long-term abnormalities in temperature and humidity can lead to serious consequences, including equipment failure, insulation degradation, and electrical fires. Therefore, accurately monitoring and predicting the temperature and humidity status of electrical equipment is crucial to ensuring the safe and stable operation of power systems.

[0003] Currently, common methods for monitoring temperature and humidity in power equipment include sensor-based temperature and humidity measurements and data analysis using traditional statistical methods or simple machine learning models (such as random forests and BP neural networks). While these methods can predict and detect temperature and humidity to a certain extent, they are generally unable to handle complex time series data and high-dimensional features. This is particularly true in the unique environment of power equipment, where temperature and humidity fluctuate intricately and are affected by multiple factors. Existing monitoring systems have limitations in terms of accuracy, reliability, and real-time performance.

[0004] For example, random forests are prone to overfitting when processing high-dimensional data, especially when the input data is noisy, making predictions unstable. BP neural networks, on the other hand, are slow to train when processing high-dimensional time series data and are prone to falling into local optimal solutions. Furthermore, while these methods are effective on general datasets, their performance and stability are often limited by the unique and variable nature of the internal environment of power equipment.

[0005] Another example is publication number CN111275288A, "Multi-dimensional Data Anomaly Detection Method and Apparatus Based on XGBoost," which discloses a multi-dimensional data anomaly detection method and apparatus based on XGBoost. Step 1: Data collection and cleaning; Step 2: Standardization of the cleaned data to unify the dimensions of data of different dimensions; Step 3: Feature extraction and dimensionality reduction; Step 4: Anomaly detection model training, using the XGBoost method to train the reduced-dimensional data and establish a prediction model for equipment anomalies; Step 5: Online anomaly detection. If a given threshold is exceeded, an anomaly is determined to have occurred. This invention is suitable for processing and predicting important abnormal events in equipment. It fully utilizes the concepts and techniques of ensemble learning and effectively utilizes the important features of multi-dimensional data information detected by equipment sensors, thereby realizing online anomaly detection based on real-time measurement point data from power plants. This invention is targeted at large-scale industrial scenarios such as thermal power plants. It uses multi-source sensors to collect equipment operating parameters (such as vibration, current, and pressure differential) to construct a multi-dimensional anomaly detection model. The anomaly detection method adopts the XGBoost single model structure and emphasizes dimensionality reduction of high-dimensional data through principal component analysis (PCA). The XGBoost single-model architecture in this invention is only suitable for lightweight deployment and is adapted to low-resource devices. The alarm mechanism is a binary alarm (normal / abnormal), which is more inclined to the general anomaly detection task of "high-dimensional multivariate industrial equipment data". Summary of the Invention

[0006] The technical problem to be solved by the present invention is how to improve the accuracy, real-time performance and robustness of temperature and humidity monitoring of power equipment.

[0007] The present invention solves the above technical problems through the following technical means:

[0008] The temperature and humidity monitoring method for power equipment based on XGBoost and SVM algorithms includes:

[0009] S1: Preprocess the original temperature and humidity data;

[0010] S2: Apply the data processed in step S1 to extract the time series features, temperature and humidity change rates, and temperature and humidity data related to temperature and humidity monitoring;

[0011] S3: Use the XGBoost model to train the data processed in step S2, and use the GridSearchCV method to tune the model's hyperparameters to optimize the XGBoost model performance and obtain the predicted value.

[0012] S4: Use the SVM algorithm to perform anomaly detection on the data processed in step S3. The anomaly detection result f(F i );

[0013] S5: Based on the processing results of step S3 and step S4, trigger the corresponding alarm mechanism according to the judgment rules. The judgment rules are:

[0014] like And f(F i )>0, where θ normal If it is the set normal range threshold, it is marked as "normal";

[0015] like and And f(F i )>0, where θ warning If it is the set warning threshold, the "warning" state is triggered;

[0016] like And f(F i )<0, where θ alert If it is the set immediate processing threshold, the "immediate processing" alarm will be triggered.

[0017] The present invention significantly improves the accuracy, real-time performance and robustness of temperature and humidity monitoring of power equipment by combining the precise prediction capability of the XGBoost model with the anomaly detection capability of the SVM model.

[0018] Furthermore, the specific steps of step S1 are as follows:

[0019] S11: Fill in the null values ​​of temperature and humidity data:

[0020] Assume that the original temperature and humidity data are: D = {(t1,h1,T1),(t2,h2,T2),…,(t n ,h n ,T n )}, where t i is the time point, h i is the humidity value, T i is the temperature value; for a data point (t k ,h k ,T k ) There are missing values, and linear interpolation is used to fill in the humidity h k and temperature T k If there are missing values ​​for , then:

[0021]

[0022] Among them, t k is the time point of the data to be filled, t k-1 and t k+1 is the adjacent time point, h k-1 and h k+1 are the humidity data at the corresponding time points, T k-1 and Tk+1 is the temperature data at the corresponding time point, is the humidity value after filling, is the temperature value after filling;

[0023] S12: Eliminate abnormal values ​​from temperature and humidity data:

[0024] Let h={h1,h2,…,h n} is the humidity data sequence, T={T1,T2,…,T n} is a temperature data series, and z-score is used to detect outliers:

[0025]

[0026] Among them, μ h and σ h are the mean and standard deviation of humidity data h, μ T and σ T is the mean and standard deviation of the temperature data T, if |z h |>z 比较值 or |z T |>z 比较值 , then it is considered that h i or T i For outliers, use the IQR method to eliminate them:

[0027] IQR h =Q3(h)-Q1(h),IQR T =Q3(T)-Q1(T)

[0028] Among them, z h is the z-score of the humidity value, z T is the z-score score of the humidity value, IQR h is the interquartile range of humidity data, IQR T is the interquartile range of the temperature data, Q1 and Q3 are the first and third quartiles of the humidity and temperature data, respectively;

[0029] S13: Normalize the temperature and humidity data:

[0030]

[0031] in, and are the normalized humidity and temperature values, min(h) and max(h) are the minimum and maximum values ​​of the humidity data, min(T) and max(T) are the minimum and maximum values ​​of the temperature data.

[0032] Furthermore, the specific steps of step S2 are as follows:

[0033] S21: Extracting time series features from temperature and humidity data:

[0034] For temperature and humidity data D = {(t1,h1,T1),(t2,h2,T2),…,(t n ,h n ,T n )}, within an hour time window, the time series characteristics of humidity h avg for:

[0035] Time series characteristics of humidity T avg for:

[0036] S22: Calculate the rate of change of temperature and humidity:

[0037] Humidity change rate Δh i At time point t i and t i+1 The rate of change between them is:

[0038] Humidity change rate ΔT i At time point t i and t i+1 The rate of change between them is:

[0039] S23: The actual values ​​of temperature and humidity are combined to obtain the model input feature set F = {h avg ,T avg ,Δh i ,ΔT i ,h i ,T i}.

[0040] Furthermore, the specific steps of step S3 are as follows:

[0041] S31: Use the dataset extracted in step S2 for training:

[0042] Each set of data F i ={h avg ,T avg ,Δh i ,ΔT i ,h i ,T i} corresponds to a label y i , let N be the total number of samples in the training set, then the training set is:

[0043] D={(F1,y1),(F2,y2),…,(F N ,y N )}

[0044] Among them, F i is the feature vector of the i-th sample, including humidity, temperature, time series features and change rate features, y i is the corresponding label, D is the training data set, which contains N samples. Through this training set, we learn the mapping relationship between input features and output labels. The goal is to fit the training data by minimizing the objective function:

[0045]

[0046] in, Is the loss function, representing the true label y i and predicted values The difference between them; Ω(θ) is the regularization term to avoid overfitting, where θ is the model parameter;

[0047] S32: For the hyperparameters of the XGBoost model: learning rate η, maximum depth, and subsample ratio, use the GridSearchCV method to tune the hyperparameters. Suppose a set of candidate hyperparameters H = {η, maximum depth, subsample ratio}, and perform a grid search in the predefined hyperparameter space to find the hyperparameters that make the cross-validation results optimal. Right now:

[0048]

[0049] in, is the optimal hyperparameter combination, L CV (θ) is a loss function calculated based on cross-validation, which aims to evaluate the performance of each set of hyperparameter combinations on unseen data through cross-validation;

[0050] S33: By minimizing the objective function, the parameters of each tree of the model are gradually updated so that each tree can be fitted on the residual.

[0051] Furthermore, the specific steps of step S4 are as follows:

[0052] The prediction results output by the XGBoost model are For each test sample i, the SVM algorithm is based on the feature vector F i ={h avg ,T avg ,Δh i ,ΔT i ,h i ,T i} and prediction results Classify it, learn the normal and abnormal patterns of temperature and humidity data through the training set data, and obtain the decision function:

[0053] f(F i )=w T F i +b

[0054] Among them, w is the weight vector of SVM, b is the bias term, F i is the feature vector of the i-th sample. For a new sample, SVM uses the decision function f(F i ) to determine whether the sample belongs to the normal category or the abnormal category. If f(F i )>0, the sample is classified as normal; if f(F i )<0, the sample is classified as abnormal.

[0055] The present invention also provides a temperature and humidity monitoring device for power equipment based on XGBoost and SVM algorithms, comprising:

[0056] Data preprocessing module: preprocess the original temperature and humidity data;

[0057] Feature data extraction module: extracts time series features, temperature and humidity change rates, and temperature and humidity data related to temperature and humidity monitoring from preprocessed data;

[0058] Prediction value calculation module: Use the XGBoost model to train the data processed in step S2, and use the GridSearchCV method to tune the model's hyperparameters to optimize the XGBoost model performance and obtain the prediction value.

[0059] Anomaly detection module: Use SVM algorithm to detect anomalies on the data processed in step S3. The anomaly detection result f(F i );

[0060] Alarm judgment module: Combine the processing results of step S3 and step S, and trigger the corresponding alarm mechanism according to the judgment rules. The judgment rules are:

[0061] like And f(F i )>0, where θ normal If it is the set normal range threshold, it is marked as "normal";

[0062] like and And f(F i )>0, where θ warning If it is the set warning threshold, the "warning" state is triggered;

[0063] like And f(F i )<0, where θ alertIf it is the set immediate processing threshold, the "immediate processing" alarm will be triggered.

[0064] Furthermore, the specific steps of the prediction value calculation module are as follows:

[0065] S31: Use the dataset extracted in the feature data extraction module for training:

[0066] Each set of data F i ={h avg ,T avg ,Δh i ,ΔT i ,h i ,T i} corresponds to a label y i , where the time series characteristic of humidity h avg , the time series characteristics of humidity T avg , Δh i At time point t i and t i+1 Humidity change rate between i At time point t i and t i+1 Humidity change rate between i is the temperature value, and N is the total number of samples in the training set. The training set is:

[0067] D={(F1,y1),(F2,y2),…,(F N ,y N )}

[0068] Among them, F i is the feature vector of the i-th sample, including humidity, temperature, time series features and change rate features, y i is the corresponding label, D is the training data set, which contains N samples. Through this training set, we learn the mapping relationship between input features and output labels. The goal is to fit the training data by minimizing the objective function:

[0069]

[0070] in, Is the loss function, representing the true label y i and predicted values The difference between them; Ω(θ) is the regularization term to avoid overfitting, where θ is the model parameter;

[0071] S32: For the hyperparameters of the XGBoost model: learning rate η, maximum depth, and subsample ratio, use the GridSearchCV method to tune the hyperparameters. Suppose a set of candidate hyperparameters H = {η, maximum depth, subsample ratio}, and perform a grid search in the predefined hyperparameter space to find the hyperparameters that make the cross-validation results optimal. Right now:

[0072]

[0073] in, is the optimal hyperparameter combination, L CV (θ) is a loss function calculated based on cross-validation, which aims to evaluate the performance of each set of hyperparameter combinations on unseen data through cross-validation;

[0074] S33: By minimizing the objective function, the parameters of each tree of the model are gradually updated so that each tree can be fitted on the residual.

[0075] Furthermore, the specific steps of the anomaly detection module are as follows:

[0076] The prediction results output by the XGBoost model are For each test sample i, the SVM algorithm is based on the feature vector F i ={h avg ,T avg ,Δh i ,ΔT i ,h i ,T i} and prediction results Classify it, learn the normal and abnormal patterns of temperature and humidity data through the training set data, and obtain the decision function:

[0077] f(F i )=w T F i +b

[0078] Among them, w is the weight vector of SVM, b is the bias term, F i is the feature vector of the i-th sample. For a new sample, SVM uses the decision function f(F i ) to determine whether the sample belongs to the normal category or the abnormal category. If f(F i )>0, the sample is classified as normal; if f(F i )<0, the sample is classified as abnormal.

[0079] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above method when executed by a processor.

[0080] The present invention also provides an electronic device, comprising a processor and a memory, wherein the memory is used to store executable instructions of the processor; wherein the processor is configured to perform the above method by executing the executable instructions.

[0081] The advantages of the present invention are:

[0082] (1) As an ensemble learning algorithm based on gradient boosting, XGBoost can gradually improve the prediction accuracy through multiple rounds of iterative optimization. Through the adaptive training process, XGBoost can automatically adjust the model according to the trend changes in temperature and humidity data. It has strong generalization ability and can effectively cope with the complex temperature and humidity fluctuations in the power grid equipment environment.

[0083] (2) Combining SVM for post-processing can further classify and detect abnormal data based on the prediction results of XGBoost. When SVM detects abnormal temperature and humidity, it can issue an alarm in time to avoid equipment failure or damage caused by abnormal temperature and humidity. This combination can reduce the probability of false alarms and improve the accuracy of the system;

[0084] (3) Compared with random forest and BP neural network, XGBoost shows stronger fitting ability when processing high-dimensional data. Especially when facing complex time series data, XGBoost's iterative optimization mechanism can better capture the patterns in the data, thereby improving the accuracy of temperature and humidity prediction;

[0085] (4) XGBoost’s parallel training mechanism and column sampling technology make its computational efficiency far superior to that of traditional BP neural networks during training. Especially when facing large-scale data, XGBoost’s training speed is much better than that of BP neural networks. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] Figure 1 This is a flow chart of the temperature and humidity monitoring method for power equipment based on XGBoost and SVM algorithms proposed in the present invention;

[0087] Figure 2 A scatter plot of the predicted and actual temperature values ​​of the power equipment proposed in the present invention;

[0088] Figure 3 A scatter plot of the predicted and actual humidity values ​​of the power equipment proposed by the present invention;

[0089] Figure 4 This is the result diagram of the training set for the temperature and humidity classification task of power equipment proposed by the present invention;

[0090] Figure 5 This is the result diagram of the power equipment temperature and humidity classification task test set proposed by this invention. DETAILED DESCRIPTION

[0091] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0092] Reference Figure 1 The present invention proposes a method for monitoring temperature and humidity of power equipment based on XGBoost and SVM algorithms, and the method steps are as follows:

[0093] S1: Extract useful features from the original temperature and humidity data, clean and standardize the data, and remove noise;

[0094] In this embodiment, the specific steps are as follows:

[0095] S11: Fill in the null values ​​of temperature and humidity data:

[0096] Assume that the original temperature and humidity data are: D = {(t1,h1,T1),(t2,h2,T2),…,(t n ,h n ,T n )}, where t i is the time point, h i is the humidity value, T i is the temperature value; for a data point (t k ,h k ,T k ) There are missing values, and linear interpolation is used to fill in the humidity h k and temperature T k If there are missing values ​​for , then:

[0097]

[0098] Among them, t k is the time point of the data to be filled, t k-1 and t k+1 is the adjacent time point, h k-1 and h k+1 are the humidity data at the corresponding time points, T k-1 and T k+1 is the temperature data at the corresponding time point, is the humidity value after filling, is the temperature value after filling;

[0099] S12: Eliminate abnormal values ​​from temperature and humidity data:

[0100] Let h={h1,h2,…,h n} is the humidity data sequence, T={T1,T2,…,T n} is a temperature data series, and z-score is used to detect outliers:

[0101]

[0102] Among them, μ h and σ h are the mean and standard deviation of humidity data h, μ T and σ T is the mean and standard deviation of the temperature data T, if |z h |>z 比较值 or |z T |>z 比较值 , then it is considered that h i or T i For outliers, use the IQR method to eliminate them:

[0103] IQR h =Q3(h)-Q1(h),IQR T =Q3(T)-Q1(T)

[0104] Among them, z h is the z-score of the humidity value, z T is the z-score score of the humidity value, IQR h is the interquartile range of humidity data, IQR T is the interquartile range of the temperature data, Q1 and Q3 are the first and third quartiles of the humidity and temperature data, respectively;

[0105] S13: Normalize the temperature and humidity data:

[0106]

[0107] in, and are the normalized humidity and temperature values, min(h) and max(h) are the minimum and maximum values ​​of the humidity data, min(T) and max(T) are the minimum and maximum values ​​of the temperature data.

[0108] S2: Apply the data processed in step S1 to extract the time series features, temperature and humidity change rates, and temperature and humidity data related to temperature and humidity monitoring, and use them as input features of the model;

[0109] In this embodiment, the specific steps are as follows:

[0110] S21: Extracting time series features from temperature and humidity data:

[0111] For temperature and humidity data D = {(t1,h1,T1),(t2,h2,T2),…,(t n ,h n ,T n )}, within a one-hour time window,

[0112] Time series characteristics of humidity h avg for:

[0113] Time series characteristics of humidity T avg for:

[0114] S22: Calculate the rate of change of temperature and humidity:

[0115] Humidity change rate Δh i At time point t i and t i+1 The rate of change between them is:

[0116] Humidity change rate ΔT i At time point t i and t i+1 The rate of change between them is:

[0117] S23: The actual values ​​of temperature and humidity are combined to obtain the model input feature set F = {h avg ,T avg ,Δh i ,ΔT i ,h i ,T i}.

[0118] S3: Apply the data processed in step S2, use the XGBoost model to train the feature data, and tune the model's hyperparameters through the GridSearchCV method to optimize the model performance;

[0119] In this embodiment, the specific steps are as follows:

[0120] S31: Use the dataset extracted in step S2 for training:

[0121] Each set of data F i ={h avg ,T avg ,Δh i ,ΔT i ,h i ,T i} corresponds to a label yi , let N be the total number of samples in the training set, then the training set is:

[0122] D={(F1,y1),(F2,y2),…,(F N ,y N )}

[0123] Among them, F i is the feature vector of the i-th sample, including humidity, temperature, time series features and change rate features, y i is the corresponding label, D is the training data set, which contains N samples. Through this training set, we learn the mapping relationship between input features and output labels. The goal is to fit the training data by minimizing the objective function:

[0124]

[0125] in, Is the loss function, representing the true label y i and predicted values The difference between them; Ω(θ) is the regularization term to avoid overfitting, where θ is the model parameter;

[0126] S32: For the hyperparameters of the XGBoost model: learning rate η, maximum depth, and subsample ratio, use the GridSearchCV method to tune the hyperparameters. Suppose a set of candidate hyperparameters H = {η, maximum depth, subsample ratio}, and perform a grid search in the predefined hyperparameter space to find the hyperparameters that make the cross-validation results optimal. Right now:

[0127]

[0128] in, is the optimal hyperparameter combination, L CV (θ) is a loss function calculated based on cross-validation, which aims to evaluate the performance of each set of hyperparameter combinations on unseen data through cross-validation;

[0129] S33: By minimizing the objective function, the parameters of each tree of the model are gradually updated so that each tree can be fitted on the residual.

[0130] S4: Apply the data processed in step S3 and use the SVM algorithm to perform anomaly detection on the temperature and humidity data to identify abnormal points in the data;

[0131] In this embodiment, the specific steps are as follows:

[0132] The prediction results output by the XGBoost model are For each test sample i, the SVM algorithm is based on the feature vector Fi ={h avg ,T avg ,Δh i ,ΔT i ,h i ,T i} and prediction results Classify it, learn the normal and abnormal patterns of temperature and humidity data through the training set data, and obtain the decision function:

[0133] f(F i )=w T F i +b

[0134] Among them, w is the weight vector of SVM, b is the bias term, F i is the feature vector of the i-th sample. For a new sample, SVM uses the decision function f(F i ) to determine whether the sample belongs to the normal category or the abnormal category. If f(F i )>0, the sample is classified as normal; if f(F i )<0, the sample is classified as abnormal.

[0135] S5: combining the results of step S3 and step S4, triggering the corresponding alarm mechanism according to the discrimination rules;

[0136] In this embodiment, the specific steps are as follows:

[0137] Combined with XGBoost's predicted value Compared with the anomaly detection result f(F i ):

[0138] If the prediction result of XGBoost Less than or equal to the set normal threshold θ normal , and the decision function f(F i ) displays normal, it is marked as "normal" and will not trigger an alarm. The mathematical expression is:

[0139] And f(F i )>0

[0140] Among them, θ normal is the set normal range threshold;

[0141] If the prediction result of XGBoost Approaching the set warning threshold θ warning But if it exceeds the normal threshold θ normal , and the decision function f(F i) displays normally, then the "warning" state is triggered. The mathematical expression is:

[0142] and And f(F i )>0

[0143] Among them, θ warning It is the set warning threshold, indicating that the temperature and humidity values ​​are outside the normal range, but have not yet reached the level where immediate action is required;

[0144] If the prediction result of XGBoost Exceeds the set processing threshold θ alert , and the decision function f(F i ) displays an abnormality, the "Immediate Processing" alarm is triggered, indicating that the temperature and humidity conditions have seriously exceeded the safety range and immediate processing measures must be taken. The mathematical expression is:

[0145] And f(F i )<0

[0146] Among them, θ alert It is the set immediate processing threshold, indicating that the temperature and humidity values ​​exceed the serious safety range and the anomaly has been detected by SVM.

[0147] Figure 2 and Figure 3 This is the prediction result of XGboost for temperature and humidity data. It can be seen that the determination coefficient (R 2 ) are 0.97422 and 0.94399, respectively, indicating that the predicted temperature and humidity values ​​are highly consistent with the actual values. The model can explain more than 94% of the actual temperature and humidity changes, and the overall fitting performance is excellent.

[0148] Figure 4 and Figure 5 The results of the model classification task show that the model prediction accuracy reaches 98.836% on the training set, and 97.8571% on the test set. The model achieves high classification accuracy on both the training set and the test set, without obvious overfitting, which verifies the robustness and practicality of the model.

[0149] In summary, the present invention addresses the problems of complex temperature and humidity changes and high abnormal risk in the operating environment of power grid power equipment, and proposes an intelligent monitoring method based on the combination of XGBoost and SVM algorithms. Through data preprocessing and feature extraction, key time series features and temperature and humidity change features are extracted, and the XGBoost model is used to perform efficient and accurate temperature and humidity predictions, and the hyperparameters are optimized through GridSearchCV to achieve optimal model performance. Furthermore, the SVM algorithm is combined to perform anomaly detection on the XGBoost prediction results, which effectively improves the system's ability to identify potential anomalies. Compared with traditional random forest and BP neural network methods, XGBoost exhibits higher prediction accuracy, faster training speed and stronger generalization ability when processing high-dimensional and complex time series data, and combined with SVM, it has better anomaly detection and alarm triggering effects. Overall, the present invention realizes accurate monitoring, rapid classification and timely early warning of the temperature and humidity status of power equipment, significantly improves the safety and stability of power grid equipment operation, and has good engineering application prospects and promotion value.

[0150] This embodiment focuses on monitoring the temperature and humidity environment within power equipment such as substations. It emphasizes accurate prediction of temperature and humidity trends and real-time warning of abnormal conditions. It is particularly suitable for monitoring the operating environment of power equipment such as switchgear and control cabinets. The data is primarily sourced from temperature and humidity sensors, which exhibit distinct time-series characteristics.

[0151] This embodiment's temperature and humidity monitoring method utilizes a dual-model architecture of "XGBoost prediction + SVM classification," integrating regression prediction with classification. Using XGBoost, it accurately models temperature and humidity trends, and uses SVM to perform secondary anomaly detection on the prediction results, thereby achieving a graded response from "normal to warning to immediate action." This solution also incorporates GridSearchCV for hyperparameter optimization, enhancing the fault-tolerant identification of anomalies while ensuring prediction accuracy, significantly improving the robustness and warning efficiency of the overall system.

[0152] The temperature and humidity monitoring method in this embodiment, combining an SVM classifier with a threshold judgment mechanism, can effectively reduce false alarms and improve the accuracy of anomaly judgments, providing greater stability and responsiveness in scenarios with frequent data fluctuations and drastic environmental changes. Furthermore, its more detailed modeling of the temporal characteristics and rate of change of temperature and humidity data can capture early trend changes and provide more timely alerts to abnormalities in the device's internal environment. The alarm mechanism adopts a three-level "normal - early warning - immediate action" mechanism, focusing on the complete process of "prediction + anomaly identification + alarm control."

[0153] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A temperature and humidity monitoring method for power equipment based on XGBoost and SVM algorithms, characterized in that: include: S1: Preprocess the original temperature and humidity data; S2: Apply the data processed in step S1 to extract the time series features, temperature and humidity change rates, and temperature and humidity data related to temperature and humidity monitoring; S3: Use the XGBoost model to train the data processed in step S2, and use the GridSearchCV method to tune the model's hyperparameters to optimize the XGBoost model performance and obtain the predicted value. S4: Use the SVM algorithm to perform anomaly detection on the data processed in step S3. The anomaly detection result f(F i ); S5: Based on the processing results of step S3 and step S4, trigger the corresponding alarm mechanism according to the judgment rules. The judgment rules are: like And f(F i )>0, where θ normal If it is the set normal range threshold, it is marked as "normal"; like and And f(F i )>0, where θ warning If it is the set warning threshold, the "warning" state is triggered; like And f(F i )<0, where θ alert If it is the set immediate processing threshold, the "immediate processing" alarm will be triggered.

2. The method for monitoring temperature and humidity of power equipment based on XGBoost and SVM algorithm according to claim 1, characterized in that: The specific steps of step S1 are as follows: S11: Fill in the null values ​​of temperature and humidity data: Assume that the original temperature and humidity data are: D = {(t1,h1,T1),(t2,h2,T2),…,(t n ,h n ,T n )}, where t i is the time point, h i is the humidity value, T i is the temperature value; for a data point (t k ,h k ,T k ) There are missing values, and linear interpolation is used to fill in the humidity h k and temperature T k If there are missing values ​​for , then: Among them, t k is the time point of the data to be filled, t k-1 and t k+1 is the adjacent time point, h k-1 and h k+1 are the humidity data at the corresponding time points, T k-1 and T k+1 is the temperature data at the corresponding time point, is the humidity value after filling, is the temperature value after filling; S12: Eliminate abnormal values ​​from temperature and humidity data: Let h={h1,h2,…,h n } is the humidity data sequence, T={T1,T2,…,T n } is a temperature data series, and z-score is used to detect outliers: Among them, μ h and σ h are the mean and standard deviation of humidity data h, μ T and σ T is the mean and standard deviation of the temperature data T, if |z h |>z 比较值 or |z T |>z 比较值 , then it is considered that h i or T i For outliers, use the IQR method to eliminate them: IQR h =Q3(h)-Q1(h),IQR T =Q3(T)-Q1(T) Among them, z h is the z-score of the humidity value, z T is the z-score score of the humidity value, IQR h is the interquartile range of humidity data, IQR T is the interquartile range of the temperature data, Q1 and Q3 are the first and third quartiles of the humidity and temperature data, respectively; S13: Normalize the temperature and humidity data: in, and are the normalized humidity and temperature values, min(h) and max(h) are the minimum and maximum values ​​of the humidity data, min(T) and max(T) are the minimum and maximum values ​​of the temperature data.

3. The method for monitoring temperature and humidity of power equipment based on XGBoost and SVM algorithm according to claim 2, characterized in that: The specific steps of step S2 are as follows: S21: Extracting time series features from temperature and humidity data: For temperature and humidity data D = {(t1,h1,T1),(t2,h2,T2),…,(t n ,h n ,T n )}, within an hour time window, the time series characteristics of humidity h avg for: Time series characteristics of humidity T avg for: S22: Calculate the rate of change of temperature and humidity: Humidity change rate Δh i At time point t i and t i+1 The rate of change between them is: Humidity change rate ΔT i At time point t i and t i+1 The rate of change between them is: S23: The actual values ​​of temperature and humidity are combined to obtain the model input feature set F = {h avg ,T avg ,Δh i ,ΔT i ,h i ,T i }.

4. The method for monitoring temperature and humidity of power equipment based on XGBoost and SVM algorithm according to claim 3, characterized in that: The specific steps of step S3 are as follows: S31: Use the dataset extracted in step S2 for training: Each set of data F i ={h avg ,T avg ,Δh i ,ΔT i ,h i ,T i } corresponds to a label y i , let N be the total number of samples in the training set, then the training set is: <h2 style=";text-align:left;direction:ltr">D={(F1,y1),(F2,y2),…,(F<h2 style=";text-align:left;direction:ltr"> N <h2 style=";text-align:left;direction:ltr"> ,y<h2 style=";text-align:left;direction:ltr"> N <h2 style=";text-align:left;direction:ltr"> )} Among them, F i is the feature vector of the i-th sample, including humidity, temperature, time series features and change rate features, y i is the corresponding label, D is the training data set, which contains N samples. Through this training set, we learn the mapping relationship between input features and output labels. The goal is to fit the training data by minimizing the objective function: in, Is the loss function, representing the true label y i and predicted values The difference between them; Ω(θ) is the regularization term to avoid overfitting, where θ is the model parameter; S32: For the hyperparameters of the XGBoost model: learning rate η, maximum depth, and subsample ratio, use the GridSearchCV method to tune the hyperparameters. Suppose a set of candidate hyperparameters H = {η, maximum depth, subsample ratio}, and perform a grid search in the predefined hyperparameter space to find the hyperparameters that make the cross-validation results optimal. Right now: in, is the optimal hyperparameter combination, L CV (θ) is a loss function calculated based on cross-validation, which aims to evaluate the performance of each set of hyperparameter combinations on unseen data through cross-validation; S33: By minimizing the objective function, the parameters of each tree of the model are gradually updated so that each tree can be fitted on the residual.

5. The method for monitoring temperature and humidity of electric power equipment based on XGBoost and SVM algorithm according to claim 4, characterized in that: The specific steps of step S4 are as follows: The prediction results output by the XGBoost model are For each test sample i, the SVM algorithm is based on the feature vector F i ={h avg ,T avg ,Δh i ,ΔT i ,h i ,T i } and prediction results Classify it, learn the normal and abnormal patterns of temperature and humidity data through the training set data, and obtain the decision function: f(F i )=w T F i +b Among them, w is the weight vector of SVM, b is the bias term, F i is the feature vector of the i-th sample. For a new sample, SVM uses the decision function f(F i ) to determine whether the sample belongs to the normal category or the abnormal category. If f(F i )>0, the sample is classified as normal; if f(F i )<0, the sample is classified as abnormal.

6. The power equipment temperature and humidity monitoring device based on XGBoost and SVM algorithm is characterized by: include: Data preprocessing module: preprocess the original temperature and humidity data; Feature data extraction module: extracts time series features, temperature and humidity change rates, and temperature and humidity data related to temperature and humidity monitoring from preprocessed data; Prediction value calculation module: Use the XGBoost model to train the data processed in step S2, and use the GridSearchCV method to tune the model's hyperparameters to optimize the XGBoost model performance and obtain the prediction value. Anomaly detection module: Use SVM algorithm to detect anomalies on the data processed in step S3. The anomaly detection result f(F i ); Alarm judgment module: Combine the processing results of step S3 and step S, and trigger the corresponding alarm mechanism according to the judgment rules. The judgment rules are: like And f(F i )>0, where θ normal If it is the set normal range threshold, it is marked as "normal"; like and And f(F i )>0, where θ warning If it is the set warning threshold, the "warning" state is triggered; like And f(F i )<0, where θ alert If it is the set immediate processing threshold, the "immediate processing" alarm will be triggered.

7. The power equipment temperature and humidity monitoring device based on XGBoost and SVM algorithm according to claim 6, characterized in that: The specific steps of the prediction value calculation module are as follows: S31: Use the dataset extracted in the feature data extraction module for training: Each set of data F i ={h avg ,T avg ,Δh i ,ΔT i ,h i ,T i } corresponds to a label y i , where the time series characteristic of humidity h avg , the time series characteristics of humidity T avg , Δh i At time point t i and t i+1 Humidity change rate between i At time point t i and t i+1 Humidity change rate between i is the temperature value, and N is the total number of samples in the training set. The training set is: <h2 style=";text-align:left;direction:ltr">D={(F1,y1),(F2,y2),…,(F<h2 style=";text-align:left;direction:ltr"> N <h2 style=";text-align:left;direction:ltr"> ,y<h2 style=";text-align:left;direction:ltr"> N <h2 style=";text-align:left;direction:ltr"> )} Among them, F i is the feature vector of the i-th sample, including humidity, temperature, time series features and change rate features, y i is the corresponding label, D is the training data set, which contains N samples. Through this training set, we learn the mapping relationship between input features and output labels. The goal is to fit the training data by minimizing the objective function: in, Is the loss function, representing the true label y i and predicted values The difference between them; Ω(θ) is the regularization term to avoid overfitting, where θ is the model parameter; S32: For the hyperparameters of the XGBoost model: learning rate η, maximum depth, and subsample ratio, use the GridSearchCV method to tune the hyperparameters. Suppose a set of candidate hyperparameters H = {η, maximum depth, subsample ratio}, and perform a grid search in the predefined hyperparameter space to find the hyperparameters that make the cross-validation results optimal. Right now: in, is the optimal hyperparameter combination, L CV (θ) is a loss function calculated based on cross-validation, which aims to evaluate the performance of each set of hyperparameter combinations on unseen data through cross-validation; S33: By minimizing the objective function, the parameters of each tree of the model are gradually updated so that each tree can be fitted on the residual.

8. The power equipment temperature and humidity monitoring device based on XGBoost and SVM algorithm according to claim 7, characterized in that: The specific steps of the anomaly detection module are as follows: The prediction results output by the XGBoost model are For each test sample i, the SVM algorithm is based on the feature vector F i ={h avg ,T avg ,Δh i ,ΔT i ,h i ,T i } and prediction results Classify it, learn the normal and abnormal patterns of temperature and humidity data through the training set data, and obtain the decision function: f(F i )=w T F i +b Among them, w is the weight vector of SVM, b is the bias term, F i is the feature vector of the i-th sample. For a new sample, SVM uses the decision function f(F i ) to determine whether the sample belongs to the normal category or the abnormal category. If f(F i )>0, the sample is classified as normal; if f(F i )<0, the sample is classified as abnormal.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

10. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store executable instructions of the processor; wherein the processor is configured to perform the method according to any one of claims 1 to 5 by executing the executable instructions.

Citation Information

Patent Citations

  • Multidimensional data anomaly detection method and device based on XGBoost

    CN111275288A