Power equipment hot spot detection and identification method based on target domain enhanced representation

By building a shared feature learning and enhancement module, combining infrared and visible light images, and using adversarial learning and contrast learning technology, the efficiency and accuracy of thermal spot detection of power equipment are solved, and comprehensive and accurate detection and early warning of power equipment status are achieved.

CN120510346APending Publication Date: 2025-08-19齐丰科技股份有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510622136.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The prior art has low efficiency and poor accuracy in the detection of heat spots of power equipment, and cannot adapt to different types and environments of power equipment, and the image quality is poor, resulting in unstable detection results.

Method used

Using a method based on the enhanced representation of the target domain, the shared feature learning module, the shared feature enhancement module and the target domain generalization module are constructed, combined with infrared thermal imagers and visible light images, and using adversarial learning and contrast learning techniques, the shared features are extracted and enhanced to achieve accurate detection of thermal spots in power equipment.

Benefits of technology

It improves the accuracy and reliability of thermal spot detection of power equipment, can adapt to different environmental conditions, comprehensively obtain equipment status information, provide visual results and timely early warnings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120510346A_ABST
    Figure CN120510346A_ABST
Patent Text Reader

Abstract

An electrical equipment hot spot detection and identification method based on target domain enhanced representation comprises the following steps: acquiring an infrared thermal imager image, a visible light image and the like of electrical equipment under different environmental conditions and preprocessing the images to ensure the image quality; constructing a common feature learning module, and extracting common features of different domains by using an adversarial learning technology; constructing a common feature enhancement module, and expanding a common feature space through comparative learning; constructing a target domain generalization module by using the enhanced common features, and training a target domain feature encoder to extract target domain complete features; and thus, hot spot detection and identification are realized, and a result is visually displayed and pre-warned. According to the scheme, the accuracy and reliability of hot spot detection and identification of the power equipment can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric power equipment, and in particular to a method for detecting and identifying hot spots in electric power equipment based on enhanced representation of a target domain. Background Art

[0002] In the power sector, ensuring the safe and stable operation of power equipment is crucial. Failure to promptly detect and address hot spots in power equipment can lead to serious power failures and even the collapse of the entire power system. In the past, the detection of hot spots in power equipment relied primarily on regular manual inspections. However, this approach has numerous drawbacks. First, manual inspections are extremely inefficient and cannot rapidly and comprehensively inspect large quantities of power equipment. Second, test results largely depend on the experience and expertise of the inspectors, which is highly subjective and difficult to guarantee accuracy.

[0003] With technological advancements, some image-based detection methods have begun to be applied. However, these early methods have significant shortcomings. For example, some methods can only process a single type of image, such as analyzing infrared thermal imagers or visible light images. While infrared thermal imagers can reflect temperature distribution, they are insufficient in depicting the appearance and structural details of the device. While visible light images can show the appearance of the device, they cannot directly reflect temperature information.

[0004] Moreover, during the image acquisition process, due to the complexity and variability of environmental factors such as uneven lighting and electromagnetic interference, the quality of the acquired images is often poor, with problems such as noise and blur. This brings great difficulties to subsequent image processing and feature extraction. At the feature extraction and analysis level, traditional methods are mostly based on simple mathematical models and manually set features. Their characterization capabilities and adaptability are very limited for the complex and changeable states of power equipment. In addition, when facing power equipment of different types and different operating environments, existing technologies lack versatility and generalization capabilities, making it difficult to accurately detect hot spot problems in various situations. Summary of the Invention

[0005] To solve the above problems, the present invention proposes a method for detecting and identifying hot spots in power equipment based on enhanced representation of the target domain.

[0006] Step 1: Data acquisition and preprocessing: Collect images of power equipment under different environmental conditions, including infrared thermal imagers and visible light images. Preprocess the captured images, including denoising, normalization, and cropping, to ensure image quality.

[0007] Step 2: Learn common features and build a common feature learning module SFLM. Using adversarial learning technology, by training the domain discriminator, the model learns to extract common features of different domains.

[0008] Step 3: Enhance the common features and build a common feature enhancement module. Through contrastive learning, align the features of different levels in the output space and expand the common feature space.

[0009] Step 4: Target domain generalization: Use the enhanced common features to construct the target domain generalization module TDGM, train the target domain feature encoder, and extract the complete features of the target domain.

[0010] Step 5: Hot spot detection and identification: extract the comprehensive features formed by the fusion of common features of different domains in the target domain image, enhanced common features, and complete features of the target domain, detect and identify hot spots, generate a segmentation mask to clearly define the hot spot area, and distinguish the hot spot type based on feature differences to output reliable detection results.

[0011] Step 6: Visualize and warn of hot spot detection results, including hot spot location, size, type, and other information. Based on the severity of the hot spot, issue a warning signal to alert relevant personnel to take timely action.

[0012] As a further improvement of the present invention, the process of data collection and preprocessing in step 1 can be expressed as:

[0013] Step 1.1: Data acquisition: Collect images of power equipment under different environmental conditions, including infrared thermal imagers and visible light images;

