Switching state recognition method and device based on detection model, equipment and medium

By using the YOLOv3 detection model to perform image recognition technology on disconnecting switches, the open and closed status of disconnecting switches can be determined in real time, solving the problem of inaccurate recognition in existing technologies and improving the safety and operational efficiency of substations.

CN116385739BActive Publication Date: 2026-01-06GUANGDONG POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211737854.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2026-01-06
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

Existing technologies are unable to effectively identify the open and closed status of substation disconnect switches, leading to problems such as poor contact, discharge, arcing, and overheating caused by incomplete closing, which affects safety and service life, and also makes the modification complex.

Method used

Image recognition technology based on the YOLOv3 detection model is used to acquire multiple images of the disconnector switch during the switching process, perform target detection and bounding box prediction, calculate the loss curve, and determine in real time whether the disconnector switch is in compliance with the requirements.

Benefits of technology

It enables real-time identification of the status of disconnect switches, improves the operational efficiency of operators, ensures safety and extends service life, and does not require changes to the original structure of the disconnect switches.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116385739B_ABST
    Figure CN116385739B_ABST
Patent Text Reader

Abstract

A switch state recognition method, device, equipment and medium based on a detection model are disclosed. A plurality of to-be-recognized images of an isolating switch in a switching process are acquired. The isolating switch in each of the plurality of to-be-recognized images is subjected to target detection based on a pre-trained detection model, and a bounding box prediction result of the isolating switch in each of the plurality of to-be-recognized images is acquired. A loss value of the bounding box prediction result of each of the plurality of to-be-recognized images is determined based on the bounding box prediction result of the isolating switch in each of the plurality of to-be-recognized images and prior bounding box information of the detection model. A loss value curve of the isolating switch in the switching process is determined according to the loss values of the bounding box prediction results of the plurality of to-be-recognized images. The loss value curve of the isolating switch in the switching process is compared with a standard loss value curve of a standard switching process of the isolating switch, and the state of the isolating switch is recognized. The application judges the opening and closing states through images, and improves the work efficiency of maintenance personnel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of substation detection, and in particular to a method, device, equipment and medium for identifying switch status based on a detection model. Background Technology

[0002] Operating disconnect switches is a common practice in substations. However, various factors, such as environment, weather, and service life, can cause them to jam during opening and closing, resulting in incomplete operation. Incomplete closing can lead to poor contact, causing discharge, arcing, and severe overheating, ultimately resulting in burnout. Incomplete opening reduces the air insulation distance, endangering the safety of maintenance personnel. Therefore, it is necessary to effectively identify the opening and closing status of disconnect switches. By combining this with intelligent substation and intelligent operation and maintenance strategies, the accuracy of identification can be improved, increasing the efficiency of operation and maintenance personnel, ensuring their safety, and extending the service life of the disconnect switches.

[0003] Most existing methods are based on a single state for identification, which lacks universality. Furthermore, they require modifications to the original structure of the disconnector, making the testing process complex and on-site modifications difficult. Summary of the Invention

[0004] This invention provides a switch status identification method, device, equipment, and medium based on a detection model, which enables the identification of disconnecting switches through image recognition technology, thereby determining in real time whether the opening and closing status of the disconnecting switches is qualified, improving the operational efficiency of operators, and without requiring any changes to the original structure of the disconnecting switches.

[0005] In a first aspect, embodiments of the present invention provide a switch state recognition method based on a detection model, the method comprising:

[0006] Acquire multiple images of the disconnecting switch to be identified during the switching process;

[0007] Based on the pre-trained detection model, target detection is performed on the isolation switches in the multiple images to be identified, and the bounding box prediction results of the isolation switches in the multiple images to be identified are obtained.

[0008] The loss values ​​of the bounding box prediction results of the isolation switches in the multiple images to be identified and the prior bounding box information of the detection model are determined respectively.

[0009] The loss curve of the disconnect switch during the switching process is determined based on the loss value of the bounding box prediction results of the multiple images to be identified.

[0010] The state of the disconnecting switch is identified by comparing the loss value curve of the disconnecting switch during the switching process with the standard loss value curve of the disconnecting switch during the standard switching process.

[0011] Optionally, determining the loss curve of the disconnect switch during the switching process based on the loss values ​​of the bounding box prediction results of the multiple images to be identified includes:

[0012] The loss values ​​of the bounding box prediction results of the multiple images to be identified are sorted according to the time sequence, and the loss value-time curve of the disconnecting switch during the switching process is plotted.

[0013] Optionally, the detection model based on pre-training performs target detection on the isolation switches in the multiple images to be identified, and obtains the bounding box prediction results of the isolation switches in the multiple images to be identified, including:

[0014] The multiple images to be identified are detected based on a pre-trained YOLOv3 model;

[0015] Clustering the detection results yields the predicted bounding box results of the isolation switches in the multiple images to be identified.

[0016] Optionally, the loss values ​​for determining the bounding box prediction results of the multiple images to be identified based on the bounding box prediction results of the isolation switches in the multiple images to be identified and the prior bounding box information of the detection model include:

