Power distribution cabinet fault diagnosis method, system and equipment based on machine learning, and medium

By performing data augmentation and principal component analysis on the gas concentration data of the distribution cabinet, and combining it with the support vector machine training model, the problems of insufficient data samples and complex feature processing in the existing fault diagnosis of distribution cabinets are solved, and more efficient fault diagnosis is achieved.

CN121614960APending Publication Date: 2026-03-06GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511671597.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-14
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing methods for fault diagnosis of distribution cabinets often resort to interpolation for data augmentation when faced with limited data samples. However, the blind interpolation can generate noisy samples at class boundaries, which can reduce model performance. Furthermore, directly inputting multidimensional gas concentration data into machine learning models makes it difficult to effectively handle the complex relationships between features, resulting in low diagnostic accuracy and consuming a large amount of computational resources.

Method used

By synchronously enhancing the initial gas concentration data and the corresponding fault type labels, weighted sampling is performed based on the safety level of the samples, and new samples are generated by interpolation in the safety region where similar samples are dense. Principal component analysis is performed on the enhanced gas concentration data and dimensionality reduction is carried out. A machine learning model is trained using support vector machine.

Benefits of technology

It improves the quality and balance of training data, reduces the computational resource consumption of machine learning models, provides clearer feature inputs, and improves diagnostic accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121614960A_ABST
    Figure CN121614960A_ABST
Patent Text Reader

Abstract

The invention discloses a power distribution cabinet fault diagnosis method, system and equipment based on machine learning, and a medium, and belongs to the technical field of power distribution cabinet fault detection, and the method comprises the steps: collecting initial gas concentration data in a power distribution cabinet and a corresponding initial fault type label, performing data enhancement and dimension reduction on the initial gas concentration data and corresponding initial fault type labels to obtain dimension-reduced gas concentration data and enhanced fault type labels; training a machine learning model by taking the dimension-reduced gas concentration data as input and the enhanced fault type label as output to obtain a machine learning diagnosis model; gas concentration data in the current environment is collected and dimensionality reduction is carried out to obtain real-time dimensionality reduction data, and a power distribution cabinet fault diagnosis result is generated through a machine learning diagnosis model; according to the invention, the problems that the existing power distribution cabinet fault diagnosis method has few collected data samples, a large amount of computing resources are consumed by directly inputting multi-dimensional gas concentration data into a machine learning model, and the diagnosis accuracy is not high are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power distribution cabinet fault detection technology, specifically to a power distribution cabinet fault diagnosis method, system, equipment, and medium based on machine learning. Background Technology

[0002] As an indispensable node device in the power system, the switchgear is involved in every stage of power generation, transmission, transformation, and distribution. Especially in the terminal access of high-voltage transmission networks and regional distribution networks, the switchgear plays a crucial role in safely collecting and efficiently distributing electrical energy, as well as quickly isolating faults and protecting downstream lines and equipment through built-in circuit breakers and protective relays. The stable and reliable operation of the switchgear directly affects the safety of the power grid and the quality of power supply for users. However, in recent years, switchgear fires have occurred frequently, posing a serious threat to the safe operation of the power system. The causes of these fires mainly involve faults such as line corrosion, overheating, and partial discharge. These factors can cause a rapid rise in the internal temperature of the switchgear, even triggering an arc explosion. These faults typically lead to varying degrees of damage to the equipment and cause serious consequences such as widespread power outages.

[0003] Therefore, there is an urgent need for a fault diagnosis method for power distribution cabinets to detect faults in a timely manner and prevent the equipment from suffering more serious damage due to power distribution cabinet faults. However, existing power distribution cabinet fault diagnosis methods face the problem of insufficient data samples and directly use interpolation methods for data augmentation. However, the blind interpolation characteristic of this method will generate noise samples at the category boundaries, which will reduce the performance of the model. At the same time, directly inputting multidimensional gas concentration data into the machine learning model makes it difficult to effectively handle the complex relationships between features, resulting in low diagnostic accuracy and consuming a lot of computing resources. Summary of the Invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the technical problem solved by this invention is that existing power distribution cabinet fault diagnosis methods directly use interpolation to augment data when faced with a small number of collected data samples. However, the blind interpolation characteristic generates noise samples at the category boundaries, which reduces the performance of the model. At the same time, directly inputting multidimensional gas concentration data into the machine learning model makes it difficult to effectively handle the complex relationships between features, resulting in low diagnostic accuracy and consuming a lot of computing resources.

