Method, device and storage medium for identifying short connected elements in terminal strip drawings

Through the yolov5-yolact-yolov5 three-layer deep learning algorithm and the opencv image recognition algorithm, the problem of identifying short continuous elements in the terminal strip drawing of electrical factory stations is solved, and the accurate positioning and recognition of short continuous elements in the terminal strip drawing is realized.

CN115995086BActive Publication Date: 2025-08-22SOUTHEAST UNIV +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211184805.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-27
Publication Date
2025-08-22
Estimated Expiration
2042-09-27

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify short continuous elements in the terminal strip drawings of electrical plant stations, especially small target elements with varying shapes, and the traditional methods are poorly robust.

Method used

The three-layer deep learning algorithm of yolov5-yolact-yolov5 combined with the opencv image recognition algorithm is used to recognize short continuous elements in terminal strip drawings through segmentation, cutting and coordinate restoration.

Benefits of technology

The problem of small target element recognition has been optimized, the bottleneck of the object detection algorithm for the recognition of diverse objects is broken, and the accurate positioning and identification of short continuous elements of the terminal strip drawings of electrical factory stations is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115995086B_ABST
    Figure CN115995086B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and storage medium for identifying short-connected graphic elements in terminal strip drawings, and relates to the application field of power grid automation systems. The method for identifying short-connected graphic elements in terminal strip drawings comprises the following steps: identifying a terminal strip area in a terminal strip drawing; segmenting an area containing two or more terminal strips; separating the segmented terminal strip area into a terminal strip table area and a terminal strip connection line area; identifying and outputting the row and column relationships of the terminal strip table area; cutting the terminal strip table once every ten rows; using the cut terminal strip table diagrams of every ten rows as a training set, dividing the short-connected graphic elements into three parts: head, body and tail, and using these as training set labels to train a DLP-YOLOv5 model; and solving the problem that existing methods have high requirements for graphic element morphology, making it difficult to correctly identify a slight pixel change and lacking robustness. Furthermore, there is currently no better solution for identifying small target graphic elements with variable morphology, such as short-connected graphic elements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power grid automation system applications, and in particular to a method, device and storage medium for identifying short-connected graphic elements in a terminal block drawing. Background Art

[0002] Electrical plant wiring drawings serve as a crucial engineering basis for the construction layout, maintenance, and expansion of power plants and substations, making them a highly valuable document asset for power companies. The maintenance, modification, and updating of traditional paper-based wiring drawings primarily rely on the experience of on-site power dispatchers. In the digital information environment, big data analysis and computer image processing technologies have introduced a new approach to traditional drawing archival management: drawing digitization. Traditional methods for detecting and recognizing engineering drawings are mostly based on vector data sets. They employ vectorization algorithms such as thinning, contour matching, zero-joining graphs, Hough transforms, and orthogonal direction searches to identify geometric primitives within the drawing. These algorithms then construct element recognition based on geometric constraints and topological relationships. However, drawing vectorization technology has significant limitations in processing noisy pixels and recognizing curved images. The extracted features are also less robust and struggle to represent topological relationships between individual vectors. Consequently, traditional drawing vectorization recognition techniques are difficult to apply to electrical plant terminal block wiring diagrams, which feature high image resolution, a high concentration of small objects, and diverse element morphologies.

[0003] Currently, template matching is often used to detect graphic elements and symbols in drawings. However, this method has high requirements for the shape of the element, making it difficult to correctly identify even the slightest pixel change, making it non-robust. Furthermore, there is currently no effective solution for identifying small, variable-shaped objects such as short, continuous segments. Summary of the Invention

[0004] (1) Technical problems solved

[0005] To address the shortcomings of existing technologies, the present invention provides a method, device, and storage medium for identifying short, connected segments of terminal block drawings. These methods address the existing challenges of high requirements for the shape of the segments, making it difficult to correctly identify even the slightest pixel variation and lacking robustness. Furthermore, there is currently no effective solution for identifying small, variable-shaped segments like these.

[0006] (2) Technical solution

