Power equipment state identification method and system based on RTDETR semi-supervised learning

Through the semi-supervised learning method based on RTDETR, the power equipment state recognition model is trained using labeled and unlabeled data, and the problems of low efficiency and difficulty in identification are solved in traditional methods, and high accuracy and low cost power equipment state monitoring is achieved.

CN119048783APending Publication Date: 2024-11-29ELECTRIC POWER RES INST OF GUANGXI POWER GRID CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411029042.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

Traditional power equipment status recognition methods rely on manual experience or a large amount of labeled data, are inefficient and cannot accurately identify rare equipment status, affecting the stable operation of the power system.

Method used

Using a semi-supervised learning method based on RTDETR, the state recognition model is recognized by acquiring and preprocessing data in different working conditions and using labeled and unlabeled data to train and update the state, including initialization model, pseudo-label generation, student model training and teacher model update, combined with Data cleaning, supplementation and labeling improve model generalization capabilities and identification efficiency.

Benefits of technology

It effectively reduces the labeling cost, improves the accuracy and efficiency of power equipment status recognition, and uses labelless data to enhance model performance, which is suitable for scenarios where label acquisition is difficult.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048783A_ABST
    Figure CN119048783A_ABST
Patent Text Reader

Abstract

The invention discloses a power equipment state identification method and system based on RTDETR semi-supervised learning, and the method comprises the steps: obtaining different working condition scene data of target power equipment, and carrying out the preprocessing of the different working condition scene data, the preprocessed data comprises label data and label-free data; training and updating a preset RTDETR-based state recognition model based on the label data and the label-free data to obtain an updated state recognition model; and acquiring real-time scene data of the power equipment, and inputting the real-time scene data of the power equipment into the updated state recognition model to perform state recognition of the power equipment. A large amount of label-free data is utilized, the situation that label data is insufficient in the electric power transformation field is made up, and therefore the labeling cost is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power equipment state recognition, and in particular to a power equipment state recognition method and system based on RTDETR semi-supervised learning. Background Art

[0002] As the complexity of power systems increases, real-time monitoring and accurate identification of power equipment status have become critical. Traditional power equipment status identification methods mainly rely on manual experience or supervised learning models based on a large amount of labeled data, which not only consumes a lot of human resources, but also has low efficiency when faced with a large amount of unlabeled data. In addition, for some rare or unseen equipment states, traditional methods may not be able to accurately identify them, affecting the stable operation of the power system.

[0003] In recent years, with the development of deep learning technology, especially the introduction of the real-time target detection and recognition (RTDETR) model, new possibilities have been provided for power equipment status recognition. The RTDETR model can process image data in real time and accurately identify the characteristics and status of equipment, but its application research in semi-supervised learning scenarios is still insufficient. Semi-supervised learning can use limited labeled data and a large amount of unlabeled data to improve the generalization ability and recognition efficiency of the model, which is especially suitable for scenarios such as power equipment status recognition where labels are difficult to obtain.

[0004] Existing RTDETR models used in semi-supervised learning usually only consider supervised training with labeled data, while ignoring the potential information of unlabeled data. Summary of the invention

[0005] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.

[0006] In view of the above existing problems, the present invention is proposed.

[0007] Therefore, the present invention provides a method and system for identifying the state of electric equipment based on semi-supervised learning of RTDETR, which can solve the problems mentioned in the background technology.

[0008] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0009] In a first aspect, the present invention provides a method for identifying power equipment status based on semi-supervised learning of RTDETR, comprising:

[0010] Acquire different working condition scenario data of the target power equipment, and preprocess the different working condition scenario data, wherein the preprocessing includes data cleaning, data supplementation and data labeling, and the preprocessed data includes labeled data and unlabeled data;

[0011] Based on the labeled data and the unlabeled data, training and updating the preset RTDETR-based state recognition model to obtain an updated state recognition model;

[0012] Real-time scene data of the electric power equipment is acquired, and the scene data of the real-time electric power equipment is input into an updated state recognition model to perform state recognition of the electric power equipment.

[0013] As a preferred solution of the method for semi-supervised learning of power equipment state recognition based on RTDETR described in the present invention, wherein: based on the labeled data and the unlabeled data, the training and updating of the preset state recognition model based on RTDETR includes initializing the state recognition model, generating pseudo labels, training the student model and updating the teacher model, and the state recognition model includes the RTDETR model, the student model and the teacher model;

[0014] The initialization state recognition model includes dividing the labeled data into a training set and a test set, updating the RTDETR model according to the training set and the test set, and selecting the weight with the highest average precision in the test set as the initial weight of the teacher model and the student model;

[0015] The pseudo label generation includes taking the unlabeled data as the input of the teacher model after the initialization is completed, and taking the label whose corresponding output meets the first preset threshold as the pseudo label;

[0016] Using labeled data and pseudo-labeled data as training sets for a student model, wherein the loss function of the student model is composed of supervised loss and semi-supervised loss, and obtaining the weight of the student model after training;

[0017] The teacher model weight is updated according to the weight of the student model after the training is completed, and the pseudo label is regenerated according to the updated teacher model.

[0018] As a preferred scheme of the method for semi-supervised learning of power equipment state identification based on RTDETR described in the present invention, wherein: the training and updating of the preset RTDETR-based state recognition model based on the labeled data and the unlabeled data also includes training the student model according to the regenerated pseudo-label combined with the labeled data and updating the teacher model until the iteration requirements are met.

