Anti-measure anomaly detection method and device for electric power facility, terminal equipment and storage medium

By identifying the scene category of the inspection image and comparing the differences between the generated expected heatmap and the reconstructed heatmap, the problem that existing detection methods cannot accurately determine the risk of countermeasures in different scenarios is solved, and higher detection accuracy is achieved.

CN121837802APending Publication Date: 2026-04-10GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-13
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing detection methods rely on local features and cannot accurately determine the risk of countermeasures in different scenarios, leading to missed detections and false detections.

Method used

By identifying the scene category of the inspection images, the corresponding structural configuration template is obtained. The teacher skeleton model is used to generate a structural expectation heatmap, and the student skeleton model is combined to generate a structural reconstruction heatmap. The differences are compared to determine the anomaly detection results of the countermeasures.

Benefits of technology

It improves the accuracy of countermeasure anomaly detection, enabling accurate identification of structural defects and deployment anomalies in different scenarios, reducing missed detections and false detections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121837802A_ABST
    Figure CN121837802A_ABST
Patent Text Reader

Abstract

The invention discloses an anti-measure anomaly detection method and device for an electric power facility, terminal equipment and a storage medium, and relates to the field of anomaly detection, and the method comprises the steps: obtaining an inspection image of a to-be-detected electric power facility; identifying a corresponding scene category according to the inspection image, and extracting a structure configuration template corresponding to the scene category from a preset structure rule base; inputting the inspection image and the structure configuration template into the teacher skeleton model to generate a structure expected heat map; the structure expected heat map is used for representing the confidence degree of the structure component which should exist at each pixel position in the inspection image; inputting the inspection image into the student skeleton model to generate a structure reconstruction heat map; and comparing the structure reconstruction heat map with the structure expected heat map to generate a structure difference map, and further determining an anti-measure anomaly detection result. By implementing the method and the device, the problem that an existing detection method depends on local features and cannot accurately judge anti-measure risks in different scenes can be solved, and the accuracy of anti-measure anomaly detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of anomaly detection, and more particularly to a method, apparatus, terminal equipment, and storage medium for detecting countermeasure anomalies in power facilities. Background Technology

[0002] With the continuous expansion of my country's energy infrastructure and the large-scale integration of new energy equipment, the power grid operating environment and equipment configuration are becoming increasingly complex. The effective implementation of anti-accident measures (hereinafter referred to as "anti-accident measures") has become an important foundation for ensuring the safe operation of the power system.

[0003] However, in actual inspection and maintenance, the configuration standards for countermeasures vary significantly in different scenarios. The same structure may be a mandatory item in some environments but not necessary in others. This makes it difficult for traditional detection methods that rely on local features to directly determine whether it constitutes a risk, and it is easy to miss or misdetect. Summary of the Invention

[0004] This invention provides a method, device, terminal equipment, and storage medium for detecting anomalies in countermeasures of power facilities. It can solve the problem that existing detection methods rely on local features and cannot accurately determine the risk of countermeasures in different scenarios, thereby improving the accuracy of countermeasure anomaly detection.

[0005] An embodiment of the present invention provides a method for detecting anomalies in countermeasures of power facilities, comprising: Acquire inspection images of the power facilities to be inspected; Based on the inspection images, identify the corresponding scene categories and extract the structure configuration templates corresponding to the scene categories from the preset structure rule library; The inspection image and structural configuration template are input into the trained teacher skeleton model, so that the teacher skeleton model generates a structural expectation heatmap based on the inspection image and structural configuration template; the structural expectation heatmap is used to characterize the confidence of the structural components that should exist at each pixel position in the inspection image; The inspection images are input into the trained student skeleton model so that the student skeleton model can generate a structural reconstruction heatmap based on the inspection images. The reconstructed heatmap is compared with the expected heatmap to generate a structural difference map. Based on the structural difference diagram, determine the anomaly detection results of the countermeasures.

[0006] Furthermore, after generating the structural difference map, the process also includes: Based on the template embedding vector, the first connection vector between teacher structural items is constructed; the template embedding vector is obtained by multilayer perceptron encoding each structural item in the structural configuration template by the teacher skeleton model. Extract the set of coordinates of the structural response center from the structural reconstruction heatmap; Based on the set of structural response center coordinates, construct a second connection vector between the student structural positions; Calculate the structural connectivity consistency score based on the first and second connectivity vectors; Based on the structural difference diagram, determine the anomaly detection results of the countermeasures, including: Based on the structural difference map, identify whether there are structural defects or anomalies in the inspection images; Based on the structural connectivity consistency score, identify whether there are structural layout abnormalities in the inspection images; Based on the identification results of structural missing anomalies and structural layout anomalies, the countermeasure anomaly detection results are obtained.

[0007] Furthermore, based on the inspection images, the corresponding scene categories are identified, including: The inspection image is input into the trained classification model, so that the classification model performs convolution operation, feature normalization and nonlinear activation processing on the inspection image through the built-in convolution module to obtain scene semantic features. The built-in fully connected layer maps the semantic features of the scene to obtain the probabilities of various scenes; The scene category index corresponding to the highest probability value among various scene probabilities is selected as the scene category corresponding to the inspection image.

[0008] Furthermore, based on the inspection images and structural configuration templates, a desired structural heatmap is generated, including: The built-in convolutional network extracts intermediate semantic feature tensors from the inspection images. Each structural item in the structural configuration template is encoded using a multilayer perceptron to obtain a template embedding vector; The inner product operation is performed on the transpose of the intermediate semantic feature tensor and the template embedding vector to obtain the feature matching score of the structure term at each position in the inspection image. After normalizing the feature matching scores at each location using the Sigmoid function, a weighted operation is performed by combining the necessity markers in the structure configuration template with the region spatial mask to obtain the constraint response values ​​of the structure item at each location in the inspection image; the region spatial mask is obtained based on the normalized spatial region in the structure configuration template. The expected heatmap of the structure is obtained by weighting and summing the constraint response values ​​at each location and the preset prior probabilities of the region.

[0009] Furthermore, based on the inspection images, a structural reconstruction heatmap is generated, including: The built-in symmetric convolutional encoder performs multi-layer convolution, normalization, and nonlinear activation processing on the inspection image to obtain the image feature tensor. The built-in symmetric convolutional decoder decodes and restores the image feature tensor to obtain a structural reconstruction heatmap.

