Transformer fault gas data processing method, device and equipment

The DBO-SVM, DBO-K-means and DBO-RF algorithms process the transformer fault gas data, which solves the problem of detection of global and local outliers in traditional methods, and realizes high-precision data cleaning and missing value filling, meeting the data quality requirements of the smart grid.

CN120470352APending Publication Date: 2025-08-12INFORMATION & COMM CO OF STATE GRID SHAANXI ELECTRIC POWER CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510527807.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

In the state monitoring of transformer, traditional data cleaning methods are difficult to effectively handle global and local outliers in transformer fault gas data, resulting in insufficient detection accuracy.

Method used

The DBO-SVM algorithm is used to detect and eliminate global outliers, the DBO-K-means algorithm is used to detect and eliminate local outliers, and the missing values are filled through the DBO-RF algorithm to form a cleaned transformer fault gas data set.

Benefits of technology

It improves the global abnormality detection accuracy, enhances the local abnormal pattern recognition ability, and improves the physical rationality of missing data repair, meeting the real-time and consistency requirements of smart grids for data quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120470352A_ABST
    Figure CN120470352A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a transformer fault gas data processing method, device and equipment, and the method comprises the steps: carrying out the standardization processing of an obtained original transformer fault gas data set, and obtaining a standardized transformer fault gas data set; through a preset DBO-SVM algorithm, global abnormal values in the standardized transformer fault gas data set are detected and eliminated, and a transformer fault gas data set after the global abnormal values are eliminated is obtained; through a preset DBO-K-means algorithm, local abnormal values in the transformer fault gas data set after the global abnormal values are removed are detected and removed, and a transformer fault gas data set after the local abnormal values are removed is obtained; and through a preset DBO-RF algorithm, carrying out missing value filling on rejected data in the transformer fault gas data set after the global abnormal value is rejected and the transformer fault gas data set after the local abnormal value is rejected, and obtaining a cleaned transformer fault gas data set.
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 system data preprocessing, and in particular to, but not limited to, a method, device and equipment for processing transformer fault gas data. Background Art

[0002] In the field of transformer condition monitoring, traditional data cleaning methods have significant technical bottlenecks when dealing with the complex characteristics of fault gas data. Current methods mainly rely on manual experience rules (such as the three-ratio method threshold determination) and basic statistical analysis. In terms of outlier detection and repair, traditional methods cannot effectively handle the complex situations of global outliers and local outliers. Traditional data cleaning methods mostly rely on manually set rules or simple statistical analysis, but these methods often have difficulty coping with large-scale, high-dimensional and complex data. Especially in terms of outlier detection and repair, traditional methods cannot effectively handle the complex situations of global outliers and local outliers. Global outliers refer to points that are significantly different from the normal pattern in the entire data set, while local outliers are points that are dissimilar to other points in a specific data cluster. Existing methods often cannot take into account both global and local characteristics when dealing with these two types of outliers, resulting in insufficient detection accuracy. Summary of the Invention

[0003] In order to solve the above technical problems existing in the prior art, the present invention provides a method, device and equipment for processing transformer fault gas data.

[0004] The technical method of the embodiment of the present invention is implemented as follows:

[0005] In a first aspect, an embodiment of the present invention provides a method for processing transformer fault gas data, the method comprising:

[0006] The obtained original transformer fault gas dataset is standardized to obtain a standardized transformer fault gas dataset;

[0007] By using a preset DBO-SVM algorithm, global outliers in the standardized transformer fault gas data set are detected and removed to obtain a transformer fault gas data set after removing global outliers;

[0008] By using a preset DBO-K-means algorithm, local outliers in the transformer fault gas dataset after removing global outliers are detected and removed, thereby obtaining a transformer fault gas dataset after removing local outliers;

[0009] By using a preset DBO-RF algorithm, missing values are filled in the eliminated data in the transformer fault gas dataset after eliminating global outliers and the transformer fault gas dataset after eliminating local outliers, so as to obtain a cleaned transformer fault gas dataset.

[0010] In a second aspect, an embodiment of the present invention provides a transformer fault gas data processing device, the device comprising:

[0011] A standardization module is used to perform standardization processing on the original transformer fault gas dataset to obtain a standardized transformer fault gas dataset;

[0012] A first elimination module is used to detect and eliminate global outliers in the standardized transformer fault gas data set by using a preset DBO-SVM algorithm to obtain a transformer fault gas data set after eliminating global outliers;

[0013] A second elimination module is used to detect and eliminate local outliers in the transformer fault gas data set after eliminating global outliers by using a preset DBO-K-means algorithm to obtain a transformer fault gas data set after eliminating local outliers;

[0014] The filling module is used to fill missing values in the transformer fault gas dataset after removing global outliers and the transformer fault gas dataset after removing local outliers by using a preset DBO-RF algorithm to obtain a cleaned transformer fault gas dataset.

[0015] In some embodiments, the standardization module is further used to perform missing value detection on the original transformer fault gas dataset; if a missing value exists, the current missing value is filled with the previous valid value to obtain a filled transformer fault gas dataset; and the filled transformer fault gas dataset is standardized by a Z-score function to obtain the standardized transformer fault gas dataset.

[0016] In some embodiments, the first elimination module is further used to define the first number of cluster centers based on the multiple fault states corresponding to the standardized transformer fault gas data set, set the first target number of iterations and the first characteristic number, and obtain the first initial population number of the DBO algorithm; construct a first objective function, select the first dung beetle optimal position, that is, the penalty coefficient and kernel function parameter of the SVM algorithm; the first objective function is: f1 = -Accuracy validation (X i ), where f1 represents the fitness function of SVM, Accuracy validation Represents the classification accuracy, X iRepresenting the sample value of the standardized transformer fault gas dataset; based on the preset parameter update strategy, adjusting the initial parameters in the SVM algorithm to obtain the first parameter; the preset parameter update strategy includes simulating the position of the rolling dung beetle, simulating the position of the egg-laying dung beetle, simulating the position of the foraging dung beetle and simulating the position of the stealing dung beetle; the first parameter refers to the adjusted initial parameter; calculating the DBO population fitness value in the iterative update, adjusting the updated DBO population position and the minimum population fitness value to the first parameter, and checking whether the adjusted first parameter meets the preset termination condition; if the preset termination condition is met, terminating the iteration and outputting the global optimal position of the DBO population; if the preset termination condition is not met, repeating the iteration until the optimal parameter of the SVM algorithm is obtained; training the initial SVM model based on the adjusted first parameter, and calculating the calculated distance from each sample in the initial SVM model to the decision boundary; if the calculated distance is less than the first preset distance threshold, determining that the sample is an outlier, and eliminating the outlier to obtain the transformer fault gas dataset after eliminating the global outlier.