[0019] As a preferred solution of the method for identifying power equipment state based on semi-supervised learning of RTDETR according to the present invention, the preprocessing of the data of different working conditions comprises:

[0020] Delete data with a similarity higher than a first similarity threshold and / or a precision lower than a first precision threshold in data of different working conditions;

[0021] Determine whether the quantity difference of data corresponding to different working scene in different working scene data after the data cleaning operation is within a first difference range; if the quantity difference between a certain working scene data and the quantity difference between other working scene data is greater than the first difference range, obtain the working scene data again;

[0022] Customize state recognition targets, write annotation specifications, and annotate data after data cleaning and data supplementation according to the annotation specifications.

[0023] As a preferred solution of the method for identifying power equipment status based on semi-supervised learning of RTDETR described in the present invention, the customizing status identification target and writing the annotation specification include:

[0024] The custom state recognition target includes at least a normal state target and an abnormal state target;

[0025] The writing annotation specification at least includes that the annotation target box must select the complete target power equipment and the position relationship between the annotation target box and the target power equipment must meet a first preset relationship standard.

[0026] As a preferred solution of the method for identifying the state of electric equipment based on semi-supervised learning of RTDETR described in the present invention, the data labeling of the data after data cleaning and data supplementation according to the labeling specification includes: screening according to the scene, each scene is divided into several clusters using the improved K-Means algorithm, the central picture of each cluster is selected for labeling, the labeled picture data is used as labeled data, and the remaining picture data is used as unlabeled data.

[0027] As a preferred scheme of the method for identifying the state of electric power equipment based on semi-supervised learning of RTDETR described in the present invention, wherein: the first preset relationship standard includes: the marked target box must be larger than the area where the target electric power equipment is located, and the ratio of the marked target box and the area where the target electric power equipment is located is within a preset fixed range.

[0028] In a second aspect, the present invention provides a power equipment state recognition system based on semi-supervised learning of RTDETR, comprising:

[0029] A data acquisition and processing module is used to acquire different working condition scenario data of the target power equipment and preprocess the different working condition scenario data, wherein the preprocessing includes data cleaning, data supplementation and data labeling, and the preprocessed data includes labeled data and unlabeled data;

[0030] A model updating module, used to train and update a preset RTDETR-based state recognition model based on the labeled data and the unlabeled data, and obtain an updated state recognition model;

[0031] The recognition module is used to obtain the scene data of the real-time power equipment and input the scene data of the real-time power equipment into the updated state recognition model to perform power equipment state recognition.

[0032] In a third aspect, the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method when executing the computer program.

[0033] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method described above when executed by a processor.

[0034] Compared with the prior art, the invention has the following beneficial effects: the invention proposes a method and system for identifying the state of electric equipment based on semi-supervised learning of RTDETR, obtains different working condition scene data of target electric equipment, and preprocesses the different working condition scene data, wherein the preprocessing includes data cleaning, data supplementation and data annotation, and the preprocessed data includes labeled data and unlabeled data; based on the labeled data and unlabeled data, the preset state recognition model based on RTDETR is trained and updated to obtain the updated state recognition model; the scene data of real-time electric equipment is obtained, and the scene data of the real-time electric equipment is input into the updated state recognition model to identify the state of the electric equipment. A large amount of unlabeled data is utilized to make up for the lack of labeled data in the field of electric power substation, thereby effectively reducing the annotation cost. By using RTDETR (real-time detection model) as the basic framework of the teacher model and the student model, the recognition accuracy of the model for the scenes in the field of electric power substation is greatly improved. RTDETR (real-time detection model) uses attention mechanism, multi-scale feature fusion, and efficient decoding strategy, which can effectively extract global features and local features, and meet the landing requirements of real-time detection reasoning. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:

[0036] Figure 1 A method flow chart of a method and system for identifying power equipment status based on semi-supervised learning of RTDETR provided by an embodiment of the present invention;

[0037] Figure 2 An internal structure diagram of a computer device of a method and system for identifying power equipment status based on semi-supervised learning of RTDETR provided in one embodiment of the present invention. DETAILED DESCRIPTION

[0038] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0039] Example 1

[0040] Reference Figure 1-Figure 2 , is the first embodiment of the present invention, which provides a method and system for identifying the state of an electric device based on semi-supervised learning of RTDETR, including a method for identifying the state of an electric device based on semi-supervised learning of RTDETR and a system for identifying the state of an electric device based on semi-supervised learning of RTDETR, wherein a method for identifying the state of an electric device based on semi-supervised learning of RTDETR includes:

[0041] Before describing the embodiments of the present application in detail, some related concepts are first explained for the sake of clarity.

[0042] RTDETR (Real-Time Detector): RTDETR is a real-time object detection model that aims to quickly and accurately identify multiple objects in an image. Typically, such models use convolutional neural networks (CNNs) or more advanced architectures such as Transformers to analyze input images and predict the location (bounding box) and category of objects. Since power equipment status recognition may involve the location and identification of specific equipment in an image, RTDETR may be designed to monitor and analyze the operating status of power equipment in real time.