[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions: a method for identifying short connected piece elements in a terminal block drawing, the method comprising the following steps:

[0008] S1: Identify the terminal strip area in the terminal strip drawing;

[0009] S2: Split the area containing two or more terminal blocks;

[0010] S3: Separate the divided terminal strip area into the terminal strip table area and the terminal strip connection line area;

[0011] S4: Identify and output the row and column relationship of the terminal strip table area;

[0012] S5: Cut the terminal strip table every ten rows;

[0013] S6: Use every ten rows of the terminal strip diagram as the training set, divide the short piece into three parts: head, body, and tail, and use this as the training set label to train the DLP-YOLOv5 model;

[0014] S7: The terminal block table diagram of every ten rows after cutting is used as input and sent to the DLP-YOLOv5 model for prediction to obtain the coordinate information of the head, body, and tail relative to the cutting diagram;

[0015] S8: Perform four coordinate restorations on the coordinate information of the head, body, and tail relative to the cutting diagram, and then restore the head, body, and tail to a complete short link. Output the coordinate information of the short link in the terminal strip drawing.

[0016] Preferably, the first training set in the terminal strip area in the terminal strip drawing for identification is the electrical plant terminal strip drawing, the label is the terminal strip area marked with a rectangular box, and the terminal strip area contains more than one terminal strip. The first training set is sent to the yolov5 network for training to obtain the part-yolov5 algorithm.

[0017] Preferably, the second training set for segmenting the area containing two or more terminal strips is the terminal strip area identified in the step S1, and the label is the terminal strip marked with an irregular curve. The second training set is sent to the yolact network for training to obtain an irregular edge terminal strip containing only one connected area, and is expanded into a rectangle by adding white pixels through opencv.

[0018] Preferably, the third training set in which the segmented terminal strip area is separated into the terminal strip table area and the terminal strip connecting line area is the terminal strip expanded into a rectangle in the step S2, and the labels are the terminal strip table and connecting lines marked with rectangles. The third training set is sent to the yolov5 network for training to obtain the table_line-yolov5 algorithm, and the table_line-yolov5 algorithm is used to correctly identify the terminal strip table area and the connecting line area.

[0019] Preferably, the terminal block table is cut every ten rows as follows:

[0020] A sliding cutting algorithm is designed to perform sliding cutting on every ten rows of the terminal block table identified in step S3 according to the row-column relationship obtained in step S4.

[0021] Preferably, the step S8 is specifically as follows:

[0022] First, the coordinates of the recognition results obtained in step S7 are restored. The first layer is restored to the terminal strip table identified by the table_line-yolov5 algorithm to obtain the coordinate information of the head, body, and tail relative to the figure; the second layer is restored to the terminal strip diagram obtained by the yolact strength segmentation algorithm to obtain the coordinate information of the head, body, and tail relative to the figure; the third layer is restored to the terminal strip area identified by the part-yolov5 algorithm to obtain the coordinate information of the head, body, and tail relative to the figure; the fourth layer is restored to the terminal strip drawing to obtain the absolute coordinate information of the head, body, and tail; then the three categories of head, body, and tail are restored to obtain the coordinate information of the complete short piece in the terminal strip drawing.

[0023] On the other hand, an electrical plant is provided, which uses the method for identifying short-connected graphic elements in terminal block drawings to identify short-connected graphic elements in terminal block drawings.

[0024] In another aspect, a device is provided, comprising:

[0025] one or more processors;

[0026] a memory for storing one or more programs,

[0027] When the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method for identifying short-connected graphic elements in a terminal strip drawing.

[0028] On the other hand, a computer-readable storage medium storing a computer program is provided, wherein when the program is executed by a processor, the method for identifying short-connected graphic elements in a terminal strip drawing is implemented.

[0029] (3) Beneficial effects

[0030] The present invention discloses a method, device, and storage medium for identifying short-connected patch primitives in terminal strip drawings. First, the three-layer deep learning algorithm of yolov5-yolact-yolov5 is used to detect and extract the terminal strip table in the terminal strip drawing. Second, the row-column relationship of the terminal strip table is determined and outputted through the opencv image recognition algorithm. Next, the terminal strip table is sliced ​​by row through a sliding window to achieve the conversion from small target detection to large target detection. Then, the short-connected patch is divided into three parts: head, body, and tail to achieve short-connected patch feature abstraction and solve the problem of target morphology diversity. Finally, the yolov5 target detection algorithm, coordinate restoration, and short-connected patch morphology recovery are used to correctly output the position and coordinate information of the short-connected patch in the terminal strip drawing. The present invention optimizes the problem of identifying small target primitives in electrical drawings, while breaking through the technical bottleneck of target detection algorithms for identifying morphologically diverse targets. It can identify and locate short-connected patch primitives in terminal strip drawings of electrical plants and provide technical support for the digitization of electrical plants and stations. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 This is a flow chart of the identification method of the present invention;

[0032] Figure 2 This is an example diagram of the terminal block used in the present invention;

[0033] Figure 3 Schematic diagram of the terminal block identified by the part-yolov5 algorithm and the yolact algorithm of the present invention;

[0034] Figure 4 The table_line-yolov5 algorithm of the present invention is used to segment the terminal block table and the connection line diagram;

[0035] Figure 5 This is a schematic diagram of a terminal block table cut into ten rows of sliding windows according to the present invention;

[0036] Figure 6 This is a schematic diagram of the present invention dividing short continuous pieces into three categories: head, body, and tail;

[0037] Figure 7 The terminal block area result diagram identified by the part-yolov5 algorithm of the present invention;

[0038] Figure 8 The terminal block result diagram of the unique connected area obtained by the yolact algorithm of the present invention;

[0039] Figure 9 The terminal block table and connection line area result diagram identified by the table_line-yolov5 algorithm of the present invention;

[0040] Figure 10 The terminal row and column relationship XML result diagram output by opencv of the present invention;

[0041] Figure 11 The coordinates of the present invention are restored to the head, body, and tail positions of the terminal block diagram, as well as the position result diagram after restoration to a short connected piece;

[0042] Figure 12 This is the short-connected piece coordinate information xml result diagram finally output by the present invention. DETAILED DESCRIPTION

[0043] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0044] Example

