A method for identifying anomalies in substations

By combining ORB feature point matching and RANSAC homography estimation with edge occlusion and perspective transformation, the problem of inaccurate image registration in substation image inspection was solved, achieving accurate location and confidence level identification of abnormal areas, thus improving the accuracy and interpretability of the inspection.

CN123118641APending Publication Date: 2026-11-17NANJING GUODIAN NANZI POWER GRID AUTOMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611619880.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-20
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing substation image inspection technology has difficulty maintaining a reliable spatial correspondence between two temporal images when the shooting location, scale, viewing angle, and ambient lighting change. This leads to false alarms, missed alarms, and inaccurate abnormal locations, making it difficult to generate structured outputs that are locatable, quantifiable, and traceable.

Method used

Image registration is performed using ORB feature point matching and RANSAC homography estimation. Combined with edge occlusion and perspective transformation with full effective initial mask, the difference probability map is output through the C-3PO change detection model. The accurate location and confidence labeling of abnormal regions are achieved by utilizing effective region mask constraints and inverse mapping parameters.

Benefits of technology

It reduces the impact of perspective bias and invalid edges on anomaly detection, outputs locatable and confident anomaly results, and improves the accuracy and interpretability of inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123118641A_ABST
    Figure CN123118641A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of substation anomaly detection technology, and discloses a substation anomaly discrimination method, including: acquiring the current inspection image and a normal reference image and performing edge masking; extracting ORB features, calculating the homography matrix from the reference image to the current image based on RANSAC, completing reference image registration and generating an effective region mask; inputting the registered image pair into a C-3PO model with a shared backbone network, a multi-temporal feature fusion module, and a segmentation head to obtain a difference probability map; obtaining anomaly candidate regions within the effective region through threshold segmentation, morphological processing, and connected component filtering, mapping them back to the coordinate system of the current inspection image, and outputting anomaly identifier, anomaly region, and comprehensive confidence score. This invention solves the problems of difficult image registration, large edge interference, and low detection accuracy in industrial scenarios, meets real-time requirements, and can be widely applied to automated detection in fields such as power inspection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of substation anomaly detection technology, and particularly relates to a substation anomaly identification method. Background Technology

[0002] Substations contain numerous and widely distributed enclosures, switches, instruments, connectors, insulation components, and auxiliary facilities. Failure to promptly detect anomalies such as open enclosures, missing components, added foreign objects, or changes in indicator status can impact equipment operation and maintenance, as well as on-site safety. Traditional manual inspections rely heavily on personnel experience for point-by-point checks, which is not only labor-intensive but also susceptible to variations in observation angle, environmental conditions, and personnel condition, making it difficult to consistently meet the requirements of high-frequency, standardized, and traceable inspections. With the increasing digitalization and intelligent operation and maintenance of power grid equipment, utilizing fixed cameras, inspection robots, or handheld terminals to collect images and automatically identify equipment anomalies has become an important development direction for substation inspection.

[0003] To improve inspection efficiency, existing image analysis techniques have evolved from manual comparison and simple threshold judgment to methods such as template matching, pixel difference, single-image target detection, and dual-temporal change detection. Template matching and pixel difference are simple to implement, but they mainly rely on grayscale or color changes for judgment; single-image target detection can directly give the location and category of a predefined target; dual-temporal change detection locates the areas where the device changes between two temporal phases by comparing a normal reference image with the current inspection image. The above methods provide an automated foundation for substation image inspection, but they still have limitations under complex imaging conditions on site. Specifically, even if the current inspection image and the normal reference image face the same equipment, due to factors such as camera installation deviation, inspection robot docking error, gimbal return error, shooting distance change, lens distortion, and equipment surface reflection, there may still be translation, rotation, scale change, and perspective differences between the two images. Lighting changes, shadows, rain, fog, and seasonal backgrounds can also cause obvious unstructured appearance differences. Meanwhile, real anomalies such as door gaps, switch positions, or small foreign objects may occupy a small area in the image. When spatial misalignment and appearance changes coexist, direct pixel difference can easily produce large-area pseudo-changes in equipment outlines, slender structures, and image edges, and real anomalies may be overwhelmed by pseudo-change responses.

[0004] To reduce the spatial differences between two-phase images, existing solutions typically employ feature point matching and geometric transformation for image registration. Image registration is often treated as a separate preprocessing step in many solutions: on the one hand, insufficient texture, repetitive textures, local occlusion, or differences in field of view can lead to an insufficient number of effective matching points or a concentrated spatial distribution; on the other hand, without a comprehensive quality evaluation of geometric mapping relationships, effective matching, and registration errors, low-quality registration results may still be used in subsequent anomaly detection processes; furthermore, invalid filling areas formed by perspective transformation and non-overlapping areas between the two images, if not explicitly excluded, can easily be mistaken by subsequent models for real changes. Regarding anomaly recognition, single-image target detection usually relies on predefined anomaly categories and sufficient labeled samples, suitable for identifying targets with relatively stable appearances and clear category boundaries. However, substation inspection anomalies are characterized by scarce samples, diverse morphologies, and high openness; unknown foreign objects, missing components, and subtle changes in state are difficult to be completely covered by a limited number of categories. Dual-temporal change detection can use the normal state as a reference, which reduces the reliance on exhaustive enumeration of abnormal categories to some extent. However, its output quality is highly dependent on the spatial correspondence between the two temporal images. Conventional channel stitching or feature difference can easily mix geometric misalignment with semantic change in the model, resulting in enhanced pseudo-change response, inaccurate boundaries of real change regions, or subtle changes being submerged by background differences.

[0005] In summary, existing substation dual-phase image anomaly detection technologies still suffer from the following problems: When the shooting location, scale, viewing angle, and ambient lighting change, it is difficult to maintain a reliable spatial correspondence between the two phase images; low-quality registration results, perspective transformation filled areas, and non-overlapping areas in the two images may be mistakenly identified as real anomalies in subsequent change detection processes; if there is a lack of a complete mapping relationship between the model input coordinates and the original pixel coordinates of the current inspection image, it is difficult to accurately map and associate anomaly areas with the inspection points. These problems easily lead to false alarms, missed alarms, and inaccurate anomaly locations, making it difficult to generate a structured output that is localizable, quantifiable, and traceable. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a substation anomaly identification method that reduces the influence of perspective deviation and invalid edges of dual-phase images on anomaly identification, and outputs anomaly results that can be located and have confidence and registration status.