[0006] To address the aforementioned technical problems, this invention provides the following technical solution: a machine learning-based method for fault diagnosis of power distribution cabinets, comprising the following steps: Collect initial gas concentration data and corresponding initial fault type labels inside the power distribution cabinet; Data augmentation is performed on the initial gas concentration data and the corresponding initial fault type labels to obtain augmented gas concentration data and augmented fault type labels; Principal component analysis and dimensionality reduction were performed on the enhanced gas concentration data to obtain dimensionality-reduced gas concentration data. Using reduced-dimensional gas concentration data as input and enhanced fault type labels as output, a machine learning model is trained to obtain a machine learning diagnostic model. The gas concentration data under the current environment is collected and dimensionality is reduced to obtain real-time dimensionality-reduced data. Then, the fault diagnosis results of the power distribution cabinet are generated through a machine learning diagnostic model.

[0007] As a preferred embodiment of the machine learning-based fault diagnosis method for distribution cabinets described in this invention, the step of collecting initial gas concentration data and corresponding initial fault type labels inside the distribution cabinet includes: Initial gas concentration data is generated by collecting gas concentration data inside the distribution cabinet over a set time period using a gas sensor array. Get the types of faults that occur in the power distribution cabinet within a set time period and generate initial fault type labels; Align the initial gas concentration data with the initial fault type label based on time.

[0008] As a preferred embodiment of the machine learning-based power distribution cabinet fault diagnosis method of the present invention, the step of performing data augmentation on the initial gas concentration data and the corresponding initial fault type label to obtain augmented gas concentration data and augmented fault type label includes: The initial gas concentration data and the corresponding initial fault type label are normalized to a set range to obtain normalized gas concentration data and normalized fault type label; Calculate the sampling probability of normalized gas concentration data and normalized fault type labels; Based on the sampling probability, normalized gas concentration data and normalized fault type labels are sampled and interpolated gas concentration data and interpolated fault type labels are generated. The interpolated gas concentration data is merged with the initial gas concentration data to obtain the enhanced gas concentration data, and the interpolated fault type label is merged with the initial fault type label to obtain the enhanced fault type label.

[0009] The beneficial effects of this preferred technical solution are as follows: by synchronously enhancing the initial gas concentration data and the corresponding fault type label, weighted sampling is performed according to the safety level of the sample, and new samples are generated by interpolation in the safety area where similar samples are dense, the problem of noise generated at the category boundary in the traditional interpolation method is avoided, and the quality and balance of the training data are improved.

[0010] As a preferred embodiment of the machine learning-based power distribution cabinet fault diagnosis method described in this invention, the step of performing principal component analysis and dimensionality reduction on the enhanced gas concentration data to obtain dimensionality-reduced gas concentration data includes: The enhanced gas concentration data were standardized and the covariance matrix was calculated. The covariance matrix is ​​decomposed to obtain eigenvalues ​​and eigenvectors; The eigenvectors are sorted in descending order based on their eigenvalues, and the eigenvectors with a set eigenvalue threshold are selected to construct the projection matrix. Dimensionally reduced gas concentration data are calculated based on the projection matrix.

[0011] The beneficial effects of this preferred technical solution are as follows: by performing principal component analysis and dimensionality reduction on the enhanced gas concentration data, while eliminating redundancy and dimensional differences between features, the main information of the data is preserved, which greatly reduces the computational resource consumption of subsequent machine learning models and provides the models with feature inputs that are clearer in structure and have higher discriminative power.

[0012] As a preferred embodiment of the machine learning-based power distribution cabinet fault diagnosis method described in this invention, the steps of training a machine learning model using reduced-dimensional gas concentration data as input and enhanced fault type labels as output to obtain a machine learning diagnostic model include: The machine learning model uses a support vector machine, and the kernel function of the support vector machine is determined. The reduced-dimensional gas concentration data and enhanced fault type labels were divided into training and testing sets. A machine learning diagnostic model is obtained by training a support vector machine on a training set and evaluating the model's performance on a test set.

[0013] As a preferred embodiment of the machine learning-based power distribution cabinet fault diagnosis method described in this invention, the steps of collecting gas concentration data in the current environment and performing dimensionality reduction to obtain real-time dimensionality-reduced data, and generating power distribution cabinet fault diagnosis results through a machine learning diagnostic model include: Collect gas concentration data under the current environment to obtain real-time gas concentration data; Dimensionality reduction is performed on real-time gas concentration data to obtain real-time dimensionality-reduced data; Real-time dimensionality-reduced data is input into a machine learning diagnostic model to generate fault diagnosis results for the power distribution cabinet.