[0045] like Figure 1-11 As shown, an embodiment of the present invention provides a method for identifying short connected piece elements in a terminal block drawing, the method comprising the following steps:

[0046] S1 uses the Part-Yolo5 target detection algorithm to identify areas containing terminal strips in terminal strip drawings. It should be noted that currently, no more suitable method has been found for identifying terminal strip areas in terminal strip drawings. Traditional image segmentation algorithms, such as threshold segmentation, watershed algorithms, and clustering algorithms, are not suitable for identifying drawings and are often used to segment content such as photographs. The Part-Yolo algorithm is a target detection algorithm based on deep learning. By labeling and training a large number of sample sets with target areas—terminal strip areas—it can accurately identify and segment terminal strip areas in terminal strip drawings. It is suitable for image segmentation in drawings without obvious color contrast or regional color block divisions, or without clear foreground and background divisions.

[0047] S2, using the yolact instance segmentation algorithm, segments the area containing two or more terminal strips in S1; it should be noted that there is also a traditional method for segmenting two or more terminal strip areas - the image contour detection algorithm. The contour detection algorithm is to find the largest circumscribed rectangular box of all connected graphics, and add a terminal strip area that contains a connecting line and a table area connected to the terminal strip area and an independent table area. This method can be used to separate the two. The specific method is: if the terminal strip area contains two nested rectangular boxes, then cut the smaller rectangular box to achieve terminal strip area segmentation. However, the application scenario of this method is relatively limited. If the area to be segmented contains two or more single-connected areas of the connecting line and the table area, and the areas are nested concavely and convexly, then when using contour detection, the maximum circumscribed rectangular boxes detected overlap and cannot be separated. If the yolact algorithm is used for labeling and training, the target can be extracted strictly according to the edge of the connected area, without the need for judgment through additional conditions. It is applicable to all terminal strip area situations and is robust.

[0048] S3: Use the table_line-yolov5 algorithm to separate the terminal block segmented in S2 into the terminal block table area and the terminal block connection line area. It should be noted that no other algorithm has been found to segment the connected connection line area and table area. This is because image processing algorithms do not have clear characteristics of the image to be identified, such as color, foreground and background, and pixels. If contour detection is used, the two areas are connected and cannot be separated. The only way is to perform labeling training on Target 1 (the connection line area) and Target 2 (the table area) to obtain corresponding detection results and then perform separation and cutting based on coordinates.