[0007] To achieve the above-mentioned technical objectives, the present invention is implemented using the following solution:

[0008] This invention provides a substation anomaly detection method, comprising:

[0009] Edge masking is applied to the current inspection image and the normal reference image of the same inspection object within the substation;

[0010] ORB feature points and binary descriptors of the current inspection image and the normal reference image after edge occlusion are extracted respectively. Feature matching pairs are obtained based on the Hamming distance of the descriptors. The homography matrix pointing from the coordinate system of the normal reference image to the coordinate system of the current inspection image is estimated from the feature matching pairs using RANSAC.

[0011] Based on the homography matrix, perspective transformation is performed on the normal reference image and the fully effective initial mask of the same size as the normal reference image to obtain the registration reference image and the effective region mask;

[0012] Perform aspect ratio-preserving scaling and padding on the current inspection image, registration reference image, and effective region mask with the same scaling ratio, and record the inverse mapping parameters between the input coordinate system of the C-3PO change detection model and the coordinate system of the current inspection image;

[0013] The scaled and filled current inspection image and the registration reference image are used as a dual-temporal image pair as input to the C-3PO change detection model, and the output is a difference probability map;

[0014] By using the effective region mask to constrain the difference probability map, threshold segmentation, morphological processing and connected component filtering are performed on the constrained difference probability map to obtain abnormal candidate regions.

[0015] Based on the inverse mapping parameters, the candidate anomaly regions are mapped to the coordinate system of the current inspection image, and the anomaly identifier, anomaly region, and overall confidence score are output.

[0016] Furthermore, edge masking is applied to the current inspection image and the normal reference image of the same inspection object within the substation, including:

[0017] The current inspection image is obtained based on the site identifier, equipment identifier, inspection point and viewpoint identifier, and the normal reference image is read when the inspection object is in a confirmed normal state.

[0018] Before implementing edge masking, perform file readability, pixel matrix non-emptiness, number of channels, bit depth, minimum resolution and aspect ratio deviation consistency checks on the current inspection image and the normal reference image.

[0019] When implementing edge masking, the masking width of the edge masking Determined based on the image's shorter side size and preset occlusion ratio:

[0020] ;

[0021] In the formula, This indicates the rounding operation. This indicates the width of the current inspection image and the normal reference image. This indicates the height of the current inspection image and the normal reference image. Indicates the edge occlusion ratio;

[0022] The image after edge masking is as follows:

[0023] ;

[0024] In the formula, Indicates phase Image after edge masking Indicates phase Image before edge occlusion Mask the edges. Indicates the edge padding value. Indicates phase index, The phase index value is indicated. or : Indicates the normal reference phase. Indicates the current inspection phase. This indicates element-wise multiplication, and the constant 1 represents a matrix of all 1s of the same size as the mask. express The mask.

[0025] Furthermore, ORB feature points and binary descriptors are extracted from the current inspection image after edge occlusion and the normal reference image, respectively. Feature matching pairs are obtained based on the Hamming distance of the descriptors, including:

[0026] The current inspection image after edge masking and normal baseline image Convert to grayscale and compare with a normal reference image. and current inspection images ORB key points are detected in the grayscale images and L-bit binary descriptors are calculated.

[0027] A brute-force matcher is used to calculate the Hamming distance between descriptors. Matching pairs formed by ORB key points of normal reference image and corresponding ORB key points of current inspection image are sorted in ascending order according to the Hamming distance of their descriptors. A preset proportion of high-quality matching pairs with no less than four groups and spatial dispersion are retained.

[0028] The formula for calculating the Hamming distance between descriptors is as follows:

[0029] In the formula, A binary descriptor representing a specific ORB keypoint in a normal reference image. The binary descriptor of the ORB keypoint matched with a certain ORB keypoint in the normal reference image in the current inspection image. Hamming distance, This indicates a bitwise XOR operation. This represents the bit index, where L represents the number of bits in the binary descriptor. A binary descriptor representing a specific ORB keypoint in a normal reference image. The Bit value, This represents the binary descriptor of the ORB keypoint in the current inspection image that is matched with a specific ORB keypoint in the normal reference image. The Bit value.

[0030] Furthermore, RANSAC is used to estimate the homography matrix from the normal reference image coordinate system to the current inspection image coordinate system from the feature matching pairs, including:

[0031] RANSAC is used to estimate the homography matrix from high-quality matching pairs, with the mapping direction from the normal reference image to the current inspection image. The homogeneous coordinate relationship is:

[0032] ;

[0033] In the formula, Indicates a non-zero scaling factor. Represents a normal reference image The homogeneous coordinates of the matching points in the data. Indicates the current inspection image Normalized homogeneous coordinates of the corresponding points in the middle;

[0034] Calculate the registration quality vector based on the RANSAC interior point set. :

[0035] ;

[0036] ;

[0037] ;

[0038] In the formula, Indicates the number of interior points. Indicates the number of candidate matches. Indicates the scale of interior points. This represents the average reprojection error, where i represents the index of a matching pair within a given set of points. Represents the set of interior point indices in RANSAC. A binary descriptor representing a specific ORB keypoint in a normal reference image. The Bit value, This represents the binary descriptor of the ORB keypoint in the current inspection image that is matched with a specific ORB keypoint in the normal reference image. The Bit value, This represents a bitwise XOR operation;

[0039] If and only if the number of interior points Not less than the quantity threshold, interior point ratio Not lower than the proportional threshold, average reprojection error Not exceeding the error threshold and homography matrix If the registration is reversible, the registration is successful; otherwise, output the registration failure status and the registration quality vector. The system will be marked as pending review, and no definitive conclusion will be drawn regarding whether there are any abnormalities or not.

[0040] Furthermore, based on the homography matrix, perspective transformation is performed on the normal reference image and a fully effective initial mask of the same size as the normal reference image to obtain the registration reference image and the effective region mask, including:

[0041] Using homography matrix For normal reference images Perform perspective transformation to obtain the image compared to the current inspection image. Spatial alignment registration reference image :

[0042] ;

[0043] In the formula, Represents the perspective transformation operator. The image after edge occlusion is shown at the normal reference time phase;

[0044] Construction and normal baseline image Initial mask of the same size with all pixels having valid values ,right Execution based on the same homography matrix The geometrically effective mask is obtained by perspective transformation of the output size and boundary rules. Geometric effective mask Compared with the current inspection image Edge masking, normal reference image The effective region mask is obtained by intersecting the transformed edge masking mask. :