[0010] Furthermore, the teacher skeleton model was determined in the following way: Acquire several training samples; each training sample includes: an inspection training image and its corresponding structural configuration training template and structural expectation labeling heatmap; Several training samples are input into the teacher skeleton model to be trained, so that the teacher skeleton model takes the inspection training image and its corresponding structural configuration training template as input and the structural expectation prediction heatmap as output for iterative training. In each training process, the loss value is calculated based on the structural expectation prediction heatmap and the structural expectation labeling heatmap, and the model parameters of the teacher skeleton model are adjusted according to the loss value until the loss value converges, thus obtaining the trained teacher skeleton model.

[0011] Furthermore, the student skeleton model was determined in the following way: Several inspection training images and their corresponding structural expectation prediction heatmaps and template embedding prediction vectors are input into the student skeleton model to be trained, so that the student skeleton model can perform iterative training with the inspection training images as input and the structural reconstruction prediction heatmaps as output; the template embedding prediction vectors are obtained by the teacher skeleton model to be trained through multilayer perceptron encoding of each structural item in the structural configuration training template. In each training process, the built-in symmetric convolutional encoder performs multi-layer convolution, normalization and non-linear activation processing on the inspection training images to obtain the image feature prediction tensor. Based on the template embedding prediction vector, the image feature prediction tensor is aligned in the feature space to obtain the aligned image feature prediction tensor. The aligned image feature prediction tensor is decoded and restored by the built-in symmetric convolutional decoder to obtain the structure reconstruction prediction heatmap. Based on the structural reconstruction prediction heatmap and the structural expectation prediction heatmap, the contrastive loss function value is calculated, and the model parameters of the symmetric convolutional encoder and symmetric convolutional decoder in the student skeleton model are adjusted according to the contrastive loss function value until the contrastive loss function value converges, thus obtaining the trained student skeleton model.

[0012] Based on the above method embodiments, the present invention provides corresponding device embodiments, including: an inspection image acquisition module, a scene configuration module, a structural expected heatmap generation module, a structural reconstruction heatmap generation module, a difference comparison module, and a detection result determination module; The inspection image acquisition module is used to acquire inspection images of the power facilities to be inspected. The scene configuration module is used to identify the corresponding scene category based on the inspection image and extract the structure configuration template corresponding to the scene category from the preset structure rule library; The structural expectation heatmap generation module is used to input the inspection image and structural configuration template into the trained teacher skeleton model, so that the teacher skeleton model can generate a structural expectation heatmap based on the inspection image and structural configuration template; the structural expectation heatmap is used to characterize the confidence of the structural components that should exist at each pixel position in the inspection image; The structural reconstruction heatmap generation module is used to input the inspection images into the trained student skeleton model so that the student skeleton model can generate structural reconstruction heatmaps based on the inspection images. The difference comparison module is used to compare the reconstructed structure heatmap with the expected structure heatmap to generate a structure difference map. The detection result determination module is used to determine the anomaly detection result of the countermeasure based on the structural difference diagram.

[0013] Based on the above method embodiments, the present invention provides a corresponding terminal device embodiment, including: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the steps of the power facility countermeasure anomaly detection method as described in the present invention.

[0014] Based on the above method embodiments, the present invention provides a corresponding computer-readable storage medium embodiment, including: a stored computer program, which, when the computer program is running, controls the device where the computer-readable storage medium is located to perform the steps of the power facility countermeasure anomaly detection method as described in the present invention.

[0015] Compared with the prior art, the beneficial effects of this embodiment are as follows: This invention acquires inspection images of power facilities to be inspected, identifies the corresponding scene categories, and extracts structural configuration templates corresponding to the scene categories from a preset structural rule library, providing exclusive countermeasure judgment benchmarks for different scenes. The inspection images and structural configuration templates are input into a teacher skeleton model to generate a structural expectation heatmap, which characterizes the confidence level of structural components that should exist at each pixel position in the inspection image, providing a quantifiable reference for the required structure for anomaly judgment. Simultaneously, the inspection images are input into a student skeleton model to generate a structural reconstruction heatmap, reflecting the distribution of structural expectation confidence inferred from the inspection images. The structural reconstruction heatmap is compared with the structural expectation heatmap to generate a structural difference map, thereby identifying the deviation areas between the actual visually presented structure and the required structure. Finally, based on the structural difference map, the anomaly detection result of the countermeasure is determined.

[0016] In summary, this invention solves the problem that existing detection methods rely on local features and cannot accurately determine the risk of countermeasures in different scenarios by identifying the scene category of inspection images and extracting the corresponding structural configuration template, combining the dual skeleton model to generate structural expectation heatmaps and structural reconstruction heatmaps, and comparing and judging countermeasure anomalies. This improves the accuracy of countermeasure anomaly detection. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating an anomaly detection method for countermeasures in power facilities according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of a power facility anomaly detection device provided in an embodiment of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] In the description of this invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0020] like Figure 1 As shown, in order to address the problem that existing detection methods rely on local features and cannot accurately determine the risk of countermeasures in different scenarios, an embodiment of the present invention provides a method for detecting anomalies in countermeasures of power facilities. This method includes at least the following steps: Step S1: Obtain inspection images of the power facilities to be inspected; For step S1, inspection images of the power facilities to be inspected are collected using on-site inspection equipment commonly used in power operation and maintenance. In this embodiment, a fixed camera installed near the power pole can collect images of the pole and surrounding facilities at a fixed point. The drone can cover power facilities in complex terrain or large areas through maneuvering flight, and obtain multi-view, highly flexible inspection images.

[0021] The collected inspection images are three-dimensional tensors. ,in, The width of the inspection image is in pixels. The height of the inspection image is the number of pixels, with a dimension of 3 corresponding to the red, green, and blue channels.

[0022] Preferably, the inspection images are adjusted to a preset uniform size while retaining the three-channel color format, resulting in preprocessed inspection images. This preprocessing step eliminates differences in image size and format between different acquisition devices and shooting conditions, thus meeting the input requirements for subsequent model processing.

[0023] Step S2: Based on the inspection images, identify the corresponding scene categories and extract the structure configuration templates corresponding to the scene categories from the preset structure rule library; In a preferred embodiment, identifying the corresponding scene category based on the inspection image includes: The inspection image is input into the trained classification model, so that the classification model performs convolution operation, feature normalization and nonlinear activation processing on the inspection image through the built-in convolution module to obtain scene semantic features. The built-in fully connected layer maps the semantic features of the scene to obtain the probabilities of various scenes; The scene category index corresponding to the highest probability value among various scene probabilities is selected as the scene category corresponding to the inspection image.