[0049] In step 4, OpenCV is used to identify and output the row and column relationships of the terminal strip table area in step 3. It should be noted that this requires first identifying the horizontal and vertical lines in the table. Currently, only OpenCV's horizontal and vertical line detection functions can perform this. The row and column relationships and cell coordinates of the table area are then determined by locating the intersection of the horizontal and vertical lines, constructing cells, determining the horizontal and column relationships, and correcting the parent-child relationships.

[0050] S5 designs a row-by-row sliding window cutting algorithm, cutting the terminal strip table in S3 every ten rows. It should be noted that ten-row cutting is a dynamic adaptive sliding window cutting method. The step size and width of each cutting window are determined by the row and column information of the table, and the window size and step size are adaptively adjusted. Traditional sliding window cutting is static sliding window cutting, which selects a fixed cutting window and step size. The advantages of ten-row sliding window cutting over fixed window step cutting are: ten-row sliding window cutting retains the complete short continuous piece portion and does not cut the short continuous piece portion to be identified into new, scattered, and unrecognizable short continuous piece fragments, creating the necessary premise for subsequent short continuous piece identification.

[0051] S6 uses the 10-row terminal block table diagram cut out in S5 as a training set, divides the short segments into three parts: head, body, and tail. These are used as training set labels to train the DLP-YOLOv5 model. It should be noted that in addition to YOLO, DBNet is also a target detection algorithm. However, DBNet is a binary target detection algorithm that can only determine whether a target is or is not a target and cannot detect targets of three categories. Meanwhile, the DLP-YOLOv5 model divides the short segment into three detection target parts with fixed features, achieving a recognition accuracy of 99%. However, algorithms that treat the short segment as a detection target as a whole fail to correctly recognize the target. This is because the short segments vary in shape and length, making it impossible to learn their features. Furthermore, recognition is impossible within the table of the ten-row cut diagram, as this does not contain the complete short segment. Recognition can only be performed within the complete table diagram, resulting in an extremely low recognition rate.

[0052] S7 takes the 10-row terminal block table diagram cut in S5 as input and feeds it into the DLP-YOLOv5 model for prediction to obtain the coordinate information of the head, body, and tail relative to the cutting diagram.

[0053] S8, performs four coordinate restorations on the coordinate results of S7, then restores the head, body, and tail into complete short pieces, and outputs the coordinate information of the short pieces in the terminal strip drawing. It should be noted that the four times refer to the four image cutting processes before identifying the short pieces. The original image is cut for the first time using part-yolo to obtain a rectangular terminal strip area diagram, and then the rectangular terminal strip area is cut for the second time using yolact to obtain a single-connected terminal strip area (only a single table area, or the table area and the connection line area are all connected). Then, the table_line-yolo algorithm is used for the third cutting to obtain an independent table area and a connection line area. Finally, the independent table area is cut for the fourth time with one area for every ten rows of the table, and the cut diagram is used for short piece identification. Coordinate restoration is a reverse process. First, the initial short-piece coordinates detected in every ten-row table are restored to the complete terminal strip table area that is not cut according to ten rows. This is the first coordinate restoration. Then, the coordinates of the terminal strip table area are restored to the single-connected terminal strip area cut by yolact. This is the second coordinate restoration. Then, the coordinates of the single-connected terminal strip area are restored to the rectangular terminal strip area cut by part-yolo. This is the third coordinate restoration. Finally, the coordinates are restored to the original drawing to complete the entire coordinate restoration process. A total of 4 times are required to restore to the original terminal strip drawing.

[0054] Preferably, the training set in S1 is a drawing of a terminal block of an electrical plant, and the label is a terminal block area marked with a rectangular frame (a general term for the terminal block table and the connection line area). The area may contain more than one terminal block (i.e., there are two connected domains in the terminal block area), such as Figure 3 The large rectangular box with numbers is shown. When a terminal strip area contains two connected domains, it will affect the matching of the terminal strip table and the connection relationship of the connection line. The training set is sent to the yolov5 network for training to obtain the part-yolov5 algorithm. The algorithm can correctly identify the terminal strip area of ​​the terminal strip drawing, such as Figure 7 As shown in the figure, the area marked by the rectangular box is the terminal strip area identified by the part-yolov5 algorithm.