[0017] Based on the bounding box prediction results of the isolation switches in the multiple images to be identified and the prior bounding box information of the detection model, the center coordinate error, width and height coordinate error, confidence error, and classification error of the bounding boxes predicted by the YOLOv3 model are calculated. The ratio of the sum of the center coordinate error, width and height coordinate error, confidence error, and classification error to the number of grids N is used as the image grid loss value. The image grid loss value is used as the loss value of the bounding box prediction result. The number of grids N is obtained by the detection model dividing the images to be identified.

[0018] The bounding box center coordinate error dist_xy, width and height coordinate error dist_wh, confidence error dist_C, and classification error dist_P are calculated using the following formulas:

[0019]

[0020]

[0021]

[0022]

[0023] Where N represents the total number of grids that the detection model divides the input image into; This represents the predicted center coordinates of the j-th prior bounding box in the i-th grid output by the detection model. This represents the predicted width and height of the j-th prior bounding box in the i-th grid output by the detection model; This represents the true center coordinates of the j-th prior bounding box in the i-th grid of the detection model; represents the true width and height of the j-th prior bounding box in the i-th grid of the detection model; S represents the size of the input image partitioned by the detection model, which divides the input image into S×S grids; B represents the number of prior bounding boxes generated for each grid. This is a variable between 0 and 1, indicating whether the j-th prior bounding box in the i-th grid is responsible for this object. Indicates responsibility, otherwise 0; This indicates a lack of responsibility. This represents the prediction confidence of the j-th prior bounding box in the i-th grid of the model; This represents the true value of the j-th prior bounding box in the i-th grid of the model; The variable is 0 to 1, representing whether the center point of the j-th prior bounding box in the i-th grid of the model falls within the predicted value of the prediction box; otherwise... P i j The variable is 0 to 1, representing whether the center point of the j-th prior bounding box in the i-th grid of the model falls within the true value of the predicted box; otherwise, P i j =0; λ noobj It represents a fixed quantity.

[0024] Optionally, the detection of the multiple images to be identified based on the pre-trained YOLOv3 model includes:

[0025] The bounding box is predicted using the following formula:

[0026] a x =σ(t) x )+c x

[0027] a y =σ(t) y )+c y

[0028]

[0029]

[0030]

[0031] Among them, a x a yThese are the coordinates of the bounding box center predicted by the YOLOv3 model, a w a h These are the width and height of the predicted bounding box output by the YOLOv3 model, c x c y P represents the size of a single grid cell in which the YOLOv3 model partitions the input image. w p h These are the width and height of the prior bounding box; t x t y t represents the coordinate offset value predicted by the YOLOv3 model. w t h This represents the ratio between the width and height of the bounding box predicted by the YOLOv3 model and the width and height of the prior bounding box.

[0032] Optionally, the clustering of the detection results includes:

[0033] Clustering is performed using the following formula:

[0034] d(a,a ′ ) = 1 - IOU(a, a ′ )

[0035]

[0036] Where 'a' represents the predicted bounding box output by the YOLOv3 model; ′ This represents the prior bounding box of the YOLOv3 model, d(a,a) ′ IOU(a, a) represents the cluster center. ′ The value represents the overlap between the predicted bounding box and the prior bounding box.

[0037] Optionally, acquiring multiple images of the disconnector switch during the switching process includes:

[0038] Images of the disconnect switch during the switching process are captured by taking pictures at a fixed angle.

[0039] Secondly, embodiments of the present invention also provide a switch state recognition device based on a detection model, the device comprising:

[0040] The image acquisition module is used to acquire multiple images of the disconnector switch to be identified during the switching process.

[0041] The target detection module is used to perform target detection on the isolation switches in the multiple images to be identified based on a pre-trained detection model, and obtain the bounding box prediction results of the isolation switches in the multiple images to be identified.

[0042] The loss value calculation module is used to determine the loss value of the bounding box prediction results of the multiple images to be identified based on the bounding box prediction results of the isolation switches in the multiple images to be identified and the prior bounding box information of the detection model.

[0043] The curve determination module is used to determine the loss curve of the disconnecting switch during the switching process based on the loss value of the bounding box prediction results of the multiple images to be identified.

[0044] The status identification module is used to compare the loss value curve of the disconnecting switch during the switching process with the standard loss value curve of the disconnecting switch during the standard switching process to identify the status of the disconnecting switch.

[0045] Thirdly, embodiments of the present invention also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the switch state recognition method based on a detection model as described in any of the embodiments of the present application.

[0046] Fourthly, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a switch state recognition method based on a detection model as described in any of the embodiments of this application, characterized in that the method includes:

[0047] Acquire multiple images of the disconnecting switch to be identified during the switching process;

[0048] Based on the pre-trained detection model, target detection is performed on the isolation switches in the multiple images to be identified, and the bounding box prediction results of the isolation switches in the multiple images to be identified are obtained.

[0049] The loss values ​​of the bounding box prediction results of the isolation switches in the multiple images to be identified and the prior bounding box information of the detection model are determined respectively.

[0050] The loss curve of the disconnect switch during the switching process is determined based on the loss value of the bounding box prediction results of the multiple images to be identified.

[0051] The state of the disconnecting switch is identified by comparing the loss value curve of the disconnecting switch during the switching process with the standard loss value curve of the disconnecting switch during the standard switching process.