[0043] Teacher model: In the framework of semi-supervised learning and knowledge distillation, "teacher model" usually refers to a model that has been fully trained and has a high accuracy rate. Its role is to generate pseudo labels, that is, predictions for unlabeled data, which will be used to guide the training of the student model. The teacher model is usually trained with labeled data so that it can provide high-quality predictions.

[0044] Student Model: The "student model" is another model, usually with a simpler structure or fewer parameters, that is trained to mimic the behavior of the teacher model. The student model can leverage a large amount of unlabeled data to improve its performance by learning the teacher model's predictions on unlabeled data (pseudo-labels). In the context of semi-supervised learning, the student model can leverage the pseudo-labels generated by the teacher model to enhance its generalization ability.

[0045] Semi-supervised learning: Semi-supervised learning is a machine learning paradigm that lies between supervised learning and unsupervised learning. In this learning method, the model is not only trained with labeled data (data points with known categories and attributes), but also uses a large amount of unlabeled data to improve the performance of the model. By rationally utilizing the information of unlabeled data, semi-supervised learning can improve the performance of the model, especially when labeled data is limited and unlabeled data is abundant.

[0046] In related technologies, power equipment status recognition mainly relies on a large amount of accurately labeled image data. However, in the actual power substation field, the cost of obtaining a large amount of labeled data is extremely high, and the labeling workload is huge.

[0047] The present application provides a method for effectively solving the above-mentioned problems. Next, multiple embodiments will be combined to explain in detail how to implement the power equipment status identification method;

[0048] Figure 1 A method flow chart of a method and system for identifying power equipment status based on semi-supervised learning of RTDETR is shown, including:

[0049] S101, acquiring different working condition scenario data of target power equipment, and preprocessing the different working condition scenario data, the preprocessing includes data cleaning, data supplementation and data labeling, and the preprocessed data includes labeled data and unlabeled data;

[0050] In the embodiment of the present application, preprocessing the data of different working conditions includes:

[0051] Delete data with a similarity higher than a first similarity threshold and / or a precision lower than a first precision threshold in data of different working conditions;

[0052] Determine whether the quantity difference of data corresponding to different working scene in different working scene data after the data cleaning operation is within a first difference range; if the quantity difference between a certain working scene data and the quantity difference between other working scene data is greater than the first difference range, obtain the working scene data again;

[0053] In an embodiment of the present application, the first difference range is a numerical range designed by a user or operator. For example, when this range is set to [0, 30], the quantitative difference between the data corresponding to different working condition scenarios in the different working condition scenario data after the data cleaning operation needs to be within this range. If the difference between the working condition scenario data A and the working condition scenario data B is greater than 30, it is necessary to obtain the working condition scenario data B again.

[0054] Customize state recognition targets and write annotation specifications, and annotate data after data cleaning and data supplementation according to the annotation specifications.

[0055] In an optional embodiment, the working condition scene data is usually represented by pictures, and the types and states of the power equipment that may appear in actual applications, the shooting distance and angle, the light intensity, etc. are listed in a fine-grained scene distribution, and then data is collected according to each working condition scene;

[0056] In an optional embodiment, the first similarity threshold is a correlation judgment standard of different image data under the same working condition scenario, and the first accuracy threshold is the accuracy requirement of the user or operator for the state recognition model;

[0057] In the embodiment of the present application, the first similarity threshold is set to 95%, and the first accuracy threshold is set to 90%. If the similarity of different picture data under the same working condition is greater than 95%, or the accuracy of any picture is less than 90%, such photo data is deleted. Specifically, when solving the similarity of different picture data, the following steps can be used for solving:

[0058] Let CS(I 1 ,I 2 ) is image I 1 and I 2 The cosine similarity of SSIM(I 1 ,I 2 ) is their structural similarity index, and two weight factors w are introduced cs and w ssim, w cs +w ssim =1, to reflect the relative importance of the two indicators to the total similarity. The final image similarity S(I 1 ,I 2 ) can be defined as:

[0059] S(I 1,I 2 )=w cs ×CS(I 1 ,I 2 )+w ssim ×SSIM(I 1 ,I 2 )

[0060] It should be noted that the choice of w cs and w ssim The value of depends on the specific application scenario and the requirements for similarity measurement. For example, if the matching of structural details is more important than the similarity of feature vectors, SSIM can be given a higher weight; vice versa. In this application, the following design is designed to obtain the corresponding w by different power equipment similarity requirements cs and w ssim The specific data table is shown in Table 1;

[0061] Table 1: The corresponding w is obtained by different power equipment similarity requirements cs and w ssim Specific data table.

[0062]

[0063] It should be noted that cosine similarity measures the cosine value of the angle between two vectors. The closer the value is to 1, the higher the similarity. The cosine similarity can be calculated using the feature vector of the image. Suppose two images I 1 and I 2 After feature extraction, the feature vectors obtained are and Then their cosine similarity C can be expressed as:

[0064]

[0065] in, represents vector dot product, Represents the magnitude of a vector.

[0066] Structural Similarity Index (SSIM) SSIM takes into account brightness, contrast and structural information and is a more comprehensive similarity evaluation index. 1 and I 2 , SSIM is calculated as follows:

[0067]

[0068] Among them, x and y represent I 1 and I 2 The gray value of the corresponding pixel in μ x and μ yare the means of x and y respectively, and are the variances of x and y, σ x y is the covariance of x and y, c 1 and c 2 is a small constant used to stabilize the denominator.