[0024] For step S2, in the task of identifying potential hazards related to electricity, the environment in which power facilities are located is highly diverse. For example, poles near roads usually need to be equipped with anti-collision blocks and reflective signs, while lines crossing waterways need to have corrosion-resistant foundation structures. Therefore, this invention determines the scene category based on the inspection images and calls the corresponding structural rule template.

[0025] Specifically, the inspection image is input into the trained classification model. It utilizes three built-in convolutional modules, each containing a convolutional layer, a normalization layer, and a non-linear activation layer. The convolutional layer first performs convolution operations on the inspection image to extract local visual features. Subsequently, the normalization layer normalizes the extracted local visual features, making the feature distribution more stable and improving the model's generalization ability. The non-linear activation layer introduces complex feature patterns through non-linear transformations. After these processes, the inspection image is transformed into features that represent scene semantics, i.e., scene semantic features.

[0026] After obtaining the scene semantic features, the fully connected layer of the classification model will map the scene semantic features to a preset... For each scene category dimension, the predicted probability of each scene category is output, ultimately forming a sequence of length [length missing]. The probability vector is used to select the index corresponding to the maximum probability value as the scene category index. This index represents the scene category corresponding to the current inspection image. , under the specific formula: ; in, The classification model represents the first... Predicted probability of scene category This is the functional form of the classification model. Represents inspection images. This indicates the scene category corresponding to the inspection image. In this embodiment, the scene category is a roadside area, a water crossing area, an elevated intersection area, a densely populated urban area, or a mountainous slope area.

[0027] After obtaining the scene category corresponding to the inspection image, the system's preset structure rule library is used. Read scene category Corresponding structural configuration template Structure configuration template The specific representation is as follows: ; in, Indicates the first The code for each structural component, which can be a crash barrier, reflective strip, or grounding device; Indicates the first The desired location region of each structural component in the image space; For the first The appearance or geometric parameters of a structural component, including side length ratios or stripe distribution characteristics; Indicates the first Necessary markings for each structural component, This indicates the total number of structural components included in the structural configuration template.

[0028] In this embodiment, the desired location area With normalized coordinate range It means that, among them, The minimum x-coordinate of the desired location region. The minimum ordinate of the desired location region. This represents the maximum x-coordinate of the desired location region. Represents the maximum ordinate of the desired location region; necessity marker , This indicates that the component structure must exist in the current scenario. This indicates that the component structure is optional in the current scenario.

[0029] Taking a roadside scenario as an example, its structural configuration template may include two mandatory components: reflective markings and crash barriers. The reflective markings are located in... Typically located in the lower half of the image, near the ground, the appearance characteristics of crash barriers. This is manifested as a rectangular shape in the vertical direction and specific texture features.

[0030] It should be noted that the classification model is determined in the following way: Obtain the training dataset, which contains several inspection scene images and their corresponding actual scene labels; Preferably, random flipping, translation, cropping, brightness or contrast adjustment, etc., can be used to augment the data of the inspection scene images to obtain a preprocessed training dataset to expand the sample size.

[0031] A classification model to be trained is constructed using a convolutional neural network (CNN) as the model framework. The preprocessed training dataset is input into the classification model to be trained, so that the classification model takes the inspection scene image as input and the predicted scene label as output for iterative training. In each training process, the cross-entropy loss is calculated based on the error between the predicted scene label and the actual scene label. Using the optimizer and gradient descent strategy, the cross-entropy loss is propagated back to each layer of the network through the backpropagation algorithm to update the weights and biases of the classification model until the cross-entropy loss converges, and finally the trained classification model is obtained.

[0032] Step S3: Input the inspection image and structural configuration template into the trained teacher skeleton model so that the teacher skeleton model can generate a structural expectation heatmap based on the inspection image and structural configuration template; the structural expectation heatmap is used to characterize the confidence of the structural components that should exist at each pixel position in the inspection image; In a preferred embodiment, generating a desired structural heatmap based on inspection images and a structural configuration template includes: The built-in convolutional network extracts intermediate semantic feature tensors from the inspection images. Each structural item in the structural configuration template is encoded using a multilayer perceptron to obtain a template embedding vector; The inner product operation is performed on the transpose of the intermediate semantic feature tensor and the template embedding vector to obtain the feature matching score of the structure term at each position in the inspection image. After normalizing the feature matching scores at each location using the Sigmoid function, a weighted operation is performed by combining the necessity markers in the structure configuration template with the region spatial mask to obtain the constraint response values ​​of the structure item at each location in the inspection image; the region spatial mask is obtained based on the normalized spatial region in the structure configuration template. The expected heatmap of the structure is obtained by weighting and summing the constraint response values ​​at each location and the preset prior probabilities of the region.

[0033] For step S3, the inspection image and structural configuration template are input into the trained teacher skeleton model. The teacher skeleton model extracts features from the inspection image and structural configuration template respectively, and processes the input inspection image through a built-in five-layer convolutional network. Perform deep feature extraction to generate an intermediate semantic feature tensor with scene semantic representation capabilities. It fully preserves the spatial dimension and deep visual semantic information of the image, among which, Let be the pixel dimension of the intermediate semantic feature tensor in the width direction. Let be the pixel dimension of the intermediate semantic feature tensor in the height direction. The feature dimension of the intermediate semantic feature tensor; Meanwhile, for structural configuration templates Each structural item in By encoding the structured parameters using a multilayer perceptron, the discrete template parameters are transformed into low-dimensional dense template embedding vectors. All structure items are encoded and stacked into a matrix. This enables the vectorized representation of structural templates.

[0034] For intermediate semantic feature tensors transpose of template embedding vector Perform inner product operations to calculate the feature matching score of the structure term at all pixel positions in the inspected image. This allows for the quantification of the degree of fit between the appearance, shape, and other features of structural items and the semantic features of the corresponding regions in the image, reflecting the potential matching degree of structural items at various locations in the image.

[0035] To transform the feature matching scores into reasonable confidence intervals that fit the constraints of the structural template, the model first normalizes the feature matching scores at each position using the Sigmoid function, thus limiting the feature matching scores to a certain range. Within the range.