[0014] As a preferred embodiment of the machine learning-based power distribution cabinet fault diagnosis method described in this invention, the formula for calculating the sampling probability of normalized gas concentration data and normalized fault type labels is: ; in, For sampling probability, For the i-th sample Security level, For the j-th sample The security level.

[0015] This invention provides a power distribution cabinet fault diagnosis system based on machine learning.

[0016] To address the aforementioned technical problems, the present invention further provides the following technical solution: a machine learning-based power distribution cabinet fault diagnosis system, comprising: Data acquisition module: Collects initial gas concentration data and corresponding initial fault type labels inside the distribution cabinet; Preprocessing module: Performs data augmentation on the initial gas concentration data and the corresponding initial fault type labels to obtain augmented gas concentration data and augmented fault type labels; Data dimensionality reduction module: Performs principal component analysis on enhanced gas concentration data and performs dimensionality reduction to obtain dimensionality-reduced gas concentration data; Model training module: Using reduced-dimensional gas concentration data as input and enhanced fault type labels as output, a machine learning model is trained to obtain a machine learning diagnostic model; Fault diagnosis module: Collects gas concentration data in the current environment and performs dimensionality reduction to obtain real-time dimensionality-reduced data. Then, it generates fault diagnosis results for the power distribution cabinet through a machine learning diagnostic model.

[0017] The present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the aforementioned machine learning-based power distribution cabinet fault diagnosis method.

[0018] The present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the aforementioned machine learning-based power distribution cabinet fault diagnosis method.

[0019] The beneficial effects of this invention are as follows: This invention simultaneously enhances the initial gas concentration data and the corresponding fault type labels, performs weighted sampling based on the safety level of the samples, and interpolates to generate new samples within densely populated safety regions of the same type of samples. This avoids the noise problem at category boundaries in traditional interpolation methods, thus improving the quality and balance of training data. By performing principal component analysis and dimensionality reduction on the enhanced gas concentration data, redundancy and dimensional differences between features are eliminated while retaining the main information of the data. This significantly reduces the computational resource consumption of subsequent machine learning models and provides the models with more clearly structured and more discriminative feature inputs, thereby improving the diagnostic accuracy of the models. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 The above is a flowchart of a machine learning-based fault diagnosis method for power distribution cabinets, provided as an embodiment of the present invention.

[0022] Figure 2 The present invention provides a logic block diagram of a machine learning-based fault diagnosis method for power distribution cabinets according to an embodiment of the present invention. Detailed Implementation

[0023] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0024] Example 1, referring to Figure 1 This is the first embodiment of the present invention, which provides a machine learning-based method for diagnosing faults in power distribution cabinets, including: S100: Collects initial gas concentration data and corresponding initial fault type labels inside the distribution cabinet; S200: Perform data augmentation on the initial gas concentration data and the corresponding initial fault type labels to obtain augmented gas concentration data and augmented fault type labels; S300: Perform principal component analysis and dimensionality reduction on the enhanced gas concentration data to obtain dimensionality-reduced gas concentration data; S400: Using reduced-dimensional gas concentration data as input and enhanced fault type labels as output, a machine learning model is trained to obtain a machine learning diagnostic model; S500: Collects gas concentration data in the current environment and performs dimensionality reduction to obtain real-time dimensionality-reduced data. Then, it generates fault diagnosis results for the power distribution cabinet through a machine learning diagnostic model.

[0025] It should be noted that the stability and reliability of distribution cabinet operation are directly related to power grid safety and power supply quality for users. However, existing distribution cabinet fault diagnosis methods, facing the problem of limited data samples, directly use interpolation for data augmentation. But the blind interpolation characteristic generates noise samples at class boundaries, which reduces model performance. At the same time, directly inputting multidimensional gas concentration data into machine learning models makes it difficult to effectively handle the complex relationships between features, resulting in low diagnostic accuracy and consuming a lot of computing resources. Therefore, accurate fault diagnosis of distribution cabinets is very important for the stable operation of the power system. Therefore, to address the aforementioned problems in the fault diagnosis of distribution cabinets, a machine learning-based fault diagnosis method for distribution cabinets is constructed through steps S100~S500. This method simultaneously enhances the initial gas concentration data and corresponding fault type labels, performs weighted sampling based on the safety level of the samples, and interpolates new samples within densely populated safety regions of the same type of samples. This avoids the noise problem at category boundaries inherent in traditional interpolation methods, improving the quality and balance of the training data. Furthermore, by performing principal component analysis and dimensionality reduction on the enhanced gas concentration data, redundancy and dimensional differences between features are eliminated while retaining the main information of the data. This significantly reduces the computational resource consumption of subsequent machine learning models and provides the models with more clearly structured and discriminative feature inputs, thereby improving the diagnostic accuracy of the model.