[0069] In the embodiment of the present application, when solving the accuracy of different image data, the following steps can be used to solve it:

[0070] Assume that the grayscale value of image I is g(x,y), the Laplace operator The result of applying it to image I is:

[0071]

[0072] The sharpness of an image can be estimated by calculating the mean or variance of the Laplacian response of the entire image. If the mean or variance of the Laplacian response is less than a certain threshold (90% in this case), the image is considered to be of low quality and should be removed.

[0073] It should be noted that the first precision threshold can be set by the user or operator, or the optimal value can be obtained through expert experience combined with a scoring mechanism, or by designing an optimal value acquisition experiment, for example, by solving the optimal solution of the first precision threshold through an ant colony algorithm or an improved ant colony algorithm.

[0074] In an optional embodiment, the Improved Ant Colony Optimization (IACO) is a heuristic search algorithm that is mainly used to solve combinatorial optimization problems. It is based on the behavior of ants in nature in finding food paths, and optimizes the solution by simulating the process of ants releasing and following pheromones when finding paths. When solving the optimal solution for the first precision threshold, IACO can be used to search for the best parameter combination, such as the precision threshold used in semi-supervised learning. The steps for solving the optimal solution for the first precision threshold may be as follows:

[0075] 1. Initialization: Set the algorithm parameters, such as the number of ants, pheromone evaporation rate, pheromone intensity, etc., and define the search space of the first precision threshold;

[0076] 2. Build a solution: Each "ant" (representing a possible solution) randomly selects a precision threshold, which constitutes part of the solution;

[0077] 3. Evaluation: Train the model using the selected accuracy threshold and evaluate the performance of the model on the validation set, such as accuracy, recall, or F1 score.

[0078] 4. Update pheromones: Update the pheromone concentration according to the quality of the solution found by each ant. Solutions with better performance will leave more pheromones to guide the subsequent search process;

[0079] 5. Evaporation of pheromones: As time goes by, pheromones will gradually evaporate to prevent the algorithm from converging to a local optimal solution too early;

[0080] 6. Repeat iteration: Repeat steps 2-5 until the preset number of iterations is reached or the best solution that meets the termination condition is found;

[0081] 7. Best solution: Select the best performing accuracy threshold from all iterations as the optimal solution In the power equipment status recognition in the power substation field, using the improved ant colony algorithm to optimize the first accuracy threshold can ensure that the generated data has a high enough quality, thereby improving the training effect of the student model. Specifically, the algorithm will explore different accuracy thresholds to find pseudo-label values ​​that can maintain a high confidence level and provide sufficient diversity in model training.

[0082] In the embodiment of the present application, customizing the state recognition target and writing the annotation specification include:

[0083] The custom state identification target at least includes normal state targets and abnormal state targets. For example, when the insulator state is identified, the custom state identification target at least needs to include normal insulator, insulator self-explosion, insulator crack, insulator lightning strike and other states. When the power switch state is identified, the custom state identification target at least needs to include normal switch state, switch ablation, switch looseness, switch operating mechanism damage and other states. Each state needs to have a detailed description and example to facilitate the annotation personnel to understand and perform the annotation work.

[0084] The annotation specifications must at least include that the annotation target box must select the entire target power equipment and that the positional relationship between the annotation target box and the target power equipment must meet the first preset relationship standard. The first preset relationship standard includes: the annotation target box must be larger than the area where the target power equipment is located, and the ratio of the annotation target box to the area where the target power equipment is located is within a preset fixed range. For example, this preset fixed range can be [1.05-1.15], which means that the annotation target box needs to be proportionally enlarged by 1.05-1.15 times the size of the area where the target power equipment is located to ensure the visibility and recognizability of the equipment in the image. In addition, the center point of the annotation target box must coincide with the center point of the target power equipment to ensure the accuracy of the annotation. At the same time, the annotation boundary must be clear, without interference from other irrelevant power equipment or background, so as to reduce the confusion of the model during training and recognition.

[0085] In an optional embodiment, the annotation specification should also follow the principles of consistency, accuracy and repeatability. For example, for insulator cracks, the annotation specification may require the annotator to describe the location, size, shape of the cracks in detail, and use predefined codes or categories to mark the severity of the cracks. For damage to the switch operating mechanism, it may be necessary to mark the specific damaged parts, such as handles, connecting rods, springs, etc., and describe their damage conditions.

[0086] In addition, the labeling specification should also include the handling of abnormal situations, such as poor image quality, unsatisfactory viewing angles, or partial occlusion of the device that was not determined during the data cleaning phase. How should the labeler label or whether it needs to be marked as invalid data? At the same time, in order to ensure the quality of labeling, a certain review mechanism can be set up, and a second person can check the completed labeling to ensure its accuracy.

[0087] It should be noted that by customizing state recognition targets and rigorous labeling specifications, combined with measurement methods such as cosine similarity and SSIM, a high-quality power equipment state dataset can be constructed, laying the foundation for training high-precision state recognition models.