[0014] Infrared thermal imagers use the infrared radiation characteristics of an object to create images, which can reveal the temperature distribution on the surface of power equipment. When a part of the power equipment experiences a potential fault, it may overheat and form a hot spot. This high-temperature area will appear on the infrared thermal imager image, forming a sharp contrast with the surrounding normal temperature areas, making it easier to locate and analyze the hot spot.

[0015] Visible light images can intuitively display the appearance, structure, and some surface details of power equipment. Although they cannot directly reflect temperature information, they can help confirm the specific shape of the equipment, component location, etc., and when used in conjunction with infrared thermal imager images, they can help to analyze and judge power equipment more comprehensively and accurately.

[0016] Step 1.2: Data preprocessing: By replacing the value of the central pixel with the average value of the pixels in the neighborhood, the image is smoothed and noise is removed. Assume that the coordinates of a pixel in the image are (i, j). Take an m×n neighborhood around it as the center, sort the grayscale values of the pixels in the neighborhood, and assign the middle value to the pixel.

[0017] Step 1.3: Normalization processing, first calculate the mean μ and standard deviation σ of the image pixel grayscale value. For the pixel grayscale value x, the grayscale value calculation formula after normalization is:

[0018]

[0019] Step 1.4: Image cropping: Remove the redundant background from the image by cropping, and only retain the image portion containing the key parts of the power equipment.

[0020] As a further improvement of the present invention, the process of learning common features in step 2 can be expressed as follows:

[0021] Step 2.1: Construct the overall architecture of the common feature learning module SFLM

[0022] The main goal of the common feature learning module (SFLM) is to enable the model to mine and learn the common features in power equipment images from different domains through adversarial learning techniques. These common features can provide a universal representation that is not overly affected by image differences under different environmental conditions.

[0023] The SFLM is constructed through an adversarial learning network, which consists of a feature extraction generator G and a domain discriminator D. The feature extraction part is used to extract features from the input image, and the domain discriminator is used to determine which domain these features come from.

[0024] Step 2.2: Build an adversarial learning network

[0025] The generator G receives images x from different domains and outputs the corresponding feature representation G(x); the goal of the generator is to generate a feature representation that makes it difficult for the domain discriminator D to distinguish whether these features are from the source domain or the target domain; the loss function L of the generator G is G It is designed based on the deception domain discriminator, and its formula is:

[0026]

[0027] Among them, x s is the source domain image, x t is the target domain image, is the distribution of data from the source domain P s The sampled image x s Find the expectation, the feature G(x s ), which enables the discriminator D to judge that it is not from the source domain, that is, D(G(x s ))'s value should be as small as possible; is the distribution of data from the target domain P t The sampled image x t Find the expectation, the feature G(x t ), which enables the discriminator D to judge that it comes from the source domain, that is, D(G(x t )) is as large as possible; by minimizing L G, the generator continuously adjusts its own parameters so that the generated features can learn common features that are similar in both domains;

[0028] The domain discriminator D receives the feature G(x) output by the generator G and outputs a probability value, which indicates the probability that the feature comes from the source domain. The loss function L of the domain discriminator D is D Expressed as:

[0029]

[0030] in, Indicates that for the data distribution P from the source domain s The sampled image x s , the feature G(x s ), discriminator D(G(x s )) hope to be able to correctly judge it as coming from the source domain, that is, D(G(x s ))'s value should be as large as possible; Denotes the distribution of data from the target domain P t The sampled image x t , the feature G(x t ), the discriminator hopes to correctly judge that it is not from the source domain, that is, D(G(x t )) is as small as possible; by minimizing L D ,The discriminator continuously adjusts its own parameters to improve the ,ability of distinguishing the features of the source and target ,domains;

[0031] Step 2.3: During training, update the parameters of the generator G and the domain discriminator D alternately; first fix the parameters of the generator G and calculate the loss L of the discriminator D D , and update the parameters of the discriminator D according to the gradient descent optimization algorithm, so that the discriminator can better distinguish the characteristics of the source domain and the target domain; fix the updated parameters of the discriminator D and calculate the loss L of the generator G G , and updates the parameters of the generator G, making the features generated by the generator more difficult to be distinguished by the discriminator; after multiple iterative training, the generator G is able to learn the common features between different domains.

[0032] As a further improvement of the present invention, the process of enhancing the common features in step 3 can be expressed as follows:

[0033] Step 3.1: Common Feature Enhancement Module Architecture. The main goal of the common feature enhancement module is to enhance the common features learned in step 2, including aligning features at different levels in the output space, expanding the common feature space, and enhancing the decoder's decoding ability for the common features.

[0034] Step 3.2: Construct contrastive learning sample pairs. For the positive sample pairs, the power equipment images I1 and I2 of the same category have corresponding common features obtained by the feature generator G, which are F1 = {f 11 ,f 12 ,...,f 1n} and F2={f 21 ,f 22 ,...,f 2n}, f ij Represents the feature vector F corresponding to the i-th image i The j-th dimension feature in (F1, F2) constitutes a positive sample pair; for the negative sample pairs of different categories of power equipment images I3 and I4, their common features are F3 = {f 31 ,f 32 ,...,f 3n} and F4={f 41 ,f 42 ,...,f 4n}, (F3, F4) constitutes a negative sample pair;