[0052] This invention acquires multiple images of a disconnector switch during its switching process; performs target detection on the disconnector switch in each of the multiple images based on a pre-trained detection model, obtaining bounding box prediction results for the disconnector switch in the multiple images; determines the loss value of the bounding box prediction results of the multiple images based on the bounding box prediction results of the disconnector switch in the multiple images and the prior bounding box information of the detection model; determines the loss value curve of the disconnector switch during the switching process based on the loss value of the bounding box prediction results of the multiple images; and compares the loss value curve of the disconnector switch during the switching process with the standard loss value curve of the disconnector switch during a standard switching process to identify the state of the disconnector switch. This invention relates to the identification of inconsistent opening and closing states of disconnecting switches based on the YOLOv3 algorithm. It extracts image features using the YOLOv3 target recognition algorithm, which balances detection speed and accuracy, constructs a dataset of disconnecting switch opening and closing statuses, and establishes center coordinate error functions, width and height coordinate error functions, and confidence error functions. The YOLOv3 algorithm is used to identify inconsistent opening and closing states of disconnecting switches in images, thereby enhancing the safe and reliable operation of the system and extending the service life of the disconnecting switches. It enables real-time identification of disconnecting switches through image recognition technology, and then real-time judgment of whether the opening and closing status of the disconnecting switches is qualified, improving the operational efficiency of operators without requiring any changes to the original structure of the disconnecting switches. Attached Figure Description

[0053] Figure 1 The flowchart shows a switch state recognition method based on a detection model provided in Embodiment 1 of the present invention.

[0054] Figure 2 The diagram shown is a schematic representation of a switch state recognition device based on a detection model, provided in Embodiment 2 of the present invention.

[0055] Figure 3 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Detailed Implementation

[0056] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0057] Example 1

[0058] Figure 1This is a flowchart of a switch state identification method based on a detection model provided in Embodiment 1 of the present invention. This embodiment is applicable to detecting the opening and closing status of disconnecting switches in substations. The method can be executed by a switch state identification device based on a detection model, which can be implemented in software and / or hardware. The device can be configured in a computer device. The method specifically includes:

[0059] S110. Acquire multiple images of the disconnecting switch to be identified during the switching process;

[0060] The various images to be identified are images taken by operators during the opening and closing of disconnect switches.

[0061] Specifically, multiple images of the disconnector switch to be identified are captured at fixed time intervals using a camera during the switching process. Alternatively, video of the disconnector switch during the switching process is captured by a camera, and video frames are extracted at fixed time intervals to obtain multiple images of the disconnector switch to be identified during the switching process. During the switching process, operators can control the opening and closing of the disconnector switch via machine, or manually control it under special circumstances. The captured images can be transmitted in real time to the detection model via wired or wireless transmission for subsequent steps in this application.

[0062] Preferably, the camera can rotate to capture the opening and closing processes of multiple disconnect switches. Specifically, for different disconnect switches, images are captured at a fixed angle to obtain images of the disconnect switches during the opening and closing process. The advantage of capturing images at a fixed angle is that the angle matches the target detection model, resulting in more accurate detection results when subsequently detecting the disconnect switches.

[0063] S120. Based on the pre-trained detection model, target detection is performed on the isolation switches in the multiple images to be identified, and the bounding box prediction results of the isolation switches in the multiple images to be identified are obtained.

[0064] The pre-trained detection model can be any image object detection model, such as OverFeat, YOLOv1, YOLOv3, R-CNN, or SPP-Net.

[0065] Preferably, in this embodiment of the application, target detection is performed on the isolation switches in the multiple images to be identified based on a pre-trained detection model, and the bounding box prediction results of the isolation switches in the multiple images to be identified are obtained as follows:

[0066] The multiple images to be identified are detected based on a pre-trained YOLOv3 model;

[0067] Clustering the detection results yields the predicted bounding box results of the isolation switches in the multiple images to be identified.

[0068] In this embodiment, the YOLOv3 model is preferably selected to perform target detection on the disconnect switch in the multiple images to be identified. This is because the disconnect switch is a small object, and the YOLOv3 model excels in detecting small objects. Simultaneously, the YOLOv3 model balances detection accuracy and speed, and can simultaneously detect the disconnect switch in multiple images during the switching process, as obtained in step S110, to obtain detection results. The YOLOv3 model divides the image into multiple regions and outputs the predicted bounding boxes of the detected objects and the probability of each region.

[0069] Specifically, pre-training the YOLOv3 model can involve creating a dataset depicting the standard switching process of a disconnector switch. This dataset includes multiple standard images of the disconnector switch during the standard switching process, where the positions and categories of target objects in the images have been manually labeled. The YOLOv3 model is then trained using this dataset, and its parameters are modified based on the output results. When the output of the YOLOv3 model is sufficiently close to the manually labeled results, the model's performance is considered good. At this point, the YOLOv3 model's parameters are saved; these parameters can be referred to as prior information, such as the prior bounding box of the disconnector switch, which specifies the center coordinates, width, and height of the prior bounding box.