[0017] In some embodiments, the second elimination module is further used to define the second number of cluster centers based on the multiple fault states corresponding to the transformer fault gas data set after eliminating the global outliers, set the second target number of iterations and the second characteristic number, and obtain the second initial population number of the DBO algorithm; construct a second objective function, select the optimal position of the first dung beetle, that is, the initial cluster center of the K-means clustering algorithm; the second objective function is: Among them, f2 represents the fitness value, dist(y i -c j ) represents the data point y of the transformer fault gas after removing the global outliers i To cluster center c j Euclidean distance; based on the preset parameter update strategy, adjust the initial cluster center in the K-means clustering algorithm; calculate the iterative update DBO population fitness value, adjust the initial cluster center based on the updated DBO population position and the minimum population fitness value, and detect whether the adjusted initial cluster center meets the preset termination condition; if the preset termination condition is met, terminate the iteration and output the global optimal position of the DBO population; if the preset termination condition is not met, repeat the iteration until the optimal cluster center of the K-means clustering algorithm is obtained; use the global optimal position of the DBO algorithm as the optimal cluster center of the K-means clustering algorithm, and divide each data in the transformer fault gas data set after removing the global outliers into the category corresponding to the nearest cluster center through a first preset formula; the first preset formula is: Calculate the cluster distance from each data point in the transformer fault gas dataset after removing global outliers to the corresponding cluster center; determine whether the cluster distance is greater than a second preset distance threshold; if the cluster distance is greater than the second preset distance threshold, determine that the data point is an outlier point, and remove the outlier point to obtain the transformer fault gas dataset after removing local outliers.

[0018] In some embodiments, the filling module is further used to determine the population size, variable optimization dimension, third target iteration number, and upper and lower limits of parameter optimization based on the transformer fault gas dataset after removing local outliers; and initialize the random forest model parameters; construct a third objective function, and select the third dung beetle optimal position, that is, the minimum number of leaves and decision numbers of the random forest model; the third objective function is: Among them, z i represents the true value of the missing value in the transformer fault gas dataset after removing local outliers, and z' represents the predicted value of the corresponding missing value; based on the preset parameter updating strategy, the minimum number of leaves and the number of decision trees in the random forest model are adjusted; the DBO population fitness value in the iterative update is calculated, and the updated DBO population position and the minimum population fitness value are adjusted to the minimum number of leaves and the number of decision trees, and it is checked whether the adjusted minimum number of leaves and the number of decision trees meet the preset termination condition; if the preset termination condition is met, the iteration is terminated and the global optimal position of the DBO population is output; if the preset termination condition is not met, the iteration is repeated until the minimum number of leaves and the number of decision trees in the random forest model are obtained; the best minimum number of leaves and the number of decision trees after the optimization iteration are used to set the random forest parameters, and the missing values in the transformer fault gas dataset after removing global outliers and the transformer fault gas dataset after removing local outliers are completed using DBO-RF to obtain the cleaned transformer fault gas dataset.

[0019] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory for storing executable instructions; and a processor for implementing the above-mentioned transformer fault gas data processing method when executing the executable instructions stored in the memory.

[0020] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing executable instructions for causing a processor to execute the executable instructions to implement the above-mentioned transformer fault gas data processing method.

[0021] The transformer fault gas data processing method, device and equipment provided by the embodiments of the present invention first perform standardization processing on the obtained original transformer fault gas data set to obtain a standardized transformer fault gas data set; then, using a preset DBO-SVM algorithm, global outliers in the standardized transformer fault gas data set are detected and eliminated to obtain a transformer fault gas data set after eliminating the global outliers; secondly, using a preset DBO-K-means algorithm, local outliers in the transformer fault gas data set after eliminating the global outliers are detected and eliminated to obtain a transformer fault gas data set after eliminating the local outliers; finally, using a preset DBO-RF algorithm, missing values are filled in for the eliminated data in the transformer fault gas data set after eliminating the global outliers and the transformer fault gas data set after eliminating the local outliers to obtain a cleaned transformer fault gas data set. In this way, the present invention can utilize the global search capability and fast convergence characteristics of DBO to dynamically optimize the kernel function parameters and penalty coefficients of SVM, thereby improving the accuracy of global anomaly detection; at the same time, it optimizes the initialization process of the K-means cluster center and enhances the ability to recognize local anomaly patterns; in addition, DBO also synchronously optimizes the decision tree size and leaf node constraints of the random forest to improve the physical rationality of missing data repair. In other words, the method provided by the present invention breaks through the technical bottlenecks of traditional algorithm parameter solidification and the difficulty of multimodal anomaly coupling detection. It can simultaneously process global and local anomaly data, and can maintain the mechanism correlation between gas components, meeting the strict requirements of smart grids for real-time and consistency of data quality, and providing a reliable data foundation for equipment fault warning. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 1 is a schematic structural diagram of a transformer fault gas data processing system provided by an embodiment of the present invention;

[0023] Figure 2 This is a flow chart of a method for processing transformer fault gas data provided by an embodiment of the present invention;

[0024] Figure 3 This is a flow chart of a multi-mode machine learning data preprocessing method for power data provided by an embodiment of the present invention;

[0025] Figure 4 This is a graph showing the global outlier detection results of the DBO-SVM algorithm provided by an embodiment of the present invention;

[0026] Figure 5 This is a graph showing the local outlier detection results of the DBO-K-means algorithm provided by an embodiment of the present invention;

[0027] Figure 64 is a graph showing the missing value filling results of the DBO-RF algorithm provided by an embodiment of the present invention;

[0028] Figure 7 1 is a schematic diagram of the structure of a transformer fault gas data processing device provided by an embodiment of the present invention;

[0029] Figure 8 The figure is a schematic diagram of the structure of a transformer fault gas data processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0031] In the following description, references to "some embodiments" describe a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. Unless otherwise defined, all technical and scientific terms used in the embodiments of the present invention have the same meaning as commonly understood by those skilled in the art to which the embodiments of the present invention pertain. The terms used in the embodiments of the present invention are for the purpose of describing the embodiments of the present invention only and are not intended to limit the present invention.

[0032] The following describes exemplary applications of the transformer fault gas data processing device according to an embodiment of the present invention. The transformer fault gas data processing device provided by the embodiment of the present invention can be implemented as a terminal or a server. In one implementation, the transformer fault gas data processing device provided by the embodiment of the present invention can be implemented as various types of terminals, such as laptops, tablet computers, desktop computers, and mobile devices. In another implementation, the transformer fault gas data processing device provided by the embodiment of the present invention can also be implemented as a server. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal and server can be connected directly or indirectly via wired or wireless communication, which is not limited in the embodiments of the present invention. The following describes exemplary applications of the transformer fault gas data processing device implemented as a server.

[0033] See also Figure 1 , Figure 1 Figure 1 is a schematic diagram of the structure of a transformer fault gas data processing system 10 provided in an embodiment of the present invention. To process outliers in a raw transformer fault gas data set, the embodiment of the present invention provides a transformer fault gas data processing platform, which can be implemented as a transformer fault gas data processing application. The transformer fault gas data processing system 10 provided in an embodiment of the present invention includes a terminal 110, a network 120, and a server 130. Server 130 is a server for the transformer fault gas data processing application. Server 130 can constitute the transformer fault gas data processing device of an embodiment of the present invention. Terminal 110 is connected to server 130 via network 120, which can be a wide area network (WAN), a local area network (LAN), or a combination of the two.