[0026] Example 2, refer to Figure 1 and Figure 2 This is the second embodiment of the present invention, which provides a method for fault diagnosis of power distribution cabinets based on machine learning.

[0027] In this embodiment of the application, step S100, which involves collecting the initial gas concentration data inside the distribution cabinet and the corresponding initial fault type label, includes the following steps A1-A3: A1: Initial gas concentration data is generated by collecting gas concentration data inside the distribution cabinet over a set time period using a gas sensor array; In this embodiment of the application, a gas sensor array installed inside the power distribution cabinet collects gas concentration data of hydrogen, carbon monoxide, methane, acetylene, and oxygen over the past month, outputs these gas concentration data as initial gas concentration data, and records the gas concentration sampling time. A2: Obtain the fault types that occurred in the power distribution cabinet within a set time period and generate initial fault type labels; In this embodiment of the application, within a set time period, the actual fault events that have occurred in the power distribution cabinet are obtained through the on-site inspection reports of operation and maintenance personnel, equipment maintenance logs or system alarm records. For each fault, its specific fault type is identified, such as corrosion, high temperature overheating and partial discharge. When the corresponding fault occurs, it is encoded as 1, and when the corresponding fault does not occur, it is encoded as 0. The data is then arranged and output as initial gas concentration data in a preset order, and the time of the fault occurrence is recorded. A3: Align the initial gas concentration data with the initial fault type label based on time.

[0028] In this embodiment of the application, based on the time of the fault occurrence, the initial gas concentration data corresponding to the gas concentration sampling time closest to the time of the fault occurrence is selected, and the initial gas concentration data is matched with the initial fault type label corresponding to the time of the fault occurrence. The initial gas concentration data in each sample is matched with the corresponding initial fault type label.

[0029] In this embodiment of the application, step S200, which involves data augmentation of the initial gas concentration data and the corresponding initial fault type label to obtain augmented gas concentration data and augmented fault type label, includes the following steps B1-B4: B1: Normalize the initial gas concentration data and the corresponding initial fault type label to a set range to obtain normalized gas concentration data and normalized fault type label; In this embodiment of the application, the set interval is (0.9, 1.1), and the normalization formula is: ; in, The normalized value. These are the original eigenvalues. The minimum value of the current feature across all samples. The maximum value of the current feature across all samples; Normalized gas concentration data is generated based on the initial gas concentration data using a normalization formula, and normalized fault type labels are generated based on the initial fault type labels using a normalization formula. If the maximum hydrogen concentration sampled is 900 ppm and the minimum is 50 ppm, and the hydrogen concentration sampled in a certain instance is 600 ppm, the normalized value obtained by substituting the data with a hydrogen concentration of 600 ppm into the normalization formula is 1.03.

[0030] In one alternative implementation, the initial gas concentration data and the corresponding initial fault type label can also be normalized using Z-score standardization. This involves subtracting the mean of the feature from the original data and then dividing by the standard deviation of that feature to normalize the initial gas concentration data and the corresponding initial fault type label. This method can eliminate differences in the dimensions and mean of the data, making different features have the same statistical distribution. It is suitable for algorithms that are sensitive to data distribution, such as support vector machines and logistic regression.

[0031] In another alternative implementation, the normalization of the initial gas concentration data and the corresponding initial fault type label can also be achieved through nonlinear normalization. For cases with a large range of gas concentrations, the original data is first logarithmically transformed to compress the large value range of the data. Then, the data after logarithmic transformation is linearly normalized within a set range to achieve the normalization of the initial gas concentration data and the corresponding initial fault type label. This method makes the originally unevenly distributed and extremely wide-range gas concentration data more uniform and improves the model's sensitivity to low-concentration features.

[0032] B2: Calculate the sampling probability of normalized gas concentration data and normalized fault type labels; In this embodiment of the application, the formula for calculating the sampling probability is: ; in, Let N be the sampling probability, and N be the total number of samples. For the i-th sample Security level, For the j-th sample Security level; The formula for calculating the security level is as follows: ; in, The number of samples belonging to the same fault type among the k nearest neighbors, where k is a preset nearest neighbor reference value; It should be noted that by calculating the safety level, we can identify which samples are relatively safe. In this way, we can prioritize these safe samples as seeds to generate augmented data during the subsequent data augmentation process, avoiding the generation of new samples at dangerous category boundaries. The calculation ensures that samples with high safety levels have a higher probability of being selected, while samples with low safety levels have an extremely low probability of being selected, or even zero. This unequal probability sampling method ensures that the newly generated synthetic samples are mainly concentrated in areas with dense samples of the same type, avoiding the problem of generating noisy data at the boundaries and improving the quality of subsequent training data.