[0045] ;

[0046] In the formula, and These represent the edge masking codes for the normal reference time phase and the current inspection time phase, respectively. This indicates finding the intersection.

[0047] Furthermore, aspect ratio-preserving scaling and padding are performed on the current inspection image, the registration reference image, and the effective region mask at the same scaling ratio, and the inverse mapping parameters between the C-3PO change detection model input coordinate system and the current inspection image coordinate system are recorded, including:

[0048] For the current inspection image Registration reference image and effective region mask Scaling and padding offsets that maintain aspect ratio are performed using the same scaling ratio. The mapping relationship between scaling and padding offset is as follows:

[0049] ;

[0050] ;

[0051] In the formula, Indicates the scaling ratio. and These represent the width and height of the input canvas for the C-3PO change detection model, respectively. This indicates the width of the current inspection image and the normal reference image. This indicates the height of the current inspection image and the normal reference image. and These represent the horizontal fill amount and the vertical fill amount, respectively. This represents the original pixel coordinates of the current inspection image. This represents the input spatial pixel coordinates of the C-3PO model;

[0052] Scaling Horizontal fill amount and vertical fill volume Save as inverse mapping parameters.

[0053] Furthermore, the scaled and padded current inspection image and the registration reference image are used as a dual-temporal image pair as input to the C-3PO change detection model, outputting a difference probability map, including:

[0054] For the current inspection image and registration reference image Using the same color channel order, pixel scaling factor, and mean vector and standard deviation vector Perform channel-by-channel normalization to obtain the reference time phase input. and current phase input :

[0055] ;

[0056] In the formula, Indicates phase index, The phase index value is indicated. or , Indicates the normal reference phase. Indicates the current inspection phase. Indicates reference timing input Current phase input ; This indicates scaling and padding operations that maintain aspect ratio. This represents the image after edge occlusion at time t, and ⊘ represents element-wise division.

[0057] Input the reference time phase and current phase input The data are fed into the parameter-sharing backbone network of the C-3PO change detection model to extract baseline time-phase features. and current phase characteristics :

[0058] ;

[0059] ;

[0060] In the formula, For backbone networks at scale Feature mapping;

[0061] Reference time phase characteristics and current phase characteristics The data is fed into the MTF module of the C-3PO change detection model, which outputs three types of change features:

[0062] ;

[0063] ;

[0064] ;

[0065] In the formula, This indicates the appearance of changing characteristics. This indicates the characteristics of disappearance and change. Indicates the characteristics of exchange and change. Indicates a modified linear unit;

[0066] The three types of change characteristics are compared with the reference time phase characteristics. Current temporal characteristics The original semantic features are summed and fused element-wise after being processed by learnable feature mapping to obtain the scale. Fusion characteristics :

[0067] ;

[0068] In the formula, This represents a learnable feature fusion mapping;

[0069] Fusing features at various scales The data is fed into the FPN multi-scale fusion module of the C-3PO change detection model to perform fusion features at each scale. Upsampling, spatial alignment, and top-down multi-scale fusion are performed. The fusion result is fed into the segmentation head of the C-3PO change detection model to obtain a difference probability map. :

[0070] ;

[0071] In the formula, Represents the standard deviation vector. Indicates the split head. Representation of feature pyramid network; , Representing scale 1, respectively The fusion characteristics;

[0072] Input the model into the effective region mask. and difference probability plot Element-wise multiplication yields the effective difference probability map. :

[0073] .

[0074] Furthermore, by using an effective region mask to constrain the difference probability map, threshold segmentation, morphological processing, and connected component filtering are performed on the constrained difference probability map to obtain anomaly candidate regions, including:

[0075] For the probability plot of effective differences Probabilistic thresholding is performed, isolated responses are removed using morphological opening operations, adjacent changed pixels are connected and small holes are filled using morphological closing operations, and a set of candidate connected components is extracted. for:

[0076] ;

[0077] In the formula, This indicates the connected component extraction operator. This represents the morphological closing operation. Represents the morphological opening operation. Indicates the probability threshold. Represents morphological structural elements;

[0078] Candidate connected regions are filtered based on minimum area, maximum area, aspect ratio, effective region mask coverage, and average region difference probability. Regions with overlap higher than the merging threshold or boundary spacing less than the merging distance are merged to obtain abnormal candidate regions.

[0079] Among them, the regional average difference probability and effective mask coverage The calculation formulas are as follows:

[0080] ;

[0081] ;

[0082] in, Indicates the first Connected components, This represents the input spatial pixel coordinates of the C-3PO change detection model. Represents the probability plot of effective differences Input spatial pixel coordinates in the model The probability value of the difference at that location, Represents the effective region mask of the model input. Input spatial pixel coordinates in the model The mask value at that location, This indicates the number of pixels in the connected component.

[0083] Furthermore, based on the inverse mapping parameters, the anomaly candidate regions are mapped to the current inspection image coordinate system, and the anomaly identifier, anomaly region, and overall confidence score are output, including:

[0084] If an abnormal candidate region exists, the current inspection image will be marked as having an anomaly; otherwise, it will be marked as unmarked, indicating that no anomaly was found or that it needs to be reviewed.

[0085] Using the saved inverse mapping parameters, the boundary points of the anomaly candidate region in the input coordinate system of the C-3PO change detection model are inversely mapped to the coordinate system of the current inspection image, and the inverse-mapped coordinates are cropped to the width and height range of the current inspection image as the anomaly region:

[0086] ;

[0087] ;

[0088] In the formula, This represents the input spatial pixel coordinates of the C-3PO change detection model. This represents the original pixel coordinates of the current inspection image after inverse mapping; Indicates the scaling ratio. and These represent the horizontal fill amount and the vertical fill amount, respectively.

[0089] The location of the abnormal region is represented by the four vertices of the circumscribed rectangle, the first... The outer rectangle of the abnormal region The set of coordinates of the four vertices corresponding to the circumscribed rectangle for:

[0090] ;

[0091] ;

[0092] in, Indicates the abnormal area number. and These represent the x and y coordinates of the top-left corner of the circumscribed rectangle in the original pixel coordinate system of the current inspected image, respectively. and These represent the width and height of the bounding rectangle, respectively.

[0093] Overall confidence level of the abnormal region The calculation formula is:

[0094] ;

[0095] ;