[0034] In some embodiments, please refer to Figure 1 During transformer fault gas data processing, terminal 110 transmits the original transformer fault gas dataset to server 130 via network 120. Server 130 receives the original transformer fault gas dataset from terminal 110 and normalizes the dataset to obtain a standardized transformer fault gas dataset. A preset DBO-SVM algorithm is used to detect and remove global outliers from the standardized transformer fault gas dataset to obtain a transformer fault gas dataset after removing global outliers. A preset DBO-K-means algorithm is used to detect and remove local outliers from the transformer fault gas dataset after removing global outliers to obtain a transformer fault gas dataset after removing local outliers. A preset DBO-RF algorithm is used to fill missing values in the transformer fault gas dataset after removing global outliers and the transformer fault gas dataset after removing local outliers to obtain a cleaned transformer fault gas dataset. After obtaining the cleaned transformer fault gas dataset, server 130 transmits the cleaned transformer fault gas dataset to terminal 110 via network 120.

[0035] The transformer fault gas data processing method provided in the embodiments of the present invention can also be implemented on a cloud platform and through cloud technology. For example, the server 130 can be a cloud server. The cloud server processes the original transformer fault gas data set to obtain a cleaned transformer fault gas data set.

[0036] It's important to note that cloud technology refers to a managed technology that unifies hardware, software, and network resources within a wide or local area network (WAN) to enable data computing, storage, processing, and sharing. Cloud technology is a general term for network, information technology, integration technology, management platform technology, and application technology, all based on the cloud computing business model. It can form a resource pool for on-demand, flexible, and convenient use. Cloud computing technology will become a crucial support. Backend services for technical network systems, such as those for video sites, image sites, and more portals, require significant computing and storage resources. With the rapid development and application of the internet industry, every item will likely have its own unique identifier, requiring transmission to backend systems for logical processing. Data of varying levels will be processed separately, and data from all industries will require robust system support, which can only be achieved through cloud computing.

[0037] The embodiment of the present invention provides a method for processing transformer fault gas data. Figure 2 , Figure 2 This is a flow chart of a method for processing transformer fault gas data provided by an embodiment of the present invention, which is combined with Figure 2 The steps shown are explained.

[0038] Step S210 , performing standardization processing on the obtained original transformer fault gas dataset to obtain a standardized transformer fault gas dataset.

[0039] It should be noted that when a transformer experiences an internal fault during operation, insulating materials (such as transformer oil and insulating paper) can produce various gases due to thermal and electrical decomposition, such as hydrogen (H2), methane (CH4), ethane (C2H6), ethylene (C2H4), and acetylene (C2H2). Collecting and organizing the content data of these fault gases detected at different times and for different transformers, along with the corresponding transformer status information (such as fault status and fault type), creates a transformer fault gas dataset. This dataset forms the foundation for subsequent fault diagnosis and data analysis.

[0040] In this paper, different features in the original transformer fault gas dataset may have different dimensions and value ranges, which can affect the effectiveness of subsequent data analysis and model training. Normalization can uniformly scale the feature values in the dataset, ensuring that different features have the same scale range, eliminating the impact of different dimensions and orders of magnitude, and helping to improve the convergence speed and stability of the model.

[0041] Step S220 , detecting and removing global outliers in the standardized transformer fault gas dataset using a preset DBO-SVM algorithm, to obtain a transformer fault gas dataset after removing global outliers.

[0042] In some embodiments, global outliers refer to data that significantly deviates from other data points in the entire dataset. These data points have values that significantly differ from the overall distribution characteristics of the dataset, potentially due to measurement error, equipment failure, data entry errors, and other factors. For example, in a normal transformer fault gas content dataset, if the hydrogen content of a particular data point suddenly increases by several orders of magnitude compared to other data points, this data point may be a global outlier. For another example, in a normal transformer fault gas content dataset, if the hydrogen content of a particular data point suddenly decreases by several orders of magnitude compared to other data points, this data point may be a global outlier.

[0043] In some embodiments, SVM can construct a hyperplane to separate normal and abnormal data during outlier detection. DBO improves SVM performance when processing transformer fault gas data, achieving faster convergence and higher detection accuracy. The DBO-SVM algorithm dynamically adjusts the support vector machine's boundaries. The synergistic effect of the two effectively and accurately identifies global outliers in a dataset and removes them, reducing their impact on subsequent analysis.

[0044] Step S230 , detecting and removing local outliers in the transformer fault gas dataset after removing global outliers by using a preset DBO-K-means algorithm, to obtain the transformer fault gas dataset after removing local outliers.

[0045] In some embodiments, local outliers are relative to local regions of data. Some data points may not appear to be clearly outliers in the entire dataset, but within the surrounding local area, their values significantly deviate from the normal distribution of that local area compared to adjacent data points. For example, during a specific transformer operation phase, the fault gas content data at several consecutive time points form a local distribution pattern, and one data point significantly deviates from this local pattern; this data point is a local outlier.

[0046] In this paper, DBO improves the K-means algorithm by introducing dynamic boundary optimization technology on top of the K-means algorithm. The synergistic effect of the two can effectively improve the accuracy and stability of clustering. The DBO-K-means algorithm can dynamically adjust the cluster boundaries, which can more effectively identify and remove local outliers in the data set.

[0047] Step S240 , using a preset DBO-RF algorithm, fills missing values in the transformer fault gas dataset after removing global outliers and the transformer fault gas dataset after removing local outliers to obtain a cleaned transformer fault gas dataset.

[0048] In some embodiments, during the data collection process, due to various reasons (such as sensor failure, data transmission interruption, etc.), some data items in the dataset may be missing. These missing data are called missing values. The presence of missing values can affect the accuracy of subsequent data analysis and model training, so they need to be filled.

[0049] In the present invention, the DBO-RF algorithm is a random forest algorithm combined with dynamic boundary optimization technology. In missing value filling, the algorithm can use other information in the data set to predict missing values, thereby filling the missing data.

[0050] The transformer fault gas data processing method, device and equipment provided by the embodiments of the present invention first perform standardization processing on the obtained original transformer fault gas data set to obtain a standardized transformer fault gas data set; then, using a preset DBO-SVM algorithm, global outliers in the standardized transformer fault gas data set are detected and eliminated to obtain a transformer fault gas data set after eliminating the global outliers; secondly, using a preset DBO-K-means algorithm, local outliers in the transformer fault gas data set after eliminating the global outliers are detected and eliminated to obtain a transformer fault gas data set after eliminating the local outliers; finally, using a preset DBO-RF algorithm, missing values are filled in for the eliminated data in the transformer fault gas data set after eliminating the global outliers and the transformer fault gas data set after eliminating the local outliers to obtain a cleaned transformer fault gas data set. In this way, the present invention can utilize the global search capability and fast convergence characteristics of DBO to dynamically optimize the kernel function parameters and penalty coefficients of SVM, thereby improving the accuracy of global anomaly detection; at the same time, it optimizes the initialization process of the K-means cluster center and enhances the ability to recognize local anomaly patterns; in addition, DBO also synchronously optimizes the decision tree size and leaf node constraints of the random forest to improve the physical rationality of missing data repair. In other words, the method provided by the present invention breaks through the technical bottlenecks of traditional algorithm parameter solidification and the difficulty of multimodal anomaly coupling detection. It can simultaneously process global and local anomaly data, and can maintain the mechanism correlation between gas components, meeting the strict requirements of smart grids for real-time and consistency of data quality, and providing a reliable data foundation for equipment fault warning.

[0051] In some embodiments, the above step S210 can be implemented by the following steps S211 to S213:

