A power equipment fault identification method, system and device
By spatially standardizing and using a hybrid coding network to process images of power equipment, component region label maps and semantic feature maps are generated. Combined with task prompt vectors, fault identification is performed, which solves the problem of low accuracy in power equipment fault identification in existing technologies and achieves high-precision fault detection and location.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG POWER GRID CO LTD
- Filing Date
- 2026-03-27
- Publication Date
- 2026-06-05
Smart Images

Figure CN122156658A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and artificial intelligence, and in particular to a method, system and device for identifying faults in power equipment. Background Technology
[0002] Electrical equipment is a critical infrastructure for ensuring the stable operation of power systems. For example, distribution disconnect switches are important devices for controlling the connection and disconnection of electrical circuits in power systems. However, these devices are exposed to complex outdoor environments for extended periods, and are subject to the combined effects of various external factors such as high humidity, temperature differences, dust, electrolytic corrosion, and ultraviolet radiation. Consequently, their metal and insulating components are highly susceptible to rust, cracks, loosening, and burning.
[0003] Currently, visual recognition models preprocess the acquired images of power equipment (such as size normalization and illumination correction), and then input the images into a deep convolutional neural network. This network typically employs an object detection or image classification architecture and learns the ability to directly identify and locate specific types of faults from the original images by training on a large amount of labeled data.
[0004] However, since power equipment is usually composed of multiple components with different functions and shapes (such as disconnectors, insulators, contacts, etc.) combined in a specific spatial relationship, and existing visual recognition models mainly rely on general features extracted from global images for discrimination, it is difficult to achieve accurate differentiation and targeted modeling of different component areas at the feature level. This results in low accuracy of fault identification when components are mutually occluded, have similar appearances, or have small fault scales. Summary of the Invention
[0005] This invention provides a method, system, and device for identifying power equipment faults, which can solve the problem of low fault identification accuracy caused by insufficient feature representation capabilities extracted by existing technologies.
[0006] This invention provides a method for identifying faults in power equipment, comprising: Spatial normalization processing is performed on the original structural images of the power equipment to obtain target structural images, and structural segmentation processing is performed on the target structural images to obtain component region label images; The target structure image is input into a preset hybrid coding network to obtain a semantic feature map. The semantic feature map and the component region label map are combined to obtain multiple structure tokens, wherein each structure token corresponds one-to-one with a component region of the power equipment. The structure token is fused with a preset task prompt vector to obtain a query vector. The query vector is then input into the decoder, and fault identification is performed under the guidance of the semantic feature map to obtain the fault identification result.
[0007] This invention, through spatial standardization of the original structural image, unifies the perspective and scale, improves feature alignment, and enhances recognition accuracy. It generates component region label maps, clearly defining pixel-level component attribution, providing explicit structural priors for the model and improving localization accuracy. The hybrid coding network outputs semantic feature maps while preserving global context and local details, enhancing feature discriminative power. The component region label maps and semantic features jointly generate structural tokens, each focusing on a single component, improving semantic purity and increasing the signal-to-noise ratio for fault identification. The structural tokens are fused with task prompt vectors, and the query vectors inherently possess task and component semantics, allowing the decoder to focus its attention more effectively and improving fault classification accuracy. Decoding guided by semantic feature maps allows for the utilization of cross-component context, improving recall for small target faults and achieving high recognition accuracy.
[0008] Furthermore, the original structural images of the power equipment are spatially normalized to obtain the target structural images, specifically as follows: Multiple preset structural points are obtained by detecting the original structural image; The affine transformation matrix is calculated based on all the preset structural points, and the original structural image is transformed according to the affine transformation matrix to obtain the target structural image.
[0009] By detecting preset structural points, key points can be used as geometric anchor points, resulting in high accuracy of the affine transformation base data. Calculating the affine transformation matrix and performing the transformation improves the geometric consistency of the image, aligning images from different devices and perspectives to a unified coordinate system and reducing feature matching errors.
[0010] Furthermore, the fault identification result includes fault coordinates, and the power equipment fault identification method further includes: Obtain the attention map from the decoder; In the attention map, a preset number of second pixels are selected based on the confidence level of all first pixels. Based on the inverse of the affine transformation matrix, the coordinates of all the second pixels are inversely transformed to obtain the initial coordinates of each second pixel. The confidence weight coefficient is determined based on the confidence level corresponding to the second pixel, and the initial coordinates are weighted and averaged according to the confidence weight coefficient to obtain the fault coordinates.
[0011] By extracting the attention map from the decoder, the fault response heatmap can be obtained in real time, and the location information can be visualized. High-confidence pixels are selected to retain the most reliable fault response and suppress noise points. The coordinates are restored by inverse transformation, which reduces the error of the original image coordinates and improves the geometric accuracy. By using a confidence-weighted average, the weight of high-confidence points can be increased, thereby improving the accuracy of fault coordinates.
[0012] Furthermore, the fault identification result includes the component number, and the structural segmentation processing of the target structure image to obtain the component region label map specifically involves: Based on the preset structural points, a preset distance-based geometric partitioning method is used to divide the pixel space of the target structural image to obtain multiple component regions; Based on the preset component topology, the component number corresponding to each pixel in the component region is determined, and the component region label map is obtained.
[0013] This distance-based geometric partitioning makes pixel assignment calculation simple and efficient, and ensures continuous and closed component boundaries. By introducing component topological relationships, the label diagram conforms to electrical structure knowledge, thus improving semantic consistency.
[0014] Furthermore, the process of combining the semantic feature map and the component region label map to obtain multiple structural tokens specifically involves: For each component region in the component region label map, an initial feature vector corresponding to all spatial locations in the component region is extracted from the semantic feature map; The weighting coefficient of each spatial location is determined based on the distance from the center of gravity of the component region. Based on the weight coefficients corresponding to all the spatial locations, the initial feature vector is weighted and averaged to obtain the structural token corresponding to the component region.
[0015] This method extracts initial feature vectors by component region, with each feature corresponding to a physical component, thus improving semantic focus. Weighting is applied based on distance from the centroid, resulting in higher weights closer to the centroid. This enhances the token's sensitivity to core fault regions, suppresses edge background noise, and simultaneously increases the accuracy of fault classification and localization.
[0016] Further, the step of inputting the query vector into the decoder and performing fault identification under the guidance of the semantic feature map to obtain the fault identification result is as follows: A structural boundary constraint weight map is determined based on the component region label map, and the structural boundary constraint weight map is used to characterize the distance relationship from each spatial location to the boundary of the component region; In the decoder, cross-attention calculation is performed on the query vector based on the structural boundary constraint weight graph. During the cross-attention calculation, the attention score outside the boundary of the component region is zeroed out and the attention score inside the boundary of the component region is determined according to the distance relationship to obtain the fault identification result.
[0017] Based on the structural boundary constraint weight map, attention outside the boundary is forced to zero, cross-component interference is removed, and the signal-to-noise ratio is improved; distance-weighted attention inside the boundary can achieve higher attention closer to the component center, sharper fault response peaks, and improved detection rate of small target faults.
[0018] Furthermore, the power equipment fault identification method further includes: Obtain the initial encoder and the initial decoder, and combine the initial encoder and the initial decoder to form an initial fault identification network; The initial fault identification network is trained, and during the training process, the cross-attention of the decoder is calculated based on sparsity regularization to obtain the target fault identification network including the decoder.
[0019] By training based on sparsity regularization, the attention distribution is compressed, the high-response region is concentrated, and the model's sensitivity to minor faults is enhanced. Regularization constraints are applied throughout the training process, and no additional computation is required during inference, directly inheriting the highly sparsity and highly focused attention characteristics.
[0020] Furthermore, the power equipment fault identification method further includes: Obtain a preset power equipment knowledge base, wherein the power equipment knowledge base is a database including multiple fault detection instructions; The task prompt vector is obtained by semantically encoding each of the fault detection instructions.
[0021] In this way, the power equipment knowledge base stores fault detection instructions, and the task prompt vectors are semantically accurate. The instructions are semantically encoded, and the prompt vectors are consistent with the operation and maintenance language, which reduces the decoding bias and improves the fault classification accuracy.
[0022] Another embodiment of the present invention provides a power equipment fault identification system, including: a preprocessing module, a token generation module, and an identification module; The preprocessing module is used to perform spatial standardization processing on the original structural images of the power equipment to obtain target structural images, and to perform structural segmentation processing on the target structural images to obtain component region label images. The token generation module is used to input the target structure image into a preset hybrid coding network to obtain a semantic feature map, and combine the semantic feature map and the component region label map to obtain multiple structure tokens, wherein the structure tokens correspond one-to-one with the component regions of the power equipment; The identification module is used to fuse the structure token with a preset task prompt vector to obtain a query vector, input the query vector into the decoder, and perform fault identification under the guidance of the semantic feature map to obtain the fault identification result.
[0023] Another embodiment of the present invention provides a terminal device, including: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements the steps of the power equipment fault identification method of the present invention. Attached Figure Description
[0024] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0025] Figure 1 This is a flowchart illustrating a power equipment fault identification method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a power equipment fault identification system provided in an embodiment of the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0028] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0029] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0030] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0031] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0032] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0033] See Figure 1 To address the problem of low fault identification accuracy caused by insufficient feature representation capabilities in existing technologies, an embodiment of the present invention provides a power equipment fault identification method, comprising: Step 101: Perform spatial standardization processing on the original structural images of the power equipment to obtain target structural images, and perform structural segmentation processing on the target structural images to obtain component region label images.
[0034] In the above steps, a spatial transformation technique based on geometric key points is employed. By detecting structural feature points in the image and establishing a correspondence between them and a standard template, a mathematical transformation model is applied to adjust the device structure in the original image to a uniform viewpoint and scale, eliminating geometric deformations caused by differences in shooting angle and distance, thus obtaining the target structure image. Based on the inherent component distribution patterns of the device, a spatial partitioning algorithm is used to divide the target structure image into multiple logically continuous regions. Each region corresponds to a functional component of the device, generating a label mapping map that corresponds one-to-one with image pixels, i.e., a component region label map. This map records the component category to which each pixel belongs in an encoded form.
[0035] Step 102: Input the target structure image into a preset hybrid coding network to obtain a semantic feature map. Combine the semantic feature map and the component region label map to obtain multiple structure tokens, wherein each structure token corresponds one-to-one with a component region of the power equipment.
[0036] In the above steps, the target structural image is input into a deep neural network that integrates local perception and global association mechanisms. This network extracts high-order semantic features of the image through multi-layer nonlinear transformations, generating semantic feature representations with rich contextual information, resulting in a semantic feature map. Guided by the component region label map, the semantic feature representations belonging to the same component region are regionalized and aggregated, integrating the component-related features scattered on the semantic feature map into a compact vector representation, i.e., a structural token. Each structural token corresponds to an independent functional component.
[0037] For example, the hybrid coding network is a hybrid structure of convolution and Transformer based on the CO-DETR architecture. The target structure image is first passed through a ResNet-50 with a four-layer residual structure as the convolutional front end to extract local texture features. Each layer contains convolution, batch normalization, and ReLU activation modules to obtain an initial feature map. The initial feature map is downsampled four times and then fed into a standard Transformer structure with a six-layer encoder. Each encoder layer contains a multi-head self-attention module and a feedforward network module, and positional encoding is performed to preserve spatial information to obtain a semantic feature map. Its tensor dimension is ,in , , This is consistent with the structure of a hybrid coding network, where H is the height, representing the number of pixels in the feature map in the vertical direction; W is the width, representing the number of pixels in the feature map in the horizontal direction; and C is the number of channels, representing the feature dimension (i.e., the length of the feature vector) at each spatial location.
[0038] Step 103: Fuse the structure token with the preset task prompt vector to obtain a query vector. Input the query vector into the decoder and perform fault identification under the guidance of the semantic feature map to obtain the fault identification result.
[0039] In the above steps, the structure token is fused with a predefined task guidance vector to generate a composite query vector that contains both the object to be identified and the task to be identified. This query vector is then input into a decoder network based on a self-attention mechanism, which, guided by the semantic feature map, completes the detection and classification of faults through cross-modal information interaction, thus obtaining the fault identification result.
[0040] Specifically, based on the set of structure tokens output in the previous step. With semantic feature map Based on this, a task prompt vector set is introduced. This paper constructs a fault identification mechanism that integrates structural semantics and task instructions. Addressing the complex component structures, weak fault representation, and uneven spatial scale of distribution disconnect switches, this mechanism employs a structure-task joint modeling approach, enabling the model to perform multi-task fault detection in a more targeted and hierarchical manner. Unlike traditional object detection methods based on full-image anchor sliding or unified query encoding, this embodiment uses structural tokens as anchor-free structural units, guided by task prompt vectors. This restricts the attention of fault detection to structurally salient regions, while simultaneously integrating semantic features for fault type identification. The final output is a structured fault identification result set and attention region map. The input variables are... and ,in This is a structure token representing the component number in the power distribution disconnect switch. The semantic representation is generated in the target structure image based on the component region label map, where B is the total number of component regions.
[0041] As an example of an embodiment of the present invention, the power equipment fault identification method further includes: acquiring a preset power equipment knowledge base, wherein the power equipment knowledge base is a database including multiple fault detection instructions; and semantically encoding each of the fault detection instructions to obtain the task prompt vector.
[0042] In this embodiment, a structured task cue vector set each It is a predefined task prompt vector in the power equipment database, such as determining whether a disconnector is corroded or detecting whether an insulator is aging. It is obtained through a text encoding model (such as BERT), and this task prompt vector is... 3D vector representation.
[0043] As an example of an embodiment of the present invention, the step of performing spatial normalization processing on the original structural image of the power equipment to obtain the target structural image specifically involves: detecting multiple preset structural points in the original structural image; calculating an affine transformation matrix based on all the preset structural points; and transforming the original structural image based on the affine transformation matrix to obtain the target structural image.
[0044] The preset structural points include the center of the left insulator base, the center of the right insulator base, the center of the disconnect switch, the contact endpoint, and the grounding lead interface.
[0045] In this embodiment, taking a power distribution disconnect switch as an example, key structural points are identified in the original structural image, and an affine transformation is performed on the identified key structural points to obtain the target structural image. Simultaneously, a component region label map of each pixel is generated based on the topological relationships between the structural points. The original structural image is then obtained. This image can be captured during operation and maintenance using industrial cameras (such as fixed-point high-definition cameras or drone inspection platforms). The image content completely covers the main structure of the power distribution disconnect switch, and the format is a three-channel RGB image with a uniform size. Pixels. The images contain typical structural components such as left and right insulators, disconnectors, and contacts. Due to significant differences in shooting angles, some images also contain background interference (such as utility poles and wiring), thus requiring spatial standardization of the structure. During the standardization process, the image... Input into the key point detection model This model can be built based on a high-resolution subnetwork architecture (HRNet), where the network contains multiple branch convolutional channels and fuses features across different resolutions. The model output is... Each heatmap represents the positional response probability of a preset structural point. The location of the maximum response in each heatmap is extracted using a soft-argmax operation, resulting in a set of structural keypoints, represented as follows: ; in, Represents the predicted values in the image. The coordinates of the structural points are given, all in pixels, and are normalized to ensure that their relative positions remain consistent across different images.
[0046] After obtaining the set of structural key points, four key points with good geometric distribution are selected from them. These correspond to the positions of the left insulator, right insulator, switch shaft, and contacts, respectively. These points are represented in the original structural image by... The extracted data is set as a fixed reference point in the standard template image, and the affine transformation matrix is calculated using OpenCV tools. The transformation from the original structural image to the target structural image is performed, and bilinear interpolation is used for pixel value mapping to ensure that the image content maintains edge continuity and structural accuracy during the transformation. The transformation is represented as follows: ; in, The target structure image has all its components aligned to the coordinate system of the standard template image; It is an affine transformation matrix, which is calculated through a four-point correspondence and includes translation, rotation, and scaling.
[0047] As an example of an embodiment of the present invention, wherein the fault identification result includes fault coordinates, the power equipment fault identification method further includes: obtaining an attention map in the decoder; selecting a preset number of second pixels in the attention map based on the confidence of all first pixels; performing an inverse transformation on the coordinates of all second pixels based on the inverse matrix of the affine transformation matrix to obtain the initial coordinates of each second pixel; determining a confidence weight coefficient based on the confidence corresponding to the second pixel, and performing a weighted average on the initial coordinates based on the confidence weight coefficient to obtain the fault coordinates.
[0048] It should be noted that, because affine normalization based on structural key points is introduced in step 101, model modeling, structural token construction, and fault identification in subsequent steps are all based on the unified structural image. Completed; therefore, the initial coordinates in the fault identification results are... All belong to a standardized coordinate system. To achieve original image annotation, result visualization, fault report generation, and engineering deployment, the initial coordinates must be accurately restored to the original image through an inverse transformation. In the image space, the component number, fault type, confidence level, and other information are kept intact. Therefore, the goal of this embodiment is to accurately map the identification results from the standardized image coordinate system back to the original image space after completing the fault identification task, thereby generating a structured fault result output that can be deployed and called upon.
[0049] The attention map is generated by the decoder during the cross-attention calculation process. Its dimension is the same as that of the semantic feature map. Each spatial location corresponds to a confidence level, which represents the confidence level of that location for the current fault identification task.
[0050] In this embodiment, to obtain stable fault location results, the N pixels with the highest confidence levels from the attention map are selected as the second pixel points. Specifically, for each structure-task pair, its corresponding attention map is unfolded into a one-dimensional sequence, sorted from high to low confidence, and the top N pixels are selected to form the second pixel point set, where N is a preset number (e.g., N=10, or set as a preset percentage of the total number of pixels in the attention map). The input to the transformation process includes two parts: the first part is the fault identification result. ,in Indicate the component number (e.g., knife switch is 1, contact is 2, etc.). Indicates the fault task number (such as rust, cracks, etc.). These are the initial coordinates in the standard coordinate system corresponding to the target structure image, for example... , The first part is the confidence score; the second part is the affine transformation matrix. The mapping relationship is Using the inverse of the affine transformation matrix Perform an inverse coordinate transformation to map the standard coordinate system of the target structure image back to the original coordinate system corresponding to the original structure image, as shown below: ; in, This indicates the location of the fault in the original structural image. yes The affine inverse matrix, The initial coordinates are represented as homogeneous coordinates for a three-dimensional column vector. This is a normalization factor used to convert homogeneous coordinates back to regular two-dimensional coordinates. For example, suppose the initial coordinates of a contact ablation point identified in an image of a target structure are... After the above inverse transformation, the fault coordinates of the fault point in the original image are obtained. This makes it easy to directly select and annotate on the original image.
[0051] Since high-confidence regions in the attention map may be shifted or fragmented due to noise, this embodiment also introduces a multi-point attention fusion strategy to prevent distortion of the localization results and further improve the stability and interpretability of fault localization in the original structural image. Specifically, the top-ranked regions with the highest confidence in each task's attention map are extracted. point set The coordinates of these points in the target structure image are inversely transformed back to the original structure image, denoted as . And based on the confidence level corresponding to each coordinate. The fault coordinates are obtained by weighted averaging, and are represented as follows: ; This method exhibits multi-point robustness, maintaining spatial consistency of fault locations even under conditions of blurred boundaries, image compression, or slight occlusion. For example, in real-world images, high-confidence regions may shift between multiple pixels due to illumination interference. Directly using the maximum value point might deviate from the true region's center. However, after multi-point fusion, the positional offset can be controlled within 3 pixels, significantly improving the reliability of actual deployments. The fault coordinate set is obtained through the aforementioned transformation steps. .
[0052] It should be noted that the structured output can be directly used for engineering deployment, for example: overlaying fault location boxes in the visualization interface to generate image annotation layers; converting it into a JSON file and uploading it to the power equipment operation and maintenance platform; controlling drones for review, robotic arms for precise focusing, or generating automatic inspection reports.
[0053] As an example of an embodiment of the present invention, the fault identification result includes a component number. The step of performing structural segmentation processing on the target structural image to obtain a component region label map specifically involves: dividing the pixel space of the target structural image according to the preset structural points using a preset distance-based geometric segmentation method to obtain multiple component regions; determining the component number corresponding to each pixel in the component region according to the preset component topology relationship to obtain the component region label map.
[0054] In this embodiment, to support structural semantic modeling, a component region label map is further constructed. The label image is related to the target structure image. The images are of the same size and formatted as single-channel integer images, where the value of each pixel represents its component number (e.g., 1 for knife switch, 2 for left insulator, 3 for contact, etc.). See the component area label diagram. In the process of generating it, the aforementioned key points Using the Voronoi region partitioning rule as the core, the image space of the target structure image is divided into multiple structural regions, for example, from the knife switch point. To the contact point The area formed by the connecting lines is classified as the disconnector area, the area between the two insulator base points constitutes the support structure area, and other areas are marked as background or undefined.
[0055] It should be noted that the component region label map does not require model inference; instead, it is directly generated in image space based on known geometric relationships, possessing clear spatial meaning and engineering interpretability. Each pixel in... Each structure corresponds to a structure number, which can be used directly in subsequent steps to locate the corresponding structure area, build a structure token, or guide fault identification.
[0056] As an example of an embodiment of the present invention, the step of obtaining multiple structure tokens by combining the semantic feature map and the component region label map specifically involves: for each component region in the component region label map, extracting initial feature vectors corresponding to all spatial locations in the component region from the semantic feature map; determining the weight coefficient of each spatial location based on the distance from the centroid of the component region; and performing a weighted average of the initial feature vectors based on the weight coefficients corresponding to all spatial locations to obtain the structure token corresponding to the component region.
[0057] In this embodiment, the component area label diagram With semantic feature map Since the dimensions are different, alignment is required for merging. Considering that the size of the component region label image is the same as that of the target structure image, the component region label image... downsampling to The structural numbering diagram is obtained. The position of each pixel in this image Store a component number For each component area Find all pixel positions belonging to this component, that is, all positions that satisfy the condition. Location In semantic feature map The semantic vectors in the code are averaged and pooled to obtain a single vector, which is the structure token corresponding to component region b. , represented as: ; in, This indicates that it belongs to the structure number in the structure numbering diagram. The set of all position coordinates, It is the channel vector at the corresponding position in the semantic feature map, i.e., the initial feature vector.
[0058] Furthermore, to enhance the ability of the structure token to identify the spatial boundaries of components, a spatial focusing regularization term is introduced. This item is used to constrain each structure token. During the generation process, a distance decay weighting function is used to give higher weights to pixels closer to the component center point in the feature averaging and lower weights to edge pixels, thereby enhancing the token's ability to perceive the component center. Specifically, this involves... Indicates component area The corresponding centroid coordinates, and the distance decay weight function are expressed as: ; in, It is the attenuation coefficient.
[0059] After introducing this weight, the structure token is updated to a weighted average form, represented as: ; in, It is a normalization factor that ensures the sum of all weights is 1. This mechanism significantly enhances the ability of structural tokens to perceive the central features of the target region, and is particularly suitable for industrial component scenarios with blurred boundaries and crowded structures, such as power distribution disconnect switches, thereby improving the response capability of subsequent fault identification models to minor faults.
[0060] in, It is a high-dimensional semantic representation of the entire image, which will be used as part of the image memory matrix in the Transformer decoder for subsequent interaction between the query vector and task prompts. The structure token set... It is a set of semantic vectors that correspond one-to-one with physical components, used as the initial input of the query to guide the task and determine the focus of attention of the Transformer decoder.
[0061] As an example of an embodiment of the present invention, the step of inputting the query vector into the decoder and performing fault identification under the guidance of the semantic feature map to obtain the fault identification result specifically involves: determining a structural boundary constraint weight map based on the component region label map, wherein the structural boundary constraint weight map is used to characterize the distance relationship from each spatial location to the boundary of the component region; in the decoder, performing cross-attention calculation on the query vector based on the structural boundary constraint weight map, wherein during the cross-attention calculation process, the confidence level outside the boundary of the component region is zeroed out, and the confidence level inside the boundary of the component region is determined according to the distance relationship to obtain the fault identification result.
[0062] In this embodiment, a bidirectional interactive encoding strategy is adopted to fuse the structure token with the task hint vector in the model: for each structure token... With task hint vector After concatenation, it is mapped to a fused query vector. Then, it is input into the Transformer decoder module as a query sequence, along with the semantic representation image. Cross-attention interaction is implemented. Considering the numerous structural obstructions and small fault areas of power equipment, this scheme incorporates a structural boundary constraint weight graph into the attention mechanism. This image, derived from the component region label image, is used to limit the attention range in the Transformer decoder, allowing high responses only within the target structural region. The confidence of this structural boundary constraint weight map is calculated as follows: ; in, These are the spatial coordinates in the semantic feature map. It is the query vector resulting from the fusion of structure and task. This is the image feature vector at the corresponding position in the semantic feature map. This indicates the distance from the location to the boundary of the component area. Distance map, To control the boundary penalty coefficient of the weights, This indicates the position in the structural boundary constraint weight diagram. Structural boundary weight values, It is all pixels in the normalization term. The corresponding boundary weights are used to ensure that the denominator of the softmax function also includes the boundary modulation information. The weight design ensures that the confidence level gradually decays within the structural boundary, effectively suppressing confidence drift to unstructured regions and thus improving fault identification and localization accuracy. After confidence focusing, the weighted features within the focused region are aggregated, and then a two-layer fully connected network is used to complete the fault probability calculation. Predicted fault location coordinates The return of.
[0063] As an example of an embodiment of the present invention, the power equipment fault identification method further includes: obtaining an initial encoder and an initial decoder, forming an initial fault identification network by combining the initial encoder and the initial decoder; training the initial fault identification network, and during the training process, performing cross-attention calculation of the decoder based on sparsity regularization to obtain a target fault identification network including the decoder.
[0064] In this embodiment, considering that faults in distribution disconnect switches often exhibit characteristics such as blurred edges, weakened textures, and large variations in lighting, traditional classification loss functions cannot adequately distinguish the boundaries between normal and minor faults. Therefore, we introduce a regularization term based on the sparsity of region attention aggregation. This regularization term is used to enable the model to automatically compress regions with higher weights when outputting the attention map, thereby improving the discriminative power of fault identification. ; The aforementioned sparsity regularization term is essentially a negative entropy term of the weighted confidence level, used to constrain the concentration of the confidence level distribution and enhance the model's response capability to minor faults in component regions. It is particularly suitable for the uneven distribution problem in power equipment where "the target area is large and the fault area is small." It should be noted that this term is only added to the loss function for constraint during the training phase and does not affect the computational efficiency during the inference phase.
[0065] like Figure 2 As shown, based on the above-described method embodiments, an embodiment of the present invention provides a power equipment fault identification system 200, including: a preprocessing module 201, a token generation module 202, and an identification module 203; The preprocessing module 201 is used to perform spatial standardization processing on the original structural images of the power equipment to obtain target structural images, and to perform structural segmentation processing on the target structural images to obtain component region label images. The token generation module 202 is used to input the target structure image into a preset hybrid coding network to obtain a semantic feature map, and combine the semantic feature map and the component region label map to obtain multiple structure tokens, wherein the structure tokens correspond one-to-one with the component regions of the power equipment; The identification module 203 is used to fuse the structure token with a preset task prompt vector to obtain a query vector, input the query vector into the decoder, and perform fault identification under the guidance of the semantic feature map to obtain a fault identification result.
[0066] Furthermore, the original structural images of the power equipment are spatially normalized to obtain the target structural images, specifically as follows: Multiple preset structural points are obtained by detecting the original structural image; The affine transformation matrix is calculated based on all the preset structural points, and the original structural image is transformed according to the affine transformation matrix to obtain the target structural image.
[0067] By detecting preset structural points, key points can be used as geometric anchor points, resulting in high accuracy of the affine transformation base data. Calculating the affine transformation matrix and performing the transformation improves the geometric consistency of the image, aligning images from different devices and perspectives to a unified coordinate system and reducing feature matching errors.
[0068] Furthermore, the fault identification result includes fault coordinates, and the power equipment fault identification system is also used for: Obtain the attention map from the decoder; In the attention map, a preset number of second pixels are selected based on the confidence level of all first pixels. Based on the inverse of the affine transformation matrix, the coordinates of all the second pixels are inversely transformed to obtain the initial coordinates of each second pixel. The confidence weight coefficient is determined based on the confidence level corresponding to the second pixel, and the initial coordinates are weighted and averaged according to the confidence weight coefficient to obtain the fault coordinates.
[0069] By extracting the attention map from the decoder, the fault response heatmap can be obtained in real time, and the location information can be visualized. High-confidence pixels are selected to retain the most reliable fault response and suppress noise points. The coordinates are restored by inverse transformation, which reduces the error of the original image coordinates and improves the geometric accuracy. By using a confidence-weighted average, the weight of high-confidence points can be increased, thereby improving the accuracy of fault coordinates.
[0070] Furthermore, the fault identification result includes the component number, and the structural segmentation processing of the target structure image to obtain the component region label map specifically involves: Based on the preset structural points, a preset distance-based geometric partitioning method is used to divide the pixel space of the target structural image to obtain multiple component regions; Based on the preset component topology, the component number corresponding to each pixel in the component region is determined, and the component region label map is obtained.
[0071] This distance-based geometric partitioning makes pixel assignment calculation simple and efficient, and ensures continuous and closed component boundaries. By introducing component topological relationships, the label diagram conforms to electrical structure knowledge, thus improving semantic consistency.
[0072] Furthermore, the process of combining the semantic feature map and the component region label map to obtain multiple structural tokens specifically involves: For each component region in the component region label map, an initial feature vector corresponding to all spatial locations in the component region is extracted from the semantic feature map; The weighting coefficient of each spatial location is determined based on the distance from the center of gravity of the component region. Based on the weight coefficients corresponding to all the spatial locations, the initial feature vector is weighted and averaged to obtain the structural token corresponding to the component region.
[0073] This method extracts initial feature vectors by component region, with each feature corresponding to a physical component, thus improving semantic focus. Weighting is applied based on distance from the centroid, resulting in higher weights closer to the centroid. This enhances the token's sensitivity to core fault regions, suppresses edge background noise, and simultaneously increases the accuracy of fault classification and localization.
[0074] Further, the step of inputting the query vector into the decoder and performing fault identification under the guidance of the semantic feature map to obtain the fault identification result is as follows: A structural boundary constraint weight map is determined based on the component region label map, and the structural boundary constraint weight map is used to characterize the distance relationship from each spatial location to the boundary of the component region; In the decoder, cross-attention calculation is performed on the query vector based on the structural boundary constraint weight graph. During the cross-attention calculation, the attention score outside the boundary of the component region is zeroed out and the attention score inside the boundary of the component region is determined according to the distance relationship to obtain the fault identification result.
[0075] Based on the structural boundary constraint weight map, attention outside the boundary is forced to zero, cross-component interference is removed, and the signal-to-noise ratio is improved; distance-weighted attention inside the boundary can achieve higher attention closer to the component center, sharper fault response peaks, and improved detection rate of small target faults.
[0076] Furthermore, the power equipment fault identification system is also used for: An initial encoder is obtained, and the initial encoder is trained. During the training process, cross-attention constraints are calculated based on sparsity regularization to obtain the decoder.
[0077] By training based on sparsity regularization, the attention distribution is compressed, the high-response region is concentrated, and the model's sensitivity to minor faults is enhanced. Regularization constraints are applied throughout the training process, and no additional computation is required during inference, directly inheriting the highly sparsity and highly focused attention characteristics.
[0078] Furthermore, the power equipment fault identification system is also used for: Obtain a preset power equipment knowledge base, wherein the power equipment knowledge base is a database including multiple fault detection instructions; The task prompt vector is obtained by semantically encoding each of the fault detection instructions.
[0079] In this way, the power equipment knowledge base stores fault detection instructions, and the task prompt vectors are semantically accurate. The instructions are semantically encoded, and the prompt vectors are consistent with the operation and maintenance language, which reduces the decoding bias and improves the fault classification accuracy.
[0080] It is understood that the above system embodiments correspond to the method embodiments of the present invention, and can implement the power equipment fault identification method provided by any of the above method embodiments of the present invention.
[0081] It should be noted that the system embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0082] For ease of description and brevity, the system embodiments of the present invention include all the implementation methods described in the above embodiments of the power equipment fault identification method, and will not be repeated here.
[0083] Based on the above embodiments of the power equipment fault identification method, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. The processor executes the following processes to implement the power equipment fault identification method of any embodiment of the present invention: Spatial normalization processing is performed on the original structural images of the power equipment to obtain target structural images, and structural segmentation processing is performed on the target structural images to obtain component region label images; The target structure image is input into a preset hybrid coding network to obtain a semantic feature map. The semantic feature map and the component region label map are combined to obtain multiple structure tokens, wherein each structure token corresponds one-to-one with a component region of the power equipment. The structure token is fused with a preset task prompt vector to obtain a query vector. The query vector is then input into the decoder, and fault identification is performed under the guidance of the semantic feature map to obtain the fault identification result.
[0084] Furthermore, the original structural images of the power equipment are spatially normalized to obtain the target structural images, specifically as follows: Multiple preset structural points are obtained by detecting the original structural image; The affine transformation matrix is calculated based on all the preset structural points, and the original structural image is transformed according to the affine transformation matrix to obtain the target structural image.
[0085] By detecting preset structural points, key points can be used as geometric anchor points, resulting in high accuracy of the affine transformation base data. Calculating the affine transformation matrix and performing the transformation improves the geometric consistency of the image, aligning images from different devices and perspectives to a unified coordinate system and reducing feature matching errors.
[0086] Furthermore, the fault identification result includes fault coordinates, and the processor also performs the following processes: Obtain the attention map from the decoder; In the attention map, a preset number of second pixels are selected based on the confidence level of all first pixels. Based on the inverse of the affine transformation matrix, the coordinates of all the second pixels are inversely transformed to obtain the initial coordinates of each second pixel. The confidence weight coefficient is determined based on the confidence level corresponding to the second pixel, and the initial coordinates are weighted and averaged according to the confidence weight coefficient to obtain the fault coordinates.
[0087] By extracting the attention map from the decoder, the fault response heatmap can be obtained in real time, and the location information can be visualized. High-confidence pixels are selected to retain the most reliable fault response and suppress noise points. The coordinates are restored by inverse transformation, which reduces the error of the original image coordinates and improves the geometric accuracy. By using a confidence-weighted average, the weight of high-confidence points can be increased, thereby improving the accuracy of fault coordinates.
[0088] Furthermore, the fault identification result includes the component number, and the structural segmentation processing of the target structure image to obtain the component region label map specifically involves: Based on the preset structural points, a preset distance-based geometric partitioning method is used to divide the pixel space of the target structural image to obtain multiple component regions; Based on the preset component topology, the component number corresponding to each pixel in the component region is determined, and the component region label map is obtained.
[0089] This distance-based geometric partitioning makes pixel assignment calculation simple and efficient, and ensures continuous and closed component boundaries. By introducing component topological relationships, the label diagram conforms to electrical structure knowledge, thus improving semantic consistency.
[0090] Furthermore, the process of combining the semantic feature map and the component region label map to obtain multiple structural tokens specifically involves: For each component region in the component region label map, an initial feature vector corresponding to all spatial locations in the component region is extracted from the semantic feature map; The weighting coefficient of each spatial location is determined based on the distance from the center of gravity of the component region. Based on the weight coefficients corresponding to all the spatial locations, the initial feature vector is weighted and averaged to obtain the structural token corresponding to the component region.
[0091] This method extracts initial feature vectors by component region, with each feature corresponding to a physical component, thus improving semantic focus. Weighting is applied based on distance from the centroid, resulting in higher weights closer to the centroid. This enhances the token's sensitivity to core fault regions, suppresses edge background noise, and simultaneously increases the accuracy of fault classification and localization.
[0092] Further, the step of inputting the query vector into the decoder and performing fault identification under the guidance of the semantic feature map to obtain the fault identification result is as follows: A structural boundary constraint weight map is determined based on the component region label map, and the structural boundary constraint weight map is used to characterize the distance relationship from each spatial location to the boundary of the component region; In the decoder, cross-attention calculation is performed on the query vector based on the structural boundary constraint weight graph. During the cross-attention calculation, the attention score outside the boundary of the component region is zeroed out and the attention score inside the boundary of the component region is determined according to the distance relationship to obtain the fault identification result.
[0093] Based on the structural boundary constraint weight map, attention outside the boundary is forced to zero, cross-component interference is removed, and the signal-to-noise ratio is improved; distance-weighted attention inside the boundary can achieve higher attention closer to the component center, sharper fault response peaks, and improved detection rate of small target faults.
[0094] Furthermore, the processor also performs the following processes: An initial encoder is obtained, and the initial encoder is trained. During the training process, cross-attention constraints are calculated based on sparsity regularization to obtain the decoder.
[0095] By training based on sparsity regularization, the attention distribution is compressed, the high-response region is concentrated, and the model's sensitivity to minor faults is enhanced. Regularization constraints are applied throughout the training process, and no additional computation is required during inference, directly inheriting the highly sparsity and highly focused attention characteristics.
[0096] Furthermore, the processor also performs the following processes: Obtain a preset power equipment knowledge base, wherein the power equipment knowledge base is a database including multiple fault detection instructions; The task prompt vector is obtained by semantically encoding each of the fault detection instructions.
[0097] In this way, the power equipment knowledge base stores fault detection instructions, and the task prompt vectors are semantically accurate. The instructions are semantically encoded, and the prompt vectors are consistent with the operation and maintenance language, which reduces the decoding bias and improves the fault classification accuracy.
[0098] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.
[0099] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0100] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0101] Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the following processes: Spatial normalization processing is performed on the original structural images of the power equipment to obtain target structural images, and structural segmentation processing is performed on the target structural images to obtain component region label images; The target structure image is input into a preset hybrid coding network to obtain a semantic feature map. The semantic feature map and the component region label map are combined to obtain multiple structure tokens, wherein each structure token corresponds one-to-one with a component region of the power equipment. The structure token is fused with a preset task prompt vector to obtain a query vector. The query vector is then input into the decoder, and fault identification is performed under the guidance of the semantic feature map to obtain the fault identification result.
[0102] Furthermore, the original structural images of the power equipment are spatially normalized to obtain the target structural images, specifically as follows: Multiple preset structural points are obtained by detecting the original structural image; The affine transformation matrix is calculated based on all the preset structural points, and the original structural image is transformed according to the affine transformation matrix to obtain the target structural image.
[0103] By detecting preset structural points, key points can be used as geometric anchor points, resulting in high accuracy of the affine transformation base data. Calculating the affine transformation matrix and performing the transformation improves the geometric consistency of the image, aligning images from different devices and perspectives to a unified coordinate system and reducing feature matching errors.
[0104] Furthermore, the fault identification result includes fault coordinates, and the device containing the computer-readable storage medium further performs the following processes: Obtain the attention map from the decoder; In the attention map, a preset number of second pixels are selected based on the confidence level of all first pixels. Based on the inverse of the affine transformation matrix, the coordinates of all the second pixels are inversely transformed to obtain the initial coordinates of each second pixel. The confidence weight coefficient is determined based on the confidence level corresponding to the second pixel, and the initial coordinates are weighted and averaged according to the confidence weight coefficient to obtain the fault coordinates.
[0105] By extracting the attention map from the decoder, the fault response heatmap can be obtained in real time, and the location information can be visualized. High-confidence pixels are selected to retain the most reliable fault response and suppress noise points. The coordinates are restored by inverse transformation, which reduces the error of the original image coordinates and improves the geometric accuracy. By using a confidence-weighted average, the weight of high-confidence points can be increased, thereby improving the accuracy of fault coordinates.
[0106] Furthermore, the fault identification result includes the component number, and the structural segmentation processing of the target structure image to obtain the component region label map specifically involves: Based on the preset structural points, a preset distance-based geometric partitioning method is used to divide the pixel space of the target structural image to obtain multiple component regions; Based on the preset component topology, the component number corresponding to each pixel in the component region is determined, and the component region label map is obtained.
[0107] This distance-based geometric partitioning makes pixel assignment calculation simple and efficient, and ensures continuous and closed component boundaries. By introducing component topological relationships, the label diagram conforms to electrical structure knowledge, thus improving semantic consistency.
[0108] Furthermore, the process of combining the semantic feature map and the component region label map to obtain multiple structural tokens specifically involves: For each component region in the component region label map, an initial feature vector corresponding to all spatial locations in the component region is extracted from the semantic feature map; The weighting coefficient of each spatial location is determined based on the distance from the center of gravity of the component region. Based on the weight coefficients corresponding to all the spatial locations, the initial feature vector is weighted and averaged to obtain the structural token corresponding to the component region.
[0109] This method extracts initial feature vectors by component region, with each feature corresponding to a physical component, thus improving semantic focus. Weighting is applied based on distance from the centroid, resulting in higher weights closer to the centroid. This enhances the token's sensitivity to core fault regions, suppresses edge background noise, and simultaneously increases the accuracy of fault classification and localization.
[0110] Further, the step of inputting the query vector into the decoder and performing fault identification under the guidance of the semantic feature map to obtain the fault identification result is as follows: A structural boundary constraint weight map is determined based on the component region label map, and the structural boundary constraint weight map is used to characterize the distance relationship from each spatial location to the boundary of the component region; In the decoder, cross-attention calculation is performed on the query vector based on the structural boundary constraint weight graph. During the cross-attention calculation, the attention score outside the boundary of the component region is zeroed out and the attention score inside the boundary of the component region is determined according to the distance relationship to obtain the fault identification result.
[0111] Based on the structural boundary constraint weight map, attention outside the boundary is forced to zero, cross-component interference is removed, and the signal-to-noise ratio is improved; distance-weighted attention inside the boundary can achieve higher attention closer to the component center, sharper fault response peaks, and improved detection rate of small target faults.
[0112] Furthermore, the device containing the computer-readable storage medium also performs the following processes: An initial encoder is obtained, and the initial encoder is trained. During the training process, cross-attention constraints are calculated based on sparsity regularization to obtain the decoder.
[0113] By training based on sparsity regularization, the attention distribution is compressed, the high-response region is concentrated, and the model's sensitivity to minor faults is enhanced. Regularization constraints are applied throughout the training process, and no additional computation is required during inference, directly inheriting the highly sparsity and highly focused attention characteristics.
[0114] Furthermore, the device containing the computer-readable storage medium also performs the following processes: Obtain a preset power equipment knowledge base, wherein the power equipment knowledge base is a database including multiple fault detection instructions; The task prompt vector is obtained by semantically encoding each of the fault detection instructions.
[0115] In this way, the power equipment knowledge base stores fault detection instructions, and the task prompt vectors are semantically accurate. The instructions are semantically encoded, and the prompt vectors are consistent with the operation and maintenance language, which reduces the decoding bias and improves the fault classification accuracy.
[0116] Based on the above-described method embodiments, this invention also provides a computer program / program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of any of the above-described method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0117] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0118] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for identifying faults in power equipment, characterized in that, include: Spatial normalization processing is performed on the original structural images of the power equipment to obtain target structural images, and structural segmentation processing is performed on the target structural images to obtain component region label images; The target structure image is input into a preset hybrid coding network to obtain a semantic feature map. The semantic feature map and the component region label map are combined to obtain multiple structure tokens, wherein each structure token corresponds one-to-one with a component region of the power equipment. The structure token is fused with a preset task prompt vector to obtain a query vector. The query vector is then input into the decoder, and fault identification is performed under the guidance of the semantic feature map to obtain the fault identification result.
2. The power equipment fault identification method as described in claim 1, characterized in that, The original structural images of the power equipment are spatially normalized to obtain the target structural images, specifically as follows: Multiple preset structural points are obtained by detecting the original structural image; The affine transformation matrix is calculated based on all the preset structural points, and the original structural image is transformed according to the affine transformation matrix to obtain the target structural image.
3. The power equipment fault identification method as described in claim 2, characterized in that, in, The fault identification result includes fault coordinates, and the power equipment fault identification method further includes: Obtain the attention map from the decoder; In the attention map, a preset number of second pixels are selected based on the confidence level of all first pixels. Based on the inverse of the affine transformation matrix, the coordinates of all the second pixels are inversely transformed to obtain the initial coordinates of each second pixel. The confidence weight coefficient is determined based on the confidence level corresponding to the second pixel, and the initial coordinates are weighted and averaged according to the confidence weight coefficient to obtain the fault coordinates.
4. The power equipment fault identification method as described in claim 2, characterized in that, The fault identification result includes the component number. The process of performing structural segmentation on the target structure image to obtain a component region label map is as follows: Based on the preset structural points, a preset distance-based geometric partitioning method is used to divide the pixel space of the target structural image to obtain multiple component regions; Based on the preset component topology, the component number corresponding to each pixel in the component region is determined, and the component region label map is obtained.
5. The power equipment fault identification method as described in claim 1 or 4, characterized in that, The process of combining the semantic feature map and the component region label map to obtain multiple structural tokens is as follows: For each component region in the component region label map, an initial feature vector corresponding to all spatial locations in the component region is extracted from the semantic feature map; The weighting coefficient of each spatial location is determined based on the distance from the center of gravity of the component region. Based on the weight coefficients corresponding to all the spatial locations, the initial feature vector is weighted and averaged to obtain the structural token corresponding to the component region.
6. The power equipment fault identification method as described in claim 5, characterized in that, The process involves inputting the query vector into the decoder and performing fault identification under the guidance of the semantic feature map to obtain the fault identification result, specifically as follows: A structural boundary constraint weight map is determined based on the component region label map, and the structural boundary constraint weight map is used to characterize the distance relationship from each spatial location to the boundary of the component region; In the decoder, cross-attention calculation is performed on the query vector based on the structural boundary constraint weight graph. During the cross-attention calculation process, the attention score outside the boundary of the component region is zeroed out and the attention score inside the boundary of the component region is determined according to the distance relationship to obtain the fault identification result.
7. The power equipment fault identification method as described in claim 1, characterized in that, The power equipment fault identification method further includes: Obtain the initial encoder and the initial decoder, and combine the initial encoder and the initial decoder to form an initial fault identification network; The initial fault identification network is trained, and during the training process, the cross-attention of the decoder is calculated based on sparsity regularization to obtain the target fault identification network including the decoder.
8. The power equipment fault identification method as described in claim 1, characterized in that, The power equipment fault identification method further includes: Obtain a preset power equipment knowledge base, wherein the power equipment knowledge base is a database including multiple fault detection instructions; The task prompt vector is obtained by semantically encoding each of the fault detection instructions.
9. A power equipment fault identification system, characterized in that, include: Preprocessing module, token generation module, and recognition module; The preprocessing module is used to perform spatial standardization processing on the original structural images of the power equipment to obtain target structural images, and to perform structural segmentation processing on the target structural images to obtain component region label images. The token generation module is used to input the target structure image into a preset hybrid coding network to obtain a semantic feature map, and combine the semantic feature map and the component region label map to obtain multiple structure tokens, wherein the structure tokens correspond one-to-one with the component regions of the power equipment; The identification module is used to fuse the structure token with a preset task prompt vector to obtain a query vector, input the query vector into the decoder, and perform fault identification under the guidance of the semantic feature map to obtain the fault identification result.
10. A terminal device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements the power equipment fault identification method as described in any one of claims 1-8.