[0033] In one alternative implementation, the sampling probability can also be calculated by the proportion of fault types. The number of samples of each fault type in the normalized gas concentration data and normalized fault type labels is counted, the proportion of each fault type is calculated, the sampling probability of the corresponding sample is increased for fault types with low proportions, and decreased for fault types with high proportions. The sampling probability is set to be inversely proportional to the proportion, and the sampling probability is obtained by normalizing the probability of all samples.

[0034] In another optional implementation, the sampling probability can also be calculated by gas concentration anomaly calculation. An anomaly index is defined, such as calculating the Euclidean distance between each sample and the mean gas concentration under normal operating conditions. The larger the distance, the higher the anomaly. For example, for hydrogen concentration, the normal mean is 50 ppm. If a sample has a hydrogen concentration of 300 ppm, its Euclidean distance from the mean is 250. Another normal sample has a hydrogen concentration of 60 ppm, and its Euclidean distance from the mean is 10. The anomaly is normalized and used as the basis for calculating the sampling probability. The ratio of the anomaly of the current sample to the sum of the anomalies of all samples is the sampling probability.

[0035] B3: Sample normalized gas concentration data and normalized fault type labels based on sampling probability and generate interpolated gas concentration data and interpolated fault type labels; In this embodiment of the application, the interpolation formula for generating interpolated gas concentration data and interpolated fault type labels is as follows: ; in, For the generated new sample feature vector, The feature vector of the benchmark sample is extracted according to the sampling probability calculated in step B2. for The feature vector of the neighboring samples, The dynamic difference coefficient is determined by the security level of the feature vector of the reference sample and the security level of the feature vector of the neighboring samples. The formula for determining the dynamic difference coefficient is: in, The security level of the neighbor sample feature vector. The security level of the feature vector of the benchmark sample. This is the scaling factor, which can typically be set to 0.2. This represents a random number that is uniformly distributed within the interval (−0.15, 0.15). The baseline sample feature vector is extracted from the normalized gas concentration data and normalized fault types according to the sampling probability, and interpolated gas concentration data and interpolated fault type labels are generated by calculation according to the interpolation formula. It should be noted that the interpolation formula generates entirely new synthetic samples located between two known samples of the same type from two known samples of the same type, thereby achieving data augmentation, increasing the size of the dataset, and ensuring that the feature values ​​of the new samples are within a reasonable range. The calculation formula of the dynamic difference coefficient increases the diversity of the new samples and avoids all generated samples falling strictly on the line connecting two known samples of the same type, making the distribution of the generated data more reasonable.

[0036] B4: Merge the interpolated gas concentration data with the initial gas concentration data to obtain the enhanced gas concentration data, and merge the interpolated fault type label with the initial fault type label to obtain the enhanced fault type label.

[0037] In this embodiment, the interpolated gas concentration data and interpolated fault type labels generated by steps B1 to B3 are merged with the initial gas concentration data to obtain enhanced gas concentration data, resulting in enhanced gas concentration data and enhanced fault type labels with a larger dataset. This not only solves the problem of insufficient data samples, but also prevents the characteristics of blind interpolation from generating noisy samples at the class boundaries, thus reducing model performance.

[0038] In this embodiment of the application, step S300, which involves performing principal component analysis and dimensionality reduction on the enhanced gas concentration data to obtain dimensionality-reduced gas concentration data, includes the following steps C1-C4: C1: Standardize the enhanced gas concentration data and calculate the covariance matrix; In this embodiment, the formula for standardizing the enhanced gas concentration data is: ; in, These are the standardized eigenvalues. These are the eigenvalues ​​before standardization. The mean of the current eigenvalues. The standard deviation of the current eigenvalue; Each feature value in the enhanced gas concentration data is standardized using a standardization formula to obtain standardized feature values, and then the standardized feature values ​​are combined to generate a standardized data matrix. The formula for calculating the covariance matrix is: ; in, To create a standardized data matrix from the enhanced gas concentration data, For the sample size, It is the covariance matrix; It should be noted that by calculating the covariance matrix, the linear correlation between different gas characteristics can be quantified. By analyzing the covariance matrix, the inherent correlation between the concentrations of each gas during a fault can be discovered, providing a data basis for subsequent principal component analysis.