[0055] Preferably, the training set in S2 is the terminal block area identified in S1, and the label is the terminal block marked with an irregular curve, such as Figure 3 The irregular shadow area and the small rectangular shadow area in the figure are shown. The training set is sent to the YOLACT network for training. The algorithm can obtain an irregular edge terminal strip containing only one connected area. The white pixels are added to expand it into a rectangle through OpenCV. This step can ensure that there is only one terminal strip connected area in a terminal strip area, which is convenient for the subsequent determination of the connection relationship, as shown in the following figure. Figure 8As shown in the figure, the irregular shaded area and the small rectangular shaded area are the single-connected terminal block areas identified by the yolact algorithm.

[0056] Preferably, the training set in S3 is the terminal block expanded into a rectangle in S2, and the label is the terminal block table and connecting line marked with a rectangle. The training set is sent to the yolov5 network for training to obtain the table_line-yolov5 algorithm, which can correctly identify the terminal block table area and the connecting line area, such as Figure 4 As shown, each area has only one terminal strip table or connection line, which is convenient for identifying the row and column relationship and graphic elements in the table, as well as the horizontal and vertical connection relationship of the connection line. Figure 9 As shown, the location marked by the rectangular box is the table and connection line area identified by the table_line-yolov5 algorithm. Each area has only one terminal strip table or connection line.

[0057] Preferably, in S4, opencv is used to identify the row and column relationship of the terminal table obtained in S3 and output it, such as Figure 10 As shown in the rectangular box, Row_Col = [1,1] represents the first row and first column of the table, and the columns are sorted from right to left.

[0058] Preferably, the algorithm for sliding cutting by row is designed in S5. According to the row-column relationship obtained in S4, the terminal block table identified in S3 is subjected to sliding cutting every ten rows. The size of the sliding window is the length and width of the 10-row table, and a ten-row cutting diagram is obtained, such as Figure 5 As shown, if there are ten rows or more, they will be cut into ten rows, and if there are less than ten rows, they will be cut according to the actual number of rows.

[0059] Preferably, the training set in S6 is the ten-line cutting graph obtained in S5, and the label is to segment the short continuous piece into three categories: head, body, and tail, such as Figure 6 The reason for dividing into three categories is that the short continuous pieces have different shapes, that is, the length of the short continuous pieces varies. Some short continuous pieces occupy thirty or forty rows of the table, while others occupy only two rows. This makes it difficult for Yolo to learn the characteristics of the target. Therefore, the short continuous pieces are divided into three categories: Figure 6 It can be seen that the three types of small primitives, head, body, and tail, have fixed single features, which greatly helps the training and learning of the YOLO network. The training set is fed into the YOLOv5 network for training to obtain the DLP-YOLOv5 model.

[0060] Preferably, in S7, the ten-line cutting diagram obtained in S5 is fed into the DLP-YOLOv5 model trained in S6 to obtain the coordinate information of the three types of objects: head, body, and tail. The coordinates at this time are relative to the coordinates of the ten-line cutting diagram, not the coordinates of the actual terminal strip drawing.

[0061] Preferably, in said S8, the coordinates of the recognition result obtained by S7 are first restored. The first layer is restored to the terminal strip table identified by the table_line-yolov5 algorithm to obtain the coordinate information of the head, body, and tail relative to the figure; the second layer is restored to the terminal strip figure obtained by the yolact strength segmentation algorithm to obtain the coordinate information of the head, body, and tail relative to the figure; the third layer is restored to the terminal strip area identified by the part-yolov5 algorithm to obtain the coordinate information of the head, body, and tail relative to the figure; the fourth layer is restored to the terminal strip drawing to obtain the absolute coordinate information of the head, body, and tail. For the convenience of display, Figure 11 The terminal strip table area shown is a typical area, such as Figure 11 As shown in (a), the small rectangular boxes in the cells are the positions of the head, body, and tail in the original terminal block diagram. The code for coordinate restoration is as follows:

[0062]

[0063]

[0064] Next, we will annotate the code from top to bottom:

[0065] 1. Define the coordinate restoration function, and the input parameters are the coordinate information of the upper left corner of the layer in the previous layer and the coordinate information of the primitive in the current layer;

[0066] 2. Calculate the X coordinate of the upper left corner;

[0067] 3. Calculate the Y coordinate of the upper left corner;

[0068] 4. Calculate the X coordinate of the lower right corner;

[0069] 5. Calculate the Y coordinate of the lower right corner;