[0035] Step 3.3: Design of loss function and training process for contrastive learning. InfoNCE loss function is used to drive the contrastive learning process. The loss function L InfoNCE The formula is:

[0036]

[0037] Among them, F a and F b are the two eigenvectors in the positive sample pair; E represents the expectation, which is the average calculation of all positive sample pairs; τ is the temperature parameter used to adjust the scale of the similarity score; sim(·,·) is a similarity metric function, expressed using cosine similarity, and the cosine similarity calculation formula is:

[0038]

[0039] Among them, u={u1,u2,...,u n} and v={v1,v2,...,v n} is the eigenvector;

[0040] During the training process, positive and negative sample pairs are extracted from the dataset and the InfoNCE loss function is calculated. Then, the backpropagation algorithm is used to update the parameters in the common feature enhancement module.

[0041] Step 3.4: Align features at different levels and expand the shared feature space. During contrastive learning to minimize the InfoNCE loss function, features at different levels are gradually aligned in the output space. For shallow edge features and deep semantic features, the model combines and aligns them. As features are aligned and optimized, the shared feature space is expanded.

[0042] As a further improvement of the present invention, the process of target domain generalization in step 4 can be expressed as follows:

[0043] Step 4.1: Create a target domain generalization module (TDGM). This module consists of multiple convolutional layers, pooling layers, and fully connected layers to construct the target domain feature encoder in TDGM.

[0044] Convolutional layer 1: Use 32 convolution kernels of size 3×3 with a stride of 1 to perform convolution operations on the enhanced common features of the input. According to the convolution calculation formula:

[0045] Output1=Conv(F enhanced ,kernel1)

[0046] Among them, F enhanced represents the enhanced common features obtained in step 3, kernel1 represents the first set of convolution kernels, Conv is the convolution operation, Output1 is the output of convolution layer 1, which is passed to the next layer after being processed by the activation function;

[0047] Pooling layer 1: It is connected after convolutional layer 1 and uses maximum pooling. The pooling window size is set to 2×2 and the step size is 2. Its function is to downsample the features, reduce the data dimension while retaining important features. The calculation formula can be expressed as:

[0048] Output pool1 =MaxPool(Output1)

[0049] Output pool1 It is the output of the pooling layer. MaxPool is a pooling operation. Similar convolutional layers and pooling layers are then stacked in sequence to gradually extract more abstract and representative features.

[0050] Finally, the fully connected layer is connected. The first fully connected layer has 128 neurons. The features output by the previous pooling layer are flattened and input, and the calculation is performed according to the operation logic of the fully connected layer:

[0051]

[0052] Among them, W1 is the weight matrix, b1 is the bias, It is the output of the last pooling layer. The Flatten operation flattens the multi-dimensional feature tensor into a one-dimensional vector.

[0053] Step 4.2: Train the target domain feature encoder

[0054] Initialize the parameters of the target domain generalization module, initialize the weights to the value of the normal distribution, and initialize the bias to 0; use the mean square error to measure the difference between the features output by the target domain feature encoder and the true features of the target domain, and the MSE loss function L TD The calculation is as follows:

[0055]

[0056] in, Represented as the feature output by the target domain feature encoder, It is represented as the corresponding target domain true complete feature, n represents the number of samples, d represents the sample dimension, is the predicted feature value on the jth feature dimension in the i-th sample output by the target domain feature encoder, yes The corresponding target domain real and complete features;

[0057] The Adam optimizer is used to update the network parameters to minimize the loss function. During training, the parameters of the target domain feature encoder are updated according to the following basic steps:

[0058] Compute the gradient:

[0059]

[0060] where g t is the gradient at the current moment t, θ t-1 is the network parameter at the previous moment, is the gradient calculation of the parameter θ;

[0061] Then update the first-order moment estimate m of the gradient at time t respectively t and the second-order moment estimate v t :

[0062] m t =β1·m t-1 +(1-β1)·g t

[0063] v t =β2·v t-1 +(1-β2)·g t 2

[0064] Among them, β1 and β2 are exponential decay rates, m t-1is the first-order moment estimate of the gradient at time t-1, v t-1 is the second-order moment estimate of the gradient at time t-1;

[0065] Then correct the gradient:

[0066]

[0067]

[0068] in, is the first-order moment estimate m t The correction, is the second-order moment estimate v t amendments;

[0069] Finally update the network parameters:

[0070]

[0071] Among them, θ t is the updated model parameter at time t, θ t-1 is the model parameter at time t-1, α is the learning rate, and ε is a very small number used to prevent the denominator from being zero. By iterating the above process multiple times, the parameters of the convolutional layer, fully connected layer, and other layers in the target domain feature encoder are continuously adjusted, so that the loss function ε gradually decreases, and the network can learn how to accurately extract the complete features of the target domain from the enhanced common features.

[0072] Step 4.3: Extract complete features of the target domain