[0036] Subsequently, the necessity markers in the structural configuration template were combined. With regional spatial mask Weighted calculations are performed, where the regional spatial mask is based on the normalized spatial regions in the template. The construction process only performs response calculations on pixels within the spatial region specified by the template, while also using necessity markers. For required components ( )Give higher weight, optional components ( By reducing the weights, the constraint response values ​​of each structural item at each position in the inspection image are finally obtained. This not only strictly conforms to the spatial layout requirements of the template, but also distinguishes the necessity differences of the components and eliminates redundant calculations in invalid areas.

[0037] Finally, the model introduces a region stability prior specific to the power line inspection scenario, matching the constraint response values ​​at each location with the preset region prior probabilities. Perform a weighted summation, where the region prior probability The frequency or probability of structural components appearing, obtained from statistical analysis of historical inspection images, serves as auxiliary input in the heatmap generation stage; ultimately, a desired structural heatmap is generated. Each pixel value represents the confidence level that a structural component should exist at that location.

[0038] Structural expected heatmap The formula for generating it is as follows: ; in, Indicates the inspection image in The expected heatmap pixel values ​​at the location. This represents the Sigmoid function, used to control the structure response in... Within the range; Indicates the location of the inspection image. The intermediate semantic feature tensor at the location. Indicates the first Transpose of the template embedding vector of each structural component Indicates the first Spatial mask of each structural component This represents the prior probability of the region. This indicates the adjustment of the weighting coefficient. The value range is set according to the application requirements, and is generally between 0.1 and 0.3.

[0039] In this invention, the structural desired heatmap Template embedding matrix Introducing structural specifications, through intermediate semantic feature tensors Representing image semantics through region spatial masks To achieve spatial constraints, prior regional experience in power line inspection scenarios is utilized. By incorporating historical statistical patterns, this multi-information fusion approach improves the spatial positioning accuracy of the output heatmap and reduces structural omissions and false positives.

[0040] The final generated structural expected heatmap The dimensions are consistent with the original inspection image, forming a single-channel matrix. Each pixel value represents the confidence level that a structural component should exist at that location, while the template embedding matrix is ​​also retained. It can also be used to compare the consistency of structural positional relationships in student skeletons, further verifying the rationality of structural predictions.

[0041] Next, the training process of the teacher skeleton model will be explained in detail: In a preferred embodiment, the teacher skeleton model is determined in the following manner: Acquire several training samples; each training sample includes: an inspection training image and its corresponding structural configuration training template and structural expectation labeling heatmap; Several training samples are input into the teacher skeleton model to be trained, so that the teacher skeleton model takes the inspection training image and its corresponding structural configuration training template as input and the structural expectation prediction heatmap as output for iterative training. In each training process, the loss value is calculated based on the structural expectation prediction heatmap and the structural expectation labeling heatmap, and the model parameters of the teacher skeleton model are adjusted according to the loss value until the loss value converges, thus obtaining the trained teacher skeleton model.

[0042] Specifically, firstly, several training samples that meet the requirements of power inspection scenarios are collected and organized. Each training sample contains a complete inspection training image, a structural configuration training template corresponding to the inspection training image, and a structural expectation labeling heatmap for model supervision training. The structural configuration training template is used to provide structural specification information of power equipment, while the structural expectation labeling heatmap serves as the target benchmark for model training, clarifying the structural components that should exist at each location in the inspection training image and their confidence standards.

[0043] All training samples are input into the teacher skeleton model to be trained. The model takes the inspection training images and the corresponding structural configuration training templates as input, and outputs a structural expectation prediction heatmap through internal network operations. During training, the model will generate a heatmap of the expected structure of the current output. Structural expectation labeling heatmap corresponding to the sample A pixel-by-pixel comparison is performed, and the deviation between the two is calculated using a preset loss function (such as mean squared error, MSE), which is the loss value. This loss value directly reflects the degree to which the model prediction result matches the real target. The smaller the loss value, the higher the model prediction accuracy.

[0044] Subsequently, based on the calculated loss value, the backpropagation algorithm is used to adaptively adjust the network parameters of each layer of the teacher skeleton model, correct the parameter deviation to reduce the prediction error, and then proceed to the next round of iterative training.

[0045] The above iterative training process will continue to be executed in a loop until the loss value tends to stabilize and reaches the preset convergence condition. At this time, the prediction accuracy of the model has met the training requirements, the training is stopped and the current model parameters are saved, and finally the trained teacher skeleton model is obtained.

[0046] After training, the teacher skeleton model can generate a structural expectation heatmap based on the inspection images and structural configuration templates. This heatmap represents the confidence level of the structural components that should exist at each pixel position under the drive of ideal structural rules. It serves as a structural reference under ideal conditions and provides a quantifiable structural benchmark for subsequent anomaly detection.

[0047] Step S4: Input the inspection image into the trained student skeleton model so that the student skeleton model can generate a structural reconstruction heatmap based on the inspection image; In a preferred embodiment, generating a structural reconstruction heatmap based on the inspection images includes: The built-in symmetric convolutional encoder performs multi-layer convolution, normalization, and nonlinear activation processing on the inspection image to obtain the image feature tensor. The built-in symmetric convolutional decoder decodes and restores the image feature tensor to obtain a structural reconstruction heatmap.

[0048] For step S4, the inspection image is obtained through step S1. Subsequently, the inspection images are simultaneously input into the trained student skeleton model. The student skeleton model has a symmetric convolutional encoder-decoder architecture. The symmetric convolutional encoder performs multi-layer convolution operations on the input inspection images. The convolution operation can extract local feature information in the image. Through different levels of convolution, it gradually transitions from low-level features (such as edges, textures, etc.) to high-level semantic features. After the convolution operation, normalization processing and non-linear activation processing are performed to extract complex feature relationships and obtain the image feature tensor.

[0049] Subsequently, the symmetric convolutional decoder receives the image feature tensor output by the symmetric convolutional encoder and performs decoding and reconstruction operations on it. The decoding process is the inverse of the encoding process, gradually restoring the extracted feature information into a structure-related information representation, ultimately obtaining the structure reconstruction heatmap. The structural reconstruction heatmap reflects the spatial distribution of the structure predicted by the student skeleton model based on the input inspection images, providing basic data for further analysis based on this heatmap, such as identifying structural missing anomalies and structural layout logic anomalies.

[0050] Next, the training process of the student skeleton model will be explained in detail: In a preferred embodiment, the student skeleton model is determined in the following manner: Several inspection training images and their corresponding structural expectation prediction heatmaps and template embedding prediction vectors are input into the student skeleton model to be trained, so that the student skeleton model can perform iterative training with the inspection training images as input and the structural reconstruction prediction heatmaps as output; the template embedding prediction vectors are obtained by the teacher skeleton model to be trained through multilayer perceptron encoding of each structural item in the structural configuration training template. In each training process, the built-in symmetric convolutional encoder performs multi-layer convolution, normalization and non-linear activation processing on the inspection training images to obtain the image feature prediction tensor. Based on the template embedding prediction vector, the image feature prediction tensor is aligned in the feature space to obtain the aligned image feature prediction tensor. The aligned image feature prediction tensor is decoded and restored by the built-in symmetric convolutional decoder to obtain the structure reconstruction prediction heatmap. Based on the structural reconstruction prediction heatmap and the structural expectation prediction heatmap, the contrastive loss function value is calculated, and the model parameters of the symmetric convolutional encoder and symmetric convolutional decoder in the student skeleton model are adjusted according to the contrastive loss function value until the contrastive loss function value converges, thus obtaining the trained student skeleton model.

[0051] Specifically, the student skeleton model of the present invention is trained through a dual knowledge distillation mechanism, with the prior knowledge of the teacher skeleton model as the core guide, and achieves accurate training of the model through dual knowledge transfer in the feature layer and the output layer.

[0052] Several inspection training images, their corresponding structural expectation prediction heatmaps, and template embedding prediction vectors obtained by encoding each structural item in the structural configuration training template using a multilayer perceptron, are jointly input into the student skeleton model to be trained. This allows the model to iteratively train using the inspection training images as input and the structural distribution prediction heatmaps as output. It should be noted that the template embedding prediction vectors, as the core knowledge representation transmitted by the teacher skeleton model, constitute the key carrier of feature layer knowledge distillation in the dual knowledge distillation process.

[0053] In each training process, the student skeleton model first performs multi-layer convolution, normalization, and non-linear activation on the inspection training images through its built-in symmetric convolutional encoder to extract the image feature prediction tensor. Then, based on the template embedding prediction vector output by the teacher skeleton model, the image feature prediction tensor is aligned in the feature space. The template embedding prediction vector is mapped to a conditional weight vector consistent with the number of image feature channels and is applied to the image feature prediction tensor through channel-level weighting and bias modulation. This achieves the transfer and adaptation of the feature representation knowledge of the teacher skeleton model to the student skeleton model, resulting in the aligned image feature prediction tensor.

[0054] Subsequently, the aligned tensor is decoded and restored using a symmetric convolutional decoder to generate a structural reconstruction prediction heatmap, which serves as the output of the student skeleton model. This heatmap is then compared with the implicit prior knowledge of structural distribution in the teacher skeleton model and the structural expectation prediction heatmap inherent in the sample to form a basis for knowledge distillation of the output layer. Based on the generated predicted heatmap of structure distribution and the labeled predicted heatmap of structure expectation, the contrastive loss function value is calculated: ; in, Indicates that the inspection training images are in The predicted heatmap pixel values ​​for structural reconstruction at the location. Indicates that the inspection training images are in The structure at that location is expected to predict the pixel values ​​of the heatmap. This represents the penalty factor for structural changes. Indicates the visual weak texture compensation coefficient. The structural expectation prediction heatmap is shown in The second-order Laplacian value at a given location is used to measure the degree of change in the structural boundary. The blur score of the training image is obtained by calculating the local gradient magnitude of the training image based on gradient operators (such as Sobel and Laplacian). Indicates that the inspection training images are in The structural difference value at the location.

[0055] Based on the comparison loss function value for optimization, all model parameters of the symmetric convolutional encoder and decoder in the student skeleton model are adjusted in reverse. The above process is iterated until the comparison loss function value converges. At this point, the student skeleton model has completed the double distillation learning of the embedded knowledge of the feature layer and the distribution knowledge of the output layer of the teacher skeleton model, and has also achieved accurate fitting with the sample labeled data, finally obtaining the trained student skeleton model.

[0056] After training, the student skeleton model can generate structural reconstruction heatmaps based solely on the visual perception of the inspection images. This objectively reflects the confidence distribution of perceptible structural components in the images, without being constrained by the prior knowledge of the preset structural configuration template, thus providing reliable visual prior support for subsequent structural difference analysis.

[0057] Step S5: Compare the reconstructed structure heatmap with the expected structure heatmap to generate a structure difference map; For step S5, the structural expectation heatmap obtained through step S3 represents the expected spatial distribution of the structure predicted under the structural rules, which is the ideal structural heatmap representation; while the structural reconstruction heatmap obtained through step S4 is the spatial distribution of the structure predicted by the student skeleton model based on the input inspection image.

[0058] Because power field images often have partial occlusion, backlighting, and weak texture, the confidence of some structural components in the structure reconstruction heatmap generated solely by the student skeleton model based on vision is severely weakened or even disappears, resulting in an incomplete or blurry structural distribution. In contrast, the teacher skeleton model incorporates prior knowledge of the structural configuration template, and the output structural expectation heatmap can still completely indicate the spatial positions of these structural components.

[0059] Comparing the structural reconstruction heatmap output by the student skeleton model with the structural expectation heatmap output by the teacher skeleton model essentially involves comparing the actual structural information presented in the image with the structural information that should exist in the ideal state. If the structural reconstruction heatmap and the structural expectation heatmap are highly consistent, it indicates that the visual features in the inspection image are consistent with the ideal structural configuration template, meaning that the actual structure meets expectations and the power facilities in the inspection image are normal. If there is a significant difference between the structural reconstruction heatmap and the structural expectation heatmap, it indicates that the visual features in the inspection image do not match the expected ideal structural configuration template, directly reflecting the deviation between the actual structure and the ideal expectation, and can be used as a basis for judging structural defects, missing components, or anomalies.

[0060] To more accurately calculate the difference between the model's prediction results and the ideal situation, this invention introduces a weighted difference calculation method that combines structural boundary features and image quality perception. When the structural boundary is obvious at a certain location in the structural expectation heatmap output by the teacher skeleton model (with a large second-order Laplacian value), or when the image itself is blurry at that location, the cost of the student skeleton model's incorrect prediction at that location should be higher. This allows the generated structural difference map to more accurately reflect the difference between the reconstructed structural heatmap and the structural expectation heatmap. The specific formula is as follows: ; in, Indicates the inspection image in The pixel values ​​of the structural reconstruction heatmap at that location. Indicates the inspection image in Structural difference values ​​at the location, The expected heatmap of the structure is shown in The second-order Laplacian value at a given location is used to measure the degree of change in the structural boundary. The image blur rating is obtained by calculating the local gradient magnitude of the inspected image based on gradient operators (such as Sobel and Laplacian).

[0061] Finally, through the position of each pixel Structural difference value This forms a structural difference map, which intuitively reflects the spatial difference distribution between the structural reconstruction heatmap and the structural expectation heatmap.

[0062] In a preferred embodiment, after generating the structural difference map, the method further includes: Based on the template embedding vector, the first connection vector between teacher structural items is constructed; the template embedding vector is obtained by multilayer perceptron encoding each structural item in the structural configuration template by the teacher skeleton model. Extract the set of coordinates of the structural response center from the structural reconstruction heatmap; Based on the set of structural response center coordinates, construct a second connection vector between the student structural positions; Calculate the structural connectivity consistency score based on the first and second connectivity vectors; In one embodiment of the present invention, in addition to identifying structural defects, in power scenarios, some structural hazards are manifested in the spatial organization logic errors between structures, such as three-wire entanglement, improper crossing angles, and pole connection lines crossing boundaries. These hazards are often not shown as structural defects in images, but rather as abnormal relative positional relationships between structures.

[0063] To identify potential problems arising from abnormal relative structural positions, this invention introduces a structural connection consistency measurement mechanism. First, a first connection vector is constructed based on the template embedding vectors output by the teacher skeleton model. These template embedding vectors are obtained by encoding each structural item in the structural configuration template using a multilayer perceptron, and contain the standardized positional information of each structural item under ideal conditions. Using this positional information, a first connection vector is constructed between the teacher structural items, representing the standard connection relationships that the power equipment structure should have. Next, from the structural reconstruction heatmap output by the student skeleton model, the set of center coordinates of all structural responses is extracted. By detecting and locating high-confidence regions in the heatmap, the positions of each structural component identified by the student skeleton model are determined. Based on the extracted set of center coordinates of the structural responses, a second connection vector is constructed between the student structural positions. This second connection vector reflects the connection relationships between the structural components predicted by the student skeleton model. The structural connection consistency score is calculated by comparing the first and second connection vectors. In the calculation, cosine similarity is used to calculate the vector angle deviation, and the vector magnitude difference is used to measure the connection distance deviation. A preset penalty coefficient is then applied for weighting to measure the directional and length deviations of the connection vectors. The final score directly reflects the integrity and consistency of the structural connection relationship, thus accurately identifying spatial organization logic errors such as three-line entanglement and improper intersection angles.

[0064] The specific formula for the structural connectivity consistency score is as follows: ; in, Indicates the structural connectivity consistency score. Represents teacher structure items arrive The first connection vector between them, Indicates the student's structural position arrive The second connection vector between them, Represents the angle between vectors. This represents the penalty coefficient for the length deviation term.

[0065] It should be noted that, The term is used to measure the directional deviation of the connection vectors between teachers and students. The larger the angle, the higher the value of this term, which indicates that the directional consistency of the structural connection is worse. The term is determined by the penalty coefficient. A weighted penalty is applied to the length deviation of the connection vector. The larger the distance deviation, the higher the value of this item, which indicates that the connection distance between structural components deviates more significantly from the standard state.

[0066] Structural connectivity consistency score It takes into account both the connection direction and the connection distance to reflect the integrity and consistency of the structural relationship, and is especially suitable for the analysis of intertwined cables and multi-line tower structures.

[0067] Step S6: Determine the anomaly detection results of the countermeasures based on the structural difference diagram.

[0068] For step S6, after obtaining the structural difference map in step S5, threshold analysis and region aggregation are performed on the difference values ​​of each pixel in the structural difference map to determine the anomaly detection result. Specifically, a reasonable difference value threshold is set. When the pixel difference value of a certain region in the structural difference map continuously exceeds the difference value threshold, it indicates that there is a significant deviation between the structural reconstruction heatmap and the expected structural heatmap of that region. This means that the structural component at the corresponding position in the inspection image does not conform to the ideal specification state, and is thus identified as having a structural missing anomaly.

[0069] In a preferred embodiment, determining the anomaly detection result of the countermeasure based on the structural difference map includes: Based on the structural difference map, identify whether there are structural defects or anomalies in the inspection images; Based on the structural connectivity consistency score, identify whether there are structural layout abnormalities in the inspection images; Based on the identification results of structural missing anomalies and structural layout anomalies, the countermeasure anomaly detection results are obtained.

[0070] In one embodiment of the present invention, firstly, based on the structural difference map, it is identified whether there are structural defects or anomalies in the inspection image. Similarly, threshold analysis and region aggregation are performed on the difference values ​​of each pixel in the structural difference map.

[0071] Simultaneously, the structural connection consistency score is used to identify whether there are structural layout anomalies in the inspection images. The structural connection consistency score is calculated based on the component positional relationships in the structural configuration template and the structural response positions extracted from the structural prediction heatmap, and can measure whether the spatial layout logic between structural components is reasonable. If the score is low, it indicates that the connection or layout relationship between structural components does not conform to expectations, and there may be structural layout anomalies, such as component misplacement or incorrect connection relationships.

[0072] Finally, by combining the identification results of structural defects and structural layout anomalies, the results of countermeasure anomaly detection are obtained. This provides a comprehensive assessment of the overall structural condition in the inspection images, which can provide important basis for the operation and maintenance and management of power facilities, help staff to discover and deal with problems in a timely manner, and ensure the safe and stable operation of power facilities.

[0073] like Figure 2 As shown, based on the above method embodiments, corresponding apparatus embodiments are provided; One embodiment of the present invention provides a countermeasure anomaly detection device for power facilities, comprising: an inspection image acquisition module, a scene configuration module, a structural expected heat map generation module, a structural reconstruction heat map generation module, a difference comparison module, and a detection result determination module; The inspection image acquisition module is used to acquire inspection images of the power facilities to be inspected. The scene configuration module is used to identify the corresponding scene category based on the inspection image and extract the structure configuration template corresponding to the scene category from the preset structure rule library; The structural expectation heatmap generation module is used to input the inspection image and structural configuration template into the trained teacher skeleton model, so that the teacher skeleton model can generate a structural expectation heatmap based on the inspection image and structural configuration template; the structural expectation heatmap is used to characterize the confidence of the structural components that should exist at each pixel position in the inspection image; The structural reconstruction heatmap generation module is used to input the inspection images into the trained student skeleton model so that the student skeleton model can generate structural reconstruction heatmaps based on the inspection images. The difference comparison module is used to compare the reconstructed structure heatmap with the expected structure heatmap to generate a structure difference map. The detection result determination module is used to determine the anomaly detection result of the countermeasure based on the structural difference diagram.

[0074] In a preferred embodiment, the power facility countermeasure anomaly detection device further includes: a structural connection scoring module; The structural connectivity scoring module includes: a first connectivity vector construction submodule, a center coordinate extraction submodule, a second connectivity vector construction submodule, and a connectivity consistency calculation module; The first connection vector construction submodule is used to construct the first connection vector between teacher structural items based on the template embedding vector; the template embedding vector is obtained by multilayer perceptron encoding each structural item in the structural configuration template by the teacher skeleton model; The center coordinate extraction submodule is used to extract the set of center coordinates of the structural response from the structural reconstruction heatmap; The second connection vector construction submodule is used to construct the second connection vector between the student structure positions based on the set of structure response center coordinates. The connectivity consistency calculation module is used to calculate the structural connectivity consistency score based on the first connectivity vector and the second connectivity vector. The detection result determination module includes: a missing anomaly identification submodule, a deployment anomaly identification submodule, and an anomaly result determination submodule; The missing anomaly identification submodule is used to identify whether there are structural missing anomalies in the inspection image based on the structural difference map; An anomaly detection submodule is set up to identify whether there are structural layout anomalies in the inspection images based on the structural connection consistency score. The anomaly result determination submodule is used to obtain the countermeasure anomaly detection result based on the identification results of structural missing anomalies and structural layout anomalies.

[0075] In a preferred embodiment, the scene configuration module identifies the corresponding scene category based on the inspection image, including: The inspection image is input into the trained classification model, so that the classification model performs convolution operation, feature normalization and nonlinear activation processing on the inspection image through the built-in convolution module to obtain scene semantic features. The built-in fully connected layer maps the semantic features of the scene to obtain the probabilities of various scenes; The scene category index corresponding to the highest probability value among various scene probabilities is selected as the scene category corresponding to the inspection image.

[0076] In a preferred embodiment, the structural expected heatmap generation module generates a structural expected heatmap based on the inspection images and the structural configuration template, including: The built-in convolutional network extracts intermediate semantic feature tensors from the inspection images. Each structural item in the structural configuration template is encoded using a multilayer perceptron to obtain a template embedding vector; The inner product operation is performed on the transpose of the intermediate semantic feature tensor and the template embedding vector to obtain the feature matching score of the structure term at each position in the inspection image. After normalizing the feature matching scores at each location using the Sigmoid function, a weighted operation is performed by combining the necessity markers in the structure configuration template with the region spatial mask to obtain the constraint response values ​​of the structure item at each location in the inspection image; the region spatial mask is obtained based on the normalized spatial region in the structure configuration template. The expected heatmap of the structure is obtained by weighting and summing the constraint response values ​​at each location and the preset prior probabilities of the region.

[0077] In a preferred embodiment, the structure reconstruction heatmap generation module generates a structure reconstruction heatmap based on the inspection images, including: The built-in symmetric convolutional encoder performs multi-layer convolution, normalization, and nonlinear activation processing on the inspection image to obtain the image feature tensor. The built-in symmetric convolutional decoder decodes and restores the image feature tensor to obtain a structural reconstruction heatmap.

[0078] In a preferred embodiment, the teacher skeleton model is determined in the following manner: Acquire several training samples; each training sample includes: an inspection training image and its corresponding structural configuration training template and structural expectation labeling heatmap; Several training samples are input into the teacher skeleton model to be trained, so that the teacher skeleton model takes the inspection training image and its corresponding structural configuration training template as input and the structural expectation prediction heatmap as output for iterative training. In each training process, the loss value is calculated based on the structural expectation prediction heatmap and the structural expectation labeling heatmap, and the model parameters of the teacher skeleton model are adjusted according to the loss value until the loss value converges, thus obtaining the trained teacher skeleton model.

[0079] In a preferred embodiment, the student skeleton model is determined in the following manner: Several inspection training images and their corresponding structural expectation prediction heatmaps and template embedding prediction vectors are input into the student skeleton model to be trained, so that the student skeleton model can perform iterative training with the inspection training images as input and the structural reconstruction prediction heatmaps as output; the template embedding prediction vectors are obtained by the teacher skeleton model to be trained through multilayer perceptron encoding of each structural item in the structural configuration training template. In each training process, the built-in symmetric convolutional encoder performs multi-layer convolution, normalization and non-linear activation processing on the inspection training images to obtain the image feature prediction tensor. Based on the template embedding prediction vector, the image feature prediction tensor is aligned in the feature space to obtain the aligned image feature prediction tensor. The aligned image feature prediction tensor is decoded and restored by the built-in symmetric convolutional decoder to obtain the structure reconstruction prediction heatmap. Based on the structural reconstruction prediction heatmap and the structural expectation prediction heatmap, the contrastive loss function value is calculated, and the model parameters of the symmetric convolutional encoder and symmetric convolutional decoder in the student skeleton model are adjusted according to the contrastive loss function value until the contrastive loss function value converges, thus obtaining the trained student skeleton model.

[0080] It is understood that the above-described device embodiments correspond to the method embodiments of the present invention, and can implement the power facility anomaly detection method provided by any of the above-described method embodiments of the present invention.

[0081] It should be noted that the device 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 device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can specifically be 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] Based on the above-described embodiments of the power facility anomaly detection 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. When the processor executes the computer program, it implements the power facility anomaly detection method of any embodiment of the present invention.