[0070] 6. Integrate the coordinates of the primitives after restoration;

[0071] 7. Return the coordinate information after coordinate restoration;

[0072] 8. Initialize the coordinate information of the point in the upper left corner of this layer in the previous layer;

[0073] 9. Initialize the coordinate information of the primitive in this layer;

[0074] 10. Call the coordinate restoration function to output the coordinate restoration result.

[0075] Then recover the head, body, and tail to get the coordinate information of the complete short piece in the terminal block drawing. The short piece recovery code is as follows. Its main function is to read the relevant information of the head, body, and tail from the XML of the initial result, and then according to the logic that two consecutive heads and tails on the vertical coordinate within the same horizontal coordinate range are a complete short piece, such as Figure 11 As shown in (b), it can be seen that the long rectangular box in the cell at this time is the position of the complete short connector in the terminal block drawing. Figure 12 The information of the short continuous piece corresponding to this area in the final result XML. Recover the short continuous piece:

[0076]

[0077]

[0078] Annotate the above code from top to bottom:

[0079] 1. Define an empty short contiguous array

[0080] 2. The data extracted from the loop short piece XML is the length of the data 'ID' in the data.

[0081] 3. Add [index, coordinate information] to the short contiguous array

[0082] 4. Sort by the Y coordinate of the upper left corner of the short continuous piece from small to large

[0083] 5. Create a short dictionary variable

[0084] 6. Initialize key = 'IconName'

[0085] 7. Initialize key = 'PartID'

[0086] 8. Initialize key = 'AreaID'

[0087] 9. Initialize key = 'IconID'

[0088] 10. Initialize key = 'XYXY'

[0089] 11. Initialize key = 'ID'

[0090] 12. Initialize key = 'id'

[0091] 13. Define the variable i and initialize it to 0

[0092] 14. When i is less than the length of the short contiguous array, keep looping

[0093] 15. Define the variable j as the first element in the current element of the short segment array, that is, the index value of the original data short segment

[0094] 16. Define the variable k as the first element in the next adjacent element of the short segment array, that is, the index value of the original data short segment

[0095] 17. Assign the value 'shortconnectedpiece' to the short connected piece dictionary variable key = 'IconName'

[0096] 18. Assign the value of key='PartID' in the dictionary data extracted from the short piece XML to the short piece dictionary variable key='PartID'

[0097] 19. Assign the value of key='AreaID' in the dictionary data extracted from the short-length XML to the short-length dictionary variable key='AreaID'

[0098] 20. Assign the value of key='IconID' in the dictionary data extracted from the short-link XML to the short-link dictionary variable key='IconID'

[0099] 21. Assign the short segment dictionary variable key = 'XYXY' the coordinates of the upper left corner of the current index and the lower right corner of the next index of the dictionary data with key = 'XYXY' extracted from the short segment XML. This will restore the head and tail of the short segment to a complete short segment.

[0100] 22. Assign the value of key='ID' in the dictionary data extracted from the short-link XML to the short-link dictionary variable key='ID'

[0101] 23. The index jumps to the position plus 2, which is the next head part

[0102] 24. Loop by the length of the short concatenated dictionary key = 'XYXY'

[0103] 25. Assign the value of key='PartID' plus key='AreaID' in the short segment dictionary variable XML to the short segment dictionary variable key='id'.

[0104] The present invention firstly realizes the detection and extraction of the terminal strip table in the terminal strip drawing through the YOLV5-YOLACT-YOLV5 three-layer deep learning algorithm; secondly, realizes the judgment and output of the row and column relationship of the terminal strip table through the OpenCV image recognition algorithm; then, realizes the conversion from small target detection to large target detection by performing row-by-row sliding window cutting on the terminal strip table; then, divides the short piece into three parts: head, body and tail, realizes the feature abstraction of the short piece, and solves the problem of target morphology diversification; finally, through the YOLV5 target detection algorithm, coordinate restoration and short piece morphology recovery, correctly outputs the position and coordinate information of the short piece in the terminal strip drawing.

[0105] As another embodiment of the present invention, an electrical substation is provided, which uses a method for identifying short-connected graphic elements in a terminal block drawing in the above embodiment to identify short-connected graphic elements in a terminal block drawing.

[0106] As another embodiment of the present invention, a device is provided, comprising:

[0107] one or more processors;