[0052] Step S211: performing missing value detection on the original transformer fault gas dataset.

[0053] Step S212: If there is a missing value, the previous valid value is used to fill the current missing value to obtain a filled transformer fault gas data set.

[0054] Step S213 , performing standardization processing on the padded transformer fault gas dataset using a Z-score function to obtain the standardized transformer fault gas dataset.

[0055] In some embodiments, the above step S220 can be implemented by the following steps S221 to S226:

[0056] Step S221 , based on the multiple fault states corresponding to the standardized transformer fault gas data set, defines the first number of cluster centers, sets the first target number of iterations and the first feature number, and obtains the first initial population number of the DBO algorithm.

[0057] Step S222: construct a first objective function and select the first optimal position of the dung beetle, that is, the penalty coefficient and kernel function parameters of the SVM algorithm.

[0058] Here, the first objective function is: f1 = -Accuracy validation (X i ), where f1 represents the fitness function of SVM, Accuracy validation Represents the classification accuracy, X i Represents the sample values of the normalized transformer fault gas dataset.

[0059] Step S223, based on a preset parameter update strategy, adjust the initial parameters in the SVM algorithm to obtain a first parameter; the preset parameter update strategy includes simulating the position of a rolling dung beetle, simulating the position of an egg-laying dung beetle, simulating the position of a foraging dung beetle, and simulating the position of a stealing dung beetle; the first parameter refers to the adjusted initial parameter.

[0060] Step S224, calculate the DBO population fitness value in the iterative update, adjust the updated DBO population position and the minimum population fitness value by the first parameter, and check whether the adjusted first parameter meets the preset termination condition; if the preset termination condition is met, terminate the iteration and output the global optimal position of the DBO population; if the preset termination condition is not met, repeat the iteration until the optimal parameters of the SVM algorithm are obtained.

[0061] Step S225 : training an initial SVM model based on the adjusted first parameter, and calculating a distance from each sample in the initial SVM model to the decision boundary.

[0062] Step S226: If the calculated distance is less than a first preset distance threshold, the sample is determined to be an outlier, and the outlier is removed to obtain the transformer fault gas dataset after removing the global outliers.

[0063] In some embodiments, the above step S230 can be implemented by the following steps S231 to S238:

[0064] Step S231, based on the multiple fault states corresponding to the transformer fault gas data set after removing global outliers, define the second number of cluster centers, set the second target number of iterations and the second feature number, and obtain the second initial population number of the DBO algorithm.

[0065] Step S232: construct a second objective function and select the optimal position of the first dung beetle, that is, the initial cluster center of the K-means clustering algorithm.

[0066] Here, the second objective function is: Among them, f2 represents the fitness value, dist(y i -c j ) represents the data point y of the transformer fault gas after removing the global outliers i To cluster center c j The Euclidean distance.

[0067] Step S233: Based on the preset parameter update strategy, adjust the initial cluster center in the K-means clustering algorithm.

[0068] Step S234 , calculating and iteratively updating the DBO population fitness value, adjusting the initial cluster center based on the updated DBO population position and the minimum population fitness value, and detecting whether the adjusted initial cluster center meets the preset termination condition.

[0069] Step S235: If the preset termination condition is met, the iteration is terminated and the global optimal position of the DBO population is output; if the preset termination condition is not met, the iteration is repeated until the optimal cluster center of the K-means clustering algorithm is obtained.

[0070] Step S236: The global optimal position of the DBO algorithm is used as the optimal cluster center of the K-means clustering algorithm, and each data in the transformer fault gas data set after removing the global outliers is divided into the category corresponding to the nearest cluster center according to a first preset formula; the first preset formula is:

[0071] Step S237 , calculating the cluster distance from each data point in the transformer fault gas data set after removing global outliers to the corresponding cluster center.

[0072] Step S238, determining whether the cluster distance is greater than a second preset distance threshold; if the cluster distance is greater than the second preset distance threshold, determining that the data point is an outlier point, and removing the outlier point to obtain the transformer fault gas data set after removing the local outliers.

[0073] In some embodiments, the above step S240 can be implemented by the following steps S241 to S245:

[0074] Step S241, based on the transformer fault gas dataset after removing local outliers, determine the population size, variable optimization dimension, third target iteration number, and parameter optimization upper and lower limits; and initialize the random forest model parameters.

[0075] Step S242: construct a third objective function and select the third optimal position of the dung beetle, that is, the minimum number of leaves and decision numbers of the random forest model.

[0076] Here, the third objective function is: Among them, z i represents the true value of the missing value in the transformer fault gas dataset after removing local outliers, and z' represents the predicted value of the corresponding missing value.

[0077] Step S243: Based on the preset parameter update strategy, adjust the minimum number of leaves and the number of decision trees in the random forest model.

[0078] Step S244, calculate the DBO population fitness value in the iterative update, adjust the updated DBO population position and the minimum population fitness value to the minimum number of leaves and the number of decision trees, and check whether the adjusted minimum number of leaves and the number of decision trees meet the preset termination conditions; if the preset termination conditions are met, terminate the iteration and output the global optimal position of the DBO population; if the preset termination conditions are not met, repeat the iteration until the minimum number of leaves and the number of decision trees in the random forest model are obtained.

[0079] In step S245, the optimal minimum number of leaves and the number of decision trees after the optimization iteration are used to set random forest parameters, and DBO-RF is used to fill in the missing values in the transformer fault gas dataset after removing global outliers and the transformer fault gas dataset after removing local outliers to obtain the cleaned transformer fault gas dataset.

[0080] The following describes an exemplary application of an embodiment of the present invention in a practical application scenario.

[0081] The technical solution adopted by the present invention is to perform standardization and other processing on the power data Data1 to obtain Data2, use DBO to optimize the parameters nu and gamma of the SVM algorithm, and use the obtained DBO-SVM to detect and eliminate the global outliers of Data2 to obtain Data3. Use DBO to optimize the initial clustering center of the K-means algorithm, and then use the DBO-K-means algorithm to detect and eliminate local outliers of Data3 to obtain Data4. Use DBO to optimize the minimum number of leaves and the number of decision trees of the RF algorithm, and then use the DBO-RF algorithm to fill in the missing data to obtain Data5. In this way, the missing values, local outliers and global outliers in the power data can be identified and data repaired.

[0082] The present invention provides a multi-mode machine learning data preprocessing method for power data, such as Figure 3 As shown, please follow the steps below:

[0083] Step 1: preprocess the power system data Data1, including standardization and dimensionality reduction of the data set. The preprocessed data is recorded as Data2.

[0084] Here, the transformer fault gas dataset is selected for the power dataset simulation experiment, including the gas concentration datasets of H2, CH4, C2H4, C2H6, and C2H2 during transformer fault.

[0085] Step 2: Use the DBO-SVM algorithm to detect global outliers in the power data Data2. The input data here is the standardized power data Data2. The present invention optimizes the nu and gamma parameters of the SVM algorithm using the DBO optimization algorithm to obtain the optimal parameters of the SVM to detect and eliminate global outliers, obtaining data Data3.

[0086] In step 3, the DBO-K-means algorithm is used to detect local outliers in the power data Data3. The input data here is Data3 after the DBO-SVM algorithm has been used to detect and remove global outliers. The DBO algorithm is used to optimize the initial cluster centers of the K-means algorithm and detect and remove local outliers, resulting in Data4.