[0073] After the training is completed, the newly input enhanced common feature data is forward propagated in sequence according to the network structure of the trained target domain feature encoder. That is, starting from the input layer, through the operations of each convolutional layer, pooling layer, and fully connected layer, the final output is the extracted complete features of the target domain:

[0074]

[0075] Among them, ForwardPropagation represents the forward propagation operation, Encoder TD is the trained target domain feature encoder, is a new enhanced common feature, F target It is the complete feature of the target domain that we ultimately expect to obtain.

[0076] Beneficial effects: The technical effects of the present invention are:

[0077] 1. The shared feature learning module and shared feature enhancement module constructed in this paper can effectively mine and enhance shared features in power equipment images from different domains. This enables the model to learn more universal and representative feature representations, improving its adaptability and generalization capabilities for new and unseen power equipment images.

[0078] 2. By establishing and training a target domain generalization module, this invention can accurately extract the complete features of the target domain, further improving the accuracy of hot spot detection and identification. This allows for more accurate identification of potential hot spot issues, providing strong support for the maintenance and repair of power equipment.

[0079] 3. By collecting multiple image types, such as infrared thermal imagers and visible light images, from different environmental conditions and performing comprehensive processing, this method can comprehensively and accurately obtain status information on power equipment. This overcomes the limitations of single-image detection and significantly improves detection accuracy and reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] Figure 1 Flowchart of the present invention.

[0081] Figure 2 This is the target domain generalization structure diagram of the present invention. DETAILED DESCRIPTION

[0082] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0083] The present invention focuses on the detection and identification of hot spots in power equipment, integrates multi-type image acquisition and preprocessing, builds feature learning, enhancement and target domain generalization modules, achieves accurate detection, and generates visual results and early warnings. It covers acquisition, processing, learning, detection and other links, improving detection accuracy and efficiency. The invention flow chart is as follows Figure 1 As shown, the steps of the present invention are described in detail below.

[0084] Step 1: Data acquisition and preprocessing: Collect images of power equipment under different environmental conditions, including infrared thermal imagers and visible light images. Preprocess the captured images, including denoising, normalization, and cropping, to ensure image quality.

[0085] Step 1.1: Data collection: Collect images of power equipment under different environmental conditions, including infrared thermal imager images and visible light images.

[0086] Infrared thermal imagers use the infrared radiation characteristics of an object to create images, revealing the temperature distribution on the surface of electrical equipment. When a potential fault occurs in a part of the equipment, it may cause localized overheating, forming a hot spot. This high-temperature area will appear on the infrared thermal imager, contrasting sharply with the surrounding normal temperature areas, facilitating subsequent location and analysis of the hot spot.

[0087] Visible light images can visually demonstrate the appearance, structure, and detailed surface features of electrical equipment. While they cannot directly convey temperature information, they can help confirm the specific shape and component locations of the equipment. When used in conjunction with infrared thermal imagers, they facilitate more comprehensive and accurate analysis and assessment of electrical equipment.

[0088] Step 1.2: Data preprocessing: By replacing the value of the central pixel with the average of the pixels in the neighborhood, we smooth the image and remove noise. Assume that the coordinates of a pixel in the image are (i, j). Take an m×n neighborhood around it, sort the grayscale values of the pixels in the neighborhood, and assign the middle value to the pixel.

[0089] Step 1.3: Normalization processing, first calculate the mean μ and standard deviation σ of the image pixel grayscale value. For the pixel grayscale value x, the grayscale value calculation formula after normalization is:

[0090]

[0091] Step 1.4: Image cropping: Remove the redundant background from the image by cropping, and only retain the image portion containing the key parts of the power equipment.

[0092] Step 2: Learn common features and build a common feature learning module SFLM. Using adversarial learning technology, by training the domain discriminator, the model learns to extract common features of different domains.

[0093] Step 2.1: Construct the overall architecture of the common feature learning module SFLM

[0094] The main goal of the shared feature learning module (SFLM) is to enable the model to mine and learn shared features in power equipment images from different domains through adversarial learning techniques. These shared features can provide a universal representation that is not overly affected by image differences in different environmental conditions.

[0095] The SFLM is constructed through an adversarial learning network, which consists of a feature extraction generator G and a domain discriminator D. The feature extraction part is used to extract features from the input image, and the domain discriminator is used to determine which domain these features come from.

[0096] Step 2.2: Build an adversarial learning network

[0097] The generator G receives an image x from a different domain and outputs the corresponding feature representation G(x). The goal of the generator is to generate a feature representation that makes it difficult for the domain discriminator D to distinguish whether these features are from the source domain or the target domain. The loss function L of the generator G is G It is designed based on the deception domain discriminator, and its formula is:

[0098]

[0099] Among them, x s is the source domain image, x t is the target domain image, is the distribution of data from the source domain P s The sampled image x s Find the expectation, the feature G(x s ), which enables the discriminator D to judge that it is not from the source domain, that is, D(G(x s ))’s value should be as small as possible. is the distribution of data from the target domain P t The sampled image x t Find the expectation, the feature G(x t ), which enables the discriminator D to judge that it comes from the source domain, that is, D(G(x t )) is as large as possible. By minimizing L G , the generator continuously adjusts its own parameters so that the generated features can learn common features that are similar in both domains.