[0039] C2: Decompose the covariance matrix to obtain eigenvalues ​​and eigenvectors; In this embodiment of the application, the formula for decomposing the covariance matrix is ​​as follows: ; in, These are the eigenvalues ​​of the covariance matrix. Larger eigenvalues ​​indicate greater variation in the data along that direction, and thus contain more information. The eigenvectors of the covariance matrix are defined by a new coordinate axis, which is the principal component. These coordinate axes are orthogonal to each other and are sorted according to the magnitude of their corresponding eigenvalues. By performing eigenvalue decomposition on the covariance matrix, six eigenvalues ​​and six corresponding eigenvectors can be obtained.

[0040] C3: Sort the eigenvectors in descending order based on their eigenvalues, and select the eigenvectors with a set eigenvalue threshold to construct the projection matrix; In this embodiment of the application, the feature threshold is set to 3. The enhanced gas concentration data is decomposed into six feature values ​​and six corresponding feature vectors through steps C1 to C2. The six feature vectors are arranged in descending order according to the six feature values ​​obtained in step C2. The first three feature vectors are selected as column vectors and arranged in order to form a 6x3 projection matrix. C4: Calculate the reduced-dimensional gas concentration data based on the projection matrix.

[0041] In this embodiment of the application, the formula for calculating the dimensionality reduction gas concentration data is: ; in, For dimension reduction of gas concentration data, For the projection matrix, For standardized data matrices; The standardized data matrix calculated in step C1 Substitute the projection matrix obtained in step C3 into the formula for calculating the reduced-dimensional gas concentration data to obtain the reduced-dimensional gas concentration data. It should be noted that each row in the reduced-dimensional gas concentration data represents a sample, which now contains only three values. These three values ​​are the coordinates of the sample on the three principal components. Principal component analysis compresses the high-dimensional and potentially redundant six-dimensional gas concentration data into three dimensions. This not only reduces computational complexity and memory consumption but also preserves the most important variance information in the data.

[0042] In one alternative implementation, dimensionality reduction of enhanced gas concentration data can also be achieved through linear discriminant analysis. The mean vector of each class of samples is calculated, and then the intra-class divergence matrix and the inter-class divergence matrix are constructed. By solving the eigenvalues ​​and eigenvectors of the product of the intra-class divergence matrix and the inter-class divergence matrix, the eigenvectors corresponding to the two largest eigenvalues ​​are selected to construct the projection matrix. Then, the standardized gas concentration data is multiplied by the projection matrix to obtain the dimensionality-reduced gas concentration data.

[0043] In another alternative implementation, dimensionality reduction of the enhanced gas concentration data can also be achieved through an autoencoder. A neural network containing an input layer, a hidden layer, and an output layer is constructed. The dimension of the input layer is the number of gas features, the dimension of the hidden layer is the target number of dimensionality reduction features, and the dimension of the output layer is the same as that of the input layer. The enhanced gas concentration data is used as training samples, and the reconstruction error between the input and output is minimized so that the output of the hidden layer is the dimensionality-reduced data, thereby obtaining the dimensionality-reduced gas concentration data.

[0044] In this embodiment of the application, step S400, which uses reduced-dimensional gas concentration data as input and enhanced fault type labels as output to train a machine learning model to obtain a machine learning diagnostic model, includes the following steps D1-D2: D1: The machine learning model uses a support vector machine, and the kernel function of the support vector machine is determined; In this embodiment, the machine learning model uses a support vector machine (SVM) as the core classification algorithm. Considering that the gas concentration data after dimensionality reduction may exhibit non-linear separability in three-dimensional space, a radial basis function (RBF) is selected as the kernel function of the SVM to improve the model's expressive power. The formula for the RBF is: ; in, These are kernel function parameters used to control the range of influence of a single sample on the classification boundary. For the sample and samples The kernel function value between the two samples indicates that the larger the kernel function value, the closer and more similar the two samples are in the high-dimensional feature space. The support vector machine calculates the decision boundary based on the kernel function value. For the sample and samples The square of the Euclidean distance between them; It should be noted that by using the radial basis function as the kernel function of the support vector machine, the three-dimensional data points are mapped to a higher-dimensional space through an implicit mapping, making the originally entangled data points linearly separable. This allows the support vector machine to find an optimal hyperplane to distinguish between the three types of faults: corrosion, overheating, and partial discharge.

[0045] In one alternative implementation, the machine learning model can also use a support vector machine, but the kernel function is implemented using a polynomial kernel function. Taking the fault diagnosis of a power distribution cabinet as an example, in the dimensionality-reduced three-dimensional gas concentration data, the features of high-temperature overheating and partial discharge faults may be separable by low-order polynomials. After mapping the data to a third-order polynomial space, the high-temperature overheating and partial discharge samples that were originally entangled in the three-dimensional space become linearly separable in the high-dimensional polynomial space. The support vector machine diagnoses the power distribution cabinet fault through the classification boundary learned by the polynomial kernel function.