[0083] 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.

[0084] 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.

[0085] 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 various parts of the terminal device via various interfaces and lines.

[0086] Based on the above-described method embodiments, another embodiment is provided: 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 execute the power facility countermeasure anomaly detection method described in any of the above-described method embodiments of the present invention.

[0087] The modules / units integrated into the anomaly detection device / terminal equipment of the power facility, 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 methods of the above embodiments 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, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0088] 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 countermeasure abnormality detection method for a power facility, characterized by, The method comprises the following steps: acquiring an inspection image of a power facility to be detected; identifying a corresponding scene category according to the inspection image, and extracting a structure configuration template corresponding to the scene category from a preset structure rule library; inputting the inspection image and the structure configuration template into a trained teacher skeleton model, so that the teacher skeleton model generates a structure expectation heat map according to the inspection image and the structure configuration template; the structure expectation heat map is used to represent the confidence of a structure component that should exist at each pixel position in the inspection image; inputting the inspection image into a trained student skeleton model, so that the student skeleton model generates a structure reconstruction heat map according to the inspection image; comparing the structure reconstruction heat map with the structure expectation heat map to generate a structure difference map; determining an anti-measure abnormality detection result according to the structure difference map.

2. The abnormality detection method of power facility according to claim 1, characterized by, After generating the structure difference map, the method further comprises the following steps: constructing a first connection vector between teacher structure items according to a template embedding vector; the template embedding vector is obtained by performing a multi-layer perceptron encoding on each structure item in the structure configuration template by the teacher skeleton model; extracting a structure response center coordinate set from the structure reconstruction heat map; constructing a second connection vector between student structure positions according to the structure response center coordinate set; calculating a structure connection consistency score according to the first connection vector and the second connection vector; the step of determining the anti-measure abnormality detection result according to the structure difference map comprises the following steps: identifying whether there is a structure missing abnormality in the inspection image according to the structure difference map; identifying whether there is a structure layout abnormality in the inspection image according to the structure connection consistency score; obtaining the anti-measure abnormality detection result according to the identification result of the structure missing abnormality and the identification result of the structure layout abnormality.