[0100] The domain discriminator D receives the feature G(x) output by the generator G and outputs a probability value, which indicates the probability that the feature comes from the source domain. The loss function L of the domain discriminator D is D Expressed as:

[0101]

[0102] in, Indicates that for the data distribution P from the source domain s The sampled image x s , the feature G(x s ), discriminator D(G(x s )) Hopefully, it can be correctly judged as coming from the source domain, i.e., D(G(x s ))’s value should be as large as possible. Denotes the distribution of data from the target domain P t The sampled image x t , the feature G(x t ), the discriminator hopes to correctly judge that it is not from the source domain, that is, D(G(x t)) is as small as possible. By minimizing L D ,The discriminator continuously adjusts its own parameters to improve the ,ability of distinguishing the features of the source and target ,domains.

[0103] Step 2.3: During training, update the parameters of the generator G and the domain discriminator D alternately. First, fix the parameters of the generator G and calculate the loss L of the discriminator D. D , and update the parameters of the discriminator D according to the gradient descent optimization algorithm, so that the discriminator can better distinguish the characteristics of the source domain and the target domain. Fix the updated parameters of the discriminator D and calculate the loss L of the generator G G , and updates the parameters of the generator G so that the features generated by the generator are more difficult to be distinguished by the discriminator. After multiple iterative training, the generator G is able to learn the common features between different domains.

[0104] Step 3: Enhance the common features and build a common feature enhancement module. Through contrastive learning, align the features of different levels in the output space and expand the common feature space.

[0105] Step 3.1: Common feature enhancement module architecture. The main goal of the common feature enhancement module is to enhance the common features learned in step 2, including aligning features of different levels in the output space, expanding the common feature space, and enhancing the decoder's decoding ability for common features.

[0106] Step 3.2: Construct contrastive learning sample pairs. For the positive sample pairs, the power equipment images I1 and I2 of the same category have corresponding common features obtained by the feature generator G, which are F1 = {f 11 ,f 12 ,...,f 1n} and F2={f 21 ,f 22 ,...,f 2n}, f ij Represents the feature vector F corresponding to the i-th image i The j-th dimension feature in (F1, F2) constitutes a positive sample pair. For the negative sample pair of different categories of power equipment images I3 and I4, their common features are F3 = {f 31 ,f 32 ,...,f 3n} and F4={f 41 ,f 42 ,...,f 4n}, (F3,F4) constitutes a negative sample pair.

[0107] Step 3.3: Design of loss function and training process for contrastive learning. InfoNCE loss function is used to drive the contrastive learning process. The loss function L InfoNCEThe formula is:

[0108]

[0109] Among them, F a and F b are the two eigenvectors in the positive sample pair; E represents the expectation, which is the average calculation of all positive sample pairs; τ is the temperature parameter used to adjust the scale of the similarity score; sim(·,·) is a similarity metric function, expressed using cosine similarity, and the cosine similarity calculation formula is:

[0110]

[0111] Among them, u={u1,u2,...,u n} and v={v1,v2,...,v n} is the eigenvector.

[0112] During training, positive and negative sample pairs are extracted from the dataset and the InfoNCE loss function is calculated. Then, the backpropagation algorithm is used to update the parameters in the common feature enhancement module.

[0113] Step 3.4: Align features at different levels and expand the shared feature space. During contrastive learning to minimize the InfoNCE loss function, features at different levels are gradually aligned in the output space. The model combines and aligns shallow edge features and deep semantic features. As features are aligned and optimized, the shared feature space is expanded.

[0114] Step 4: Target domain generalization, use the enhanced common features to build the target domain generalization module TDGM, train the target domain feature encoder, extract the complete target domain features, the target domain generalization structure diagram is as follows Figure 2 shown.

[0115] Step 4.1: Establish a target domain generalization module TDGM. The module contains multiple convolutional layers, pooling layers, and fully connected layers to construct the target domain feature encoder part of TDGM.

[0116] Convolutional layer 1: Use 32 convolution kernels of size 3×3 with a stride of 1 to perform convolution operations on the enhanced common features of the input. According to the convolution calculation formula:

[0117] Output1=Conv(F enhanced ,kernel1)

[0118] Among them, F enhancedrepresents the enhanced common features obtained in step 3, kernel1 represents the first convolution kernel set, Conv is the convolution operation, Output1 is the output of convolution layer 1, which is passed to the next layer after being processed by the activation function.

[0119] Pooling layer 1: It is connected after convolutional layer 1 and uses maximum pooling. The pooling window size is set to 2×2 and the step size is 2. Its function is to downsample the features, reduce the data dimension while retaining important features. The calculation formula can be expressed as:

[0120] Output pool1 =MaxPool(Output1)

[0121] Output pool1 It is the output of the pooling layer, MaxPool is the pooling operation, and then similar convolutional layers and pooling layers are stacked in sequence to gradually extract more abstract and representative features.

[0122] Finally, the fully connected layer is connected. The first fully connected layer has 128 neurons. The features output by the previous pooling layer are flattened and input, and the calculation is performed according to the operation logic of the fully connected layer:

[0123]

[0124] Among them, W1 is the weight matrix, b1 is the bias, It is the output of the last pooling layer. The Flatten operation flattens the multi-dimensional feature tensor into a one-dimensional vector.

[0125] Step 4.2: Train the target domain feature encoder

[0126] Initialize the parameters of the target domain generalization module, initialize the weights to the value of the normal distribution, and initialize the bias to 0. The mean square error is used to measure the difference between the features output by the target domain feature encoder and the true features of the target domain. The MSE loss function L TD The calculation is as follows:

[0127]

[0128] in, Represented as the feature output by the target domain feature encoder, It is represented as the corresponding target domain true complete feature, n represents the number of samples, d represents the sample dimension, is the predicted feature value on the jth feature dimension in the i-th sample output by the target domain feature encoder, yes The corresponding target domain real and complete features.

[0129] The Adam optimizer is used to update the network parameters to minimize the loss function. During training, the parameters of the target domain feature encoder are updated according to the following basic steps:

[0130] Compute the gradient:

[0131]

[0132] where g t is the gradient at the current moment t, θ t-1 is the network parameter at the previous moment, is the gradient calculation with respect to the parameter θ.

[0133] Then update the first-order moment estimate m of the gradient at time t respectively t and the second-order moment estimate v t :

[0134] m t =β1·m t-1 +(1-β1)·g t

[0135] v t =β2·v t-1 +(1-β2)·g t 2

[0136] Among them, β1 and β2 are exponential decay rates, m t-1 is the first-order moment estimate of the gradient at time t-1, v t-1 is the second-order moment estimate of the gradient at time t-1.

[0137] Then correct the gradient:

[0138]

[0139]

[0140] in, is the first-order moment estimate m t The correction, is the second-order moment estimate v t Correction.

[0141] Finally update the network parameters:

[0142]

[0143] Among them, θ t is the updated model parameter at time t, θ t-1is the model parameter at time t-1, α is the learning rate, and ε is a small number used to prevent the denominator from being zero. By iterating the above process multiple times and continuously adjusting the parameters of each layer in the target domain feature encoder, such as the convolutional layer and the fully connected layer, the loss function ε is gradually reduced, and the network can learn how to accurately extract the complete target domain features from the enhanced common features.

[0144] Step 4.3: Extract complete features of the target domain

[0145] After training is complete, the newly input enhanced shared feature data is forward propagated sequentially according to the trained target domain feature encoder network structure. That is, starting from the input layer, through the operations of each convolutional layer, pooling layer, and fully connected layer, the final output is the extracted target domain complete features:

[0146]

[0147] Among them, ForwardPropagation represents the forward propagation operation, Encoder TD is the trained target domain feature encoder, is a new enhanced common feature, F target This is the final desired complete feature of the target domain, which can be used for hot spot detection and identification in step 5.

[0148] Step 5: Hot spot detection and identification: extract the comprehensive features formed by the fusion of common features of different domains in the target domain image, enhanced common features, and complete features of the target domain, detect and identify hot spots, generate a segmentation mask to clearly define the hot spot area, and distinguish the hot spot type based on feature differences to output reliable detection results.

[0149] Step 6: Visualize and warn of hot spot detection results, including hot spot location, size, type, and other information. Based on the severity of the hot spot, issue a warning signal to alert relevant personnel to take timely action.

[0150] The above description is merely a preferred embodiment of the present invention and does not constitute any other form of limitation to the present invention. Any modification or equivalent variation based on the technical essence of the present invention shall still fall within the scope of protection claimed by the present invention.

Claims

1. A method for detecting and identifying hot spots in power equipment based on enhanced representation of the target domain, comprising the following specific steps, characterized in that: Step 1: Data acquisition and preprocessing: Collect images of power equipment under different environmental conditions, including infrared thermal imagers and visible light images. Preprocess the collected images, including denoising, normalization, and cropping, to ensure image quality. Step 2: Learn common features and build a common feature learning module (SFLM). Using adversarial learning techniques, the model learns to extract common features from different domains by training the domain discriminator. Step 3: Enhance the common features and build a common feature enhancement module. Through contrastive learning, features at different levels are aligned in the output space to expand the common feature space. Step 4: Target domain generalization: Use the enhanced common features to build the target domain generalization module TDGM, train the target domain feature encoder, and extract the complete target domain features; Step 5: Hot spot detection and identification: Extract comprehensive features from the target domain image, including shared features from different domains, enhanced shared features, and the complete features of the target domain. Detect and identify hot spots, generate a segmentation mask to clearly define the hot spot area, and identify the hot spot type based on feature differences, outputting reliable detection results. Step 6: Result visualization and early warning: Visualize the hot spot detection results, including hot spot location, size, type and other information; Depending on the severity of the hot spot, an early warning signal will be issued to remind relevant personnel to deal with it in a timely manner.