[0070] The YOLOv3 model framework can be divided into three parts: the Darknet-53 structure, the feature layer fusion structure, and the classification and detection structure. Darknet-53 is a fully convolutional neural network containing 53 convolutional layers, used for feature extraction from the input image. For example, given an image x (size: 416×416) input to the Darknet-53 network structure, a series of convolutions and staggered networks are performed, resulting in feature maps of 1 / 8 (size: 52*52), 1 / 16 (size: 26*26), and 1 / 32 (size: 13*13) of the original image. These extracted features cannot fully reflect the target information in the original image; therefore, the feature layer fusion structure is needed to fuse the multiple extracted feature maps to obtain stronger feature representation and achieve better results. The classification and detection structure is used to perform target detection on the fused feature map to predict whether a certain feature point in the fused feature map contains a target in the original image.

[0071] The YOLOv3 model extracts features from the input image to be identified and divides it into multiple regions, such as feature maps of size (52*52), (26*26), and (13*13). For example, a feature map of size (13*13) has 13*13 = 169 grid regions. The YOLOv3 model performs bounding box prediction on each grid region and outputs the probability of the presence of an object in each region.

[0072] Specifically, in this embodiment of the application, feature extraction, feature fusion and classification detection are performed by formulas 1-3 respectively to obtain the detection results of the YOLOv3 model on the input image. The input image is multiple images to be identified during the switching process of the disconnector switch. The detection results include all objects included in the image.

[0073]

[0074]

[0075]

[0076] in, Let I represent the feature map output by the l-th convolutional kernel of the k-th convolutional layer, and let I represent the input image. This represents the weight of the l-th convolutional kernel in the k-th convolutional layer; This represents the fused feature map output by the l-th convolutional kernel of the k-th convolutional layer; u B σ represents the feature mean of the feature map. B φ(x) represents the feature variance of the feature map; ε is the division-by-zero parameter; φ(x) represents the classification detection result.

[0077] Specifically, in this embodiment of the application, the detection of the multiple images to be identified based on the pre-trained YOLOv3 model includes:

[0078] Predict the bounding box according to Formula 4-8:

[0079] a x =σ(t) x )+c x (4)

[0080] a y =σ(t) y )+c y (5)

[0081]

[0082]

[0083]

[0084] Among them, a x a y These are the coordinates of the bounding box center predicted by the YOLOv3 model, a w a h These are the width and height of the predicted bounding box output by the YOLOv3 model, c x c y p represents the size of a single grid cell in which the YOLOv3 model partitions the input image. w p h These are the width and height of the prior bounding box; t x t y t represents the coordinate offset value predicted by the YOLOv3 model. w t h This represents the ratio between the width and height of the bounding box predicted by the YOLOv3 model and the width and height of the prior bounding box.

[0085] The final predicted bounding box coordinates are a x a y a w a h That is, predicting the position and size of the bounding box relative to the fused feature map, wherein the predicted bounding box includes the detected target object, such as a disconnect switch.

[0086] Since the captured image to be identified also includes other objects, such as pillars, people, signs, and operation buttons, this embodiment further uses a clustering algorithm to cluster the bounding boxes of the detection results, thereby accelerating the search speed for the disconnect switch and obtaining the predicted bounding boxes of the disconnect switch output by the YOLOv3 model.

[0087] Furthermore, for an image with a size of 416*416, after detection by the three detection layers mentioned above, there are [(52*52)+(26*26)+(13*13)]*3=10647 predicted bounding boxes. A clustering algorithm can be used to cluster the bounding boxes in the training set, calculate the IOU, remove most of the redundant boxes, reduce the complexity of the search, and facilitate the subsequent calculation of the loss value of the bounding box prediction results. Preferably, in this embodiment, the clustering algorithm is K-means.

[0088] Optionally, the clustering of the detection results includes:

[0089] Clustering is performed according to formula 9-10:

[0090] d(a,a′)=1-IOU(a,a′) (9)

[0091]

[0092] Where a represents the predicted bounding box output by the YOLOv3 model; a′ represents the prior bounding box of the YOLOv3 model; d(a,a′) represents the cluster center; and IOU(a,a′) represents the overlap between the predicted bounding box and the prior bounding box.

[0093] Preferably, in this embodiment, the multiple images to be recognized are preprocessed, and the preprocessed images are used as input images for the YOLOv3 model. The preprocessing may involve scaling to 416*416 pixels using a ratio of min(w / img_w, h / img_h) to ensure that the longer side is scaled to the required input size of 416, while the shorter side is scaled proportionally without distortion. It should be noted that the training set images and the images to be recognized for the YOLOv3 model should undergo the same preprocessing.

[0094] S130. Based on the bounding box prediction results of the isolation switches in the multiple images to be identified and the prior bounding box information of the detection model, determine the loss value of the bounding box prediction results of the multiple images to be identified.

[0095] The prior bounding box information can be obtained by training the YOLOv3 model using a training set, and the prior bounding box information is included in the YOLOv3 model. The loss value of the bounding box prediction result is used to represent the error value between the predicted bounding box output by the YOLOv3 model and the prior bounding box.

[0096] Optionally, the loss values ​​for determining the bounding box prediction results of the multiple images to be identified based on the bounding box prediction results of the isolation switches in the multiple images to be identified and the prior bounding box information of the detection model include:

[0097] Based on the bounding box prediction results of the isolation switches in the multiple images to be identified and the prior bounding box information of the detection model, the center coordinate error, width and height coordinate error, confidence error, and classification error of the bounding boxes predicted by the YOLOv3 model are calculated. The ratio of the sum of the center coordinate error, width and height coordinate error, confidence error, and classification error to the number of grids N is used as the image grid loss value. The image grid loss value is used as the loss value of the bounding box prediction result. The number of grids N is obtained by the detection model dividing the images to be identified.

[0098] Specifically, the loss function of the YOLOv3 model consists of the bounding box center coordinate error dist_xy, the width and height coordinate errors dist_wh, the confidence error dist_C, and the classification error dist_P. The above process can be achieved through a formula...

[0099] Equation 11 is implemented as follows:

[0100]

[0101] Specifically, the bounding box center coordinate error dist_xy, width and height coordinate error dist_wh, confidence error dist_C, and classification error dist_P are calculated according to the following formulas 12-15:

[0102]

[0103]

[0104]

[0105]

[0106] Where N represents the total number of grids that the detection model divides the input image into; This represents the predicted center coordinates of the j-th prior bounding box in the i-th grid output by the detection model. This represents the predicted width and height of the j-th prior bounding box in the i-th grid output by the detection model; This represents the true center coordinates of the j-th prior bounding box in the i-th grid of the detection model; represents the true width and height of the j-th prior bounding box in the i-th grid of the detection model; S represents the size of the input image partitioned by the detection model, which divides the input image into S×S grids; B represents the number of prior bounding boxes generated for each grid. This is a variable between 0 and 1, indicating whether the j-th prior bounding box in the i-th grid is responsible for this object. Indicates responsibility, otherwise 0; This indicates a lack of responsibility. This represents the prediction confidence of the j-th prior bounding box in the i-th grid of the model; This represents the true value of the j-th prior bounding box in the i-th grid of the model; The variable is 0 to 1, representing whether the center point of the j-th prior bounding box in the i-th grid of the model falls within the predicted value of the prediction box; otherwise... P i j The variable is 0 to 1, representing whether the center point of the j-th prior bounding box in the i-th grid of the model falls within the true value of the predicted box; otherwise, P i j =0; λ noobj It represents a fixed quantity.

[0107] Specifically, the confidence level is calculated as shown in Formula 16:

[0108] c = P*IOU(a, a′) (16)

[0109] S140. Determine the loss curve of the disconnecting switch during the switching process based on the loss value of the bounding box prediction results of the multiple images to be identified.

[0110] S150. Compare the loss value curve of the disconnecting switch during the switching process with the standard loss value curve of the disconnecting switch during the standard switching process to identify the state of the disconnecting switch.

[0111] The standard loss value curve is obtained from multiple standard images of the disconnecting switch during the standard switching process.

[0112] Optionally, determining the loss curve of the disconnect switch during the switching process based on the loss values ​​of the bounding box prediction results of the multiple images to be identified includes:

[0113] The loss values ​​of the bounding box prediction results of the multiple images to be identified are sorted according to the time sequence, and the loss value-time curve of the disconnecting switch during the switching process is plotted.

[0114] Optionally, before comparing the loss curve of the disconnecting switch during the switching process with the standard loss curve of the standard switching process of the disconnecting switch, the method further includes:

[0115] Multiple standard images of the disconnector switch during the standard switching process are acquired. Based on a pre-trained object detection model, object detection is performed on the disconnector switch in each of the multiple standard images to obtain bounding box prediction results for the disconnector switch in the multiple standard images. Based on the bounding box prediction results of the disconnector switch in the multiple standard images and the prior bounding box information of the object detection model, the loss values ​​of the bounding box prediction results for the multiple images to be identified are determined. The standard loss curve of the disconnector switch during the standard switching process is determined based on the loss values ​​of the bounding box prediction results for the multiple images to be identified. Specifically, the method for plotting the standard loss curve is consistent with the method for plotting the loss curve of the disconnector switch in the switching process for the multiple images to be identified. Optionally, the standard loss curve of the disconnector switch during the standard switching process can also be determined based on the training set after the YOLOv3 model training is completed.

[0116] Specifically, the YOLOv3 model outputs different predicted bounding box sizes for multiple images to be identified during the switching process of the disconnector switch at different switching moments. Therefore, the error between the predicted bounding box and the prior bounding box varies with the switching process; that is, the loss value curve fluctuates with the switching process. If the disconnector switch is not properly opened or closed, the loss value curve corresponding to the switching process will have a large error compared to the standard loss value curve. Therefore, after determining the loss value curve of the disconnector switch during the switching process, it can be compared with the standard loss value curve of the standard switching process of the disconnector switch to identify the status of the disconnector switch. Optionally, an error threshold can be set. When the error between the loss value curve of the disconnector switch during the switching process and the standard loss value curve exceeds the set threshold, it is determined that the opening or closing of the disconnector switch is unqualified, and an alarm is issued to the operating personnel.