3. The abnormality detection method of power facility according to claim 1, characterized by, The step of identifying a corresponding scene category according to the inspection image comprises the following steps: inputting the inspection image into a trained classification model, so that the classification model performs convolution operation, feature normalization and non-linear activation processing on the inspection image in sequence through an internally set convolution module to obtain scene semantic features; mapping the scene semantic features through an internally set fully connected layer to obtain scene probability of each category; selecting a scene category index corresponding to a maximum probability value in the scene probability of each category as the scene category corresponding to the inspection image.

4. The power facility countermeasure abnormality detection method according to claim 1, characterized by, The step of generating a structure expectation heat map according to the inspection image and the structure configuration template comprises the following steps: extracting an intermediate semantic feature tensor from the inspection image through an internally set convolution network; performing a multi-layer perceptron encoding on each structure item in the structure configuration template to obtain a template embedding vector; performing an inner product operation on the transpose of the intermediate semantic feature tensor and the template embedding vector to obtain a feature matching score of the structure item at each position of the inspection image; after normalizing the feature matching score at each position through a Sigmoid function, performing a weighted operation on the constraint response value of the structure item at each position of the inspection image in combination with a necessity label and a region space mask in the structure configuration template; the region space mask is obtained according to a normalized space region in the structure configuration template. The constraint response value of each position and the preset area prior probability are weighted and summed to obtain a structure expectation heat map.