2. The method for detecting and identifying hot spots in power equipment based on enhanced representation of target domain according to claim 1, characterized in that: The process of data collection and preprocessing in step 1 can be expressed as: Step 1.1: Data acquisition: Collect images of power equipment under different environmental conditions, including infrared thermal imagers and visible light images; Infrared thermal imagers use the infrared radiation characteristics of an object to create images, which can reveal the temperature distribution on the surface of power equipment. When a part of the power equipment experiences a potential fault, it may overheat and form a hot spot. This high-temperature area will appear on the infrared thermal imager image, forming a sharp contrast with the surrounding normal temperature areas, making it easier to locate and analyze the hot spot. Visible light images can intuitively display the appearance, structure, and some surface details of power equipment. Although they cannot directly reflect temperature information, they can help confirm the specific shape of the equipment, component location, etc., and when used in conjunction with infrared thermal imager images, they can help to analyze and judge power equipment more comprehensively and accurately. Step 1.2: Data preprocessing: By replacing the value of the central pixel with the average value of the pixels in the neighborhood, the image is smoothed and noise is removed. Assume that the coordinates of a pixel in the image are (i, j). Take an m×n neighborhood around it as the center, sort the grayscale values of the pixels in the neighborhood, and assign the middle value to the pixel. Step 1.3: Normalization processing, first calculate the mean μ and standard deviation σ of the image pixel grayscale value. For the pixel grayscale value x, the grayscale value calculation formula after normalization is: Step 1.4: Image cropping: Remove the redundant background from the image by cropping, and only retain the image portion containing the key parts of the power equipment.

3. The method for detecting and identifying hot spots in power equipment based on enhanced representation of target domain according to claim 1, characterized in that: The process of learning common features in step 2 can be expressed as follows: Step 2.1: Construct the overall architecture of the common feature learning module SFLM The main goal of the common feature learning module (SFLM) is to enable the model to mine and learn the common features in power equipment images from different domains through adversarial learning techniques. These common features can provide a universal representation that is not overly affected by image differences under different environmental conditions. The SFLM is constructed through an adversarial learning network, which consists of a feature extraction generator G and a domain discriminator D. The feature extraction part is used to extract features from the input image, and the domain discriminator is used to determine which domain these features come from. Step 2.2: Build an adversarial learning network The generator G receives images x from different domains and outputs the corresponding feature representation G(x); the goal of the generator is to generate a feature representation that makes it difficult for the domain discriminator D to distinguish whether these features are from the source domain or the target domain; the loss function L of the generator G is G It is designed based on the deception domain discriminator, and its formula is: Among them, x s is the source domain image, x t is the target domain image, is the distribution of data from the source domain P s The sampled image x s Find the expectation, the feature G(x s ), which enables the discriminator D to judge that it is not from the source domain, that is, D(G(x s ))'s value should be as small as possible; is the distribution of data from the target domain P t The sampled image x t Find the expectation, the feature G(x t ), which enables the discriminator D to judge that it comes from the source domain, that is, D(G(x t )) is as large as possible; by minimizing L G , the generator continuously adjusts its own parameters so that the generated features can learn common features that are similar in both domains; The domain discriminator D receives the feature G(x) output by the generator G and outputs a probability value, which indicates the probability that the feature comes from the source domain. The loss function L of the domain discriminator D is D Expressed as: in, Indicates that for the data distribution P from the source domain s The sampled image x s , the feature G(x s ), discriminator D(G(x s )) Hopefully, it can be correctly judged as coming from the source domain, i.e., D(G(x s ))'s value should be as large as possible; Denotes the distribution of data from the target domain P t The sampled image x t , the feature G(x t ), the discriminator hopes to correctly judge that it is not from the source domain, that is, D(G(x t )) is as small as possible; by minimizing L D ,The discriminator continuously adjusts its own parameters to improve the ,ability of distinguishing the features of the source and target ,domains; Step 2.3: During training, update the parameters of the generator G and the domain discriminator D alternately; first fix the parameters of the generator G and calculate the loss L of the discriminator D D , and update the parameters of the discriminator D according to the gradient descent optimization algorithm, so that the discriminator can better distinguish the characteristics of the source domain and the target domain; fix the updated parameters of the discriminator D and calculate the loss L of the generator G G , and updates the parameters of the generator G, making the features generated by the generator more difficult to be distinguished by the discriminator; after multiple iterative training, the generator G is able to learn the common features between different domains.