[0096] In the formula, This represents the probability of average regional differences. Indicates the effective mask coverage. To register the mass vector, To determine the normalized geometric reliability obtained from the registration quality vector mapping, , , These are the weight parameters.

[0097] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the above-described substation anomaly detection method are implemented.

[0098] Beneficial effects: The ORB binary feature matching and RANSAC homography estimation of this invention can transform the normal reference image to the coordinate system of the current inspection image, reducing structural misalignment caused by shooting position and perspective deviation.

[0099] The registration quality gating of this invention identifies unreliable matching results before model inference and replaces erroneous conclusions with registration failure states, thereby improving the interpretability of the output results.

[0100] The present invention uses the same perspective transformation as the normal reference image for the fully effective initial mask, which can accurately identify the real comparable areas; combined with edge masking, it can suppress the false differences of distorted edges and perspective-filled areas.

[0101] The C-3PO model of this invention models the appearance, disappearance and exchange changes respectively and retains dual temporal semantic information, which is beneficial for simultaneously locating anomalies of addition, absence and state change.

[0102] This invention uniformly records perspective transformation, scaling, and fill parameters, forming a complete coordinate chain from the reference image to the current image and from the model input to the original image, which facilitates alarm location, verification, and system integration. Attached Figure Description

[0103] Figure 1 This is a flowchart of a substation anomaly detection method provided in Embodiment 1 of the present invention. Detailed Implementation

[0104] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.

[0105] Example 1

[0106] like Figure 1 As shown in the figure, this embodiment provides a substation anomaly detection method, including:

[0107] Edge masking is applied to the current inspection image and the normal reference image of the same inspection object within the substation;

[0108] ORB feature points and binary descriptors of the current inspection image and the normal reference image after edge occlusion are extracted respectively. Feature matching pairs are obtained based on the Hamming distance of the descriptors. The homography matrix pointing from the coordinate system of the normal reference image to the coordinate system of the current inspection image is estimated from the feature matching pairs using RANSAC.

[0109] Based on the homography matrix, perspective transformation is performed on the normal reference image and the fully effective initial mask of the same size as the normal reference image to obtain the registration reference image and the effective region mask;

[0110] Perform aspect ratio-preserving scaling and padding on the current inspection image, registration reference image, and effective region mask with the same scaling ratio, and record the inverse mapping parameters between the input coordinate system of the C-3PO change detection model and the coordinate system of the current inspection image;

[0111] The scaled and filled current inspection image and the registration reference image are used as a dual-temporal image pair as input to the C-3PO change detection model, and the output is a difference probability map;

[0112] By using the effective region mask to constrain the difference probability map, threshold segmentation, morphological processing and connected component filtering are performed on the constrained difference probability map to obtain abnormal candidate regions.

[0113] Based on the inverse mapping parameters, the candidate anomaly regions are mapped to the coordinate system of the current inspection image, and the anomaly identifier, anomaly region, and overall confidence score are output.

[0114] In some embodiments, a substation anomaly detection method establishes a complete processing chain of "input verification—geometric registration—effective domain constraint—change inference—result back mapping", specifically including the following steps:

[0115] S1, Image Acquisition, Validity Verification, and Edge Masking.

[0116] Obtain the current inspection image based on the station identifier, equipment identifier, inspection point, and viewpoint identifier. And read the normal baseline image when the inspected object is in a confirmed normal state. ;

[0117] Perform consistency checks on the file readability, pixel matrix non-emptiness, number of channels, bit depth, minimum resolution, and aspect ratio deviation of the two images. If any check fails, output the INPUT_INVALID status and do not proceed to subsequent registration and anomaly detection.

[0118] After successful verification, apply edge coverage with identical parameters to both images: cover the top, bottom, left, and right edges of both images with a width of [value missing]. The area covered by the pixel value can be zero or the filling value consistently used in the preprocessing of the C-3PO change detection model during the training phase, in order to suppress interference from lens distortion, black borders, and unstable backgrounds.

[0119] Edge coverage width Determined based on the image's shorter side size and preset occlusion ratio:

[0120] ;

[0121] in, This indicates the rounding operation. This indicates the width of the current inspection image and the normal reference image. This indicates the height of the current inspection image and the normal reference image. Indicates the edge occlusion ratio;

[0122] The image after edge occlusion is constructed according to the following formula to ensure that the two temporal phases use the same effective domain definition:

[0123] ;

[0124] in, Indicates phase Image after edge masking Indicates phase Image before edge occlusion Mask the edges. Indicates the edge padding value. Indicates phase index, The phase index value is indicated. or :in Indicates the normal reference phase. Indicates the current inspection phase. This indicates element-wise multiplication, and the constant 1 represents a matrix of all 1s of the same size as the mask. express The padding mask corresponds to the invalid edge area that needs to be filled; a mask pixel value of 1 indicates a valid pixel and 0 indicates an invalid pixel that is covered by the edge.

[0125] S2, ORB feature extraction, Hamming distance matching, homography estimation and registration quality gating.

[0126] Convert the two masked images to grayscale. You can optionally perform Gaussian smoothing or local contrast normalization. For example, before ORB (Oriented FAST and Rotated BRIEF) feature extraction, convert the two masked images to grayscale and smooth them with a 3×3 Gaussian kernel.

[0127] In normal reference image and current inspection images ORB keypoints are detected in the grayscale images, and L-bit binary descriptors are calculated. A brute-force matcher is used to calculate the Hamming distance between the baseline phase descriptor and the current phase descriptor. A set of candidate descriptors is obtained. and The Hamming distance is calculated using the following formula:

[0128] ;

[0129] in, A binary descriptor representing a specific ORB keypoint in a normal reference image. The binary descriptor of the ORB keypoint matched with a certain ORB keypoint in the normal reference image in the current inspection image. Hamming distance, This indicates a bitwise XOR operation. This represents the bit index, where L represents the number of bits in the binary descriptor; A binary descriptor representing a specific ORB keypoint in a normal reference image. The Bit value, This represents the binary descriptor of the ORB keypoint in the current inspection image that is matched with a specific ORB keypoint in the normal reference image. The The bit values ​​are both 0 or 1;

[0130] The matching pairs (composed of ORB key points in the normal reference image and corresponding ORB key points in the current inspection image) are sorted in ascending order of Hamming distance of their descriptors, and high-quality matching pairs with a preset ratio, a number of no less than four groups, and spatial dispersion are retained.

[0131] The RANSAC (Random Sample Consensus) algorithm is used to estimate the homography matrix with the mapping direction "baseline graph → current graph" from high-quality matching pairs. The homogeneous coordinate relationship is as follows:

[0132] ;

[0133] in, Indicates a non-zero scaling factor. Represents a normal reference image The homogeneous coordinates of the matching points in the data. Indicates the current inspection image The normalized homogeneous coordinates of the corresponding points are used. The three-dimensional vector obtained on the right side of the equation needs to be divided by the third component for normalization. The first two components after normalization are the two-dimensional pixel coordinates in the current inspection image.

[0134] Calculate the registration quality vector based on the RANSAC interior point set. :

[0135] ;

[0136] ;

[0137] ;

[0138] in, Indicates the number of interior points. Indicates the number of candidate matches. Indicates the scale of interior points. This represents the average reprojection error, where i represents the index of a matching pair within a given set of points. Represents the set of interior point indices in RANSAC. A binary descriptor representing a specific ORB keypoint in a normal reference image. The Bit value, This represents the binary descriptor of the ORB keypoint in the current inspection image that is matched with a specific ORB keypoint in the normal reference image. The Bit value, This represents a bitwise XOR operation;

[0139] The number of interior points, the proportion of interior points, the average reprojection error, and the invertibility of the homography matrix all satisfy the following preset conditions: Not less than the quantity threshold Not lower than the proportion threshold Not higher than the error threshold and When reversible, the registration gate quantity The value is 1, meaning the gating condition is as follows:

[0140] ;

[0141] in, For quantity threshold, This is the proportional threshold. For the error threshold, The determinant of the homography matrix. The threshold value for determining whether a homography matrix is ​​close to singular is denoted by the minimum absolute determinant.

[0142] Registration gate quantity When the value is 1, the registration status is REGISTRATION_OK, indicating successful registration and allowing further processing; otherwise, REGISTRATION_FAILED and the registration quality vector are output. The system will be marked as pending review, and no definitive conclusion will be drawn regarding whether there are any abnormalities or not.

[0143] S3, Reference image perspective registration and effective region mask generation.

[0144] After registration gating is successful, homography matrix is ​​used. For normal reference images Perform perspective transformation to obtain the image compared to the current inspection image. Spatial alignment refers to a registration reference image with consistent coordinates. ;

[0145] ;

[0146] in, Represents the perspective transformation operator. The image after edge occlusion is shown at the normal reference time phase;

[0147] Construction and normal baseline image An initial mask of the same size with all pixels having valid values ​​is a fully valid initial mask. ,right Execution based on the same homography matrix The geometrically effective mask is obtained by perspective transformation of the output size and boundary rules. Geometric effective mask Compared with the current inspection image Edge masking, normal reference image The effective region mask is obtained by intersecting the transformed edge masking mask. :

[0148] ;

[0149] in, Represents the perspective transformation operator. and These represent the edge masking codes for the normal reference time phase and the current inspection time phase, respectively. This indicates taking the intersection. , and These represent the fully valid initial mask, the geometrically valid mask, and the final valid region mask, respectively; in each mask, 1 represents a valid pixel and 0 represents an invalid pixel.

[0150] Using the geometric transformation result of the fully valid initial mask instead of image brightness to determine the valid area can avoid mistaking the device's own dark areas as invalid fill areas.

[0151] S4. Model input construction and coordinate chain recording while maintaining aspect ratio.

[0152] For the current inspection image Registration reference image and effective region mask Scaling and padding offsets that maintain aspect ratio are performed using the same scaling ratio to ensure consistent spatial correspondence among the three elements. Interpolation is performed after scaling: bilinear interpolation is used for the image, and nearest-neighbor interpolation is used for the mask. The effective region mask of the processed model input is denoted as […]. ;

[0153] The mapping relationship between scaling and padding offset is as follows:

[0154] ;

[0155] ;

[0156] in, Indicates the scaling ratio. and These represent the width and height of the input canvas for the C-3PO change detection model, respectively. This indicates the width of the current inspection image and the normal reference image. This indicates the height of the current inspection image and the normal reference image. and These represent the horizontal fill amount and the vertical fill amount, respectively. This represents the original pixel coordinates of the current inspection image. This represents the input spatial pixel coordinates of the C-3PO model;

[0157] Scaling Horizontal fill amount and vertical fill volume The coordinate chain metadata is stored as the reasoning metadata for the current image pair (i.e., a specific inspection request) and used for inverse mapping;

[0158] For the current inspection image and registration reference image Using the same color channel order, pixel scaling factor, and channel mean vector and standard deviation vector Perform channel-by-channel normalization to obtain the reference time phase input. and current phase input As shown in the following formula:

[0159] ;

[0160] in, Indicates phase index, The phase index value is indicated. or : Indicates the normal reference phase. Indicates the current inspection phase. Indicates reference timing input Current phase input ; This indicates scaling and padding operations that maintain aspect ratio. This represents the image after edge occlusion at time t, and ⊘ represents element-wise division.

[0161] The model interface can receive two three-channel tensors representing the current time phase and the reference time phase respectively, or it can encapsulate them along the channel dimension into a six-channel tensor and then split it into two three-channel tensors at the model entry point. Regardless of the interface form used, the two time phase images are fed into the parameter-sharing backbone network separately, rather than being processed directly as a single six-channel image by a single early fusion encoder. The six-channel tensor is encapsulated in the order of "current time phase three channels first, reference time phase three channels second"; if the model needs to output addition or missing types with directional meaning, this order must be consistent with the training phase.

[0162] S5, shared backbone feature extraction, C-3PO multi-temporal variation modeling and differential probability inference.

[0163] Reference time phase Input and current phase input The data are fed into the backbone network of the C-3PO (Combine 3 Possible Change Types) change detection model, which shares parameters. Parameter sharing ensures that the features of the two time phases are in the same representation space, reducing spurious changes introduced by encoder differences.

[0164] scale (In this embodiment, k=4), the parameter-sharing backbone network respectively obtains data from the registration reference image. and current inspection images Extracting reference phase features and current phase characteristics This forms a pyramid of dual temporal features:

[0165] ;

[0166] ;

[0167] in, Indicates the backbone network at scale Feature mapping;

[0168] Subsequently, the MTF (Merge Temporal Features) module in the C-3PO change detection model combines and models the bi-temporal features through three intermediate change relationships: appearance, disappearance, and exchange. For each scale, a change feature branch and an information feature branch are set up, as follows:

[0169] For each scale, three change branches are constructed: emergence change, vanishing change, and exchange change. Emerging change emphasizes the positive increment of the current time phase relative to the reference time phase, and the emergence change branch extracts features from the positive difference between the current time phase and the reference time phase. Vanishing change emphasizes the negative increment, and the vanishing change branch extracts features from the positive difference between the reference time phase and the current time phase. Exchange change describes structural replacement or state transition using a symmetrical representation of bidirectional differences, and the exchange change branch extracts features of a structure being replaced by another structure from the symmetrical representation of bidirectional differences. The three types of change features can be implemented using the following formula:

[0170] ;

[0171] ;

[0172] ;

[0173] in, This indicates the appearance of changing characteristics. This indicates the characteristics of disappearance and change. Indicates the characteristics of exchange and change. This represents a modified linear unit used to preserve non-negative characteristic responses;

[0174] Information feature branch through reference time phase features and current phase characteristics Summation and convolution mapping are performed to preserve the semantic information shared by the two phases, thus obtaining the original semantic features of the two phases;

[0175] The three types of variation features and the original semantic features of the two phases are fused element-wise after learningable feature mapping (in an optional implementation, they can also be concatenated along the channel dimension and then subjected to convolution, normalization, and nonlinear mapping) to obtain the scale. Fusion characteristics As shown in the following formula:

[0176] ;

[0177] in, This represents a learnable feature fusion mapping;

[0178] Finally, the multi-scale fusion module of FPN (Feature Pyramid Network) in the C-3PO change detection model fuses features at various scales. The segmentation head performs upsampling, spatial alignment, and top-down multi-scale fusion, and outputs a single-channel difference logit map, which is then processed by a sigmoid function to obtain a difference probability map. :

[0179] ;

[0180] in, Represents the standard deviation vector. Indicates the split head. This represents a feature pyramid network used for multi-scale feature fusion. , Representing scale 1, respectively The fusion characteristics;

[0181] Input the model obtained in step S4 into the effective region mask. and difference probability plot Element-wise multiplication yields the effective difference probability map. As shown in the following formula:

[0182] ;

[0183] This makes the difference probability of perspective fill area, masked edge and other invalid area zero.

[0184] S6. Post-processing of effective domain constraints, candidate region screening and abnormal candidate region identification.

[0185] For the probability plot of effective differences Probabilistic threshold segmentation is performed. First, isolated responses are removed by morphological opening operation (erosion followed by dilation). Then, adjacent changed pixels are connected and small holes are filled by morphological closing operation (dilation followed by erosion) to obtain the region to be extracted.

[0186] Extract connected components, contours, and bounding rectangles within the region to be extracted, forming a candidate connected component set. Generate using the following formula:

[0187] ;

[0188] in, This indicates the connected component extraction operator. This represents the morphological closing operation. Represents the morphological opening operation. Indicates the probability threshold. Represents morphological structural elements;

[0189] Candidate connected regions are filtered based on minimum area, maximum area, aspect ratio, effective region mask coverage, and average region difference probability. Regions with overlap higher than the merging threshold or boundary spacing less than the merging distance are merged to obtain abnormal candidate regions.

[0190] Anomaly candidate regions must simultaneously meet conditions such as area range, aspect ratio range, lower limit of mask coverage, and lower limit of average probability. These thresholds (including area, aspect ratio, mask coverage, and average difference probability) can be configured independently according to equipment type or inspection point.

[0191] Regional average probability of difference and effective mask coverage The calculation is as follows:

[0192] ;

[0193] ;

[0194] in, Indicates the first Connected components, This represents the input spatial pixel coordinates of the C-3PO change detection model. Represents the probability plot of effective differences Input spatial pixel coordinates in the model The probability value of the difference at that location, Represents the effective region mask of the model input. Input spatial pixel coordinates in the model The mask value at the location is 1 for valid pixels and 0 for invalid pixels; Indicates the number of pixels in the connected components;

[0195] The current implementation performs thresholding, morphological processing, and connected component extraction on the difference probability map to obtain abnormal candidate regions. It does not distinguish between new, missing, and state change types. The appearance, disappearance, and state change branches are only used as intermediate features within the MTF module for fusion.

[0196] S7, inverse mapping of abnormal candidate regions, comprehensive confidence and structured output.

[0197] If there is at least one abnormal candidate region that meets the conditions of area, aspect ratio, effective region mask coverage, and average difference probability threshold, the current inspection image is marked as "abnormality exists"; otherwise, it is marked as "none" to indicate that no abnormality was found or needs to be reviewed. If an abnormality exists, the cropping result after inverse mapping of the abnormal candidate region is taken as the abnormal region.

[0198] Scaling ratio saved using S4 Horizontal fill amount and vertical fill volume The boundary points of the anomaly candidate region in the model input coordinate system are inversely mapped to the original pixel coordinate system of the current inspection image, and the inversely mapped coordinates are cropped to the width and height range of the current inspection image:

[0199] ;

[0200] ;

[0201] in, This represents the input spatial pixel coordinates of the C-3PO change detection model. This represents the original pixel coordinates of the current inspection image after inverse mapping; Indicates the scaling ratio. and These represent the horizontal fill amount and the vertical fill amount, respectively.

[0202] Overall confidence level of the abnormal region It can be derived from the regional average difference probability Effective mask coverage and the registration quality vector Normalized geometric confidence obtained from mapping The weighted average is used to facilitate threshold configuration, alarm sorting, and manual review by the operations and maintenance platform. One possible calculation method is shown in the following formula:

[0203] ;

[0204] ;

[0205] in, , , These are weight parameters;

[0206] The entire system encapsulates the discrimination results into structured output, which includes the inspection object identifier (object_id), processing status code (code), discrimination description (desc), discrimination type (type), discrimination value (value), abnormal region location (pos), interface confidence field (conf), result image storage path (res_image_path), and result image name (res_image_name). The type (type) is fixed to "tx_pb". When the abnormal region result list is not empty, the discrimination description (desc) is set to "different", the discrimination value (value) is set to "1", and the corresponding bounding rectangle vertex coordinates are output for each abnormal region. When the candidate difference region result list is empty, the discrimination description (desc) is set to "no difference", the discrimination value (value) is set to "0", and the abnormal region location (pos) is set to an empty object.

[0207] The position pos of each abnormal region is represented by the four vertices of the bounding rectangle. The outer rectangle of the abnormal region for:

[0208] ;