[0087] Step 4: Use the DBO-RF algorithm to fill in missing values after removal from the power data. The input data here is Data3 after global outliers have been detected and removed using the DBO-SVM and DBO-K-means algorithms, and Data4 after local outliers have been removed. The DBO algorithm is used to optimize the number of decision trees and the minimum number of leaves in the RF model to fill in missing values in the power data sets Data3 and Data4.

[0088] The above step 1 can also be achieved by the following:

[0089] First, the transformer fault gas dataset is tested to see if there are any missing values. If there are any missing values, they are filled with the previous valid value. Then, the filled transformer fault gas dataset is standardized using the Z-score function as shown in Formula (1) so that the mean of each feature is 0 and the variance is 1.

[0090]

[0091] In formula (1), X1 is the original data, μ is the mean, and σ is the standard deviation.

[0092] The present invention uses the original transformer fault gas data set as 5-dimensional data. Therefore, the standardized transformer fault gas data set is subjected to PCA dimensionality reduction processing as shown in formula (2), and the data is mapped to two principal components.

[0093] Y = X2·W (2);

[0094] In formula (2), X2 is the standardized transformer fault gas dataset, W is the PCA change matrix, and Y is the data after dimensionality reduction.

[0095] In step 2, the nu and gamma values of the SVM algorithm are used as the objectives of the DBO optimization algorithm. The SVM parameters are optimized by simulating the behavior of dung beetles in their search for an optimal habitat. Each dung beetle represents a candidate solution, and the fitness of the solution is calculated to evaluate its quality.

[0096] The above step 2 can also be achieved by the following steps:

[0097] In step 2.1, according to the seven different fault states corresponding to the transformer fault data set, the number of cluster centers k = 7 is defined, the maximum number of iterations is set to 20, and the number of features is set to 5. At the same time, the initial population number of the DBO optimization algorithm is obtained through experiments.

[0098] Step 2.2: Establish the objective function of the predicted value and the true value of the power data set, calculate the fitness value according to formula (3), and select the optimal position of the dung beetle, that is, the penalty coefficient and kernel function parameters of the SVM algorithm.

[0099] f1=-Accuracy validation (X i ) (3);

[0100] In formula (3), f1 represents the fitness function of SVM, Accuracy validation Represents the classification accuracy, X i Represents the sample value of the dataset Data2.

[0101] In step 2.3, by simulating the updated positions of dung beetles, the number of split features and sample types of the power data set are selected for the power data set. The penalty coefficient and kernel function parameters of the SVM algorithm are selected using Equations (4) and (5) for the rolling dung beetle position, Equation (7) for the egg-laying dung beetle position, Equation (9) for the foraging dung beetle position, and Equation (10) for the stealing dung beetle position. The fitness value is calculated according to Equation (3).

[0102] The dung beetle's rolling ball behavior affects the global search capability, that is, the effect of sample type and sample characteristics in the power data set. The original DBO easily misses the global optimal solution in a straight-line rolling manner. Therefore, the golden sine algorithm is used to narrow the solution space by traversing all values of the sine function. After adding adaptive weights, the penalty coefficient and kernel function parameters in the SVM algorithm can be expressed as;

[0103] x i (t+1)=(1-ω)x i (t)|sin(r1)|-ωr2sin(r1)|c1x b -c2x i (t)| (4)

[0104] In formula (4), t represents the current number of iterations, x i (t) represents the position information of the i-th group of parameters at the t-th iteration of the dataset Data2, x i (t+1) represents the position information of the i-th group of parameters at the t+1th iteration of the dataset Data2, and c1 represents the golden ratio constant. c2 represents the golden ratio constant x b represents the global optimal solution, ω is a nonlinear weight, r1 and r2 are random numbers in [0, 2π], representing the individual moving distance and position update direction respectively, and b∈(0, 1) represents a constant.

[0105] When analyzing different types of data in the dataset Data2, we can imitate the dancing dung beetle when the data type cannot be identified. The penalty coefficient and kernel function parameters in the SVM algorithm can be updated as follows:

[0106] x i (t+1)=x i(t)+tan(θ)|x i (t)-x i (t-1)| (5);

[0107] In formula (5), θ∈(0,π), when θ=0, The position will not be updated during π.

[0108] When faced with different types of data such as voltage and current in the dataset Data2, deviations may occur as the number of iterations increases. When the deviation value R ≤ 0.3, consider setting boundary conditions to simulate the egg-laying dung beetles. The penalty coefficient and kernel function parameters in the SVM algorithm can be updated as follows:

[0109]

[0110] In formula (6), X * is the current local optimal position, Lb * and Ub * are the lower and upper bounds of the parameters, Lb and Ub are the lower and upper bounds of the optimization problem, R = 1-t / T, and T is the maximum number of iterations.

[0111] As the iterations proceed, the positions of the SVM parameters are constantly updated, as shown in formula (7):

[0112] B i (t+1)=X * +b1×(B i (t)-Lb * )+(B i (t)-Ub * ) (7);

[0113] In formula (7), B i (t) represents the position of the i-th group of parameters in the previous step at the t-th iteration, b1 is a 1×D random vector, and D represents the dimension of the optimization problem.

[0114] When the measured data of the dataset Data2 is affected by external natural factors, when the simulated light intensity changes Δx=|x i(t) -x w When |≥0.3, foraging dung beetles were simulated and the SVM parameter region was set based on formula (8).

[0115]

[0116] In formula (8), X b is the global optimal position, Lb b and Ub b are the lower and upper bounds of the parameter.

[0117] The SVM parameters are shown in formula (9):

[0118] X i (t+1)=X i (t)+C1×(X i (t)-Lb b )+C2×(X i (t)-Ub b ) (9);

[0119] In formula (9), C1∈(0,1) and obeys the normal distribution, C2∈(0,1) is a 1×D random vector.

[0120] The data in the power data set are highly correlated. When the substation bus voltage data deviates, it will also affect the bus current data. When the sample deviation coefficient s ≥ 1, the original DBO algorithm focuses on perturbations at the global optimal position in the process of simulating the stealing dung beetle, which easily leads to premature convergence. Therefore, the stealing behavior is improved based on the piecewise function form, and the perturbation amplitude is constrained by the sin function. The SVM parameter update is shown in formula (10):

[0121]

[0122] In formula (10), g represents a 1×D random vector that obeys the normal distribution; S represents a constant value, and sinz is a decreasing function from 1 to 0.5, so that the maximum amplitude of the disturbance decreases with the increase of the number of iterations.

[0123] In step 2.4, calculate the fitness value of the DBO population during the iterative update. Adjust the penalty coefficient and kernel function parameters based on the updated DBO population position and the minimum population fitness value. Check whether the termination condition is met. The termination condition is set by setting the number of iterations. If the current number of iterations reaches the maximum number of iterations, the iteration is terminated and the global optimal position of the DBO population is output; otherwise, repeat step 2.3 to finally obtain the penalty coefficient and kernel function parameters for the SVM algorithm.

[0124] Step 2.5: Use the optimized parameters to train the SVM model and calculate the distance d from each sample to the decision boundary. i If the distance satisfies the following conditions and is less than the threshold T, it is determined to be an outlier as shown in formula (11), and these outliers are eliminated to obtain data Data3.