[0046] In another alternative implementation, the machine learning model can also be implemented using a random forest model. For fault diagnosis of the distribution cabinet, the dimensionality-reduced gas concentration data is directly input into the random forest model. Each decision tree randomly selects some gas features and samples for training, constructing a random forest containing 100 decision trees, with the maximum depth of each tree set to 5. During the training process, the decision trees will learn the association rules between gas concentration and whether a fault has occurred, thereby realizing the diagnosis of faults in the distribution cabinet.

[0047] D2: Divide the reduced gas concentration data and enhanced fault type labels into training and test sets. Train the support vector machine using the training set and evaluate the model's performance using the test set to obtain a machine learning diagnostic model.

[0048] In this embodiment, the reduced gas concentration data and enhanced fault type labels are randomly divided into a training set and a test set in a ratio of 8:2. The training set is used for training and hyperparameter optimization of the support vector machine, and the test set is used to evaluate the final performance of the trained support vector machine in the fault diagnosis of the distribution cabinet after the support vector machine training is completed. In this embodiment of the application, the accuracy of the support vector machine after training is calculated using the test set. If the accuracy is greater than 90%, the current trained support vector machine is retained for power distribution cabinet fault diagnosis. If the accuracy is less than or equal to 90%, data is reacquired and the support vector machine is trained again.

[0049] In this embodiment of the application, step S500 involves collecting gas concentration data under the current environment and performing dimensionality reduction to obtain real-time dimensionality-reduced data. Generating the power distribution cabinet fault diagnosis result through a machine learning diagnostic model includes the following steps E1-E2: E1: Collect gas concentration data in the current environment to obtain real-time gas concentration data; In this embodiment of the application, every 5 minutes, the gas concentration data of hydrogen, carbon monoxide, methane, acetylene, and oxygen inside the power distribution cabinet are collected by a gas sensor array installed inside the power distribution cabinet, and the gas concentration data of hydrogen, carbon monoxide, methane, acetylene, and oxygen are output as real-time gas concentration data. E2: Dimensionally reduce the real-time gas concentration data to obtain real-time dimensionality-reduced data, and input the real-time dimensionality-reduced data into the machine learning diagnostic model to generate the power distribution cabinet fault diagnosis results; In this embodiment, the real-time gas concentration data collected in step E1 is subjected to principal component analysis and dimensionality reduction in step S300 to obtain real-time dimensionality-reduced data. The real-time dimensionality-reduced data is then input into the support vector machine trained in step S400. The support vector machine will predict the fault status of the power distribution cabinet based on the decision boundary learned internally and the real-time dimensionality-reduced data, and output whether corrosion, overheating, and partial discharge have occurred. At the same time, it can generate corresponding early warning information based on the output of the support vector machine regarding whether corrosion, overheating, and partial discharge have occurred, thereby realizing the diagnosis and early warning of power distribution cabinet faults.

[0050] Example 3, referring to Figure 1 This is the third embodiment of the present invention, which provides a machine learning-based power distribution cabinet fault diagnosis system, including: Data acquisition module: Collects initial gas concentration data and corresponding initial fault type labels inside the distribution cabinet; Preprocessing module: Performs data augmentation on the initial gas concentration data and the corresponding initial fault type labels to obtain augmented gas concentration data and augmented fault type labels; Data dimensionality reduction module: Performs principal component analysis on enhanced gas concentration data and performs dimensionality reduction to obtain dimensionality-reduced gas concentration data; Model training module: Using reduced-dimensional gas concentration data as input and enhanced fault type labels as output, a machine learning model is trained to obtain a machine learning diagnostic model; Fault diagnosis module: Collects gas concentration data in the current environment and performs dimensionality reduction to obtain real-time dimensionality-reduced data. Then, it generates fault diagnosis results for the power distribution cabinet through a machine learning diagnostic model.

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

[0052] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0053] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0054] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0055] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not 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 solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A machine learning-based power distribution cabinet fault diagnosis method, characterized in that, The application relates to a power distribution cabinet fault diagnosis method and device. Collect initial gas concentration data and corresponding initial fault type labels in a power distribution cabinet; Data augmentation is performed on the initial gas concentration data and the corresponding initial fault type labels to obtain augmented gas concentration data and augmented fault type labels; Principal component analysis is performed on the augmented gas concentration data, and dimensionality reduction is performed to obtain reduced gas concentration data; A machine learning model is trained with the reduced gas concentration data as input and the augmented fault type labels as output to obtain a machine learning diagnosis model; Collect gas concentration data under the current environment and perform dimensionality reduction to obtain real-time reduced data, and generate a power distribution cabinet fault diagnosis result through the machine learning diagnosis model.