[0209] Then the set of coordinates of the four vertices corresponding to the circumscribed rectangle. for:

[0210] ;

[0211] in, Indicates the abnormal area number. and These represent the x and y coordinates of the top-left corner of the circumscribed rectangle in the original pixel coordinate system of the current inspected image, respectively. and These represent the width and height of the bounding rectangle, respectively.

[0212] The resulting image is the image after drawing the bounding rectangle of the abnormal area on the current inspection image, and its storage location is output through res_image_path and res_image_name.

[0213] Example 2

[0214] This embodiment provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the substation anomaly detection method described in Embodiment 1.

[0215] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0216] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0217] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0218] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0219] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for identifying anomalies in a substation, characterized in that, include: Edge masking is applied to the current inspection image and the normal reference image of the same inspection object within the substation; ORB feature points and binary descriptors of the current inspection image and the normal reference image after edge occlusion are extracted respectively. Feature matching pairs are obtained based on the Hamming distance of the descriptors. The homography matrix pointing from the coordinate system of the normal reference image to the coordinate system of the current inspection image is estimated from the feature matching pairs using RANSAC. Based on the homography matrix, perspective transformation is performed on the normal reference image and the fully effective initial mask of the same size as the normal reference image to obtain the registration reference image and the effective region mask; Perform aspect ratio-preserving scaling and padding on the current inspection image, registration reference image, and effective region mask with the same scaling ratio, and record the inverse mapping parameters between the input coordinate system of the C-3PO change detection model and the coordinate system of the current inspection image; The scaled and filled current inspection image and the registration reference image are used as a dual-temporal image pair as input to the C-3PO change detection model, and the output is a difference probability map; By using the effective region mask to constrain the difference probability map, threshold segmentation, morphological processing and connected component filtering are performed on the constrained difference probability map to obtain abnormal candidate regions. Based on the inverse mapping parameters, the candidate anomaly regions are mapped to the coordinate system of the current inspection image, and the anomaly identifier, anomaly region, and overall confidence score are output.

2. The substation anomaly detection method according to claim 1, characterized in that, Edge masking is applied to the current inspection image and the normal reference image of the same inspection object within the substation, including: The current inspection image is obtained based on the site identifier, equipment identifier, inspection point and viewpoint identifier, and the normal reference image is read when the inspection object is in a confirmed normal state. Before implementing edge masking, perform file readability, pixel matrix non-emptiness, number of channels, bit depth, minimum resolution and aspect ratio deviation consistency checks on the current inspection image and the normal reference image. When implementing edge masking, the masking width of the edge masking Determined based on the image's shorter side size and preset occlusion ratio: ; In the formula, This indicates the rounding operation. This indicates the width of the current inspection image and the normal reference image. This indicates the height of the current inspection image and the normal reference image. Indicates the edge occlusion ratio; The image after edge masking is as follows: ; In the formula, Indicates phase Image after edge masking Indicates phase Image before edge occlusion Mask the edges. Indicates the edge padding value. Indicates phase index, The phase index value is indicated. or : Indicates the normal reference phase. Indicates the current inspection phase. This indicates element-wise multiplication, and the constant 1 represents a matrix of all 1s of the same size as the mask. express The mask.

3. The substation anomaly detection method according to claim 1, characterized in that, ORB feature points and binary descriptors are extracted from the current inspection image after edge occlusion and the normal reference image, respectively. Feature matching pairs are obtained based on the Hamming distance of the descriptors, including: The current inspection image after edge masking and normal baseline image Convert to grayscale and compare with a normal reference image. and current inspection images ORB key points are detected in the grayscale images and L-bit binary descriptors are calculated. A brute-force matcher is used to calculate the Hamming distance between descriptors. Matching pairs formed by ORB key points of normal reference image and corresponding ORB key points of current inspection image are sorted in ascending order according to the Hamming distance of their descriptors. High-quality matching pairs with a preset ratio, a number of no less than four groups, and spatial dispersion are retained. The formula for calculating the Hamming distance between descriptors is as follows: ; In the formula, A binary descriptor representing a specific ORB keypoint in a normal reference image. The binary descriptor of the ORB keypoint matched with a certain ORB keypoint in the normal reference image in the current inspection image. Hamming distance, This indicates a bitwise XOR operation. This represents the bit index, where L represents the number of bits in the binary descriptor. A binary descriptor representing a specific ORB keypoint in a normal reference image. The Bit value, This represents the binary descriptor of the ORB keypoint in the current inspection image that is matched with a specific ORB keypoint in the normal reference image. The Bit value.

4. The substation anomaly detection method according to claim 1, characterized in that, The homography matrix pointing from the normal reference image coordinate system to the current inspection image coordinate system is estimated from feature matching pairs using RANSAC, including: RANSAC is used to estimate the homography matrix from high-quality matching pairs, with the mapping direction from the normal reference image to the current inspection image. The homogeneous coordinate relationship is: ; In the formula, Indicates a non-zero scaling factor. Represents a normal reference image The homogeneous coordinates of the matching points in the data. Indicates the current inspection image Normalized homogeneous coordinates of the corresponding points in the middle; Calculate the registration quality vector based on the RANSAC interior point set. : ; ; ; In the formula, Indicates the number of interior points. Indicates the number of candidate matches. Indicates the scale of interior points. This represents the average reprojection error, where i represents the index of a matching pair within a given set of points. Represents the set of interior point indices in RANSAC. A binary descriptor representing a specific ORB keypoint in a normal reference image. The Bit value, This represents the binary descriptor of the ORB keypoint in the current inspection image that is matched with a specific ORB keypoint in the normal reference image. The Bit value, This represents a bitwise XOR operation; If and only if the number of interior points Not less than the quantity threshold, interior point ratio Not lower than the proportional threshold, average reprojection error Not exceeding the error threshold and homography matrix If the registration is reversible, the registration is successful; otherwise, output the registration failure status and the registration quality vector. The system will be marked as pending review, and no definitive conclusion will be drawn regarding whether there are any abnormalities or not.

5. The substation anomaly detection method according to claim 1, characterized in that, Based on the homography matrix, perspective transformation is performed on the normal reference image and a fully valid initial mask of the same size as the normal reference image to obtain the registration reference image and the valid region mask, including: Using homography matrix For normal reference images Perform perspective transformation to obtain the image compared to the current inspection image. Spatial alignment registration reference image : ; In the formula, Represents the perspective transformation operator. The image after edge occlusion is shown at the normal reference time phase; Construction and normal baseline image Initial mask of the same size with all pixels having valid values ,right Execution based on the same homography matrix The geometrically effective mask is obtained by perspective transformation of the output size and boundary rules. Geometric effective mask Compared with the current inspection image Edge masking, normal reference image The effective region mask is obtained by intersecting the transformed edge masking mask. : ; In the formula, and These represent the edge masking codes for the normal reference time phase and the current inspection time phase, respectively. This indicates finding the intersection.