[0088] In an embodiment of the present application, data labeling of the data after data cleaning and data supplementation according to the labeling specification includes: screening according to the scene, using the improved K-Means algorithm for each scene to be divided into several clusters, selecting the central picture of each cluster for labeling, and using the labeled picture data as labeled data, and the remaining picture data as unlabeled data. For example, a pre-trained model (such as ResNet, VGG, etc.) is used to extract the feature vector of each image. Initialize the cluster center. Cluster the data set until the cluster center is stable or the maximum number of iterations is reached. Use density-aware or entropy-based methods to adjust the cluster center to better reflect the characteristics of the data distribution. Select the central picture from each cluster, that is, the image closest to the cluster center, and manually label it. The remaining unselected pictures are used as unlabeled data for subsequent semi-supervised learning processes.

[0089] For example, assume that there are N insulator image samples, and the feature vector of each sample is represented by x i , i = 1, 2, ..., N. The goal is to divide it into K clusters, each cluster has a center point c k ,k=1,2,...,K.

[0090] Randomly select K samples from N samples as initial cluster centers;

[0091] For each sample x i , find the nearest cluster center c k , and assign them to the corresponding clusters:

[0092]

[0093] where d represents the Euclidean distance or any other suitable distance metric.

[0094] The new center point of each cluster is the weighted average of the feature vectors of all samples in the cluster:

[0095]

[0096] Among them, w i is the sample x i The weight can be 1 (equal weight) or adjusted according to the density or entropy of the sample;

[0097] For each cluster k, select k The sample x with the smallest distance i Marked as the central image.

[0098] Where N is the total number of insulator image samples. K is the number of clusters to be created. i Represents the feature vector of the i-th sample. k The center point of the kth cluster. d represents the distance metric function, and here the Euclidean distance is used. C k represents the set of all samples belonging to the kth cluster. i Represents the weight of the i-th sample, which is used to adjust the cluster center calculation.

[0099] It should be noted that only the central image of each cluster needs to be annotated in detail. This greatly reduces the workload of data annotation. At the same time, clustering ensures that the images selected for annotation are representative and can cover various changes in the data. Images that are not selected as central images are used as unlabeled data and can be used for subsequent semi-supervised learning to further improve the generalization ability of the model.

[0100] In summary, through carefully designed custom state recognition targets, rigorous labeling specifications, and clustering-based selective labeling strategies, this application can construct an efficient, comprehensive, and highly representative power equipment state data set, providing strong support for training high-precision state recognition models, thereby improving the automation level and accuracy of power equipment state monitoring.

[0101] S102, based on the labeled data and the unlabeled data, training and updating the preset RTDETR-based state recognition model to obtain an updated state recognition model;

[0102] Among them, based on labeled data and unlabeled data, training and updating the preset RTDETR-based state recognition model includes initializing the state recognition model, generating pseudo labels, training the student model, and updating the teacher model. The state recognition model includes the RTDETR model, the student model, and the teacher model;

[0103] Specifically, initializing the state recognition model includes dividing the labeled data into a training set and a test set, updating the RTDETR model according to the training set and the test set, and selecting the weight with the highest average precision in the test set as the initial weight of the teacher model and the student model;

[0104] In an embodiment of the present application, labeled data is used to divide the training set and the test set, and the RTDETR-L (Real-Time Detector-L) model is fine-tuned. A resolution of 640 is used and 100 iterations are trained. The weight with the highest mAP (mean average precision) on the test set among the 100 iterations is selected as the initial teacher model and student model.

[0105] Furthermore, the pseudo-label generation includes taking the unlabeled data as input to the initialized teacher model, and taking the label whose corresponding output satisfies the first preset threshold as the pseudo-label;

[0106] In the embodiment of the present application, a confidence threshold is set to retain only pseudo labels with a confidence level higher than 0.9 to ensure the high quality of the pseudo labels. After screening the pseudo labels, the pseudo labels need to be balanced according to the categories to prevent serious imbalance of the pseudo labels and ensure the performance of the student model.

[0107] In an optional embodiment, the specific operation of balancing the pseudo labels according to categories may be:

[0108] First, count the number of samples in each category among all pseudo labels.

[0109] Calculate the minimum number of categories: Find the category with the least number, recorded as N min .

[0110] Downsample each category: For each category, if the number of pseudo labels for that category exceeds N min , then randomly select N min samples, so that the number of pseudo labels for each category is the same.

[0111] The specific operation and expression are as follows: Assume that there are C different categories in total, and for category c, the number of its pseudo labels is N c The goal is to make the number of samples in each category equal to N min , where N min is the minimum number of pseudo labels among all categories.

[0112] Calculate the minimum number of categories:

[0113]

[0114] Category Balancing Operations:

[0115] For each category c, if N c >N min , then randomly select N from the pseudo labels of this category min samples. This can be achieved by random sampling, assuming that the pseudo label set is S c , then the balanced pseudo-label set S′ c It can be obtained by following the steps below:

[0116] 1. Create an empty balanced pseudo-label set S′ c .

[0117] 2. If N c >N min , then from S c Randomly select N min samples are added to S′ c middle.

[0118] 3. If N c ≤N min , then directly change S c All samples in are added to S′ c middle.

[0119] 4. In Python, this can be achieved by using the random.sample() function, but here is the mathematical expression:

[0120]

[0121] Among them, RandomSample(S c ,N min ) represents the c Randomly select N min samples.

[0122] Finally, the balanced pseudo-label set S′={S′ 1 ,S′ 2 ,...,S′ C}, where each S′ c The size of N min , thus ensuring balance between categories.