[0125] d i =|SVM.DecisionFunction(xi)|≤T (11);

[0126] In formula (11), d i =|SVM.DecisionFunction(xi)|≤T represents the decision function of SVM, and T is the set threshold.

[0127] The above step 3 can also be achieved by the following steps:

[0128] In step 3.1, according to the seven different fault states corresponding to the dataset Data3, the number of cluster centers k is defined as 7, the maximum number of iterations is set to 20, and the number of features is set to 5. At the same time, the initial population number of the DBO optimization algorithm is obtained through experiments.

[0129] In step 3.2, the objective function of the predicted value and the true value of the power data set is established, and the fitness value is calculated according to formula (12), and the optimal position of the dung beetle is selected, which is the initial cluster center of the K-means clustering algorithm.

[0130]

[0131] In formula (12), f2 represents the fitness value, dist(y i -c j ) represents the data point y of the dataset Data3 i To cluster center c j The Euclidean distance.

[0132] In step 3.3, by simulating the updated positions of dung beetles and using equations (4) and (5) for the rolling dung beetle positions, equation (7) for the egg-laying dung beetle positions, equation (9) for the foraging dung beetle positions, and equation (10) for the stealing dung beetle positions, the initial cluster center parameters are selected for the K-means algorithm, and the corresponding fitness values are calculated according to equation (12).

[0133] In step 3.4, calculate the fitness value of the DBO population during the iterative update, adjust the updated DBO population position and the minimum population fitness value to the initial cluster center of the K-means clustering algorithm, and check whether the termination condition is met. The termination condition is set by setting the number of iterations. If the current number of iterations reaches the maximum number of iterations, the iteration is terminated and the global optimal position of the DBO population is output; otherwise, repeat step 3.3 to obtain the initial cluster center of the K-means clustering algorithm.

[0134] In step 3.5, the position output by the DBO optimization algorithm is used as the initial cluster center of the K-means clustering algorithm. Each data in the data set is divided into the category corresponding to the nearest cluster center using formula (13).

[0135]

[0136] In step 3.6, for each power data point in Data3, the distance to the cluster center is calculated to determine whether the distance is greater than the set distance threshold. If it is greater than the threshold, it is determined to be an outlier point, otherwise it is a normal point, and the data set Data4 is obtained.

[0137] The above step 4 can also be achieved by the following steps:

[0138] In step 4.1, according to the dataset Data4, the proportion of producers in the population is set to 0.3, and the number of producer populations is calculated to be 10. The maximum number of iterations is set to 20, the dimension of the optimization variable is 2, the upper limits of the optimization parameters are 10 and 5, and the lower limits of the optimization parameters are 200 and 50 respectively. The parameters of the random forest model are initialized. The optimal solution for the dung beetle location is a two-dimensional space composed of the number of decision trees and the upper and lower limits of the minimum number of leaves. The optimal solution is the specific location information of the dung beetle.

[0139] In step 4.2, the objective function of the predicted value and the true value of the power data set is established, and the fitness value is calculated according to formula (14) to select the optimal position of the dung beetle, that is, the minimum number of leaves and the number of decision trees of the random forest model.

[0140]

[0141] In formula (14), f3 represents the objective function, z i represents the true value of the missing value in the dataset Data4, and z′ represents the predicted value of the corresponding missing value.

[0142] In step 4.3, by simulating the updated positions of dung beetles, the number of split features and sample types of the power data set are selected for the power data set. The minimum number of leaves and the number of decision trees are selected for the random forest model using equations (4) and (5) for the rolling dung beetle position, equation (7) for the egg-laying dung beetle position, equation (9) for the foraging dung beetle position, and equation (10) for the stealing dung beetle position. The corresponding fitness value is calculated according to equation (14).

[0143] In step 4.4, calculate the fitness value of the DBO population during the iterative update. Adjust the penalty coefficient and kernel function parameters based on the updated DBO population position and the minimum population fitness value. Check whether the termination condition is met, which is set by the number of iterations. If the current number of iterations reaches the maximum number of iterations, terminate the iteration and output the global optimal position of the DBO population. Otherwise, repeat step 4.3 to finally obtain the number of decision trees and the minimum number of leaves in the RF model.

[0144] In step 4.5, the best result value after the optimization iteration is used to set the random forest parameters, and the missing values are filled using DBO-RF. Among the key framework parameters of the random forest model, the minimum number of leaves in the decision tree is selected by the Gini index. The calculation formula of the Gini coefficient is shown in formula (15). The optimal parameters in step 4.4 are substituted into K.

[0145]

[0146] In formula (15), X3 represents the sample training set, k represents the number of split features of the power data set, and p k Represents the probability of each feature appearing in the power data set.

[0147] Bring the optimal parameters of step 4.4 into N, obtain the comprehensive prediction results through formula (16), and obtain the data set.

[0148]

[0149] In formula (16), is the comprehensive prediction result, and N is the number of decisions.

[0150] Table 1 Detailed information of the dataset used

[0151] Dataset name Number of samples included Number of sample attributes Number of clusters Fault status Transformer fault data 516 5 7 7

[0152] The abnormal data in this test are divided into global outliers, local outliers, and missing values. The specific settings of the abnormal data are as follows: global outliers account for 20% of the total outliers, local outliers account for 70% of the total outliers, and missing values account for 10% of the total outliers.

[0153] Figure 4 The DBO-SVM algorithm is the global outlier detection result diagram. By dividing the outliers of power data into global outliers and local outliers, the global outliers of power data are detected by DBO-SVM. Figure 4 As shown, delete it to get Data3.

[0154] Table 2 Comparison of DBO-K-means clustering results

[0155] algorithm Clustering time Emax E-average E standard deviation K-means 1.4079 95.5197 23.4473 35.8680 DBO-K-means 0.3591 57.6609 22.3696 22.0234

[0156] In Table 2, E is the Euclidean distance from a data point in the dataset to the corresponding cluster center. A smaller value of E indicates a better clustering effect. Comparing the two algorithms, we can see that the K-means clustering algorithm optimized by the DBO algorithm has a better clustering effect than the K-means algorithm.

[0157] Figure 5 This is the result of the local outlier detection using the DBO-K-means algorithm. The local outliers of the power data are detected using DBO-K-means. Figure 5 As shown, delete it to get Data4.

[0158] Figure 6 This is the DBO-RF algorithm to fill the missing value results. DBO-RF is used to complete the power data set after removing outliers to obtain Data5.

[0159] Figure 7 FIG. 1 is a schematic diagram of the structure of a transformer fault gas data processing device provided by an embodiment of the present invention. Figure 7 As shown, the transformer fault gas data processing device 700 includes: a standardization module 701, which is used to standardize the obtained original transformer fault gas data set to obtain a standardized transformer fault gas data set; a first elimination module 702, which is used to detect and eliminate global outliers in the standardized transformer fault gas data set using a preset DBO-SVM algorithm to obtain a transformer fault gas data set after eliminating global outliers; a second elimination module 703, which is used to detect and eliminate local outliers in the transformer fault gas data set after eliminating global outliers using a preset DBO-K-means algorithm to obtain a transformer fault gas data set after eliminating local outliers; and a filling module 704, which is used to fill missing values in the transformer fault gas data set after eliminating global outliers and the transformer fault gas data set after eliminating local outliers using a preset DBO-RF algorithm to obtain a cleaned transformer fault gas data set.