4. The method for detecting and identifying hot spots in power equipment based on target domain enhanced representation according to claim 1, characterized in that: The process of enhancing common features in step 3 can be expressed as follows: Step 3.1: Common Feature Enhancement Module Architecture. The main goal of the common feature enhancement module is to enhance the common features learned in step 2, including aligning features at different levels in the output space, expanding the common feature space, and enhancing the decoder's decoding ability for the common features. Step 3.2: Construct contrastive learning sample pairs. For the positive sample pairs, the power equipment images I1 and I2 of the same category have corresponding common features obtained by the feature generator G, which are F1 = {f 11 ,f 12 ,…,f 1n } and F2={f 21 ,f 22 ,...,f 2n }, f ij Represents the feature vector F corresponding to the i-th image i The j-th dimension feature in (F1, F2) constitutes a positive sample pair; for the negative sample pairs of different categories of power equipment images I3 and I4, their common features are F3 = {f 31 ,f 32 ,...,f 3n } and F4={f 41 ,f 42 ,...,f 4n }, (F3, F4) constitutes a negative sample pair; Step 3.3: Design of loss function and training process for contrastive learning. InfoNCE loss function is used to drive the contrastive learning process. The loss function L InfoNCE The formula is: Among them, F a and F b are the two eigenvectors in the positive sample pair; E represents the expectation, which is the average calculation of all positive sample pairs; τ is the temperature parameter used to adjust the scale of the similarity score; sim(·,·) is a similarity metric function, expressed using cosine similarity, and the cosine similarity calculation formula is: Among them, u={u1,u2,...,u n } and v={v1,v2,...,v n } is the eigenvector; During the training process, positive and negative sample pairs are extracted from the dataset and the InfoNCE loss function is calculated. Then, the backpropagation algorithm is used to update the parameters in the common feature enhancement module. Step 3.4: Align features at different levels and expand the shared feature space. During contrastive learning to minimize the InfoNCE loss function, features at different levels are gradually aligned in the output space. For shallow edge features and deep semantic features, the model combines and aligns them. As features are aligned and optimized, the shared feature space is expanded.

5. The method for detecting and identifying hot spots in power equipment based on enhanced representation of target domain according to claim 1, characterized in that: The process of target domain generalization in step 4 can be expressed as follows: Step 4.1: Create a target domain generalization module (TDGM). This module consists of multiple convolutional layers, pooling layers, and fully connected layers to construct the target domain feature encoder in TDGM. Convolutional layer 1: Use 32 convolution kernels of size 3×3 with a stride of 1 to perform convolution operations on the enhanced common features of the input. According to the convolution calculation formula: Output1=Conv(F enhanced ,kernel1) Among them, F enhanced represents the enhanced common features obtained in step 3, kernel1 represents the first set of convolution kernels, Conv is the convolution operation, Output1 is the output of convolution layer 1, which is passed to the next layer after being processed by the activation function; Pooling layer 1: It is connected after convolutional layer 1 and uses maximum pooling. The pooling window size is set to 2×2 and the step size is 2. Its function is to downsample the features, reduce the data dimension while retaining important features. The calculation formula can be expressed as: Output pool1 =MaxPool(Output1) Output pool1 It is the output of the pooling layer. MaxPool is a pooling operation. Similar convolutional layers and pooling layers are then stacked in sequence to gradually extract more abstract and representative features. Finally, the fully connected layer is connected. The first fully connected layer has 128 neurons. The features output by the previous pooling layer are flattened and input, and the calculation is performed according to the operation logic of the fully connected layer: Among them, W1 is the weight matrix, b1 is the bias, It is the output of the last pooling layer. The Flatten operation flattens the multi-dimensional feature tensor into a one-dimensional vector. Step 4.2: Train the target domain feature encoder Initialize the parameters of the target domain generalization module, initialize the weights to the value of the normal distribution, and initialize the bias to 0; use the mean square error to measure the difference between the features output by the target domain feature encoder and the true features of the target domain, and the MSE loss function L TD The calculation is as follows: in, Represented as the feature output by the target domain feature encoder, It is represented as the corresponding target domain true complete feature, n represents the number of samples, d represents the sample dimension, is the predicted feature value on the jth feature dimension in the i-th sample output by the target domain feature encoder, yes The corresponding target domain real and complete features; The Adam optimizer is used to update the network parameters to minimize the loss function. During training, the parameters of the target domain feature encoder are updated according to the following basic steps: Compute the gradient: where g t is the gradient at the current moment t, θ t-1 is the network parameter at the previous moment, is the gradient calculation of the parameter θ; Then update the first-order moment estimate m of the gradient at time t respectively t and the second moment estimate v t : m t =β1·m t-1 +(1-β1)·g t Among them, β1 and β2 are exponential decay rates, m t-1 is the first-order moment estimate of the gradient at time t-1, v t-1 is the second-order moment estimate of the gradient at time t-1; Then correct the gradient: in, is the first-order moment estimate m t The correction, is the second-order moment estimate v t amendments; Finally update the network parameters: Among them, θ t is the updated model parameter at time t, θ t-1 is the model parameter at time t-1, α is the learning rate, and ε is a very small number used to prevent the denominator from being zero. By iterating the above process multiple times, the parameters of the convolutional layer, fully connected layer, and other layers in the target domain feature encoder are continuously adjusted, so that the loss function ε gradually decreases, and the network can learn how to accurately extract the complete features of the target domain from the enhanced common features. Step 4.3: Extract complete features of the target domain After the training is completed, the newly input enhanced common feature data is forward propagated in sequence according to the network structure of the trained target domain feature encoder. That is, starting from the input layer, through the operations of each convolutional layer, pooling layer, and fully connected layer, the final output is the extracted complete features of the target domain: Among them, ForwardPropagation represents the forward propagation operation, Encoder TD is the trained target domain feature encoder, is a new enhanced common feature, F target It is the complete feature of the target domain that we ultimately expect to obtain.