[0123] Furthermore, the labeled data and pseudo-labeled data are used as the training set of the student model. The loss function of the student model is composed of supervised loss and semi-supervised loss. The weight of the student model after training is obtained.

[0124] In the embodiment of the present application, the specific design steps of the loss function of the student model are as follows:

[0125] Let y i is the true label of the i-th sample, is the predicted output of the model, p i is the probability that the model predicts the true category, α is the category weight in Focal Loss, γ is the parameter for adjusting the weight of difficult and easy samples, δ is the smoothing parameter in Smooth L1 Loss, and λ is the weight for balancing supervised loss and semi-supervised loss.

[0126] For labeled data, the supervision loss L supervised It consists of classification loss and regression loss:

[0127]

[0128] in,

[0129] For pseudo-labeled data, the classification loss and regression loss are defined in the same way, but the predicted label is used Calculated as the true label:

[0130]

[0131] in,

[0132] The final loss function L combines the supervised loss and the semi-supervised loss together, and the balance factor λ is used to adjust the weight between the two:

[0133]

[0134] in, and are applied to labeled data respectively, and and Applied to unlabeled data with pseudo labels.

[0135] The value of λ needs to be determined through experiments to find the best balance between supervised and semi-supervised losses. The α and γ parameters in FocalLoss can be adjusted according to the degree of class imbalance to optimize the performance of the model on minority classes. The δ parameter in Smooth L1 Loss determines the point where the loss function transitions from a quadratic function to a linear function. Usually δ=1 is a reasonable choice. The generation of pseudo-labels should ensure that the confidence is high enough to reduce the impact of noise on model training.

[0136] Furthermore, the teacher model weights are updated according to the weights of the student model after training, and the pseudo labels are regenerated according to the updated teacher model.

[0137] Furthermore, based on labeled data and unlabeled data, training and updating of the preset RTDETR-based state recognition model also includes training the student model and updating the teacher model according to the regenerated pseudo-labels combined with the labeled data until the iteration requirements are met.

[0138] In the embodiment of the present application, the process of updating the teacher model weights follows a strategy called exponential moving average (EMA). This process allows the teacher model to gradually absorb the information learned by the student model on new data, thereby continuously improving its performance, especially in the prediction quality of unlabeled data. The following are the specific steps:

[0139] 1. Initialization: At the beginning of training, the weights of the teacher model and the student model are usually the same, that is, starting from the weights of the pre-trained RTDETR-L model.

[0140] 2. Student model training: The student model is trained with labeled data and pseudo-labeled data, and its parameters are optimized to minimize the loss function.

[0141] 3. Weight update: After each training iteration, the weight of the teacher model is updated using the EMA formula. The EMA formula is as follows:

[0142]

[0143] in, is the weight of the teacher model at time t. is the weight of the student model at time t. τ is a hyperparameter, usually set to a value close to 1, such as 0.999, which controls the smoothness of the update of the teacher model weights.

[0144] 4. Repeated training and updating: The student model continues to train, while the weights of the teacher model are gradually updated through EMA until the predetermined training cycle is completed.

[0145] It should be noted that through the EMA strategy, the teacher model can slowly and steadily absorb the new knowledge learned by the student model during training, which helps to maintain the stability of the teacher model while gradually improving its performance, especially in dealing with unlabeled data. This approach can form a positive feedback loop that enables the model to continuously improve its predictive ability for unseen data.

[0146] S103, acquiring real-time scene data of the electric power equipment, and inputting the real-time scene data of the electric power equipment into an updated state recognition model to perform state recognition of the electric power equipment.

[0147] In an optional embodiment, the state recognition result may also be post-processed to improve the recognition accuracy.

[0148] After obtaining the output results of the state recognition model, a series of post-processing steps are usually performed to improve the accuracy and robustness of recognition. For the power equipment state recognition task, possible post-processing steps include but are not limited to:

[0149] 1. Threshold adjustment: According to application requirements and model performance, adjust the threshold of state recognition. For example, for certain critical states, a higher threshold can be set to ensure that judgments are made only when the model output reaches a sufficient confidence level.

[0150] 2. Category fusion: In some cases, the model may misclassify similar status categories. Through category fusion, similar status categories can be merged into a broader category, thereby reducing the possibility of misclassification.

[0151] 3. Sequence analysis: If the state recognition model is based on time series data for prediction, time series analysis techniques (such as sliding windows, hidden Markov models, etc.) can be used to smooth the recognition results to reduce the impact of noise and outliers.

[0152] 4. Expert system verification: Combine the knowledge and experience of domain experts to verify and correct the state recognition results output by the model. This can be achieved by building an expert system or integrating an expert rule base.

[0153] After the post-processing steps, more accurate and reliable power equipment status identification results can be obtained, providing stronger support for subsequent decisions and actions.

[0154] In an optional embodiment, corresponding maintenance and monitoring operations may also be performed based on the power equipment status identification result.

[0155] According to the output results of the power equipment status identification model, corresponding maintenance and monitoring operations can be taken to ensure the normal operation and safety of the power equipment. Specific operations include but are not limited to:

[0156] 1. Early warning and alarm: When the state recognition model predicts that the equipment is about to fail or become abnormal, it will issue an early warning or alarm signal in time so that timely measures can be taken to intervene and deal with the problem.