2. The machine learning based power distribution cabinet fault diagnosis method of claim 1, wherein, The step of collecting initial gas concentration data and corresponding initial fault type labels in a power distribution cabinet includes: Collecting gas concentration data in the power distribution cabinet for a set period of time through a gas sensor array to generate initial gas concentration data; Obtaining the fault type of the power distribution cabinet in a set period of time to generate initial fault type labels; Aligning the initial gas concentration data and the initial fault type labels according to time.

3. The machine learning based power distribution cabinet fault diagnosis method of claim 2, wherein, The step of performing data augmentation on the initial gas concentration data and the corresponding initial fault type labels to obtain augmented gas concentration data and augmented fault type labels includes: Normalizing the initial gas concentration data and the corresponding initial fault type labels to a set interval to obtain normalized gas concentration data and normalized fault type labels; Calculating the sampling probability of the normalized gas concentration data and the normalized fault type labels; Sampling the normalized gas concentration data and the normalized fault type labels according to the sampling probability and generating interpolated gas concentration data and interpolated fault type labels; Merging the interpolated gas concentration data and the initial gas concentration data to obtain augmented gas concentration data, and merging the interpolated fault type labels and the initial fault type labels to obtain augmented fault type labels.

4. The machine learning based power distribution cabinet fault diagnosis method of claim 3, wherein, The step of performing principal component analysis on the augmented gas concentration data and performing dimensionality reduction to obtain reduced gas concentration data includes: Standardizing the augmented gas concentration data and calculating a covariance matrix; Decomposing the covariance matrix to obtain eigenvalues and eigenvectors; Arranging the eigenvectors in descending order according to the eigenvalues, and selecting eigenvectors of a set characteristic threshold to construct a projection matrix; Calculating the reduced gas concentration data according to the projection matrix.

5. The machine learning based power distribution cabinet fault diagnosis method of claim 4, wherein, The step of training a machine learning model with the reduced gas concentration data as input and the augmented fault type labels as output to obtain a machine learning diagnosis model includes: Using a support vector machine as the machine learning model, and determining the kernel function of the support vector machine; Dividing the reduced gas concentration data and the augmented fault type labels into a training set and a test set; Training the support vector machine through the training set and evaluating the performance of the model through the test set to obtain the machine learning diagnosis model.

6. The machine learning based power distribution cabinet fault diagnosis method of claim 5, wherein, The step of collecting gas concentration data under the current environment and performing dimensionality reduction to obtain real-time reduced data, and generating a power distribution cabinet fault diagnosis result through the machine learning diagnosis model includes: Collecting gas concentration data under the current environment to obtain real-time gas concentration data; Performing dimensionality reduction on the real-time gas concentration data to obtain real-time reduced data; Inputting the real-time reduced data into the machine learning diagnosis model to generate a power distribution cabinet fault diagnosis result.

7. The machine learning based power distribution cabinet fault diagnosis method of claim 3, wherein, The formula for calculating the normalized gas concentration data and the sampling probability of the normalized fault type label is: ; wherein, is the sampling probability, is the security level of the i-th sample, is the security level of the i-th sample, is the security level of the j-th sample, is the security level of the j-th sample.

8. A machine learning based power distribution cabinet fault diagnosis system, applying a machine learning based power distribution cabinet fault diagnosis method according to any one of claims 1-7, characterized in that, Comprise: A data acquisition module: acquire initial gas concentration data and corresponding initial fault type labels inside the power distribution cabinet; A preprocessing module: data augmentation is performed on the initial gas concentration data and the corresponding initial fault type labels to obtain augmented gas concentration data and augmented fault type labels; A data dimension reduction module: principal component analysis is performed on the augmented gas concentration data and dimension reduction is performed to obtain reduced gas concentration data; A model training module: a machine learning model is trained with the reduced gas concentration data as input and the augmented fault type labels as output to obtain a machine learning diagnosis model; A fault diagnosis module: gas concentration data under the current environment is collected and dimension reduced to obtain real-time reduced data, and a power distribution cabinet fault diagnosis result is generated through the machine learning diagnosis model. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to realize the steps of the power distribution cabinet fault diagnosis method based on machine learning in any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the power distribution cabinet fault diagnosis method based on machine learning in any one of claims 1 to 7.