[0160] In some embodiments, the standardization module 701 is further used to perform missing value detection on the original transformer fault gas dataset; if a missing value exists, the current missing value is filled with the previous valid value to obtain a filled transformer fault gas dataset; and the filled transformer fault gas dataset is standardized by a Z-score function to obtain the standardized transformer fault gas dataset.

[0161] In some embodiments, the first elimination module 702 is further used to define the first number of cluster centers based on the multiple fault states corresponding to the standardized transformer fault gas data set, set the first target number of iterations and the first feature number, and obtain the first initial population number of the DBO algorithm; construct a first objective function, select the first dung beetle optimal position, that is, the penalty coefficient and kernel function parameter of the SVM algorithm; the first objective function is: f1 = -Accuracy validation (X i ), where f1 represents the fitness function of SVM, Accuracy validation Represents the classification accuracy, X iRepresenting the sample value of the standardized transformer fault gas dataset; based on the preset parameter update strategy, adjusting the initial parameters in the SVM algorithm to obtain the first parameter; the preset parameter update strategy includes simulating the position of the rolling dung beetle, simulating the position of the egg-laying dung beetle, simulating the position of the foraging dung beetle and simulating the position of the stealing dung beetle; the first parameter refers to the adjusted initial parameter; calculating the DBO population fitness value in the iterative update, adjusting the updated DBO population position and the minimum population fitness value to the first parameter, and checking whether the adjusted first parameter meets the preset termination condition; if the preset termination condition is met, terminating the iteration and outputting the global optimal position of the DBO population; if the preset termination condition is not met, repeating the iteration until the optimal parameter of the SVM algorithm is obtained; training the initial SVM model based on the adjusted first parameter, and calculating the calculated distance from each sample in the initial SVM model to the decision boundary; if the calculated distance is less than the first preset distance threshold, determining that the sample is an outlier, and eliminating the outlier to obtain the transformer fault gas dataset after eliminating the global outlier.

[0162] In some embodiments, the second elimination module 703 is further configured to define the second number of cluster centers based on the multiple fault states corresponding to the transformer fault gas dataset after eliminating global outliers, set a second target number of iterations and a second characteristic number, and obtain a second initial population number of the DBO algorithm; construct a second objective function, and select the optimal position of the first dung beetle, i.e., the initial cluster center of the K-means clustering algorithm; the second objective function is: Among them, f2 represents the fitness value, dist(y i -c j ) represents the data point y of the transformer fault gas after removing the global outliers i To cluster center c j Euclidean distance; based on the preset parameter update strategy, adjust the initial cluster center in the K-means clustering algorithm; calculate the iterative update DBO population fitness value, adjust the initial cluster center based on the updated DBO population position and the minimum population fitness value, and detect whether the adjusted initial cluster center meets the preset termination condition; if the preset termination condition is met, terminate the iteration and output the global optimal position of the DBO population; if the preset termination condition is not met, repeat the iteration until the optimal cluster center of the K-means clustering algorithm is obtained; use the global optimal position of the DBO algorithm as the optimal cluster center of the K-means clustering algorithm, and divide each data in the transformer fault gas data set after removing the global outliers into the category corresponding to the nearest cluster center through the first preset formula; the first preset formula is: Calculate the cluster distance from each data point in the transformer fault gas dataset after removing global outliers to the corresponding cluster center; determine whether the cluster distance is greater than a second preset distance threshold; if the cluster distance is greater than the second preset distance threshold, determine that the data point is an outlier point, and remove the outlier point to obtain the transformer fault gas dataset after removing local outliers.

[0163] In some embodiments, the filling module 704 is further used to determine the population size, variable optimization dimension, third target iteration number, and upper and lower limits of parameter optimization based on the transformer fault gas dataset after removing local outliers; initialize the random forest model parameters; construct a third objective function, and select the third dung beetle optimal position, that is, the minimum number of leaves and decision numbers of the random forest model; the third objective function is: Among them, z i represents the true value of the missing value in the transformer fault gas dataset after removing local outliers, and z' represents the predicted value of the corresponding missing value; based on the preset parameter updating strategy, the minimum number of leaves and the number of decision trees in the random forest model are adjusted; the DBO population fitness value in the iterative update is calculated, and the updated DBO population position and the minimum population fitness value are adjusted to the minimum number of leaves and the number of decision trees, and it is checked whether the adjusted minimum number of leaves and the number of decision trees meet the preset termination condition; if the preset termination condition is met, the iteration is terminated and the global optimal position of the DBO population is output; if the preset termination condition is not met, the iteration is repeated until the minimum number of leaves and the number of decision trees in the random forest model are obtained; the best minimum number of leaves and the number of decision trees after the optimization iteration are used to set the random forest parameters, and the missing values in the transformer fault gas dataset after removing global outliers and the transformer fault gas dataset after removing local outliers are completed using DBO-RF to obtain the cleaned transformer fault gas dataset.

[0164] It should be noted that the description of the device embodiment of the present invention is similar to the description of the above-mentioned method embodiment, and has similar beneficial effects as the same method embodiment, so it will not be repeated. For technical details not disclosed in the device embodiment, please refer to the description of the method embodiment of the present invention for understanding.

[0165] It should be noted that, in the embodiments of the present invention, if the above-mentioned transformer fault gas data processing method is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present invention, or the part that contributes to the relevant technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a terminal to execute all or part of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a magnetic disk, or an optical disk. Thus, the embodiments of the present invention are not limited to any specific combination of hardware and software.

[0166] Correspondingly, an embodiment of the present invention provides a transformer fault gas data processing device, Figure 8 FIG. 1 is a schematic diagram of the structure of a transformer fault gas data processing device provided by an embodiment of the present invention. Figure 8 As shown, the transformer fault gas data processing device 800 includes at least: a processor 801 and a computer-readable storage medium 802 configured to store executable instructions. Processor 801 generally controls the overall operation of the wind power data cleaning device. Computer-readable storage medium 802 is configured to store instructions and applications executable by processor 801 and can also cache data to be processed or processed by processor 801 and various modules in transformer fault gas data processing device 1000. This can be implemented using flash memory (FLASH) or random access memory (RAM).

[0167] An embodiment of the present invention provides a storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will be caused to execute the method provided by the embodiment of the present invention, for example, Figure 2 The method shown.

[0168] In some embodiments, the storage medium can be a computer-readable storage medium, such as a ferroelectric random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); it can also be various devices including one or any combination of the above memories.

[0169] In some embodiments, executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0170] As examples, executable instructions may, but need not necessarily, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as one or more scripts in a Hypertext Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions). As examples, executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located in one location, or on multiple electronic devices distributed across multiple locations and interconnected by a communication network.

[0171] The above description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present invention are included in the scope of protection of the present invention.

[0172] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention. The serial numbers of the above-mentioned embodiments of the present invention are for description only and do not represent the advantages and disadvantages of the embodiments.

[0173] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of further restrictions, an element defined by the statement "comprises a..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed.