[0157] 2. Preventive maintenance: Based on the status identification results, formulate and implement preventive maintenance plans, and regularly maintain and inspect power equipment to extend the service life of the equipment and reduce the possibility of failures.

[0158] 3. Real-time monitoring: The operating status of power equipment can be monitored in real time through the state recognition model, potential problems can be discovered and resolved in a timely manner, and the stable operation of the equipment can be ensured.

[0159] 4. Decision support: The state identification results are used as an important basis for decision support, providing strong support for power equipment management, scheduling and optimization.

[0160] In summary, the present invention proposes a method for identifying the state of electric equipment based on semi-supervised learning of RTDETR, obtains different working condition scene data of the target electric equipment, and preprocesses the different working condition scene data, wherein the preprocessing includes data cleaning, data supplementation and data annotation, and the preprocessed data includes labeled data and unlabeled data; based on the labeled data and unlabeled data, the preset state recognition model based on RTDETR is trained and updated to obtain the updated state recognition model; the scene data of the real-time electric equipment is obtained, and the scene data of the real-time electric equipment is input into the updated state recognition model to identify the state of the electric equipment. A large amount of unlabeled data is utilized to make up for the lack of labeled data in the field of power substation, thereby effectively reducing the annotation cost. By using RTDETR (real-time detection model) as the basic framework of the teacher model and the student model, the recognition accuracy of the model for the scenes in the field of power substation is greatly improved. RTDETR (real-time detection model) uses attention mechanism, multi-scale feature fusion, and efficient decoding strategy, which can effectively extract global features and local features, and meet the landing requirements of real-time detection reasoning.

[0161] This embodiment also provides a power equipment state recognition system based on semi-supervised learning of RTDETR, including:

[0162] The data acquisition and processing module is used to acquire data of different working conditions and scenarios of the target power equipment and preprocess the data of different working conditions and scenarios. The preprocessing includes data cleaning, data supplementation and data labeling. The preprocessed data includes labeled data and unlabeled data.

[0163] A model updating module is used to train and update the preset RTDETR-based state recognition model based on labeled data and unlabeled data to obtain an updated state recognition model;

[0164] The recognition module is used to obtain the scene data of the real-time power equipment and input the scene data of the real-time power equipment into the updated state recognition model to perform power equipment state recognition.

[0165] The above-mentioned unit modules may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to the above-mentioned modules.

[0166] This embodiment also provides a computer device, which may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 2 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for identifying the state of an electric power device based on semi-supervised learning of RTDETR is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0167] This embodiment further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0168] Obtain different working condition scenario data of the target power equipment, and preprocess the different working condition scenario data. The preprocessing includes data cleaning, data supplementation and data labeling. The preprocessed data includes labeled data and unlabeled data.

[0169] Based on labeled data and unlabeled data, the preset RTDETR-based state recognition model is trained and updated to obtain an updated state recognition model;

[0170] The real-time scene data of the electric power equipment is obtained, and the real-time scene data of the electric power equipment is input into the updated state recognition model to perform the state recognition of the electric power equipment.

[0171] Example 2

[0172] Reference Figure 1-Figure 2 , which is an embodiment of the present invention, provides a method and system for identifying the state of electric equipment based on semi-supervised learning of RTDETR. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments.

[0173] This application takes the "insulator state recognition" scenario in the field of current substation as an example for detailed description. The insulator state recognition scenario mainly identifies the state of insulators in the substation field, such as whether the insulator has self-explosion, cracks, lightning strikes, etc. The insulator-related data in this scenario often needs to be labeled from scratch, which requires a large labeling cost. The use of semi-supervised learning methods can greatly reduce costs. In addition, there are many styles of insulators in actual scenarios, and with the increase in usage time and changes in shooting angles, the difficulty of recognition is further increased. Therefore, RTDETR (real-time detector) is used as the basic model framework. The attention mechanism can better capture global and local features and improve recognition performance. The following are the steps to implement the above method:

[0174] Collect pictures of insulators under various working conditions, such as normal state, self-explosion, cracks, lightning strikes, etc. The pictures should cover different viewing angles, lighting conditions, and backgrounds to increase the generalization ability of the model.

[0175] Data cleaning: remove images with a similarity of more than 95% or an accuracy of less than 90% to ensure the quality of the data set. Data supplementation: for insufficient conditions, re-collect data until the number is within the first difference range. Data annotation: write detailed annotation specifications, for example, for insulator cracks, annotate their location, size, shape and severity. Use the improved K-Means algorithm to cluster the data and annotate only the central image of each cluster.

[0176] The RTDETR-L model is used as the base model, and the pre-trained weights are used as the initial weights of the student and teacher models. The initialized teacher model is used to generate pseudo labels for the unlabeled data, and the confidence threshold is set to 0.9 to ensure the high quality of the pseudo labels. The labeled data and the unlabeled data with high-quality pseudo labels are merged, and the combined loss function of supervised loss and semi-supervised loss is used for training.

[0177] The loss function includes Focal Loss and Smooth L1 Loss, as well as the weights to balance supervised and semi-supervised losses. The EMA strategy is used to update the teacher model weights to smoothly absorb the learning results of the student model.

[0178] Collect real-time insulator image data from the field and input the real-time data into the updated state recognition model to perform real-time recognition of the insulator state.