[0117] This invention addresses the issue of collecting state images of disconnecting switches during their opening and closing processes. It utilizes the Darknet convolutional network of the YOLOv3 model and a multi-scale fusion feature network to rapidly extract image features. To accelerate the search for the disconnecting switch's opening and closing status, K-means clustering is employed to cluster the bounding boxes in the training set. Furthermore, to improve search accuracy and ensure minimal image offset, logistic regression is used for bounding box prediction. Following these steps, a loss function for the YOLOv3 model is constructed, consisting of a center coordinate error function (dist_xy), a width and height coordinate error function (dist_wh), a confidence error value (dist_C), and a classification error function (dist_P), yielding the loss value for the bounding box prediction. By plotting the loss value-time curve of the disconnecting switch during the opening and closing process and comparing it with the standard loss value curve of the disconnecting switch's open / closed state, the quality of the disconnecting switch's operation can be determined, improving the operational efficiency of operators. The opening and closing status can be determined in real-time through image recognition.

[0118] Example 2

[0119] Figure 2 The diagram shown is a schematic representation of a switch state recognition device based on a detection model according to Embodiment 2 of the present invention. The specific structure of the device is as follows:

[0120] It includes an image acquisition module 210, an object detection module 220, a loss value calculation module 230, a curve determination module 240, and a state recognition module 250.

[0121] The image acquisition module 210 is used to acquire multiple images to be identified during the switching process of the disconnecting switch;

[0122] The target detection module 220 is used to perform target detection on the isolation switches in the multiple images to be identified based on a pre-trained detection model, and obtain the bounding box prediction results of the isolation switches in the multiple images to be identified.

[0123] The loss value calculation module 230 is used to determine the loss value of the bounding box prediction results of the multiple images to be identified based on the bounding box prediction results of the isolation switches in the multiple images to be identified and the prior bounding box information of the detection model.

[0124] The curve determination module 240 is used to determine the loss value curve of the disconnecting switch during the switching process based on the loss value of the bounding box prediction results of the multiple images to be identified.

[0125] The state recognition module 250 is used to compare the loss value curve of the disconnecting switch during the switching process with the standard loss value curve of the disconnecting switch during the standard switching process to identify the state of the disconnecting switch.

[0126] This application enables real-time identification of disconnect switches using image recognition technology, thereby determining whether the opening and closing status of the disconnect switches is qualified. This improves the operational efficiency of operators without requiring any changes to the original structure of the disconnect switches.

[0127] As an optional implementation, the curve determination module is specifically used for:

[0128] The loss values ​​of the bounding box prediction results of the multiple images to be identified are sorted according to the time sequence, and the loss value-time curve of the disconnecting switch during the switching process is plotted.

[0129] As an optional implementation, the target detection module includes a detection unit and a clustering unit. The detection unit is used to detect the multiple images to be identified based on a pre-trained YOLOv3 model. The clustering unit is used to cluster the detection results to obtain the bounding box prediction results of the isolation switches in the multiple images to be identified.

[0130] As an optional implementation, the loss value calculation module is specifically used for:

[0131] Based on the bounding box prediction results of the isolation switches in the multiple images to be identified and the prior bounding box information of the detection model, the center coordinate error, width and height coordinate error, confidence error, and classification error of the bounding boxes predicted by the YOLOv3 model are calculated. The ratio of the sum of the center coordinate error, width and height coordinate error, confidence error, and classification error to the number of grids N is used as the image grid loss value. The image grid loss value is used as the loss value of the bounding box prediction result. The number of grids N is obtained by the detection model dividing the images to be identified.

[0132] The bounding box center coordinate error dist_xy, width and height coordinate error dist_wh, confidence error dist_C, and classification error dist_P are calculated using the following formulas:

[0133]

[0134]

[0135]

[0136]

[0137] Where N represents the total number of grids that the detection model divides the input image into; This represents the predicted center coordinates of the j-th prior bounding box in the i-th grid output by the detection model. This represents the predicted width and height of the j-th prior bounding box in the i-th grid output by the detection model; This represents the true center coordinates of the j-th prior bounding box in the i-th grid of the detection model; represents the true width and height of the j-th prior bounding box in the i-th grid of the detection model; S represents the size of the input image partitioned by the detection model, which divides the input image into S×S grids; B represents the number of prior bounding boxes generated for each grid. This is a variable between 0 and 1, indicating whether the j-th prior bounding box in the i-th grid is responsible for this object. Indicates responsibility, otherwise 0; This indicates a lack of responsibility. This represents the prediction confidence of the j-th prior bounding box in the i-th grid of the model; This represents the true value of the j-th prior bounding box in the i-th grid of the model; The variable is 0 to 1, representing whether the center point of the j-th prior bounding box in the i-th grid of the model falls within the predicted value of the prediction box; otherwise... P i j The variable is 0 to 1, representing whether the center point of the j-th prior bounding box in the i-th grid of the model falls within the true value of the predicted box; otherwise, P i j =0; λ noobj It represents a fixed quantity.

[0138] As an optional implementation, the detection unit is specifically used for:

[0139] The bounding box is predicted using the following formula:

[0140] a x =σ(t) x)+c x

[0141] a y =σ(t) y )+c y

[0142]

[0143]

[0144]

