A kind of knife switch state identification model, training method and device
By using a twin network framework to identify the open/closed state of disconnectors, and leveraging the joint loss function of anchor samples, positive samples, and negative samples, the accuracy problem of AIS disconnector open/closed state identification is solved. This enables efficient identification of disconnector images with similar appearances and is applicable to AIS disconnectors and substation scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG ZHENGYUAN IND MANAGEMENT CO LTD
- Filing Date
- 2023-04-04
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies cannot accurately identify the open/closed state of AIS disconnectors, especially when they are close to or closed with similar appearances, resulting in insufficient identification accuracy.
A disconnector switch opening/closing status recognition model using a twin network framework enhances feature similarity and dissimilarity through a joint loss function of anchor samples, positive samples, and negative samples, learns discriminative features, and achieves accurate recognition of disconnector switch opening/closing status.
It improves the recognition accuracy of disconnector images with similar appearance but different open/closed states, and has good versatility and robustness, making it suitable for various AIS disconnectors and substation scenarios.
Smart Images

Figure CN116486147B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image recognition technology, and in particular relates to a switch opening / closing state recognition model, training method and device. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Confirming the open / closed status of disconnectors is a crucial step in ensuring the safety of operation and maintenance personnel and the safe and stable operation of the power grid. Automatic identification of disconnector open / closed status based on monitoring images is an important way to replace existing manual inspections and improve the automation and intelligence of the power grid, and is a necessary link to achieve one-click sequential control of substations. Existing methods for identifying the open / closed status of AIS disconnectors based on monitoring images still cannot meet practical needs. The main reason is that the identification of the open / closed status of AIS disconnectors requires judging from the external shape of the disconnector. However, AIS disconnectors have diverse shapes when open, especially for disconnectors that are nearly closed, whose shapes are similar to those when closed. Existing identification methods ignore the semantic similarity of the disconnector's morphological features, resulting in insufficient discriminative power of the extracted features and an inability to accurately distinguish between the open / closed status of closed and nearly closed disconnectors. Summary of the Invention
[0004] To address the technical problems mentioned above, this invention provides a disconnector opening / closing state recognition model, training method, and apparatus, which can accurately identify the opening / closing state of AIS disconnectors, especially for disconnector images with different opening / closing states and similar appearances (such as the identification of disconnector states when approaching or closing).
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] The first aspect of the present invention provides a disconnection / opening state identification model for a disconnector switch.
[0007] A disconnector switch open / closed state identification model includes: a first network branch, a second network branch, and a third network branch with identical structures and shared parameters;
[0008] The first, second, and third network branches each include a feature extraction module and a state recognition module. The feature extraction module is used to extract depth features from the input image; the state recognition module is used to map the depth features to obtain the confidence level of the switch's open / closed state.
[0009] A second aspect of the present invention provides a method for training a disconnector switch open / closed state recognition model.
[0010] A method for training a disconnector switch open / close state recognition model includes:
[0011] Construct the first training set of images showing the opening and closing states of the disconnector;
[0012] The disconnector opening and closing status recognition model is trained using the first training set to obtain the initially trained disconnector opening and closing status recognition model;
[0013] Based on the first training set and the initially trained disconnector opening and closing state recognition model, a second training set is constructed.
[0014] Random training sample groups are selected from the second training set. Positive sample images are used as the input of the first network branch of the disconnector opening and closing state recognition model; anchor sample images are used as the input of the second network branch of the disconnector opening and closing state recognition model; negative sample images are used as the input of the third network branch of the disconnector opening and closing state recognition model; based on the output results of the first network branch, the second network branch, and the third network branch, a joint loss is constructed to update the parameters of the initially trained disconnector opening and closing state recognition model.
[0015] Furthermore, the method for constructing the second training set includes: using the initially trained switch opening and closing state recognition model to obtain the confidence level of each sample image in the first training set belonging to its true label; selecting sample images with a value less than a set threshold as anchor samples; for any anchor sample, selecting samples with the same label as the anchor sample from the remaining samples in the first training set as positive sample images, and samples with different labels as negative sample images, and these three images constitute a training sample group; all training sample groups constitute the second training set.
[0016] Furthermore, the first network branch, the second network branch, and the third network branch have the same structure and share parameters;
[0017] The first, second, and third network branches each include a feature extraction module and a state recognition module. The feature extraction module is used to extract depth features from the input image; the state recognition module is used to map the depth features to obtain the confidence level of the switch's open / closed state.
[0018] Furthermore, the process of constructing the joint loss includes:
[0019] Positive sample images are used as input to the first network branch of the disconnection and opening status recognition model to obtain the confidence level of the disconnection and opening status of the positive sample images. Based on the confidence level of the disconnection and opening status of the positive sample images, the first loss is calculated.
[0020] Anchor sample images are used as input to the second network branch of the disconnection and opening status recognition model to obtain the confidence level of the disconnection and opening status of the anchor sample images. Based on the confidence level of the disconnection and opening status of the anchor sample images, the second loss is calculated.
[0021] Negative sample images are used as input to the third network branch of the disconnection and opening status recognition model to obtain the confidence level of the disconnection and opening status of the negative sample images. Based on the confidence level of the disconnection and opening status of the negative sample images, the third loss is calculated.
[0022] A discriminative loss is constructed based on the deep features output by the three feature extraction modules;
[0023] The combined loss is obtained based on the first loss, the second loss, the third loss, and the discriminative loss.
[0024] A third aspect of the present invention provides a training device for a disconnector switch open / closed state recognition model.
[0025] A training device for a disconnector switch open / close state recognition model includes:
[0026] The first training set construction module is configured to: construct a first training set of disconnection and opening state images of the disconnector;
[0027] The first training module is configured to: train the disconnector opening and closing state recognition model using the first training set to obtain the initially trained disconnector opening and closing state recognition model;
[0028] The second training set construction module is configured to: construct the second training set based on the first training set and the initially trained switch opening and closing state recognition model;
[0029] The second training module is configured to: select any training sample group from the second training set; use positive sample images as input to the first network branch of the disconnector opening / closing state recognition model; use anchor sample images as input to the second network branch of the disconnector opening / closing state recognition model; use negative sample images as input to the third network branch of the disconnector opening / closing state recognition model; and construct a joint loss based on the output results of the first network branch, the second network branch, and the third network branch to update the parameters of the initially trained disconnector opening / closing state recognition model.
[0030] A fourth aspect of the present invention provides a method for identifying the open / closed state of a disconnector switch.
[0031] A method for identifying the open / closed state of a disconnector includes:
[0032] The disconnector state recognition model is trained based on the disconnector state recognition model training method described in the second aspect.
[0033] Select the first, second, or third network branch in the disconnector opening / closing status identification model as the disconnector opening / closing status judgment model;
[0034] The image of the disconnect switch to be identified is obtained, and the disconnect switch open / closed state judgment model is used to obtain the confidence scores of the disconnect switch image in the open state and the confidence scores of the closed state.
[0035] The category corresponding to the maximum value between the confidence scores of the open and closed states is selected as the recognition result of the open / closed state of the switch in the image to be identified.
[0036] The fifth aspect of the present invention provides a device for identifying the open / closed state of a disconnector switch.
[0037] A device for identifying the open / closed status of a disconnector includes:
[0038] The model training module is configured to train the disconnection and opening state recognition model based on the disconnection and opening state recognition model training method described in the second aspect.
[0039] The model building module is configured to select the first, second, or third network branch in the disconnector state recognition model as the disconnector state judgment model.
[0040] The output module is configured to: acquire the image of the disconnector to be identified, use the disconnector's open / closed state judgment model to obtain the confidence scores of the disconnector image to be identified for the open state and the closed state, respectively;
[0041] The identification module is configured to select the category corresponding to the maximum value between the confidence level of the open state and the confidence level of the closed state as the identification result of the open / closed state of the switch in the image to be identified.
[0042] A sixth aspect of the present invention provides a computer-readable storage medium.
[0043] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the disconnection / opening state identification model training method as described in the second aspect above, or implements the steps in the disconnection / opening state identification method as described in the fourth aspect.
[0044] A seventh aspect of the present invention provides a computer device.
[0045] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the disconnection / opening state recognition model training method as described in the second aspect above, or when it executes the program, it implements the steps in the disconnection / opening state recognition method as described in the fourth aspect.
[0046] Compared with the prior art, the beneficial effects of the present invention are:
[0047] The switch state recognition network (SSRN) constructed in this invention is a Siamese network framework. It takes anchor sample IA, positive sample IP, and negative sample IN as input. Through a discriminative loss function, it enhances the feature similarity between samples with the same label (i.e., anchor sample IA and positive sample IP) and increases the dissimilarity (feature distance) between samples with different labels (i.e., anchor sample IA and negative sample IN). In this way, it learns discriminative features and achieves accurate recognition of the switch state, especially for switch images with similar appearance but different states (such as the switch shape when it is close to closed and the switch shape when it is closed).
[0048] The disconnector opening and closing status recognition model SSRN constructed in this invention can automatically learn high-level semantic common features that can identify the disconnector status from images with similar appearances. It has strong feature expression capabilities and can be applied to various AIS disconnectors, substation scenarios, image backgrounds, etc., and has good versatility and robustness.
[0049] The switchgear opening and closing status recognition model SSRN constructed in this invention is a twin network framework. The feature extraction module and the status recognition module in the model can be composed of any current classification backbone network, such as VGG, ResNet, GoogleNet, DenseNet, etc., and have good compatibility. Attached Figure Description
[0050] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0051] Figure 1 This is a schematic diagram of the knife switch structure and the knife switch closed state from a bottom-view perspective, as shown in this invention.
[0052] Figure 2 This is a schematic diagram of the switch structure and the switch-open state from a bottom-view perspective, as shown in this invention.
[0053] Figure 3 This is a schematic diagram of the disconnection / opening state identification model structure shown in this invention;
[0054] Figure 4 This is a schematic diagram of the network structure of the switch opening / closing state judgment model SSDN shown in this invention;
[0055] Figure 5 This is a flowchart illustrating the training method for the disconnection / opening state recognition model of the present invention;
[0056] Figure 6 This is a flowchart illustrating the disconnection / opening state identification method of the present invention. Detailed Implementation
[0057] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0058] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0059] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0060] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and systems according to various embodiments of this disclosure. It should be noted that each block in a flowchart or block diagram may represent a module, segment, or portion of code, which may include one or more executable instructions for implementing the logical functions specified in the various embodiments. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutively represented blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, may be implemented using a dedicated hardware-based system that performs the specified functions or operations, or using a combination of dedicated hardware and computer instructions.
[0061] Figure 1 This is a schematic diagram of the disconnector structure and its closed state, viewed from below. Figure 2 The diagram shows the structure of the disconnect switch and its open state from a downward angle. It can be seen that the disconnect switch has only one form when closed, while the entire process from when the switch is completely open until it is closed is considered the open state. Clearly, the disconnect switch can exhibit multiple forms when open. The diagram shows the 1st, kth, and Nth open states of the disconnect switch. For the disconnect switch that is nearly closed (as shown in the Nth form), its form is similar to that when the switch is closed.
[0062] Figure 3This is a schematic diagram of the disconnector switch open / closed state recognition model according to an embodiment of the present invention. The disconnector switch open / closed state recognition model SSRN is a Siamese network, comprising three structurally identical, parameter-shared recognition sub-networks S1, S2, and S3, with corresponding recognition losses L1, L2, and L3, and a discriminative loss Ld. Recognition sub-network S1 ( / S2 / S3) includes a feature extraction module and a state recognition module. The feature extraction module extracts deep features F1 ( / F2 / F3) from the input image IP ( / IA / IN). The state recognition module maps the features F1 ( / F2 / F3) output by the feature extraction module to obtain the confidence level of the disconnector switch open / closed state. Recognition losses L1, L2, and L3 are the classification losses of recognition sub-networks S1, S2, and S3, respectively. The discriminative loss Ld is used to constrain the similarity of features in similar images and increase the dissimilarity of features in dissimilar images, thereby enhancing the discriminative power of the features.
[0063] Figure 4 This is a schematic diagram of the network structure of the switch state discrimination network (SSDN). The SSDN has the same structure as the recognition sub-network S1 in the SSRN, containing a feature extraction module and a state recognition module. The state recognition module maps the features F output by the feature extraction module to obtain the confidence level of the switch state. The network parameters of the SSDN are the same as those of the trained recognition sub-network S1.
[0064] Figure 5 The present invention provides a method for training a disconnector switch open / close state recognition model, comprising four steps:
[0065] (1) Construct the first training set of disconnection and opening state images of the disconnector;
[0066] (2) The disconnection and opening status recognition model of the disconnector is trained using the first training set to obtain the initially trained disconnection and opening status recognition model;
[0067] (3) Using the pre-trained switch opening and closing state recognition model, obtain the confidence that each sample image in the first training set belongs to its true label; select sample images with a value less than a set threshold as anchor samples. For any anchor sample, select samples with the same label as the anchor sample from the remaining samples in the first training set as positive sample images, and samples with different labels as negative sample images. These three images constitute a training sample group; all training sample groups constitute the second training set.
[0068] (4) Select any training sample group from the second training set, use positive sample images as the input of the first network branch of the disconnector state recognition model, use anchor sample images as the input of the second network branch of the disconnector state recognition model, use negative sample images as the input of the third network branch of the disconnector state recognition model, and update the parameters of the disconnector state recognition model according to the first loss, the second loss, the third loss and the discriminative loss.
[0069] Figure 6 A flowchart of a method for identifying the open / closed state of a disconnector provided in an embodiment of the present invention includes four steps:
[0070] (1) Construct a disconnector switch open / closed status identification network SSRN;
[0071] (2) Construct a training set and train the SSRN network;
[0072] (3) Generate the disconnection / opening status judgment model SSDN;
[0073] (4) Identify the opening and closing status of disconnectors based on SSDN.
[0074] Example 1
[0075] This embodiment provides a disconnection / opening status identification model for disconnectors.
[0076] A disconnector switch open / closed state identification model includes: a first network branch, a second network branch, and a third network branch with identical structures and shared parameters;
[0077] The first network branch, the second network branch, and the third network branch each include a feature extraction module and a state recognition module. The feature extraction module is used to extract depth features from the input image; the state recognition module is used to map the depth features to obtain the confidence level of the switch opening and closing state.
[0078] Example 2
[0079] like Figure 5As shown, this embodiment provides a method for training a disconnector switch open / close state recognition model. This embodiment uses the application of this method to a server as an example for illustration. It is understood that this method can also be applied to terminals, and can also be applied to systems including terminals, servers, and other components, and can be implemented through interaction between the terminal and the server. The server can be an independent physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network servers, cloud communication, middleware services, domain name services, CDN security services, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein. In this embodiment, the method includes the following steps:
[0080] Construct the first training set of images showing the opening and closing states of the disconnector;
[0081] The disconnector opening and closing status recognition model is trained using the first training set to obtain the initially trained disconnector opening and closing status recognition model;
[0082] Based on the first training set and the initially trained disconnector opening and closing state recognition model, a second training set is constructed.
[0083] Random training sample groups are selected from the second training set. Positive sample images are used as the input of the first network branch of the disconnector opening and closing state recognition model; anchor sample images are used as the input of the second network branch of the disconnector opening and closing state recognition model; negative sample images are used as the input of the third network branch of the disconnector opening and closing state recognition model; based on the output results of the first network branch, the second network branch, and the third network branch, a joint loss is constructed to update the parameters of the initially trained disconnector opening and closing state recognition model.
[0084] Specifically, the training method for the disconnector opening / closing state recognition model in this embodiment is as follows:
[0085] 1) Train the SSRN network based on the first training set Train-Ini, and obtain the completed network model SSRN after training;
[0086] 2) Select training images from the first training set Train-Ini to construct a new second training set Train-Tri, which is used to retrain the trained network model SSRN. After training, the network model SSRN with updated parameters is obtained.
[0087] The second training set, Train-Tri, is constructed as follows: Based on the network model SSRN trained in step 1), the confidence score of each sample image in the first training set, Train-Ini, belonging to its true label is obtained. Samples with confidence scores less than a threshold T are used as anchor samples. For any anchor sample image IA, positive sample images IP with the same label as the anchor sample image IA and negative sample images IN with different labels are randomly selected from the remaining samples in the first training set to form a training sample group (IA, IP, IN). Following the above steps, training sample groups with the same number of anchor samples are obtained, and these training sample groups constitute the second training set, Train-Tri.
[0088] The disconnector switch open / closed state recognition model in this embodiment is a Siamese network, comprising three structurally identical, parameter-shared recognition sub-networks S1, S2, and S3, with recognition losses L1, L2, and L3 and a discriminative loss Ld. Recognition sub-network S1 ( / S2 / S3) includes a feature extraction module and a state recognition module. The feature extraction module extracts deep features F1 ( / F2 / F3) from the input image IP ( / IA / IN). The state recognition module maps the features F1 ( / F2 / F3) output by the feature extraction module to obtain the confidence level of the disconnector switch open / closed state. Recognition losses L1, L2, and L3 are the classification losses of recognition sub-networks S1, S2, and S3, respectively. The discriminative loss Ld is a triplet loss based on the three deep features, used to constrain the similarity of features in similar images and increase the dissimilarity of features in dissimilar images, thereby enhancing the discriminative power of the features.
[0089] The disconnection and opening status recognition model is trained using the training sample group in the second training set Train-Tri. Positive sample image IP from the same training sample group is input into the recognition sub-network S1 to obtain the first loss L1; anchor sample image IA is input into the recognition sub-network S2 to obtain the second loss L2; and negative sample image IN is input into the recognition sub-network S3 to obtain the third loss L3.
[0090] Specifically, the recognition subnetwork S1 ( / S2 / S3) includes a feature extraction module and a state recognition module, which can be constructed from the current classification network (such as ResNet, VGG, GoogleNet, etc.). The classification network typically contains multiple sets of convolutional layers, activation layers, and pooling layers; two sets of fully connected layers and activation layers; one fully connected layer and softmax layer; and finally outputs the confidence scores for each category. The multiple sets of convolutional layers, activation layers, and pooling layers, along with the two sets of fully connected layers and activation layers, constitute the feature extraction module, used to extract deep semantic features F from the knife-switch image. The last fully connected layer and softmax layer in the classification network constitute the state recognition module. The fully connected layer maps the deep semantic features F into a two-element vector Z, and the softmax layer normalizes the vector Z, outputting a vector... and These represent the confidence levels of whether the current disconnector image belongs to the open or closed state, respectively.
[0091] The recognition losses L1, L2, and L3 are classification losses, which can be achieved using cross-entropy loss. The discriminative loss Ld is a triplet loss, and its loss function is shown in the following equation:
[0092]
[0093] Where N is the number of training sample groups; It is the anchor sample image in the i-th sample group; These are positive sample images; It is a negative sample image; f() is the output of the feature extraction module, representing the deep semantic features of the current image; α is the interval threshold, representing and The minimum interval.
[0094] Example 3
[0095] This embodiment provides a training device for a disconnector switch open / closed state recognition model.
[0096] A training device for a disconnector switch open / close state recognition model includes:
[0097] The first training set construction module is configured to: construct a first training set of disconnection and opening state images of the disconnector;
[0098] The first training module is configured to: train the disconnector opening and closing state recognition model using the first training set to obtain the initially trained disconnector opening and closing state recognition model;
[0099] The second training set construction module is configured to: construct the second training set based on the first training set and the initially trained switch opening and closing state recognition model;
[0100] The second training module is configured to: select any training sample group from the second training set; use positive sample images as input to the first network branch of the disconnector opening / closing state recognition model; use anchor sample images as input to the second network branch of the disconnector opening / closing state recognition model; use negative sample images as input to the third network branch of the disconnector opening / closing state recognition model; and construct a joint loss based on the output results of the first network branch, the second network branch, and the third network branch to update the parameters of the initially trained disconnector opening / closing state recognition model.
[0101] It should be noted that the first training set construction module, the first training module, the second training set construction module, and the second training module described above are the same examples and application scenarios implemented in Embodiment 2, but are not limited to the content disclosed in Embodiment 2. It should also be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer-executable instructions.
[0102] Example 4
[0103] This embodiment provides a method for identifying the open / closed state of a disconnector.
[0104] A method for identifying the open / closed state of a disconnector includes:
[0105] (1) Train the disconnector state recognition model SSRN based on the disconnector state recognition model training method described in Example 2;
[0106] Specifically, the SSRN network training method is as follows:
[0107] 1) Train the SSRN network based on the first training set Train-Ini, and obtain the completed network model SSRN after training;
[0108] 2) Select training images from the first training set Train-Ini to construct a new second training set Train-Tri, which is used to retrain the trained network model SSRN. After training, the network model SSRN with updated parameters is obtained.
[0109] The second training set, Train-Tri, is constructed as follows: Based on the network model SSRN trained in step 1), the confidence score of each sample image in the first training set, Train-Ini, belonging to its true label is obtained. Samples with confidence scores less than a threshold T are used as anchor samples. For any anchor sample image IA, positive sample images IP with the same label as the anchor sample image IA and negative sample images IN with different labels are randomly selected from the remaining samples in the first sample set to form a training sample group (IA, IP, IN). Following the above steps, training sample groups with the same number of anchor samples are obtained, and these training sample groups constitute the second training set, Train-Tri.
[0110] (2) Select the first, second, or third network branch in the disconnector state identification model as the disconnector state judgment model;
[0111] Taking the first network branch as an example, the disconnector state judgment model SSDN is generated: the network structure of the disconnector state judgment model SSDN is the same as the structure of the recognition subnetwork S1 of SSRN, and its network structure is as follows. Figure 4As shown, the network parameters of the trained SSRN recognition subnetwork S1 are passed to the disconnector opening / closing status judgment model SSDN to obtain the parameter-optimized disconnector opening / closing status judgment model SSDN.
[0112] (3) Obtain the image of the disconnector to be identified, and use the disconnector opening and closing state judgment model to obtain the confidence level of the disconnector image to be identified in the opening state and the confidence level of the closing state.
[0113] (4) Select the category corresponding to the maximum value of the confidence level of the open state and the confidence level of the closed state as the recognition result of the open and closed state of the switch in the image to be identified.
[0114] Specifically, the image of the disconnector to be identified is used as the input of the disconnector open / closed state judgment model SSDN. The output of SSDN represents the confidence vector of whether the current disconnector image belongs to the open or closed state. From vector The category corresponding to the highest confidence level is selected as the recognition result of the current image's switch opening / closing state.
[0115] Example 5
[0116] This embodiment provides a device for identifying the open / closed status of a disconnector.
[0117] A device for identifying the open / closed status of a disconnector includes:
[0118] The model training module is configured to train the disconnection and opening state recognition model based on the disconnection and opening state recognition model training method described in the second aspect.
[0119] The model building module is configured to select the first, second, or third network branch in the disconnector state recognition model as the disconnector state judgment model.
[0120] The output module is configured to: acquire the image of the disconnector to be identified, use the disconnector's open / closed state judgment model to obtain the confidence scores of the disconnector image to be identified for the open state and the closed state, respectively;
[0121] The identification module is configured to select the category corresponding to the maximum value between the confidence level of the open state and the confidence level of the closed state as the identification result of the open / closed state of the switch in the image to be identified.
[0122] It should be noted that the model training module, model building module, output module, and recognition module described above are the same examples and application scenarios implemented in the steps of Embodiment 4, but are not limited to the content disclosed in Embodiment 4. It should also be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer-executable instructions.
[0123] Example 6
[0124] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the disconnection / opening state recognition model training method as described in Embodiment 2 above, or implements the steps in the disconnection / opening state recognition method as described in Embodiment 4.
[0125] Example 7
[0126] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the disconnection and opening state recognition model training method as described in Embodiment 2 above, or it implements the steps in the disconnection and opening state recognition method as described in Embodiment 4.
[0127] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0128] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0129] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0130] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0131] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0132] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A training method for a disconnector switch open / close state recognition model, characterized in that, include: Construct the first training set of images showing the opening and closing states of the disconnector; The disconnector opening and closing status recognition model is trained using the first training set to obtain the initially trained disconnector opening and closing status recognition model; Based on the first training set and the initially trained disconnector opening and closing state recognition model, a second training set is constructed. The method for constructing the second training set includes: using the initially trained switch opening and closing state recognition model, obtaining the confidence level of each sample image in the first training set belonging to its true label; selecting sample images with a value less than a set threshold as anchor samples; for any anchor sample, selecting samples with the same label as the anchor sample from the remaining samples in the first training set as positive sample images, and samples with different labels as negative sample images, these three images constitute a training sample group; all training sample groups constitute the second training set; Random training sample groups are selected from the second training set. Positive sample images are used as the input to the first network branch of the disconnector opening / closing state recognition model; anchor sample images are used as the input to the second network branch of the disconnector opening / closing state recognition model; negative sample images are used as the input to the third network branch of the disconnector opening / closing state recognition model; based on the output results of the first network branch, the second network branch, and the third network branch, a joint loss is constructed to update the parameters of the initially trained disconnector opening / closing state recognition model; the process of constructing the joint loss includes: Positive sample images are used as input to the first network branch of the disconnection and opening status recognition model to obtain the confidence level of the disconnection and opening status of the positive sample images. Based on the confidence level of the disconnection and opening status of the positive sample images, the first loss is calculated. Anchor sample images are used as input to the second network branch of the disconnection and opening status recognition model to obtain the confidence level of the disconnection and opening status of the anchor sample images. Based on the confidence level of the disconnection and opening status of the anchor sample images, the second loss is calculated. Negative sample images are used as input to the third network branch of the disconnection and opening status recognition model to obtain the confidence level of the disconnection and opening status of the negative sample images. Based on the confidence level of the disconnection and opening status of the negative sample images, the third loss is calculated. A discriminative loss is constructed based on the deep features output by the three feature extraction modules; The combined loss is obtained based on the first loss, the second loss, the third loss, and the discriminative loss.
2. The method for training a disconnector switch open / closed state recognition model according to claim 1, characterized in that, The first network branch, the second network branch, and the third network branch have the same structure and share parameters; The first, second, and third network branches each include a feature extraction module and a state recognition module. The feature extraction module is used to extract depth features from the input image; the state recognition module is used to map the depth features to obtain the confidence level of the switch's open / closed state.
3. A training device for a disconnect / open state recognition model, characterized in that, include: The first training set construction module is configured to: construct a first training set of disconnection and opening state images of the disconnector; The first training module is configured to: train the disconnector opening and closing state recognition model using the first training set to obtain the initially trained disconnector opening and closing state recognition model; The second training set construction module is configured to: construct the second training set based on the first training set and the initially trained switch opening and closing state recognition model; The method for constructing the second training set includes: using the initially trained switch opening and closing state recognition model, obtaining the confidence level of each sample image in the first training set belonging to its true label; selecting sample images with a value less than a set threshold as anchor samples; for any anchor sample, selecting samples with the same label as the anchor sample from the remaining samples in the first training set as positive sample images, and samples with different labels as negative sample images, these three images constitute a training sample group; all training sample groups constitute the second training set; The second training module is configured to: select any training sample group from the second training set; use positive sample images as input to the first network branch of the disconnector opening / closing state recognition model; use anchor sample images as input to the second network branch of the disconnector opening / closing state recognition model; use negative sample images as input to the third network branch of the disconnector opening / closing state recognition model; and construct a joint loss based on the output results of the first network branch, the second network branch, and the third network branch to update the parameters of the initially trained disconnector opening / closing state recognition model. The process of constructing the joint loss includes: Positive sample images are used as input to the first network branch of the disconnection and opening status recognition model to obtain the confidence level of the disconnection and opening status of the positive sample images. Based on the confidence level of the disconnection and opening status of the positive sample images, the first loss is calculated. Anchor sample images are used as input to the second network branch of the disconnection and opening status recognition model to obtain the confidence level of the disconnection and opening status of the anchor sample images. Based on the confidence level of the disconnection and opening status of the anchor sample images, the second loss is calculated. Negative sample images are used as input to the third network branch of the disconnection and opening status recognition model to obtain the confidence level of the disconnection and opening status of the negative sample images. Based on the confidence level of the disconnection and opening status of the negative sample images, the third loss is calculated. A discriminative loss is constructed based on the deep features output by the three feature extraction modules; The combined loss is obtained based on the first loss, the second loss, the third loss, and the discriminative loss.
4. A method for identifying the open / closed state of a disconnector, characterized in that, include: The disconnector state recognition model is trained based on the disconnector state recognition model training method according to any one of claims 1-2; Select the first, second, or third network branch in the disconnector opening / closing status identification model as the disconnector opening / closing status judgment model; The image of the disconnect switch to be identified is obtained, and the disconnect switch open / closed state judgment model is used to obtain the confidence scores of the disconnect switch image in the open state and the confidence scores of the closed state. The category corresponding to the maximum value between the confidence scores of the open and closed states is selected as the recognition result of the open / closed state of the switch in the image to be identified.
5. A device for identifying the open / closed state of a disconnector switch, characterized in that, include: The model training module is configured to train the disconnection and closing state recognition model based on the disconnection and closing state recognition model training method according to any one of claims 1-2. The model building module is configured to select the first, second, or third network branch in the disconnector state recognition model as the disconnector state judgment model. The output module is configured to: acquire the image of the disconnector to be identified, use the disconnector's open / closed state judgment model to obtain the confidence scores of the disconnector image to be identified for the open state and the closed state, respectively; The identification module is configured to select the category corresponding to the maximum value between the confidence level of the open state and the confidence level of the closed state as the identification result of the open / closed state of the switch in the image to be identified.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the disconnection and opening state recognition model training method as described in any one of claims 1-2, or it implements the steps in the disconnection and opening state recognition method as described in claim 4.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the disconnection and opening state recognition model training method as described in any one of claims 1-2, or when it executes the program, it implements the steps in the disconnection and opening state recognition method as described in claim 4.
Citation Information
Patent Citations
Electricity stealing detection method based on triple twin network
CN113469253A