[0174] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for processing transformer fault gas data, characterized in that: The method comprises: The obtained original transformer fault gas dataset is standardized to obtain a standardized transformer fault gas dataset; By using a preset DBO-SVM algorithm, global outliers in the standardized transformer fault gas data set are detected and removed to obtain a transformer fault gas data set after removing global outliers; By using a preset DBO-K-means algorithm, local outliers in the transformer fault gas dataset after removing global outliers are detected and removed, thereby obtaining a transformer fault gas dataset after removing local outliers; By using a preset DBO-RF algorithm, missing values are filled in the eliminated data in the transformer fault gas dataset after eliminating global outliers and the transformer fault gas dataset after eliminating local outliers, so as to obtain a cleaned transformer fault gas dataset.

2. The method according to claim 1, characterized in that The step of performing standardization processing on the original transformer fault gas dataset to obtain a standardized transformer fault gas dataset includes: Performing missing value detection on the original transformer fault gas dataset; If there is a missing value, the previous valid value is used to fill the current missing value to obtain the filled transformer fault gas dataset; The padded transformer fault gas dataset is standardized using a Z-score function to obtain the standardized transformer fault gas dataset.

3. The method according to claim 1, characterized in that The method detects and removes global outliers in the standardized transformer fault gas dataset by using a preset DBO-SVM algorithm to obtain a transformer fault gas dataset after removing global outliers, including: Based on the multiple fault states corresponding to the standardized transformer fault gas data set, defining the first number of cluster centers, setting the first target number of iterations and the first feature number, and obtaining the first initial population number of the DBO algorithm; Construct the first objective function and select the first optimal position of the dung beetle, that is, the penalty coefficient and kernel function parameters of the SVM algorithm; the first objective function is: f1 = -Accuracy validation (X i ), where f1 represents the fitness function of SVM, Accuracy validation Represents the classification accuracy, X i represents the sample value of the standardized transformer fault gas dataset; Based on a preset parameter update strategy, adjusting the initial parameters in the SVM algorithm to obtain a first parameter; the preset parameter update strategy includes simulating the position of a ball-rolling dung beetle, simulating the position of an egg-laying dung beetle, simulating the position of a foraging dung beetle, and simulating the position of a stealing dung beetle; the first parameter refers to the adjusted initial parameter; Calculating the DBO population fitness value in the iterative update, adjusting the first parameter with the updated DBO population position and the minimum population fitness value, and checking whether the adjusted first parameter meets a preset termination condition; if the preset termination condition is met, terminating the iteration and outputting the global optimal position of the DBO population; if the preset termination condition is not met, repeating the iteration until the optimal parameters of the SVM algorithm are obtained; Training an initial SVM model based on the adjusted first parameter, and calculating a computational distance from each sample in the initial SVM model to a decision boundary; If the calculated distance is less than a first preset distance threshold, the sample is determined to be an outlier, and the outlier is removed to obtain the transformer fault gas dataset after removing the global outliers.

4. The method according to claim 3, characterized in that The method detects and removes local outliers in the transformer fault gas dataset after removing global outliers by using a preset DBO-K-means algorithm to obtain the transformer fault gas dataset after removing local outliers, including: Based on the multiple fault states corresponding to the transformer fault gas data set after removing global outliers, defining the second number of cluster centers, setting the second target number of iterations and the second feature number, and obtaining the second initial population number of the DBO algorithm; Construct a second objective function and select the optimal position of the first dung beetle, that is, the initial cluster center of the K-means clustering algorithm; the second objective function is: Among them, f2 represents the fitness value, dist(y i -c j ) represents the data point y of the transformer fault gas after removing the global outliers i To cluster center c j The Euclidean distance of Based on the preset parameter update strategy, adjusting the initial cluster centers in the K-means clustering algorithm; Calculating and iteratively updating the DBO population fitness value, adjusting the initial cluster center based on the updated DBO population position and the minimum population fitness value, and detecting whether the adjusted initial cluster center meets the preset termination condition; If the preset termination condition is met, the iteration is terminated and the global optimal position of the DBO population is output; if the preset termination condition is not met, the iteration is repeated until the optimal cluster center of the K-means clustering algorithm is obtained; The global optimal position of the DBO algorithm is used as the optimal cluster center of the K-means clustering algorithm, and each data in the transformer fault gas data set after removing global outliers is divided into the category corresponding to the nearest cluster center according to a first preset formula; the first preset formula is: Calculating the cluster distance from each data point in the transformer fault gas data set after removing global outliers to the corresponding cluster center; Determine whether the cluster distance is greater than a second preset distance threshold; if the cluster distance is greater than the second preset distance threshold, determine that the data point is an outlier point, and remove the outlier point to obtain the transformer fault gas data set after removing the local outliers.

5. The method according to claim 4, characterized in that The preset DBO-RF algorithm is used to fill missing values in the transformer fault gas dataset after removing global outliers and the transformer fault gas dataset after removing local outliers to obtain a cleaned transformer fault gas dataset, including: Based on the transformer fault gas dataset after removing local outliers, determine the population size, variable optimization dimension, third target iteration number, and parameter optimization upper and lower limits; and initialize the random forest model parameters; Construct a third objective function and select the third optimal position of the dung beetle, that is, the minimum number of leaves and decision numbers of the random forest model; the third objective function is: Among them, z i represents the true value of the missing value in the transformer fault gas dataset after removing local outliers, and z' represents the predicted value of the corresponding missing value; Adjusting the minimum number of leaves and the number of decision trees in the random forest model based on the preset parameter update strategy; Calculating the DBO population fitness value in the iterative update, adjusting the minimum number of leaves and the number of decision trees using the updated DBO population position and the minimum population fitness value, and checking whether the adjusted minimum number of leaves and the number of decision trees meet a preset termination condition; if the preset termination condition is met, terminating the iteration and outputting the global optimal position of the DBO population; if the preset termination condition is not met, repeating the iteration until the minimum number of leaves and the number of decision trees in the random forest model are obtained; The optimal minimum number of leaves and the number of decision trees after the optimization iteration are used to set the random forest parameters, and the DBO-RF is used to fill the missing values in the transformer fault gas dataset after removing global outliers and the transformer fault gas dataset after removing local outliers to obtain the cleaned transformer fault gas dataset.

6. A transformer fault gas data processing device, characterized in that: The device comprises: A standardization module is used to perform standardization processing on the original transformer fault gas dataset to obtain a standardized transformer fault gas dataset; A first elimination module is used to detect and eliminate global outliers in the standardized transformer fault gas data set by using a preset DBO-SVM algorithm to obtain a transformer fault gas data set after eliminating global outliers; A second elimination module is used to detect and eliminate local outliers in the transformer fault gas data set after eliminating global outliers by using a preset DBO-K-means algorithm to obtain a transformer fault gas data set after eliminating local outliers; The filling module is used to fill missing values in the transformer fault gas dataset after removing global outliers and the transformer fault gas dataset after removing local outliers by using a preset DBO-RF algorithm to obtain a cleaned transformer fault gas dataset.

7. A transformer fault gas data processing device, characterized in that: include: a memory for storing executable instructions; The processor is configured to implement the transformer fault gas data processing method according to any one of claims 1 to 5 when executing the executable instructions stored in the memory.

8. A computer-readable storage medium storing executable instructions, for causing a processor to execute the executable instructions to implement the transformer fault gas data processing method according to any one of claims 1 to 5.