[0108] a memory for storing one or more programs,

[0109] When the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute a method for identifying short-connected graphic elements in a terminal strip drawing in the above embodiment.

[0110] As another embodiment of the present invention, a computer-readable storage medium storing a computer program is provided, characterized in that when the program is executed by a processor, a method for identifying short-connected graphic elements in a terminal strip drawing in the above embodiment is implemented.

[0111] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

Claims

1. A method for identifying short connected elements in a terminal block drawing, characterized in that: The method comprises the following steps: S1: Identify the terminal strip area in the terminal strip drawing; S2: Split the area containing two or more terminal blocks; S3: Separate the divided terminal strip area into the terminal strip table area and the terminal strip connection line area; S4: Identify and output the row and column relationship of the terminal strip table area; S5: Cut the terminal strip table every ten rows; S6: Use every ten rows of the terminal strip diagram as the training set, divide the short piece into three parts: head, body, and tail, and use this as the training set label to train the DLP-YOLOv5 model; S7: The terminal block table diagram of every ten rows after cutting is used as input and sent to the DLP-YOLOv5 model for prediction to obtain the coordinate information of the head, body, and tail relative to the cutting diagram; S8: Perform four coordinate restorations on the coordinate information of the head, body, and tail relative to the cutting diagram, and then restore the head, body, and tail to a complete short link. Output the coordinate information of the short link in the terminal strip drawing.

2. The method for identifying short connected elements in a terminal strip drawing according to claim 1, characterized in that: The first training set in the terminal strip area in the terminal strip drawing is an electrical plant terminal strip drawing, and the label is a terminal strip area marked with a rectangular box. The terminal strip area contains more than one terminal strip. The first training set is sent to the yolov5 network for training to obtain the part-yolov5 algorithm.

3. The method for identifying short connected elements in a terminal strip drawing according to claim 2, characterized in that: The second training set for segmenting the area containing two or more terminal strips is the terminal strip area identified in step S1, and the label is the terminal strip marked with irregular curves. The second training set is sent to the YOLACT network for training to obtain an irregular edge terminal strip containing only one connected area, which is expanded into a rectangle by adding white pixels through OpenCV.

4. The method for identifying short connected elements in a terminal strip drawing according to claim 3, characterized in that: The third training set in which the segmented terminal strip area is separated into the terminal strip table area and the terminal strip connection line area is the terminal strip expanded into a rectangle in the step S2, and the labels are the terminal strip table and connection lines marked with rectangles. The third training set is sent to the yolov5 network for training to obtain the table_line-yolov5 algorithm, which is used to correctly identify the terminal strip table area and the connection line area.

5. The method for identifying short connected elements in a terminal block drawing according to claim 4, characterized in that: The specific steps of cutting the terminal block table every ten rows are as follows: A sliding cutting algorithm is designed to perform sliding cutting on every ten rows of the terminal block table identified in step S3 according to the row-column relationship obtained in step S4.

6. The method for identifying short connected elements in a terminal strip drawing according to claim 1, characterized in that: The step S8 is specifically as follows: First, the coordinates of the recognition results obtained in step S7 are restored. The first layer is restored to the terminal strip table identified by the table_line-yolov5 algorithm to obtain the coordinate information of the head, body, and tail relative to the figure; the second layer is restored to the terminal strip diagram obtained by the yolact strength segmentation algorithm to obtain the coordinate information of the head, body, and tail relative to the figure; the third layer is restored to the terminal strip area identified by the part-yolov5 algorithm to obtain the coordinate information of the head, body, and tail relative to the figure; the fourth layer is restored to the terminal strip drawing to obtain the absolute coordinate information of the head, body, and tail; then the three categories of head, body, and tail are restored to obtain the coordinate information of the complete short piece in the terminal strip drawing.

7. A device, characterized in that The device comprises: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors execute the method for identifying short-connected graphic elements in a terminal strip drawing as described in any one of claims 1 to 6.

8. A computer-readable storage medium storing a computer program, characterized in that: When the program is executed by a processor, a method for identifying short-connected graphic elements in a terminal block drawing as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Automatic recognition method and system for electric secondary design cubicle and mechanism case terminal blocks

    CN104376169A

  • Terminal type identification method and device based on image processing, terminal and medium

    CN112785546A