Feature extraction method and related device
By identifying and eliminating background pixels and interference pixels in the PRPD map and using clustering technology to obtain feature vectors, the problem of ignoring the relative distribution of pixels in existing methods is solved, and the precision and accuracy of partial discharge type identification are improved.
Patent Information
- Application Number
- CN202510980575.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-10-17
AI Technical Summary
Existing knowledge-driven PRPD map feature extraction methods ignore the relative distribution of all pixels in the PRPD map, resulting in insufficient precision and accuracy in partial discharge type identification.
By obtaining the first pixel set and the second pixel set of the PRPD map, identifying and eliminating background pixels and interference pixels, clustering technology is used to cluster the feature pixel set, and obtaining feature vectors to record the relative distribution information of each cluster, reflecting the relative distribution of all pixels in the PRPD map.
The precision and accuracy of partial discharge type identification are improved, the influence of background pixels and interference pixels on clustering is reduced, and an efficient feature extraction method is provided under the condition of scarce PRPD maps.
Smart Images

Figure CN120807964A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a feature extraction method and related device. BACKGROUND
[0002] In order to ensure the safe operation of a gas insulated switchgear (GIS) device, it is crucial to identify the type of partial discharge of the GIS device. When the GIS device has partial discharge, the GIS device can continuously generate multiple partial discharge signals (a kind of ultra-high frequency pulse signal). By counting all the partial discharge signals, a phase-resolved partial discharge (PRPD) pattern can be obtained. The type of partial discharge can be identified by using features extracted from the PRPD pattern.
[0003] The PRPD pattern feature extraction method based on knowledge driving is a commonly used feature extraction method. The PRPD pattern feature extraction method based on knowledge driving can extract time domain features and image moment features from the PRPD pattern. The time domain features include the number of discharges, the discharge repetition rate, the voltage at which the discharge is extinguished, and the like. The image moment features include zero-order moments, first-order moments, second-order moments, third-order moments and above, geometric invariant moments (such as Hu moments), and the like. The zero-order moments represent the overall gray value of the PRPD pattern. The first-order moments represent the gray center of the PRPD pattern. The second-order moments represent the stretching degree of the target region in the PRPD pattern in the horizontal and vertical directions. The third-order moments represent the balance degree of the outline of the PRPD pattern in the horizontal and vertical directions. The geometric invariant moments can resist the invariance of the PRPD pattern when it is translated, scaled, and rotated. However, both the time domain features and the image moment features ignore the relative distribution of all pixels in the PRPD pattern. SUMMARY
[0004] In view of the above problems, the present application provides a feature extraction method and related device to obtain the relative distribution of all pixels in the PRPD pattern, and lay a foundation for improving the recognition accuracy and precision of the type of partial discharge. The specific solutions are as follows:
[0005] The first aspect of the present application provides a feature extraction method, comprising:
[0006] obtaining a first pixel set and a second pixel set of a phase-resolved partial discharge (PRPD) pattern, the first pixel set being used to record background pixels in the PRPD pattern, and the second pixel set being used to record pixels other than the background pixels in the PRPD pattern;
[0007] identify interference pixels in the second pixel set to obtain a feature pixel set of the PRPD pattern from the second pixel set, the feature pixel set being used to record pixels in the PRPD pattern that embody features of partial discharge events;
[0008] cluster each pixel in the feature pixel set to obtain a clustering result of the feature pixel set;
[0009] obtain a feature vector of the PRPD pattern according to the clustering result of the feature pixel set, the feature vector being used to record relative distribution information of each cluster to embody relative distribution of all pixels in the PRPD pattern through the relative distribution information of each cluster.
[0010] In a possible implementation, the obtaining of the first pixel set and the second pixel set of the phase-resolved partial discharge PRPD pattern includes:
[0011] determine an effective pixel area in the PRPD pattern, and perform normalization processing on a size of the effective pixel area to obtain an effective pixel pattern with a target size;
[0012] obtain a gray level histogram of a target area in the effective pixel pattern;
[0013] perform gray level distribution feature statistics on the gray level histogram to obtain a gray level range used to determine background pixels;
[0014] determine, as background pixels, pixels in the effective pixel pattern whose gray level values are in the gray level range, and all background pixels in the effective pixel pattern constitute the first pixel set, and pixels other than the background pixels in the effective pixel pattern constitute the second pixel set.
[0015] In a possible implementation, the performing of the gray level distribution feature statistics on the gray level histogram to obtain the gray level range used to determine the background pixels includes:
[0016] determine an initial gray level value of the gray level histogram according to a preset selection condition, the preset selection condition being used to indicate that the initial gray level value is determined in a descending order of statistical frequencies of gray level values in the gray level histogram;
[0017] obtain an initial gray level range according to the initial gray level value and a preset radius;
[0018] calculate an attenuation rate of a curve corresponding to the initial gray level range;
[0019] If a preset relationship is met between the decay rate and the statistical frequency of the initial gray value, the initial gray value range is determined as the gray value range used to determine the background pixel; if the preset relationship is not met between the decay rate and the statistical frequency of the initial gray value, the initial gray value is re-determined.
[0020] In a possible implementation, the identifying the interference pixels in the second pixel set to obtain the feature pixel set of the PRPD spectrum from the second pixel set comprises:
[0021] calculating an isolation value of each pixel in the second pixel set;
[0022] generating an interference pixel determination rule according to the isolation value of each pixel;
[0023] determining, according to the isolation value of each pixel and the interference pixel determination rule, a pixel whose isolation value does not meet the interference pixel determination rule as the interference pixel, and pixels other than the interference pixel in the second pixel set forming the feature pixel set.
[0024] In a possible implementation, the calculating the isolation value of each pixel in the second pixel set comprises:
[0025] generating an isolation forest of the second pixel set, the isolation forest comprising a plurality of isolation trees, and the number of pixels in each isolation tree being the same;
[0026] obtaining a height of each pixel in each isolation tree, and obtaining an average height of each pixel in the isolation forest according to the height of each pixel in each isolation tree;
[0027] obtaining the isolation value of each pixel according to the average height of each pixel in the isolation forest and an average length of the number of pixels in the isolation tree.
[0028] In a possible implementation, the generating the interference pixel determination rule according to the isolation value of each pixel comprises:
[0029] obtaining a maximum isolation value from the isolation values of all pixels;
[0030] calculating a mean value according to the isolation values of all pixels;
[0031] obtaining the interference pixel determination rule according to the maximum isolation value and the mean value, the interference pixel determination rule being used to indicate a condition met by the isolation value of the interference pixel.
[0032] In a possible implementation, the clustering of each pixel in the feature pixel set to obtain the clustering result of the feature pixel set comprises the following steps.
[0033] The distance between each two pixels in the feature pixel set is calculated to obtain a distance matrix of the feature pixel set, and the distance matrix of each pixel is used to record the distance between each two pixels;
[0034] According to the distance matrix of the feature pixel set, a distance threshold is determined;
[0035] According to the distance matrix of the feature pixel set and the distance threshold, a density value of each pixel is obtained;
[0036] According to the distance matrix of the feature pixel set and the density value of each pixel, a distance of each pixel is obtained;
[0037] According to the density value of each pixel and the distance of each pixel, a pixel serving as a clustering center is selected from the feature pixel set according to a preset clustering center selection condition, and pixels other than the pixel serving as the clustering center in the feature pixel set are to-be-clustered pixels;
[0038] According to the distance between the to-be-clustered pixels and the pixel serving as the clustering center, the to-be-clustered pixels are clustered to obtain the clustering result of the feature pixel set.
[0039] In a possible implementation, the obtaining of the feature vector of the PRPD spectrum according to the clustering result of the feature pixel set comprises the following steps.
[0040] The center coordinates of each cluster, the maximum distance and the minimum distance of each cluster in the horizontal and vertical directions in the clustering result are obtained;
[0041] According to the maximum distance and the minimum distance of each cluster in the horizontal and vertical directions, the area of each cluster is calculated;
[0042] According to the area of each cluster and the number of pixels of each cluster, the density of each cluster is calculated;
[0043] The feature vector of the PRPD spectrum comprises the center coordinates of each cluster, the maximum distance and the minimum distance of each cluster in the horizontal and vertical directions, the area of each cluster, and the density of each cluster.
[0044] The second aspect of the present application provides a feature extraction device, comprising:
[0045] The acquisition unit is configured to acquire a first pixel set and a second pixel set of a phase-resolved partial discharge (PRPD) pattern, the first pixel set being used to record background pixels in the PRPD pattern, and the second pixel set being used to record pixels other than the background pixels in the PRPD pattern.
[0046] The identification unit is configured to identify interference pixels in the second pixel set to obtain a feature pixel set of the PRPD pattern from the second pixel set, the feature pixel set being used to record pixels in the PRPD pattern that embody features of partial discharge events.
[0047] The clustering unit is configured to cluster each pixel in the feature pixel set to obtain a clustering result of the feature pixel set.
[0048] The feature extraction unit is configured to obtain a feature vector of the PRPD pattern according to the clustering result of the feature pixel set, the feature vector being used to record relative distribution information of each cluster, so as to embody relative distribution of all pixels in the PRPD pattern through the relative distribution information of each cluster.
[0049] The third aspect of the present application provides an electronic device, including at least one processor and a memory connected with the processor, wherein the memory is configured to store a computer program.
[0050] The processor is configured to execute the computer program, so that the electronic device can implement the feature extraction method of the first aspect or any implementation manner of the first aspect.
[0051] The fourth aspect of the present application provides a computer program product, including computer readable instructions, when the computer readable instructions run on an electronic device, so that the electronic device implements the feature extraction method of the first aspect or any implementation manner of the first aspect.
[0052] The fifth aspect of the present application provides a computer storage medium, the storage medium carries one or more computer programs, when the one or more computer programs are executed by an electronic device, can make the electronic device implement the feature extraction method of the first aspect or any implementation manner of the first aspect.
[0053] By means of the technical solutions, the feature extraction method and the related device provided by the application can sequentially realize the identification and elimination of the background pixels and the interference pixels in the PRPD pattern, so as to reduce the influence of the background pixels and the interference pixels on clustering. Then, the pixels in the feature pixel set are clustered to obtain a clustering result, a feature vector of the PRPD pattern is obtained according to the clustering result, the feature vector is used to record the relative distribution information of each cluster, the relative distribution information of each cluster is used to reflect the relative distribution of all the pixels in the PRPD pattern, the purpose of identifying the relative distribution of all the pixels in the PRPD pattern is achieved, and the foundation for improving the precision of partial discharge type identification is laid on the premise of the lack of the PRPD pattern. Then, the relative distribution of all the pixels in the PRPD pattern can be used for partial discharge type identification, so as to improve the identification precision and the identification accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0054] The above and other features, advantages, and aspects of the present disclosure will become more apparent by describing in detail the following specific embodiments in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals refer to the same or similar elements. It should be understood that the drawings are schematic, and the original and elements are not necessarily drawn according to the scale.
[0055] Figure 1 A flowchart of a feature extraction method provided by the application;
[0056] Figure 2 A flowchart of obtaining the first pixel set and the second pixel set in the feature extraction method provided by the application;
[0057] Figure 3 A schematic diagram of a PRPD pattern provided by the application;
[0058] Figure 4 A schematic diagram of an effective pixel pattern provided by the application;
[0059] Figure 5 A flowchart of identifying interference pixels in the feature extraction method provided by the application;
[0060] Figure 6 A schematic diagram of selecting a pixel as a clustering center provided by the application;
[0061] Figure 7 A schematic diagram of a clustering result provided by the application;
[0062] Figure 8 A structural schematic diagram of a feature extraction device provided by the application;
[0063] Figure 9 A structural schematic diagram of an electronic device provided by the application. DETAILED DESCRIPTION
[0064] The embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. The terms used in the embodiment part of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0065] The embodiments of the present application will be described below in conjunction with the drawings. It is known to those skilled in the art that as technology develops and new scenarios appear, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0066] The terms "first", "second", and the like in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, and this is only a distinguishing way adopted in the description of the embodiments of the present application for the same attribute objects in the description. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, so that the processes, methods, systems, products or equipment containing a series of units are not necessarily limited to those units, but can include other units not clearly listed or inherent to these processes, methods, systems, products or equipment.
[0067] The knowledge-driven PRPD pattern feature extraction method can extract time domain features and image moment features from the PRPD pattern. The time domain features reflect the discharge condition of partial discharge, and the image moment features reflect the centroid, area, contour information, etc. of the PRPD pattern. However, in the process of identifying the type of partial discharge, more attention is paid to the relative distribution of all pixels in the PRPD pattern after clustering, such as the relative distribution information of pixels in each cluster. Therefore, it is a difficult problem to identify the relative distribution of all pixels in the PRPD pattern.
[0068] The embodiments of the present application provide a feature extraction method and related device, which can obtain pixels in a PRPD pattern that reflect the characteristics of a partial discharge event, cluster the pixels to obtain a clustering result, and obtain a feature vector of the PRPD pattern according to the clustering result. The feature vector is used to record the relative distribution information of each cluster, so as to reflect the relative distribution of all pixels in the PRPD pattern through the relative distribution information of each cluster, achieve the purpose of identifying the relative distribution of all pixels in the PRPD pattern, and lay a foundation for improving the accuracy of partial discharge type identification under the premise of lacking PRPD patterns. Then, the relative distribution of all pixels in the PRPD pattern can be used for partial discharge type identification to improve the identification accuracy and identification accuracy. Among them, the relative distribution of all pixels in the PRPD pattern is mainly the relative distribution of pixels in the PRPD pattern that reflect the characteristics of a partial discharge event.
[0069] The feature extraction method provided by the embodiments of the present application will be described below with reference to the accompanying drawings. Please refer to Figure 1 which shows a flowchart of the feature extraction method provided by the embodiments of the present application, which can include the following steps:
[0070] S101, obtaining a first pixel set and a second pixel set of the PRPD map, the first pixel set is used to record the background pixels in the PRPD map, and the second pixel set is used to record the pixels in the PRPD map except the background pixels, that is, the second pixel set records the pixels in the PRPD map that may reflect the characteristics of the partial discharge event (referred to as suspected feature pixels).
[0071] It is found through research that the pixel relationship between the background pixels and the suspected feature pixels in the PRPD map is that the color change range of the background pixels is smaller than that of the suspected feature pixels, but the occurrence frequency of the background pixels is greater than that of the suspected feature pixels. According to the relationship between the background pixels and the suspected feature pixels, all the pixels in the PRPD map can be classified to obtain the background pixels and the suspected feature pixels in the PRPD map, all the background pixels form the first pixel set, and all the suspected feature pixels form the second pixel set.
[0072] S102, identifying the interference pixels in the second pixel set to obtain a feature pixel set of the PRPD map from the second pixel set, the feature pixel set is used to record the pixels in the PRPD map that reflect the characteristics of the partial discharge event.
[0073] It is found through research that the incidental partial discharge is less concerned in the partial discharge type identification process, but the characteristics that can reflect the incidental partial discharge event are also recorded in the PRPD map, in which the characteristics that reflect the incidental partial discharge event are some discrete and sparse pixels (i.e. interference pixels) in the PRPD map. These interference pixels may cause interference in the partial discharge type identification, so the interference pixels need to be identified before the feature vector of the PRPD map is obtained, so as to reduce the interference of the interference pixels on the extraction process of the feature vector. Correspondingly, the way to identify the interference pixels in the second pixel set can be: determining whether the pixels in the second pixel set are relatively discrete in the position distribution of the PRPD map, if the pixels are relatively discrete in the position distribution of the PRPD map, it is determined that the pixels are interference pixels.
[0074] In the embodiment, the background pixels and the interference pixels in the PRPD map are identified through the step S101 and the step S102, so that the pixels contained in the feature pixel set are as many as possible to be the pixels (referred to as feature pixels for short) that can embody the partial discharge events, the data amount for performing the feature vector extraction is obviously reduced, the influence of the background pixels and the interference pixels on the feature pixels is reduced, and the accuracy of the feature vector is improved.
[0075] S103, clustering each pixel in the feature pixel set to obtain a clustering result of the feature pixel set.
[0076] In the embodiment, the pixels belonging to the same cluster are clustered together through the clustering of each pixel in the feature pixel set, and the clustering result is used to indicate the number of clusters, the center coordinates of the clusters and can embody the relative distribution of the pixels in the same cluster. A feasible way of clustering each pixel in the feature pixel set includes the following steps 1 to 6:
[0077] Step 1): Calculate the distance between each two pixels in the feature pixel set to obtain a distance matrix of the feature pixel set, and the distance matrix of the feature pixel set is used to record the distance between each two pixels.
[0078] The pixels in the feature pixel set include two-dimensional position data in the phase amplitude coordinate system, such as the pixels I _feature (i) and I _feature (j) in the feature pixel set. 1×2 The distance d _feature between the pixels I _feature (i) and I ij (j) is solved by solving the distance square of each dimension and summing up, and is specifically represented as follows:
[0079]
[0080] Where e im represents the mth feature value of the ith pixel I _feature (i), e jm represents the mth feature value of the jth pixel I _feature (j), and the distance matrix of the feature pixel set is represented as D∈R (MSN-1)×(MSN-1) , and the number of all pixels in the feature pixel set is Msn. The feature pixel set records Msn-1 distances for one pixel.
[0081] Step 2): Determine the distance threshold according to the distance matrix of the feature pixel set. For example, all distances in the distance matrix of the feature pixel set are sorted from small to large, and the distance at the preset position is selected as the distance threshold. The preset position can be but is not limited to the 10th position.
[0082] Step 3): According to the distance matrix and distance threshold of the feature pixel set, the density value of each pixel is obtained. The calculation formula of the density value is as follows:
[0083]
[0084] where j∈I E \{i}, means j belongs to all pixels in the feature pixel set except the i-th pixel, d c is the distance threshold, is the density value of the i-th pixel. The density value calculated by the above formula is a continuous value rather than a discrete value, which is more conducive to subsequent clustering.
[0085] Step 4): According to the distance matrix of the feature pixel set and the density value of each pixel, the distance of each pixel is obtained. The distance calculation formula is as follows:
[0086] ,in, .
[0087] Is a feature pixel set, select a pixel m from the feature pixel set, if the density value of pixel m Greater than the density value of pixel i , record pixel m in the pixel set Thus, from the feature pixel set, the density value of the pixel i is selected except for the density value less than that of the pixel i. Pixels, which form a pixel set , and then according to the pixel set Whether it is empty determines the distance of pixel i .
[0088] Step 5): According to the density value of each pixel and the distance of each pixel, refer to the preset cluster center selection conditions, select the pixel as the cluster center from the feature pixel set, and the pixels in the feature pixel set other than the pixel as the cluster center are the pixels to be clustered.
[0089] One form of the preset cluster center selection condition is: a) the density value of the pixel is greater than the density value of other pixels; b) the distance of the pixel is greater than the distance of other pixels, so as to select the pixel with the larger distance and density value from the feature pixel set as the cluster center. In this embodiment, the preset cluster center selection condition can set a threshold value d ρ and d δ , will satisfy ρ i >d ρ And δ i >d δThe pixel is defined as the pixel as the clustering center (referred to as the clustering center).
[0090] Step 6): According to the distance between the pixel to be clustered and the pixel as the clustering center, the pixel to be clustered is clustered to obtain the clustering result of the feature pixel set.
[0091] After determining the pixel to be clustered and the clustering center, the pixel to be clustered is directly clustered using the distance between the pixel to be clustered and the clustering center calculated in step 1. For example, the pixel to be clustered is clustered into the cluster with the smallest distance to the clustering center.
[0092] From the above clustering process, after calculating the distance between each two pixels in the feature pixel set, the density value and distance of each pixel are calculated according to the distance between each two pixels, and then the clustering center and the pixel to be clustered are determined according to the preset clustering center selection condition, and then the clustering of the pixel to be clustered is completed through the clustering center and the pixel to be clustered which have been calculated. Thus, the unsupervised clustering can be realized through one distance calculation. Moreover, each pixel includes two-dimensional position data in the phase-amplitude coordinate system, and through the above clustering process, each pixel in the feature pixel set can be clustered in the phase direction and the amplitude direction respectively. Thus, the clustering result can be the clustering result of the pixels in the PRPD pattern in the phase direction and the amplitude direction respectively. Generally, the pixels in the PRPD pattern usually have phase correlation, and through clustering, all pixels can be divided into one cluster or two clusters, and the data in each cluster is distributed in an indefinite form in space. Thus, through the above clustering process, efficient clustering of data with any shape can be realized.
[0093] S104, according to the clustering result of the feature pixel set, obtaining a feature vector of the PRPD pattern, the feature vector is used to record the relative distribution information of each cluster, so as to reflect the relative distribution of all pixels in the PRPD pattern through the relative distribution information of each cluster.
[0094] In this embodiment, the clustering result can record the center coordinates of each cluster, the maximum distance and the minimum distance of each cluster in the horizontal and vertical directions, and the horizontal and vertical directions are the phase direction and the amplitude direction. Thus, according to the maximum distance and the minimum distance of each cluster in the horizontal and vertical directions, the area and the density of each cluster can be calculated, and the process is as follows:
[0095] The maximum distance of the cluster i in the horizontal and vertical directions is defined as dxi_up, dyi_up, and the minimum distance in the horizontal and vertical directions is defined as dxi_down, dyi_down. The area of the i-th cluster is area_i=(dxi_up-dxi_down)*(dyi_up-dyi_down), and the density of the i-th cluster is density_i=area_i / N iwhere N i represents the number of pixels belonging to the i-th cluster. Correspondingly, the feature vector of the PRPD pattern can record the relative distribution information of each cluster, such as including the center coordinates of each cluster (denoted as center_i), the maximum and minimum distances of each cluster in the horizontal and vertical directions (denoted as dxi_up, dxi_down, dyi_up, dyi_down), the area of each cluster (denoted as area_i), and the density of each cluster (denoted as density_i).
[0096] The clustering result obtained by the above clustering is usually 1 or 2. Finally, the feature vector F = (center_1, dx1_up, dx1_down, dy1_up, dy1_down, area_1, density_1, center_2, dx2_up, dx2_down, dy2_up, dy2_down, area_2, density_2) is extracted. center_1 and center_2 are the center coordinates of the clusters, and if the clustering result is 1, the values of the related parameters of cluster 2 are empty or default.
[0097] In the present embodiment, center_i in the feature vector F can represent the position of the cluster center, dxi_up, dxi_down, dyi_up, dyi_down and area_i can represent the distribution of the single cluster, density_i can represent whether the single cluster is dense, and the discrete situation can be represented by whether the single cluster is dense, so as to represent the relative distribution of the single cluster (i.e., to represent the internal details of the single cluster), and the relative distribution of all pixels in the PRPD pattern can be represented by the relative distribution of each cluster, such as determining the distribution of all pixels in which cluster is relatively dense, in which cluster is relatively discrete, and in which position is relatively dense. Because the present embodiment is to cluster the feature pixel set in the phase direction and the amplitude direction respectively, the feature vector can represent the relative distribution of the PRPD pattern in different phase regions and different amplitude regions.
[0098] In summary, the present embodiment can extract a 1x14 (a form of the feature vector) feature vector from the PRPD pattern, which represents the relative distribution of the pixels in the PRPD pattern. Compared with the current time domain features and image matrix feature extraction, the extracted feature vector is more suitable for the features required in the process of expert manual recognition of partial discharge type, thereby reducing the dependence on the data set when the expert manually recognizes the partial discharge type, and providing a basis for partial discharge type recognition under a small sample (a small number of PRPD patterns).
[0099] From the above technical solutions, the feature extraction method provided in the embodiment can sequentially realize identification and elimination of background pixels and interference pixels in the PRPD map, so as to reduce the influence of the background pixels and the interference pixels on clustering. Then, pixels in the feature pixel set are clustered to obtain a clustering result, a feature vector of the PRPD map is obtained according to the clustering result, the feature vector is used to record relative distribution information of each cluster, so as to reflect the relative distribution of all pixels in the PRPD map through the relative distribution information of each cluster, and the purpose of identifying the relative distribution of all pixels in the PRPD map is achieved, thereby laying a foundation for improving the precision of partial discharge type identification under the premise of the lack of the PRPD map, and then the relative distribution of all pixels in the PRPD map can be used for partial discharge type identification, so as to improve the identification precision and the identification accuracy.
[0100] The process of acquiring the first pixel set and the second pixel set and identifying the interference pixels in the embodiment of the application will be described below with reference to the accompanying drawings. Please refer to Figure 2 which shows an optional flow provided in the embodiment of the application for acquiring the first pixel set and the second pixel set, which can include the following steps:
[0101] S201, determine an effective pixel region in the PRPD map, and perform standard processing on the size of the effective pixel region to obtain an effective pixel map with a target size.
[0102] The PRPD map shows the statistical characteristics of the discharge in a two-dimensional form by associating the amplitude and phase of the partial discharge signal, as shown in a PRPD map in Figure 3 The coordinate system of the PRPD map can be called a phase-amplitude coordinate system, the horizontal coordinate is the phase, the unit is degree, and the vertical coordinate is the amplitude, the unit is dBm (decibel milliwatt), and the corresponding pixels in the PRPD map include two-dimensional position data in the phase-amplitude coordinate system. The effective pixel region in the PRPD map can be a region including suspected feature pixels in the phase-amplitude coordinate system, such as the region with a phase range of 0 degrees to 360 degrees and an amplitude range of -60 dBm to -45 dBm in Figure 3 .
[0103] The size of the effective pixel region is normalized by using a scale transformation to obtain an effective pixel atlas with a target size. The purpose is to normalize the effective pixel region of different PRPD atlases to the target size (such as the size of row*col). This is because the PRPD atlas may be obtained when the GIS equipment of different manufacturers has partial discharge, and the pixel resolution and the horizontal and vertical proportion when different manufacturers draw the PRPD atlas are different. If the size of the effective pixel region is not normalized, even if it is the same type of partial discharge, the relative distribution of the pixels in the PRPD atlas will change. Therefore, in order to reduce this change, the size of the effective pixel region is normalized in this embodiment, so that the size of the effective pixel atlas of different PRPD atlases is the target size. As shown in FIG. 26, the size of the effective pixel region in the PRPD atlas shown in FIG. 25 is normalized to obtain the effective pixel atlas. Figure 4 Figure 3
[0104] In S202, a gray level histogram of a target region in the effective pixel atlas is obtained. After obtaining the effective pixel atlas, the gray level histogram of the target region in the effective pixel atlas is statistically analyzed to obtain the gray level range for determining the background pixels. Compared with statistically analyzing the gray level histogram of the entire region of the effective pixel region, the amount of data for statistical analysis is reduced, and the efficiency is improved. The target region is a region with more background pixels in the effective pixel atlas. It is found through research that the number of background pixels in the edge region (or the peripheral region) of the atlas is much larger than the number of suspected feature pixels. Therefore, the target region can be the edge region of the atlas, for example, the target region can be a region with a preset size in the outermost periphery of the effective pixel atlas, for example, two 5*row rectangular regions and 5*col rectangular regions at the top and bottom of the effective pixel atlas.
[0105] In S203, the gray level histogram is statistically analyzed to obtain the gray level range for determining the background pixels.
[0106] In S204, the pixels with the gray level in the gray level range in the effective pixel atlas are determined as the background pixels. All the background pixels in the effective pixel atlas form a first pixel set, and the pixels other than the background pixels in the effective pixel atlas form a second pixel set.
[0107] In this embodiment, the gray level range for determining the background pixels needs to satisfy the pixel relationship between the background pixels and the suspected feature pixels in addition to identifying the background pixels in the effective pixel atlas. Therefore, the gray level range can be obtained by following the pixel relationship in this embodiment.
[0108] A feasible way to obtain the gray scale range is: determining an initial gray scale value of the gray scale histogram according to a preset selection condition, the preset selection condition being used to indicate that the initial gray scale value is determined in a descending order of statistical frequencies of the gray scale values in the gray scale histogram; obtaining an initial gray scale range according to the initial gray scale value and a preset radius; calculating an attenuation rate of a curve corresponding to the initial gray scale range; if a relationship between the attenuation rate and the statistical frequencies of the initial gray scale value satisfies a preset relationship, determining that the initial gray scale range is the gray scale range used to determine the background pixels; and if the relationship between the attenuation rate and the statistical frequencies of the initial gray scale value does not satisfy the preset relationship, re-determining the initial gray scale value.
[0109] In the embodiment, the preset relationship is used to make the background pixels determined by using the initial gray scale range satisfy the aforementioned pixel relationship with the suspected feature pixels, and the initial gray scale value is determined in the descending order of the statistical frequencies of the gray scale values in the gray scale histogram because the occurrence frequency of the background pixels is greater than the occurrence frequency of the suspected feature pixels in the pixel relationship, and the statistical frequencies of the gray scale values represent the occurrence frequencies of the pixels to which the gray scale values belong, so the initial gray scale value is determined in the descending order of the statistical frequencies, the initial gray scale range is first determined by using the gray scale value with the highest statistical frequency, and the initial gray scale range is determined again by using the gray scale value with the second highest statistical frequency when the preset condition is not satisfied, so that the gray scale range can be determined by using the gray scale value with a higher statistical frequency, and the background pixels in the first pixel set and the suspected feature pixels in the second pixel set satisfy the aforementioned pixel relationship.
[0110] The specific steps are as follows:
[0111] In step 11), an initial gray scale value G is selected from the gray scale histogram as the initial gray scale value according to a preset selection condition.
[0112] In step 12), the attenuation rate of the curve corresponding to the initial gray scale range [G-σ, G+σ] is calculated, and σ is a preset radius, which can be but is not limited to 30.
[0113] The curve corresponding to the initial gray scale range [G-σ, G+σ] takes the gray scale value as the horizontal coordinate and the statistical frequency h(i) of each gray scale value as the vertical coordinate, and the attenuation rate thereof is The attenuation rate indicates the maximum attenuation rate of the statistical frequencies in the initial gray scale range.
[0114] If the attenuation rate is greater than or equal to 1 / 2 of the statistical frequency of the initial gray value (one way of satisfying a preset relationship between the attenuation rate and the statistical frequency of the initial gray value), it is determined that the initial gray range is the gray range for determining the background pixels; if the attenuation rate is greater than the statistical frequency of the initial gray value, the gray value with the second highest statistical frequency is selected as the initial gray value, and steps 12 and 13 are repeated until the initial gray range [G-σ, G+σ] in which the attenuation rate is 1 / 2 of the statistical frequency of the initial gray value is found.
[0115] The initial gray range [G-σ, G+σ] in which the attenuation rate is 1 / 2 of the statistical frequency of the initial gray value is denoted as [G min , G max ], G min is the minimum value of the gray range for determining the background pixels, and G max is the maximum value of the gray range for determining the background pixels, the pixels with the gray values in the gray range [G min , G max ] are the background pixels, and the pixels other than all the background pixels in the effective pixel atlas are the suspected feature pixels, so that the gray range is used to classify the pixels in the effective pixel atlas, to obtain the first pixel set and the second pixel set, and to complete the identification of the background pixels, so that the background pixels can be removed in the feature extraction process, the data amount is reduced, and the influence of the background pixels is reduced.
[0116] Figure 5 An optional flow of identifying the interference pixels in the feature extraction method provided in the embodiments of the present application is shown, which can include the following steps.
[0117] S301, the isolated value of each pixel in the second pixel set is calculated. In the embodiment, the isolated value of the pixel can be obtained based on the isolated forest, and one feasible way is as follows: an isolated forest of the second pixel set is generated, the isolated forest includes a plurality of isolated trees, and the number of pixels in each isolated tree is the same; the height of each pixel in each isolated tree is obtained, and the average height of each pixel in the isolated forest is obtained according to the height of each pixel in each isolated tree; and the isolated value of each pixel is obtained according to the average height of each pixel in the isolated forest and the average length of the number of pixels in the isolated tree.
[0118] The objective of defining the isolated tree in the isolated forest is n_t, and the number of pixels in each isolated tree is n_s. First, an empty isolated forest is initialized to store the generated isolated trees, and n_t isolated trees are generated by looping n_t times: in each loop, n_s pixels are randomly extracted from the second pixel set to form a sub-data set sub-I_pd. Then, the sub-data set sub-I_pd is used to generate an isolated tree (iTree), and the initial height of the isolated tree is set to 0. The generated isolated tree is added to the isolated forest.
[0119] The generation process of the isolated tree can be: taking the sub-data set sub-I_pd as the to-be-processed data set, if the to-be-processed data set has only one pixel, directly returning the pixel as the interference pixel and stopping the generation of the isolated tree; if the to-be-processed data set includes multiple pixels, selecting one-dimensional position data from the two-dimensional position data of the pixels, such as selecting position data in the amplitude dimension or position data in the phase dimension.
[0120] A target value is selected from the maximum and minimum values of all selected one-dimensional position data. The pixels with values less than the target value in all one-dimensional position data are divided into a first set, and the pixels with values greater than or equal to the target value in all one-dimensional position data are divided into a second set. The pixels in the first set and the second set are the sub-trees of the isolated tree, and the height corresponding to the sub-tree is incremented by one. The first set and the second set are taken as the to-be-processed data set respectively, and the above process is repeated until there is only one pixel in the to-be-processed data set.
[0121] The height of the pixel in the isolated tree can be the number of the pixel as the node in the isolated tree, such as the pixel as the n th node in the isolated tree. The height of the pixel in the isolated tree is n, and the average height of the pixel in the isolated forest is the average value of all heights of the pixel in the isolated tree. The calculation formula of the average length of the number of pixels in the isolated tree is as follows:
[0122]
[0123] The average length is.
[0124] The calculation formula of the isolated value of the pixel is: , wherein, The isolated value of the pixel x is E(h(x)), and the average height of the pixel x in the isolated forest is E(h(x)).
[0125] S302. Generate an interference pixel determination rule based on the isolated value of each pixel. One feasible method is to obtain the maximum isolated value from the isolated values of all pixels; calculate the mean value based on the isolated values of all pixels; and obtain the interference pixel determination rule based on the maximum isolated value and the mean value. The interference pixel determination rule is used to indicate the conditions satisfied by the isolated values of the interference pixels. For example, the interference pixel determination rule may be, but is not limited to: pixels with an isolated value greater than max(S) + 2 / 3 (max(S) - mean(S)) are interference pixels, where max(S) is the maximum isolated value and mean(S) is the mean value.
[0126] S303 , according to the isolated value of each pixel and the interference pixel determination rule, determine that the pixel whose isolated value does not meet the interference pixel determination rule is an interference pixel, and the pixels in the second pixel set excluding the interference pixel constitute a feature pixel set.
[0127] After the above steps, the interference pixels in the second pixel set are identified with the help of the isolated values of the pixels, and the interference pixels are eliminated to obtain a feature pixel set, thereby reducing the amount of processed data and the impact of interference pixels during the feature extraction process.
[0128] After obtaining the feature pixel set, the pixels serving as cluster centers can be obtained by using the above steps 1 to 6, such as Figure 6 As shown in , it shows the process of selecting pixels as cluster centers in the clustering process, with the horizontal axis being the density value and the vertical axis being the distance. Figure 6 It can be seen that Figure 6 If the density and distance of the two pixels in the frame are greater than the density and distance of other pixels, then the two pixels in the frame can be the pixels as the cluster center, and their position is the position of the centroid (i.e., the cluster center), which can also be called the center position of the cluster. The corresponding clustering results are as follows: Figure 7 As shown, the same color represents the same cluster. The clustering results show the number of centroids, the center position of each cluster, the degree of dispersion of each cluster, etc., so that the extracted feature vector is more consistent with the features required by experts to manually identify the type of partial discharge.
[0129] The above describes a feature extraction method provided by an embodiment of the present application. The following describes a device for executing the feature extraction method. Figure 8 , Figure 8 This is a schematic diagram of the structure of a feature extraction device provided in an embodiment of the present application. Detailed descriptions of each module in the feature extraction device can be found in the above method embodiment and will not be described in detail here.
[0130] like Figure 8 As shown, the feature extraction device may include: an acquisition unit 10 , a recognition unit 20 , a clustering unit 30 and a feature extraction unit 40 .
[0131] The acquisition unit 10 is configured to acquire a first pixel set and a second pixel set of a phase-resolved partial discharge (PRPD) pattern, the first pixel set being used to record background pixels in the PRPD pattern, and the second pixel set being used to record pixels other than the background pixels in the PRPD pattern.
[0132] In a possible implementation, the acquisition unit 10 acquires the first pixel set and the second pixel set of the PRPD pattern in the following manner: determining an effective pixel area in the PRPD pattern, performing a size specification on the effective pixel area to obtain an effective pixel pattern with a target size; acquiring a gray level histogram of a target area in the effective pixel pattern; performing gray level distribution feature statistics on the gray level histogram to obtain a gray level range used to determine the background pixels; determining, as the background pixels, pixels in the effective pixel pattern with gray level values in the gray level range, and regarding all the background pixels in the effective pixel pattern as the first pixel set, and regarding pixels other than the background pixels in the effective pixel pattern as the second pixel set.
[0133] In the method, the gray level distribution feature statistics on the gray level histogram to obtain the gray level range used to determine the background pixels includes: determining an initial gray level value of the gray level histogram according to a preset selection condition, the preset selection condition being used to indicate that the initial gray level value is determined in a manner from high to low according to a statistical frequency of the gray level value in the gray level histogram; obtaining an initial gray level range according to the initial gray level value and a preset radius; calculating an attenuation rate of a curve corresponding to the initial gray level range; and determining the initial gray level range as the gray level range used to determine the background pixels if a relationship between the attenuation rate and the statistical frequency of the initial gray level value satisfies a preset relationship, and redetermining the initial gray level value if the relationship between the attenuation rate and the statistical frequency of the initial gray level value does not satisfy the preset relationship.
[0134] The identification unit 20 is configured to identify interference pixels in the second pixel set to obtain a feature pixel set of the PRPD pattern from the second pixel set, the feature pixel set being used to record pixels in the PRPD pattern that embody characteristics of partial discharge events.
[0135] In a possible implementation, the identification unit 20 identifies the interference pixels in the second pixel set to obtain the feature pixel set of the PRPD pattern from the second pixel set in the following manner: calculating an isolation value of each pixel in the second pixel set; generating an interference pixel determination rule according to the isolation value of each pixel; and determining, as the interference pixels, pixels with isolation values that do not satisfy the interference pixel determination rule according to the isolation value of each pixel and the interference pixel determination rule, and regarding pixels other than the interference pixels in the second pixel set as the feature pixel set.
[0136] The calculating the isolation value of each pixel in the second pixel set comprises: generating an isolation forest of the second pixel set, the isolation forest comprising a plurality of isolation trees, and the number of pixels in each isolation tree being the same; obtaining a height of each pixel in the second pixel set in each isolation tree, and obtaining a mean height of each pixel in the isolation forest according to the height of each pixel in each isolation tree; and obtaining the isolation value of each pixel according to the mean height of each pixel in the isolation forest and an average length of the number of pixels in the isolation trees.
[0137] The generating the interference pixel determination rule according to the isolation value of each pixel comprises: obtaining a maximum isolation value from the isolation values of all pixels; calculating a mean value according to the isolation values of all pixels; and obtaining the interference pixel determination rule according to the maximum isolation value and the mean value, the interference pixel determination rule being used to indicate a condition satisfied by the isolation value of the interference pixel.
[0138] The clustering unit 30 is configured to cluster each pixel in the feature pixel set to obtain a clustering result of the feature pixel set.
[0139] In a possible implementation, one way in which the clustering unit 30 clusters each pixel in the feature pixel set to obtain the clustering result of the feature pixel set is as follows: calculating distances between each two pixels in the feature pixel set to obtain a distance matrix of the feature pixel set, the distance matrix of each pixel being used to record the distances between each two pixels; determining a distance threshold according to the distance matrix of the feature pixel set; obtaining a density value of each pixel according to the distance matrix of the feature pixel set and the distance threshold; obtaining a distance of each pixel according to the distance matrix of the feature pixel set and the density value of each pixel; selecting a pixel as a clustering center from the feature pixel set according to the density value of each pixel and the distance of each pixel and referring to a preset clustering center selection condition, and pixels in the feature pixel set other than the pixel as the clustering center being to-be-clustered pixels; and clustering the to-be-clustered pixels according to distances between the to-be-clustered pixels and the pixel as the clustering center to obtain the clustering result of the feature pixel set.
[0140] The feature extraction unit 40 is configured to obtain a feature vector of the PRPD spectrum according to the clustering result of the feature pixel set, the feature vector being used to record relative distribution information of each cluster, so as to reflect a relative distribution of all pixels in the PRPD spectrum through the relative distribution information of each cluster.
[0141] In a possible implementation, the feature extraction unit 40 obtaining the feature vector of the PRPD pattern according to the clustering result of the feature pixel set comprises: obtaining the center coordinates of each cluster, the maximum distance and the minimum distance of each cluster in the horizontal and vertical directions according to the clustering result; calculating the area of each cluster according to the maximum distance and the minimum distance of each cluster in the horizontal and vertical directions; calculating the density of each cluster according to the area of each cluster and the number of pixels of each cluster; and the feature vector of the PRPD pattern comprises the center coordinates of each cluster, the maximum distance and the minimum distance of each cluster in the horizontal and vertical directions, the area of each cluster and the density of each cluster.
[0142] An electronic device is also provided in the embodiments of the present application. Referring to Figure 9 FIG. 1 shows a structural schematic diagram suitable for implementing the electronic device in the embodiments of the present application. The electronic device in the embodiments of the present application can include, but is not limited to, a fixed terminal such as a mobile phone, a notebook computer, a PDA (Personal Digital Assistant), a PAD (Tablet Personal Computer), a desktop computer, and the like. Figure 9 The electronic device shown is only an example and should not bring any limitation to the functions and use range of the embodiments of the present application.
[0143] As Figure 9 shown, the electronic device can include a processing apparatus (the processing apparatus can also be referred to as a processor, for example, a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 902 or programs loaded from a storage apparatus 908 into a random access memory (RAM) 903. In a state where the electronic device is powered on, various programs and data required by the electronic device for operation are also stored in the RAM 903. The processing apparatus 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. The ROM 902, the RAM 903, and the storage apparatus 908 can be memories in the electronic device, which can store computer programs, and the processing apparatus 901 is configured to execute the computer programs so that the electronic device can implement any of the feature extraction methods provided in the embodiments of the present application.
[0144] An input / output (I / O) interface 905 is also connected to the bus 904. Generally, the following devices can be connected to the I / O interface 905: input devices 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage apparatuses 908 including, for example, a memory card, a hard disk, etc.; and communication devices 909. The communication devices 909 can allow the electronic device to communicate with other devices wirelessly or through wires to exchange data. Although Figure 9Electronic devices having various apparatuses are shown, but it is understood that all of the illustrated apparatuses are not required, and that more or less than the illustrated apparatuses can be implemented.
[0145] The embodiment of the present application further provides a computer program product comprising computer readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the feature extraction methods provided by the embodiment of the present application.
[0146] The embodiment of the present application further provides a computer readable storage medium, which carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement any of the feature extraction methods provided by the embodiment of the present application.
[0147] In addition, it should be noted that the apparatus embodiments described above are merely illustrative, and the units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment according to actual needs. In addition, the connection relationship between the modules in the apparatus embodiment provided by the present application indicates that there is a communication connection between them, which can be implemented as one or more communication buses or signal lines.
[0148] From the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software and the necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure for implementing the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better embodiment. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including a plurality of instructions to make a computer device (which can be a personal computer, training device, or network device, etc.) execute the methods described in various embodiments of the present application.
[0149] In the above embodiments, all or part can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in the form of a computer program product in whole or in part.
[0150] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, training device or data center to another website, computer, training device or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. integrated with one or more available media sets. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc.
Claims
1. A feature extraction method, characterized in that: include: Acquire a first pixel set and a second pixel set of a phase-resolved partial discharge (PRPD) spectrum, wherein the first pixel set is used to record background pixels in the PRPD spectrum, and the second pixel set is used to record pixels in the PRPD spectrum other than the background pixels; Identifying interference pixels in the second pixel set to obtain a characteristic pixel set of the PRPD map from the second pixel set, wherein the characteristic pixel set is used to record pixels in the PRPD map that reflect characteristics of a partial discharge event; Clustering each pixel in the feature pixel set to obtain a clustering result of the feature pixel set; According to the clustering result of the characteristic pixel set, the characteristic vector of the PRPD map is obtained, and the characteristic vector is used to record the relative distribution information of each cluster, so as to reflect the relative distribution of all pixels in the PRPD map through the relative distribution information of each cluster.
2. The method according to claim 1, characterized in that The first pixel set and the second pixel set of obtaining the phase-resolved partial discharge (PRPD) spectrum include: Determining an effective pixel area in the PRPD map, and normalizing the size of the effective pixel area to obtain an effective pixel map with a target size; Obtaining a grayscale histogram of a target area in the effective pixel map; Performing grayscale distribution feature statistics on the grayscale histogram to obtain a grayscale range for determining background pixels; Pixels in the effective pixel map whose grayscale values are within the grayscale range are determined as background pixels, all background pixels in the effective pixel map constitute the first pixel set, and pixels in the effective pixel map other than all background pixels constitute the second pixel set.
3. The method according to claim 2, characterized in that The performing grayscale distribution feature statistics on the grayscale histogram to obtain a grayscale range for determining background pixels includes: Determining an initial grayscale value of the grayscale histogram according to a preset selection condition, wherein the preset selection condition is used to indicate that the initial grayscale value is determined in a descending order of the statistical frequency of the grayscale values in the grayscale histogram; Obtaining an initial grayscale range according to the initial grayscale value and a preset radius; Calculating the decay rate of the curve corresponding to the initial grayscale range; If the relationship between the decay rate and the statistical frequency of the initial grayscale value satisfies the preset relationship, the initial grayscale range is determined to be the grayscale range used to determine the background pixel; if the relationship between the decay rate and the statistical frequency of the initial grayscale value does not satisfy the preset relationship, the initial grayscale value is re-determined.
4. The method according to claim 1, wherein The step of identifying interference pixels in the second pixel set to obtain a feature pixel set of the PRPD spectrum from the second pixel set includes: calculating an isolated value for each pixel in the second set of pixels; generating an interference pixel determination rule according to the isolated value of each pixel; According to the isolated value of each pixel and the interference pixel determination rule, the pixel whose isolated value does not meet the interference pixel determination rule is determined to be the interference pixel, and the pixels in the second pixel set other than the interference pixel constitute the feature pixel set.
5. The method according to claim 4, characterized in that Calculating the isolated value of each pixel in the second pixel set includes: generating an isolation forest for the second pixel set, wherein the isolation forest includes a plurality of isolated trees, and each isolated tree has the same number of pixels; Obtaining the height of each pixel in each isolated tree in the second pixel set, and obtaining the average height of each pixel in the isolated forest based on the height of each pixel in each isolated tree; The isolation value of each pixel is obtained according to the mean height of each pixel in the isolation forest and the average length of the number of pixels in the isolated tree.
6. The method according to claim 4, characterized in that Generating an interference pixel determination rule according to the isolated value of each pixel includes: Get the maximum isolated value from the isolated values of all pixels; Calculate the mean value based on the isolated values of all pixels; The interference pixel determination rule is obtained according to the maximum isolated value and the mean value, and the interference pixel determination rule is used to indicate the conditions satisfied by the isolated values of the interference pixels.
7. The method according to claim 1, characterized in that Clustering each pixel in the feature pixel set to obtain a clustering result of the feature pixel set includes: Calculating the distance between every two pixels in the feature pixel set to obtain a distance matrix of the feature pixel set, wherein the distance matrix of each pixel is used to record the distance between every two pixels; Determining a distance threshold according to a distance matrix of the feature pixel set; Obtaining a density value of each pixel according to the distance matrix of the feature pixel set and the distance threshold; Obtaining the distance of each pixel according to the distance matrix of the feature pixel set and the density value of each pixel; Selecting a pixel as a cluster center from the feature pixel set according to the density value of each pixel and the distance of each pixel and referring to a preset cluster center selection condition, wherein pixels in the feature pixel set other than the pixel as the cluster center are pixels to be clustered; The pixels to be clustered are clustered according to the distance between the pixels to be clustered and the pixels serving as cluster centers, to obtain a clustering result of the feature pixel set.
8. The method according to claim 7, characterized in that The step of obtaining the feature vector of the PRPD map according to the clustering result of the feature pixel set includes: Obtaining the center coordinates of each cluster in the clustering result, and the maximum and minimum distances of each cluster in the horizontal and vertical directions; Calculating the area of each cluster according to the maximum distance and the minimum distance of each cluster in the horizontal and vertical directions; Calculating the density of each cluster according to the area of each cluster and the number of pixels in each cluster; The characteristic vector of the PRPD map includes the center coordinates of each cluster, the maximum distance and the minimum distance of each cluster in the horizontal and vertical directions, the area of each cluster and the density of each cluster.
9. A feature extraction device, characterized in that: include: an acquisition unit, configured to acquire a first pixel set and a second pixel set of a phase-resolved partial discharge (PRPD) spectrum, wherein the first pixel set is configured to record background pixels in the PRPD spectrum, and the second pixel set is configured to record pixels other than the background pixels in the PRPD spectrum; an identification unit, configured to identify interfering pixels in the second pixel set, so as to obtain a characteristic pixel set of the PRPD map from the second pixel set, wherein the characteristic pixel set is used to record pixels in the PRPD map that reflect characteristics of a partial discharge event; a clustering unit, configured to cluster each pixel in the feature pixel set to obtain a clustering result of the feature pixel set; A feature extraction unit is used to obtain a feature vector of the PRPD map based on the clustering result of the feature pixel set, and the feature vector is used to record the relative distribution information of each cluster, so as to reflect the relative distribution of all pixels in the PRPD map through the relative distribution information of each cluster.
10. An electronic device, characterized in that: comprising at least one processor and a memory connected to the processor, wherein: the memory is used to store a computer program; The processor is configured to execute the computer program so that the electronic device can implement the feature extraction method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and system for intelligently updating geosteering while drilling real-time stratigraphic framework
CN114463333A
PRPD atlas data enhancement method for partial discharge pattern recognition algorithm
CN115453275A
Partial discharge mode identification method based on combination of Kmeans and DBSCAN
CN115561591A