[0179] Compared with the existing technical solutions, the present application solution has better technical effects. The specific comparison data are shown in Table 2:

[0180] Table 2: Comparison of insulator status identification performance.

[0181]

[0182]

[0183] By observing this table, we can see that with the increase of unlabeled data and the increase of semi-supervised learning iterations, the performance of the model (mAP, precision, recall, F1 score) has been significantly improved. Although the training time has increased accordingly, the improvement in performance proves the effectiveness of the semi-supervised learning method. This shows that even in the case of limited labeled data, by making reasonable use of a large amount of unlabeled data, a model with superior performance can be trained.

[0184] In this embodiment, the RTDETR model framework is used to effectively utilize a large amount of unlabeled data through a semi-supervised learning strategy, reducing the annotation cost and improving the accuracy and real-time performance of the model in the task of power equipment status identification. Through the above process, real-time and high-precision insulator status monitoring can be achieved to provide protection for the safe operation of the power system.

[0185] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

[0186] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.

[0187] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0188] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0189] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0190] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0191] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for identifying power equipment status based on semi-supervised learning of RTDETR, characterized in that: include: Acquire different working condition scenario data of the target power equipment, and preprocess the different working condition scenario data, wherein the preprocessing includes data cleaning, data supplementation and data labeling, and the preprocessed data includes labeled data and unlabeled data; Based on the labeled data and the unlabeled data, training and updating the preset RTDETR-based state recognition model to obtain an updated state recognition model; Real-time scene data of the electric power equipment is acquired, and the scene data of the real-time electric power equipment is input into an updated state recognition model to perform state recognition of the electric power equipment.

2. The method for identifying power equipment status based on semi-supervised learning of RTDETR as claimed in claim 1, characterized in that: The training and updating of the preset RTDETR-based state recognition model based on the labeled data and the unlabeled data includes initializing the state recognition model, generating pseudo labels, training a student model, and updating a teacher model, wherein the state recognition model includes an RTDETR model, a student model, and a teacher model; The initialization state recognition model includes dividing the labeled data into a training set and a test set, updating the RTDETR model according to the training set and the test set, and selecting the weight with the highest average precision in the test set as the initial weight of the teacher model and the student model; The pseudo label generation includes taking the unlabeled data as the input of the teacher model after the initialization is completed, and taking the label whose corresponding output meets the first preset threshold as the pseudo label; Using labeled data and pseudo-labeled data as training sets for a student model, wherein the loss function of the student model is composed of supervised loss and semi-supervised loss, and obtaining the weight of the student model after training; The teacher model weight is updated according to the weight of the student model after the training is completed, and the pseudo label is regenerated according to the updated teacher model.

3. The method for identifying power equipment status based on semi-supervised learning of RTDETR as claimed in claim 2, characterized in that: The training and updating of the preset RTDETR-based state recognition model based on the labeled data and the unlabeled data also includes training the student model and updating the teacher model according to the regenerated pseudo-labels combined with the labeled data until the iteration requirements are met.

4. The method for identifying power equipment status based on semi-supervised learning of RTDETR as claimed in claim 3, characterized in that: The preprocessing of the different working condition scene data includes: Delete data with a similarity higher than a first similarity threshold and / or a precision lower than a first precision threshold in data of different working conditions; Determine whether the quantity difference of data corresponding to different working scene in different working scene data after the data cleaning operation is within a first difference range; if the quantity difference between a certain working scene data and the quantity difference between other working scene data is greater than the first difference range, obtain the working scene data again; Customize state recognition targets and write annotation specifications, and perform data annotation on the data after data cleaning and data supplementation according to the annotation specifications.

5. The method for identifying power equipment status based on semi-supervised learning of RTDETR as claimed in claim 4, characterized in that: The custom state recognition target and the annotation specification writing include: The custom state recognition target includes at least a normal state target and an abnormal state target; The writing annotation specification at least includes that the annotation target box must select the complete target power equipment and the position relationship between the annotation target box and the target power equipment must meet a first preset relationship standard.

6. The method for identifying power equipment status based on semi-supervised learning of RTDETR as claimed in claim 5, characterized in that: The data labeling of the data after data cleaning and data supplementation according to the labeling specification includes: screening according to the scene, using the improved K-Means algorithm to divide each scene into several clusters, selecting the central image of each cluster for labeling, and the labeled image data is used as labeled data, and the remaining image data is used as unlabeled data.

7. The method for identifying power equipment status based on semi-supervised learning of RTDETR as claimed in claim 6, characterized in that: The first preset relationship standard includes: the marked target box must be larger than the area where the target power equipment is located, and the ratio of the marked target box to the area where the target power equipment is located is within a preset fixed range.

8. A power equipment state recognition system based on semi-supervised learning of RTDETR, characterized in that: include: A data acquisition and processing module is used to acquire different working condition scenario data of the target power equipment and preprocess the different working condition scenario data, wherein the preprocessing includes data cleaning, data supplementation and data labeling, and the preprocessed data includes labeled data and unlabeled data; A model updating module, used to train and update a preset RTDETR-based state recognition model based on the labeled data and the unlabeled data, and obtain an updated state recognition model; The recognition module is used to obtain the scene data of the real-time power equipment and input the scene data of the real-time power equipment into the updated state recognition model to perform power equipment state recognition.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Model training method, equipment operation state identification method and related device

    CN120763610A