[0145] Among them, a x a y These are the coordinates of the bounding box center predicted by the YOLOv3 model, a w a h These are the width and height of the predicted bounding box output by the YOLOv3 model, c x c y p represents the size of a single grid cell in which the YOLOv3 model partitions the input image. w p h These are the width and height of the prior bounding box; t x t y t represents the coordinate offset value predicted by the YOLOv3 model. w t h This represents the ratio between the width and height of the bounding box predicted by the YOLOv3 model and the width and height of the prior bounding box.

[0146] As an optional implementation, the clustering unit is specifically used for:

[0147] Clustering is performed using the following formula:

[0148] d(a, a′) = 1 - IOU(a, a′)

[0149]

[0150] Where 'a' represents the predicted bounding box output by the YOLOv3 model; ′ This represents the prior bounding box of the YOLOv3 model, d(a,a) ′ IOU(a, a) represents the cluster center. ′ The value represents the overlap between the predicted bounding box and the prior bounding box.

[0151] As an optional implementation, the image acquisition module is specifically used for:

[0152] Images of the disconnect switch during the switching process are captured by taking pictures at a fixed angle.

[0153] The switch state identification device based on the detection model provided in this embodiment of the invention can execute the relay protection setting verification method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0154] Example 3

[0155] Figure 3 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention, as shown below. Figure 3 As shown, the computer device includes a processor 310, a memory 320, an input device 330, and an output device 740; the number of processors 310 in the computer device can be one or more. Figure 3 Taking a processor 310 as an example; the processor 310, memory 320, input device 330, and output device 740 in a computer device can be connected via a bus or other means. Figure 3 Taking the example of a connection between China and Israel via a bus.

[0156] The memory 320, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the detection model-based switch state recognition method in this embodiment of the invention (e.g., the image acquisition module 210, target detection module 220, loss value calculation module 230, curve determination module 240, and state recognition module 250 in the detection model-based switch state recognition device). The processor 310 executes various functional applications and data processing of the computer device by running the software programs, instructions, and modules stored in the memory 320, thereby realizing the aforementioned detection model-based switch state recognition method.

[0157] The memory 320 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 320 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, the memory 320 may further include memory remotely located relative to the processor 310, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0158] Input device 330 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the computer device. Output device 740 may include display devices such as a display screen.

[0159] Example 4

[0160] Embodiment 4 of the present invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a switch state recognition method based on a detection model, the method comprising:

[0161] Acquire multiple images of the disconnecting switch to be identified during the switching process;

[0162] Based on the pre-trained detection model, target detection is performed on the isolation switches in the multiple images to be identified, and the bounding box prediction results of the isolation switches in the multiple images to be identified are obtained.

[0163] The loss values ​​of the bounding box prediction results of the isolation switches in the multiple images to be identified and the prior bounding box information of the detection model are determined respectively.

[0164] The loss curve of the disconnect switch during the switching process is determined based on the loss value of the bounding box prediction results of the multiple images to be identified.

[0165] The state of the disconnecting switch is identified by comparing the loss value curve of the disconnecting switch during the switching process with the standard loss value curve of the disconnecting switch during the standard switching process.

[0166] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the method operations described above, but can also perform related operations in the switch state recognition method based on the detection model provided in any embodiment of the present invention.

[0167] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0168] It is worth noting that in the embodiments of the search device described above, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0169] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method of detecting a switching state based on a detection model, characterized by, The method comprises the following steps: acquiring a plurality of to-be-recognized images of the disconnecting switch in the switching process; performing target detection on the disconnecting switch in the plurality of to-be-recognized images based on a pre-trained detection model to obtain a bounding box prediction result of the disconnecting switch in the plurality of to-be-recognized images; determining a loss value of the bounding box prediction result of the plurality of to-be-recognized images based on the bounding box prediction result of the disconnecting switch in the plurality of to-be-recognized images and prior bounding box information of the detection model; determining a loss value curve of the disconnecting switch in the switching process according to the loss value of the bounding box prediction result of the plurality of to-be-recognized images; comparing the loss value curve of the disconnecting switch in the switching process with a standard loss value curve of a standard switching process of the disconnecting switch to recognize the state of the disconnecting switch.

2. The method of claim 1, wherein, The method of determining the loss value curve of the disconnecting switch in the switching process according to the loss value of the bounding box prediction result of the plurality of to-be-recognized images comprises the following steps: sequentially arranging the loss value of the bounding box prediction result of the plurality of to-be-recognized images according to time sequence to draw a loss value-time curve of the disconnecting switch in the switching process.

3. The method of claim 1, wherein, The method of performing target detection on the disconnecting switch in the plurality of to-be-recognized images based on a pre-trained detection model to obtain a bounding box prediction result of the disconnecting switch in the plurality of to-be-recognized images comprises the following steps: detecting the plurality of to-be-recognized images based on a pre-trained YOLOv3 model; performing clustering on the detection result to obtain the bounding box prediction result of the disconnecting switch in the plurality of to-be-recognized images.