5. The abnormality detection method of power facility according to claim 1, characterized by, According to the inspection image, a structure reconstruction heat map is generated, including: The inspection image is processed by a built-in symmetric convolutional encoder for multi-layer convolution, normalization and nonlinear activation to obtain an image feature tensor; The image feature tensor is decoded and restored by a built-in symmetric convolutional decoder to obtain a structure reconstruction heat map.

6. The abnormality detection method of power facility according to claim 2, characterized by, The teacher skeleton model is determined by: Obtain a plurality of training samples; each training sample includes: an inspection training image and its corresponding structure configuration training template and structure expectation label heat map; The plurality of training samples are input into the teacher skeleton model to be trained, so that the teacher skeleton model takes the inspection training image and its corresponding structure configuration training template as input, and takes the structure expectation prediction heat map as output for iterative training; In each training process, the loss value is calculated according to the structure expectation prediction heat map and the structure expectation label heat map, and the model parameters of the teacher skeleton model are adjusted according to the loss value until the loss value converges, obtaining the trained teacher skeleton model.

7. The abnormality detection method of power facility according to claim 6, characterized by, The student skeleton model is determined by: The plurality of inspection training images and their corresponding structure expectation prediction heat maps and template embedding prediction vectors are input into the student skeleton model to be trained, so that the student skeleton model takes the inspection training image as input and takes the structure reconstruction prediction heat map as output for iterative training; The template embedding prediction vector is obtained by the teacher skeleton model to be trained according to each structure item in the structure configuration training template Multi-layer Perceptron encoding; In each training process, the inspection training image is processed by a built-in symmetric convolutional encoder for multi-layer convolution, normalization and nonlinear activation to obtain an image feature prediction tensor; According to the template embedding prediction vector, the image feature prediction tensor is processed by feature space alignment to obtain an aligned image feature prediction tensor; The aligned image feature prediction tensor is decoded and restored by a built-in symmetric convolutional decoder to obtain a structure reconstruction prediction heat map; According to the structure reconstruction prediction heat map and the structure expectation prediction heat map, the comparative loss function value is calculated, and the model parameters of the symmetric convolutional encoder and the symmetric convolutional decoder in the student skeleton model are adjusted according to the comparative loss function value until the comparative loss function value converges, obtaining the trained student skeleton model.