6. The substation anomaly detection method according to claim 1, characterized in that, Perform aspect ratio-preserving scaling and padding on the current inspection image, registration reference image, and effective region mask at the same scaling ratio, and record the inverse mapping parameters between the C-3PO change detection model input coordinate system and the current inspection image coordinate system, including: For the current inspection image Registration reference image and effective region mask Scaling and padding offsets that maintain aspect ratio are performed using the same scaling ratio. The mapping relationship between scaling and padding offset is as follows: ; ; In the formula, Indicates the scaling ratio. and These represent the width and height of the input canvas for the C-3PO change detection model, respectively. This indicates the width of the current inspection image and the normal reference image. This indicates the height of the current inspection image and the normal reference image. and These represent the horizontal fill amount and the vertical fill amount, respectively. This represents the original pixel coordinates of the current inspection image. This represents the input spatial pixel coordinates of the C-3PO model; Scaling Horizontal fill amount and vertical fill volume Save as inverse mapping parameters.

7. The substation anomaly detection method according to claim 1, characterized in that, The scaled and padded current inspection image and the registration reference image are used as a dual-temporal image pair as input to the C-3PO change detection model, and the output difference probability map includes: For the current inspection image and registration reference image Using the same color channel order, pixel scaling factor, and mean vector and standard deviation vector Perform channel-by-channel normalization to obtain the reference time phase input. and current phase input : ; In the formula, Indicates phase index, The phase index value is indicated. or , Indicates the normal reference phase. Indicates the current inspection phase. Indicates reference timing input Current phase input ; This indicates scaling and padding operations that maintain aspect ratio. This represents the image after edge occlusion at time t, and ⊘ represents element-wise division. Input the reference time phase and current phase input The data are fed into the parameter-sharing backbone network of the C-3PO change detection model to extract baseline time-phase features. and current phase characteristics : ; ; In the formula, For backbone networks at scale Feature mapping; Reference time phase characteristics and current phase characteristics The data is fed into the MTF module of the C-3PO change detection model, which outputs three types of change features: ; ; ; In the formula, This indicates the appearance of changes. This indicates the characteristics of disappearance and change. Indicates the characteristics of exchange and change. Indicates a modified linear unit; The three types of change characteristics are compared with the reference time phase characteristics. Current temporal characteristics The original semantic features are summed and fused element-wise after being processed by learnable feature mapping to obtain the scale. Fusion characteristics : ; In the formula, This represents a learnable feature fusion mapping; Fusion features at various scales The data is fed into the FPN multi-scale fusion module of the C-3PO change detection model to perform fusion features at each scale. Upsampling, spatial alignment, and top-down multi-scale fusion are performed. The fusion result is fed into the segmentation head of the C-3PO change detection model to obtain a difference probability map. : ; In the formula, Represents the standard deviation vector. Indicates the split head. Representation of feature pyramid network; , Representing scale 1, respectively The fusion characteristics; Input the model into the effective region mask. and difference probability plot Element-wise multiplication yields the effective difference probability map. : 。 8. The substation anomaly detection method according to claim 1, characterized in that, By constraining the difference probability map using an effective region mask, threshold segmentation, morphological processing, and connected component filtering are performed on the constrained difference probability map to obtain anomaly candidate regions, including: For the probability plot of effective differences Probabilistic thresholding is performed, isolated responses are removed using morphological opening operations, adjacent changed pixels are connected and small holes are filled using morphological closing operations, and a set of candidate connected components is extracted. for: ; In the formula, This indicates the connected component extraction operator. This represents the morphological closing operation. Represents the morphological opening operation. Indicates the probability threshold. Represents morphological structural elements; Candidate connected regions are filtered based on minimum area, maximum area, aspect ratio, effective region mask coverage, and average region difference probability. Regions with overlap higher than the merging threshold or boundary spacing less than the merging distance are merged to obtain abnormal candidate regions. Among them, the regional average difference probability and effective mask coverage The calculation formulas are as follows: ; ; in, Indicates the first Connected components, This represents the input spatial pixel coordinates of the C-3PO change detection model. Represents the probability plot of effective differences Input spatial pixel coordinates in the model The probability value of the difference at that location, Represents the effective region mask of the model input. Input spatial pixel coordinates in the model The mask value at that location, This indicates the number of pixels in the connected component.

9. The substation anomaly detection method according to claim 1, characterized in that, Based on the inverse mapping parameters, the anomaly candidate regions are mapped to the coordinate system of the current inspection image, and the anomaly identifier, anomaly region, and overall confidence score are output, including: If an abnormal candidate region exists, the current inspection image will be marked as having an anomaly; otherwise, it will be marked as unmarked, indicating that no anomaly was found or that it needs to be reviewed. Using the saved inverse mapping parameters, the boundary points of the anomaly candidate region in the input coordinate system of the C-3PO change detection model are inversely mapped to the coordinate system of the current inspection image, and the inverse-mapped coordinates are cropped to the width and height range of the current inspection image as the anomaly region: ; ; In the formula, This represents the input spatial pixel coordinates of the C-3PO change detection model. This represents the original pixel coordinates of the current inspection image after inverse mapping; Indicates the scaling ratio. and These represent the horizontal fill amount and the vertical fill amount, respectively. The location of the abnormal region is represented by the four vertices of the circumscribed rectangle, the first... The outer rectangle of the abnormal region The set of coordinates of the four vertices corresponding to the circumscribed rectangle for: ; ; in, Indicates the abnormal area number. and These represent the x and y coordinates of the top-left corner of the circumscribed rectangle in the original pixel coordinate system of the current inspected image, respectively. and These represent the width and height of the bounding rectangle, respectively. Overall confidence level of the abnormal region The calculation formula is: ; ; In the formula, This represents the probability of average regional differences. Indicates the effective mask coverage. To register the mass vector, To determine the normalized geometric reliability obtained from the registration quality vector mapping, , , These are the weight parameters.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements all the steps of the substation anomaly detection method according to any one of claims 1 to 9.