4. The method of claim 1, wherein, The method of determining a loss value of the bounding box prediction result of the plurality of to-be-recognized images based on the bounding box prediction result of the disconnecting switch in the plurality of to-be-recognized images and prior bounding box information of the detection model comprises the following steps: calculating a bounding box center coordinate error, a width-height coordinate error, a confidence error and a classification error of the bounding box predicted by the YOLOv3 model based on the bounding box prediction result of the disconnecting switch in the plurality of to-be-recognized images and the prior bounding box information of the detection model, taking a ratio of a sum of the bounding box center coordinate error, the width-height coordinate error, the confidence error and the classification error to a grid number N as a loss value of an image grid, taking the loss value of the image grid as the loss value of the bounding box prediction result, and the grid number N is obtained by dividing the to-be-recognized image by the detection model; calculating the bounding box center coordinate error dist_xy, the width-height coordinate error dist_wh, the confidence error dist_C and the classification error dist_P according to the following formula: wherein N represents the total number of grids of the input image divided by the detection model; represents the predicted center coordinate value of the jth prior bounding box of the ith grid output by the detection model; represents the predicted width and height of the jth prior bounding box of the ith grid output by the detection model; represents the true center coordinate value of the jth prior bounding box of the ith grid of the detection model; represents the true width and height of the jth prior bounding box of the ith grid of the detection model; S represents the size of the input image divided by the detection model, and the input image is divided into SxS grids; and B represents the number of prior bounding boxes generated in each grid; is a 0-1 variable, and represents whether the jth prior bounding box in the ith grid is responsible for the object, represents responsible, otherwise 0; represents not responsible; represents the predicted confidence of the jth prior bounding box of the ith grid of the model; represents the true value of the jth prior bounding box of the ith grid of the model; is a 0-1 variable, and represents whether the center point of the jth prior bounding box of the ith grid of the model falls in the predicted value in the predicted box, if not is a 0-1 variable, and represents whether the center point of the jth prior bounding box of the ith grid of the model falls in the true value in the predicted box, if not λ noobj represents a fixed amount.

5. The method of claim 3, wherein, The method of detecting the plurality of to-be-recognized images based on a pre-trained YOLOv3 model comprises the following steps: performing bounding box prediction according to the following formula: a x = σ(t x )+ c x a y = σ(t y )+ c y wherein a x , a y is the center coordinate of the bounding box predicted by the YOLOv3 model, a w , a h is the width and height of the predicted bounding box output by the YOLOv3 model, c x , c y represents the size of a single grid in the division of the input image by the YOLOv3 model, p w , p h is the width and height of the prior bounding box; t x , t y represents the coordinate offset value predicted by the YOLOv3 model, t w , t h represents the ratio between the width and height of the bounding box predicted by the YOLOv3 model and the width and height of the prior bounding box.

6. The method of claim 3, wherein, The method of performing clustering on the detection result comprises the following steps: performing clustering according to the following formula: d(a, a ′ ) = 1 - IOU(a, a ′ ) Wherein, a represents the prediction bounding box output by the YOLOv3 model; a ′ represents the prior bounding box of the YOLOv3 model, d(a,a ′ ) represents the clustering center, IOU(a,a ′ ) represents the overlap degree of the prediction bounding box and the prior bounding box.

7. The method of claim 1, wherein, The method of acquiring a plurality of to-be-recognized images of the disconnecting switch in the switching process comprises the following steps: acquiring images of the disconnecting switch in the switching process by shooting according to a fixed angle value.

8. A detection model-based switching state recognition apparatus, characterized by comprising: The method comprises the following steps: a picture acquisition module is configured to acquire a plurality of to-be-recognized images of the disconnecting switch in the switching process; The target detection module is configured to perform target detection on the disconnectors in the multiple to-be-identified images based on a pre-trained detection model, and obtain bounding box prediction results of the disconnectors in the multiple to-be-identified images. The loss value calculation module is configured to determine loss values of the bounding box prediction results of the multiple to-be-identified images based on the bounding box prediction results of the disconnectors in the multiple to-be-identified images and prior bounding box information of the detection model. The curve determination module is configured to determine a loss value curve of the disconnectors in the switching process according to the loss values of the bounding box prediction results of the multiple to-be-identified images. The state recognition module is configured to compare the loss value curve of the disconnectors in the switching process with a standard loss value curve of a standard switching process of the disconnectors, and recognize a state of the disconnectors.

9. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the method for recognizing a switching state of a disconnector based on a detection model according to any one of claims 1-7 when executing the program.

10. A storage medium containing computer-executable instructions for performing a method of switch state recognition based on a detection model when executed by a computer processor, the method comprising: The method comprises: obtaining multiple to-be-identified images of disconnectors in a switching process; performing target detection on the disconnectors in the multiple to-be-identified images based on a pre-trained detection model, and obtaining bounding box prediction results of the disconnectors in the multiple to-be-identified images; determining loss values of the bounding box prediction results of the multiple to-be-identified images based on the bounding box prediction results of the disconnectors in the multiple to-be-identified images and prior bounding box information of the detection model; determining a loss value curve of the disconnectors in the switching process according to the loss values of the bounding box prediction results of the multiple to-be-identified images; comparing the loss value curve of the disconnectors in the switching process with a standard loss value curve of a standard switching process of the disconnectors, and recognizing a state of the disconnectors.

Citation Information

Patent Citations

  • Dynamic compensation to polygon and motor tolerance using galvo control profile

    US20220334228A1

  • Vulnerable road user basic service communication protocols framework and dynamic states

    WO2021226065A1