8. A device for detecting abnormal countermeasures in power facilities, characterized in that, It includes: An inspection image acquisition module, a scene configuration module, a structure expectation heat map generation module, a structure reconstruction heat map generation module, a difference comparison module and a detection result determination module; The inspection image acquisition module is used to acquire the inspection image of the power facility to be detected; The scene configuration module is used to identify the corresponding scene category according to the inspection image, and extract the structure configuration template corresponding to the scene category from the preset structure rule library; The structure expectation heat map generation module is configured to input the inspection image and the structure configuration template into a trained teacher skeleton model, so that the teacher skeleton model generates a structure expectation heat map according to the inspection image and the structure configuration template; the structure expectation heat map is used to represent a confidence degree of a structure component that should exist at each pixel position in the inspection image. The structure reconstruction heat map generation module is configured to input the inspection image into a trained student skeleton model, so that the student skeleton model generates a structure reconstruction heat map according to the inspection image. The difference comparison module is configured to compare the structure reconstruction heat map with the structure expectation heat map to generate a structure difference map. The detection result determination module is configured to determine a countermeasure abnormality detection result according to the structure difference map.

9. A terminal device, comprising: The computer readable storage medium comprises a stored computer program, wherein the computer readable storage medium controls a device in which the computer readable storage medium is located to execute the countermeasure abnormality detection method of the power facility according to any one of claims 1-7 when the computer program runs.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises a stored computer program, wherein the computer readable storage medium controls a device in which the computer readable storage medium is located to execute the countermeasure abnormality detection method of the power facility according to any one of claims 1-7 when the computer program runs.